[gtk+] combo box: Fix compiler warnings
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] combo box: Fix compiler warnings
- Date: Tue, 2 Jun 2015 13:10:30 +0000 (UTC)
commit f16fc99391e4de44d96ea0993e7c923679e6c161
Author: Matthias Clasen <mclasen redhat com>
Date: Sat May 30 21:24:23 2015 -0400
combo box: Fix compiler warnings
Fix warnings due to -Wdeclaration-after-statement and -Wshadow.
gtk/gtkcombobox.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkcombobox.c b/gtk/gtkcombobox.c
index ccda6ad..f9c7ba8 100644
--- a/gtk/gtkcombobox.c
+++ b/gtk/gtkcombobox.c
@@ -2622,14 +2622,13 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
if (gtk_widget_get_visible (priv->popup_widget))
{
- gint width, menu_width;
+ gint menu_width;
if (priv->wrap_width == 0)
{
GtkAllocation combo_box_allocation;
gtk_widget_get_allocation (GTK_WIDGET (combo_box), &combo_box_allocation);
- width = combo_box_allocation.width;
gtk_widget_set_size_request (priv->popup_widget, -1, -1);
if (combo_box->priv->popup_fixed_width)
@@ -2638,7 +2637,7 @@ gtk_combo_box_size_allocate (GtkWidget *widget,
gtk_widget_get_preferred_width (priv->popup_widget, NULL, &menu_width);
gtk_widget_set_size_request (priv->popup_widget,
- MAX (width, menu_width), -1);
+ MAX (combo_box_allocation.width, menu_width), -1);
}
/* reposition the menu after giving it a new width */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]