[anjuta/gnome-3-2] search: Allow empty replace text
- From: Johannes Schmid <jhs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta/gnome-3-2] search: Allow empty replace text
- Date: Sun, 23 Oct 2011 22:02:36 +0000 (UTC)
commit 0a6ab4af3ec2b2d656c6a8f27e9d2a6e4e80d6d2
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 d1f6a7c..8e7f1c4 100644
--- a/plugins/document-manager/search-box.c
+++ b/plugins/document-manager/search-box.c
@@ -840,9 +840,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 */
@@ -899,11 +898,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]