aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormutantturkey <crazycal00@gmail.com>2010-04-26 08:40:14 -0400
committermutantturkey <crazycal00@gmail.com>2010-04-26 08:40:14 -0400
commit2ac1f92cfe2a2b40df1b76a0c8c10c4d93113d07 (patch)
tree009bf5afd76785962f5e79e630a623542e1572cf
parentb19ec11b258318f2416e4efbd7b0f1c5a3429067 (diff)
added prev/next page keybindings. cleaned up key_press_cb
-rw-r--r--mt.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/mt.c b/mt.c
index 3e8d9ae..2bbe3e5 100644
--- a/mt.c
+++ b/mt.c
@@ -36,18 +36,16 @@ static void quit() {
gboolean key_press_cb (GtkWidget *widget, GdkEventKey *event) {
if (event->state == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
- if (gdk_keyval_to_lower(event->keyval) == GDK_t) {
- tab_new();
- return TRUE;
- }
- if (gdk_keyval_to_lower(event->keyval) == GDK_x) {
- tab_close();
- return TRUE;
- }
+ if (gdk_keyval_to_lower(event->keyval) == GDK_t) { tab_new(); return TRUE; }
+ if (gdk_keyval_to_lower(event->keyval) == GDK_x) { tab_close(); return TRUE; }
+ if (gdk_keyval_to_lower(event->keyval) == GDK_Left) { gtk_notebook_prev_page(GTK_NOTEBOOK(mt.notebook)); return TRUE; }
+ if (gdk_keyval_to_lower(event->keyval) == GDK_Right) { gtk_notebook_next_page(GTK_NOTEBOOK(mt.notebook)); return TRUE; }
}
return FALSE;
}
+
+
static void tab_close() {
@@ -85,6 +83,7 @@ static void tab_new() {
g_signal_connect(t->vte, "child-exited", G_CALLBACK(tab_close), NULL);
+
/*barrowed from sakura*/
vte_terminal_set_scrollback_lines(VTE_TERMINAL(t->vte), scroll);
// maybe i dont /REALLY NEED/ it. vte_terminal_match_add_gregex(VTE_TERMINAL(t->vte), httpregexp, 0);
@@ -117,4 +116,6 @@ int main (int argc, char* argv[]) {
config();
gtk_main();
+
+ return 0;
};