Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 156671 Details for
Bug 226393
x11-libs/vte and x11-terms/gnome-terminal don't allow disabling of keystroke scroll for alternate screen
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Unified diff for gnome-terminal patch
gnome-terminal-2.22.2-alternate_screen_scroll.patch (text/plain), 14.70 KB, created by
Heath Caldwell (RETIRED)
on 2008-06-13 20:47:30 UTC
(
hide
)
Description:
Unified diff for gnome-terminal patch
Filename:
MIME Type:
Creator:
Heath Caldwell (RETIRED)
Created:
2008-06-13 20:47:30 UTC
Size:
14.70 KB
patch
obsolete
>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</property> > <child> > <widget class="GtkTable" id="table27"> > <property name="visible">True</property> >- <property name="n_rows">4</property> >+ <property name="n_rows">5</property> > <property name="n_columns">3</property> > <property name="homogeneous">False</property> > <property name="row_spacing">6</property> >@@ -3698,6 +3698,42 @@ Hold the terminal open</property> > </child> > > <child> >+ <widget class="GtkAlignment" id="alignment12"> >+ <property name="visible">True</property> >+ <property name="xalign">1.49012002737e-08</property> >+ <property name="yalign">0.5</property> >+ <property name="xscale">0</property> >+ <property name="yscale">1</property> >+ <property name="top_padding">0</property> >+ <property name="bottom_padding">0</property> >+ <property name="left_padding">0</property> >+ <property name="right_padding">0</property> >+ >+ <child> >+ <widget class="GtkCheckButton" id="alternate-screen-scroll-checkbutton"> >+ <property name="visible">True</property> >+ <property name="can_focus">True</property> >+ <property name="label" translatable="yes">Use keystrokes to scroll on _alternate screen</property> >+ <property name="use_underline">True</property> >+ <property name="relief">GTK_RELIEF_NORMAL</property> >+ <property name="focus_on_click">True</property> >+ <property name="active">False</property> >+ <property name="inconsistent">False</property> >+ <property name="draw_indicator">True</property> >+ </widget> >+ </child> >+ </widget> >+ <packing> >+ <property name="left_attach">0</property> >+ <property name="right_attach">3</property> >+ <property name="top_attach">4</property> >+ <property name="bottom_attach">5</property> >+ <property name="x_options">fill</property> >+ <property name="y_options"></property> >+ </packing> >+ </child> >+ >+ <child> > <widget class="GtkComboBox" id="scrollbar-position-combobox"> > <property name="visible">True</property> > <property name="items" translatable="yes">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 @@ > </schema> > > <schema> >+ <key>/schemas/apps/gnome-terminal/profiles/Default/alternate_screen_scroll</key> >+ <applyto>/apps/gnome-terminal/profiles/Default/alternate_screen_scroll</applyto> >+ <owner>gnome-terminal</owner> >+ <type>bool</type> >+ <default>true</default> >+ <locale name="C"> >+ <short>Whether to use keystrokes for alternate screen scrolling</short> >+ <long> >+ If true, use Up/Down keystrokes for scrolling when using alternate screen >+ or when scrolling is restricted. >+ </long> >+ </locale> >+ </schema> >+ >+ <schema> > <key>/schemas/apps/gnome-terminal/profiles/Default/exit_action</key> > <applyto>/apps/gnome-terminal/profiles/Default/exit_action</applyto> > <owner>gnome-terminal</owner> >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) > {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 226393
:
156653
|
156655
|
156669
| 156671