PsppireDataSheet.c: Indicate filtered out cases in the row headers
[pspp] / src / ui / gui / psppire-dialog.c
index 5726cc76a941df4f5751328a08fa41ea29794d59..4fcda9a0b672d72a98ef0e2b308a4cd8a1ae897b 100644 (file)
@@ -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,7 +415,7 @@ 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_CONTAINER (gtk_bin_get_child(GTK_BIN(dialog))),
                           connect_notify_signal,
@@ -431,11 +424,7 @@ psppire_dialog_run (PsppireDialog *dialog)
   dialog->loop = g_main_loop_new (NULL, FALSE);
 
   gtk_widget_show (GTK_WIDGET (dialog));
-
-  if ( dialog->contents_are_valid != NULL)
-    g_signal_emit (dialog, signals [VALIDITY_CHANGED], 0, FALSE);
-
-  g_signal_emit (dialog, signals [DIALOG_REFRESH], 0);
+  psppire_dialog_notify_change (dialog);
 
   g_main_loop_run (dialog->loop);