[PATCH] start of collection/* port



hi

here is patch that convers some of the files in collection/* to gnome
2.0

tomorrow more, now i'm going to bed


Index: collection/Makefile.am
===================================================================
RCS file: /cvs/gnome/eog/collection/Makefile.am,v
retrieving revision 1.15
diff -u -r1.15 Makefile.am
--- collection/Makefile.am	5 Dec 2001 19:57:42 -0000	1.15
+++ collection/Makefile.am	18 Apr 2002 01:22:45 -0000
@@ -22,8 +22,13 @@
 	Evolution-Composer-stubs.c
 endif
 
+BUILT_SOURCES = 	\
+	eog-marshal.c	\
+	eog-marshal.h
+
 eog_collection_SOURCES =		\
 	$(EVOLUTION_GENERATED)		\
+	$(BUILT_SOURCES)			\
 	eog-wrap-list.c			\
 	eog-wrap-list.h			\
 	eog-collection-control.c        \
@@ -43,6 +48,12 @@
 	eog-collection-preferences.h	\
 	eog-collection-preferences.c	\
 	main.c
+
+eog-marshal.h: eog-marshal.list $(GLIB_GENMARSHAL) 
+	$(GLIB_GENMARSHAL) $< --header --prefix=eog_marshal > $@
+
+eog-marshal.c: eog-marshal.list $(GLIB_GENMARSHAL)
+	$(GLIB_GENMARSHAL) $< --body --prefix=eog_marshal > $@
 
 eog_collection_LDADD = 			\
 	$(EOG_LIBS)				\
Index: collection/eog-collection-control.c
===================================================================
RCS file: /cvs/gnome/eog/collection/eog-collection-control.c,v
retrieving revision 1.7
diff -u -r1.7 eog-collection-control.c
--- collection/eog-collection-control.c	21 Feb 2002 02:20:43 -0000	1.7
+++ collection/eog-collection-control.c	18 Apr 2002 01:22:45 -0000
@@ -131,7 +131,7 @@
 	control->priv = g_new0 (EogCollectionControlPrivate, 1);
 }
 
-BONOBO_X_TYPE_FUNC (EogCollectionControl,
+BONOBO_TYPE_FUNC (EogCollectionControl,
 		    PARENT_TYPE,
 		    eog_collection_control);
 
@@ -188,7 +188,7 @@
 	eog_ctrl->priv->uic = bonobo_control_get_ui_component (bctrl);
 
 	g_signal_connect (bctrl, "activate", 
-			  G_CALLBACK (eog_collection_control_activate, eog_ctrl);
+			  G_CALLBACK (eog_collection_control_activate), eog_ctrl);
 
 	/* add properties */
 	property_bag = eog_collection_view_get_property_bag (EOG_COLLECTION_VIEW (eog_ctrl));
Index: collection/eog-collection-model.c
===================================================================
RCS file: /cvs/gnome/eog/collection/eog-collection-model.c,v
retrieving revision 1.14
diff -u -r1.14 eog-collection-model.c
--- collection/eog-collection-model.c	31 Dec 2001 11:02:37 -0000	1.14
+++ collection/eog-collection-model.c	18 Apr 2002 01:22:45 -0000
@@ -1,7 +1,9 @@
+#include <libgnomevfs/gnome-vfs.h>
+
+#include "eog-marshal.h"
 #include "eog-collection-model.h"
 #include "eog-image-loader.h"
 #include "bonobo/bonobo-moniker-util.h"
-#include <libgnomevfs/gnome-vfs.h>
 
 /* Signal IDs */
 enum {
@@ -13,8 +15,6 @@
 	LAST_SIGNAL
 };
 
