[gnome-commander] tabs: start a new tab when CTRL+click/midclick on connection combo



commit 9bb6bca7141a3fdc59b6d91fb59d152560116f72
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Tue Jan 4 19:35:13 2011 +0100

    tabs: start a new tab when CTRL+click/midclick on connection combo

 src/gnome-cmd-file-selector.cc |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 0136040..106e0b4 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -311,7 +311,15 @@ static void on_con_combo_item_selected (GnomeCmdCombo *con_combo, GnomeCmdCon *c
     g_return_if_fail (GNOME_CMD_IS_CON (con));
 
     main_win->switch_fs(fs);
-    fs->set_connection(con);
+
+    GdkModifierType mask;
+
+    gdk_window_get_pointer (NULL, NULL, NULL, &mask);
+
+    if (mask & GDK_CONTROL_MASK)
+        fs->new_tab(gnome_cmd_con_get_default_dir (con));
+    else
+        fs->set_connection(con);
 }
 
 



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