gui: Fix Glib warnings for dialogs in realize and configure callbacks.
[pspp-builds.git] / src / ui / gui / psppire-dialog.c
index cea5134630c8483e095c365e95693b595fddb47e..977f08e67eef5cb3c52ce6cfa90c8e257686d869 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2007  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
@@ -296,16 +296,16 @@ 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))
     return FALSE;
 
-  g_object_get (dialog, "name", &base, NULL);
+  base = gtk_buildable_get_name (GTK_BUILDABLE (dialog));
 
-  psppire_conf_save_window_geometry (conf, base, event);
+  psppire_conf_save_window_geometry (conf, base, GTK_WINDOW (dialog));
 
   return FALSE;
 }
@@ -316,9 +316,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);
 }
@@ -481,7 +479,7 @@ connect_notify_signal (GtkWidget *w, gpointer data)
 
       while ((col = gtk_tree_view_get_column (tv, i++)))
        {
-         GList *renderers = gtk_tree_view_column_get_cell_renderers (col);
+         GList *renderers = gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (col));
          GList *start = renderers;
          while (renderers)
            {