[gnome-commander] Shortcut can be assigned for moving the cursor up or down



commit b6954ed757185a92f9952b06416de10a19db54ff
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Thu Oct 6 22:33:43 2016 +0200

    Shortcut can be assigned for moving the cursor up or down

 NEWS                          |    8 ++++++++
 doc/C/releases.xml            |   13 +++++++++++++
 src/gnome-cmd-user-actions.cc |   19 ++++++++++++++++++-
 src/gnome-cmd-user-actions.h  |    2 ++
 4 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/NEWS b/NEWS
index 7ea9ca0..19025f6 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,12 @@
 ===================================
+gnome-commander 1.8.0
+---------------
+
+New features:
+ * Shortcut can be assigned for moving the cursor up or down
+
+
+===================================
 gnome-commander 1.6.0
 ---------------
 
diff --git a/doc/C/releases.xml b/doc/C/releases.xml
index 4a463bd..9b17eda 100644
--- a/doc/C/releases.xml
+++ b/doc/C/releases.xml
@@ -23,6 +23,19 @@
     </thead>
     <tbody>
         <row valign="top">
+            <entry><para>1.8.0</para></entry>
+            <entry><para>2016-??-??</para></entry>
+            <entry>
+                <para>New features:</para>
+                <para>
+                    <itemizedlist>
+                        <listitem>
+                            <para>Shortcut can be assigned for moving the cursor up or down</para>
+                        </listitem>
+                    </itemizedlist>
+                </para>
+        </row>
+        <row valign="top">
             <entry><para>1.6.0</para></entry>
             <entry><para>2016-10-04</para></entry>
             <entry>
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index ab4df79..be09ce5 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -276,8 +276,9 @@ static UserActionData user_actions_data[] = {
                                              {view_terminal, "view.terminal", N_("Show terminal")},
 #endif
                                              {view_up, "view.up", N_("Up one directory")},
-                                             
                                              {view_main_menu, "view.main_menu", N_("Display main menu")},
+                                             {view_step_up, "view.step_up", N_("Move cursor one step up")},
+                                             {view_step_down, "view.step_down", N_("Move cursor one step 
down")},
                                             };
 
 
@@ -1530,6 +1531,22 @@ void view_horizontal_orientation (GtkMenuItem *menuitem, gpointer not_used)
     g_settings_set_boolean (gcmd_user_actions.settings->general, GCMD_SETTINGS_HORIZONTAL_ORIENTATION, 
checkitem->active);
 }
 
+void view_step_up (GtkMenuItem *menuitem, gpointer not_used)
+{
+    GnomeCmdFileSelector *fs = get_fs (ACTIVE);
+    GnomeCmdFileList *fl = fs->file_list();
+
+    g_signal_emit_by_name (fl, "scroll-vertical", GTK_SCROLL_STEP_BACKWARD, 0.0, NULL);
+}
+
+void view_step_down (GtkMenuItem *menuitem, gpointer not_used)
+{
+    GnomeCmdFileSelector *fs = get_fs (ACTIVE);
+    GnomeCmdFileList *fl = fs->file_list();
+
+    g_signal_emit_by_name (fl, "scroll-vertical", GTK_SCROLL_STEP_FORWARD, 0.0, NULL);
+}
+
 void view_up (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 b242ddd..fe38cc8 100644
--- a/src/gnome-cmd-user-actions.h
+++ b/src/gnome-cmd-user-actions.h
@@ -314,6 +314,8 @@ GNOME_CMD_USER_ACTION(view_in_inactive_tab);
 GNOME_CMD_USER_ACTION(view_toggle_tab_lock);
 GNOME_CMD_USER_ACTION(view_horizontal_orientation);
 GNOME_CMD_USER_ACTION(view_main_menu);
+GNOME_CMD_USER_ACTION(view_step_up);
+GNOME_CMD_USER_ACTION(view_step_down);
 
 /************** Bookmarks Menu **************/
 GNOME_CMD_USER_ACTION(bookmarks_add_current);


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