+2007-07-03 Jaap Haitsma <jaap@haitsma.org>
+
+ * 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 <jaap@haitsma.org>
* shell/ev-window.c:
#include <glib/gi18n.h>
#include <string.h>
-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
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
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,
priv->model = NULL;
}
- G_OBJECT_CLASS (parent_class)->dispose (object);
+ G_OBJECT_CLASS (egg_editable_toolbar_parent_class)->dispose (object);
}
static void
{
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;
{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);
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
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,
{
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;
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 *
#include <libxml/tree.h>
#include <gdk/gdkproperty.h>
-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
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
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)
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;
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 *
if (!our_type)
{
- static const GTypeInfo our_info =
+ const GTypeInfo our_info =
{
sizeof (EggTreeMultiDragSourceIface), /* class_size */
NULL, /* base_init */
+++ /dev/null
-#!/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
-
--- /dev/null
+#!/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
+