[gnome-commander] GnomeCmdData: simplify code for history handling
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] GnomeCmdData: simplify code for history handling
- Date: Fri, 10 Jun 2011 17:30:27 +0000 (UTC)
commit a52ee558b33d684e8810700e819ac81e0352fcc3
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Fri Jun 10 19:25:17 2011 +0200
GnomeCmdData: simplify code for history handling
src/gnome-cmd-data.cc | 27 +++++----------------------
1 files changed, 5 insertions(+), 22 deletions(-)
---
diff --git a/src/gnome-cmd-data.cc b/src/gnome-cmd-data.cc
index 0f85cc1..6f03f54 100644
--- a/src/gnome-cmd-data.cc
+++ b/src/gnome-cmd-data.cc
@@ -782,15 +782,8 @@ inline void GnomeCmdData::load_cmdline_history()
inline void GnomeCmdData::load_search_defaults()
{
- GList *list = NULL;
-
- 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/content_pattern%d", -1);
- search_defaults.content_patterns.ents = list;
- search_defaults.content_patterns.pos = list;
-
+ search_defaults.name_patterns = load_string_history ("/search-history/name_pattern%d", -1);
+ search_defaults.content_patterns = load_string_history ("/search-history/content_pattern%d", -1);
search_defaults.width = gnome_cmd_data_get_int ("/search-history/width", 640);
search_defaults.height = gnome_cmd_data_get_int ("/search-history/height", 400);
search_defaults.default_profile.max_depth = gnome_cmd_data_get_bool ("/search-history/recursive", TRUE) ? -1 : 0;
@@ -800,15 +793,8 @@ inline void GnomeCmdData::load_search_defaults()
inline void GnomeCmdData::load_intviewer_defaults()
{
- GList *list = NULL;
-
- list = load_string_history ("/internal_viewer/text_pattern%d", -1);
- intviewer_defaults.text_patterns.ents = list;
- intviewer_defaults.text_patterns.pos = list;
- list = load_string_history ("/internal_viewer/hex_pattern%d", -1);
- intviewer_defaults.hex_patterns.ents = list;
- intviewer_defaults.hex_patterns.pos = list;
-
+ intviewer_defaults.text_patterns = load_string_history ("/internal_viewer/text_pattern%d", -1);
+ intviewer_defaults.hex_patterns.ents = load_string_history ("/internal_viewer/hex_pattern%d", -1);
intviewer_defaults.case_sensitive = gnome_cmd_data_get_bool ("/internal_viewer/case_sens", FALSE);
intviewer_defaults.search_mode = gnome_cmd_data_get_int ("/internal_viewer/last_mode", 0);
}
@@ -823,10 +809,7 @@ inline void GnomeCmdData::load_rename_history()
advrename_defaults.height = gnome_cmd_data_get_int ("/advrename/height", 400);
size = gnome_cmd_data_get_int ("/template-history/size", 0);
- GList *templates = load_string_history ("/template-history/template%d", size);
-
- advrename_defaults.templates.ents = templates;
- advrename_defaults.templates.pos = templates;
+ advrename_defaults.templates = load_string_history ("/template-history/template%d", size);
advrename_defaults.default_profile.counter_start = gnome_cmd_data_get_int ("/advrename/counter_start", 1);
advrename_defaults.default_profile.counter_width = gnome_cmd_data_get_int ("/advrename/counter_precision", 1);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]