From 7d9fadd440ce86e1845945ca101add62ee86b3c4 Mon Sep 17 00:00:00 2001 From: Jaap Haitsma Date: Tue, 3 Jul 2007 21:40:58 +0000 Subject: [PATCH] removed 2007-07-03 Jaap Haitsma * cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg: removed * cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg.sh: added This script also updates itself from libegg * cut-n-paste/toolbar-editor/egg*: Run update-toolbareditor-from-libegg.sh so we are in sync again with libegg svn path=/trunk/; revision=2545 --- ChangeLog | 11 +++++ .../toolbar-editor/egg-editable-toolbar.c | 35 +--------------- .../toolbar-editor/egg-toolbar-editor.c | 36 ++-------------- .../toolbar-editor/egg-toolbars-model.c | 41 +++---------------- cut-n-paste/toolbar-editor/eggtreemultidnd.c | 2 +- .../update-toolbareditor-from-libegg | 21 ---------- .../update-toolbareditor-from-libegg.sh | 35 ++++++++++++++++ 7 files changed, 57 insertions(+), 124 deletions(-) delete mode 100755 cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg create mode 100755 cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg.sh diff --git a/ChangeLog b/ChangeLog index ca0576e7..7fd60bd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-07-03 Jaap Haitsma + + * cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg: removed + + * cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg.sh: added + This script also updates itself from libegg + + * cut-n-paste/toolbar-editor/egg*: + Run update-toolbareditor-from-libegg.sh so we are in sync again with + libegg + 2007-07-02 Jaap Haitsma * shell/ev-window.c: diff --git a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c index 2b26b4ea..4d15dff0 100644 --- a/cut-n-paste/toolbar-editor/egg-editable-toolbar.c +++ b/cut-n-paste/toolbar-editor/egg-editable-toolbar.c @@ -48,8 +48,6 @@ #include #include -static void egg_editable_toolbar_class_init (EggEditableToolbarClass *klass); -static void egg_editable_toolbar_init (EggEditableToolbar *etoolbar); static GdkPixbuf * new_separator_pixbuf (void); #define MIN_TOOLBAR_HEIGHT 20 @@ -78,8 +76,6 @@ enum static guint egg_editable_toolbar_signals[LAST_SIGNAL] = { 0 }; -static GObjectClass *parent_class = NULL; - #define EGG_EDITABLE_TOOLBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_EDITABLE_TOOLBAR, EggEditableToolbarPrivate)) struct _EggEditableToolbarPrivate @@ -104,32 +100,7 @@ struct _EggEditableToolbarPrivate GtkToolItem *dnd_toolitem; }; -GType -egg_editable_toolbar_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - static const GTypeInfo our_info = { - sizeof (EggEditableToolbarClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) egg_editable_toolbar_class_init, - NULL, - NULL, /* class_data */ - sizeof (EggEditableToolbar), - 0, /* n_preallocs */ - (GInstanceInitFunc) egg_editable_toolbar_init - }; - - type = g_type_register_static (GTK_TYPE_VBOX, - "EggEditableToolbar", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (EggEditableToolbar, egg_editable_toolbar, GTK_TYPE_VBOX); static int get_dock_position (EggEditableToolbar *etoolbar, @@ -1412,7 +1383,7 @@ egg_editable_toolbar_dispose (GObject *object) priv->model = NULL; } - G_OBJECT_CLASS (parent_class)->dispose (object); + G_OBJECT_CLASS (egg_editable_toolbar_parent_class)->dispose (object); } static void @@ -1584,8 +1555,6 @@ egg_editable_toolbar_class_init (EggEditableToolbarClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - object_class->dispose = egg_editable_toolbar_dispose; object_class->set_property = egg_editable_toolbar_set_property; object_class->get_property = egg_editable_toolbar_get_property; diff --git a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c index fdf6e3f0..07674d47 100644 --- a/cut-n-paste/toolbar-editor/egg-toolbar-editor.c +++ b/cut-n-paste/toolbar-editor/egg-toolbar-editor.c @@ -44,8 +44,7 @@ static const GtkTargetEntry source_drag_types[] = { {EGG_TOOLBAR_ITEM_TYPE, GTK_TARGET_SAME_APP, 0}, }; -static void egg_toolbar_editor_class_init (EggToolbarEditorClass *klass); -static void egg_toolbar_editor_init (EggToolbarEditor *t); + static void egg_toolbar_editor_finalize (GObject *object); static void update_editor_sheet (EggToolbarEditor *editor); @@ -56,8 +55,6 @@ enum PROP_TOOLBARS_MODEL }; -static GObjectClass *parent_class = NULL; - #define EGG_TOOLBAR_EDITOR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_TOOLBAR_EDITOR, EggToolbarEditorPrivate)) struct EggToolbarEditorPrivate @@ -71,32 +68,7 @@ struct EggToolbarEditorPrivate GList *factory_list; }; -GType -egg_toolbar_editor_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - static const GTypeInfo our_info = { - sizeof (EggToolbarEditorClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) egg_toolbar_editor_class_init, - NULL, - NULL, /* class_data */ - sizeof (EggToolbarEditor), - 0, /* n_preallocs */ - (GInstanceInitFunc) egg_toolbar_editor_init - }; - - type = g_type_register_static (GTK_TYPE_VBOX, - "EggToolbarEditor", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (EggToolbarEditor, egg_toolbar_editor, GTK_TYPE_VBOX); static gint compare_items (gconstpointer a, @@ -224,8 +196,6 @@ egg_toolbar_editor_class_init (EggToolbarEditorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - parent_class = g_type_class_peek_parent (klass); - object_class->finalize = egg_toolbar_editor_finalize; object_class->set_property = egg_toolbar_editor_set_property; object_class->get_property = egg_toolbar_editor_get_property; @@ -268,7 +238,7 @@ egg_toolbar_editor_finalize (GObject *object) g_list_free (editor->priv->actions_list); g_list_free (editor->priv->factory_list); - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (egg_toolbar_editor_parent_class)->finalize (object); } GtkWidget * diff --git a/cut-n-paste/toolbar-editor/egg-toolbars-model.c b/cut-n-paste/toolbar-editor/egg-toolbars-model.c index f0a5b0fa..17c6e414 100644 --- a/cut-n-paste/toolbar-editor/egg-toolbars-model.c +++ b/cut-n-paste/toolbar-editor/egg-toolbars-model.c @@ -30,8 +30,6 @@ #include #include -static void egg_toolbars_model_class_init (EggToolbarsModelClass *klass); -static void egg_toolbars_model_init (EggToolbarsModel *model); static void egg_toolbars_model_finalize (GObject *object); enum @@ -57,8 +55,6 @@ typedef struct static guint signals[LAST_SIGNAL] = { 0 }; -static GObjectClass *parent_class = NULL; - #define EGG_TOOLBARS_MODEL_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EGG_TYPE_TOOLBARS_MODEL, EggToolbarsModelPrivate)) struct EggToolbarsModelPrivate @@ -68,36 +64,7 @@ struct EggToolbarsModelPrivate GHashTable *flags; }; -GType -egg_toolbars_model_get_type (void) -{ - static GType type = 0; - - if (G_UNLIKELY (type == 0)) - { - static const GTypeInfo our_info = { - sizeof (EggToolbarsModelClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) egg_toolbars_model_class_init, - NULL, - NULL, /* class_data */ - sizeof (EggToolbarsModel), - 0, /* n_preallocs */ - (GInstanceInitFunc) egg_toolbars_model_init - }; - volatile GType flags_type; /* work around gcc's optimiser */ - - /* make sure the flags type is known */ - flags_type = EGG_TYPE_TB_MODEL_FLAGS; - - type = g_type_register_static (G_TYPE_OBJECT, - "EggToolbarsModel", - &our_info, 0); - } - - return type; -} +G_DEFINE_TYPE (EggToolbarsModel, egg_toolbars_model, G_TYPE_OBJECT) static xmlDocPtr egg_toolbars_model_to_xml (EggToolbarsModel *model) @@ -708,8 +675,10 @@ static void egg_toolbars_model_class_init (EggToolbarsModelClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); + volatile GType flags_type; /* work around gcc's optimiser */ - parent_class = g_type_class_peek_parent (klass); + /* make sure the flags type is known */ + flags_type = EGG_TYPE_TB_MODEL_FLAGS; object_class->finalize = egg_toolbars_model_finalize; @@ -776,7 +745,7 @@ egg_toolbars_model_finalize (GObject *object) g_node_destroy (model->priv->toolbars); g_hash_table_destroy (model->priv->flags); - G_OBJECT_CLASS (parent_class)->finalize (object); + G_OBJECT_CLASS (egg_toolbars_model_parent_class)->finalize (object); } EggToolbarsModel * diff --git a/cut-n-paste/toolbar-editor/eggtreemultidnd.c b/cut-n-paste/toolbar-editor/eggtreemultidnd.c index 3a7da919..4850c686 100644 --- a/cut-n-paste/toolbar-editor/eggtreemultidnd.c +++ b/cut-n-paste/toolbar-editor/eggtreemultidnd.c @@ -59,7 +59,7 @@ egg_tree_multi_drag_source_get_type (void) if (!our_type) { - static const GTypeInfo our_info = + const GTypeInfo our_info = { sizeof (EggTreeMultiDragSourceIface), /* class_size */ NULL, /* base_init */ diff --git a/cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg b/cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg deleted file mode 100755 index fe56a2fc..00000000 --- a/cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Get latest toolbar editor from libegg -# Developers using the toolbar editor in their projects can use this script to -# fetch the latest toolbar editor from libegg -echo "Obtaining latest version of toolbar editor from libegg" - -FILES="egg-editable-toolbar.c \ - egg-toolbars-model.c \ - egg-toolbar-editor.c \ - eggtreemultidnd.c \ - egg-editable-toolbar.h \ - egg-toolbars-model.h \ - egg-toolbar-editor.h \ - eggtreemultidnd.h \ - eggmarshalers.list" - -for FILE in $FILES -do - svn export http://svn.gnome.org/svn/libegg/trunk/libegg/toolbareditor/$FILE -done - diff --git a/cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg.sh b/cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg.sh new file mode 100755 index 00000000..e047aa1d --- /dev/null +++ b/cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg.sh @@ -0,0 +1,35 @@ +#!/bin/sh +# update-toolbareditor-from-libegg.sh +# +# Get latest toolbar editor from libegg +# Developers using the toolbar editor in their projects can use this script to +# fetch the latest toolbar editor from libegg. Just run this script +# + +SCRIPT_NAME=update-toolbareditor-from-libegg.sh +SVN_URI=http://svn.gnome.org/svn/libegg/trunk/libegg/toolbareditor +FILES="egg-editable-toolbar.c \ + egg-toolbars-model.c \ + egg-toolbar-editor.c \ + eggtreemultidnd.c \ + egg-editable-toolbar.h \ + egg-toolbars-model.h \ + egg-toolbar-editor.h \ + eggtreemultidnd.h \ + eggmarshalers.list" + + +if [ -z $1 ]; then + echo "Obtaining latest version of "$SCRIPT_NAME + svn export $SVN_URI/$SCRIPT_NAME + ./$SCRIPT_NAME --update-sources +fi +if [ "$1" = "--update-sources" ]; then + + echo "Obtaining latest version of the sources" + for FILE in $FILES + do + svn export $SVN_URI/$FILE + done +fi + -- 2.43.5