[gnome-commander] GnomeCmdFileSelector: added new_tab(dir, sort_col, sort_order, activate) for setting sort params at



commit ca719beaccd132a643dedb555587072da60aa350
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sun Jul 18 13:57:42 2010 +0200

    GnomeCmdFileSelector: added new_tab(dir, sort_col, sort_order, activate) for setting sort params at tab creation time

 src/gnome-cmd-file-selector.cc |    2 +-
 src/gnome-cmd-file-selector.h  |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 72c867e..0996d19 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1305,7 +1305,7 @@ gboolean GnomeCmdFileSelector::is_active()
 }
 
 
-GtkWidget *GnomeCmdFileSelector::new_tab(GnomeCmdDir *dir, gboolean activate)
+GtkWidget *GnomeCmdFileSelector::new_tab(GnomeCmdDir *dir, GnomeCmdFileList::ColumnID sort_col, GtkSortType sort_order, gboolean activate)
 {
     // create the list
     GnomeCmdFileList *list = new GnomeCmdFileList;
diff --git a/src/gnome-cmd-file-selector.h b/src/gnome-cmd-file-selector.h
index 31958a3..be42447 100644
--- a/src/gnome-cmd-file-selector.h
+++ b/src/gnome-cmd-file-selector.h
@@ -94,6 +94,7 @@ struct GnomeCmdFileSelector
     gboolean is_active();
 
     GtkWidget *new_tab(GnomeCmdDir *dir=NULL, gboolean activate=TRUE);
+    GtkWidget *new_tab(GnomeCmdDir *dir, GnomeCmdFileList::ColumnID sort_col, GtkSortType sort_order, gboolean activate=TRUE);
     void close_tab()                        {  if (notebook->size()>1)  notebook->remove_page();   }
     void close_tab(gint n)                  {  if (notebook->size()>1)  notebook->remove_page(n);  }
 
@@ -122,6 +123,11 @@ inline void GnomeCmdFileSelector::set_connection(GnomeCmdCon *con, GnomeCmdDir *
     file_list()->set_connection(con, start_dir);
 }
 
+inline GtkWidget *GnomeCmdFileSelector::new_tab(GnomeCmdDir *dir, gboolean activate)
+{
+    return new_tab(dir, GnomeCmdFileList::COLUMN_NAME, GTK_SORT_ASCENDING, activate);
+}
+
 GtkType gnome_cmd_file_selector_get_type ();
 GtkWidget *gnome_cmd_file_selector_new ();
 



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