summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@redhat.com>2000-01-26 02:33:04 +0000
committerOwen Taylor <otaylor@src.gnome.org>2000-01-26 02:33:04 +0000
commit9770128fb99676a070993a4a1fe0f5593786be6d (patch)
treebf1990a7281fff384a5c5cf743888b154174a6f3
parentc1f4231af60e9f4bd7a1aa0e743ec91da346648a (diff)
downloadgdk-pixbuf-9770128fb99676a070993a4a1fe0f5593786be6d.tar.gz
Use the requisition, not the allocation, since the allocation has not
Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com> * gtk/gtkoptionmenu.c (gtk_option_menu_position): Use the requisition, not the allocation, since the allocation has not necessarily been computed yet. (Pointed out by Eugene Osintsev)
-rw-r--r--ChangeLog7
-rw-r--r--ChangeLog.pre-2-07
-rw-r--r--ChangeLog.pre-2-107
-rw-r--r--ChangeLog.pre-2-27
-rw-r--r--ChangeLog.pre-2-47
-rw-r--r--ChangeLog.pre-2-67
-rw-r--r--ChangeLog.pre-2-87
-rw-r--r--gtk/gtkoptionmenu.c16
8 files changed, 61 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 40d5196bf..669bfbd98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkoptionmenu.c (gtk_option_menu_position):
+ Use the requisition, not the allocation, since the
+ allocation has not necessarily been computed yet.
+ (Pointed out by Eugene Osintsev)
+
Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_new): Dont' set
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 40d5196bf..669bfbd98 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,10 @@
+Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkoptionmenu.c (gtk_option_menu_position):
+ Use the requisition, not the allocation, since the
+ allocation has not necessarily been computed yet.
+ (Pointed out by Eugene Osintsev)
+
Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_new): Dont' set
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 40d5196bf..669bfbd98 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,10 @@
+Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkoptionmenu.c (gtk_option_menu_position):
+ Use the requisition, not the allocation, since the
+ allocation has not necessarily been computed yet.
+ (Pointed out by Eugene Osintsev)
+
Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_new): Dont' set
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 40d5196bf..669bfbd98 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,10 @@
+Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkoptionmenu.c (gtk_option_menu_position):
+ Use the requisition, not the allocation, since the
+ allocation has not necessarily been computed yet.
+ (Pointed out by Eugene Osintsev)
+
Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_new): Dont' set
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 40d5196bf..669bfbd98 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,10 @@
+Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkoptionmenu.c (gtk_option_menu_position):
+ Use the requisition, not the allocation, since the
+ allocation has not necessarily been computed yet.
+ (Pointed out by Eugene Osintsev)
+
Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_new): Dont' set
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 40d5196bf..669bfbd98 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,10 @@
+Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkoptionmenu.c (gtk_option_menu_position):
+ Use the requisition, not the allocation, since the
+ allocation has not necessarily been computed yet.
+ (Pointed out by Eugene Osintsev)
+
Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_new): Dont' set
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 40d5196bf..669bfbd98 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,10 @@
+Wed Jan 26 21:17:03 2000 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkoptionmenu.c (gtk_option_menu_position):
+ Use the requisition, not the allocation, since the
+ allocation has not necessarily been computed yet.
+ (Pointed out by Eugene Osintsev)
+
Wed Jan 26 19:44:25 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkstyle.c (gtk_style_new): Dont' set
diff --git a/gtk/gtkoptionmenu.c b/gtk/gtkoptionmenu.c
index 27d1f347d..27a79b188 100644
--- a/gtk/gtkoptionmenu.c
+++ b/gtk/gtkoptionmenu.c
@@ -616,6 +616,7 @@ gtk_option_menu_position (GtkMenu *menu,
GtkOptionMenu *option_menu;
GtkWidget *active;
GtkWidget *child;
+ GtkRequisition requisition;
GList *children;
gint shift_menu;
gint screen_width;
@@ -630,8 +631,9 @@ gtk_option_menu_position (GtkMenu *menu,
option_menu = GTK_OPTION_MENU (user_data);
- width = GTK_WIDGET (menu)->allocation.width;
- height = GTK_WIDGET (menu)->allocation.height;
+ gtk_widget_get_child_requisition (GTK_WIDGET (menu), &requisition);
+ width = requisition.width;
+ height = requisition.height;
active = gtk_menu_get_active (GTK_MENU (option_menu->menu));
children = GTK_MENU_SHELL (option_menu->menu)->children;
@@ -640,7 +642,10 @@ gtk_option_menu_position (GtkMenu *menu,
menu_ypos += GTK_WIDGET (option_menu)->allocation.height / 2 - 2;
if (active != NULL)
- menu_ypos -= active->requisition.height / 2;
+ {
+ gtk_widget_get_child_requisition (active, &requisition);
+ menu_ypos -= requisition.height / 2;
+ }
while (children)
{
@@ -650,7 +655,10 @@ gtk_option_menu_position (GtkMenu *menu,
break;
if (GTK_WIDGET_VISIBLE (child))
- menu_ypos -= child->allocation.height;
+ {
+ gtk_widget_get_child_requisition (child, &requisition);
+ menu_ypos -= requisition.height;
+ }
children = children->next;
}