Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 226393 | Differences between
and this patch

Collapse All | Expand All

(-)gnome-terminal-2.22.2/src/gnome-terminal.glade2 (-1 / +37 lines)
Lines 3439-3445 Hold the terminal open</property> Link Here
3439
		  <child>
3439
		  <child>
3440
		    <widget class="GtkTable" id="table27">
3440
		    <widget class="GtkTable" id="table27">
3441
		      <property name="visible">True</property>
3441
		      <property name="visible">True</property>
3442
		      <property name="n_rows">4</property>
3442
		      <property name="n_rows">5</property>
3443
		      <property name="n_columns">3</property>
3443
		      <property name="n_columns">3</property>
3444
		      <property name="homogeneous">False</property>
3444
		      <property name="homogeneous">False</property>
3445
		      <property name="row_spacing">6</property>
3445
		      <property name="row_spacing">6</property>
Lines 3698-3703 Hold the terminal open</property> Link Here
3698
		      </child>
3698
		      </child>
3699
3699
3700
		      <child>
3700
		      <child>
3701
			<widget class="GtkAlignment" id="alignment12">
3702
			  <property name="visible">True</property>
3703
			  <property name="xalign">1.49012002737e-08</property>
3704
			  <property name="yalign">0.5</property>
3705
			  <property name="xscale">0</property>
3706
			  <property name="yscale">1</property>
3707
			  <property name="top_padding">0</property>
3708
			  <property name="bottom_padding">0</property>
3709
			  <property name="left_padding">0</property>
3710
			  <property name="right_padding">0</property>
3711
3712
			  <child>
3713
			    <widget class="GtkCheckButton" id="alternate-screen-scroll-checkbutton">
3714
			      <property name="visible">True</property>
3715
			      <property name="can_focus">True</property>
3716
			      <property name="label" translatable="yes">Use keystrokes to scroll on _alternate screen</property>
3717
			      <property name="use_underline">True</property>
3718
			      <property name="relief">GTK_RELIEF_NORMAL</property>
3719
			      <property name="focus_on_click">True</property>
3720
			      <property name="active">False</property>
3721
			      <property name="inconsistent">False</property>
3722
			      <property name="draw_indicator">True</property>
3723
			    </widget>
3724
			  </child>
3725
			</widget>
3726
			<packing>
3727
			  <property name="left_attach">0</property>
3728
			  <property name="right_attach">3</property>
3729
			  <property name="top_attach">4</property>
3730
			  <property name="bottom_attach">5</property>
3731
			  <property name="x_options">fill</property>
3732
			  <property name="y_options"></property>
3733
			</packing>
3734
		      </child>
3735
3736
		      <child>
3701
			<widget class="GtkComboBox" id="scrollbar-position-combobox">
3737
			<widget class="GtkComboBox" id="scrollbar-position-combobox">
3702
			  <property name="visible">True</property>
3738
			  <property name="visible">True</property>
3703
			  <property name="items" translatable="yes">On the left side
3739
			  <property name="items" translatable="yes">On the left side
(-)gnome-terminal-2.22.2/src/gnome-terminal.schemas.in (+15 lines)
Lines 326-331 Link Here
326
    </schema>
326
    </schema>
327
327
328
    <schema>
328
    <schema>
329
      <key>/schemas/apps/gnome-terminal/profiles/Default/alternate_screen_scroll</key>
330
      <applyto>/apps/gnome-terminal/profiles/Default/alternate_screen_scroll</applyto>
331
      <owner>gnome-terminal</owner>
332
      <type>bool</type>
333
      <default>true</default>
334
      <locale name="C">
335
         <short>Whether to use keystrokes for alternate screen scrolling</short>
336
         <long>
337
          If true, use Up/Down keystrokes for scrolling when using alternate screen
338
	  or when scrolling is restricted.
339
         </long>
340
      </locale>
341
    </schema>
342
343
    <schema>
329
      <key>/schemas/apps/gnome-terminal/profiles/Default/exit_action</key>
344
      <key>/schemas/apps/gnome-terminal/profiles/Default/exit_action</key>
330
      <applyto>/apps/gnome-terminal/profiles/Default/exit_action</applyto>
345
      <applyto>/apps/gnome-terminal/profiles/Default/exit_action</applyto>
331
      <owner>gnome-terminal</owner>
