[Gnucash-changes] Skipping a dialog permanently takes precedence over skipping it

David Hampton hampton at cvs.gnucash.org
Wed Jul 20 17:45:04 EDT 2005


Log Message:
-----------
Skipping a dialog permanently takes precedence over skipping it
temporarily.  Make sure to set only one flag per dialog.  Actually
wire up the callbacks.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash/src/gnome-utils:
        gnc-gui-query.c

Revision Data
-------------
Index: gnc-gui-query.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/gnome-utils/gnc-gui-query.c,v
retrieving revision 1.8.4.4
retrieving revision 1.8.4.5
diff -Lsrc/gnome-utils/gnc-gui-query.c -Lsrc/gnome-utils/gnc-gui-query.c -u -r1.8.4.4 -r1.8.4.5
--- src/gnome-utils/gnc-gui-query.c
+++ src/gnome-utils/gnc-gui-query.c
@@ -49,6 +49,7 @@
   other_button = gnc_glade_lookup_widget(GTK_WIDGET(togglebutton),
 					 "remember_one");
   gtk_widget_set_sensitive(other_button, !active);
+  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(other_button), FALSE);
 }
 
 
@@ -75,6 +76,8 @@
     /* Find the glade page layout */
     xml = gnc_glade_xml_new ("gnc-gui-query.glade", dialog_name);
     dialog = glade_xml_get_widget (xml, dialog_name);
+    glade_xml_signal_autoconnect_full(xml, gnc_glade_autoconnect_full_func,
+				      dialog);
 
     /* Insert the message. */
     label = glade_xml_get_widget (xml, "label");
@@ -108,11 +111,14 @@
 
     /* Save the answer? */
     checkbox = glade_xml_get_widget (xml, "remember_all");
-    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox)))
+    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox))) {
       gnc_gconf_set_int(GCONF_WARNINGS_PERM, gconf_key, response, NULL);
-    checkbox = glade_xml_get_widget (xml, "remember_one");
-    if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox)))
-      gnc_gconf_set_int(GCONF_WARNINGS_TEMP, gconf_key, response, NULL);
+    } else {
+      checkbox = glade_xml_get_widget (xml, "remember_one");
+      if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbox))) {
+	gnc_gconf_set_int(GCONF_WARNINGS_TEMP, gconf_key, response, NULL);
+      }
+    }
 
     gtk_widget_destroy(GTK_WIDGET(dialog));
     return response;


More information about the gnucash-changes mailing list