Mercurial > hg > forks > geeqie
changeset 2517:8057b4b9fe34
Addl fix #488: Issues using Geeqie to compare pictures
https://github.com/BestImageViewer/geeqie/issues/488
Implement Alt-Up and Alt-Down keys
author | Colin Clark <colin.clark@cclark.uk> |
---|---|
date | Thu, 29 Jun 2017 11:05:59 +0100 |
parents | aab55aeb23e0 |
children | 8d368d89a7c0 3a586dd0188a d1b4dd282048 |
files | doc/docbook/GuideReferenceKeyboardShortcuts.xml src/layout_util.c |
diffstat | 2 files changed, 40 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/docbook/GuideReferenceKeyboardShortcuts.xml Wed Jun 28 16:57:11 2017 +0100 +++ b/doc/docbook/GuideReferenceKeyboardShortcuts.xml Thu Jun 29 11:05:59 2017 +0100 @@ -702,6 +702,20 @@ <entry /> <entry>Previous split pane.</entry> </row> + <row> + <entry> + <code>Alt + Up Arrow</code> + </entry> + <entry /> + <entry>Up or previous split pane.</entry> + </row> + <row> + <entry> + <code>Alt + Down Arrow</code> + </entry> + <entry /> + <entry>Down or next split pane.</entry> + </row> </tbody> </tgroup> </table>
--- a/src/layout_util.c Wed Jun 28 16:57:11 2017 +0100 +++ b/src/layout_util.c Thu Jun 29 11:05:59 2017 +0100 @@ -1421,6 +1421,24 @@ layout_image_activate(lw, active_frame, FALSE); } +static void layout_menu_split_pane_updown_cb(GtkAction *action, gpointer data) +{ + LayoutWindow *lw = data; + gint active_frame; + + active_frame = lw->active_split_image; + + if (lw->split_images[MAX_SPLIT_IMAGES-1] ) + { + active_frame = active_frame ^ 2; + } + else + { + active_frame = active_frame ^ 1; + } + layout_image_activate(lw, active_frame, FALSE); +} + static void layout_menu_image_last_cb(GtkAction *action, gpointer data) { LayoutWindow *lw = data; @@ -1799,6 +1817,8 @@ { "StereoCycle", NULL, N_("_Cycle through stereo modes"), NULL, N_("Cycle through stereo modes"), CB(layout_menu_stereo_mode_next_cb) }, { "SplitNextPane", NULL, N_("_Next Pane"), "<alt>Right", N_("Next Pane"), CB(layout_menu_split_pane_next_cb) }, { "SplitPreviousPane", NULL, N_("_Previous Pane"), "<alt>Left", N_("Previous Pane"), CB(layout_menu_split_pane_prev_cb) }, + { "SplitUpPane", NULL, N_("_Up Pane"), "<alt>Up", N_("Up Pane"), CB(layout_menu_split_pane_updown_cb) }, + { "SplitDownPane", NULL, N_("_Down Pane"), "<alt>Down", N_("Down Pane"), CB(layout_menu_split_pane_updown_cb) }, { "WriteRotation", NULL, N_("_Write orientation to file"), NULL, N_("Write orientation to file"), CB(layout_menu_write_rotate_cb) }, { "WriteRotationKeepDate", NULL, N_("_Write orientation to file (preserve timestamp)"), NULL, N_("Write orientation to file (preserve timestamp)"), CB(layout_menu_write_rotate_keep_date_cb) }, @@ -2028,6 +2048,8 @@ " <separator/>" " <menuitem action='SplitNextPane'/>" " <menuitem action='SplitPreviousPane'/>" +" <menuitem action='SplitUpPane'/>" +" <menuitem action='SplitDownPane'/>" " </menu>" " <menu action='StereoMenu'>" " <menuitem action='StereoAuto'/>" @@ -2694,6 +2716,10 @@ gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE)); action = gtk_action_group_get_action(lw->action_group, "SplitPreviousPane"); gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE)); + action = gtk_action_group_get_action(lw->action_group, "SplitUpPane"); + gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE)); + action = gtk_action_group_get_action(lw->action_group, "SplitDownPane"); + gtk_action_set_sensitive(action, !(lw->split_mode == SPLIT_NONE)); action = gtk_action_group_get_action(lw->action_group, "ViewIcons"); gtk_radio_action_set_current_value(GTK_RADIO_ACTION(action), lw->options.file_view_type);