updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / sakura-scrollback-patch / sakura_scrollback.patch
blobf7fe787bfac240efd2b7e057a7b98c5dc5f3955f
1 --- src/sakura.c 2010-04-17 05:36:17.000000000 +0400
2 +++ src/sakura.c 2010-11-05 16:58:18.090740617 +0300
3 @@ -152,6 +152,7 @@
4 guint height;
5 glong columns;
6 glong rows;
7 + gint scroll_lines;
8 gint char_width;
9 gint char_height;
10 gint label_count;
11 @@ -206,9 +207,9 @@
14 #define ICON_FILE "terminal-tango.svg"
15 -#define SCROLL_LINES 4096
16 #define HTTP_REGEXP "(ftp|http)s?://[-a-zA-Z0-9.?$%&/=_~#.,:;+]*"
17 #define CONFIGFILE "sakura.conf"
18 +#define DEFAULT_SCROLL_LINES 4096
19 #define DEFAULT_COLUMNS 80
20 #define DEFAULT_ROWS 24
21 #define DEFAULT_FONT "monospace 11"
22 @@ -1578,6 +1579,11 @@
24 g_free(cfgtmp);
26 + if (!g_key_file_has_key(sakura.cfg, cfg_group, "scroll_lines", NULL)) {
27 + g_key_file_set_integer(sakura.cfg, cfg_group, "scroll_lines", DEFAULT_SCROLL_LINES);
28 + }
29 + sakura.scroll_lines = g_key_file_get_integer(sakura.cfg, cfg_group, "scroll_lines", NULL);
31 if (!g_key_file_has_key(sakura.cfg, cfg_group, "add_tab_accelerator", NULL)) {
32 g_key_file_set_integer(sakura.cfg, cfg_group, "add_tab_accelerator", DEFAULT_ADD_TAB_ACCELERATOR);
34 @@ -2109,7 +2115,7 @@
35 gtk_widget_show_all(tab_hbox);
37 /* Init vte */
38 - vte_terminal_set_scrollback_lines(VTE_TERMINAL(term->vte), SCROLL_LINES);
39 + vte_terminal_set_scrollback_lines(VTE_TERMINAL(term->vte), sakura.scroll_lines);
40 vte_terminal_match_add_gregex(VTE_TERMINAL(term->vte), sakura.http_regexp, 0);
41 vte_terminal_set_mouse_autohide(VTE_TERMINAL(term->vte), TRUE);