summaryrefslogtreecommitdiff
path: root/gtk/gtkmenubar.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-09-09 15:35:58 +0200
committerJavier Jardón <jjardon@gnome.org>2010-09-13 21:26:01 +0200
commit9e81022bf6b7a5c25584b9eeea360cdf38cd6949 (patch)
tree3b2d02c989bb9042087b384b8637d19dc9e807e2 /gtk/gtkmenubar.c
parent153bfacde0d9c7a533c0936f3078db58cf672aac (diff)
downloadgtk+-9e81022bf6b7a5c25584b9eeea360cdf38cd6949.tar.gz
Use gtk_size_request_get_size() instead deprecated gtk_widget_get_child_requisition()
Fixes https://bugzilla.gnome.org/show_bug.cgi?id=629177
Diffstat (limited to 'gtk/gtkmenubar.c')
-rw-r--r--gtk/gtkmenubar.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/gtk/gtkmenubar.c b/gtk/gtkmenubar.c
index 1cc65e60e4..26d41ef6e2 100644
--- a/gtk/gtkmenubar.c
+++ b/gtk/gtkmenubar.c
@@ -25,16 +25,20 @@
*/
#include "config.h"
+
+#include "gtkmenubar.h"
+
#include "gdk/gdkkeysyms.h"
#include "gtkbindings.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
-#include "gtkmenubar.h"
#include "gtkmenuitem.h"
#include "gtkmenuprivate.h"
#include "gtksettings.h"
-#include "gtkintl.h"
+#include "gtksizerequest.h"
#include "gtkwindow.h"
+
+#include "gtkintl.h"
#include "gtkprivate.h"
#define BORDER_SPACING 0
@@ -424,8 +428,9 @@ gtk_menu_bar_size_allocate (GtkWidget *widget,
gtk_menu_item_toggle_size_request (GTK_MENU_ITEM (child),
&toggle_size);
- gtk_widget_get_child_requisition (child, &child_requisition);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
+
if (priv->child_pack_direction == GTK_PACK_DIRECTION_LTR ||
priv->child_pack_direction == GTK_PACK_DIRECTION_RTL)
child_requisition.width += toggle_size;
@@ -474,8 +479,9 @@ gtk_menu_bar_size_allocate (GtkWidget *widget,
gtk_menu_item_toggle_size_request (GTK_MENU_ITEM (child),
&toggle_size);
- gtk_widget_get_child_requisition (child, &child_requisition);
-
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
+
if (priv->child_pack_direction == GTK_PACK_DIRECTION_LTR ||
priv->child_pack_direction == GTK_PACK_DIRECTION_RTL)
child_requisition.width += toggle_size;