Remove destroy signal handler for dialogs.
[pspp] / src / ui / gui / psppire-dialog.c
index 5726cc76a941df4f5751328a08fa41ea29794d59..43dd9af38d7d74d00d7d2c58e756bf55420e07c5 100644 (file)
@@ -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
@@ -389,8 +382,6 @@ 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",
@@ -422,7 +413,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 +422,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);