-static void marshal_interval_notification (GtkObject *object, GtkSignalFunc func, 
-					   gpointer data, GtkArg *args);
 static guint eog_model_signals[LAST_SIGNAL];
 
 typedef struct {
@@ -139,10 +139,10 @@
 		g_signal_new ("interval_changed",
 				object_class->type,
 				G_SIGNAL_RUN_FIRST,
-				GTK_SIGNAL_OFFSET (EogCollectionModelClass, interval_changed),
+				G_STRUCT_OFFSET (EogCollectionModelClass, interval_changed),
 				NULL,
 				NULL,
-				marshal_interval_notification,
+				eog_marshal_VOID__POINTER,
 				G_TYPE_NONE,
 			       	1,
 				G_TYPE_POINTER);
@@ -153,7 +153,7 @@
 				GTK_SIGNAL_OFFSET (EogCollectionModelClass, interval_added),
 				NULL,
 				NULL,
-				marshal_interval_notification,
+				eog_marshal_VOID_POINTER,
 				G_TYPE_NONE,
 			       	1,
 				G_TYPE_POINTER);
@@ -164,7 +164,7 @@
 				GTK_SIGNAL_OFFSET (EogCollectionModelClass, interval_removed),
 				NULL,
 				NULL,
-				marshal_interval_notification,
+				eog_marshal_VOID_POINTER,
 				G_TYPE_NONE,
 			       	1,
 				G_TYPE_POINTER);
@@ -172,44 +172,30 @@
 		g_signal_new ("selection_changed",
 				object_class->type,
 				G_SIGNAL_RUN_FIRST,
-				GTK_SIGNAL_OFFSET (EogCollectionModelClass, selection_changed),
+				G_STRUCT_OFFSET (EogCollectionModelClass, selection_changed),
 				NULL,
 				NULL,
-				gtk_marshal_NONE__NONE,
+				eog_marshal_VOID__VOID,
 				G_TYPE_NONE,
 			       	0);
 	eog_model_signals[BASE_URI_CHANGED] = 
 		g_signal_new ("base_uri_changed",
 				object_class->type,
 				G_SIGNAL_RUN_FIRST,
-				GTK_SIGNAL_OFFSET (EogCollectionModelClass, base_uri_changed),
+				G_STRUCT_OFFSET (EogCollectionModelClass, base_uri_changed),
 				NULL,
 				NULL,
-				gtk_marshal_NONE__NONE,
-				G_TYPE_NONE,
+				eog_marshal_VOID__VOID,				G_TYPE_NONE,
 			       	0);
 }
 
