aboutsummaryrefslogtreecommitdiff
path: root/mt.c
diff options
context:
space:
mode:
Diffstat (limited to 'mt.c')
-rw-r--r--mt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mt.c b/mt.c
index 128fa90..16845f3 100644
--- a/mt.c
+++ b/mt.c
@@ -15,9 +15,9 @@ static void tab_focus(GtkNotebook *notebook, GtkNotebookPage *page, guint page_n
static GQuark term_data_id = 0;
#define get_page_term( sakura, page_idx ) (struct term*)g_object_get_qdata(G_OBJECT( gtk_notebook_get_nth_page( (GtkNotebook*)mt.notebook, page_idx ) ), term_data_id);
static gboolean fullscreen;
-static char *font = "terminus 9";
-static long scroll = 250;
+#define FONT "terminus 9"
static char *httpregexp = "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*";
+#define SCROLL 250
static struct { GtkWidget *win; GtkWidget *notebook; gchar *title;} mt;
typedef struct term { GtkWidget *vte; GtkWidget *label; } term;
@@ -30,13 +30,13 @@ static void quit() {
gboolean key_press_cb (GtkWidget *widget, GdkEventKey *event) {
guint(g) = event->keyval;
if (event->state == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
- if (g == GDK_t) { tab_new(); return TRUE; }
- if (g == GDK_x) { tab_close(); return TRUE; }
+ if (g == GDK_T) { tab_new(); return TRUE; }
+ if (g == GDK_X) { tab_close(); return TRUE; }
}
if (event->state == (GDK_MOD1_MASK)) {
if (g == GDK_Left) { gtk_notebook_prev_page(GTK_NOTEBOOK(mt.notebook)); return TRUE; }
if (g == GDK_Right) { gtk_notebook_next_page(GTK_NOTEBOOK(mt.notebook)); return TRUE; }
- if (g == GDK_F11) { if(fullscreen) { gtk_window_unfullscreen(GTK_WINDOW(mt.win)); fullscreen = FALSE; } else { gtk_window_fullscreen(GTK_WINDOW(mt.win)); fullscreen = TRUE; } }
+ if (g == GDK_F11) { if(fullscreen) { gtk_window_unfullscreen(GTK_WINDOW(mt.win)); fullscreen = FALSE; return TRUE; } else { gtk_window_fullscreen(GTK_WINDOW(mt.win)); fullscreen = TRUE; return TRUE;} }
}
@@ -127,9 +127,9 @@ static void tab_new() {
vte_terminal_match_set_cursor_type(VTE_TERMINAL(t->vte), *tmp, GDK_CROSSHAIR);
g_free (tmp);
/*barrowed from sakura*/
- vte_terminal_set_scrollback_lines(VTE_TERMINAL(t->vte), scroll);
+ vte_terminal_set_scrollback_lines(VTE_TERMINAL(t->vte), SCROLL);
vte_terminal_set_mouse_autohide(VTE_TERMINAL(t->vte), TRUE);
- vte_terminal_set_font_from_string(VTE_TERMINAL(t->vte), font);
+ vte_terminal_set_font_from_string(VTE_TERMINAL(t->vte), FONT);
gtk_window_set_title(GTK_WINDOW(mt.win), vte_terminal_get_window_title(VTE_TERMINAL(t->vte)));
gtk_widget_show_all(mt.notebook);
gtk_notebook_set_current_page(GTK_NOTEBOOK(mt.notebook), index);