[gnome-commander] GnomeCmdSelectionProfileComponent: set profile.content_search only if text_pattern is not empty



commit 530433abffd373e693845397a19fd68a0a2974a7
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Jul 2 16:14:56 2011 +0200

    GnomeCmdSelectionProfileComponent: set profile.content_search only if text_pattern is not empty

 src/gnome-cmd-selection-profile-component.cc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-selection-profile-component.cc b/src/gnome-cmd-selection-profile-component.cc
index 7022e2f..b91548c 100755
--- a/src/gnome-cmd-selection-profile-component.cc
+++ b/src/gnome-cmd-selection-profile-component.cc
@@ -222,7 +222,7 @@ void GnomeCmdSelectionProfileComponent::copy()
     profile.syntax = (Filter::Type) gtk_combo_box_get_active (GTK_COMBO_BOX (priv->filter_type_combo));
     profile.max_depth = gtk_combo_box_get_active (GTK_COMBO_BOX (priv->recurse_combo)) - 1;
     stringify(profile.text_pattern, gtk_combo_box_get_active_text (GTK_COMBO_BOX (priv->find_text_combo)));
-    profile.content_search = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->find_text_check));
+    profile.content_search = !profile.text_pattern.empty() && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->find_text_check));
 }
 
 
@@ -232,7 +232,7 @@ void GnomeCmdSelectionProfileComponent::copy(GnomeCmdData::Selection &profile)
     profile.syntax = (Filter::Type) gtk_combo_box_get_active (GTK_COMBO_BOX (priv->filter_type_combo));
     profile.max_depth = gtk_combo_box_get_active (GTK_COMBO_BOX (priv->recurse_combo)) - 1;
     stringify(profile.text_pattern, gtk_combo_box_get_active_text (GTK_COMBO_BOX (priv->find_text_combo)));
-    profile.content_search = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->find_text_check));
+    profile.content_search = !profile.text_pattern.empty() && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->find_text_check));
 }
 
 



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