]> Pileus Git - ~andy/gtk/commitdiff
Don't force the height of the action area, we don't scroll it anyway, and
authorMatthias Clasen <mclasen@redhat.com>
Sun, 31 Oct 2004 19:10:29 +0000 (19:10 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sun, 31 Oct 2004 19:10:29 +0000 (19:10 +0000)
2004-10-31  Matthias Clasen  <mclasen@redhat.com>

* gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup):
Don't force the height of the action area, we don't scroll
it anyway, and the current way of calculating the height can lead
to broken display.  (#156573, Christian Persch)

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkentrycompletion.c

index 765a7bb846f5823cab9b9bbb007eb322cea58288..81a75c176a6927fd95d7bd83aa00d901acf44538 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2004-10-31  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): 
+       Don't force the height of the action area, we don't scroll 
+       it anyway, and the current way of calculating the height can lead
+       to broken display.  (#156573, Christian Persch)
+
        * tests/testentrycompletion.c (animation_timer): Don't try to
        remove stuff from an empty model.  (#156575, Christian Persch)
 
index 765a7bb846f5823cab9b9bbb007eb322cea58288..81a75c176a6927fd95d7bd83aa00d901acf44538 100644 (file)
@@ -1,5 +1,10 @@
 2004-10-31  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): 
+       Don't force the height of the action area, we don't scroll 
+       it anyway, and the current way of calculating the height can lead
+       to broken display.  (#156573, Christian Persch)
+
        * tests/testentrycompletion.c (animation_timer): Don't try to
        remove stuff from an empty model.  (#156575, Christian Persch)
 
index 765a7bb846f5823cab9b9bbb007eb322cea58288..81a75c176a6927fd95d7bd83aa00d901acf44538 100644 (file)
@@ -1,5 +1,10 @@
 2004-10-31  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): 
+       Don't force the height of the action area, we don't scroll 
+       it anyway, and the current way of calculating the height can lead
+       to broken display.  (#156573, Christian Persch)
+
        * tests/testentrycompletion.c (animation_timer): Don't try to
        remove stuff from an empty model.  (#156575, Christian Persch)
 
index 765a7bb846f5823cab9b9bbb007eb322cea58288..81a75c176a6927fd95d7bd83aa00d901acf44538 100644 (file)
@@ -1,5 +1,10 @@
 2004-10-31  Matthias Clasen  <mclasen@redhat.com>
 
+       * gtk/gtkentrycompletion.c (_gtk_entry_completion_resize_popup): 
+       Don't force the height of the action area, we don't scroll 
+       it anyway, and the current way of calculating the height can lead
+       to broken display.  (#156573, Christian Persch)
+
        * tests/testentrycompletion.c (animation_timer): Don't try to
        remove stuff from an empty model.  (#156575, Christian Persch)
 
index fabd61caed8f3717c2a951ba67a248bb9bded918..dfc72de15d3f42a67aa07edca27e66b1610ec7a8 100644 (file)
@@ -1284,6 +1284,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
   gtk_tree_view_column_cell_get_size (completion->priv->column, NULL,
                                       NULL, NULL, NULL, &height);
 
+  g_print ("item height %d\n", height);
   if (items <= 0)
     gtk_widget_hide (completion->priv->scrolled_window);
   else
@@ -1294,9 +1295,8 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
                                                  GTK_WIDGET (completion->priv->entry)->window);
   gdk_screen_get_monitor_geometry (screen, monitor_num, &monitor);
 
-  width = MIN (completion->priv->entry->allocation.width, monitor.width);
-  gtk_widget_set_size_request (completion->priv->tree_view,
-                               width - 2 * x_border, items * height);
+  width = MIN (completion->priv->entry->allocation.width, monitor.width) - 2 * x_border;
+  gtk_widget_set_size_request (completion->priv->tree_view, width, items * height);
 
   /* default on no match */
   completion->priv->current_selected = -1;
@@ -1306,13 +1306,7 @@ _gtk_entry_completion_resize_popup (GtkEntryCompletion *completion)
   if (items)
     {
       gtk_widget_show (completion->priv->action_view);
-
-      gtk_tree_view_column_cell_get_size (gtk_tree_view_get_column (GTK_TREE_VIEW (completion->priv->action_view), 0),
-                                          NULL, NULL, NULL, NULL,
-                                          &height);
-
-      gtk_widget_set_size_request (completion->priv->action_view,
-                                   width - 2 * x_border, items * height);
+      gtk_widget_set_size_request (completion->priv->action_view, width, -1);
     }
   else
     gtk_widget_hide (completion->priv->action_view);