diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-01-14 01:50:49 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-06-16 02:46:02 +0800 |
commit | c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede (patch) | |
tree | 6af964bb15322661d28181dc00310e3afe618f46 /calendar/gui/e-day-view.c | |
parent | 333897772f2cf3251915800aff2c836f02095c84 (diff) | |
download | gsoc2013-evolution-c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede.tar.gz gsoc2013-evolution-c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede.tar.zst gsoc2013-evolution-c2c89fcb8cfa5661e94de5e57c7dbc80c3342ede.zip |
Fix all remaining GTK3 issues.
Work around the issue of GnomeCanvasItem amending its own flags to
GtkObject::flags (which is sealed) by giving it its own flags field.
This breaks libgnomecanvas ABI and API, but I see no other way.
This commit didn't work the first time because gnome-pilot libraries
were still pulling in the system-wide libgnomecanvas, and that was
interfereing with our bundled version which has a different ABI.
But gnome-pilot integration was dropped in the previous commit, so
everything is now using the bundled libgnomecanvas.
Diffstat (limited to 'calendar/gui/e-day-view.c')
-rw-r--r-- | calendar/gui/e-day-view.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index 010f5bdb32..de4b9b3b68 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -1931,7 +1931,11 @@ e_day_view_focus_in (GtkWidget *widget, GdkEventFocus *event) day_view = E_DAY_VIEW (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_widget_queue_draw (day_view->top_canvas); gtk_widget_queue_draw (day_view->main_canvas); @@ -1950,7 +1954,11 @@ e_day_view_focus_out (GtkWidget *widget, GdkEventFocus *event) day_view = E_DAY_VIEW (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_widget_queue_draw (day_view->top_canvas); gtk_widget_queue_draw (day_view->main_canvas); @@ -7100,10 +7108,8 @@ e_day_view_auto_scroll_handler (gpointer data) e_day_view_update_selection (day_view, day, row); } else if (day_view->resize_drag_pos != E_CALENDAR_VIEW_POS_NONE) { e_day_view_update_resize (day_view, row); - } else if (day_view->drag_item->object.flags - & GNOME_CANVAS_ITEM_VISIBLE) { - e_day_view_update_main_canvas_drag (day_view, row, - day); + } else if (day_view->drag_item->flags & GNOME_CANVAS_ITEM_VISIBLE) { + e_day_view_update_main_canvas_drag (day_view, row, day); } } @@ -7511,8 +7517,7 @@ e_day_view_update_top_canvas_drag (EDayView *day_view, /* If the position hasn't changed, just return. */ if (day_view->drag_last_day == day - && (day_view->drag_long_event_item->object.flags - & GNOME_CANVAS_ITEM_VISIBLE)) + && (day_view->drag_long_event_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) return; day_view->drag_last_day = day; @@ -7539,7 +7544,7 @@ e_day_view_update_top_canvas_drag (EDayView *day_view, item_x + E_DAY_VIEW_LONG_EVENT_BORDER_WIDTH + E_DAY_VIEW_LONG_EVENT_X_PAD, item_y + E_DAY_VIEW_LONG_EVENT_BORDER_HEIGHT + E_DAY_VIEW_LONG_EVENT_Y_PAD); - if (!(day_view->drag_long_event_rect_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) { + if (!(day_view->drag_long_event_rect_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) { gnome_canvas_item_raise_to_top (day_view->drag_long_event_rect_item); gnome_canvas_item_show (day_view->drag_long_event_rect_item); } @@ -7547,8 +7552,7 @@ e_day_view_update_top_canvas_drag (EDayView *day_view, /* Set the text, if necessary. We don't want to set the text every time it moves, so we check if it is currently invisible and only set the text then. */ - if (!(day_view->drag_long_event_item->object.flags - & GNOME_CANVAS_ITEM_VISIBLE)) { + if (!(day_view->drag_long_event_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) { const gchar *summary; if (event && is_comp_data_valid (event)) { @@ -7629,7 +7633,7 @@ e_day_view_update_main_canvas_drag (EDayView *day_view, /* If the position hasn't changed, just return. */ if (day_view->drag_last_day == day && day_view->drag_last_row == row - && (day_view->drag_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) + && (day_view->drag_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) return; day_view->drag_last_day = day; @@ -7700,12 +7704,12 @@ e_day_view_update_main_canvas_drag (EDayView *day_view, item_x + E_DAY_VIEW_BAR_WIDTH + E_DAY_VIEW_EVENT_X_PAD, item_y + E_DAY_VIEW_EVENT_BORDER_HEIGHT + E_DAY_VIEW_EVENT_Y_PAD); - if (!(day_view->drag_bar_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) { + if (!(day_view->drag_bar_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) { gnome_canvas_item_raise_to_top (day_view->drag_bar_item); gnome_canvas_item_show (day_view->drag_bar_item); } - if (!(day_view->drag_rect_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) { + if (!(day_view->drag_rect_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) { gnome_canvas_item_raise_to_top (day_view->drag_rect_item); gnome_canvas_item_show (day_view->drag_rect_item); } @@ -7713,7 +7717,7 @@ e_day_view_update_main_canvas_drag (EDayView *day_view, /* Set the text, if necessary. We don't want to set the text every time it moves, so we check if it is currently invisible and only set the text then. */ - if (!(day_view->drag_item->object.flags & GNOME_CANVAS_ITEM_VISIBLE)) { + if (!(day_view->drag_item->flags & GNOME_CANVAS_ITEM_VISIBLE)) { const gchar *summary; if (event && is_comp_data_valid (event)) { |