aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-06-15 09:38:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-15 09:38:53 +0800
commita55021bcef7eb082b48e56aac361bd35a3a77b64 (patch)
tree9bcf1c1bbf522c87beac5d199b258f8aa24c7d7e /widgets/misc
parentead63f16b2269325c1e4080b3dce8818bbafe189 (diff)
downloadgsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.tar
gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.tar.gz
gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.tar.bz2
gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.tar.lz
gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.tar.xz
gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.tar.zst
gsoc2013-evolution-a55021bcef7eb082b48e56aac361bd35a3a77b64.zip
Revert "Fix all remaining GTK3 issues."
This reverts commit fd8b55edaa88906b588aa07d9eadcacd34a7a774. Something in this commit seriously hosed ETable, making Evolution pretty much unusable. Reverting this until I can track down the problem.
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/e-canvas-background.c2
-rw-r--r--widgets/misc/e-canvas-vbox.c6
-rw-r--r--widgets/misc/e-canvas.c28
3 files changed, 14 insertions, 22 deletions
diff --git a/widgets/misc/e-canvas-background.c b/widgets/misc/e-canvas-background.c
index a44a05407a..28875725b3 100644
--- a/widgets/misc/e-canvas-background.c
+++ b/widgets/misc/e-canvas-background.c
@@ -266,7 +266,7 @@ ecb_set_property (GObject *object,
if (color_changed) {
ecb->priv->color = color;
- if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
+ if (GNOME_CANVAS_ITEM_REALIZED & GTK_OBJECT_FLAGS(item)) {
get_color (ecb);
if (!item->canvas->aa) {
gdk_gc_set_foreground (ecb->priv->gc, &ecb->priv->color);
diff --git a/widgets/misc/e-canvas-vbox.c b/widgets/misc/e-canvas-vbox.c
index 5fc939939b..63b23efdf6 100644
--- a/widgets/misc/e-canvas-vbox.c
+++ b/widgets/misc/e-canvas-vbox.c
@@ -256,7 +256,7 @@ e_canvas_vbox_real_add_item(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *item)
e_canvas_vbox->items = g_list_append(e_canvas_vbox->items, item);
g_object_weak_ref (G_OBJECT (item),
e_canvas_vbox_remove_item, e_canvas_vbox);
- if (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) {
+ if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) {
gnome_canvas_item_set(item,
"width", (gdouble) e_canvas_vbox->minimum_width,
NULL);
@@ -270,7 +270,7 @@ e_canvas_vbox_real_add_item_start(ECanvasVbox *e_canvas_vbox, GnomeCanvasItem *i
e_canvas_vbox->items = g_list_prepend(e_canvas_vbox->items, item);
g_object_weak_ref (G_OBJECT (item),
e_canvas_vbox_remove_item, e_canvas_vbox);
- if (GNOME_CANVAS_ITEM (e_canvas_vbox)->flags & GNOME_CANVAS_ITEM_REALIZED) {
+ if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) {
gnome_canvas_item_set(item,
"width", (gdouble) e_canvas_vbox->minimum_width,
NULL);
@@ -297,7 +297,7 @@ static void
e_canvas_vbox_reflow( GnomeCanvasItem *item, gint flags )
{
ECanvasVbox *e_canvas_vbox = E_CANVAS_VBOX(item);
- if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
+ if (GTK_OBJECT_FLAGS( e_canvas_vbox ) & GNOME_CANVAS_ITEM_REALIZED) {
gdouble old_height;
gdouble running_height;
diff --git a/widgets/misc/e-canvas.c b/widgets/misc/e-canvas.c
index 3b8d5ed57f..593c9c4530 100644
--- a/widgets/misc/e-canvas.c
+++ b/widgets/misc/e-canvas.c
@@ -399,7 +399,7 @@ pick_current_item (GnomeCanvas *canvas, GdkEvent *event)
/* find the closest item */
- if (canvas->root->flags & GNOME_CANVAS_ITEM_VISIBLE)
+ if (canvas->root->object.flags & GNOME_CANVAS_ITEM_VISIBLE)
gnome_canvas_item_invoke_point (canvas->root, x, y, cx, cy,
&canvas->new_current_item);
else
@@ -593,11 +593,7 @@ e_canvas_focus_in (GtkWidget *widget, GdkEventFocus *event)
canvas = GNOME_CANVAS (widget);
ecanvas = E_CANVAS (widget);
- /* XXX Can't access flags directly anymore, but is it really needed?
- * If so, could we call gtk_widget_send_focus_change() instead? */
-#if 0
GTK_WIDGET_SET_FLAGS (widget, GTK_HAS_FOCUS);
-#endif
gtk_im_context_focus_in (ecanvas->im_context);
@@ -620,11 +616,7 @@ e_canvas_focus_out (GtkWidget *widget, GdkEventFocus *event)
canvas = GNOME_CANVAS (widget);
ecanvas = E_CANVAS (widget);
- /* XXX Can't access flags directly anymore, but is it really needed?
- * If so, could we call gtk_widget_send_focus_change() instead? */
-#if 0
GTK_WIDGET_UNSET_FLAGS (widget, GTK_HAS_FOCUS);
-#endif
gtk_im_context_focus_out (ecanvas->im_context);
@@ -708,12 +700,12 @@ e_canvas_item_invoke_reflow (GnomeCanvasItem *item, gint flags)
group = GNOME_CANVAS_GROUP (item);
for (list = group->item_list; list; list = list->next) {
child = GNOME_CANVAS_ITEM (list->data);
- if (child->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
+ if (child->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
e_canvas_item_invoke_reflow (child, flags);
}
}
- if (item->flags & E_CANVAS_ITEM_NEEDS_REFLOW) {
+ if (item->object.flags & E_CANVAS_ITEM_NEEDS_REFLOW) {
ECanvasItemReflowFunc func;
func = (ECanvasItemReflowFunc)
g_object_get_data (G_OBJECT (item),
@@ -722,14 +714,14 @@ e_canvas_item_invoke_reflow (GnomeCanvasItem *item, gint flags)
func (item, flags);
}
- item->flags &= ~E_CANVAS_ITEM_NEEDS_REFLOW;
- item->flags &= ~E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
+ item->object.flags &= ~E_CANVAS_ITEM_NEEDS_REFLOW;
+ item->object.flags &= ~E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
}
static void
do_reflow (ECanvas *canvas)
{
- if (GNOME_CANVAS(canvas)->root->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
+ if (GNOME_CANVAS(canvas)->root->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
e_canvas_item_invoke_reflow (GNOME_CANVAS(canvas)->root, 0);
}
@@ -769,10 +761,10 @@ add_idle (ECanvas *canvas)
static void
e_canvas_item_descendent_needs_reflow (GnomeCanvasItem *item)
{
- if (item->flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
+ if (item->object.flags & E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW)
return;
- item->flags |= E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
+ item->object.flags |= E_CANVAS_ITEM_DESCENDENT_NEEDS_REFLOW;
if (item->parent)
e_canvas_item_descendent_needs_reflow(item->parent);
}
@@ -780,8 +772,8 @@ e_canvas_item_descendent_needs_reflow (GnomeCanvasItem *item)
void
e_canvas_item_request_reflow (GnomeCanvasItem *item)
{
- if (item->flags & GNOME_CANVAS_ITEM_REALIZED) {
- item->flags |= E_CANVAS_ITEM_NEEDS_REFLOW;
+ if (item->object.flags & GNOME_CANVAS_ITEM_REALIZED) {
+ item->object.flags |= E_CANVAS_ITEM_NEEDS_REFLOW;
e_canvas_item_descendent_needs_reflow(item);
add_idle(E_CANVAS(item->canvas));
}