[anjuta] document-manager: Make sure replacing works case-insensitive



commit df608ad54bd1f41fc3d2fd3e17d3f3c2a207fdbb
Author: Johannes Schmid <jhs gnome org>
Date:   Sun Mar 20 19:15:44 2011 -0400

    document-manager: Make sure replacing works case-insensitive
    
    Due to a g_str_equal() that was case-sensitive blocked replacement even if case-sensitivity was off.

 plugins/document-manager/search-box.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/plugins/document-manager/search-box.c b/plugins/document-manager/search-box.c
index 8d24356..406d50e 100644
--- a/plugins/document-manager/search-box.c
+++ b/plugins/document-manager/search-box.c
@@ -816,7 +816,8 @@ on_search_box_replace (GtkWidget * widget, SearchBox * search_box)
 					g_free(replacement_text);
 			}
 		}
-		else if (g_str_equal (selection_text, search_text))
+		else if ((private->case_sensitive && g_str_equal (selection_text, search_text)) ||
+		         (!private->case_sensitive && strcasecmp (selection_text, search_text) == 0))
 		{
 			ianjuta_document_begin_undo_action (IANJUTA_DOCUMENT (selection), NULL);
 			ianjuta_editor_selection_replace (selection, replace_text, strlen(replace_text), NULL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]