From fccbe7781008d24798f04d7bfe5cc3f1547764d2 Mon Sep 17 00:00:00 2001 From: Michael Natterer Date: Tue, 11 May 2004 19:16:38 +0000 Subject: [PATCH] Merged from HEAD: 2004-05-11 Michael Natterer Merged from HEAD: * gtk/gtkcombobox.c (gtk_combo_box_popup) (gtk_combo_box_menu_button_press): don't allocate the popup smaller than the combobox. Fixes bug #59660. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ ChangeLog.pre-2-6 | 8 ++++++++ ChangeLog.pre-2-8 | 8 ++++++++ gtk/gtkcombobox.c | 16 +++++++++++++--- 5 files changed, 45 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 73c778f6cf..3cbc892a42 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-05-11 Michael Natterer + + Merged from HEAD: + + * gtk/gtkcombobox.c (gtk_combo_box_popup) + (gtk_combo_box_menu_button_press): don't allocate the popup + smaller than the combobox. Fixes bug #59660. + 2004-05-11 Matthias Clasen Merged from HEAD: diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 73c778f6cf..3cbc892a42 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,11 @@ +2004-05-11 Michael Natterer + + Merged from HEAD: + + * gtk/gtkcombobox.c (gtk_combo_box_popup) + (gtk_combo_box_menu_button_press): don't allocate the popup + smaller than the combobox. Fixes bug #59660. + 2004-05-11 Matthias Clasen Merged from HEAD: diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 73c778f6cf..3cbc892a42 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,11 @@ +2004-05-11 Michael Natterer + + Merged from HEAD: + + * gtk/gtkcombobox.c (gtk_combo_box_popup) + (gtk_combo_box_menu_button_press): don't allocate the popup + smaller than the combobox. Fixes bug #59660. + 2004-05-11 Matthias Clasen Merged from HEAD: diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 73c778f6cf..3cbc892a42 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,11 @@ +2004-05-11 Michael Natterer + + Merged from HEAD: + + * gtk/gtkcombobox.c (gtk_combo_box_popup) + (gtk_combo_box_menu_button_press): don't allocate the popup + smaller than the combobox. Fixes bug #59660. + 2004-05-11 Matthias Clasen Merged from HEAD: diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c index 10e759c4a0..0e7eacc142 100644 --- a/gtk/gtkcombobox.c +++ b/gtk/gtkcombobox.c @@ -1137,8 +1137,13 @@ gtk_combo_box_popup (GtkComboBox *combo_box) if (combo_box->priv->wrap_width == 0) { + GtkRequisition requisition; + width = GTK_WIDGET (combo_box)->allocation.width; - gtk_widget_set_size_request (combo_box->priv->popup_widget, width, -1); + gtk_widget_size_request (combo_box->priv->popup_widget, &requisition); + + gtk_widget_set_size_request (combo_box->priv->popup_widget, + MAX (width, requisition.width), -1); } gtk_menu_popup (GTK_MENU (combo_box->priv->popup_widget), @@ -1892,7 +1897,6 @@ gtk_combo_box_menu_button_press (GtkWidget *widget, gpointer user_data) { GtkComboBox *combo_box = GTK_COMBO_BOX (user_data); - gint width; if (! GTK_IS_MENU (combo_box->priv->popup_widget)) return FALSE; @@ -1906,8 +1910,14 @@ gtk_combo_box_menu_button_press (GtkWidget *widget, if (combo_box->priv->wrap_width == 0) { + GtkRequisition requisition; + gint width; + width = GTK_WIDGET (combo_box)->allocation.width; - gtk_widget_set_size_request (combo_box->priv->popup_widget, width, -1); + gtk_widget_size_request (combo_box->priv->popup_widget, &requisition); + + gtk_widget_set_size_request (combo_box->priv->popup_widget, + MAX (width, requisition.width), -1); } gtk_menu_popup (GTK_MENU (combo_box->priv->popup_widget),