[gnome-commander] XML config: remove history for searched paths, as those are not used any more



commit 96a78a4203f80917bc8108bbdab1c38eab359d36
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon May 2 19:46:58 2011 +0200

    XML config: remove history for searched paths, as those are not used any more

 src/gnome-cmd-data.cc       |    6 ------
 src/gnome-cmd-data.h        |    8 ++------
 src/gnome-cmd-xml-config.cc |    7 -------
 3 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 0cba01f..5512af6 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -786,9 +786,6 @@ inline void GnomeCmdData::load_search_defaults()
     list = load_string_history ("/search-history/name_pattern%d", -1);
     search_defaults.name_patterns.ents = list;
     search_defaults.name_patterns.pos = list;
-    list = load_string_history ("/search-history/directory%d", -1);
-    search_defaults.directories.ents = list;
-    search_defaults.directories.pos = list;
     list = load_string_history ("/search-history/content_pattern%d", -1);
     search_defaults.content_patterns.ents = list;
     search_defaults.content_patterns.pos = list;
@@ -2003,9 +2000,6 @@ XML::xstream &operator << (XML::xstream &xml, GnomeCmdData::SearchConfig &cfg)
         for (GList *i=cfg.name_patterns.ents; i; i=i->next)
             xml << XML::tag("Pattern") << XML::chardata() << XML::escape((const gchar *) i->data) << XML::endtag();
 
-        for (GList *i=cfg.directories.ents; i; i=i->next)
-            xml << XML::tag("Path") << XML::chardata() << XML::escape((const gchar *) i->data) << XML::endtag();
-
         for (GList *i=cfg.content_patterns.ents; i; i=i->next)
             xml << XML::tag("Text") << XML::chardata() << XML::escape((const gchar *) i->data) << XML::endtag();
 
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index e0313cd..2ea809e 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -55,7 +55,7 @@ struct GnomeCmdData
         RIGHT_BUTTON_POPUPS_MENU,
         RIGHT_BUTTON_SELECTS
     };
-    
+
     enum TabLockIndicator
     {
         TAB_LOCK_ICON,
@@ -90,13 +90,9 @@ struct GnomeCmdData
         Selection default_profile;
 
         History name_patterns;
-        History directories;
         History content_patterns;
 
-        SearchConfig(): width(600), height(400),
-                        name_patterns(SEARCH_HISTORY_SIZE),
-                        directories(SEARCH_HISTORY_SIZE),
-                        content_patterns(SEARCH_HISTORY_SIZE)   {  default_profile.name = "Default";  }
+        SearchConfig(): width(600), height(400), name_patterns(SEARCH_HISTORY_SIZE), content_patterns(SEARCH_HISTORY_SIZE)   {  default_profile.name = "Default";  }
 
         friend XML::xstream &operator << (XML::xstream &xml, SearchConfig &cfg);
     };
diff --git a/src/gnome-cmd-xml-config.cc b/src/gnome-cmd-xml-config.cc
index ff96295..6606211 100644
--- a/src/gnome-cmd-xml-config.cc
+++ b/src/gnome-cmd-xml-config.cc
@@ -355,7 +355,6 @@ enum {XML_ELEM_NOT_FOUND,
       XML_GNOMECOMMANDER_SEARCHTOOL_PROFILE_TEXT,
       XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY,
       XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY_PATTERN,
-      XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY_PATH,
       XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY_TEXT,
       XML_GNOMECOMMANDER_BOOKMARKSTOOL,
       XML_GNOMECOMMANDER_BOOKMARKSTOOL_WINDOWSIZE,
@@ -699,7 +698,6 @@ static void xml_end (GMarkupParseContext *context,
 
         case XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY:
             cfg->search_defaults.name_patterns.reverse();
-            cfg->search_defaults.directories.reverse();
             cfg->search_defaults.content_patterns.reverse();
             break;
 
@@ -748,10 +746,6 @@ static void xml_end (GMarkupParseContext *context,
             cfg->search_defaults.name_patterns.add(text);
             break;
 
-        case XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY_PATH:
-            cfg->search_defaults.directories.add(text);
-            break;
-
         case XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY_TEXT:
             cfg->search_defaults.content_patterns.add(text);
             break;
@@ -797,7 +791,6 @@ gboolean gnome_cmd_xml_config_parse (const gchar *xml, gsize xml_len, GnomeCmdDa
                         {XML_GNOMECOMMANDER_SEARCHTOOL_PROFILE_TEXT, "/GnomeCommander/SearchTool/Profile/Text"},
                         {XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY, "/GnomeCommander/SearchTool/History"},
                         {XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY_PATTERN, "/GnomeCommander/SearchTool/History/Pattern"},
-                        {XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY_PATH, "/GnomeCommander/SearchTool/History/Path"},
                         {XML_GNOMECOMMANDER_SEARCHTOOL_HISTORY_TEXT, "/GnomeCommander/SearchTool/History/Text"},
                         {XML_GNOMECOMMANDER_BOOKMARKSTOOL, "/GnomeCommander/BookmarksTool"},
                         {XML_GNOMECOMMANDER_BOOKMARKSTOOL_WINDOWSIZE, "/GnomeCommander/BookmarksTool/WindowSize"},



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