[gnome-commander] GnomeCmdData: use gnome_cmd_data.search_defaults.default_profile.content_search for storing content



commit af3498d9dccf21fbd200e87afbf5209e0357f074
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Fri Jun 3 19:13:25 2011 +0200

    GnomeCmdData: use gnome_cmd_data.search_defaults.default_profile.content_search for storing content search cfg

 src/gnome-cmd-data.cc       |    3 ++-
 src/gnome-cmd-data.h        |    3 ++-
 src/gnome-cmd-xml-config.cc |    2 ++
 3 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index dc97d85..0f85cc1 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -83,6 +83,7 @@ void GnomeCmdData::Selection::reset()
     syntax = Filter::TYPE_REGEX;
     max_depth = -1;
     text_pattern.clear();
+    content_search = FALSE;
     match_case = FALSE;
 }
 
@@ -1987,7 +1988,7 @@ XML::xstream &operator << (XML::xstream &xml, GnomeCmdData::Selection &cfg)
         xml << XML::tag("Pattern") << XML::attr("syntax") << (cfg.syntax==Filter::TYPE_REGEX ? "regex" : "shell")
                                    << XML::attr("match-case") << 0 << XML::chardata() << XML::escape(cfg.filename_pattern) << XML::endtag();
         xml << XML::tag("Subdirectories") << XML::attr("max-depth") << cfg.max_depth << XML::endtag();
-        xml << XML::tag("Text") << XML::attr("match-case") << cfg.match_case << XML::chardata() << XML::escape(cfg.text_pattern) << XML::endtag();
+        xml << XML::tag("Text") << XML::attr("content-search") << cfg.content_search << XML::attr("match-case") << cfg.match_case << XML::chardata() << XML::escape(cfg.text_pattern) << XML::endtag();
 
     xml << XML::endtag();
 
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 5059477..1045890 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -72,11 +72,12 @@ struct GnomeCmdData
         Filter::Type syntax;
         int max_depth;
         std::string text_pattern;
+        gboolean content_search;
         gboolean match_case;
 
         void reset();
 
-        Selection(): syntax(Filter::TYPE_REGEX), max_depth(-1), match_case(FALSE)       {}
+        Selection(): syntax(Filter::TYPE_REGEX), max_depth(-1), content_search(FALSE), match_case(FALSE)       {}
 
         friend XML::xstream &operator << (XML::xstream &xml, Selection &cfg);
     };
diff --git a/src/gnome-cmd-xml-config.cc b/src/gnome-cmd-xml-config.cc
index 6d3468b..eb22e62 100644
--- a/src/gnome-cmd-xml-config.cc
+++ b/src/gnome-cmd-xml-config.cc
@@ -599,8 +599,10 @@ static void xml_start(GMarkupParseContext *context,
         case XML_GNOMECOMMANDER_SELECTIONS_PROFILE_TEXT:
             if (g_markup_collect_attributes (element_name, attribute_names, attribute_values, error,
                                              G_MARKUP_COLLECT_BOOLEAN, "match-case", &param4,
+                                             G_MARKUP_COLLECT_BOOLEAN | G_MARKUP_COLLECT_OPTIONAL, "content-search", &param5,
                                              G_MARKUP_COLLECT_INVALID))
                 xml_search_profile.match_case = param4;
+                xml_search_profile.content_search = param5;
             break;
 
         case XML_GNOMECOMMANDER_KEYBINDINGS_KEY:



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