summaryrefslogtreecommitdiff
path: root/gtk/gtkpathbar.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/gtkpathbar.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/gtkpathbar.c')
-rw-r--r--gtk/gtkpathbar.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/gtk/gtkpathbar.c b/gtk/gtkpathbar.c
index bef0f9fb9b..479120cbfc 100644
--- a/gtk/gtkpathbar.c
+++ b/gtk/gtkpathbar.c
@@ -19,8 +19,11 @@
*/
#include "config.h"
-#include <string.h>
+
#include "gtkpathbar.h"
+
+#include <string.h>
+
#include "gtktogglebutton.h"
#include "gtkalignment.h"
#include "gtkarrow.h"
@@ -33,6 +36,7 @@
#include "gtkhbox.h"
#include "gtkmain.h"
#include "gtkmarshalers.h"
+#include "gtksizerequest.h"
enum {
@@ -493,7 +497,8 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
{
child = BUTTON_DATA (list->data)->button;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
width += child_requisition.width + path_bar->spacing;
if (list == path_bar->fake_root)
@@ -523,7 +528,8 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
* button, then count backwards.
*/
/* Count down the path chain towards the end. */
- gtk_widget_get_child_requisition (BUTTON_DATA (first_button->data)->button, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (BUTTON_DATA (first_button->data)->button),
+ &child_requisition, NULL);
width = child_requisition.width;
list = first_button->prev;
@@ -531,7 +537,8 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
{
child = BUTTON_DATA (list->data)->button;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
if (width + child_requisition.width +
path_bar->spacing + slider_space > allocation_width)
@@ -550,7 +557,8 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
{
child = BUTTON_DATA (first_button->next->data)->button;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
if (width + child_requisition.width + path_bar->spacing + slider_space > allocation_width)
{
@@ -597,7 +605,8 @@ gtk_path_bar_size_allocate (GtkWidget *widget,
button_data = BUTTON_DATA (list->data);
child = button_data->button;
- gtk_widget_get_child_requisition (child, &child_requisition);
+ gtk_size_request_get_size (GTK_SIZE_REQUEST (child),
+ &child_requisition, NULL);
child_allocation.width = MIN (child_requisition.width,
allocation_width - (path_bar->spacing + path_bar->slider_width) * 2);