[gnome-commander] GnomeCmdData: add description() method for accessing Profile and Selection details



commit 786e0443da62b86c2377d6460584632773799ddb
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Mon Jun 20 23:32:02 2011 +0200

    GnomeCmdData: add description() method for accessing Profile and Selection details

 src/dialogs/gnome-cmd-manage-profiles-dialog.h |    6 +++---
 src/gnome-cmd-data.h                           |   10 ++++++----
 2 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/dialogs/gnome-cmd-manage-profiles-dialog.h b/src/dialogs/gnome-cmd-manage-profiles-dialog.h
index 55dffe5..ca09860 100644
--- a/src/dialogs/gnome-cmd-manage-profiles-dialog.h
+++ b/src/dialogs/gnome-cmd-manage-profiles-dialog.h
@@ -73,7 +73,7 @@ namespace GnomeCmd
         gtk_list_store_set (GTK_LIST_STORE (model), &i,
                             COL_PROFILE_IDX, idx,
                             COL_NAME, p.name.c_str(),
-                            COL_TEMPLATE, p.template_string.c_str(),
+                            COL_TEMPLATE, p.description().c_str(),
                             -1);
 
         GtkTreePath *path = gtk_tree_model_get_path (model, &i);
@@ -98,7 +98,7 @@ namespace GnomeCmd
             gtk_list_store_set (store, &i,
                                 COL_PROFILE_IDX, p-profiles.begin(),
                                 COL_NAME, p->name.c_str(),
-                                COL_TEMPLATE, p->template_string.c_str(),
+                                COL_TEMPLATE, p->description().c_str(),
                                 -1);
         }
 
@@ -233,7 +233,7 @@ namespace GnomeCmd
 
                 gtk_list_store_set (GTK_LIST_STORE (model), &i,
                                     COL_NAME, p.name.c_str(),
-                                    COL_TEMPLATE, p.template_string.c_str(),
+                                    COL_TEMPLATE, p.description().c_str(),
                                     -1);
             }
         }
diff --git a/src/gnome-cmd-data.h b/src/gnome-cmd-data.h
index 41fda31..41660b7 100644
--- a/src/gnome-cmd-data.h
+++ b/src/gnome-cmd-data.h
@@ -75,10 +75,11 @@ struct GnomeCmdData
         gboolean content_search;
         gboolean match_case;
 
-        void reset();
-
         Selection(): syntax(Filter::TYPE_REGEX), max_depth(-1), content_search(FALSE), match_case(FALSE)       {}
 
+        const std::string &description() const    {  return filename_pattern;  }
+        void reset();
+
         friend XML::xstream &operator << (XML::xstream &xml, Selection &cfg);
     };
 
@@ -113,11 +114,12 @@ struct GnomeCmdData
             guint case_conversion;
             guint trim_blanks;
 
-            void reset();
-
             Profile(): template_string("$N"),
                        counter_start(1), counter_width(1), counter_step(1),
                        case_conversion(0), trim_blanks(3)                     {}
+
+            const std::string &description() const {  return template_string;  }
+            void reset();
         };
 
         gint width, height;



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