]> Pileus Git - ~andy/gtk/commitdiff
Temporary size requisition fix. Will fix it for real tonight.
authorKristian Rietveld <kris@gtk.org>
Mon, 17 Nov 2003 12:10:06 +0000 (12:10 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Mon, 17 Nov 2003 12:10:06 +0000 (12:10 +0000)
Mon Nov 17 12:58:32 2003  Kristian Rietveld  <kris@gtk.org>

Temporary size requisition fix. Will fix it for real tonight.

* gtk/gtkcombobox.c (gtk_combo_box_remeasure): add a resize flag,
(gtk_combo_box_size_request): use gtk_combo_box_remeasure to determine
a good width for the child,
(gtk_combo_box_cell_layout_add_attribute),
(gtk_combo_box_set_cell_data_func),
(gtk_combo_box_cell_layout_clear_attributes): update.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcombobox.c

index 69f3ffc02d97a32d6abab9a5eb2180cca95017a8..9a1598330981d4ed500c334594c610d6a560e13d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Mon Nov 17 12:58:32 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Temporary size requisition fix. Will fix it for real tonight.
+
+       * gtk/gtkcombobox.c (gtk_combo_box_remeasure): add a resize flag,
+       (gtk_combo_box_size_request): use gtk_combo_box_remeasure to determine
+       a good width for the child,
+       (gtk_combo_box_cell_layout_add_attribute),
+       (gtk_combo_box_set_cell_data_func),
+       (gtk_combo_box_cell_layout_clear_attributes): update.
+
 Mon Nov 17 00:11:21 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #124373, Murray Cumming.
index 69f3ffc02d97a32d6abab9a5eb2180cca95017a8..9a1598330981d4ed500c334594c610d6a560e13d 100644 (file)
@@ -1,3 +1,14 @@
+Mon Nov 17 12:58:32 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Temporary size requisition fix. Will fix it for real tonight.
+
+       * gtk/gtkcombobox.c (gtk_combo_box_remeasure): add a resize flag,
+       (gtk_combo_box_size_request): use gtk_combo_box_remeasure to determine
+       a good width for the child,
+       (gtk_combo_box_cell_layout_add_attribute),
+       (gtk_combo_box_set_cell_data_func),
+       (gtk_combo_box_cell_layout_clear_attributes): update.
+
 Mon Nov 17 00:11:21 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #124373, Murray Cumming.
index 69f3ffc02d97a32d6abab9a5eb2180cca95017a8..9a1598330981d4ed500c334594c610d6a560e13d 100644 (file)
@@ -1,3 +1,14 @@
+Mon Nov 17 12:58:32 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Temporary size requisition fix. Will fix it for real tonight.
+
+       * gtk/gtkcombobox.c (gtk_combo_box_remeasure): add a resize flag,
+       (gtk_combo_box_size_request): use gtk_combo_box_remeasure to determine
+       a good width for the child,
+       (gtk_combo_box_cell_layout_add_attribute),
+       (gtk_combo_box_set_cell_data_func),
+       (gtk_combo_box_cell_layout_clear_attributes): update.
+
 Mon Nov 17 00:11:21 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #124373, Murray Cumming.
index 69f3ffc02d97a32d6abab9a5eb2180cca95017a8..9a1598330981d4ed500c334594c610d6a560e13d 100644 (file)
@@ -1,3 +1,14 @@
+Mon Nov 17 12:58:32 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Temporary size requisition fix. Will fix it for real tonight.
+
+       * gtk/gtkcombobox.c (gtk_combo_box_remeasure): add a resize flag,
+       (gtk_combo_box_size_request): use gtk_combo_box_remeasure to determine
+       a good width for the child,
+       (gtk_combo_box_cell_layout_add_attribute),
+       (gtk_combo_box_set_cell_data_func),
+       (gtk_combo_box_cell_layout_clear_attributes): update.
+
 Mon Nov 17 00:11:21 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #124373, Murray Cumming.
index 69f3ffc02d97a32d6abab9a5eb2180cca95017a8..9a1598330981d4ed500c334594c610d6a560e13d 100644 (file)
@@ -1,3 +1,14 @@
+Mon Nov 17 12:58:32 2003  Kristian Rietveld  <kris@gtk.org>
+
+       Temporary size requisition fix. Will fix it for real tonight.
+
+       * gtk/gtkcombobox.c (gtk_combo_box_remeasure): add a resize flag,
+       (gtk_combo_box_size_request): use gtk_combo_box_remeasure to determine
+       a good width for the child,
+       (gtk_combo_box_cell_layout_add_attribute),
+       (gtk_combo_box_set_cell_data_func),
+       (gtk_combo_box_cell_layout_clear_attributes): update.
+
 Mon Nov 17 00:11:21 2003  Kristian Rietveld  <kris@gtk.org>
 
        Fixes #124373, Murray Cumming.
index b94964a67dd3c716bd67f7b1a8613341d554fedb..6f9099de614c6f84722ac53eda4e90efaaacd1c3 100644 (file)
@@ -166,7 +166,8 @@ static void     gtk_combo_box_popdown              (GtkComboBox      *combo_box)
 
 static gint     gtk_combo_box_calc_requested_width (GtkComboBox      *combo_box,
                                                     GtkTreePath      *path);
-static void     gtk_combo_box_remeasure            (GtkComboBox      *combo_box);
+static void     gtk_combo_box_remeasure            (GtkComboBox      *combo_box,
+                                                    gboolean          resize);
 
 static void     gtk_combo_box_unset_model          (GtkComboBox      *combo_box);
 static void     gtk_combo_box_set_model_internal   (GtkComboBox      *combo_box);
@@ -805,7 +806,8 @@ gtk_combo_box_calc_requested_width (GtkComboBox *combo_box,
 }
 
 static void
-gtk_combo_box_remeasure (GtkComboBox *combo_box)
+gtk_combo_box_remeasure (GtkComboBox *combo_box,
+                         gboolean     resize)
 {
   GtkTreeIter iter;
   GtkTreePath *path;
@@ -842,7 +844,7 @@ gtk_combo_box_remeasure (GtkComboBox *combo_box)
 
   gtk_tree_path_free (path);
 
-  if (combo_box->priv->cell_view)
+  if (combo_box->priv->cell_view && resize)
     {
       gtk_widget_set_size_request (combo_box->priv->cell_view,
                                    combo_box->priv->width, -1);
@@ -861,6 +863,8 @@ gtk_combo_box_size_request (GtkWidget      *widget,
 
   /* common */
   gtk_widget_size_request (GTK_BIN (widget)->child, &bin_req);
+  gtk_combo_box_remeasure (combo_box, FALSE);
+  bin_req.width = MAX (bin_req.width, combo_box->priv->width);
 
   if (!combo_box->priv->tree_view)
     {
@@ -2124,7 +2128,7 @@ gtk_combo_box_cell_layout_add_attribute (GtkCellLayout   *layout,
       g_list_free (list);
     }
 
-  gtk_combo_box_remeasure (combo_box);
+  gtk_combo_box_remeasure (combo_box, TRUE);
 }
 
 static void
@@ -2184,7 +2188,7 @@ gtk_combo_box_cell_layout_set_cell_data_func (GtkCellLayout         *layout,
       g_list_free (list);
     }
 
-  gtk_combo_box_remeasure (combo_box);
+  gtk_combo_box_remeasure (combo_box, TRUE);
 }
 
 static void
@@ -2240,7 +2244,7 @@ gtk_combo_box_cell_layout_clear_attributes (GtkCellLayout   *layout,
       g_list_free (list);
     }
 
-  gtk_combo_box_remeasure (combo_box);
+  gtk_combo_box_remeasure (combo_box, TRUE);
 }
 
 /*