346
      <owner>gnome-terminal</owner>
(-)gnome-terminal-2.22.2/src/profile-editor.c (+34 lines)
Lines 104-109 static void profile_editor_update_ Link Here
104
                                                              TerminalProfile *profile);
104
                                                              TerminalProfile *profile);
105
static void       profile_editor_update_scroll_on_output     (GtkWidget       *widget,
105
static void       profile_editor_update_scroll_on_output     (GtkWidget       *widget,
106
                                                              TerminalProfile *profile);
106
                                                              TerminalProfile *profile);
107
static void       profile_editor_update_alternate_screen_scroll (GtkWidget       *widget,
108
                                                                 TerminalProfile *profile);
107
static void       profile_editor_update_exit_action          (GtkWidget       *widget,
109
static void       profile_editor_update_exit_action          (GtkWidget       *widget,
108
                                                              TerminalProfile *profile);
110
                                                              TerminalProfile *profile);
109
static void       profile_editor_update_login_shell          (GtkWidget       *widget,
111
static void       profile_editor_update_login_shell          (GtkWidget       *widget,
Lines 287-292 profile_changed (TerminalProfile Link Here
287
  if (mask->scroll_on_output)
289
  if (mask->scroll_on_output)
288
    profile_editor_update_scroll_on_output (editor, profile);
290
    profile_editor_update_scroll_on_output (editor, profile);
289
291
292
  if (mask->alternate_screen_scroll)
293
    profile_editor_update_alternate_screen_scroll (editor, profile);
294
290
  if (mask->exit_action)
295
  if (mask->exit_action)
291
    profile_editor_update_exit_action (editor, profile);
296
    profile_editor_update_exit_action (editor, profile);
292
297
Lines 524-529 scroll_on_output_toggled (GtkWidget Link Here
524
}
529
}
525
530
526
static void
531
static void
532
alternate_screen_scroll_toggled (GtkWidget       *checkbutton,
533
                          TerminalProfile *profile)
534
{
535
  terminal_profile_set_alternate_screen_scroll (profile,
536
                                         gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)));
537
}
538
539
static void
527
exit_action_changed (GtkWidget       *combo_box,
540
exit_action_changed (GtkWidget       *combo_box,
528
                     TerminalProfile *profile)
541
                     TerminalProfile *profile)
