[Xfce4-commits] <midori:master> Fix bug in size calculation for the history list popup

Christian Dywan noreply at xfce.org
Wed May 8 03:00:02 CEST 2013


Updating branch refs/heads/master
         to a83342032df8456a74d4137d9d79d418b020ca01 (commit)
       from 9fd03f325c45de86496dc1fe629dd479b010829c (commit)

commit a83342032df8456a74d4137d9d79d418b020ca01
Author: André Stösel <andre at stoesel.de>
Date:   Mon May 6 01:27:38 2013 +0200

    Fix bug in size calculation for the history list popup
    
    with GTK3 it is necessary to show the widget before the get_preferred_size call

 extensions/history-list.vala |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/extensions/history-list.vala b/extensions/history-list.vala
index 8aaea2a..79253a6 100644
--- a/extensions/history-list.vala
+++ b/extensions/history-list.vala
@@ -136,13 +136,14 @@ namespace HistoryList {
                 "foreground-gdk", TabTreeCells.TREE_CELL_FG,
                 "cell-background-gdk", TabTreeCells.TREE_CELL_BG);
 
+            this.show_all ();
+
             Requisition requisition;
             int height;
             int max_lines = 10;
 #if HAVE_GTK3
             requisition = Requisition();
-            this.treeview.get_preferred_width(out requisition.width, null);
-            this.treeview.get_preferred_height(out requisition.height, null);
+            this.treeview.get_preferred_size(out requisition, null);
 #else
             this.treeview.size_request (out requisition);
 #endif
@@ -153,8 +154,6 @@ namespace HistoryList {
                 height = requisition.height + 2;
             }
             sw.set_size_request (320, height);
-
-            this.show_all ();
         }
 
         public override void make_update () {


More information about the Xfce4-commits mailing list