[gnome-commander] Add "view.directory" to user actions



commit 27f3c1b424ad072a4833eb95ab65f59b9517fb28
Author: Piotr Eljasiak <epiotr src gnome org>
Date:   Tue Jun 28 19:53:08 2011 +0200

    Add "view.directory" to user actions

 doc/C/gnome-commander.xml      |    7 ++++++-
 mkinstalldirs                  |    8 ++++++--
 src/gnome-cmd-file-selector.cc |    7 -------
 src/gnome-cmd-user-actions.cc  |   18 ++++++++++++++++++
 src/gnome-cmd-user-actions.h   |    1 +
 5 files changed, 31 insertions(+), 10 deletions(-)
---
diff --git a/doc/C/gnome-commander.xml b/doc/C/gnome-commander.xml
index 91eea19..2ee451e 100644
--- a/doc/C/gnome-commander.xml
+++ b/doc/C/gnome-commander.xml
@@ -5793,7 +5793,7 @@
         <row valign="top">
             <entry><para><keycombo><keycap>CTRL</keycap><keycap>PageDown</keycap></keycombo></para></entry>
             <entry><para>Change directory</para></entry>
-            <entry><para></para></entry>
+            <entry><para>yes</para></entry>
         </row>
         <row valign="top">
             <entry><para></para></entry>
@@ -6510,6 +6510,11 @@
                         <entry><para></para></entry>
                     </row>
                     <row valign="top">
+                        <entry><para>view.directory</para></entry>
+                        <entry><para>Change directory</para></entry>
+                        <entry><para><keycombo><keycap>CTRL</keycap><keycap>PageDown</keycap></keycombo></para></entry>
+                    </row>
+                    <row valign="top">
                         <entry><para>view.equal_panes</para></entry>
                         <entry><para>Set equal panes (50/50)</para></entry>
                         <entry><para><keycombo><keycap>CTRL</keycap><keycap>SHIFT</keycap><keycap>=</keycap></keycombo></para></entry>
diff --git a/mkinstalldirs b/mkinstalldirs
old mode 100644
new mode 100755
index 259dbfc..4191a45
--- a/mkinstalldirs
+++ b/mkinstalldirs
@@ -1,7 +1,7 @@
 #! /bin/sh
 # mkinstalldirs --- make directory hierarchy
 
-scriptversion=2005-06-29.22
+scriptversion=2009-04-28.21; # UTC
 
 # Original author: Noah Friedman <friedman prep ai mit edu>
 # Created: 1993-05-16
@@ -11,6 +11,9 @@ scriptversion=2005-06-29.22
 # bugs to <bug-automake gnu org> or send patches to
 # <automake-patches gnu org>.
 
+nl='
+'
+IFS=" ""	$nl"
 errstatus=0
 dirmode=
 
@@ -154,5 +157,6 @@ exit $errstatus
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-end: "$"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
 # End:
diff --git a/src/gnome-cmd-file-selector.cc b/src/gnome-cmd-file-selector.cc
index 854404c..f1575c9 100644
--- a/src/gnome-cmd-file-selector.cc
+++ b/src/gnome-cmd-file-selector.cc
@@ -1206,13 +1206,6 @@ gboolean GnomeCmdFileSelector::key_pressed(GdkEventKey *event)
                 add_cwd_to_cmdline (list);
                 return TRUE;
 
-            case GDK_Page_Down:
-            case GDK_KP_Page_Down:
-                f = list->get_selected_file();
-                if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
-                    do_file_specific_action (list, f);
-                return TRUE;
-
             case GDK_Tab:
                 view_next_tab ();
                 return TRUE;
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 2b6e8d4..1e489aa 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -202,6 +202,7 @@ static UserActionData user_actions_data[] = {
                                              {view_close_tab, "view.close_tab", N_("Close the current tab")},
                                              {view_close_all_tabs, "view.close_all_tabs", N_("Close all tabs")},
                                              {view_close_duplicate_tabs, "view.close_duplicate_tabs", N_("Close duplicate tabs")},
+                                             {view_directory, "view.directory", N_("Change directory")},
                                              {view_equal_panes, "view.equal_panes", N_("Equal panel size")},
                                              {view_first, "view.first", N_("Back to the first directory")},
                                              {view_forward, "view.forward", N_("Forward one directory")},
@@ -381,6 +382,12 @@ void GnomeCmdUserActions::init()
         register_action(GDK_CONTROL_MASK | GDK_SHIFT_MASK, GDK_KP_Up, "view.in_inactive_tab");
     }
 
+    if (!registered("view.directory"))
+    {
+        register_action(GDK_CONTROL_MASK, GDK_Page_Down, "view.directory");
+        register_action(GDK_CONTROL_MASK, GDK_KP_Page_Down, "view.directory");
+    }
+
     if (!registered("view.home"))
     {
         register_action(GDK_CONTROL_MASK, GDK_quoteleft, "view.home");
@@ -1498,6 +1505,17 @@ void view_in_inactive_pane (GtkMenuItem *menuitem, gpointer not_used)
 }
 
 
+void view_directory (GtkMenuItem *menuitem, gpointer not_used)
+{
+    GnomeCmdFileSelector *fs = get_fs (ACTIVE);
+    GnomeCmdFileList *fl = fs->file_list();
+
+    GnomeCmdFile *f = fl->get_selected_file();
+    if (f && f->info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
+        fs->do_file_specific_action (fl, f);
+}
+
+
 void view_home (GtkMenuItem *menuitem, gpointer not_used)
 {
     GnomeCmdFileSelector *fs = get_fs (ACTIVE);
diff --git a/src/gnome-cmd-user-actions.h b/src/gnome-cmd-user-actions.h
index 8e8d10f..479fbf4 100644
--- a/src/gnome-cmd-user-actions.h
+++ b/src/gnome-cmd-user-actions.h
@@ -294,6 +294,7 @@ GNOME_CMD_USER_ACTION(view_in_left_pane);
 GNOME_CMD_USER_ACTION(view_in_right_pane);
 GNOME_CMD_USER_ACTION(view_in_active_pane);
 GNOME_CMD_USER_ACTION(view_in_inactive_pane);
+GNOME_CMD_USER_ACTION(view_directory);
 GNOME_CMD_USER_ACTION(view_home);
 GNOME_CMD_USER_ACTION(view_root);
 GNOME_CMD_USER_ACTION(view_new_tab);



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