[nautilus/wip/csoriano/destktop-split2: 32/33] pathbar: avoid gtk+ warnings



commit 932cca0ba8585f130345c519c2c5ab500ae83bac
Author: Carlos Soriano <csoriano gnome org>
Date:   Mon Mar 21 22:23:37 2016 +0100

    pathbar: avoid gtk+ warnings
    
    If we don't request the slider preferred size in allocation, gtk+
    triggers a warning.
    
    The code of the path bar shouldn't do what is doing, and now gtk+ warns
    about it. In order to fix it, request the preferred size in size_allocate.

 src/nautilus-pathbar.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 1fb2179..64d5adc 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -623,6 +623,9 @@ nautilus_path_bar_size_allocate (GtkWidget     *widget,
                 return;
        }
         direction = gtk_widget_get_direction (widget);
+       gtk_widget_get_preferred_width (path_bar->priv->up_slider_button,
+                                       &path_bar->priv->slider_width,
+                                       NULL);
 
        /* First, we check to see if we need the scrollbars. */
        width = 0;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]