aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan D2010-05-08 14:04:47 +0200
committerJan D2010-05-08 14:04:47 +0200
commit4721152c32bf2f4fac259c0c6c7566b2bc0854d2 (patch)
tree426a0fffc1047b6778628e9859a95e46cfc7a644
parentee0a16cf18096dfa91c5868ba7fbefa59cd2904e (diff)
downloademacs-4721152c32bf2f4fac259c0c6c7566b2bc0854d2.tar.gz
emacs-4721152c32bf2f4fac259c0c6c7566b2bc0854d2.zip
Fix bug #6139, text is briefly shown in tool bar on startup.
* xsettings.c (Ftool_bar_get_system_style): Correct comment. * gtkutil.c (xg_pack_tool_bar): Change show_all to show for handle box and toolbar (Bug #6139). (xg_create_tool_bar): Remove comment (Bug #6139). (xg_make_tool_item): Remove gtk_widget_show_all (Bug #6139). (xg_show_toolbar_item): Add gtk_widget_show for weventbox (Bug #6139).
-rw-r--r--src/ChangeLog10
-rw-r--r--src/gtkutil.c14
-rw-r--r--src/xsettings.c2
3 files changed, 15 insertions, 11 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index cbe7633c8af..a3047503849 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,13 @@
12010-05-08 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xsettings.c (Ftool_bar_get_system_style): Correct comment.
4
5 * gtkutil.c (xg_pack_tool_bar): Change show_all to show for handle
6 box and toolbar (Bug #6139).
7 (xg_create_tool_bar): Remove comment (Bug #6139).
8 (xg_make_tool_item): Remove gtk_widget_show_all (Bug #6139).
9 (xg_show_toolbar_item): Add gtk_widget_show for weventbox (Bug #6139).
10
12010-05-08 Juanma Barranquero <lekktu@gmail.com> 112010-05-08 Juanma Barranquero <lekktu@gmail.com>
2 12
3 * makefile.w32-in ($(BLD)/eval.$(O), $(BLD)/w32fns.$(O)): 13 * makefile.w32-in ($(BLD)/eval.$(O), $(BLD)/w32fns.$(O)):
diff --git a/src/gtkutil.c b/src/gtkutil.c
index c0e5c6f970f..c8800817b68 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -3778,7 +3778,9 @@ xg_pack_tool_bar (f)
3778 3778
3779 gtk_box_reorder_child (GTK_BOX (x->vbox_widget), x->handlebox_widget, 3779 gtk_box_reorder_child (GTK_BOX (x->vbox_widget), x->handlebox_widget,
3780 vbox_pos); 3780 vbox_pos);
3781 gtk_widget_show_all (x->handlebox_widget); 3781
3782 gtk_widget_show (x->toolbar_widget);
3783 gtk_widget_show (x->handlebox_widget);
3782} 3784}
3783 3785
3784/* Create a tool bar for frame F. */ 3786/* Create a tool bar for frame F. */
@@ -3794,13 +3796,6 @@ xg_create_tool_bar (f)
3794 3796
3795 gtk_widget_set_name (x->toolbar_widget, "emacs-toolbar"); 3797 gtk_widget_set_name (x->toolbar_widget, "emacs-toolbar");
3796 3798
3797 /* We only have icons, so override any user setting. We could
3798 use the caption property of the toolbar item (see update_frame_tool_bar
3799 below), but some of those strings are long, making the toolbar so
3800 long it does not fit on the screen. The GtkToolbar widget makes every
3801 item equal size, so the longest caption determine the size of every
3802 tool bar item. I think the creators of the GtkToolbar widget
3803 counted on 4 or 5 character long strings. */
3804 gtk_toolbar_set_style (GTK_TOOLBAR (x->toolbar_widget), GTK_TOOLBAR_ICONS); 3799 gtk_toolbar_set_style (GTK_TOOLBAR (x->toolbar_widget), GTK_TOOLBAR_ICONS);
3805 gtk_toolbar_set_orientation (GTK_TOOLBAR (x->toolbar_widget), 3800 gtk_toolbar_set_orientation (GTK_TOOLBAR (x->toolbar_widget),
3806 GTK_ORIENTATION_HORIZONTAL); 3801 GTK_ORIENTATION_HORIZONTAL);
@@ -3877,8 +3872,6 @@ xg_make_tool_item (FRAME_PTR f,
3877 G_CALLBACK (xg_tool_bar_callback), 3872 G_CALLBACK (xg_tool_bar_callback),
3878 (gpointer) (EMACS_INT) i); 3873 (gpointer) (EMACS_INT) i);
3879 3874
3880 gtk_widget_show_all (GTK_WIDGET (ti));
3881
3882 g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f); 3875 g_object_set_data (G_OBJECT (weventbox), XG_FRAME_DATA, (gpointer)f);
3883 3876
3884 /* Catch expose events to overcome an annoying redraw bug, see 3877 /* Catch expose events to overcome an annoying redraw bug, see
@@ -3963,6 +3956,7 @@ xg_show_toolbar_item (GtkToolItem *ti)
3963 else gtk_widget_hide (wlbl); 3956 else gtk_widget_hide (wlbl);
3964 if (show_image) gtk_widget_show (wimage); 3957 if (show_image) gtk_widget_show (wimage);
3965 else gtk_widget_hide (wimage); 3958 else gtk_widget_hide (wimage);
3959 gtk_widget_show (GTK_WIDGET (weventbox));
3966 gtk_widget_show (GTK_WIDGET (vb)); 3960 gtk_widget_show (GTK_WIDGET (vb));
3967 gtk_widget_show (GTK_WIDGET (wbutton)); 3961 gtk_widget_show (GTK_WIDGET (wbutton));
3968 gtk_widget_show (GTK_WIDGET (ti)); 3962 gtk_widget_show (GTK_WIDGET (ti));
diff --git a/src/xsettings.c b/src/xsettings.c
index 49d4d5cc743..f1b4c8c9b23 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -740,7 +740,7 @@ DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font,
740DEFUN ("tool-bar-get-system-style", Ftool_bar_get_system_style, Stool_bar_get_system_style, 740DEFUN ("tool-bar-get-system-style", Ftool_bar_get_system_style, Stool_bar_get_system_style,
741 0, 0, 0, 741 0, 0, 0,
742 doc: /* Get the system tool bar style. 742 doc: /* Get the system tool bar style.
743If no system tool bar style is known, return `tool-bar-style' is set to a 743If no system tool bar style is known, return `tool-bar-style' if set to a
744known style. Otherwise return image. */) 744known style. Otherwise return image. */)
745 () 745 ()
746{ 746{