r20649 - gnucash/trunk/src/gnome-search - Bug #602052: Fix text search options with small revisions for usability

Christian Stimming cstim at code.gnucash.org
Sun May 15 15:28:26 EDT 2011


Author: cstim
Date: 2011-05-15 15:28:26 -0400 (Sun, 15 May 2011)
New Revision: 20649
Trac: http://svn.gnucash.org/trac/changeset/20649

Modified:
   gnucash/trunk/src/gnome-search/search-string.c
Log:
Bug #602052: Fix text search options with small revisions for usability

Patch by Leigh Honeywell:

Revised patch to change the search case insensitive to a checkbox

This should work better - it now defaults to off, and is captioned "Match case"
instead of "Case Insensitive?" which I think is clearer.

Modified: gnucash/trunk/src/gnome-search/search-string.c
===================================================================
--- gnucash/trunk/src/gnome-search/search-string.c	2011-05-15 19:28:16 UTC (rev 20648)
+++ gnucash/trunk/src/gnome-search/search-string.c	2011-05-15 19:28:26 UTC (rev 20649)
@@ -241,7 +241,7 @@
 static void
 toggle_changed (GtkToggleButton *button, GNCSearchString *fe)
 {
-    fe->ign_case = gtk_toggle_button_get_active (button);
+    fe->ign_case = !gtk_toggle_button_get_active (button);
 }
 
 static void
@@ -325,9 +325,8 @@
     gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 3);
     priv->entry = entry;
 
-    /* Build and connect the toggle button */
-    toggle = gtk_toggle_button_new_with_label (_("Case Insensitive?"));
-    gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (toggle), fi->ign_case);
+    /* Build and connect the case-sensitive check button; defaults to off */
+    toggle = gtk_check_button_new_with_label (_("Match case"));
     g_signal_connect (G_OBJECT(toggle), "toggled", G_CALLBACK (toggle_changed), fe);
     gtk_box_pack_start (GTK_BOX (box), toggle, FALSE, FALSE, 3);
 



More information about the gnucash-changes mailing list