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



commit 8eb37e03c0c9284765ac06d3b73377bf80234737
Author: Uwe Scholz <uwescholz src gnome org>
Date:   Tue Nov 1 21:12:26 2016 +0100

    Shortcut can be assigned for moving the cursor up or down

 src/gnome-cmd-user-actions.cc |   20 +++++++++++++++++++-
 src/gnome-cmd-user-actions.h  |    2 ++
 2 files changed, 21 insertions(+), 1 deletions(-)
---
diff --git a/src/gnome-cmd-user-actions.cc b/src/gnome-cmd-user-actions.cc
index 249558c..4d8f1bf 100644
--- a/src/gnome-cmd-user-actions.cc
+++ b/src/gnome-cmd-user-actions.cc
@@ -277,8 +277,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")},
                                             };
 
 
@@ -1551,6 +1552,23 @@ void view_main_menu (GtkMenuItem *menuitem, gpointer not_used)
     g_settings_set_boolean (gcmd_user_actions.settings->general, GCMD_SETTINGS_MAINMENU_VISIBILITY, 
!mainmenu_visibility);
 }
 
+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_first (GtkMenuItem *menuitem, gpointer not_used)
 {
     get_fs (ACTIVE)->first();
diff --git a/src/gnome-cmd-user-actions.h b/src/gnome-cmd-user-actions.h
index d85fe0d..55e70e9 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]