Mercurial > emacs
changeset 105522:695dbf5b3bb9
gtkutil.c (create_menus): Call gtk_widget_set_size_request for
menu bar with a small width so it doesn't enlarge the frame.
author | Jan Djärv <jan.h.d@swipnet.se> |
---|---|
date | Thu, 08 Oct 2009 15:18:15 +0000 |
parents | 825191b3e4f4 |
children | 54704a452681 |
files | src/ChangeLog src/gtkutil.c |
diffstat | 2 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog Thu Oct 08 14:09:09 2009 +0000 +++ b/src/ChangeLog Thu Oct 08 15:18:15 2009 +0000 @@ -1,3 +1,8 @@ +2009-10-08 Jan Djärv <jan.h.d@swipnet.se> + + * gtkutil.c (create_menus): Call gtk_widget_set_size_request for + menu bar with a small width so it doesn't enlarge the frame. + 2009-10-08 Juanma Barranquero <lekktu@gmail.com> * fontset.c (Fset_fontset_font): Fix typos in error messages.
--- a/src/gtkutil.c Thu Oct 08 14:09:09 2009 +0000 +++ b/src/gtkutil.c Thu Oct 08 15:18:15 2009 +0000 @@ -2194,7 +2194,15 @@ G_CALLBACK (menuitem_highlight_callback), NULL); } - else wmenu = gtk_menu_bar_new (); + else + { + wmenu = gtk_menu_bar_new (); + // Set width of menu bar to a small value so it doesn't enlarge + // a small initial frame size. The width will be set to the + // width of the frame later on when it is added to a container. + // height -1: Natural height. + gtk_widget_set_size_request (wmenu, 1, -1); + } /* Put cl_data on the top menu for easier access. */ cl_data = make_cl_data (cl_data, f, highlight_cb);