diff options
author | Marco Peereboom <marco@conformal.com> | 2010-12-29 23:39:48 +0000 |
---|---|---|
committer | Marco Peereboom <marco@conformal.com> | 2010-12-29 23:39:48 +0000 |
commit | 2998b583fa6b6911e00dd91349f6e66ef64d0514 (patch) | |
tree | c0aec7866feb861a4c6e2215675cba455a0a0a71 /xxxterm.c | |
parent | 856501c583eee3753fa704fcebea05758d4d99ae (diff) | |
download | xombrero-2998b583fa6b6911e00dd91349f6e66ef64d0514.tar.gz |
att ctrl left and right arrows. should we make this work too in editboxes?
Diffstat (limited to 'xxxterm.c')
-rw-r--r-- | xxxterm.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/xxxterm.c b/xxxterm.c index cc347b8..23718d0 100644 --- a/xxxterm.c +++ b/xxxterm.c @@ -2220,10 +2220,22 @@ movetab(struct tab *t, struct karg *args) switch (args->i) { case XT_TAB_NEXT: - gtk_notebook_next_page(notebook); + /* if at the last page, loop around to the first */ + if (gtk_notebook_get_current_page(notebook) == + gtk_notebook_get_n_pages(notebook) - 1) { + gtk_notebook_set_current_page(notebook, 0); + } else { + gtk_notebook_next_page(notebook); + } break; case XT_TAB_PREV: - gtk_notebook_prev_page(notebook); + /* if at the first page, loop around to the last */ + if (gtk_notebook_current_page(notebook) == 0) { + gtk_notebook_set_current_page(notebook, + gtk_notebook_get_n_pages(notebook) - 1); + } else { + gtk_notebook_prev_page(notebook); + } break; case XT_TAB_FIRST: gtk_notebook_set_current_page(notebook, 0); @@ -3026,6 +3038,8 @@ struct key { { GDK_CONTROL_MASK, 0, GDK_0, movetab, {.i = 10} }, { GDK_CONTROL_MASK|GDK_SHIFT_MASK, 0, GDK_less, movetab, {.i = XT_TAB_FIRST} }, { GDK_CONTROL_MASK|GDK_SHIFT_MASK, 0, GDK_greater, movetab, {.i = XT_TAB_LAST} }, + { GDK_CONTROL_MASK, 0, GDK_Left, movetab, {.i = XT_TAB_PREV} }, + { GDK_CONTROL_MASK, 0, GDK_Right, movetab, {.i = XT_TAB_NEXT} }, { GDK_CONTROL_MASK, 0, GDK_minus, resizetab, {.i = -1} }, { GDK_CONTROL_MASK|GDK_SHIFT_MASK, 0, GDK_plus, resizetab, {.i = 1} }, { GDK_CONTROL_MASK, 0, GDK_equal, resizetab, {.i = 1} }, |