diff -r -C5 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 *************** *** 3437,3447 **** True ! 4 3 False 6 12 --- 3437,3447 ---- True ! 5 3 False 6 12 *************** *** 3696,3705 **** --- 3696,3741 ---- + + 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 On the right side Disabled diff -r -C5 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 *************** *** 324,333 **** --- 324,348 ---- + /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 string close diff -r -C5 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 *************** *** 102,111 **** --- 102,113 ---- TerminalProfile *profile); static void profile_editor_update_scroll_on_keystroke (GtkWidget *widget, 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, TerminalProfile *profile); static void profile_editor_update_update_records (GtkWidget *widget, *************** *** 285,294 **** --- 287,299 ---- profile_editor_update_scroll_on_keystroke (editor, profile); 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); if (mask->login_shell) profile_editor_update_login_shell (editor, profile); *************** *** 522,531 **** --- 527,544 ---- terminal_profile_set_scroll_on_output (profile, gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton))); } 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) { int i; *************** *** 1080,1089 **** --- 1093,1108 ---- profile_editor_update_scroll_on_output (editor, profile); g_signal_connect (G_OBJECT (w), "toggled", 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", G_CALLBACK (exit_action_changed), profile); *************** *** 1435,1444 **** --- 1454,1466 ---- mask->scroll_on_keystroke); 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); set_insensitive (editor, "login-shell-checkbutton", mask->login_shell); *************** *** 1699,1708 **** --- 1721,1742 ---- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), terminal_profile_get_scroll_on_output (profile)); } 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) { GtkWidget *w; diff -r -C5 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 *************** *** 49,58 **** --- 49,59 ---- #define KEY_WORD_CHARS "word_chars" #define KEY_SCROLLBAR_POSITION "scrollbar_position" #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" #define KEY_USE_CUSTOM_COMMAND "use_custom_command" #define KEY_CUSTOM_COMMAND "custom_command" *************** *** 116,125 **** --- 117,127 ---- guint default_show_menubar : 1; guint allow_bold : 1; 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; guint scroll_background : 1; guint use_theme_colors : 1; *************** *** 536,545 **** --- 538,577 ---- NULL); 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) { g_return_val_if_fail (TERMINAL_IS_PROFILE (profile), 0); *************** *** 1917,1926 **** --- 1949,1959 ---- UPDATE_STRING (KEY_WORD_CHARS, word_chars); UPDATE_STRING (KEY_SCROLLBAR_POSITION, scrollbar_position); 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); UPDATE_BOOLEAN (KEY_USE_CUSTOM_COMMAND, use_custom_command); UPDATE_STRING (KEY_CUSTOM_COMMAND, custom_command); *************** *** 2062,2071 **** --- 2095,2105 ---- UPDATE_STRING (KEY_WORD_CHARS, word_chars, NULL); UPDATE_STRING (KEY_SCROLLBAR_POSITION, scrollbar_position, NULL); 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); UPDATE_BOOLEAN (KEY_USE_CUSTOM_COMMAND, use_custom_command, FALSE); UPDATE_STRING (KEY_CUSTOM_COMMAND, custom_command, NULL); *************** *** 2660,2669 **** --- 2694,2714 ---- base_profile->priv->scroll_on_output, &err); 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, KEY_EXIT_ACTION); diff -r -C5 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 *************** *** 45,54 **** --- 45,55 ---- unsigned int word_chars : 1; unsigned int scrollbar_position : 1; 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; unsigned int use_custom_command : 1; unsigned int custom_command : 1; *************** *** 156,165 **** --- 157,167 ---- TerminalTitleMode terminal_profile_get_title_mode (TerminalProfile *profile); gboolean terminal_profile_get_forgotten (TerminalProfile *profile); 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); gboolean terminal_profile_get_update_records (TerminalProfile *profile); gboolean terminal_profile_get_use_custom_command (TerminalProfile *profile); *************** *** 208,217 **** --- 210,221 ---- gboolean setting); void terminal_profile_set_scroll_on_keystroke (TerminalProfile *profile, 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); void terminal_profile_set_login_shell (TerminalProfile *profile, gboolean setting); diff -r -C5 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 *************** *** 640,649 **** --- 640,652 ---- terminal_profile_get_scroll_on_keystroke (profile)); 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)); if (terminal_profile_get_use_skey (screen->priv->profile)) { diff -r -C5 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 *************** *** 77,86 **** --- 77,88 ---- gboolean setting); void terminal_widget_set_scroll_on_keystroke (GtkWidget *widget, 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, GdkPixbuf *pixbuf); void terminal_widget_set_background_image_file (GtkWidget *widget, diff -r -C5 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 *************** *** 326,335 **** --- 326,343 ---- g_return_if_fail(VTE_IS_TERMINAL(widget)); vte_terminal_set_scroll_on_output(VTE_TERMINAL(widget), setting); } 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) { g_return_if_fail(VTE_IS_TERMINAL(widget)); vte_terminal_set_scrollback_lines(VTE_TERMINAL(widget), lines);