diff -urNp gnome-terminal-2.22.2/src/gnome-terminal.glade2 gnome-terminal-2.22.2-r1/src/gnome-terminal.glade2
--- gnome-terminal-2.22.2/src/gnome-terminal.glade2 2008-06-13 10:48:36.000000000 -0700
+++ gnome-terminal-2.22.2-r1/src/gnome-terminal.glade2 2008-06-13 11:52:19.000000000 -0700
@@ -3439,7 +3439,7 @@ Hold the terminal open
True
- 4
+ 5
3
False
6
@@ -3698,6 +3698,42 @@ Hold the terminal open
+
+ True
+ 1.49012002737e-08
+ 0.5
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+
+ True
+ True
+ Use keystrokes to scroll on _alternate screen
+ True
+ GTK_RELIEF_NORMAL
+ True
+ False
+ False
+ True
+
+
+
+
+ 0
+ 3
+ 4
+ 5
+ fill
+
+
+
+
+
True
On the left side
diff -urNp gnome-terminal-2.22.2/src/gnome-terminal.schemas.in gnome-terminal-2.22.2-r1/src/gnome-terminal.schemas.in
--- gnome-terminal-2.22.2/src/gnome-terminal.schemas.in 2008-06-13 10:48:36.000000000 -0700
+++ gnome-terminal-2.22.2-r1/src/gnome-terminal.schemas.in 2008-06-13 12:00:58.000000000 -0700
@@ -326,6 +326,21 @@
+ /schemas/apps/gnome-terminal/profiles/Default/alternate_screen_scroll
+ /apps/gnome-terminal/profiles/Default/alternate_screen_scroll
+ gnome-terminal
+ bool
+ true
+
+ Whether to use keystrokes for alternate screen scrolling
+
+ If true, use Up/Down keystrokes for scrolling when using alternate screen
+ or when scrolling is restricted.
+
+
+
+
+
/schemas/apps/gnome-terminal/profiles/Default/exit_action
/apps/gnome-terminal/profiles/Default/exit_action
gnome-terminal
diff -urNp gnome-terminal-2.22.2/src/profile-editor.c gnome-terminal-2.22.2-r1/src/profile-editor.c
--- gnome-terminal-2.22.2/src/profile-editor.c 2008-06-13 10:48:36.000000000 -0700
+++ gnome-terminal-2.22.2-r1/src/profile-editor.c 2008-06-13 11:12:04.000000000 -0700
@@ -104,6 +104,8 @@ static void profile_editor_update_
TerminalProfile *profile);
static void profile_editor_update_scroll_on_output (GtkWidget *widget,
TerminalProfile *profile);
+static void profile_editor_update_alternate_screen_scroll (GtkWidget *widget,
+ TerminalProfile *profile);
static void profile_editor_update_exit_action (GtkWidget *widget,
TerminalProfile *profile);
static void profile_editor_update_login_shell (GtkWidget *widget,
@@ -287,6 +289,9 @@ profile_changed (TerminalProfile
if (mask->scroll_on_output)
profile_editor_update_scroll_on_output (editor, profile);
+ if (mask->alternate_screen_scroll)
+ profile_editor_update_alternate_screen_scroll (editor, profile);
+
if (mask->exit_action)
profile_editor_update_exit_action (editor, profile);
@@ -524,6 +529,14 @@ scroll_on_output_toggled (GtkWidget
}
static void
+alternate_screen_scroll_toggled (GtkWidget *checkbutton,
+ TerminalProfile *profile)
+{
+ terminal_profile_set_alternate_screen_scroll (profile,
+ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)));
+}
+
+static void
exit_action_changed (GtkWidget *combo_box,
TerminalProfile *profile)
{
@@ -1082,6 +1095,12 @@ terminal_profile_edit (TerminalProfile *
G_CALLBACK (scroll_on_output_toggled),
profile);
+ w = glade_xml_get_widget (xml, "alternate-screen-scroll-checkbutton");
+ profile_editor_update_alternate_screen_scroll (editor, profile);
+ g_signal_connect (G_OBJECT (w), "toggled",
+ G_CALLBACK (alternate_screen_scroll_toggled),
+ profile);
+
w = glade_xml_get_widget (xml, "exit-action-combobox");
profile_editor_update_exit_action (editor, profile);
g_signal_connect (G_OBJECT (w), "changed",
@@ -1437,6 +1456,9 @@ profile_editor_update_sensitivity (GtkWi
set_insensitive (editor, "scroll-on-output-checkbutton",
mask->scroll_on_output);
+ set_insensitive (editor, "alternate-screen-scroll-checkbutton",
+ mask->alternate_screen_scroll);
+
set_insensitive (editor, "exit-action-combobox",
mask->exit_action);
@@ -1701,6 +1723,18 @@ profile_editor_update_scroll_on_output (
}
static void
+profile_editor_update_alternate_screen_scroll (GtkWidget *editor,
+ TerminalProfile *profile)
+{
+ GtkWidget *w;
+
+ w = profile_editor_get_widget (editor, "alternate-screen-scroll-checkbutton");
+
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
+ terminal_profile_get_alternate_screen_scroll (profile));
+}
+
+static void
profile_editor_update_exit_action (GtkWidget *editor,
TerminalProfile *profile)
{
diff -urNp gnome-terminal-2.22.2/src/terminal-profile.c gnome-terminal-2.22.2-r1/src/terminal-profile.c
--- gnome-terminal-2.22.2/src/terminal-profile.c 2008-06-13 10:48:36.000000000 -0700
+++ gnome-terminal-2.22.2-r1/src/terminal-profile.c 2008-06-13 11:04:13.000000000 -0700
@@ -51,6 +51,7 @@
#define KEY_SCROLLBACK_LINES "scrollback_lines"
#define KEY_SCROLL_ON_KEYSTROKE "scroll_on_keystroke"
#define KEY_SCROLL_ON_OUTPUT "scroll_on_output"
+#define KEY_ALTERNATE_SCREEN_SCROLL "alternate_screen_scroll"
#define KEY_EXIT_ACTION "exit_action"
#define KEY_LOGIN_SHELL "login_shell"
#define KEY_UPDATE_RECORDS "update_records"
@@ -118,6 +119,7 @@ struct _TerminalProfilePrivate
guint silent_bell : 1;
guint scroll_on_keystroke : 1;
guint scroll_on_output : 1;
+ guint alternate_screen_scroll : 1;
guint login_shell : 1;
guint update_records : 1;
guint use_custom_command : 1;
@@ -538,6 +540,36 @@ terminal_profile_set_scroll_on_output (T
g_free (key);
}
+
+gboolean
+terminal_profile_get_alternate_screen_scroll (TerminalProfile *profile)
+{
+ g_return_val_if_fail (TERMINAL_IS_PROFILE (profile), FALSE);
+
+ return profile->priv->alternate_screen_scroll;
+}
+
+
+void
+terminal_profile_set_alternate_screen_scroll (TerminalProfile *profile,
+ gboolean setting)
+{
+ char *key;
+
+ RETURN_IF_NOTIFYING (profile);
+
+ key = gconf_concat_dir_and_key (profile->priv->profile_dir,
+ KEY_ALTERNATE_SCREEN_SCROLL);
+
+ gconf_client_set_bool (profile->priv->conf,
+ key,
+ setting,
+ NULL);
+
+ g_free (key);
+}
+
+
TerminalScrollbarPosition
terminal_profile_get_scrollbar_position (TerminalProfile *profile)
{
@@ -1919,6 +1951,7 @@ terminal_profile_update (TerminalProfile
UPDATE_INTEGER (KEY_SCROLLBACK_LINES, scrollback_lines);
UPDATE_BOOLEAN (KEY_SCROLL_ON_KEYSTROKE, scroll_on_keystroke);
UPDATE_BOOLEAN (KEY_SCROLL_ON_OUTPUT, scroll_on_output);
+ UPDATE_BOOLEAN (KEY_ALTERNATE_SCREEN_SCROLL, alternate_screen_scroll);
UPDATE_STRING (KEY_EXIT_ACTION, exit_action);
UPDATE_BOOLEAN (KEY_LOGIN_SHELL, login_shell);
UPDATE_BOOLEAN (KEY_UPDATE_RECORDS, update_records);
@@ -2064,6 +2097,7 @@ else if (strcmp (key, KName) == 0)
UPDATE_INTEGER (KEY_SCROLLBACK_LINES, scrollback_lines, profile->priv->scrollback_lines);
UPDATE_BOOLEAN (KEY_SCROLL_ON_KEYSTROKE, scroll_on_keystroke, FALSE);
UPDATE_BOOLEAN (KEY_SCROLL_ON_OUTPUT, scroll_on_output, FALSE);
+ UPDATE_BOOLEAN (KEY_ALTERNATE_SCREEN_SCROLL, alternate_screen_scroll, FALSE);
UPDATE_STRING (KEY_EXIT_ACTION, exit_action, NULL);
UPDATE_BOOLEAN (KEY_LOGIN_SHELL, login_shell, FALSE);
UPDATE_BOOLEAN (KEY_UPDATE_RECORDS, update_records, FALSE);
@@ -2662,6 +2696,17 @@ terminal_profile_create (TerminalProfile
BAIL_OUT_CHECK ();
+ g_free (key);
+ key = gconf_concat_dir_and_key (profile_dir,
+ KEY_ALTERNATE_SCREEN_SCROLL);
+
+ gconf_client_set_bool (base_profile->priv->conf,
+ key,
+ base_profile->priv->alternate_screen_scroll,
+ &err);
+
+ BAIL_OUT_CHECK ();
+
g_free (key);
key = gconf_concat_dir_and_key (profile_dir,
diff -urNp gnome-terminal-2.22.2/src/terminal-profile.h gnome-terminal-2.22.2-r1/src/terminal-profile.h
--- gnome-terminal-2.22.2/src/terminal-profile.h 2008-06-13 10:48:36.000000000 -0700
+++ gnome-terminal-2.22.2-r1/src/terminal-profile.h 2008-06-13 11:07:16.000000000 -0700
@@ -47,6 +47,7 @@ typedef struct
unsigned int scrollback_lines : 1;
unsigned int scroll_on_keystroke : 1;
unsigned int scroll_on_output : 1;
+ unsigned int alternate_screen_scroll : 1;
unsigned int exit_action : 1;
unsigned int login_shell : 1;
unsigned int update_records : 1;
@@ -158,6 +159,7 @@ gboolean terminal_profi
gboolean terminal_profile_get_default_show_menubar (TerminalProfile *profile);
gboolean terminal_profile_get_scroll_on_keystroke (TerminalProfile *profile);
gboolean terminal_profile_get_scroll_on_output (TerminalProfile *profile);
+gboolean terminal_profile_get_alternate_screen_scroll (TerminalProfile *profile);
TerminalExitAction terminal_profile_get_exit_action (TerminalProfile *profile);
gboolean terminal_profile_get_login_shell (TerminalProfile *profile);
@@ -210,6 +212,8 @@ void terminal_profile_set_scroll_on_keys
gboolean setting);
void terminal_profile_set_scroll_on_output (TerminalProfile *profile,
gboolean setting);
+void terminal_profile_set_alternate_screen_scroll (TerminalProfile *profile,
+ gboolean setting);
void terminal_profile_set_exit_action (TerminalProfile *profile,
TerminalExitAction action);
diff -urNp gnome-terminal-2.22.2/src/terminal-screen.c gnome-terminal-2.22.2-r1/src/terminal-screen.c
--- gnome-terminal-2.22.2/src/terminal-screen.c 2008-06-13 10:48:36.000000000 -0700
+++ gnome-terminal-2.22.2-r1/src/terminal-screen.c 2008-06-13 11:05:53.000000000 -0700
@@ -642,6 +642,9 @@ terminal_screen_reread_profile (Terminal
terminal_widget_set_scroll_on_output (term,
terminal_profile_get_scroll_on_output (profile));
+ terminal_widget_set_alternate_screen_scroll (term,
+ terminal_profile_get_alternate_screen_scroll (profile));
+
terminal_widget_set_scrollback_lines (term,
terminal_profile_get_scrollback_lines (profile));
diff -urNp gnome-terminal-2.22.2/src/terminal-widget.h gnome-terminal-2.22.2-r1/src/terminal-widget.h
--- gnome-terminal-2.22.2/src/terminal-widget.h 2008-06-13 10:48:36.000000000 -0700
+++ gnome-terminal-2.22.2-r1/src/terminal-widget.h 2008-06-13 11:17:22.000000000 -0700
@@ -79,6 +79,8 @@ void terminal_widget_set_scroll_on
gboolean setting);
void terminal_widget_set_scroll_on_output (GtkWidget *widget,
gboolean setting);
+void terminal_widget_set_alternate_screen_scroll (GtkWidget *widget,
+ gboolean setting);
void terminal_widget_set_scrollback_lines (GtkWidget *widget,
int lines);
void terminal_widget_set_background_image (GtkWidget *widget,
diff -urNp gnome-terminal-2.22.2/src/terminal-widget-vte.c gnome-terminal-2.22.2-r1/src/terminal-widget-vte.c
--- gnome-terminal-2.22.2/src/terminal-widget-vte.c 2008-06-13 10:48:36.000000000 -0700
+++ gnome-terminal-2.22.2-r1/src/terminal-widget-vte.c 2008-06-13 11:18:03.000000000 -0700
@@ -328,6 +328,14 @@ terminal_widget_set_scroll_on_output (Gt
}
void
+terminal_widget_set_alternate_screen_scroll (GtkWidget *widget,
+ gboolean setting)
+{
+ g_return_if_fail(VTE_IS_TERMINAL(widget));
+ vte_terminal_set_alternate_screen_scroll(VTE_TERMINAL(widget), setting);
+}
+
+void
terminal_widget_set_scrollback_lines (GtkWidget *widget,
int lines)
{