Replace more uses of 'cnt' by 'n'.
[pspp] / src / ui / gui / psppire-window-base.c
index 29c0fd7a5851e6119b12b52ad3c6d227b72ab63d..1db54c7d124e800c46b558f6d35e158eb8adaa69 100644 (file)
@@ -16,7 +16,7 @@
 
 /*
  This is an abstract base class upon which all (well almost all) windows in
 
 /*
  This is an abstract base class upon which all (well almost all) windows in
- psppire are based.   The exceptions are transient windows such as the 
+ psppire are based.   The exceptions are transient windows such as the
  splash screen and popups.
 
  It currently provides the feature where the window's geometry "persists"
  splash screen and popups.
 
  It currently provides the feature where the window's geometry "persists"
@@ -33,9 +33,8 @@
 #include <gtk/gtk.h>
 
 static void psppire_window_base_class_init    (PsppireWindowBaseClass *class);
 #include <gtk/gtk.h>
 
 static void psppire_window_base_class_init    (PsppireWindowBaseClass *class);
-static void psppire_window_base_init          (PsppireWindowBase      *window);
 
 
-G_DEFINE_ABSTRACT_TYPE (PsppireWindowBase, psppire_window_base, GTK_TYPE_WINDOW);
+G_DEFINE_ABSTRACT_TYPE (PsppireWindowBase, psppire_window_base, GTK_TYPE_APPLICATION_WINDOW);
 
 
 /* Obtain a string identifying this window.
 
 
 /* Obtain a string identifying this window.
@@ -46,10 +45,7 @@ G_DEFINE_ABSTRACT_TYPE (PsppireWindowBase, psppire_window_base, GTK_TYPE_WINDOW)
 static const char *
 get_window_id (GtkWidget *wb)
 {
 static const char *
 get_window_id (GtkWidget *wb)
 {
-  const gchar *name = NULL;
-      
-  g_object_get (wb, "name", &name, NULL);
-
+  const gchar *name = gtk_widget_get_name (wb);
   if (NULL == name || 0 == strcmp ("", name))
     name = G_OBJECT_TYPE_NAME (wb);
 
   if (NULL == name || 0 == strcmp ("", name))
     name = G_OBJECT_TYPE_NAME (wb);
 
@@ -68,7 +64,7 @@ realize (GtkWidget *wb)
   psppire_conf_set_window_geometry (conf, get_window_id (wb), GTK_WINDOW (wb));
 
   if (GTK_WIDGET_CLASS (psppire_window_base_parent_class)->realize)
   psppire_conf_set_window_geometry (conf, get_window_id (wb), GTK_WINDOW (wb));
 
   if (GTK_WIDGET_CLASS (psppire_window_base_parent_class)->realize)
-    return GTK_WIDGET_CLASS (psppire_window_base_parent_class)->realize (wb) ;
+    GTK_WIDGET_CLASS (psppire_window_base_parent_class)->realize (wb) ;
 }
 
 
 }
 
 
@@ -91,7 +87,7 @@ configure_event (GtkWidget *wb, GdkEventConfigure *event)
   return FALSE;
 }
 
   return FALSE;
 }
 
-static void 
+static void
 psppire_window_base_class_init    (PsppireWindowBaseClass *class)
 {
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
 psppire_window_base_class_init    (PsppireWindowBaseClass *class)
 {
   GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
@@ -99,7 +95,7 @@ psppire_window_base_class_init    (PsppireWindowBaseClass *class)
   widget_class->realize = realize;
 }
 
   widget_class->realize = realize;
 }
 
-static void 
+static void
 psppire_window_base_init          (PsppireWindowBase      *window)
 {
 }
 psppire_window_base_init          (PsppireWindowBase      *window)
 {
 }