Revision: 6769
Author: nogu.dev
Date: Sat Sep 11 17:42:28 2010
Log: * helper/eggtrayicon.c
- (egg_tray_icon_expose): Use gtk_widget_get_allocation() for GTK+3.
* helper/toolbar-common-gtk.c
- (calc_menu_position): Ditto.
* helper/toolbar-standalone-gtk.c
- (handle_expose_event_cb): Ditto.
http://code.google.com/p/uim/source/detail?r=6769
Modified:
/trunk/helper/eggtrayicon.c
/trunk/helper/toolbar-common-gtk.c
/trunk/helper/toolbar-standalone-gtk.c
=======================================
--- /trunk/helper/eggtrayicon.c Sat Sep 11 17:41:22 2010
+++ /trunk/helper/eggtrayicon.c Sat Sep 11 17:42:28 2010
@@ -276,13 +276,16 @@
focus_child = GTK_CONTAINER (widget)->focus_child;
if (focus_child && gtk_widget_has_focus (focus_child))
{
+ GtkAllocation allocation;
border_width = GTK_CONTAINER (widget)->border_width;
- x = widget->allocation.x + border_width;
- y = widget->allocation.y + border_width;
-
- width = widget->allocation.width - 2 * border_width;
- height = widget->allocation.height - 2 * border_width;
+ gtk_widget_get_allocation(widget, &allocation);
+
+ x = allocation.x + border_width;
+ y = allocation.y + border_width;
+
+ width = allocation.width - 2 * border_width;
+ height = allocation.height - 2 * border_width;
gtk_paint_focus (gtk_widget_get_style(widget),
gtk_widget_get_window(widget),
=======================================
--- /trunk/helper/toolbar-common-gtk.c Sat Sep 11 17:41:08 2010
+++ /trunk/helper/toolbar-common-gtk.c Sat Sep 11 17:42:28 2010
@@ -199,8 +199,11 @@
gdk_window_get_origin(gtk_widget_get_window(button), x, y);
gdk_drawable_get_size(gtk_widget_get_window(button), NULL,
&button_height);
- if (!gtk_widget_get_has_window(button))
- *x += button->allocation.x;
+ if (!gtk_widget_get_has_window(button)) {
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(button, &allocation);
+ *x += allocation.x;
+ }
sc_height = gdk_screen_get_height(gdk_screen_get_default());
sc_width = gdk_screen_get_width(gdk_screen_get_default());
=======================================
--- /trunk/helper/toolbar-standalone-gtk.c Sat Sep 11 17:41:22 2010
+++ /trunk/helper/toolbar-standalone-gtk.c Sat Sep 11 17:42:28 2010
@@ -172,11 +172,13 @@
{
GdkRectangle *rect = &event->area;
+ GtkAllocation allocation;
+ gtk_widget_get_allocation(widget, &allocation);
gtk_paint_handle(gtk_widget_get_style(widget),
gtk_widget_get_window(widget),
GTK_STATE_NORMAL, GTK_SHADOW_OUT,
rect, widget, "handlebox",
- widget->allocation.x, widget->allocation.y,
- widget->allocation.width, widget->allocation.height,
+ allocation.x, allocation.y,
+ allocation.width, allocation.height,
GTK_ORIENTATION_VERTICAL);
return FALSE;