-typedef void (* IntervalNotificationFunc) (GtkObject *object, GList *id_list,
-					   gpointer data);
-
-static void
-marshal_interval_notification (GtkObject *object, GtkSignalFunc func, gpointer data, GtkArg *args)
-{
-	IntervalNotificationFunc rfunc;
-
-	rfunc = (IntervalNotificationFunc) func;
-	(* func) (object, GTK_VALUE_POINTER (args[0]), data);
-}
-
-
-GtkType 
+GType 
 eog_collection_model_get_type (void)
 {
-	static GtkType type = 0;
+	static GType type = 0;
 
 	if (!type) {
-		GtkTypeInfo info = {
+		static const GtkTypeInfo info = {
 			"EogCollectionModel",
 			sizeof (EogCollectionModel),
 			sizeof (EogCollectionModelClass),
Index: collection/eog-collection-model.h
===================================================================
RCS file: /cvs/gnome/eog/collection/eog-collection-model.h,v
retrieving revision 1.11
diff -u -r1.11 eog-collection-model.h
--- collection/eog-collection-model.h	31 Dec 2001 11:02:37 -0000	1.11
+++ collection/eog-collection-model.h	18 Apr 2002 01:22:45 -0000
@@ -50,13 +50,13 @@
 #define EOG_MODEL_ID_NONE  -3 /* Random number, same as NULL otherwise.*/
 
 struct _EogCollectionModel {
-	GtkObject parent_object;
+	GObject parent_object;
 	
 	EogCollectionModelPrivate *priv;
 };
 
 struct _EogCollectionModelClass {
-	GtkObjectClass parent_class;
+	GObjectClass parent_class;
 
 	/* Notification signals */
 	void (* interval_changed) (EogCollectionModel *model, GList *id_list);
@@ -68,7 +68,7 @@
 };
 
 
-GtkType 
+GType 
 eog_collection_model_get_type               (void);
 
 EogCollectionModel*
Index: collection/eog-collection-view.c
===================================================================
RCS file: /cvs/gnome/eog/collection/eog-collection-view.c,v
retrieving revision 1.16
diff -u -r1.16 eog-collection-view.c
--- collection/eog-collection-view.c	21 Aug 2001 15:07:42 -0000	1.16
+++ collection/eog-collection-view.c	18 Apr 2002 01:22:45 -0000
@@ -88,7 +88,7 @@
 
 static guint eog_collection_view_signals [LAST_SIGNAL];
 
-#define PARENT_TYPE BONOBO_X_OBJECT_TYPE
+#define PARENT_TYPE BONOBO_OBJECT_TYPE
 
 static BonoboObjectClass *eog_collection_view_parent_class;
 
@@ -242,16 +242,15 @@
 	epv->openURIList = impl_GNOME_EOG_ImageCollection_openURIList;
 
 	eog_collection_view_signals [OPEN_URI] = 
-		gtk_signal_new ("open_uri",
-				GTK_RUN_FIRST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EogCollectionViewClass, open_uri),
-				gtk_marshal_NONE__POINTER,
-				GTK_TYPE_NONE, 1,
-				GTK_TYPE_POINTER);
-
-	gtk_object_class_add_signals (object_class, eog_collection_view_signals, LAST_SIGNAL);
-
+		g_signal_new ("open_uri",
+			      GTK_CLASS_TYPE (object_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (EogCollectionViewClass, open_uri),
+			      NULL, 
+			      NULL,
+			      eog_marshal_VOID__POINTER,
+			      G_TYPE_NONE, 1,
+			      G_TYPE_POINTER);
 }
 
 static void
@@ -261,10 +260,10 @@
 	view->priv->idle_id = -1;
 }
 
-BONOBO_X_TYPE_FUNC_FULL (EogCollectionView, 
-			 GNOME_EOG_ImageCollection,
-			 PARENT_TYPE,
-			 eog_collection_view);
+BONOBO_TYPE_FUNC_FULL (EogCollectionView, 
+			GNOME_EOG_ImageCollection,
+			PARENT_TYPE,
+			eog_collection_view);
 
 static void
 handle_double_click (EogWrapList *wlist, gint n, EogCollectionView *view)
Index: collection/eog-collection-view.h
===================================================================
RCS file: /cvs/gnome/eog/collection/eog-collection-view.h,v
retrieving revision 1.9
diff -u -r1.9 eog-collection-view.h
--- collection/eog-collection-view.h	31 Dec 2001 11:02:37 -0000	1.9
+++ collection/eog-collection-view.h	18 Apr 2002 01:22:45 -0000
@@ -30,13 +30,13 @@
 typedef struct _EogCollectionViewPrivate  EogCollectionViewPrivate;
 
 struct _EogCollectionView {
-	BonoboXObject base;
+	BonoboObject base;
 
 	EogCollectionViewPrivate *priv;
 };
 
 struct _EogCollectionViewClass {
-	BonoboXObjectClass parent_class;
+	BonoboObjectClass parent_class;
 
 	void (*open_uri) (EogCollectionView *view, gchar *uri);
 
Index: collection/eog-item-factory.c
===================================================================
RCS file: /cvs/gnome/eog/collection/eog-item-factory.c,v
retrieving revision 1.3
diff -u -r1.3 eog-item-factory.c
--- collection/eog-item-factory.c	21 Aug 2001 15:07:42 -0000	1.3
+++ collection/eog-item-factory.c	18 Apr 2002 01:22:46 -0000
@@ -37,11 +37,11 @@
 
 static void eog_item_factory_class_init (EogItemFactoryClass *class);
 
-static void marshal_create_item (GtkObject *object, GtkSignalFunc func,
+static void marshal_create_item (GObject *object, GtkSignalFunc func,
 				 gpointer data, GtkArg *args);
-static void marshal_update_item (GtkObject *object, GtkSignalFunc func,
+static void marshal_update_item (GObject *object, GtkSignalFunc func,
 				 gpointer data, GtkArg *args);
-static void marshal_get_item_size (GtkObject *object, GtkSignalFunc func,
+static void marshal_get_item_size (GObject *object, GtkSignalFunc func,
 				   gpointer data, GtkArg *args);
 
 static guint ei_factory_signals[LAST_SIGNAL];
@@ -57,12 +57,12 @@
  *
  * Return value: The type ID of the #GnomeListItemFactory class.
  **/
-GtkType
+GType
 eog_item_factory_get_type (void)
 {
-	static GtkType ei_factory_type = 0;
+	static GType type = 0;
 
-	if (!ei_factory_type) {
+	if (!type) {
 		static const GtkTypeInfo ei_factory_info = {
 			"EogItemFactory",
 			sizeof (EogItemFactory),
@@ -74,103 +74,58 @@
 			(GtkClassInitFunc) NULL
 		};
 
-		ei_factory_type = gtk_type_unique (gtk_object_get_type (), &ei_factory_info);
+		type = gtk_type_unique (gtk_object_get_type (), &ei_factory_info);
 	}
 
-	return ei_factory_type;
+	return type;
 }
 
 /* Class initialization function for the abstract list item factory */
 static void
 eog_item_factory_class_init (EogItemFactoryClass *class)
 {
-	GtkObjectClass *object_class;
+	GObjectClass *object_class;
 
-	object_class = (GtkObjectClass *) class;
+	object_class = G_OBJECT_CLASS (class);
 
 	ei_factory_signals[CREATE_ITEM] =
-		gtk_signal_new ("create_item",
-				GTK_RUN_LAST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EogItemFactoryClass, create_item),
-				marshal_create_item,
-				GNOME_TYPE_CANVAS_ITEM, 2,
-				GNOME_TYPE_CANVAS_GROUP,
-				GTK_TYPE_UINT);
+		g_signal_new ("create_item",
+			      G_TYPE_FROM_CLASS (object_class),
+			      G_SIGNAL_RUN_LAST,
+			      G_STRUCT_OFFSET (EogItemFactoryClass, create_item),
+			      NULL, NULL,
+			      eog_marshal_POINTER__POINTER_UINT,
+			      GNOME_TYPE_CANVAS_ITEM, 2,
+			      GNOME_TYPE_CANVAS_GROUP,
+			      GTK_TYPE_UINT);
 	ei_factory_signals[UPDATE_ITEM] =
-		gtk_signal_new ("update_item",
-				GTK_RUN_FIRST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EogItemFactoryClass, update_item),
-				marshal_update_item,
-				GTK_TYPE_NONE, 2,
-				EOG_TYPE_COLLECTION_MODEL,
-				GNOME_TYPE_CANVAS_ITEM);
+		g_signal_new ("update_item",
+			      G_TYPE_FROM_CLASS (object_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (EogItemFactoryClass, update_item),
+			      NULL, NULL,
+			      eog_marshal_VOID__POINTER_POINTER,
+			      G_TYPE_NONE, 2,
+			      EOG_TYPE_COLLECTION_MODEL,
+			      GNOME_TYPE_CANVAS_ITEM);
 	ei_factory_signals[GET_ITEM_SIZE] =
-		gtk_signal_new ("get_item_size",
-				GTK_RUN_FIRST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EogItemFactoryClass, get_item_size),
-				marshal_get_item_size,
-				GTK_TYPE_NONE, 2,
-				GTK_TYPE_POINTER,
-				GTK_TYPE_POINTER);
+		g_signal_new ("get_item_size",
+			      G_TYPE_FROM_CLASS (object_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (EogItemFactoryClass, get_item_size),
+			      NULL, NULL,
+			      eog_marshal_VOID__POINTER_POINTER,
+			      G_TYPE_NONE, 2,
+			      G_TYPE_POINTER,
+			      G_TYPE_POINTER);
 	ei_factory_signals[CONFIGURATION_CHANGED] =
-		gtk_signal_new ("configuration_changed",
-				GTK_RUN_FIRST,
-				object_class->type,
-				GTK_SIGNAL_OFFSET (EogItemFactoryClass, configuration_changed),
-				gtk_marshal_NONE__NONE,
-				GTK_TYPE_NONE, 0);
-
-	gtk_object_class_add_signals (object_class, ei_factory_signals, LAST_SIGNAL);
-}
-
-
-
-/* Marshalers */
-
-typedef GnomeCanvasItem *(* CreateItemFunc) (GtkObject *object, GtkObject *parent, 
-					     guint id, gpointer data);
-
-static void
-marshal_create_item (GtkObject *object, GtkSignalFunc func, gpointer data, GtkArg *args)
-{
-	CreateItemFunc rfunc;
-	GnomeCanvasItem **retval;
-
-	retval = (GnomeCanvasItem **) GTK_RETLOC_POINTER (args[2]);
-	rfunc = (CreateItemFunc) func;
-	*retval = (* rfunc) (object, GTK_VALUE_OBJECT (args[0]), GTK_VALUE_UINT (args[1]), data);
-}
-
-typedef void (* UpdateItemFunc) (GtkObject *object, 
-				 GtkObject *model, 
-				 GtkObject *item,
-				 gpointer data);
-
-static void
-marshal_update_item (GtkObject *object, GtkSignalFunc func, gpointer data, GtkArg *args)
-{
-	UpdateItemFunc rfunc;
-
-	rfunc = (UpdateItemFunc) func;
-	(* func) (object, GTK_VALUE_OBJECT (args[0]),
-		  GTK_VALUE_OBJECT (args[1]), data);
-}
-
-typedef void (* GetItemSizeFunc) (GtkObject *object, 
-				  gpointer width, gpointer height,
-				  gpointer data);
-
-static void
-marshal_get_item_size (GtkObject *object, GtkSignalFunc func, gpointer data, GtkArg *args)
-{
-	GetItemSizeFunc rfunc;
-
-	rfunc = (GetItemSizeFunc) func;
-	(* rfunc) (object,
-		   GTK_VALUE_POINTER (args[0]), GTK_VALUE_POINTER (args[1]), data);
+		g_signal_new ("configuration_changed",
+			      G_TYPE_FROM_CLASS (object_class),
+			      NULL, NULL,
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (EogItemFactoryClass, configuration_changed),
+			      eog_marshal_VOID__VOID,
+			      G_TYPE_NONE, 0);
 }
 
 
Index: collection/eog-item-factory.h
===================================================================
RCS file: /cvs/gnome/eog/collection/eog-item-factory.h,v
retrieving revision 1.3
diff -u -r1.3 eog-item-factory.h
--- collection/eog-item-factory.h	31 Dec 2001 11:02:37 -0000	1.3
+++ collection/eog-item-factory.h	18 Apr 2002 01:22:46 -0000
@@ -23,7 +23,7 @@
 #ifndef EOG_ITEM_FACTORY_H
 #define EOG_ITEM_FACTORY_H
 
-#include <libgnomeui/gnome-canvas.h>
+#include <libgnomecanvas/gnome-canvas.h>
 #include "eog-collection-model.h"
 
 G_BEGIN_DECLS
@@ -46,11 +46,11 @@
 typedef struct _EogItemFactoryClass EogItemFactoryClass;
 
 struct _EogItemFactory {
-	GtkObject object;
+	GObject object;
 };
 
 struct _EogItemFactoryClass {
-	GtkObjectClass parent_class;
+	GObjectClass parent_class;
 
 	/* Item mutation signals */
 	GnomeCanvasItem *(* create_item) (EogItemFactory *factory, 
@@ -69,9 +69,9 @@
 };
 
 
-GtkType eog_item_factory_get_type (void);
+GType eog_item_factory_get_type (void);
 
-GtkObject* eog_item_factory_new (void);
+GObject* eog_item_factory_new (void);
 
 GnomeCanvasItem *eog_item_factory_create_item (EogItemFactory *factory,
 					       GnomeCanvasGroup *parent,
Index: collection/eog-wrap-list.c
===================================================================
RCS file: /cvs/gnome/eog/collection/eog-wrap-list.c,v
retrieving revision 1.9
diff -u -r1.9 eog-wrap-list.c
--- collection/eog-wrap-list.c	31 Dec 2001 11:02:37 -0000	1.9
+++ collection/eog-wrap-list.c	18 Apr 2002 01:22:46 -0000
@@ -24,6 +24,7 @@
 //#include <gtk/gtksignal.h>
 #include <glib/gmain.h>
 
+#include "eog-marshal.h"
 #include "eog-wrap-list.h"
 #include <math.h>
 
@@ -121,7 +122,7 @@
 
 static void eog_wrap_list_class_init (EogWrapListClass *class);
 static void eog_wrap_list_init (EogWrapList *wlist);
-static void eog_wrap_list_destroy (GObject *object);
+static void eog_wrap_list_destroy (GtkObject *object);
 static void eog_wrap_list_finalize (GObject *object);
 
 static void eog_wrap_list_size_allocate (GtkWidget *widget, GtkAllocation *allocation);
@@ -134,25 +135,6 @@
 static GnomeCanvasClass *parent_class;
 #define PARENT_TYPE gnome_canvas_get_type ()
 
-typedef gboolean (*EogWrapListSignal_BOOL__INT_POINTER) (GObject *object,
-							 gint arg1,
-							 gpointer arg3,
-							 gpointer data);
-
-static void
-eog_wrap_list_marshal_BOOL_INT_POINTER (GObject *object, GtkSignalFunc func,
-				        gpointer func_data, GtkArg *args)
-{
-	EogWrapListSignal_BOOL__INT_POINTER rfunc;
-	gboolean *return_val;
-
-	return_val = GTK_RETLOC_BOOL (args[2]);
-	rfunc = (EogWrapListSignal_BOOL__INT_POINTER) func;
-	*return_val = (*rfunc) (object, GTK_VALUE_INT     (args[0]),
-					GTK_VALUE_POINTER (args[1]),
-					func_data);
-}
-
 
 
 /**
@@ -164,69 +146,70 @@
  *
  * Return value: The type ID of the #EogWrapList class.
  **/
-GtkType
+GType
 eog_wrap_list_get_type (void)
 {
-	static GtkType wrap_list_type = 0;
+	static GType type = 0;
 
-	if (!wrap_list_type) {
-		static const GtkTypeInfo wrap_list_info = {
-			"EogWrapList",
-			sizeof (EogWrapList),
+	if (!type) {
+		static const GTypeInfo info = {
 			sizeof (EogWrapListClass),
-			(GtkClassInitFunc) eog_wrap_list_class_init,
-			(GtkObjectInitFunc) eog_wrap_list_init,
-			NULL, /* reserved_1 */
-			NULL, /* reserved_2 */
-			(GtkClassInitFunc) NULL
+			NULL, NULL,
+			(GClassInitFunc) eog_wrap_list_class_init,
+			NULL, NULL,
+			sizeof (EogWrapList),
+			0,
+			(GInstanceInitFunc) eog_wrap_list_init,
 		};
 
-		wrap_list_type = gtk_type_unique (PARENT_TYPE, &wrap_list_info);
+		type = g_type_register_static (PARENT_TYPE, "EogWrapList", &info, 0);
 	}
 
-	return wrap_list_type;
+	return type;
 }
 
 /* Class initialization function for the abstract wrapped list view */
 static void
-eog_wrap_list_class_init (EogWrapListClass *class)
+eog_wrap_list_class_init (EogWrapListClass *klass)
 {
-	GObjectClass *object_class;
-	GObjectClass *widget_class;
-
-	object_class = (GObjectClass *) class;
-	widget_class = (GObjectClass *) class;
+	GtkObjectClass *object_class;
+	GObjectClass *gobject_class;
+	GtkWidgetClass *widget_class;
+
+	object_class = GTK_OBJECT_CLASS (klass);
+	gobject_class = G_OBJECT_CLASS (klass);
+	widget_class = GTK_WIDGET_CLASS (klass);
 
 	parent_class = gtk_type_class (PARENT_TYPE);
 
 	object_class->destroy = eog_wrap_list_destroy;
-	object_class->finalize = eog_wrap_list_finalize;
+	gobject_class->finalize = eog_wrap_list_finalize;
 
 	widget_class->size_allocate = eog_wrap_list_size_allocate;
 
-	eog_wrap_list_signals [RIGHT_CLICK] = g_signal_new (
-			"right_click",
-		       	GTK_CLASS_TYPE(object_class),
-		       	G_SIGNAL_RUN_FIRST,
-			GTK_SIGNAL_OFFSET (EogWrapListClass, right_click),
-			NULL,
-			NULL,
-			eog_wrap_list_marshal_BOOL_INT_POINTER,
-		       	G_TYPE_BOOLEAN,
-			2,
-		       	G_TYPE_INT,
-		       	GDK_TYPE_EVENT);
-	eog_wrap_list_signals [DOUBLE_CLICK] = g_signal_new (
-			"double_click",
-		       	GTK_CLASS_TYPE(object_class),
-		       	G_SIGNAL_RUN_FIRST,
-			GTK_SIGNAL_OFFSET (EogWrapListClass, double_click),
-			NULL,
-			NULL,
-			gtk_marshal_NONE__INT,
-		       	G_TYPE_NONE,
-		       	1,
-		       	G_TYPE_INT);
+	eog_wrap_list_signals [RIGHT_CLICK] =
+		g_signal_new ("right_click",
+			      GTK_CLASS_TYPE (gobject_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (EogWrapListClass, right_click),
+			      NULL,
+		              NULL,
+			      eog_marshal_BOOLEAN__INT_POINTER,
+		       	      G_TYPE_BOOLEAN,
+			      2,
+		       	      G_TYPE_INT,
+		       	      GDK_TYPE_EVENT);
+	eog_wrap_list_signals [DOUBLE_CLICK] = 
+		g_signal_new ("double_click",
+		       	      GTK_CLASS_TYPE (gobject_class),
+			      G_SIGNAL_RUN_FIRST,
+			      G_STRUCT_OFFSET (EogWrapListClass, double_click),
+			      NULL,
+			      NULL,
+			      eog_marshal_VOID__INT,
+			      G_TYPE_NONE,
+			      1,
+			      G_TYPE_INT);
 }
 
 /* object initialization function for the abstract wrapped list view */
@@ -255,7 +238,7 @@
 
 /* Destroy handler for the abstract wrapped list view */
 static void
-eog_wrap_list_destroy (GObject *object)
+eog_wrap_list_destroy (GtkObject *object)
 {
 	EogWrapList *wlist;
 	EogWrapListPrivate *priv;
@@ -267,17 +250,18 @@
 	priv = wlist->priv;
 
 	if (priv->model)
-		gtk_object_unref (GTK_OBJECT (priv->model));
+		g_object_unref (G_OBJECT (priv->model));
 	priv->model = NULL;
 
 	if (priv->factory)
-		gtk_object_unref (GTK_OBJECT (priv->factory));
+		g_object_unref (G_OBJECT (priv->factory));
 	priv->factory = NULL;
 
 	/* FIXME: free the items and item array */
-
+/*
 	if (G_OBJECT_CLASS (parent_class)->destroy)
 		(* G_OBJECT_CLASS (parent_class)->destroy) (object);
+*/
 }
 
 static void
VOID:INT
VOID:VOID
VOID:POINTER
VOID:POINTER,POINTER
POINTER:POINTER,UINT
BOOLEAN:INT,POINTER


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]