]> Pileus Git - ~andy/gtk/commitdiff
Actually resize the popup window before popping up. (#135651)
authorMatthias Clasen <maclas@gmx.de>
Sat, 28 Feb 2004 22:28:37 +0000 (22:28 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Sat, 28 Feb 2004 22:28:37 +0000 (22:28 +0000)
Sat Feb 28 23:30:36 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkcombobox.c (gtk_combo_box_popup): Actually resize the
popup window before popping up.  (#135651)

Sat Feb 28 23:29:35 2004  Matthias Clasen  <maclas@gmx.de>

* gtk/gtkcombobox.c (gtk_combo_box_class_init):
* gtk/gtkcombobox.c (gtk_combo_box_init): Override the default
handler for style_set in class_init instead of connecting to
the signal in init. (noticed by Yosh).

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

index e2606188bb5248ef016e5aa9df19d958f8d932d4..87e3aa0b1209dbadb953803f2f8af15fa4cfe7fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Sat Feb 28 23:30:36 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Actually resize the
+       popup window before popping up.  (#135651)
+
+Sat Feb 28 23:29:35 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_class_init): 
+       * gtk/gtkcombobox.c (gtk_combo_box_init): Override the default
+       handler for style_set in class_init instead of connecting to
+       the signal in init. (noticed by Yosh).
+
 Sat Feb 28 14:48:35 2004  Owen Taylor  <otaylor@redhat.com>
 
        * demos/gtk-demo/main.c (read_line): #ifdef HAVE_FLOCKFILE, 
index e2606188bb5248ef016e5aa9df19d958f8d932d4..87e3aa0b1209dbadb953803f2f8af15fa4cfe7fd 100644 (file)
@@ -1,3 +1,15 @@
+Sat Feb 28 23:30:36 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Actually resize the
+       popup window before popping up.  (#135651)
+
+Sat Feb 28 23:29:35 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_class_init): 
+       * gtk/gtkcombobox.c (gtk_combo_box_init): Override the default
+       handler for style_set in class_init instead of connecting to
+       the signal in init. (noticed by Yosh).
+
 Sat Feb 28 14:48:35 2004  Owen Taylor  <otaylor@redhat.com>
 
        * demos/gtk-demo/main.c (read_line): #ifdef HAVE_FLOCKFILE, 
index e2606188bb5248ef016e5aa9df19d958f8d932d4..87e3aa0b1209dbadb953803f2f8af15fa4cfe7fd 100644 (file)
@@ -1,3 +1,15 @@
+Sat Feb 28 23:30:36 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Actually resize the
+       popup window before popping up.  (#135651)
+
+Sat Feb 28 23:29:35 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_class_init): 
+       * gtk/gtkcombobox.c (gtk_combo_box_init): Override the default
+       handler for style_set in class_init instead of connecting to
+       the signal in init. (noticed by Yosh).
+
 Sat Feb 28 14:48:35 2004  Owen Taylor  <otaylor@redhat.com>
 
        * demos/gtk-demo/main.c (read_line): #ifdef HAVE_FLOCKFILE, 
index e2606188bb5248ef016e5aa9df19d958f8d932d4..87e3aa0b1209dbadb953803f2f8af15fa4cfe7fd 100644 (file)
@@ -1,3 +1,15 @@
+Sat Feb 28 23:30:36 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Actually resize the
+       popup window before popping up.  (#135651)
+
+Sat Feb 28 23:29:35 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_class_init): 
+       * gtk/gtkcombobox.c (gtk_combo_box_init): Override the default
+       handler for style_set in class_init instead of connecting to
+       the signal in init. (noticed by Yosh).
+
 Sat Feb 28 14:48:35 2004  Owen Taylor  <otaylor@redhat.com>
 
        * demos/gtk-demo/main.c (read_line): #ifdef HAVE_FLOCKFILE, 
index e2606188bb5248ef016e5aa9df19d958f8d932d4..87e3aa0b1209dbadb953803f2f8af15fa4cfe7fd 100644 (file)
@@ -1,3 +1,15 @@
+Sat Feb 28 23:30:36 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_popup): Actually resize the
+       popup window before popping up.  (#135651)
+
+Sat Feb 28 23:29:35 2004  Matthias Clasen  <maclas@gmx.de>
+
+       * gtk/gtkcombobox.c (gtk_combo_box_class_init): 
+       * gtk/gtkcombobox.c (gtk_combo_box_init): Override the default
+       handler for style_set in class_init instead of connecting to
+       the signal in init. (noticed by Yosh).
+
 Sat Feb 28 14:48:35 2004  Owen Taylor  <otaylor@redhat.com>
 
        * demos/gtk-demo/main.c (read_line): #ifdef HAVE_FLOCKFILE, 
index 3e5ce159422a239aeb2692cce7ed01365e319935..2c35ca37698ef42d4fb763608f9f3d30aba7a62a 100644 (file)
@@ -374,6 +374,7 @@ gtk_combo_box_class_init (GtkComboBoxClass *klass)
   widget_class->expose_event = gtk_combo_box_expose_event;
   widget_class->scroll_event = gtk_combo_box_scroll_event;
   widget_class->mnemonic_activate = gtk_combo_box_mnemonic_activate;
+  widget_class->style_set = gtk_combo_box_style_set;
 
   gtk_object_class = (GtkObjectClass *)klass;
   gtk_object_class->destroy = gtk_combo_box_destroy;
@@ -471,9 +472,6 @@ gtk_combo_box_init (GtkComboBox *combo_box)
 {
   combo_box->priv = GTK_COMBO_BOX_GET_PRIVATE (combo_box);
 
-  g_signal_connect (combo_box, "style_set",
-                    G_CALLBACK (gtk_combo_box_style_set), NULL);
-
   combo_box->priv->cell_view = gtk_cell_view_new ();
   gtk_container_add (GTK_CONTAINER (combo_box), combo_box->priv->cell_view);
   gtk_widget_show (combo_box->priv->cell_view);
@@ -820,7 +818,7 @@ gtk_combo_box_menu_position (GtkMenu  *menu,
 void
 gtk_combo_box_popup (GtkComboBox *combo_box)
 {
-  gint x, y, width, height;
+  gint x, y, width, height, popup_height;
   GtkWidget *sample;
 
   g_return_if_fail (GTK_IS_COMBO_BOX (combo_box));
@@ -864,9 +862,10 @@ gtk_combo_box_popup (GtkComboBox *combo_box)
             GTK_WIDGET (combo_box->priv->cell_view_frame)->style->xthickness);
     }
 
-  gtk_widget_set_size_request (combo_box->priv->popup_window,
-                               width, -1);
-
+  gtk_window_get_size (combo_box->priv->popup_window, NULL, &popup_height);
+  gtk_widget_set_size_request (combo_box->priv->popup_window, width, -1);
+  gtk_window_resize (combo_box->priv->popup_window, width, popup_height);
+  
   if (GTK_WIDGET_NO_WINDOW (sample))
     {
       x += sample->allocation.x;
@@ -983,7 +982,7 @@ gtk_combo_box_remeasure (GtkComboBox *combo_box)
       GtkRequisition req;
 
       if (combo_box->priv->cell_view)
-        gtk_cell_view_get_size_of_row (GTK_CELL_VIEW (combo_box->priv->cell_view),
+       gtk_cell_view_get_size_of_row (GTK_CELL_VIEW (combo_box->priv->cell_view), 
                                        path, &req);
       else
         req.width = 0;