[anjuta] search: Allow empty replace text



commit da570c88d1ddc5c0dad1c351179b86f400854f6f
Author: Arnel A. Borja <kyoushuu yahoo com>
Date:   Sun Oct 23 14:06:23 2011 +0800

    search: Allow empty replace text

 plugins/document-manager/search-box.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/plugins/document-manager/search-box.c b/plugins/document-manager/search-box.c
index 3440e31..8dbdaf8 100644
--- a/plugins/document-manager/search-box.c
+++ b/plugins/document-manager/search-box.c
@@ -844,9 +844,8 @@ on_replace_activated (GtkWidget* widget, SearchBox* search_box)
 	gboolean successful_replace;
 
 	SearchBoxPrivate* private = GET_PRIVATE(search_box);
-	const gchar* replace_text = gtk_entry_get_text (GTK_ENTRY (private->replace_entry));
 
-	if (!private->current_editor || !replace_text || !strlen (replace_text))
+	if (!private->current_editor)
 		return;
 
 	/* Either replace search-term or try to move search forward to next occurence */
@@ -903,11 +902,10 @@ on_replace_all_activated (GtkWidget* widget, SearchBox* search_box)
 {
 
 	SearchBoxPrivate* private = GET_PRIVATE(search_box);
-	const gchar* replace_text = gtk_entry_get_text (GTK_ENTRY (private->replace_entry));
 
 	gboolean entry_found;
 
-	if (!private->current_editor || !replace_text || !strlen (replace_text))
+	if (!private->current_editor)
 		return;
 
 	/* Replace all instances of search_entry with replace_entry text */



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