From 175bfb3132d538298cc04d9f54b9076704d76c6d Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Sun, 15 May 2011 19:28:26 +0000 Subject: [PATCH] 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. git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20649 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/gnome-search/search-string.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/gnome-search/search-string.c b/src/gnome-search/search-string.c index 663a790611..4b18d87e1c 100644 --- a/src/gnome-search/search-string.c +++ b/src/gnome-search/search-string.c @@ -241,7 +241,7 @@ gncs_validate (GNCSearchCoreType *fe) 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 @@ gncs_get_widget (GNCSearchCoreType *fe) 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);