X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog.c;h=e7e0ad042daa1763ce2ff0c5b29242fcad56727d;hb=af57bc3d9e5bb15f9e6f786b32ca98f734129f5d;hp=6a6733d2f457897ae8e89dfb08e53053d4b5d18b;hpb=e589b646894ffc013ab5e57981c8ac07bce522dd;p=pspp diff --git a/src/ui/gui/psppire-dialog.c b/src/ui/gui/psppire-dialog.c index 6a6733d2f4..e7e0ad042d 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 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,8 +18,6 @@ #include #include -#include -#include #include "psppire-dialog.h" #include "psppire-buttonbox.h" #include "psppire-selector.h" @@ -213,7 +211,7 @@ psppire_dialog_class_init (PsppireDialogClass *class) g_param_spec_enum ("orientation", "Orientation", "Which way widgets are packed", - G_TYPE_PSPPIRE_ORIENTATION, + PSPPIRE_TYPE_ORIENTATION, PSPPIRE_HORIZONTAL /* default value */, G_PARAM_CONSTRUCT_ONLY |G_PARAM_READWRITE); @@ -296,16 +294,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)) + 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, event); + psppire_conf_save_window_geometry (conf, base, GTK_WINDOW (dialog)); return FALSE; } @@ -316,9 +314,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 +477,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) { @@ -513,7 +509,9 @@ psppire_dialog_run (PsppireDialog *dialog) g_signal_emit (dialog, signals [DIALOG_REFRESH], 0); + gdk_threads_leave (); g_main_loop_run (dialog->loop); + gdk_threads_enter (); g_main_loop_unref (dialog->loop);