X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-dialog.c;h=4fcda9a0b672d72a98ef0e2b308a4cd8a1ae897b;hb=bc30bc5e0a4d8bdfc56e43ccd1403c070a71dec8;hp=f3703993b5bbb59e0e64483c69871a732adce7aa;hpb=58c762effe6bbe1ee418b57a1f461bbd33173bd2;p=pspp diff --git a/src/ui/gui/psppire-dialog.c b/src/ui/gui/psppire-dialog.c index f3703993b5..4fcda9a0b6 100644 --- a/src/ui/gui/psppire-dialog.c +++ b/src/ui/gui/psppire-dialog.c @@ -152,8 +152,8 @@ psppire_dialog_class_init (PsppireDialogClass *class) GParamSpec *sliding_spec ; GParamSpec *help_page_spec ; - help_page_spec = - g_param_spec_string ("help-page", + help_page_spec = + g_param_spec_string ("help-page", "Help Page", "The section of the manual to load when the Help button is clicked", NULL, @@ -296,13 +296,6 @@ psppire_dialog_notify_change (PsppireDialog *dialog) } -static void -remove_notify_handlers (PsppireDialog *dialog, GObject *sel) -{ - g_signal_handlers_disconnect_by_data (sel, dialog); -} - - /* Descend the widget tree, connecting appropriate signals to the psppire_dialog_notify_change callback */ static void @@ -341,6 +334,8 @@ connect_notify_signal (GtkWidget *w, gpointer data) g_signal_connect_swapped (w, "de-selected", G_CALLBACK (psppire_dialog_notify_change), dialog); + + psppire_selector_update_subjects (PSPPIRE_SELECTOR (w)); } if ( GTK_IS_EDITABLE (w)) @@ -389,10 +384,8 @@ connect_notify_signal (GtkWidget *w, gpointer data) G_CALLBACK (psppire_dialog_notify_change), dialog); - g_signal_connect (dialog, "destroy", G_CALLBACK (remove_notify_handlers), - model); } - + g_signal_connect_swapped (selection, "changed", G_CALLBACK (psppire_dialog_notify_change), dialog); @@ -422,24 +415,18 @@ psppire_dialog_run (PsppireDialog *dialog) if (title == NULL) g_warning ("PsppireDialog %s has no title", gtk_widget_get_name (GTK_WIDGET (dialog))); - + if ( dialog->contents_are_valid != NULL ) - gtk_container_foreach (gtk_bin_get_child(GTK_BIN(dialog)), + gtk_container_foreach (GTK_CONTAINER (gtk_bin_get_child(GTK_BIN(dialog))), connect_notify_signal, dialog); dialog->loop = g_main_loop_new (NULL, FALSE); gtk_widget_show (GTK_WIDGET (dialog)); + psppire_dialog_notify_change (dialog); - if ( dialog->contents_are_valid != NULL) - g_signal_emit (dialog, signals [VALIDITY_CHANGED], 0, FALSE); - - 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);