1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
--- src/terminal-window.c 2006-05-25 12:31:18.000000000 -0500
+++ - 2006-05-25 12:33:48.497915000 -0500
@@ -1592,8 +1592,22 @@
if (window->priv->active_term == screen)
return;
+ /* Workaround to remove gtknotebook's feature of computing its size based on
+ * all pages. When the widget is hidden, its size will not be taken into
+ * account.
+ */
+ if (window->priv->active_term)
+ {
+ GtkWidget *old_widget;
+ old_widget = terminal_screen_get_widget (window->priv->active_term);
+ gtk_widget_hide (old_widget);
+ }
+
widget = terminal_screen_get_widget (screen);
+ /* Make sure that the widget is no longer hidden due to the workaround */
+ gtk_widget_show (widget);
+
profile = terminal_screen_get_profile (screen);
if (!GTK_WIDGET_REALIZED (widget))
@@ -1684,11 +1698,7 @@
TerminalScreen *screen;
GtkWidget *menu_item;
int old_grid_width, old_grid_height;
- GtkWidget *old_widget;
-
- old_widget = NULL;
- old_grid_width = -1;
- old_grid_height = -1;
+ GtkWidget *old_widget, *new_widget;
if (window->priv->active_term == NULL)
return;
@@ -1704,17 +1714,13 @@
screen = TERMINAL_SCREEN (page_widget);
g_assert (screen);
+
+ /* This is so that we maintain the same grid */
+ new_widget = terminal_screen_get_widget (screen);
+ terminal_widget_set_size (new_widget, old_grid_width, old_grid_height);
terminal_window_set_active (window, screen);
- /* This is so we maintain the same grid moving among tabs with
- * different fonts.
- */
-#ifdef DEBUG_GEOMETRY
- g_fprintf (stderr,"setting size in switch_page handler\n");
-#endif
- terminal_window_set_size_force_grid (window, screen, TRUE, old_grid_width, old_grid_height);
-
update_tab_sensitivity (window);
menu_item = screen_get_menuitem (screen);
|