X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog.c;h=99d32197ec28551e6e20f1d2ce6acaa543640f21;hb=99732245d610cf363429f1b67a8b2b2e15a9a734;hp=e4d04a1fa3cfecccdb3468c916dbb636e2543f75;hpb=f550aee00a62fe1d8baf62d83cd7efef6cc2ee92;p=pspp diff --git a/src/ui/gui/psppire-dialog.c b/src/ui/gui/psppire-dialog.c index e4d04a1fa3..99d32197ec 100644 --- a/src/ui/gui/psppire-dialog.c +++ b/src/ui/gui/psppire-dialog.c @@ -1,5 +1,5 @@ /* PSPPIRE - a graphical user interface for PSPP. - Copyright (C) 2007, 2010 Free Software Foundation + Copyright (C) 2007, 2010, 2011 Free Software Foundation This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -18,13 +18,12 @@ #include #include -#include -#include #include "psppire-dialog.h" #include "psppire-buttonbox.h" #include "psppire-selector.h" #include "psppire-conf.h" #include +#include "helper.h" static void psppire_dialog_class_init (PsppireDialogClass *); static void psppire_dialog_init (PsppireDialog *); @@ -296,14 +295,14 @@ static gboolean configure_event_callback (GtkDialog *dialog, GdkEvent *event, gpointer data) { - gchar *base = NULL; + const gchar *base; PsppireConf *conf = psppire_conf_new (); - if ( ! GTK_WIDGET_MAPPED (dialog)) + if ( ! gtk_widget_get_mapped (GTK_WIDGET (dialog))) return FALSE; - g_object_get (dialog, "name", &base, NULL); + base = gtk_buildable_get_name (GTK_BUILDABLE (dialog)); psppire_conf_save_window_geometry (conf, base, GTK_WINDOW (dialog)); @@ -316,9 +315,7 @@ on_realize (GtkWindow *dialog, gpointer data) { PsppireConf *conf = psppire_conf_new (); - const gchar *base = NULL; - - g_object_get (dialog, "name", &base, NULL); + const gchar *base = gtk_buildable_get_name (GTK_BUILDABLE (dialog)); psppire_conf_set_window_geometry (conf, base, dialog); } @@ -358,7 +355,7 @@ 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); + g_object_set (dialog, "icon-name", "pspp", NULL); }