--- Begin Message ---
Package: gtkterm
Version: 0.99.5-1+b1
Severity: wishlist
Tags: patch
Sometimes it's very bad to lose the information on the terminal, and the
default VTE size for scrollback_lines, 100, is not good enough. This patch
adds this option to it.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.29-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=pt_BR.UTF-8, LC_CTYPE=pt_BR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages gtkterm depends on:
ii libatk1.0-0 1.26.0-1 The ATK accessibility toolkit
ii libc6 2.9-8 GNU C Library: Shared libraries
ii libcairo2 1.8.6-2+b1 The Cairo 2D vector graphics libra
ii libfontconfig1 2.6.0-3 generic font configuration library
ii libglib2.0-0 2.20.1-1 The GLib library of C routines
ii libgtk2.0-0 2.16.1-2 The GTK+ graphical user interface
ii libpango1.0-0 1.24.0-3+b1 Layout and rendering of internatio
ii libvte9 1:0.20.1-1 Terminal emulator widget for GTK+
ii libx11-6 2:1.2.1-1 X11 client-side library
ii libxcursor1 1:1.1.9-1 X cursor management library
ii libxext6 2:1.0.4-1 X11 miscellaneous extension librar
ii libxfixes3 1:4.0.3-2 X11 miscellaneous 'fixes' extensio
ii libxft2 2.1.13-3 FreeType-based font drawing librar
ii libxi6 2:1.2.1-2 X11 Input extension library
ii libxinerama1 2:1.0.3-2 X11 Xinerama extension library
ii libxrandr2 2:1.3.0-2 X11 RandR extension library
ii libxrender1 1:0.9.4-2 X Rendering Extension client libra
gtkterm recommends no packages.
gtkterm suggests no packages.
-- no debconf information
diff -Nudar gtkterm-0.99.5.orig/src/config.c gtkterm-0.99.5/src/config.c
--- gtkterm-0.99.5.orig/src/config.c 2005-11-14 17:43:56.000000000 -0200
+++ gtkterm-0.99.5/src/config.c 2009-05-08 23:35:42.000000000 -0300
@@ -84,6 +84,7 @@
gint *show_cursor;
gint *rows;
gint *columns;
+guint *scrollback_lines;
gint *visual_bell;
gint *foreground_red;
gint *foreground_blue;
@@ -111,6 +112,7 @@
{"term_show_cursor", CFG_BOOL, &show_cursor},
{"term_rows", CFG_INT, &rows},
{"term_columns", CFG_INT, &columns},
+ {"term_scrollback_lines", CFG_UINT, &scrollback_lines},
{"term_visual_bell", CFG_BOOL, &visual_bell},
{"term_foreground_red", CFG_INT, &foreground_red},
{"term_foreground_blue", CFG_INT, &foreground_blue},
@@ -147,6 +149,7 @@
static gint config_color_bg(GtkWidget *, gpointer);
static void Transparency_OnOff(GtkWidget *, gpointer);
static void change_scale(GtkRange *, gpointer);
+static void Config_Scrollback_lines(GtkSpinButton *, gpointer);
extern GtkWidget *display;
@@ -860,6 +863,8 @@
if(columns[i] != 0)
term_conf.columns = columns[i];
+ term_conf.scrollback_lines = scrollback_lines[i];
+
if(visual_bell[i] != -1)
term_conf.visual_bell = (gboolean)visual_bell[i];
else
@@ -884,6 +889,7 @@
term_conf.show_cursor = TRUE;
term_conf.rows = 80;
term_conf.columns = 25;
+ term_conf.scrollback_lines = 100;
term_conf.visual_bell = FALSE;
term_conf.foreground_color.red = 43253;
@@ -912,6 +918,7 @@
vte_terminal_set_background_transparent(VTE_TERMINAL(display), term_conf.transparency);
vte_terminal_set_size (VTE_TERMINAL(display), term_conf.rows, term_conf.columns);
+ vte_terminal_set_scrollback_lines(VTE_TERMINAL(display), term_conf.scrollback_lines);
vte_terminal_set_color_foreground (VTE_TERMINAL(display), &term_conf.foreground_color);
vte_terminal_set_color_background (VTE_TERMINAL(display), &term_conf.background_color);
vte_terminal_set_background_saturation(VTE_TERMINAL(display), (gdouble)term_conf.background_saturation);
@@ -1023,6 +1030,7 @@
term_conf.show_cursor = TRUE;
term_conf.rows = 80;
term_conf.columns = 25;
+ term_conf.scrollback_lines = 100;
term_conf.visual_bell = TRUE;
Selec_couleur(&term_conf.foreground_color, 0.66, 0.66, 0.66);
@@ -1144,6 +1152,10 @@
string = g_strdup_printf("%d", term_conf.columns);
cfgStoreValue(cfg, "term_columns", string, CFG_INI, pos);
g_free(string);
+
+ string = g_strdup_printf("%u", term_conf.scrollback_lines);
+ cfgStoreValue(cfg, "term_scrollback_lines", string, CFG_INI, pos);
+ g_free(string);
if(term_conf.visual_bell == FALSE)
string = g_strdup_printf("False");
@@ -1259,7 +1271,8 @@
gint Config_Terminal(GtkWidget *widget, guint param)
{
- GtkWidget *Dialog, *BoiteH, *BoiteV, *Label, *Check_Bouton, *Bouton, *Eventbox, *Table, *HScale;
+ GtkWidget *Dialog, *BoiteH, *BoiteV, *Label, *Check_Bouton, *Bouton, *Eventbox, *Table, *HScale, *Spin;
+ GtkObject *adj;
gchar *fonte;
Dialog = gtk_dialog_new_with_buttons (_("Terminal configuration"),
@@ -1339,6 +1352,20 @@
gtk_widget_set_sensitive(GTK_WIDGET(HScale), term_conf.transparency);
gtk_box_pack_start(GTK_BOX(BoiteV), HScale, FALSE, TRUE, 0);
+ Label = gtk_label_new(NULL);
+ gtk_misc_set_alignment(GTK_MISC(Label), 0, 0);
+ gtk_label_set_markup(GTK_LABEL(Label), "<b>Terminal : </b>");
+ gtk_box_pack_start(GTK_BOX(BoiteV), Label, FALSE, TRUE, 10);
+
+ BoiteH = gtk_hbox_new(FALSE, 0);
+ Label = gtk_label_new(_("Scrollback lines :"));
+ gtk_box_pack_start(GTK_BOX(BoiteH), Label, FALSE, TRUE, 0);
+ adj = gtk_adjustment_new(0.0, 0.0, 1000000.0, 100.0, 1000.0, 0.0);
+ Spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 100.0, 0);
+ gtk_spin_button_set_value(GTK_SPIN_BUTTON(Spin), (gfloat)term_conf.scrollback_lines);
+ gtk_box_pack_start(GTK_BOX(BoiteH), Spin, FALSE, TRUE, 10);
+ g_signal_connect(GTK_OBJECT(Spin), "value-changed", G_CALLBACK(Config_Scrollback_lines), 0);
+ gtk_box_pack_start(GTK_BOX(BoiteV), BoiteH, FALSE, TRUE, 0);
gtk_container_add(GTK_CONTAINER(GTK_DIALOG(Dialog)->vbox), BoiteV);
@@ -1472,3 +1499,14 @@
cfgStoreValue(cfg, "term_background_saturation", string, CFG_INI, 0);
g_free(string);
}
+
+static void Config_Scrollback_lines(GtkSpinButton *spinbutton, gpointer data)
+{
+ gchar *string;
+ term_conf.scrollback_lines = gtk_spin_button_get_value_as_int(spinbutton);
+ vte_terminal_set_scrollback_lines(VTE_TERMINAL(display), term_conf.scrollback_lines);
+
+ string = g_strdup_printf("%u", term_conf.scrollback_lines);
+ cfgStoreValue(cfg, "term_scrollback_lines", string, CFG_INI, 0);
+ g_free(string);
+}
diff -Nudar gtkterm-0.99.5.orig/src/config.h gtkterm-0.99.5/src/config.h
--- gtkterm-0.99.5.orig/src/config.h 2003-08-15 11:16:26.000000000 -0300
+++ gtkterm-0.99.5/src/config.h 2009-05-08 23:35:42.000000000 -0300
@@ -43,6 +43,7 @@
gboolean show_cursor;
gint rows;
gint columns;
+ guint scrollback_lines;
gboolean visual_bell;
GdkColor foreground_color;
GdkColor background_color;
--- End Message ---