comparison src/gtkutil.c @ 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 9653887b5cd0
children 68dd71358159
comparison
equal deleted inserted replaced
105521:825191b3e4f4 105522:695dbf5b3bb9
2192 g_signal_connect (G_OBJECT (wmenu), 2192 g_signal_connect (G_OBJECT (wmenu),
2193 "leave-notify-event", 2193 "leave-notify-event",
2194 G_CALLBACK (menuitem_highlight_callback), 2194 G_CALLBACK (menuitem_highlight_callback),
2195 NULL); 2195 NULL);
2196 } 2196 }
2197 else wmenu = gtk_menu_bar_new (); 2197 else
2198 {
2199 wmenu = gtk_menu_bar_new ();
2200 // Set width of menu bar to a small value so it doesn't enlarge
2201 // a small initial frame size. The width will be set to the
2202 // width of the frame later on when it is added to a container.
2203 // height -1: Natural height.
2204 gtk_widget_set_size_request (wmenu, 1, -1);
2205 }
2198 2206
2199 /* Put cl_data on the top menu for easier access. */ 2207 /* Put cl_data on the top menu for easier access. */
2200 cl_data = make_cl_data (cl_data, f, highlight_cb); 2208 cl_data = make_cl_data (cl_data, f, highlight_cb);
2201 g_object_set_data (G_OBJECT (wmenu), XG_FRAME_DATA, (gpointer)cl_data); 2209 g_object_set_data (G_OBJECT (wmenu), XG_FRAME_DATA, (gpointer)cl_data);
2202 g_signal_connect (G_OBJECT (wmenu), "destroy", 2210 g_signal_connect (G_OBJECT (wmenu), "destroy",