[Xfce4-commits] pager: copied a11y implementation from libwnck
Updating branch refs/heads/andrzejr/deskbar-pager to e319360585143e4508cd3341f91f4293995e617d (commit) from 11411a9a8919b17953d3a6be19e6ee6865bc39b1 (commit) commit e319360585143e4508cd3341f91f4293995e617d Author: Andrzej Date: Thu Dec 22 03:30:17 2011 +0900 pager: copied a11y implementation from libwnck plugins/pager/pager-wnck-accessible-factory.c | 71 +++ plugins/pager/pager-wnck-accessible-factory.h | 59 +++ plugins/pager/pager-wnck-accessible.c | 487 plugins/pager/pager-wnck-accessible.h | 62 +++ .../pager-wnck-workspace-accessible-factory.c | 64 +++ .../pager-wnck-workspace-accessible-factory.h | 59 +++ plugins/pager/pager-wnck-workspace-accessible.c| 256 ++ plugins/pager/pager-wnck-workspace-accessible.h| 64 +++ 8 files changed, 1122 insertions(+), 0 deletions(-) diff --git a/plugins/pager/pager-wnck-accessible-factory.c b/plugins/pager/pager-wnck-accessible-factory.c new file mode 100644 index 000..42cff8b --- /dev/null +++ b/plugins/pager/pager-wnck-accessible-factory.c @@ -0,0 +1,71 @@ +/* vim: set sw=2 et: */ +/* + * Copyright 2002 Sun Microsystems Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#include +#include "pager-accessible-factory.h" +#include "pager-accessible.h" + +G_DEFINE_TYPE (WnckPagerAccessibleFactory, + wnck_pager_accessible_factory, ATK_TYPE_OBJECT_FACTORY); + +static AtkObject* wnck_pager_accessible_factory_create_accessible (GObject *obj); + +static GType wnck_pager_accessible_factory_get_accessible_type (void); + +static void +wnck_pager_accessible_factory_class_init (WnckPagerAccessibleFactoryClass *klass) +{ + AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass); + + class->create_accessible = wnck_pager_accessible_factory_create_accessible; + class->get_accessible_type = wnck_pager_accessible_factory_get_accessible_type; +} + +static void +wnck_pager_accessible_factory_init (WnckPagerAccessibleFactory *factory) +{ +} + +AtkObjectFactory* +wnck_pager_accessible_factory_new (void) +{ + GObject *factory; + + factory = g_object_new (WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY, NULL); + + return ATK_OBJECT_FACTORY (factory); +} + +static AtkObject* +wnck_pager_accessible_factory_create_accessible (GObject *obj) +{ + GtkWidget *widget; + + g_return_val_if_fail (GTK_IS_WIDGET (obj), NULL); + + widget = GTK_WIDGET (obj); + return wnck_pager_accessible_new (widget); +} + +static GType +wnck_pager_accessible_factory_get_accessible_type (void) +{ + return WNCK_PAGER_TYPE_ACCESSIBLE; +} diff --git a/plugins/pager/pager-wnck-accessible-factory.h b/plugins/pager/pager-wnck-accessible-factory.h new file mode 100644 index 000..9dfef36 --- /dev/null +++ b/plugins/pager/pager-wnck-accessible-factory.h @@ -0,0 +1,59 @@ +/* vim: set sw=2 et: */ +/* + * Copyright 2002 Sun Microsystems Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __WNCK_PAGER_ACCESSIBLE_FACTORY_H__ +#define __WBCK_PAGER_ACCESSIBLE_FACTORY_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +#define WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY (wnck_pager_accessible_factory_get_type()) +#define WNCK_PAGER_ACCESSIBLE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY, WnckpagerAccessibleFactory)) +#define WNCK_PAGER_ACCESSIBLE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY, WnckPagerAccessibl
[Xfce4-commits] pager-wnck: renaming a11y-related symbols.
Updating branch refs/heads/andrzejr/deskbar-pager to 2fadf056ac10d0001e65ef0ce7222075b2c92d28 (commit) from e319360585143e4508cd3341f91f4293995e617d (commit) commit 2fadf056ac10d0001e65ef0ce7222075b2c92d28 Author: Andrzej Date: Thu Dec 22 22:40:58 2011 +0900 pager-wnck: renaming a11y-related symbols. No attempt of making the code compilable yet. plugins/pager/pager-wnck-accessible-factory.c | 32 ++-- plugins/pager/pager-wnck-accessible-factory.h | 30 ++-- plugins/pager/pager-wnck-accessible.c | 162 ++-- plugins/pager/pager-wnck-accessible.h | 34 ++-- .../pager-wnck-workspace-accessible-factory.c | 32 ++-- .../pager-wnck-workspace-accessible-factory.h | 30 ++-- plugins/pager/pager-wnck-workspace-accessible.c| 147 +- plugins/pager/pager-wnck-workspace-accessible.h| 34 ++-- plugins/pager/pager-wnck.c | 14 +- 9 files changed, 259 insertions(+), 256 deletions(-) diff --git a/plugins/pager/pager-wnck-accessible-factory.c b/plugins/pager/pager-wnck-accessible-factory.c index 42cff8b..6d91cba 100644 --- a/plugins/pager/pager-wnck-accessible-factory.c +++ b/plugins/pager/pager-wnck-accessible-factory.c @@ -19,53 +19,53 @@ */ #include -#include "pager-accessible-factory.h" -#include "pager-accessible.h" +#include "pager-wnck-accessible-factory.h" +#include "pager-wnck-accessible.h" -G_DEFINE_TYPE (WnckPagerAccessibleFactory, - wnck_pager_accessible_factory, ATK_TYPE_OBJECT_FACTORY); +G_DEFINE_TYPE (PagerWnckAccessibleFactory, + pager_wnck_accessible_factory, ATK_TYPE_OBJECT_FACTORY); -static AtkObject* wnck_pager_accessible_factory_create_accessible (GObject *obj); +static AtkObject* pager_wnck_accessible_factory_create_accessible (GObject *obj); -static GType wnck_pager_accessible_factory_get_accessible_type (void); +static GType pager_wnck_accessible_factory_get_accessible_type (void); static void -wnck_pager_accessible_factory_class_init (WnckPagerAccessibleFactoryClass *klass) +pager_wnck_accessible_factory_class_init (PagerWnckAccessibleFactoryClass *klass) { AtkObjectFactoryClass *class = ATK_OBJECT_FACTORY_CLASS (klass); - class->create_accessible = wnck_pager_accessible_factory_create_accessible; - class->get_accessible_type = wnck_pager_accessible_factory_get_accessible_type; + class->create_accessible = pager_wnck_accessible_factory_create_accessible; + class->get_accessible_type = pager_wnck_accessible_factory_get_accessible_type; } static void -wnck_pager_accessible_factory_init (WnckPagerAccessibleFactory *factory) +pager_wnck_accessible_factory_init (PagerWnckAccessibleFactory *factory) { } AtkObjectFactory* -wnck_pager_accessible_factory_new (void) +pager_wnck_accessible_factory_new (void) { GObject *factory; - factory = g_object_new (WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY, NULL); + factory = g_object_new (XFCE_TYPE_PAGER_WNCK_ACCESSIBLE_FACTORY, NULL); return ATK_OBJECT_FACTORY (factory); } static AtkObject* -wnck_pager_accessible_factory_create_accessible (GObject *obj) +pager_wnck_accessible_factory_create_accessible (GObject *obj) { GtkWidget *widget; g_return_val_if_fail (GTK_IS_WIDGET (obj), NULL); widget = GTK_WIDGET (obj); - return wnck_pager_accessible_new (widget); + return pager_wnck_accessible_new (widget); } static GType -wnck_pager_accessible_factory_get_accessible_type (void) +pager_wnck_accessible_factory_get_accessible_type (void) { - return WNCK_PAGER_TYPE_ACCESSIBLE; + return XFCE_TYPE_PAGER_WNCK_ACCESSIBLE; } diff --git a/plugins/pager/pager-wnck-accessible-factory.h b/plugins/pager/pager-wnck-accessible-factory.h index 9dfef36..e7cc38c 100644 --- a/plugins/pager/pager-wnck-accessible-factory.h +++ b/plugins/pager/pager-wnck-accessible-factory.h @@ -18,8 +18,8 @@ * Boston, MA 02111-1307, USA. */ -#ifndef __WNCK_PAGER_ACCESSIBLE_FACTORY_H__ -#define __WBCK_PAGER_ACCESSIBLE_FACTORY_H__ +#ifndef __PAGER_WNCK_ACCESSIBLE_FACTORY_H__ +#define __PAGER_WNCK_ACCESSIBLE_FACTORY_H__ #include @@ -27,33 +27,33 @@ extern "C" { #endif /* __cplusplus */ -#define WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY (wnck_pager_accessible_factory_get_type()) -#define WNCK_PAGER_ACCESSIBLE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY, WnckpagerAccessibleFactory)) -#define WNCK_PAGER_ACCESSIBLE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY, WnckPagerAccessibleFactoryClass)) -#define WNCK_IS_PAGER_ACCESSIBLE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY)) -#define WNCK_IS_PAGER_ACCESSIBLE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), WNCK_TYPE_PAGER_ACCESSIBLE_FACTORY)) -#define WNCK_PAGER_ACCESSIBLE_FACTORY_GET_CLASS(obj) (G_TY
[Xfce4-commits] pager-wnck: making the code with a11y addition compilable (a11y not tested but the pager works).
Updating branch refs/heads/andrzejr/deskbar-pager to d00ec1dfcca044797a2988a3ac4ba672723cfcce (commit) from 2fadf056ac10d0001e65ef0ce7222075b2c92d28 (commit) commit d00ec1dfcca044797a2988a3ac4ba672723cfcce Author: Andrzej Date: Thu Dec 22 22:47:45 2011 +0900 pager-wnck: making the code with a11y addition compilable (a11y not tested but the pager works). Some previously removed pager-wnck functions are brought back (they are used in the a11y code). Pager-wnck-workspace-accessible is tied fairly closely to wnck-workspace (from libwnck). Not sure if it will cause problems but it is one area we may have to test carefully. plugins/pager/Makefile.am |8 plugins/pager/pager-wnck-accessible.c |1 + plugins/pager/pager-wnck-accessible.h |2 - plugins/pager/pager-wnck-workspace-accessible.c |1 + plugins/pager/pager-wnck.c | 51 ++- plugins/pager/pager-wnck.h | 11 + 6 files changed, 70 insertions(+), 4 deletions(-) diff --git a/plugins/pager/Makefile.am b/plugins/pager/Makefile.am index 742935e..7103e03 100644 --- a/plugins/pager/Makefile.am +++ b/plugins/pager/Makefile.am @@ -19,6 +19,14 @@ libpager_la_SOURCES = \ pager.h \ pager-wnck.h \ pager-wnck.c \ + pager-wnck-accessible.h \ + pager-wnck-accessible.c \ + pager-wnck-accessible-factory.h \ + pager-wnck-accessible-factory.c \ + pager-wnck-workspace-accessible.h \ + pager-wnck-workspace-accessible.c \ + pager-wnck-workspace-accessible-factory.h \ + pager-wnck-workspace-accessible-factory.c \ pager-buttons.h \ pager-buttons.c diff --git a/plugins/pager/pager-wnck-accessible.c b/plugins/pager/pager-wnck-accessible.c index da8e8cd..6efd7bb 100644 --- a/plugins/pager/pager-wnck-accessible.c +++ b/plugins/pager/pager-wnck-accessible.c @@ -25,6 +25,7 @@ #include #include #include +#include "pager.h" #include "pager-wnck.h" #include "pager-wnck-accessible.h" #include "pager-wnck-accessible-factory.h" diff --git a/plugins/pager/pager-wnck-accessible.h b/plugins/pager/pager-wnck-accessible.h index 0aac5b9..b03ec18 100644 --- a/plugins/pager/pager-wnck-accessible.h +++ b/plugins/pager/pager-wnck-accessible.h @@ -23,8 +23,6 @@ #include #include -#include "pager-wnck.h" -//#include "screen.h" #ifdef __cplusplus extern "C" { diff --git a/plugins/pager/pager-wnck-workspace-accessible.c b/plugins/pager/pager-wnck-workspace-accessible.c index 5823657..1de091a 100644 --- a/plugins/pager/pager-wnck-workspace-accessible.c +++ b/plugins/pager/pager-wnck-workspace-accessible.c @@ -22,6 +22,7 @@ #include #include #include +#include "pager.h" #include "pager-wnck.h" #include "pager-wnck-workspace-accessible.h" diff --git a/plugins/pager/pager-wnck.c b/plugins/pager/pager-wnck.c index 1304a35..dbeadb6 100644 --- a/plugins/pager/pager-wnck.c +++ b/plugins/pager/pager-wnck.c @@ -648,8 +648,8 @@ pager_wnck_size_allocate (GtkWidget *widget, static void pager_wnck_get_workspace_rect (PagerWnck*pager, -int space, -GdkRectangle *rect) + int space, + GdkRectangle *rect) { int hsize, vsize; int n_spaces; @@ -2833,3 +2833,50 @@ pager_wnck_get_accessible (GtkWidget *widget) } return GTK_WIDGET_CLASS (pager_wnck_parent_class)->get_accessible (widget); } + +int +_pager_wnck_get_n_workspaces (PagerWnck *pager) +{ + return wnck_screen_get_workspace_count (pager->priv->screen); +} + +const char* +_pager_wnck_get_workspace_name (PagerWnck *pager, +inti) +{ + WnckWorkspace *space; + + space = wnck_screen_get_workspace (pager->priv->screen, i); + if (space) +return wnck_workspace_get_name (space); + else +return NULL; +} + +WnckWorkspace* +_pager_wnck_get_active_workspace (PagerWnck *pager) +{ + return wnck_screen_get_active_workspace (pager->priv->screen); +} + +WnckWorkspace* +_pager_wnck_get_workspace (PagerWnck *pager, + inti) +{ + return wnck_screen_get_workspace (pager->priv->screen, i); +} + +void +_pager_wnck_activate_workspace (WnckWorkspace *wspace, + guint32timestamp) +{ + wnck_workspace_activate (wspace, timestamp); +} + +void +_pager_wnck_get_workspace_rect (PagerWnck*pager, +int i, +GdkRectangle *rect) +{ + pager_wnck_get_workspace_rect (pager, i, rect); +} diff --git a/plugins/pager/pager-wnck.h b/plugins/pager/pager-wnck.h index 2f5401c..3b0f0b2 100644 --- a/plugins/pager/pager-wnck.h +++ b/plugins/pager/pager-wnck.h @@ -99,6 +99,17 @@ void pager_wnck_set_show_all (PagerWnck *pager, void pager_wnck_set_shadow_type (Page
[Xfce4-commits] Migrate: Fix typo in default xml.
Updating branch refs/heads/master to 9a0abbc30356afb0d3b749929909d21f19453cd6 (commit) from fa83856794c82204ab2d9a513e1ddcf08ba02415 (commit) commit 9a0abbc30356afb0d3b749929909d21f19453cd6 Author: Nick Schermer Date: Thu Dec 22 15:50:55 2011 +0100 Migrate: Fix typo in default xml. migrate/default.xml.in |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/migrate/default.xml.in b/migrate/default.xml.in index c9fdda7..a595e4c 100644 --- a/migrate/default.xml.in +++ b/migrate/default.xml.in @@ -1,7 +1,7 @@ - + ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] l10n: Updated Arabic (ar) translation to 100%
Updating branch refs/heads/master to ceae645b19af81e947f887d42d4690bccfae9ae3 (commit) from 9c2ceb662f0e747edb0f446b6420977f339e1e04 (commit) commit ceae645b19af81e947f887d42d4690bccfae9ae3 Author: كريم أولاد الشلحة Date: Thu Dec 22 22:07:51 2011 +0100 l10n: Updated Arabic (ar) translation to 100% New status: 32 messages complete with 0 fuzzies and 0 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/ar.po | 66 +++-- 1 files changed, 34 insertions(+), 32 deletions(-) diff --git a/po/ar.po b/po/ar.po index c7c5a1d..1144988 100644 --- a/po/ar.po +++ b/po/ar.po @@ -1,3 +1,4 @@ +# msgid "" msgstr "" "Project-Id-Version: xfce\n" @@ -9,146 +10,147 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +"Language: \n" "X-Poedit-Language: Arabic\n" #. vim: set ai et tabstop=4: #: ../panel-plugin/places.desktop.in.in.h:1 msgid "Access folders, documents, and removable media" -msgstr "" +msgstr "ولوج إلى المجلدات, وثائق, و وسائط قابلة للإزالة" #: ../panel-plugin/places.desktop.in.in.h:2 ../panel-plugin/cfg.c:64 #: ../panel-plugin/cfg.c:105 ../panel-plugin/cfg.c:205 #: ../panel-plugin/cfg.c:311 msgid "Places" -msgstr "" +msgstr "أماكن" #. Trash #: ../panel-plugin/model_system.c:110 msgid "Trash" -msgstr "" +msgstr "مهملات" #. Desktop #: ../panel-plugin/model_system.c:135 msgid "Desktop" -msgstr "" +msgstr "سطح المكتب" #. File System (/) #: ../panel-plugin/model_system.c:159 msgid "File System" -msgstr "" +msgstr "نظام الملفات" #: ../panel-plugin/model_volumes.c:64 #, c-format msgid "Failed to eject \"%s\"" -msgstr "" +msgstr "فشل إخراج \"%s\"" #: ../panel-plugin/model_volumes.c:85 #, c-format msgid "Failed to unmount \"%s\"" -msgstr "" +msgstr "فشل إلغاء ضم \"%s\"" #: ../panel-plugin/model_volumes.c:107 #, c-format msgid "Failed to mount \"%s\"" -msgstr "" +msgstr "فشل ضم \"%s\"" #: ../panel-plugin/model_volumes.c:226 msgid "Mount and Open" -msgstr "" +msgstr "ضم وفتح" #: ../panel-plugin/model_volumes.c:239 msgid "Mount" -msgstr "" +msgstr "ضم" #: ../panel-plugin/model_volumes.c:260 msgid "Eject" -msgstr "" +msgstr "إخراج" #: ../panel-plugin/model_volumes.c:272 msgid "Unmount" -msgstr "" +msgstr "إلغاء الضم" #: ../panel-plugin/view.c:678 msgid "Search for Files" -msgstr "" +msgstr "البحث عن الملفات" #: ../panel-plugin/view.c:731 ../panel-plugin/cfg.c:486 msgid "Recent Documents" -msgstr "" +msgstr "الوثائق الحديثة الإستعمال" #: ../panel-plugin/cfg.c:347 msgid "Button" -msgstr "" +msgstr "زر" #: ../panel-plugin/cfg.c:356 msgid "_Show" -msgstr "" +msgstr "_عرض" #: ../panel-plugin/cfg.c:362 msgid "Icon Only" -msgstr "" +msgstr "أيقونة فقط" #: ../panel-plugin/cfg.c:363 msgid "Label Only" -msgstr "" +msgstr "وسم فقط" #: ../panel-plugin/cfg.c:364 msgid "Icon and Label" -msgstr "" +msgstr "أيقونة و وسم" #: ../panel-plugin/cfg.c:386 msgid "_Label" -msgstr "" +msgstr "وسم" #: ../panel-plugin/cfg.c:404 msgid "Menu" -msgstr "" +msgstr "قائمة" #. MENU: Show Icons #: ../panel-plugin/cfg.c:408 msgid "Show _icons in menu" -msgstr "" +msgstr "إظهار الأيقونات على القائمة" #. MENU: Show Removable Media #: ../panel-plugin/cfg.c:420 msgid "Show _removable media" -msgstr "" +msgstr "_إظهار الوسائط القابلة للإزالة" #: ../panel-plugin/cfg.c:441 msgid "Mount and _Open on click" -msgstr "" +msgstr "ضم وال_فتح عنذ النقر" #. MENU: Show GTK Bookmarks #: ../panel-plugin/cfg.c:455 msgid "Show GTK _bookmarks" -msgstr "" +msgstr "عرض علامات _جتك" #. MENU: Show Recent Documents #: ../panel-plugin/cfg.c:468 msgid "Show recent _documents" -msgstr "" +msgstr "عرض الوثائق الح_ديثة الإستعمال" #. RECENT DOCUMENTS: Show clear option #: ../panel-plugin/cfg.c:490 msgid "Show cl_ear option" -msgstr "" +msgstr "عرض خيا_رات المحو" #: ../panel-plugin/cfg.c:505 msgid "_Number to display" -msgstr "" +msgstr "عدد لإظهار_ه" #: ../panel-plugin/cfg.c:525 msgid "Search" -msgstr "" +msgstr "بحث" #: ../panel-plugin/cfg.c:533 msgid "Co_mmand" -msgstr "" +msgstr "_أمر" #: ../panel-plugin/support.c:148 msgid "Open" -msgstr "" +msgstr "فتح" #: ../panel-plugin/support.c:163 msgid "Open Terminal Here" -msgstr "" +msgstr "فتح الطرفية هنا" ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] l10n: Updated Arabic (ar) translation to 94%
Updating branch refs/heads/master to 906d1aeeac26087021789a09727c25a03f2806cb (commit) from 56ba03e0e7d54be34902ca91aac8d595d102db8d (commit) commit 906d1aeeac26087021789a09727c25a03f2806cb Author: كريم أولاد الشلحة Date: Thu Dec 22 22:20:18 2011 +0100 l10n: Updated Arabic (ar) translation to 94% New status: 33 messages complete with 0 fuzzies and 2 untranslated. Transmitted-via: Transifex (translations.xfce.org). po/ar.po | 74 +++--- 1 files changed, 37 insertions(+), 37 deletions(-) diff --git a/po/ar.po b/po/ar.po index 17c23fd..618ba07 100644 --- a/po/ar.po +++ b/po/ar.po @@ -2,104 +2,104 @@ # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. -# +# #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-11-02 17:02+\n" +"POT-Creation-Date: 2011-12-22 17:15+\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -"Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +"Language: \n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" #: ../panel-plugin/cpu.c:303 #, c-format msgid "Usage: %u%%" -msgstr "" +msgstr "إستعمال: %u%%" #: ../panel-plugin/properties.c:78 msgid "CPU Graph Properties" -msgstr "" +msgstr "رسم بياني لخصائص وحدة المعالجة" #: ../panel-plugin/properties.c:96 msgid "Use non-linear time-scale" -msgstr "" +msgstr "إستعمال non-linear time-scale" #: ../panel-plugin/properties.c:97 msgid "Show frame" -msgstr "" +msgstr "عرض الإطار" #: ../panel-plugin/properties.c:98 msgid "Show border" -msgstr "" +msgstr "عرض الحدود" #: ../panel-plugin/properties.c:99 msgid "Show current usage bar" msgid_plural "Show current usage bars" -msgstr[0] "" -msgstr[1] "" +msgstr[0] "عرض شريط الإستعمال الحالي" +msgstr[1] "عرض أشرطة الإستعمالات الحالية" #: ../panel-plugin/properties.c:101 msgid "Run in terminal" -msgstr "" +msgstr "شغل في الطرفية" #: ../panel-plugin/properties.c:102 msgid "Use startup notification" -msgstr "" +msgstr "إستعمال إشعارات بدء التشغيل" #: ../panel-plugin/properties.c:105 msgid "Color 1:" -msgstr "" +msgstr "لون 1:" #: ../panel-plugin/properties.c:106 msgid "Color 2:" -msgstr "" +msgstr "لون 2:" #: ../panel-plugin/properties.c:107 msgid "Color 3:" -msgstr "" +msgstr "لون 3:" #: ../panel-plugin/properties.c:108 msgid "Background:" -msgstr "" +msgstr "خلفية:" #: ../panel-plugin/properties.c:115 msgid "Appearance" -msgstr "" +msgstr "مظهر" #: ../panel-plugin/properties.c:117 msgid "Advanced" -msgstr "" +msgstr "مخصص" #: ../panel-plugin/properties.c:193 msgid "Fastest (~250ms)" -msgstr "" +msgstr "أسرع (~250ms)" #: ../panel-plugin/properties.c:194 msgid "Fast (~500ms)" -msgstr "" +msgstr "سريع (~500ms)" #: ../panel-plugin/properties.c:195 msgid "Normal (~750ms)" -msgstr "" +msgstr "عادي (~750ms)" #: ../panel-plugin/properties.c:196 msgid "Slow (~1s)" -msgstr "" +msgstr "بطيء (~1s)" #: ../panel-plugin/properties.c:200 msgid "Update Interval:" -msgstr "" +msgstr "مجال التحديث:" #: ../panel-plugin/properties.c:208 msgid "All" -msgstr "" +msgstr "الكل" #: ../panel-plugin/properties.c:214 msgid "Tracked Core:" @@ -107,11 +107,11 @@ msgstr "" #: ../panel-plugin/properties.c:225 msgid "Width:" -msgstr "" +msgstr "العرض:" #: ../panel-plugin/properties.c:227 msgid "Height:" -msgstr "" +msgstr "الطول:" #: ../panel-plugin/properties.c:241 msgid "Associated command:" @@ -119,44 +119,44 @@ msgstr "" #: ../panel-plugin/properties.c:265 msgid "Normal" -msgstr "" +msgstr "عادي" #: ../panel-plugin/properties.c:266 msgid "LED" -msgstr "" +msgstr "صمام" #: ../panel-plugin/properties.c:267 msgid "No history" -msgstr "" +msgstr "بدون تاريخ" #: ../panel-plugin/properties.c:268 msgid "Grid" -msgstr "" +msgstr "شبكة" #: ../panel-plugin/properties.c:272 msgid "Mode:" -msgstr "" +msgstr "نمط:" #: ../panel-plugin/properties.c:277 msgid "Solid" -msgstr "" +msgstr "صلب" #: ../panel-plugin/properties.c:278 msgid "Gradient" -msgstr "" +msgstr "متدرج" #: ../panel-plugin/properties.c:279 msgid "Fire" -msgstr "" +msgstr "نار" #: ../panel-plugin/properties.c:283 msgid "Color mode: " -msgstr "" +msgstr "نمط اللون:" #: ../panel-plugin/cpugraph.desktop.in.in.h:1 msgid "CPU Graph" -msgstr "" +msgstr "رسم بياني لوحدة المعالجة" #: ../panel-plugin/cpugraph.desktop.in.in.h:2 msgid "Graphical representation of the CPU load" -msgstr "" +msgstr "رسم بياني لحمل وحدة المعالجة" ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Balance the btree
Updating branch refs/heads/master to f3472d91253a3016d68e2941b128a0d96f52ae00 (commit) from d3cc31e6fb872e00eaad4291746c551435eea1c2 (commit) commit f3472d91253a3016d68e2941b128a0d96f52ae00 Author: Peter de Ridder Date: Tue Oct 4 21:42:13 2011 +0200 Balance the btree btree delete isn't supported libsqueeze/archive-iter.c |2 +- libsqueeze/archive.c |4 - libsqueeze/btree.c| 153 - libsqueeze/btree.h|1 + 4 files changed, 153 insertions(+), 7 deletions(-) diff --git a/libsqueeze/archive-iter.c b/libsqueeze/archive-iter.c index 8762777..e713cb3 100644 --- a/libsqueeze/archive-iter.c +++ b/libsqueeze/archive-iter.c @@ -29,7 +29,7 @@ #include "internals.h" #ifndef LSQ_ENTRY_CHILD_BUFFER_SIZE -#define LSQ_ENTRY_CHILD_BUFFER_SIZE 500 +#define LSQ_ENTRY_CHILD_BUFFER_SIZE 8000 #endif #ifdef LSQ_ENTRY_CHILD_BUFFER_DYNAMIC_SIZE diff --git a/libsqueeze/archive.c b/libsqueeze/archive.c index 262391b..fdac9f4 100644 --- a/libsqueeze/archive.c +++ b/libsqueeze/archive.c @@ -37,10 +37,6 @@ #include "internals.h" -#ifndef LSQ_ENTRY_CHILD_BUFFER_SIZE -#define LSQ_ENTRY_CHILD_BUFFER_SIZE 500 -#endif - static void lsq_archive_class_init(LSQArchiveClass *archive_class); diff --git a/libsqueeze/btree.c b/libsqueeze/btree.c index 869bd80..ca3c49f 100644 --- a/libsqueeze/btree.c +++ b/libsqueeze/btree.c @@ -27,7 +27,7 @@ #include "btree.h" #ifndef LSQ_BTREE_MAX_DEPTH -#define LSQ_BTREE_MAX_DEPTH 500 +#define LSQ_BTREE_MAX_DEPTH 20 #endif LSQBTree * @@ -42,13 +42,19 @@ lsq_btree_insert_sorted_single ( LSQBTree *new_entry = NULL; LSQBTree *stack[LSQ_BTREE_MAX_DEPTH]; guint stack_i = 0; +LSQArchiveEntry *swap_entry; +LSQBTree *swap_iter; +gint swap_balance; +gboolean short_side; +/* Check for a flat list */ if ( NULL != list && NULL != list->next ) { g_critical("Cannot insert into a flattened tree"); return NULL; } +/* Walk the btree */ for ( iter = list; NULL != iter; iter = *next ) { /* archive can be NULL */ @@ -56,32 +62,175 @@ lsq_btree_insert_sorted_single ( if ( 0 > cmp ) { +/* Go the the left */ next = &iter->left; } else if ( 0 < cmp ) { +/* Go to the right */ next = &iter->right; } else { +/* Logic outside this routine dictates we should never find a match */ g_critical("THIS SHOULD NOT HAPPEN!!! (the universe has just collapsed)"); return NULL; } +/* Keep a stack of the path we followed */ +g_return_val_if_fail(stack_i < LSQ_BTREE_MAX_DEPTH, NULL); stack[stack_i++] = iter; - g_return_val_if_fail(stack_i < LSQ_BTREE_MAX_DEPTH, NULL); } +/* Create a new tree element */ new_entry = g_new0(LSQBTree, 1); new_entry->entry = entry; +/* Check it this is a new tree */ if ( NULL == next ) { return new_entry; } +/* Store ourself in the parent */ *next = new_entry; +/* Balance the tree */ +while ( 0 < stack_i ) +{ +iter = stack[--stack_i]; + +/* Calculate new the balance for the parent */ +if ( iter->left == new_entry ) +{ +short_side = iter->balance > 0; +--iter->balance; +} +else +{ +short_side = iter->balance < 0; +++iter->balance; +} + +/* The balance in the higher parents doesn't change when the short side changed */ +if ( FALSE != short_side ) +{ +break; +} + +if ( 1 < iter->balance ) +{ +/* Rotate left */ +/* The code could be easier if we would just overwrite our parent left or right value. + * But instead we move that data from our right to our self and use the right tree link to be placed in the tree as if it was ourself. + */ +/* Letters are tree nodes, numbers are the data. This illustrates a rotate right. + * + *A:4 | A:2 + * / \|/ \ + * B:2 C:5 | D:1 B:4 + */ \ | / \ + * D:1 E:3 | E:3 C:5 + */ +/* Swap the data */ +swap_iter = iter->right; +swap_entry = iter->entry; +iter->entry = swap_iter->entry; +swap_iter->entry = swap_entry; + +/* Reformat the tree links */ +iter->right = swap_iter->right; +swap_iter->right = swap_iter->left; +swap_iter->left = iter->left; +iter->left = swap_iter; + +/* Fix the balance values + * + * if B > 0 + * A = A - 1 - B +
[Xfce4-commits] Replaced archive iter buffer slist with a btree
Updating branch refs/heads/master to d3cc31e6fb872e00eaad4291746c551435eea1c2 (commit) from aab3b4e8d7e06ca64357cb927df63ab25d7a8bc6 (commit) commit d3cc31e6fb872e00eaad4291746c551435eea1c2 Author: Peter de Ridder Date: Sun Oct 2 12:09:39 2011 +0200 Replaced archive iter buffer slist with a btree The btree isn't balanced and delete isn't supported libsqueeze/Makefile.am |2 +- libsqueeze/archive-iter.c | 188 +- libsqueeze/archive.c|2 +- libsqueeze/btree.c | 191 +++ libsqueeze/{slist.h => btree.h} | 42 - libsqueeze/slist.c | 109 -- 6 files changed, 295 insertions(+), 239 deletions(-) diff --git a/libsqueeze/Makefile.am b/libsqueeze/Makefile.am index 51cc350..b7beadb 100644 --- a/libsqueeze/Makefile.am +++ b/libsqueeze/Makefile.am @@ -5,6 +5,7 @@ libsqueeze_2_la_SOURCES = \ archive-iter-pool.c archive-iter-pool.h \ archive-iter.c archive-iter.h \ archive-tempfs.c archive-tempfs.h \ + btree.c btree.h \ command-queue.c command-queue.h \ command-option.c command-option.h \ internals.c internals.h \ @@ -13,7 +14,6 @@ libsqueeze_2_la_SOURCES = \ parser-context.c parser-context.h \ parser.c parser.h \ scanf-parser.c scanf-parser.h \ - slist.c slist.h \ support-reader.c support-reader.h \ support-template.c support-template.h \ support-factory.c support-factory.h diff --git a/libsqueeze/archive-iter.c b/libsqueeze/archive-iter.c index 6288535..8762777 100644 --- a/libsqueeze/archive-iter.c +++ b/libsqueeze/archive-iter.c @@ -13,7 +13,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include #include #include @@ -25,7 +24,7 @@ #include "libsqueeze.h" #include "libsqueeze-view.h" #include "support-factory.h" -#include "slist.h" +#include "btree.h" #include "internals.h" @@ -39,10 +38,6 @@ guint buffer_flush_size = LSQ_ENTRY_CHILD_BUFFER_SIZE; #define LSQ_ENTRY_CHILD_BUFFER_SIZE buffer_flush_size #endif -#ifndef LSQ_ENTRY_BUFFER_INTERVALSIZE -#define LSQ_ENTRY_BUFFER_INTERVALSIZE 20 -#endif - #ifndef LSQ_MIME_DIRECTORY #define LSQ_MIME_DIRECTORY "inode/directory" #endif @@ -69,8 +64,6 @@ inline static LSQArchiveEntry* lsq_archive_entry_nth_child(const LSQArchiveEntry *, guint); inline static void lsq_archive_entry_flush_buffer(LSQArchiveEntry *); -inline static void -lsq_archive_entry_build_buffer_index(LSQArchiveEntry *); static LSQArchiveEntry * lsq_archive_entry_get_child(const LSQArchiveEntry *, const gchar *); static LSQArchiveEntry * @@ -102,8 +95,8 @@ struct _LSQArchiveEntry gchar *content_type; gpointer props; LSQArchiveEntry **children; - LSQSList *buffer; - LSQSIndexList *buffer_index; + LSQBTree *buffer; +guint buffer_length; }; @@ -989,7 +982,10 @@ static void lsq_archive_entry_save_free(const LSQArchive *archive, LSQArchiveEntry *entry) { guint i = 0; - LSQSList *buffer_iter = entry->buffer; + LSQBTree *buffer_iter; + + entry->buffer = lsq_btree_flatten(entry->buffer); + buffer_iter = entry->buffer; /* free the buffer */ for ( ; NULL != buffer_iter ; buffer_iter = buffer_iter->next ) @@ -999,8 +995,9 @@ lsq_archive_entry_save_free(const LSQArchive *archive, LSQArchiveEntry *entry) else lsq_archive_entry_save_free(archive, buffer_iter->entry); } - lsq_slist_free(entry->buffer); + lsq_btree_free(entry->buffer); entry->buffer = NULL; +entry->buffer_length = 0; /* free the sorted list */ if ( NULL != entry->children ) @@ -1026,15 +1023,19 @@ static void lsq_archive_entry_free(const LSQArchive *archive, LSQArchiveEntry *entry) { guint i = 0; - LSQSList *buffer_iter = entry->buffer; + LSQBTree *buffer_iter; + + entry->buffer = lsq_btree_flatten(entry->buffer); + buffer_iter = entry->buffer; /* free the buffer */ for ( ; NULL != buffer_iter; buffer_iter = buffer_iter->next ) { lsq_archive_entry_free(archive, buffer_iter->entry); } - lsq_slist_free(entry->buffer); + lsq_btree_free(entry->buffer); entry->buffer = NULL; +entry->buffer_length = 0; /* free the sorted list */ if ( NULL != entry->children ) @@ -1078,7 +1079,7 @@ inline static guint lsq_archive_entry_n_children(const LSQArchiveEntry *entry) { /* the first element of the array (*entry->children) contains the size of the array */ - return ((entry->children?GPOINTER_TO_UINT(*entry->children):0) + lsq_slist_length(entry->buffer)); + return ((entry->children?GPO
[Xfce4-commits] Start supporting delete from the btree
Updating branch refs/heads/master to 1f04b35581219671f11601e0b057f0b26a636769 (commit) from f3472d91253a3016d68e2941b128a0d96f52ae00 (commit) commit 1f04b35581219671f11601e0b057f0b26a636769 Author: Peter de Ridder Date: Sun Oct 9 16:47:12 2011 +0200 Start supporting delete from the btree libsqueeze/archive-iter.c | 57 +++--- libsqueeze/btree.c| 184 + libsqueeze/btree.h|7 ++ 3 files changed, 202 insertions(+), 46 deletions(-) diff --git a/libsqueeze/archive-iter.c b/libsqueeze/archive-iter.c index e713cb3..0c3b5f4 100644 --- a/libsqueeze/archive-iter.c +++ b/libsqueeze/archive-iter.c @@ -1246,7 +1246,7 @@ lsq_archive_entry_get_child(const LSQArchiveEntry *entry, const gchar *filename) } static gint -lsq_archive_entry_filename_compare(LSQArchiveEntry *a, LSQArchiveEntry *b) +lsq_archive_entry_compare(LSQArchiveEntry *a, LSQArchiveEntry *b) { return strcmp(a->filename, b->filename); } @@ -1267,7 +1267,7 @@ lsq_archive_entry_add_child(LSQArchiveEntry *parent, const gchar *filename) } //g_debug("i: %s", filename); - parent->buffer = lsq_btree_insert_sorted_single(parent->buffer, child, (GCompareFunc)lsq_archive_entry_filename_compare); + parent->buffer = lsq_btree_insert_sorted_single(parent->buffer, child, (GCompareFunc)lsq_archive_entry_compare); /* Cache the length so we doen't have to check every time */ parent->buffer_length++; @@ -1280,11 +1280,15 @@ lsq_archive_entry_add_child(LSQArchiveEntry *parent, const gchar *filename) return child; } +static gint +lsq_archive_entry_filename_compare(const gchar *a_filename, LSQArchiveEntry *b) +{ + return strcmp(a_filename, b->filename); +} + static gboolean lsq_archive_entry_remove_child(LSQArchiveEntry *entry, const gchar *filename) { - LSQBTree *buffer_iter = NULL, **prev_iter = NULL; - /* the first element of the array (*entry->children) contains the size of the array */ guint total_size, size = total_size = entry->children?GPOINTER_TO_UINT(*entry->children):0; guint pos = 0; @@ -1292,6 +1296,7 @@ lsq_archive_entry_remove_child(LSQArchiveEntry *entry, const gchar *filename) gint cmp = 0; const gchar *_pos = strchr(filename, '/'); gchar *_filename; + LSQArchiveEntry *found = NULL; if ( 0 != _pos ) { @@ -1333,50 +1338,10 @@ lsq_archive_entry_remove_child(LSQArchiveEntry *entry, const gchar *filename) } /* search the buffer */ -prev_iter = &entry->buffer; -if ( NULL == entry->buffer || NULL != entry->buffer->next ) -{ -for(buffer_iter = entry->buffer; buffer_iter; buffer_iter = buffer_iter->next) -{ -cmp = strcmp(_filename, buffer_iter->entry->filename); - -if ( 0 == cmp ) -{ -g_free(_filename); -*prev_iter = buffer_iter->next; -g_free(buffer_iter); -return TRUE; -} -if(cmp < 0) -break; -prev_iter = &buffer_iter->next; -} -} -else -{ -for ( buffer_iter = entry->buffer; NULL != buffer_iter; buffer_iter = *prev_iter ) -{ -/* archive can be NULL */ -cmp = strcmp(filename, buffer_iter->entry->filename); - -if ( cmp < 0 ) -{ -prev_iter = &buffer_iter->left; -} -else if ( cmp > 0 ) -{ -prev_iter = &buffer_iter->right; -} -else -{ -g_critical("todo"); -return TRUE; -} -} -} + entry->buffer = lsq_btree_remove_sorted_single(entry->buffer, _filename, (GCompareFunc)lsq_archive_entry_filename_compare, &found); g_free(_filename); - return FALSE; + return NULL != found; } inline static const gchar* diff --git a/libsqueeze/btree.c b/libsqueeze/btree.c index ca3c49f..69ab4aa 100644 --- a/libsqueeze/btree.c +++ b/libsqueeze/btree.c @@ -234,6 +234,190 @@ lsq_btree_insert_sorted_single ( return list; } +LSQBTree * +lsq_btree_remove_sorted_single ( +LSQBTree *list, +gchar *filename, +GCompareFunc cmp_func, +LSQArchiveEntry **found ) +{ +gint cmp; +LSQBTree *iter; +LSQBTree **next = &list; +LSQBTree *del_entry; +LSQBTree *stack[LSQ_BTREE_MAX_DEPTH]; +guint stack_i = 0; +LSQBTree *swap_iter; +gboolean short_side; + +if ( NULL != found ) +{ +*found = NULL; +} + +/* The tree is flattened */ +if ( NULL == list || NULL != list->next ) +{ +for ( iter = list; NULL != iter; iter = iter->next)
[Xfce4-commits] Parse dates and times to LSQ_TYPE_DATETIME
Updating branch refs/heads/master to 15c767a3557acf54ae9dd5bba7e08879aa4f5fd4 (commit) from bc7be8990bb2b53079703a8f6b3b70a15e8c7f5f (commit) commit 15c767a3557acf54ae9dd5bba7e08879aa4f5fd4 Author: Peter de Ridder Date: Sat Oct 8 00:44:02 2011 +0200 Parse dates and times to LSQ_TYPE_DATETIME libsqueeze/Makefile.am |1 + libsqueeze/archive-iter.c | 106 -- libsqueeze/archive-iter.h |2 +- libsqueeze/datetime.c | 344 +++ libsqueeze/datetime.h | 76 ++ libsqueeze/libsqueeze.c |2 + libsqueeze/libsqueeze.h |1 + libsqueeze/parser.c | 10 ++ libsqueeze/parser.h |7 + libsqueeze/pcre-parser.c| 39 - libsqueeze/scanf-parser.c | 254 libsqueeze/support-reader.c |6 + src/archive_store.c | 19 +++- src/notebook.c | 13 +- 14 files changed, 824 insertions(+), 56 deletions(-) diff --git a/libsqueeze/Makefile.am b/libsqueeze/Makefile.am index 51cc350..57432ff 100644 --- a/libsqueeze/Makefile.am +++ b/libsqueeze/Makefile.am @@ -7,6 +7,7 @@ libsqueeze_2_la_SOURCES = \ archive-tempfs.c archive-tempfs.h \ command-queue.c command-queue.h \ command-option.c command-option.h \ + datetime.c datetime.h \ internals.c internals.h \ libsqueeze.c libsqueeze.h \ libsqueeze-view.h \ diff --git a/libsqueeze/archive-iter.c b/libsqueeze/archive-iter.c index 6288535..5b8887b 100644 --- a/libsqueeze/archive-iter.c +++ b/libsqueeze/archive-iter.c @@ -84,14 +84,18 @@ inline static guint lsq_archive_entry_get_prop_uint(const LSQArchive *, const LSQArchiveEntry *, guint); inline static guint64 lsq_archive_entry_get_prop_uint64(const LSQArchive *, const LSQArchiveEntry *, guint); +inline static const LSQDateTime * +lsq_archive_entry_get_prop_datetime(const LSQArchive *, const LSQArchiveEntry *, guint); static void -lsq_archive_entry_set_prop_str(const LSQArchive *, LSQArchiveEntry *, guint, const gchar *); +lsq_archive_entry_set_prop_str(const LSQArchive *, LSQArchiveEntry *, guint, gchar *); static void lsq_archive_entry_set_prop_uint(const LSQArchive *, LSQArchiveEntry *, guint, guint); static void lsq_archive_entry_set_prop_uint64(const LSQArchive *, LSQArchiveEntry *, guint, guint64); static void +lsq_archive_entry_set_prop_datetime(const LSQArchive *, LSQArchiveEntry *, guint, LSQDateTime *); +static void lsq_archive_entry_set_propsv(const LSQArchive *, LSQArchiveEntry *, gpointer *); static void lsq_archive_entry_set_propsva(const LSQArchive *, LSQArchiveEntry *, va_list); @@ -667,6 +671,11 @@ lsq_archive_iter_get_prop_value(const LSQArchiveIter *iter, guint n, GValue *val g_value_set_uint64(value, lsq_archive_entry_get_prop_uint64(iter->archive, iter->entry, n)); break; default: + if ( LSQ_TYPE_DATETIME == G_VALUE_TYPE(value) ) + { +g_value_set_datetime(value, lsq_archive_entry_get_prop_datetime(iter->archive, iter->entry, n)); +break; + } return FALSE; } @@ -686,7 +695,7 @@ lsq_archive_iter_set_prop_value(LSQArchiveIter *iter, guint n, const GValue *val switch(G_VALUE_TYPE(value)) { case G_TYPE_STRING: - lsq_archive_entry_set_prop_str(iter->archive, iter->entry, n, g_value_get_string(value)); + lsq_archive_entry_set_prop_str(iter->archive, iter->entry, n, g_value_dup_string(value)); break; case G_TYPE_UINT: lsq_archive_entry_set_prop_uint(iter->archive, iter->entry, n, g_value_get_uint(value)); @@ -694,11 +703,18 @@ lsq_archive_iter_set_prop_value(LSQArchiveIter *iter, guint n, const GValue *val case G_TYPE_UINT64: lsq_archive_entry_set_prop_uint64(iter->archive, iter->entry, n, g_value_get_uint64(value)); break; + default: + if ( LSQ_TYPE_DATETIME == G_VALUE_TYPE(value) ) + { +lsq_archive_entry_set_prop_datetime(iter->archive, iter->entry, n, g_value_dup_datetime(value)); +break; +} +break; } } void -lsq_archive_iter_set_prop(LSQArchiveIter *iter, guint n, gconstpointer value) +lsq_archive_iter_set_prop(LSQArchiveIter *iter, guint n, gpointer value) { #ifdef DEBUG g_return_if_fail(iter); @@ -712,11 +728,18 @@ lsq_archive_iter_set_prop(LSQArchiveIter *iter, guint n, gconstpointer value) lsq_archive_entry_set_prop_str(iter->archive, iter->entry, n, value); break;
[Xfce4-commits] Optionally balance btree after remove
Updating branch refs/heads/master to 2f2c6178e58c4e3eb4e9a0bbaf39239fdd266fd8 (commit) from 1f04b35581219671f11601e0b057f0b26a636769 (commit) commit 2f2c6178e58c4e3eb4e9a0bbaf39239fdd266fd8 Author: Peter de Ridder Date: Sun Oct 9 20:21:03 2011 +0200 Optionally balance btree after remove libsqueeze/btree.c | 122 +++- 1 files changed, 121 insertions(+), 1 deletions(-) diff --git a/libsqueeze/btree.c b/libsqueeze/btree.c index 69ab4aa..f81d098 100644 --- a/libsqueeze/btree.c +++ b/libsqueeze/btree.c @@ -13,6 +13,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + #include #include #include @@ -247,8 +248,12 @@ lsq_btree_remove_sorted_single ( LSQBTree *del_entry; LSQBTree *stack[LSQ_BTREE_MAX_DEPTH]; guint stack_i = 0; -LSQBTree *swap_iter; gboolean short_side; +LSQBTree *swap_iter; +#ifdef BALANCE_ON_REMOVE +LSQArchiveEntry *swap_entry; +gint swap_balance; +#endif if ( NULL != found ) { @@ -407,7 +412,122 @@ lsq_btree_remove_sorted_single ( /* The balance in the higher parents doesn't change when the short side changed */ if ( FALSE != short_side ) { +#ifdef BALANCE_ON_REMOVE +if ( 1 < iter->balance ) +{ +/* Rotate left */ +/* The code could be easier if we would just overwrite our parent left or right value. + * But instead we move that data from our right to our self and use the right tree link to be placed in the tree as if it was ourself. + */ +/* Letters are tree nodes, numbers are the data. This illustrates a rotate right. + * + *A:4 | A:2 + * / \|/ \ + * B:2 C:5 | D:1 B:4 + */ \ | / \ + * D:1 E:3 | E:3 C:5 + */ +/* Swap the data */ +swap_iter = iter->right; +swap_entry = iter->entry; +iter->entry = swap_iter->entry; +swap_iter->entry = swap_entry; + +/* Reformat the tree links */ +iter->right = swap_iter->right; +swap_iter->right = swap_iter->left; +swap_iter->left = iter->left; +iter->left = swap_iter; + +/* Fix the balance values + * + * if B > 0 + * A = A - 1 - B + * else + * A = A - 1 + * + * diff = A - 1 - B + * if diff < 0 + * B = B - 1 + diff + * else + * B = B - 1 + */ +swap_balance = swap_iter->balance; +swap_iter->balance = iter->balance - 1; +if ( 0 < swap_balance ) +{ +swap_iter->balance -= swap_balance; +} +iter->balance = iter->balance - 1 - swap_balance; +if ( 0 < iter->balance ) +{ +iter->balance = 0; +} +iter->balance += swap_balance - 1; + +/* Saved depth by rotation so our parents depth also changes */ +if ( 0 >= swap_balance ) +{ +break; +} +} +else if ( -1 > iter->balance ) +{ +/* Rotate right */ +/* The code could be easier if we would just overwrite our parent left or right value. + * But instead we move that data from our left to our self and use the left tree link to be placed in the tree as if it was ourself. + */ +/* Swap the data */ +swap_iter = iter->left; +swap_entry = iter->entry; +iter->entry = swap_iter->entry; +swap_iter->entry = swap_entry; + +/* Reformat the tree links */ +iter->left = swap_iter->left; +swap_iter->left = swap_iter->right; +swap_iter->right = iter->right; +iter->right = swap_iter; + +/* Fix the balance values + * + * if B < 0 + * A = A + 1 - B + * else + * A = A + 1 +
[Xfce4-commits] Changed LSQDateTime from struct tm to manual packed 64 bit
Updating branch refs/heads/master to f1786b6561e7d7b3293c5675b385fe467ce6cf6b (commit) from 15c767a3557acf54ae9dd5bba7e08879aa4f5fd4 (commit) commit f1786b6561e7d7b3293c5675b385fe467ce6cf6b Author: Peter de Ridder Date: Sun Oct 9 19:51:58 2011 +0200 Changed LSQDateTime from struct tm to manual packed 64 bit libsqueeze/archive-iter.c | 37 ++ libsqueeze/datetime.c | 282 +--- libsqueeze/datetime.h | 41 +++ libsqueeze/pcre-parser.c | 13 +- libsqueeze/scanf-parser.c | 17 ++-- src/archive_store.c | 10 -- 6 files changed, 150 insertions(+), 250 deletions(-) diff --git a/libsqueeze/archive-iter.c b/libsqueeze/archive-iter.c index 5b8887b..cac717a 100644 --- a/libsqueeze/archive-iter.c +++ b/libsqueeze/archive-iter.c @@ -84,7 +84,7 @@ inline static guint lsq_archive_entry_get_prop_uint(const LSQArchive *, const LSQArchiveEntry *, guint); inline static guint64 lsq_archive_entry_get_prop_uint64(const LSQArchive *, const LSQArchiveEntry *, guint); -inline static const LSQDateTime * +inline static LSQDateTime lsq_archive_entry_get_prop_datetime(const LSQArchive *, const LSQArchiveEntry *, guint); static void @@ -94,7 +94,7 @@ lsq_archive_entry_set_prop_uint(const LSQArchive *, LSQArchiveEntry *, guint, gu static void lsq_archive_entry_set_prop_uint64(const LSQArchive *, LSQArchiveEntry *, guint, guint64); static void -lsq_archive_entry_set_prop_datetime(const LSQArchive *, LSQArchiveEntry *, guint, LSQDateTime *); +lsq_archive_entry_set_prop_datetime(const LSQArchive *, LSQArchiveEntry *, guint, LSQDateTime); static void lsq_archive_entry_set_propsv(const LSQArchive *, LSQArchiveEntry *, gpointer *); static void @@ -706,7 +706,7 @@ lsq_archive_iter_set_prop_value(LSQArchiveIter *iter, guint n, const GValue *val default: if ( LSQ_TYPE_DATETIME == G_VALUE_TYPE(value) ) { -lsq_archive_entry_set_prop_datetime(iter->archive, iter->entry, n, g_value_dup_datetime(value)); +lsq_archive_entry_set_prop_datetime(iter->archive, iter->entry, n, g_value_get_datetime(value)); break; } break; @@ -736,7 +736,7 @@ lsq_archive_iter_set_prop(LSQArchiveIter *iter, guint n, gpointer value) default: if ( LSQ_TYPE_DATETIME == lsq_archive_get_entry_property_type(iter->archive, n) ) { -lsq_archive_entry_set_prop_datetime(iter->archive, iter->entry, n, value); +lsq_archive_entry_set_prop_datetime(iter->archive, iter->entry, n, *(LSQDateTime*)value); break; } break; @@ -1001,16 +1001,6 @@ lsq_archive_entry_props_free(const LSQArchive *archive, LSQArchiveEntry *entry) g_free(((gchar **)props_iter)[offset]); ((gchar **)props_iter)[offset] = NULL; break; - -default: -if ( LSQ_TYPE_DATETIME == lsq_archive_get_entry_property_type(archive, i+LSQ_ARCHIVE_PROP_USER) ) -{ -offset = lsq_archive_get_entry_property_offset(archive, i+LSQ_ARCHIVE_PROP_USER); -g_free(((LSQDateTime **)props_iter)[offset]); -((LSQDateTime **)props_iter)[offset] = NULL; -break; -} - break; } } g_free(entry->props); @@ -1501,24 +1491,24 @@ lsq_archive_entry_get_prop_uint64(const LSQArchive *archive, const LSQArchiveEnt return (((guint64 *)props_iter)[offset]); } -inline static const LSQDateTime * +inline static LSQDateTime lsq_archive_entry_get_prop_datetime(const LSQArchive *archive, const LSQArchiveEntry *entry, guint i) { gpointer props_iter = entry->props; guint offset; if ( NULL == props_iter ) { - return NULL; + return 0; } if ( LSQ_TYPE_DATETIME != lsq_archive_get_entry_property_type(archive, i) ) { - return NULL; + return 0; } offset = lsq_archive_get_entry_property_offset(archive, i); - return (((LSQDateTime **)props_iter)[offset]); + return (((LSQDateTime *)props_iter)[offset]); } static gpointer @@ -1586,7 +1576,7 @@ lsq_archive_entry_set_prop_uint64(const LSQArchive *archive, LSQArchiveEntry *en } static void -lsq_archive_entry_set_prop_datet
[Xfce4-commits] Balance btree only if it helps in depth
Updating branch refs/heads/master to 1b7de7a745e0ac8823f31cbc4fac3af52da0cde7 (commit) from 2f2c6178e58c4e3eb4e9a0bbaf39239fdd266fd8 (commit) commit 1b7de7a745e0ac8823f31cbc4fac3af52da0cde7 Author: Peter de Ridder Date: Tue Oct 11 20:43:08 2011 +0200 Balance btree only if it helps in depth libsqueeze/btree.c | 146 ++- 1 files changed, 74 insertions(+), 72 deletions(-) diff --git a/libsqueeze/btree.c b/libsqueeze/btree.c index f81d098..5d98f0e 100644 --- a/libsqueeze/btree.c +++ b/libsqueeze/btree.c @@ -133,47 +133,48 @@ lsq_btree_insert_sorted_single ( */ \ | / \ * D:1 E:3 | E:3 C:5 */ -/* Swap the data */ swap_iter = iter->right; -swap_entry = iter->entry; -iter->entry = swap_iter->entry; -swap_iter->entry = swap_entry; - -/* Reformat the tree links */ -iter->right = swap_iter->right; -swap_iter->right = swap_iter->left; -swap_iter->left = iter->left; -iter->left = swap_iter; - -/* Fix the balance values - * - * if B > 0 - * A = A - 1 - B - * else - * A = A - 1 - * - * diff = A - 1 - B - * if diff < 0 - * B = B - 1 + diff - * else - * B = B - 1 - */ swap_balance = swap_iter->balance; -swap_iter->balance = iter->balance - 1; +/* Only balance if it helps */ if ( 0 < swap_balance ) { -swap_iter->balance -= swap_balance; -} -iter->balance = iter->balance - 1 - swap_balance; -if ( 0 < iter->balance ) -{ -iter->balance = 0; -} -iter->balance += swap_balance - 1; +/* Swap the data */ +swap_entry = iter->entry; +iter->entry = swap_iter->entry; +swap_iter->entry = swap_entry; + +/* Reformat the tree links */ +iter->right = swap_iter->right; +swap_iter->right = swap_iter->left; +swap_iter->left = iter->left; +iter->left = swap_iter; + +/* Fix the balance values + * + * if B > 0 + * A = A - 1 - B + * else + * A = A - 1 + * + * diff = A - 1 - B + * if diff < 0 + * B = B - 1 + diff + * else + * B = B - 1 + */ +swap_iter->balance = iter->balance - 1; +if ( 0 < swap_balance ) +{ +swap_iter->balance -= swap_balance; +} +iter->balance = iter->balance - 1 - swap_balance; +if ( 0 < iter->balance ) +{ +iter->balance = 0; +} +iter->balance += swap_balance - 1; -/* We added a child so our depth was increased, but we also saved depth by rotation so our parents depth stays the same */ -if ( 0 < swap_balance ) -{ +/* We added a child so our depth was increased, but we also saved depth by rotation so our parents depth stays the same */ break; } } @@ -183,47 +184,48 @@ lsq_btree_insert_sorted_single ( /* The code could be easier if we would just overwrite our parent left or right value. * But instead we move that data from our left to our self and use the left tree link to be placed in the tree as if it was ourself. */ -/* Swap the data */ swap_iter = iter->left; -swap_entry = iter->entry; -iter->entry = swap_iter->entry; -swap_iter->entry = swap_entry; - -/* Reformat the tree links */ -iter->left = swap_iter->left; -swap_iter->left = swap_iter->right; -swap_iter->right = iter->right; -iter->right = swap_iter; - -/* Fix the balance values - * - * if B < 0 - * A = A + 1 - B - * else - * A = A + 1 - * - * diff = A + 1 - B - * if diff > 0 - * B = B + 1 + diff - * else - * B = B + 1 - */ swap_balance = swap_iter->balance; -swap_iter->balance = iter->balance + 1; +/* Only balance if it helps */ if ( 0 > swap_balance ) { -swap_iter->balance -= swap_balance; -} -iter->balance = iter->balance + 1
[Xfce4-commits] Drop AC_PROG_LIBTOOL in favor of LT_PREREQ and LT_INIT
Updating branch refs/heads/master to e4df1b6da23e3ebd7bdf26ce71d8e42105291a2b (commit) from 81517c9ddcb259b9dc732d4c644a64f393c0cff8 (commit) commit e4df1b6da23e3ebd7bdf26ce71d8e42105291a2b Author: Peter de Ridder Date: Thu Dec 22 22:56:10 2011 +0100 Drop AC_PROG_LIBTOOL in favor of LT_PREREQ and LT_INIT configure.in.in |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/configure.in.in b/configure.in.in index 6c0bd27..8ecc71f 100644 --- a/configure.in.in +++ b/configure.in.in @@ -32,6 +32,7 @@ Written for Xfce by Stephan Arts AC_INIT([Squeeze], [squeeze_version], [http://bugzilla.xfce.org/]) AC_PREREQ([2.50]) +AC_CONFIG_MACRO_DIR([m4]) SQUEEZE_VERSION=squeeze_version AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar]) @@ -51,13 +52,16 @@ AM_CONDITIONAL([HAVE_CYGWIN], [test "`uname | grep \"CYGWIN\"`" != ""]) dnl check for standard header files AC_PROG_CC AM_PROG_CC_C_O -AC_PROG_LIBTOOL AC_PROG_INTLTOOL([0.31], [no-xml]) AC_HEADER_STDC AC_SYS_LARGEFILE CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES" +dnl Check for libtool +LT_PREREQ([2.2.6]) +LT_INIT([disable-static]) + GTK_DOC_CHECK([1.0]) ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Merge branch 'peter/btree' into merge
Updating branch refs/heads/master to e012291673d37405022b2f8505d1f83463fe028c (commit) from ce6ae3e773c0636b3f996f96d4a659e2f040a576 (commit) commit e012291673d37405022b2f8505d1f83463fe028c Merge: ce6ae3e 1b7de7a Author: Peter de Ridder Date: Tue Dec 20 14:13:30 2011 +0100 Merge branch 'peter/btree' into merge commit 1b7de7a745e0ac8823f31cbc4fac3af52da0cde7 Author: Peter de Ridder Date: Tue Oct 11 20:43:08 2011 +0200 Balance btree only if it helps in depth commit 2f2c6178e58c4e3eb4e9a0bbaf39239fdd266fd8 Author: Peter de Ridder Date: Sun Oct 9 20:21:03 2011 +0200 Optionally balance btree after remove commit 1f04b35581219671f11601e0b057f0b26a636769 Author: Peter de Ridder Date: Sun Oct 9 16:47:12 2011 +0200 Start supporting delete from the btree commit f3472d91253a3016d68e2941b128a0d96f52ae00 Author: Peter de Ridder Date: Tue Oct 4 21:42:13 2011 +0200 Balance the btree btree delete isn't supported commit d3cc31e6fb872e00eaad4291746c551435eea1c2 Author: Peter de Ridder Date: Sun Oct 2 12:09:39 2011 +0200 Replaced archive iter buffer slist with a btree The btree isn't balanced and delete isn't supported libsqueeze/Makefile.am |2 +- libsqueeze/archive-iter.c | 161 --- libsqueeze/archive.c|6 +- libsqueeze/btree.c | 646 +++ libsqueeze/{slist.h => btree.h} | 50 ++-- libsqueeze/slist.c | 109 --- 6 files changed, 727 insertions(+), 247 deletions(-) diff --git a/libsqueeze/Makefile.am b/libsqueeze/Makefile.am index 51cc350..b7beadb 100644 --- a/libsqueeze/Makefile.am +++ b/libsqueeze/Makefile.am @@ -5,6 +5,7 @@ libsqueeze_2_la_SOURCES = \ archive-iter-pool.c archive-iter-pool.h \ archive-iter.c archive-iter.h \ archive-tempfs.c archive-tempfs.h \ + btree.c btree.h \ command-queue.c command-queue.h \ command-option.c command-option.h \ internals.c internals.h \ @@ -13,7 +14,6 @@ libsqueeze_2_la_SOURCES = \ parser-context.c parser-context.h \ parser.c parser.h \ scanf-parser.c scanf-parser.h \ - slist.c slist.h \ support-reader.c support-reader.h \ support-template.c support-template.h \ support-factory.c support-factory.h diff --git a/libsqueeze/archive-iter.c b/libsqueeze/archive-iter.c index 6288535..0c3b5f4 100644 --- a/libsqueeze/archive-iter.c +++ b/libsqueeze/archive-iter.c @@ -13,7 +13,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ - #include #include #include @@ -25,12 +24,12 @@ #include "libsqueeze.h" #include "libsqueeze-view.h" #include "support-factory.h" -#include "slist.h" +#include "btree.h" #include "internals.h" #ifndef LSQ_ENTRY_CHILD_BUFFER_SIZE -#define LSQ_ENTRY_CHILD_BUFFER_SIZE 500 +#define LSQ_ENTRY_CHILD_BUFFER_SIZE 8000 #endif #ifdef LSQ_ENTRY_CHILD_BUFFER_DYNAMIC_SIZE @@ -39,10 +38,6 @@ guint buffer_flush_size = LSQ_ENTRY_CHILD_BUFFER_SIZE; #define LSQ_ENTRY_CHILD_BUFFER_SIZE buffer_flush_size #endif -#ifndef LSQ_ENTRY_BUFFER_INTERVALSIZE -#define LSQ_ENTRY_BUFFER_INTERVALSIZE 20 -#endif - #ifndef LSQ_MIME_DIRECTORY #define LSQ_MIME_DIRECTORY "inode/directory" #endif @@ -69,8 +64,6 @@ inline static LSQArchiveEntry* lsq_archive_entry_nth_child(const LSQArchiveEntry *, guint); inline static void lsq_archive_entry_flush_buffer(LSQArchiveEntry *); -inline static void -lsq_archive_entry_build_buffer_index(LSQArchiveEntry *); static LSQArchiveEntry * lsq_archive_entry_get_child(const LSQArchiveEntry *, const gchar *); static LSQArchiveEntry * @@ -102,8 +95,8 @@ struct _LSQArchiveEntry gchar *content_type; gpointer props; LSQArchiveEntry **children; - LSQSList *buffer; - LSQSIndexList *buffer_index; + LSQBTree *buffer; +guint buffer_length; }; @@ -989,7 +982,10 @@ static void lsq_archive_entry_save_free(const LSQArchive *archive, LSQArchiveEntry *entry) { guint i = 0; - LSQSList *buffer_iter = entry->buffer; + LSQBTree *buffer_iter; + + entry->buffer = lsq_btree_flatten(entry->buffer); + buffer_iter = entry->buffer; /* free the buffer */ for ( ; NULL != buffer_iter ; buffer_iter = buffer_iter->next ) @@ -999,8 +995,9 @@ lsq_archive_entry_save_free(const LSQArchive *archive, LSQArchiveEntry *entry) else lsq_archive_entry_save_free(archive, buffer_iter->entry); } - lsq_slist_free(entry->buffer); + lsq_btree_free(entry->buffer); entry->buffer = NULL; +entry->buffer_length = 0; /* free the sorted list */ if ( NULL != entry->children ) @@ -1026,15 +1023,19 @@ static void lsq_archive_entry_free(const LSQArchive *archive, LSQArchiveEntry *entry) {
[Xfce4-commits] Merge branch 'peter/datetime' into merge
Updating branch refs/heads/master to 81517c9ddcb259b9dc732d4c644a64f393c0cff8 (commit) from e012291673d37405022b2f8505d1f83463fe028c (commit) commit 81517c9ddcb259b9dc732d4c644a64f393c0cff8 Merge: e012291 f1786b6 Author: Peter de Ridder Date: Tue Dec 20 14:13:35 2011 +0100 Merge branch 'peter/datetime' into merge commit f1786b6561e7d7b3293c5675b385fe467ce6cf6b Author: Peter de Ridder Date: Sun Oct 9 19:51:58 2011 +0200 Changed LSQDateTime from struct tm to manual packed 64 bit commit 15c767a3557acf54ae9dd5bba7e08879aa4f5fd4 Author: Peter de Ridder Date: Sat Oct 8 00:44:02 2011 +0200 Parse dates and times to LSQ_TYPE_DATETIME libsqueeze/Makefile.am |1 + libsqueeze/archive-iter.c | 93 +-- libsqueeze/archive-iter.h |2 +- libsqueeze/datetime.c | 280 +++ libsqueeze/datetime.h | 65 ++ libsqueeze/libsqueeze.c |2 + libsqueeze/libsqueeze.h |1 + libsqueeze/parser.c | 10 ++ libsqueeze/parser.h |7 + libsqueeze/pcre-parser.c| 38 +-- libsqueeze/scanf-parser.c | 253 ++- libsqueeze/support-reader.c |6 + src/archive_store.c |9 ++- src/notebook.c | 13 ++- 14 files changed, 724 insertions(+), 56 deletions(-) diff --git a/libsqueeze/Makefile.am b/libsqueeze/Makefile.am index b7beadb..9d64775 100644 --- a/libsqueeze/Makefile.am +++ b/libsqueeze/Makefile.am @@ -8,6 +8,7 @@ libsqueeze_2_la_SOURCES = \ btree.c btree.h \ command-queue.c command-queue.h \ command-option.c command-option.h \ + datetime.c datetime.h \ internals.c internals.h \ libsqueeze.c libsqueeze.h \ libsqueeze-view.h \ diff --git a/libsqueeze/archive-iter.c b/libsqueeze/archive-iter.c index 0c3b5f4..4b6c3a1 100644 --- a/libsqueeze/archive-iter.c +++ b/libsqueeze/archive-iter.c @@ -77,14 +77,18 @@ inline static guint lsq_archive_entry_get_prop_uint(const LSQArchive *, const LSQArchiveEntry *, guint); inline static guint64 lsq_archive_entry_get_prop_uint64(const LSQArchive *, const LSQArchiveEntry *, guint); +inline static LSQDateTime +lsq_archive_entry_get_prop_datetime(const LSQArchive *, const LSQArchiveEntry *, guint); static void -lsq_archive_entry_set_prop_str(const LSQArchive *, LSQArchiveEntry *, guint, const gchar *); +lsq_archive_entry_set_prop_str(const LSQArchive *, LSQArchiveEntry *, guint, gchar *); static void lsq_archive_entry_set_prop_uint(const LSQArchive *, LSQArchiveEntry *, guint, guint); static void lsq_archive_entry_set_prop_uint64(const LSQArchive *, LSQArchiveEntry *, guint, guint64); static void +lsq_archive_entry_set_prop_datetime(const LSQArchive *, LSQArchiveEntry *, guint, LSQDateTime); +static void lsq_archive_entry_set_propsv(const LSQArchive *, LSQArchiveEntry *, gpointer *); static void lsq_archive_entry_set_propsva(const LSQArchive *, LSQArchiveEntry *, va_list); @@ -660,6 +664,11 @@ lsq_archive_iter_get_prop_value(const LSQArchiveIter *iter, guint n, GValue *val g_value_set_uint64(value, lsq_archive_entry_get_prop_uint64(iter->archive, iter->entry, n)); break; default: + if ( LSQ_TYPE_DATETIME == G_VALUE_TYPE(value) ) + { +g_value_set_datetime(value, lsq_archive_entry_get_prop_datetime(iter->archive, iter->entry, n)); +break; + } return FALSE; } @@ -679,7 +688,7 @@ lsq_archive_iter_set_prop_value(LSQArchiveIter *iter, guint n, const GValue *val switch(G_VALUE_TYPE(value)) { case G_TYPE_STRING: - lsq_archive_entry_set_prop_str(iter->archive, iter->entry, n, g_value_get_string(value)); + lsq_archive_entry_set_prop_str(iter->archive, iter->entry, n, g_value_dup_string(value)); break; case G_TYPE_UINT: lsq_archive_entry_set_prop_uint(iter->archive, iter->entry, n, g_value_get_uint(value)); @@ -687,11 +696,18 @@ lsq_archive_iter_set_prop_value(LSQArchiveIter *iter, guint n, const GValue *val case G_TYPE_UINT64: lsq_archive_entry_set_prop_uint64(iter->archive, iter->entry, n, g_value_get_uint64(value)); break; + default: + if ( LSQ_TYPE_DATETIME == G_VALUE_TYPE(value) ) + { +lsq_archive_entry_set_prop_datetime(iter->archive, iter->entry, n, g_value_get_datetime(value)); +break; +} +break; } } void -lsq_archive_iter_set_prop(LSQArchiveIter *iter, guint n, gconstpointer value) +lsq_archive_iter_se
[Xfce4-commits] Compiles with --enable-debug=full
Updating branch refs/heads/master to 411ec7293971367a99476ecb1f23437ebd07bc60 (commit) from e4df1b6da23e3ebd7bdf26ce71d8e42105291a2b (commit) commit 411ec7293971367a99476ecb1f23437ebd07bc60 Author: Peter de Ridder Date: Thu Dec 22 22:56:52 2011 +0100 Compiles with --enable-debug=full libsqueeze/datetime.c |1 + src/main_window.c |7 --- src/new_dialog.c |2 ++ 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/libsqueeze/datetime.c b/libsqueeze/datetime.c index 1a120c7..9e3ad78 100644 --- a/libsqueeze/datetime.c +++ b/libsqueeze/datetime.c @@ -172,6 +172,7 @@ lsq_datetime_register_type ( void ) /* Force lsq_datetime_get_type to get called, and not optimized by G_GNUC_CONST */ volatile GType type; type = lsq_datetime_get_type(); +type; } LSQDateTime diff --git a/src/main_window.c b/src/main_window.c index 1b95e0d..72bcc15 100644 --- a/src/main_window.c +++ b/src/main_window.c @@ -271,7 +271,6 @@ sq_main_window_init(SQMainWindow *window) GtkWidget*tmp_image; const gchar *nav_bar; GSList *list, *iter; - gboolean up_dir = TRUE; gboolean use_tabs = TRUE; gboolean show_menubar = TRUE; GtkWidget *item; @@ -486,14 +485,12 @@ sq_main_window_init(SQMainWindow *window) nav_bar = sq_settings_read_entry(window->settings, "NavigationBar", "None"); window->nav_style = SQ_MAIN_WINDOW_NAVIGATION_INTERNAL; window->navigationbar = NULL; - up_dir = TRUE; #ifdef ENABLE_TOOLBAR if(!strcmp(nav_bar, "ToolBar")) { window->nav_style = SQ_MAIN_WINDOW_NAVIGATION_TOOL_BAR; window->navigationbar = sq_tool_bar_new(NULL); - up_dir = FALSE; } #endif #ifdef ENABLE_PATHBAR @@ -502,7 +499,6 @@ sq_main_window_init(SQMainWindow *window) window->nav_style = SQ_MAIN_WINDOW_NAVIGATION_PATH_BAR; window->navigationbar = sq_path_bar_new(NULL); gtk_container_set_border_width(GTK_CONTAINER(window->navigationbar), 3); - up_dir = FALSE; } #endif @@ -1350,7 +1346,6 @@ static void sq_main_window_set_navigation(SQMainWindow *window) { SQNavigationBar *nav_bar = NULL; - gboolean up_dir = TRUE; switch(window->nav_style) { @@ -1359,13 +1354,11 @@ sq_main_window_set_navigation(SQMainWindow *window) #ifdef ENABLE_TOOLBAR case SQ_MAIN_WINDOW_NAVIGATION_TOOL_BAR: nav_bar = sq_tool_bar_new(NULL); - up_dir = FALSE; break; #endif #ifdef ENABLE_PATHBAR case SQ_MAIN_WINDOW_NAVIGATION_PATH_BAR: nav_bar = sq_path_bar_new(NULL); - up_dir = FALSE; break; #endif default: diff --git a/src/new_dialog.c b/src/new_dialog.c index 13624bc..d1e1205 100644 --- a/src/new_dialog.c +++ b/src/new_dialog.c @@ -123,6 +123,7 @@ sq_new_archive_dialog_get_file(SQNewArchiveDialog *dialog) if (file) { + /* const gchar *mime_type = ""; //lsq_mime_support_get_name(((LSQMimeSupport *)_supported_mime_types->data)); gchar *suffix = NULL; gint i; @@ -146,6 +147,7 @@ sq_new_archive_dialog_get_file(SQNewArchiveDialog *dialog) if(!strcmp(mime_type, "application/x-bzip")) suffix = ".bz2"; if(!strcmp(mime_type, "application/x-lzop")) suffix = ".lzo"; if(!strcmp(mime_type, "application/x-compress")) suffix = ".Z"; + */ } return file; } ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Deleting branch peter/datetime
Deleting branch refs/heads/peter/datetime ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Deleting branch peter/btree
Deleting branch refs/heads/peter/btree ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits
[Xfce4-commits] Creating branch peter/refactoring
Updating branch refs/heads/peter/refactoring as new branch to f2e128c8a48e7e5cafd600ecee3a7af7b4e2395b (commit) Branches are created implicitly by pushing. This mail only exists to let you know that there was code pushed to refs/heads/peter/refactoring for the first time. Mails for the commits that lead to the creation of the branch will follow after this mail. ___ Xfce4-commits mailing list Xfce4-commits@xfce.org https://mail.xfce.org/mailman/listinfo/xfce4-commits