[monkey-bubble: 31/753] obgnome (ObjC bindings for some commont libgnomeui stuff), gulp port to GnomeApp, mailman work, and



commit 98c52a81e94d720fbe8f7a6b3c8d83ed1850a001
Author: Elliot Lee <sopwith src gnome org>
Date:   Wed Dec 31 03:01:33 1997 +0000

    obgnome (ObjC bindings for some commont libgnomeui stuff), gulp port to GnomeApp, mailman work, and some debugging code to figure out problems with destroy signals. I think that is all. -sopwith

 libgnomeui/gnome-app.c |   21 ++++++++++++++++++++-
 libgnomeui/gnome-app.h |    5 +++--
 2 files changed, 23 insertions(+), 3 deletions(-)
---
diff --git a/libgnomeui/gnome-app.c b/libgnomeui/gnome-app.c
index 2534493..b487c38 100644
--- a/libgnomeui/gnome-app.c
+++ b/libgnomeui/gnome-app.c
@@ -4,6 +4,8 @@
 #include <string.h>
 #include <gtk/gtk.h>
 
+static void gnome_app_class_init(GnomeAppClass *appclass);
+static void gnome_app_destroy(GnomeApp *app);
 static void gnome_app_init(GnomeApp *app);
 static void gnome_app_do_menu_creation(GtkWidget *parent_widget,
 				       GnomeMenuInfo *menuinfo);
@@ -15,6 +17,7 @@ static void gnome_app_rightclick_event(GtkWidget *widget,
 				       GnomeApp *app);
 static void gnome_app_setpos_activate(GtkMenuItem *menu_item,
 				      GnomeApp *app);
+static GtkWindowClass *parent_class = NULL;
 
 guint
 gnome_app_get_type(void)
@@ -25,15 +28,23 @@ gnome_app_get_type(void)
       "GnomeApp",
       sizeof(GnomeApp),
       sizeof(GnomeAppClass),
-      (GtkClassInitFunc) NULL,
+      (GtkClassInitFunc) gnome_app_class_init,
       (GtkObjectInitFunc) gnome_app_init,
       (GtkArgFunc) NULL,
     };
     gnomeapp_type = gtk_type_unique(gtk_window_get_type(), &gnomeapp_info);
+    parent_class = gtk_type_class(gtk_window_get_type());
   }
   return gnomeapp_type;
 }
 
+static void gnome_app_class_init(GnomeAppClass *appclass)
+{
+  GtkObjectClass *object_class = GTK_OBJECT_CLASS(appclass);
+  g_print("gnome_app_class_init()\n");
+  object_class->destroy = gnome_app_destroy;
+}
+
 static void
 gnome_app_init(GnomeApp *app)
 {
@@ -58,6 +69,14 @@ gnome_app_new(gchar *appname)
   return retval;
 }
 
+static void gnome_app_destroy(GnomeApp *app)
+{
+  g_print("gnome_app_destroy()\n");
+
+  if(GTK_OBJECT_CLASS(parent_class)->destroy)
+    (* GTK_OBJECT_CLASS(parent_class)->destroy)(GTK_OBJECT(app));
+}
+
 static void
 gnome_app_do_menu_creation(GtkWidget *parent_widget,
 			   GnomeMenuInfo *menuinfo)
diff --git a/libgnomeui/gnome-app.h b/libgnomeui/gnome-app.h
index df92763..b33ea84 100644
--- a/libgnomeui/gnome-app.h
+++ b/libgnomeui/gnome-app.h
@@ -1,4 +1,4 @@
-/* GnomeApp widget */
+/* GnomeApp widget, by Elliot Lee <sopwith cuc edu> */
 
 #ifndef GNOME_APP_H
 #define GNOME_APP_H
@@ -53,7 +53,8 @@ struct _GnomeToolbarInfo {
   gpointer pixmap_info; /* Either a pointer to the char ** for the pixmap
 			   (for PMAP_DATA)
 			   or a char * for the filename (PMAP_FILENAME) */
-  GtkSignalFunc clicked_callback; /* Useful for TB_ITEMs only */ 
+  gpointer clicked_callback; /* Useful for TB_ITEMs only,
+				it's the GtkSignalFunc */
 };
 typedef struct _GnomeToolbarInfo GnomeToolbarInfo;
 



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