[gnome-commander] Added "connections.change_left" and "connections.change_right" to user actions
- From: Piotr Eljasiak <epiotr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-commander] Added "connections.change_left" and "connections.change_right" to user actions
- Date: Sun, 3 Oct 2010 13:22:15 +0000 (UTC)
commit 1c8aba6bebfa1de52d6af9c535271e41aaccc433
Author: Piotr Eljasiak <epiotr src gnome org>
Date: Sun Oct 3 15:19:50 2010 +0200
Added "connections.change_left" and "connections.change_right" to user actions
NEWS | 2 +
doc/C/gnome-commander.xml | 42 +++++++++++++++++++++++++++++++++++++++-
doc/keys.txt | 2 +
src/gnome-cmd-main-win.cc | 18 -----------------
src/gnome-cmd-user-actions.cc | 34 +++++++++++++++++++++++++++++++++
src/gnome-cmd-user-actions.h | 2 +
6 files changed, 80 insertions(+), 20 deletions(-)
---
diff --git a/NEWS b/NEWS
index 06c138c..acdbe00 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,8 @@ New features:
CTRL+SHIFT+W Close all tabs
CTRL+TAB Switch to the next tab
CTRL+SHIFT+TAB Switch to the previous tab
+ SUPER+1 Change left connection
+ SUPER+2 Change right connection
===================================
diff --git a/doc/C/gnome-commander.xml b/doc/C/gnome-commander.xml
index 9a5ee66..31609ba 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -5402,12 +5402,12 @@
<row valign="top">
<entry><para><keycombo><keycap>ALT</keycap><keycap>1</keycap></keycombo></para></entry>
<entry><para>Change left connection</para></entry>
- <entry><para></para></entry>
+ <entry><para>yes</para></entry>
</row>
<row valign="top">
<entry><para><keycombo><keycap>ALT</keycap><keycap>2</keycap></keycombo></para></entry>
<entry><para>Change right connection</para></entry>
- <entry><para></para></entry>
+ <entry><para>yes</para></entry>
</row>
<row valign="top">
<entry><para></para></entry>
@@ -5510,6 +5510,26 @@
<entry><para></para></entry>
</row>
<row valign="top">
+ <entry><para><keycombo><keycap>SUPER</keycap><keycap>1</keycap></keycombo></para></entry>
+ <entry><para>Change left connection</para></entry>
+ <entry><para>yes</para></entry>
+ </row>
+ <row valign="top">
+ <entry><para><keycombo><keycap>SUPER</keycap><keycap>2</keycap></keycombo></para></entry>
+ <entry><para>Change right connection</para></entry>
+ <entry><para>yes</para></entry>
+ </row>
+ <row valign="top">
+ <entry><para><keycombo><keycap>SUPER</keycap><keycap>F</keycap></keycombo></para></entry>
+ <entry><para>Search files</para></entry>
+ <entry><para>yes</para></entry>
+ </row>
+ <row valign="top">
+ <entry><para></para></entry>
+ <entry><para></para></entry>
+ <entry><para></para></entry>
+ </row>
+ <row valign="top">
<entry><keycombo><keycap>=</keycap></keycombo></entry>
<entry><para>Select files using a pattern</para></entry>
<entry><para>yes</para></entry>
@@ -6057,6 +6077,18 @@
<entry><para><keycombo><keycap>CTRL</keycap><keycap>N</keycap></keycombo></para></entry>
</row>
<row valign="top">
+ <entry><para>connections.change_left</para></entry>
+ <entry><para>Change left connection</para></entry>
+ <entry><para><keycombo><keycap>ALT</keycap><keycap>1</keycap></keycombo></para>
+ <para><keycombo><keycap>SUPER</keycap><keycap>1</keycap></keycombo></para></entry>
+ </row>
+ <row valign="top">
+ <entry><para>connections.change_right</para></entry>
+ <entry><para>Change right connection</para></entry>
+ <entry><para><keycombo><keycap>ALT</keycap><keycap>2</keycap></keycombo></para>
+ <para><keycombo><keycap>SUPER</keycap><keycap>2</keycap></keycombo></para></entry>
+ </row>
+ <row valign="top">
<entry><para>edit.copy</para></entry>
<entry><para>Copy files to clipboard (not a global one yet)</para></entry>
<entry><para></para></entry>
@@ -7422,6 +7454,12 @@
<listitem>
<para><keycombo><keycap>CTRL</keycap><keycap>SHIFT</keycap><keycap>TAB</keycap></keycombo> Switch to the previous tab</para>
</listitem>
+ <listitem>
+ <para><keycombo><keycap>SUPER</keycap><keycap>1</keycap></keycombo> Change left connection</para>
+ </listitem>
+ <listitem>
+ <para><keycombo><keycap>SUPER</keycap><keycap>2</keycap></keycombo> Change right connection</para>
+ </listitem>
</itemizedlist>
</listitem>
</itemizedlist>
diff --git a/doc/keys.txt b/doc/keys.txt
index d2b3e45..d95b430 100644
--- a/doc/keys.txt
+++ b/doc/keys.txt
@@ -14,6 +14,8 @@ F10 Quit
ALT+1 Change left connection
ALT+2 Change right connection
+SUPER+1 Change left connection
+SUPER+2 Change right connection
ALT+F3 View with external viewer
ALT+F7 Search
diff --git a/src/gnome-cmd-main-win.cc b/src/gnome-cmd-main-win.cc
index 53fb367..9ec9af6 100644
--- a/src/gnome-cmd-main-win.cc
+++ b/src/gnome-cmd-main-win.cc
@@ -956,24 +956,6 @@ gboolean GnomeCmdMainWin::key_pressed(GdkEventKey *event)
{
switch (event->keyval)
{
- case GDK_1:
- {
- GnomeCmdFileSelector *fs = this->fs(LEFT);
- switch_fs(fs);
- if (gnome_cmd_data.concombo_visibility)
- fs->con_combo->popup_list();
- }
- return TRUE;
-
- case GDK_2:
- {
- GnomeCmdFileSelector *fs = this->fs(RIGHT);
- switch_fs(fs);
- if (gnome_cmd_data.concombo_visibility)
- fs->con_combo->popup_list();
- }
- return TRUE;
-
case GDK_F8:
if (gnome_cmd_data.cmdline_visibility)
gnome_cmd_cmdline_show_history (GNOME_CMD_CMDLINE (priv->cmdline));
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 485e8ee..85a1df6 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -147,6 +147,8 @@ static UserActionData user_actions_data[] = {
{connections_close_current, "connections.close", N_("Close connection")},
{connections_new, "connections.new", N_("New connection")},
{connections_open, "connections.open", N_("Open connection")},
+ {connections_change_left, "connections.change_left", N_("Change left connection")},
+ {connections_change_right, "connections.change_right", N_("Change right connection")},
{edit_cap_copy, "edit.copy", N_("Copy")},
{edit_copy_fnames, "edit.copy_filenames", N_("Copy file names")},
{edit_cap_cut, "edit.cut", N_("Cut")},
@@ -254,6 +256,26 @@ void GnomeCmdUserActions::init()
if (!registered("connections.close"))
register_action(GDK_CONTROL_MASK | GDK_SHIFT_MASK, GDK_F, "connections.close");
+ if (!registered("connections.change_left"))
+ {
+ register_action(GDK_MOD1_MASK, GDK_1, "connections.change_left");
+#if GTK_CHECK_VERSION (2, 10, 0)
+ register_action(GDK_SUPER_MASK, GDK_1, "connections.change_left");
+#else
+ register_action(GDK_MOD4_MASK, GDK_1, "connections.change_left");
+#endif
+ }
+
+ if (!registered("connections.change_right"))
+ {
+ register_action(GDK_MOD1_MASK, GDK_2, "connections.change_right");
+#if GTK_CHECK_VERSION (2, 10, 0)
+ register_action(GDK_SUPER_MASK, GDK_2, "connections.change_right");
+#else
+ register_action(GDK_MOD4_MASK, GDK_2, "connections.change_right");
+#endif
+ }
+
if (!registered("edit.copy_filenames"))
register_action(GDK_CONTROL_MASK | GDK_SHIFT_MASK, GDK_C, "edit.copy_filenames");
@@ -1608,6 +1630,18 @@ void connections_change (GtkMenuItem *menuitem, gpointer con) // this
}
+void connections_change_left (GtkMenuItem *menuitem, gpointer con)
+{
+ main_win->change_connection(LEFT);
+}
+
+
+void connections_change_right (GtkMenuItem *menuitem, gpointer con)
+{
+ main_win->change_connection(RIGHT);
+}
+
+
void connections_close (GtkMenuItem *menuitem, gpointer con) // this function is NOT exposed to user as UserAction
{
GnomeCmdFileSelector *active = get_fs (ACTIVE);
diff --git a/src/gnome-cmd-user-actions.h b/src/gnome-cmd-user-actions.h
index 7187d76..db7932b 100644
--- a/src/gnome-cmd-user-actions.h
+++ b/src/gnome-cmd-user-actions.h
@@ -317,6 +317,8 @@ GNOME_CMD_USER_ACTION(options_edit_shortcuts);
GNOME_CMD_USER_ACTION(connections_open);
GNOME_CMD_USER_ACTION(connections_new);
GNOME_CMD_USER_ACTION(connections_change); // this function is NOT exposed to user as UserAction
+GNOME_CMD_USER_ACTION(connections_change_left);
+GNOME_CMD_USER_ACTION(connections_change_right);
GNOME_CMD_USER_ACTION(connections_close); // this function is NOT exposed to user as UserAction
GNOME_CMD_USER_ACTION(connections_close_current);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]