[gnome-commander] tab lock: open new tab for CTRL+~ (view.home)



commit e6b9356c231de45b470386e7d4a805366b34c840
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Sat Feb 26 22:27:05 2011 +0100

    tab lock: open new tab for CTRL+~ (view.home)

 src/gnome-cmd-user-actions.cc |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index b9fec4b..334cafd 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -1500,8 +1500,16 @@ void view_in_inactive_pane (GtkMenuItem *menuitem, gpointer not_used)
 
 void view_home (GtkMenuItem *menuitem, gpointer not_used)
 {
-    get_fl (ACTIVE)->set_connection(get_home_con ());
-    get_fl (ACTIVE)->goto_directory("~");
+    GnomeCmdFileSelector *fs = get_fs (ACTIVE);
+    GnomeCmdFileList *fl = fs->file_list();
+
+    if (!fl->locked)
+    {
+        fl->set_connection(get_home_con ());
+        fl->goto_directory("~");
+    }
+    else
+        fs->new_tab(gnome_cmd_dir_new (get_home_con (), gnome_cmd_con_create_path (get_home_con (), g_get_home_dir ())));
 }
 
 



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