]> www.fi.muni.cz Git - evince.git/commitdiff
removed
authorJaap Haitsma <jaap@haitsma.org>
Tue, 3 Jul 2007 21:40:58 +0000 (21:40 +0000)
committerJaap A. Haitsma <jhaitsma@src.gnome.org>
Tue, 3 Jul 2007 21:40:58 +0000 (21:40 +0000)
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

svn path=/trunk/; revision=2545

ChangeLog
cut-n-paste/toolbar-editor/egg-editable-toolbar.c
cut-n-paste/toolbar-editor/egg-toolbar-editor.c
cut-n-paste/toolbar-editor/egg-toolbars-model.c
cut-n-paste/toolbar-editor/eggtreemultidnd.c
cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg [deleted file]
cut-n-paste/toolbar-editor/update-toolbareditor-from-libegg.sh [new file with mode: 0755]

index ca0576e731e22e9cd80fe99c38d5c0fea02c5e89..7fd60bd7caa0a58223bc25191e050c267e6c98e6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+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:
index 2b26b4eaaabba0c3479b8379a5c04e5cb3b6b32d..4d15dff0713e96307ec021a210a67566dd450f8a 100644 (file)
@@ -48,8 +48,6 @@
 #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
@@ -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;
index fdf6e3f0fc86c1cfffa88e66cf8074aecdb517e6..07674d470bd635f567f48964698222afac71afce 100644 (file)
@@ -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 *
index f0a5b0fa0fb5ebe9ddf1ca00ef272d175ce0c345..17c6e414bd5aa7c853f59dd414e6de94f6614486 100644 (file)
@@ -30,8 +30,6 @@
 #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
@@ -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 *
index 3a7da919c082fb034a3eb3ba2b5e71d4cc708c1c..4850c68603be55b1e2b1ba00cf275ca9d6d368bb 100644 (file)
@@ -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 (executable)
index fe56a2f..0000000
+++ /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 (executable)
index 0000000..e047aa1
--- /dev/null
@@ -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
+