Fix display of window icon
[pspp] / src / ui / gui / psppire-dialog.c
index c0c2641f3222f3da4b130676d737b168a02e893e..6945c2a901fdf2cc28c7a1e5e20d25223ba2a80f 100644 (file)
@@ -23,6 +23,7 @@
 #include "psppire-dialog.h"
 #include "psppire-buttonbox.h"
 #include "psppire-selector.h"
+#include <string.h>
 
 static void psppire_dialog_class_init          (PsppireDialogClass *);
 static void psppire_dialog_init                (PsppireDialog      *);
@@ -288,6 +289,8 @@ psppire_dialog_init (PsppireDialog *dialog)
   gtk_window_set_type_hint (GTK_WINDOW (dialog),
        GDK_WINDOW_TYPE_HINT_DIALOG);
 
+  g_object_set (dialog, "icon-name", "psppicon", NULL);
+
   gtk_widget_show_all (dialog->box);
 }
 
@@ -297,7 +300,8 @@ psppire_dialog_new (void)
 {
   PsppireDialog *dialog ;
 
-  dialog = g_object_new (psppire_dialog_get_type (), NULL);
+  dialog = g_object_new (psppire_dialog_get_type (),
+                        NULL);
 
   return GTK_WIDGET (dialog) ;
 }
@@ -501,7 +505,7 @@ get_internal_child    (GtkBuildable *buildable,
 {
   PsppireDialog *dialog = PSPPIRE_DIALOG (buildable);
 
-  if ( 0 == g_strcmp0 (childname, "hbox"))
+  if ( 0 == strcmp (childname, "hbox"))
     return G_OBJECT (dialog->box);
 
   return NULL;