529
{
542
{
Lines 1082-1087 terminal_profile_edit (TerminalProfile * Link Here
1082
                        G_CALLBACK (scroll_on_output_toggled),
1095
                        G_CALLBACK (scroll_on_output_toggled),
1083
                        profile);
1096
                        profile);
1084
1097
1098
      w = glade_xml_get_widget (xml, "alternate-screen-scroll-checkbutton");
1099
      profile_editor_update_alternate_screen_scroll (editor, profile);
1100
      g_signal_connect (G_OBJECT (w), "toggled",
1101
                        G_CALLBACK (alternate_screen_scroll_toggled),
1102
                        profile);
1103
1085
      w = glade_xml_get_widget (xml, "exit-action-combobox");
1104
      w = glade_xml_get_widget (xml, "exit-action-combobox");
1086
      profile_editor_update_exit_action (editor, profile);
1105
      profile_editor_update_exit_action (editor, profile);
1087
      g_signal_connect (G_OBJECT (w), "changed",
1106
      g_signal_connect (G_OBJECT (w), "changed",
Lines 1437-1442 profile_editor_update_sensitivity (GtkWi Link Here
1437
  set_insensitive (editor, "scroll-on-output-checkbutton",
1456
  set_insensitive (editor, "scroll-on-output-checkbutton",
1438
                   mask->scroll_on_output);
1457
                   mask->scroll_on_output);
1439
1458
1459
  set_insensitive (editor, "alternate-screen-scroll-checkbutton",
1460
                   mask->alternate_screen_scroll);
1461
1440
  set_insensitive (editor, "exit-action-combobox",
1462
  set_insensitive (editor, "exit-action-combobox",
1441
                   mask->exit_action);
1463
                   mask->exit_action);
1442
1464
Lines 1701-1706 profile_editor_update_scroll_on_output ( Link Here
1701
}
1723
}
1702
1724
1703
static void
1725
static void
1726
profile_editor_update_alternate_screen_scroll (GtkWidget       *editor,
1727
                                               TerminalProfile *profile)
1728
{
1729
  GtkWidget *w;
1730
1731
  w = profile_editor_get_widget (editor, "alternate-screen-scroll-checkbutton");
1732
  
1733
  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w),
1734
                                terminal_profile_get_alternate_screen_scroll (profile));
1735
}
1736
1737
static void
1704
profile_editor_update_exit_action (GtkWidget       *editor,
1738
profile_editor_update_exit_action (GtkWidget       *editor,
1705
                                   TerminalProfile *profile)
1739
                                   TerminalProfile *profile)
1706
{
1740
{
(-)gnome-terminal-2.22.2/src/terminal-profile.c (+45 lines)
Lines 51-56 Link Here
51
#define KEY_SCROLLBACK_LINES "scrollback_lines"
51
#define KEY_SCROLLBACK_LINES "scrollback_lines"
52
#define KEY_SCROLL_ON_KEYSTROKE "scroll_on_keystroke"
52
#define KEY_SCROLL_ON_KEYSTROKE "scroll_on_keystroke"
53
#define KEY_SCROLL_ON_OUTPUT "scroll_on_output"
53
#define KEY_SCROLL_ON_OUTPUT "scroll_on_output"
54
#define KEY_ALTERNATE_SCREEN_SCROLL "alternate_screen_scroll"
54
#define KEY_EXIT_ACTION "exit_action"
55
#define KEY_EXIT_ACTION "exit_action"
55
#define KEY_LOGIN_SHELL "login_shell"
56
#define KEY_LOGIN_SHELL "login_shell"
56
#define KEY_UPDATE_RECORDS "update_records"
57
#define KEY_UPDATE_RECORDS "update_records"
Lines 118-123 struct _TerminalProfilePrivate Link Here
118
  guint silent_bell : 1;
119
  guint silent_bell : 1;
119
  guint scroll_on_keystroke : 1;
120
  guint scroll_on_keystroke : 1;
120
  guint scroll_on_output : 1;
121
  guint scroll_on_output : 1;
122
  guint alternate_screen_scroll : 1;
121
  guint login_shell : 1;
123
  guint login_shell : 1;
122
  guint update_records : 1;
124
  guint update_records : 1;
123
  guint use_custom_command : 1;
125
  guint use_custom_command : 1;
Lines 538-543 terminal_profile_set_scroll_on_output (T Link Here
538
  g_free (key);
540
  g_free (key);
539
}
541
}
540
542
543
544
gboolean
545
terminal_profile_get_alternate_screen_scroll (TerminalProfile  *profile)
546
{
547
    g_return_val_if_fail (TERMINAL_IS_PROFILE (profile), FALSE);
548
549
  return profile->priv->alternate_screen_scroll;
550
}
551
552
553
void
554
terminal_profile_set_alternate_screen_scroll (TerminalProfile  *profile,
555
					      gboolean          setting)
556
{
557
  char *key;
558
559
  RETURN_IF_NOTIFYING (profile);
560
  
561
  key = gconf_concat_dir_and_key (profile->priv->profile_dir,
562
                                  KEY_ALTERNATE_SCREEN_SCROLL);
563
  
564
  gconf_client_set_bool (profile->priv->conf,
565
                         key,
566
                         setting,
567
                         NULL);
568
569
  g_free (key);
570
}
571
572
541
TerminalScrollbarPosition
573
TerminalScrollbarPosition
542
terminal_profile_get_scrollbar_position (TerminalProfile  *profile)
574
terminal_profile_get_scrollbar_position (TerminalProfile  *profile)
543
{
575
{
Lines 1919-1924 terminal_profile_update (TerminalProfile Link Here
1919
  UPDATE_INTEGER (KEY_SCROLLBACK_LINES,     scrollback_lines);
1951
  UPDATE_INTEGER (KEY_SCROLLBACK_LINES,     scrollback_lines);
1920
  UPDATE_BOOLEAN (KEY_SCROLL_ON_KEYSTROKE,  scroll_on_keystroke);
1952
  UPDATE_BOOLEAN (KEY_SCROLL_ON_KEYSTROKE,  scroll_on_keystroke);
1921
  UPDATE_BOOLEAN (KEY_SCROLL_ON_OUTPUT,     scroll_on_output);
1953
  UPDATE_BOOLEAN (KEY_SCROLL_ON_OUTPUT,     scroll_on_output);
1954
  UPDATE_BOOLEAN (KEY_ALTERNATE_SCREEN_SCROLL, alternate_screen_scroll);
1922
  UPDATE_STRING  (KEY_EXIT_ACTION,          exit_action);
1955
  UPDATE_STRING  (KEY_EXIT_ACTION,          exit_action);
1923
  UPDATE_BOOLEAN (KEY_LOGIN_SHELL,          login_shell);
1956
  UPDATE_BOOLEAN (KEY_LOGIN_SHELL,          login_shell);
1924
  UPDATE_BOOLEAN (KEY_UPDATE_RECORDS,       update_records);
1957
  UPDATE_BOOLEAN (KEY_UPDATE_RECORDS,       update_records);
Lines 2064-2069 else if (strcmp (key, KName) == 0) Link Here
2064
     UPDATE_INTEGER (KEY_SCROLLBACK_LINES,       scrollback_lines,       profile->priv->scrollback_lines);
2097
     UPDATE_INTEGER (KEY_SCROLLBACK_LINES,       scrollback_lines,       profile->priv->scrollback_lines);
2065
     UPDATE_BOOLEAN (KEY_SCROLL_ON_KEYSTROKE, 	 scroll_on_keystroke,    FALSE);
2098
     UPDATE_BOOLEAN (KEY_SCROLL_ON_KEYSTROKE, 	 scroll_on_keystroke,    FALSE);
2066
     UPDATE_BOOLEAN (KEY_SCROLL_ON_OUTPUT,       scroll_on_output,       FALSE);
2099
     UPDATE_BOOLEAN (KEY_SCROLL_ON_OUTPUT,       scroll_on_output,       FALSE);
2100
     UPDATE_BOOLEAN (KEY_ALTERNATE_SCREEN_SCROLL, alternate_screen_scroll, FALSE);
2067
     UPDATE_STRING  (KEY_EXIT_ACTION,            exit_action,            NULL);
2101
     UPDATE_STRING  (KEY_EXIT_ACTION,            exit_action,            NULL);
2068
     UPDATE_BOOLEAN (KEY_LOGIN_SHELL,            login_shell,            FALSE);
2102
     UPDATE_BOOLEAN (KEY_LOGIN_SHELL,            login_shell,            FALSE);
2069
     UPDATE_BOOLEAN (KEY_UPDATE_RECORDS,         update_records,         FALSE);
2103
     UPDATE_BOOLEAN (KEY_UPDATE_RECORDS,         update_records,         FALSE);
Lines 2662-2667 terminal_profile_create (TerminalProfile Link Here
2662
2696
2663
  BAIL_OUT_CHECK ();
2697
  BAIL_OUT_CHECK ();
2664
2698
2699
  g_free (key);
2700
  key = gconf_concat_dir_and_key (profile_dir,
2701
                                  KEY_ALTERNATE_SCREEN_SCROLL);
2702
2703
  gconf_client_set_bool (base_profile->priv->conf,
2704
                         key,
2705
                         base_profile->priv->alternate_screen_scroll,
2706
                         &err);
2707
2708
  BAIL_OUT_CHECK ();
2709
2665
2710
2666
  g_free (key);
2711
  g_free (key);
2667
  key = gconf_concat_dir_and_key (profile_dir,
2712
  key = gconf_concat_dir_and_key (profile_dir,
(-)gnome-terminal-2.22.2/src/terminal-profile.h (+4 lines)
Lines 47-52 typedef struct Link Here
47
  unsigned int scrollback_lines : 1;
47
  unsigned int scrollback_lines : 1;
48
  unsigned int scroll_on_keystroke : 1;
48
  unsigned int scroll_on_keystroke : 1;
49
  unsigned int scroll_on_output : 1;
49
  unsigned int scroll_on_output : 1;
50
  unsigned int alternate_screen_scroll : 1;
50
  unsigned int exit_action : 1;
51
  unsigned int exit_action : 1;
51
  unsigned int login_shell : 1;
52
  unsigned int login_shell : 1;
52
  unsigned int update_records : 1;
53
  unsigned int update_records : 1;
Lines 158-163 gboolean terminal_profi Link Here
158
gboolean                  terminal_profile_get_default_show_menubar (TerminalProfile *profile);
159
gboolean                  terminal_profile_get_default_show_menubar (TerminalProfile *profile);
159
gboolean                  terminal_profile_get_scroll_on_keystroke  (TerminalProfile *profile);
160
gboolean                  terminal_profile_get_scroll_on_keystroke  (TerminalProfile *profile);
160
gboolean                  terminal_profile_get_scroll_on_output     (TerminalProfile *profile);
161
gboolean                  terminal_profile_get_scroll_on_output     (TerminalProfile *profile);
162
gboolean                  terminal_profile_get_alternate_screen_scroll (TerminalProfile *profile);
161
163
162
TerminalExitAction        terminal_profile_get_exit_action          (TerminalProfile *profile);
164
TerminalExitAction        terminal_profile_get_exit_action          (TerminalProfile *profile);
163
gboolean                  terminal_profile_get_login_shell          (TerminalProfile *profile);
165
gboolean                  terminal_profile_get_login_shell          (TerminalProfile *profile);
Lines 210-215 void terminal_profile_set_scroll_on_keys Link Here
210
                                                gboolean                   setting);
212
                                                gboolean                   setting);
211
void terminal_profile_set_scroll_on_output     (TerminalProfile           *profile,
213
void terminal_profile_set_scroll_on_output     (TerminalProfile           *profile,
212
                                                gboolean                   setting);
214
                                                gboolean                   setting);
215
void terminal_profile_set_alternate_screen_scroll (TerminalProfile           *profile,
216
                                                   gboolean                   setting);
213
217
214
void terminal_profile_set_exit_action          (TerminalProfile           *profile,
218
void terminal_profile_set_exit_action          (TerminalProfile           *profile,
215
                                                TerminalExitAction         action);
219
                                                TerminalExitAction         action);
(-)gnome-terminal-2.22.2/src/terminal-screen.c (+3 lines)
Lines 642-647 terminal_screen_reread_profile (Terminal Link Here
642
  terminal_widget_set_scroll_on_output (term,
642
  terminal_widget_set_scroll_on_output (term,
643
                                        terminal_profile_get_scroll_on_output (profile));
643
                                        terminal_profile_get_scroll_on_output (profile));
644
644
645
  terminal_widget_set_alternate_screen_scroll (term,
646
                                               terminal_profile_get_alternate_screen_scroll (profile));
647
645
  terminal_widget_set_scrollback_lines (term,
648
  terminal_widget_set_scrollback_lines (term,
646
                                        terminal_profile_get_scrollback_lines (profile));
649
                                        terminal_profile_get_scrollback_lines (profile));
647
650
(-)gnome-terminal-2.22.2/src/terminal-widget.h (+2 lines)
Lines 79-84 void terminal_widget_set_scroll_on Link Here
79
                                                       gboolean              setting);
79
                                                       gboolean              setting);
80
void       terminal_widget_set_scroll_on_output       (GtkWidget            *widget,
80
void       terminal_widget_set_scroll_on_output       (GtkWidget            *widget,
81
                                                       gboolean              setting);
81
                                                       gboolean              setting);
82
void       terminal_widget_set_alternate_screen_scroll (GtkWidget            *widget,
83
                                                        gboolean              setting);
82
void       terminal_widget_set_scrollback_lines       (GtkWidget            *widget,
84
void       terminal_widget_set_scrollback_lines       (GtkWidget            *widget,
83
                                                       int                   lines);
85
                                                       int                   lines);
84
void       terminal_widget_set_background_image       (GtkWidget            *widget,
86
void       terminal_widget_set_background_image       (GtkWidget            *widget,
(-)gnome-terminal-2.22.2/src/terminal-widget-vte.c (+8 lines)
Lines 328-333 terminal_widget_set_scroll_on_output (Gt Link Here
328
}
328
}
329
329
330
void
330
void
331
terminal_widget_set_alternate_screen_scroll (GtkWidget *widget,
332
                                             gboolean   setting)
333
{
334
  g_return_if_fail(VTE_IS_TERMINAL(widget));
335
  vte_terminal_set_alternate_screen_scroll(VTE_TERMINAL(widget), setting);
336
}
337
338
void
331
terminal_widget_set_scrollback_lines (GtkWidget *widget,
339
terminal_widget_set_scrollback_lines (GtkWidget *widget,
332
				      int        lines)
340
				      int        lines)
333
{
341
{

Return to bug 226393