[evolution/clutter-calendar-v2] Warning cleanup
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/clutter-calendar-v2] Warning cleanup
- Date: Fri, 1 Oct 2010 12:43:03 +0000 (UTC)
commit 7a503c7992b438afd18f4caf1cd4f2f05d579f91
Author: Srinivasa Ragavan <sragavan gnome org>
Date: Fri Oct 1 18:09:22 2010 +0530
Warning cleanup
calendar/gui/e-day-view-clutter-event-item.c | 114 +++++++++++-------------
calendar/gui/e-day-view-clutter-main-item.c | 14 ++--
calendar/gui/e-day-view-clutter-time-item.c | 2 +-
calendar/gui/e-day-view-clutter-top-item.c | 16 ++--
calendar/gui/e-day-view.c | 66 ++++++++------
calendar/gui/e-month-view.c | 8 +-
calendar/gui/e-week-view-clutter-event-item.c | 99 ++++++++++----------
calendar/gui/e-week-view-clutter-main-item.c | 19 ++--
calendar/gui/e-week-view-clutter-titles-item.c | 6 +-
calendar/gui/e-week-view.c | 96 ++++++++++----------
calendar/gui/ea-calendar.c | 2 +-
11 files changed, 221 insertions(+), 221 deletions(-)
---
diff --git a/calendar/gui/e-day-view-clutter-event-item.c b/calendar/gui/e-day-view-clutter-event-item.c
index 8874768..04c3599 100644
--- a/calendar/gui/e-day-view-clutter-event-item.c
+++ b/calendar/gui/e-day-view-clutter-event-item.c
@@ -141,8 +141,6 @@ day_view_clutter_event_item_double_click (EDayViewClutterEventItem *event_item,
ClutterEvent *bevent)
{
EDayView *day_view;
- EDayViewEvent *event;
- GnomeCanvasItem *item;
day_view = event_item->priv->day_view;
#if 0
@@ -188,14 +186,11 @@ day_view_clutter_event_item_double_click (EDayViewClutterEventItem *event_item,
return TRUE;
}
-gboolean
+static gboolean
day_view_clutter_event_item_button_press (EDayViewClutterEventItem *event_item,
ClutterEvent *bevent)
{
EDayView *day_view;
- ECalendarViewPosition pos;
- //EDayViewEvent *event;
- int day = event_item->priv->day_num;
GdkEventButton *event;
gboolean ret;
@@ -203,9 +198,9 @@ day_view_clutter_event_item_button_press (EDayViewClutterEventItem *event_item,
day_view = event_item->priv->day_view;
if (bevent->button.click_count > 1 )
- event = gdk_event_new (GDK_2BUTTON_PRESS);
+ event = (GdkEventButton *)gdk_event_new (GDK_2BUTTON_PRESS);
else
- event = gdk_event_new (GDK_BUTTON_PRESS);
+ event = (GdkEventButton *)gdk_event_new (GDK_BUTTON_PRESS);
event->time = bevent->button.time;
event->button = bevent->button.button;
@@ -216,7 +211,7 @@ day_view_clutter_event_item_button_press (EDayViewClutterEventItem *event_item,
ret = e_day_view_on_top_canvas_button_press (day_view->top_canvas, event, day_view);
else
ret = e_day_view_on_main_canvas_button_press (day_view->main_canvas, event, day_view);
- gdk_event_free (event);
+ gdk_event_free ((GdkEvent *)event);
return ret;
@@ -305,7 +300,7 @@ day_view_clutter_event_item_button_release (EDayViewClutterEventItem *event_item
day_view = event_item->priv->day_view;
- bevent = gdk_event_new (GDK_BUTTON_RELEASE);
+ bevent = (GdkEventButton *)gdk_event_new (GDK_BUTTON_RELEASE);
bevent->time = event->button.time;
bevent->button = event->button.button;
@@ -313,7 +308,7 @@ day_view_clutter_event_item_button_release (EDayViewClutterEventItem *event_item
bevent->y = (gfloat) event->button.y;
ret = e_day_view_on_main_canvas_button_release (day_view->main_canvas, bevent, day_view);
- gdk_event_free (bevent);
+ gdk_event_free ((GdkEvent *)bevent);
day_view->pressed_event_num = -1;
day_view->editing_event_num = event_item->priv->event_num;
@@ -494,8 +489,6 @@ day_view_clutter_event_item_draw_long (EDayViewClutterEventItem *main_item)
cairo_t *cr;
gint x=0;
gint y=0;
- gint width;
- gint height;
EDayView *day_view;
EDayViewEvent *event;
GtkStyle *style;
@@ -553,10 +546,10 @@ day_view_clutter_event_item_draw_long (EDayViewClutterEventItem *main_item)
clutter_cairo_texture_set_surface_size (main_item->priv->texture, item_w, item_h);
clutter_cairo_texture_clear (main_item->priv->texture);
clutter_actor_set_size (main_item->priv->text_item, item_w, item_h);
- clutter_actor_set_size (main_item, item_w, item_h);
+ clutter_actor_set_size ((ClutterActor *)main_item, item_w, item_h);
if (event->just_added)
- clutter_actor_set_opacity (main_item, 0);
+ clutter_actor_set_opacity ((ClutterActor *)main_item, 0);
cr = clutter_cairo_texture_create (main_item->priv->texture);
event_x = item_x;
@@ -865,7 +858,7 @@ day_view_clutter_event_item_draw_long (EDayViewClutterEventItem *main_item)
/* Draw text */
if (icon_x < max_icon_x) {
PangoLayout *layout;
- GdkColor col = e_day_view_get_text_color (day_view, event, day_view);
+ GdkColor col = e_day_view_get_text_color (day_view, event, (GtkWidget *)day_view);
cairo_save (cr);
gdk_cairo_set_source_color (cr, &col);
@@ -898,7 +891,7 @@ day_view_clutter_event_item_draw_long (EDayViewClutterEventItem *main_item)
if (event->just_added) {
event->just_added = FALSE;
- clutter_actor_animate (main_item, CLUTTER_LINEAR,
+ clutter_actor_animate ((ClutterActor *)main_item, CLUTTER_LINEAR,
400, "opacity", 255, NULL);
}
}
@@ -907,10 +900,7 @@ static void
day_view_clutter_event_item_draw_normal (EDayViewClutterEventItem *main_item)
{
cairo_t *cr;
- gint x=0;
gint y=0;
- gint width;
- gint height;
gint day;
gint event_num;
GdkRegion *draw_region;
@@ -985,8 +975,7 @@ day_view_clutter_event_item_draw_normal (EDayViewClutterEventItem *main_item)
clutter_cairo_texture_set_surface_size (main_item->priv->texture, item_w, item_h);
clutter_actor_set_size (main_item->priv->text_item, item_w, item_h);
- clutter_actor_set_size (main_item, item_w, item_h);
-
+ clutter_actor_set_size ((ClutterActor *)main_item, item_w, item_h);
clutter_cairo_texture_clear (main_item->priv->texture);
cr = clutter_cairo_texture_create (main_item->priv->texture);
@@ -1008,7 +997,7 @@ day_view_clutter_event_item_draw_normal (EDayViewClutterEventItem *main_item)
return;
if (event->just_added)
- clutter_actor_set_opacity (main_item, 0);
+ clutter_actor_set_opacity ((ClutterActor *)main_item, 0);
/* Fill in the event background. Note that for events in the first
column of the day, we might not want to paint over the vertical bar,
@@ -1242,7 +1231,6 @@ day_view_clutter_event_item_draw_normal (EDayViewClutterEventItem *main_item)
pat = cairo_pattern_create_linear (item_x + E_DAY_VIEW_BAR_WIDTH + 1.75, item_y + 7.75,
item_x + E_DAY_VIEW_BAR_WIDTH + 1.75, item_y + item_h - 7.75);
if (!short_event) {
- float midpoint = (1 - 1/(date_fraction + (rect_height/18)))/2;
cairo_pattern_add_color_stop_rgba (pat, 0, red/cc, green/cc, blue/cc, 0.8);
cairo_pattern_add_color_stop_rgba (pat, (1/(date_fraction + (rect_height/18))) - 0.0001, red/cc, green/cc, blue/cc, 0.8);
cairo_pattern_add_color_stop_rgba (pat, 1/(date_fraction + (rect_height/18)), red/cc, green/cc, blue/cc, 0.4);
@@ -1582,7 +1570,7 @@ day_view_clutter_event_item_draw_normal (EDayViewClutterEventItem *main_item)
/* Draw text */
if (icon_x < item_w) {
PangoLayout *layout;
- GdkColor col = e_day_view_get_text_color (day_view, event, day_view);
+ GdkColor col = e_day_view_get_text_color (day_view, event, (GtkWidget *)day_view);
int ypad = short_event ? 0 : (E_DAY_VIEW_ICON_HEIGHT + E_DAY_VIEW_ICON_Y_PAD);
cairo_save (cr);
@@ -1620,7 +1608,7 @@ day_view_clutter_event_item_draw_normal (EDayViewClutterEventItem *main_item)
if (event->just_added) {
event->just_added = FALSE;
- clutter_actor_animate (main_item, CLUTTER_LINEAR,
+ clutter_actor_animate ((ClutterActor *)main_item, CLUTTER_LINEAR,
400, "opacity", 255, NULL);
}
}
@@ -1637,7 +1625,7 @@ day_view_clutter_event_item_draw (EDayViewClutterEventItem *main_item)
}
static gint
-day_view_clutter_event_item_event (GnomeCanvasItem *item,
+day_view_clutter_event_item_event (ClutterActor *item,
ClutterEvent *event)
{
EDayViewClutterEventItem *event_item;
@@ -1666,7 +1654,6 @@ day_view_clutter_event_item_class_init (EDayViewClutterEventItemClass *class)
{
GObjectClass *object_class;
MxBoxLayoutClass *item_class;
- ClutterActorClass *widget_class;
parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EDayViewClutterEventItemPrivate));
@@ -1774,9 +1761,9 @@ e_day_view_clutter_event_item_set_event_num (EDayViewClutterEventItem *event_ite
const char *
e_day_view_clutter_event_item_get_text (EDayViewClutterEventItem *event_item)
{
- g_return_val_if_fail (E_IS_WEEK_VIEW_CLUTTER_EVENT_ITEM (event_item), -1);
+ g_return_val_if_fail (E_IS_WEEK_VIEW_CLUTTER_EVENT_ITEM (event_item), NULL);
- return event_item->priv->text;
+ return (const char *)event_item->priv->text;
}
void
@@ -1818,7 +1805,7 @@ static void
handle_activate (ClutterActor *actor,
EDayViewClutterEventItem *item)
{
- gtk_widget_grab_focus (item->priv->day_view);
+ gtk_widget_grab_focus ((GtkWidget *)item->priv->day_view);
e_day_view_cancel_editing (item->priv->day_view);
e_day_view_on_editing_stopped (item->priv->day_view, NULL, TRUE);
}
@@ -1836,7 +1823,7 @@ handle_text_item_event (ClutterActor *actor,
if (event->button.button == 3) {
e_day_view_cancel_editing (item->priv->day_view);
e_day_view_on_editing_stopped (item->priv->day_view, NULL, TRUE);
- gtk_widget_grab_focus (day_view);
+ gtk_widget_grab_focus ((GtkWidget *)day_view);
return FALSE;
}
return FALSE;
@@ -1847,7 +1834,7 @@ handle_text_item_event (ClutterActor *actor,
item->priv->day_view->editing_event_num = -1;
item->priv->day_view->editing_event_day = -1;
}
- gtk_widget_grab_focus (day_view);
+ gtk_widget_grab_focus ((GtkWidget *)day_view);
return TRUE;
}
@@ -1870,33 +1857,33 @@ e_day_view_clutter_event_item_new (EDayView *view, gint day, gint event_num, gbo
item->priv->long_event = long_event;
item->priv->day_view = view;
- item->priv->texture = clutter_cairo_texture_new (10, 10);
+ item->priv->texture = (ClutterCairoTexture *)clutter_cairo_texture_new (10, 10);
item->priv->day_num = day;
item->priv->event_num = event_num;
- clutter_actor_set_reactive (item->priv->texture, TRUE);
+ clutter_actor_set_reactive ((ClutterActor *)item->priv->texture, TRUE);
mx_box_layout_set_orientation (box, MX_ORIENTATION_VERTICAL);
mx_box_layout_add_actor (box,
- item->priv->texture, -1);
+ (ClutterActor *)item->priv->texture, -1);
clutter_container_child_set (CLUTTER_CONTAINER (box),
- item->priv->texture,
+ (ClutterActor *)item->priv->texture,
"expand", TRUE,
"x-fill", TRUE,
"y-fill", TRUE,
NULL);
- clutter_actor_show_all (box);
- clutter_actor_set_reactive (box, TRUE);
+ clutter_actor_show_all ((ClutterActor *)box);
+ clutter_actor_set_reactive ((ClutterActor *)box, TRUE);
item->priv->text_item = clutter_text_new ();
g_signal_connect (item->priv->text_item, "event", G_CALLBACK(handle_text_item_event), item);
- clutter_text_set_activatable (item->priv->text_item, TRUE);
- clutter_text_set_single_line_mode (item->priv->text_item, long_event ? TRUE: FALSE);
+ clutter_text_set_activatable ((ClutterText *)item->priv->text_item, TRUE);
+ clutter_text_set_single_line_mode ((ClutterText *)item->priv->text_item, long_event ? TRUE: FALSE);
if (!long_event)
- clutter_text_set_line_wrap_mode (item->priv->text_item, PANGO_WRAP_CHAR);
+ clutter_text_set_line_wrap_mode ((ClutterText *)item->priv->text_item, PANGO_WRAP_CHAR);
g_signal_connect (item->priv->text_item, "activate", G_CALLBACK(handle_activate), item);
- clutter_text_set_line_wrap (item->priv->text_item, !long_event ? TRUE: FALSE);
- clutter_text_set_editable (item->priv->text_item, TRUE);
+ clutter_text_set_line_wrap ((ClutterText *)item->priv->text_item, !long_event ? TRUE: FALSE);
+ clutter_text_set_editable ((ClutterText *)item->priv->text_item, TRUE);
clutter_actor_set_reactive (item->priv->text_item, TRUE);
clutter_actor_hide (item->priv->text_item);
@@ -2089,14 +2076,18 @@ wvce_animate_rotate_y (ClutterActor *item,
}
static void
-wvce_set_view_editing_1 (EDayViewClutterEventItem *item)
+wvce_set_view_editing_1 (gpointer gp)
{
- clutter_actor_hide (item->priv->texture);
+ EDayViewClutterEventItem *item = (EDayViewClutterEventItem *)gp;
+
+ clutter_actor_destroy ((ClutterActor *)item->priv->texture);
clutter_actor_show (item->priv->text_item);
}
static void
-wvce_set_view_editing_2 (EDayViewClutterEventItem *item)
+wvce_set_view_editing_2 (gpointer gp)
{
+ EDayViewClutterEventItem *item = (EDayViewClutterEventItem *)gp;
+
clutter_grab_keyboard (item->priv->text_item);
clutter_actor_grab_key_focus (item->priv->text_item);
}
@@ -2104,12 +2095,11 @@ wvce_set_view_editing_2 (EDayViewClutterEventItem *item)
void
e_day_view_clutter_event_item_switch_editing_mode (EDayViewClutterEventItem *item)
{
- float height=0, width=0,x,y;
- gint w=0, h=0;
+ guint w=0, h=0;
clutter_cairo_texture_get_surface_size (item->priv->texture, &w, &h);
- clutter_text_set_text (item->priv->text_item, item->priv->text);
+ clutter_text_set_text ((ClutterText *)item->priv->text_item, item->priv->text);
clutter_grab_keyboard (item->priv->text_item);
clutter_actor_grab_key_focus (item->priv->text_item);
// clutter_actor_hide (item->priv->texture);
@@ -2122,10 +2112,10 @@ e_day_view_clutter_event_item_switch_editing_mode (EDayViewClutterEventItem *ite
// (float)w, (float)h);
if (!item->priv->long_event && !item->priv->short_event)
- wvce_animate_rotate_y (item, wvce_set_view_editing_1, item,
+ wvce_animate_rotate_y ((ClutterActor *)item, wvce_set_view_editing_1, item,
wvce_set_view_editing_2, item);
else
- wvce_animate_rotate_x (item, wvce_set_view_editing_1, item,
+ wvce_animate_rotate_x ((ClutterActor *)item, wvce_set_view_editing_1, item,
wvce_set_view_editing_2, item);
@@ -2186,14 +2176,18 @@ wvce_animate_scale (ClutterActor *item,
}
static void
-wvce_set_view_normal_1 (EDayViewClutterEventItem *item)
+wvce_set_view_normal_1 (gpointer gp)
{
+ EDayViewClutterEventItem *item = (EDayViewClutterEventItem *)gp;
+
clutter_actor_hide (item->priv->text_item);
- clutter_actor_show (item->priv->texture);
+ clutter_actor_show ((ClutterActor *)item->priv->texture);
}
static void
-wvce_set_view_normal_2 (EDayViewClutterEventItem *item)
+wvce_set_view_normal_2 (gpointer gp)
{
+ //EDayViewClutterEventItem *item = (EDayViewClutterEventItem *)gp;
+
/* Do nothing */
}
@@ -2203,7 +2197,7 @@ e_day_view_clutter_event_item_switch_normal_mode (EDayViewClutterEventItem *item
//clutter_actor_hide (item->priv->text_item);
//clutter_actor_show (item->priv->texture);
- wvce_animate_scale (item, wvce_set_view_normal_1, item,
+ wvce_animate_scale ((ClutterActor *)item, wvce_set_view_normal_1, item,
wvce_set_view_normal_2, item);
}
@@ -2216,7 +2210,7 @@ e_day_view_clutter_event_item_switch_viewing_mode (EDayViewClutterEventItem *ite
const char *
e_day_view_clutter_event_item_get_edit_text (EDayViewClutterEventItem *item)
{
- return clutter_text_get_text (item->priv->text_item);
+ return clutter_text_get_text ((ClutterText *)item->priv->text_item);
}
@@ -2241,7 +2235,7 @@ wvce_animate_scale_delete (ClutterActor *item)
g_object_set (item, "scale-center-x", width/2, "scale-center-y", height/2, NULL);
- clutter_actor_animate (item, CLUTTER_EASE_OUT_SINE,
+ clutter_actor_animate ((ClutterActor *)item, CLUTTER_EASE_OUT_SINE,
200,
"scale-y", 0.1,
"signal-after::completed", scale_delete_stage1, item,
@@ -2251,14 +2245,14 @@ wvce_animate_scale_delete (ClutterActor *item)
void
e_day_view_clutter_event_item_scale_destroy (EDayViewClutterEventItem *item)
{
- wvce_animate_scale_delete (item);
+ wvce_animate_scale_delete ((ClutterActor *)item);
}
void
e_day_view_clutter_event_item_fade_destroy (EDayViewClutterEventItem *item)
{
- clutter_actor_animate (item, CLUTTER_EASE_OUT_SINE, 200,
+ clutter_actor_animate ((ClutterActor *)item, CLUTTER_EASE_OUT_SINE, 200,
"opacity", 0,
"signal-swapped-after::completed", clutter_actor_destroy, item,
NULL);
diff --git a/calendar/gui/e-day-view-clutter-main-item.c b/calendar/gui/e-day-view-clutter-main-item.c
index 82a5d9b..fbe5f46 100644
--- a/calendar/gui/e-day-view-clutter-main-item.c
+++ b/calendar/gui/e-day-view-clutter-main-item.c
@@ -1024,10 +1024,10 @@ day_view_clutter_main_item_draw_marcus_bains (EDayViewClutterMainItem *canvas_it
continue;
if (!main_item->priv->mb_line) {
main_item->priv->mb_line = clutter_cairo_texture_new (grid_x2-grid_x1, 5);
- clutter_container_add_actor (day_view->main_canvas_stage, main_item->priv->mb_line);
+ clutter_container_add_actor ((ClutterContainer *)day_view->main_canvas_stage, main_item->priv->mb_line);
}
- clutter_cairo_texture_clear (main_item->priv->mb_line);
- cr = clutter_cairo_texture_create (main_item->priv->mb_line);
+ clutter_cairo_texture_clear ((ClutterCairoTexture *)main_item->priv->mb_line);
+ cr = clutter_cairo_texture_create ((ClutterCairoTexture *)main_item->priv->mb_line);
cairo_save (cr);
gdk_cairo_set_source_color (cr,
&day_view->colors[E_DAY_VIEW_COLOR_MARCUS_BAINS_LINE]);
@@ -1083,13 +1083,13 @@ day_view_clutter_main_item_draw_selection (EDayViewClutterMainItem *canvas_item)
if (!main_item->priv->selection_actor) {
main_item->priv->selection_actor = clutter_cairo_texture_new (width, height);
clutter_actor_set_opacity (main_item->priv->selection_actor, 155);
- clutter_container_add_actor (day_view->main_canvas_stage, main_item->priv->selection_actor);
+ clutter_container_add_actor ((ClutterContainer *)day_view->main_canvas_stage, main_item->priv->selection_actor);
clutter_actor_show (main_item->priv->selection_actor);
clutter_actor_raise (main_item->priv->selection_actor, (ClutterActor *)canvas_item);
}
- clutter_cairo_texture_clear (main_item->priv->selection_actor);
- cr = clutter_cairo_texture_create (main_item->priv->selection_actor);
+ clutter_cairo_texture_clear ((ClutterCairoTexture *)main_item->priv->selection_actor);
+ cr = clutter_cairo_texture_create ((ClutterCairoTexture *)main_item->priv->selection_actor);
/* Paint the selection background. */
if (day_view->selection_start_day != -1
@@ -1136,7 +1136,6 @@ day_view_clutter_main_item_draw (EDayViewClutterMainItem *canvas_item)
gint day, grid_y1, grid_y2;
gint work_day_start_y, work_day_end_y;
gint day_x, day_w, work_day;
- gint start_row, end_row, rect_x, rect_y, rect_width, rect_height;
struct icaltimetype day_start_tt, today_tt;
gint weekday;
cairo_t *cr;
@@ -1447,7 +1446,6 @@ e_day_view_clutter_main_item_update_marcus_bains (EDayViewClutterMainItem *item)
{
EDayViewClutterMainItem *main_item;
EDayView *day_view;
- cairo_t *cr;
gint grid_x1, grid_x2;
gint day;
gint x=0, y=0;
diff --git a/calendar/gui/e-day-view-clutter-time-item.c b/calendar/gui/e-day-view-clutter-time-item.c
index 00e0859..ab724e5 100644
--- a/calendar/gui/e-day-view-clutter-time-item.c
+++ b/calendar/gui/e-day-view-clutter-time-item.c
@@ -811,7 +811,7 @@ edvti_second_zone_changed_cb (GConfClient *client, guint cnxn_id, GConfEntry *en
day_view = e_day_view_clutter_time_item_get_day_view (time_item);
gtk_widget_set_size_request (day_view->time_canvas, e_day_view_clutter_time_item_get_column_width (time_item), -1);
- e_day_view_clutter_time_item_redraw (day_view->time_canvas_actor);
+ e_day_view_clutter_time_item_redraw ((EDayViewClutterTimeItem *)day_view->time_canvas_actor);
}
static void
diff --git a/calendar/gui/e-day-view-clutter-top-item.c b/calendar/gui/e-day-view-clutter-top-item.c
index a1488be..de12df2 100644
--- a/calendar/gui/e-day-view-clutter-top-item.c
+++ b/calendar/gui/e-day-view-clutter-top-item.c
@@ -604,7 +604,7 @@ day_view_clutter_top_item_draw_selection (ClutterCairoTexture *canvas_item)
if (!top_item->priv->selection_actor) {
top_item->priv->selection_actor = clutter_cairo_texture_new (width, height);
clutter_actor_set_opacity (top_item->priv->selection_actor, 155);
- clutter_container_add_actor (day_view->top_canvas_stage, top_item->priv->selection_actor);
+ clutter_container_add_actor ((ClutterContainer *)day_view->top_canvas_stage, top_item->priv->selection_actor);
clutter_actor_show (top_item->priv->selection_actor);
clutter_actor_raise (top_item->priv->selection_actor, (ClutterActor *)canvas_item);
@@ -618,8 +618,8 @@ day_view_clutter_top_item_draw_selection (ClutterCairoTexture *canvas_item)
start_col = day_view->selection_start_day;
end_col = day_view->selection_end_day;
- clutter_cairo_texture_clear (top_item->priv->selection_actor);
- cr = clutter_cairo_texture_create (top_item->priv->selection_actor);
+ clutter_cairo_texture_clear ((ClutterCairoTexture *)top_item->priv->selection_actor);
+ cr = clutter_cairo_texture_create ((ClutterCairoTexture *)top_item->priv->selection_actor);
if (end_col > start_col
|| day_view->selection_start_row == -1
@@ -655,7 +655,7 @@ day_view_clutter_top_item_draw (ClutterCairoTexture *canvas_item)
GtkAllocation allocation;
GdkRectangle clip_rect;
gint canvas_width, canvas_height, left_edge, day, date_width, date_x;
- gint item_height, event_num;
+ gint item_height;
PangoLayout *layout;
cairo_t *cr;
GdkColor bg, light, dark;
@@ -960,7 +960,7 @@ e_day_view_clutter_top_item_set_size (EDayViewClutterTopItem *item, int width, i
{
guint owidth, oheight;
- clutter_cairo_texture_get_surface_size (item, &owidth, &oheight);
+ clutter_cairo_texture_get_surface_size ((ClutterCairoTexture *)item, &owidth, &oheight);
clutter_cairo_texture_set_surface_size ((ClutterCairoTexture *)item, width > 0 ? width : owidth, height > 0 ? height : oheight);
clutter_cairo_texture_clear ((ClutterCairoTexture *)item);
@@ -968,7 +968,7 @@ e_day_view_clutter_top_item_set_size (EDayViewClutterTopItem *item, int width, i
clutter_actor_destroy (item->priv->selection_actor);
item->priv->selection_actor = NULL;
}
- day_view_clutter_top_item_draw (item);
+ day_view_clutter_top_item_draw ((ClutterCairoTexture *)item);
}
void
@@ -979,11 +979,11 @@ e_day_view_clutter_top_item_redraw (EDayViewClutterTopItem *item)
item->priv->selection_actor = NULL;
}
clutter_cairo_texture_clear ((ClutterCairoTexture *)item);
- day_view_clutter_top_item_draw (item);
+ day_view_clutter_top_item_draw ((ClutterCairoTexture *) item);
}
void
e_day_view_clutter_top_item_update_selection (EDayViewClutterTopItem *item)
{
- day_view_clutter_top_item_draw_selection (item);
+ day_view_clutter_top_item_draw_selection ((ClutterCairoTexture *) item);
}
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index 97d991b..437f248 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -1811,6 +1811,9 @@ e_day_view_update_top_scroll (EDayView *day_view, gboolean scroll_to_top)
gtk_widget_show (day_view->tc_vscrollbar);
}
+#if HAVE_CLUTTER
+ if (WITHOUT_CLUTTER) {
+#endif
/* Set the scroll region of the top canvas */
gnome_canvas_get_scroll_region (GNOME_CANVAS (day_view->top_canvas),
NULL, NULL, &old_x2, &old_y2);
@@ -1831,6 +1834,9 @@ e_day_view_update_top_scroll (EDayView *day_view, gboolean scroll_to_top)
gnome_canvas_set_scroll_region (GNOME_CANVAS (day_view->top_dates_canvas), 0, 0, new_x2, new_y2);
gnome_canvas_scroll_to (GNOME_CANVAS (day_view->top_dates_canvas), 0, 0);
}
+#if HAVE_CLUTTER
+ }
+#endif
}
static void
@@ -2364,9 +2370,9 @@ e_day_view_remove_event_cb (EDayView *day_view,
if (event->actor && !(event->being_dragged && day_view->drag_success)) {
if (delete_from_cal||event->marked_for_delete)
- e_day_view_clutter_event_item_scale_destroy (event->actor);
+ e_day_view_clutter_event_item_scale_destroy ((EDayViewClutterEventItem *)event->actor);
else
- e_day_view_clutter_event_item_fade_destroy (event->actor);
+ e_day_view_clutter_event_item_fade_destroy ((EDayViewClutterEventItem *)event->actor);
}
event->actor = NULL;
@@ -2492,7 +2498,7 @@ e_day_view_update_event_label (EDayView *day_view,
NULL);
#if HAVE_CLUTTER
} else {
- e_day_view_clutter_event_item_set_text (event->actor, text);
+ e_day_view_clutter_event_item_set_text ((EDayViewClutterEventItem *)event->actor, text);
}
#endif
if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)
@@ -2539,7 +2545,7 @@ e_day_view_update_long_event_label (EDayView *day_view,
NULL);
#if HAVE_CLUTTER
} else {
- e_day_view_clutter_event_item_set_text (event->actor, summary);
+ e_day_view_clutter_event_item_set_text ((EDayViewClutterEventItem *)event->actor, summary);
}
#endif
if (free_text)
@@ -3664,7 +3670,7 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
day_view->editing_event_num = -1;
day_view->editing_event_day = -1;
}
- gtk_widget_grab_focus (day_view);
+ gtk_widget_grab_focus ((GtkWidget *)day_view);
}
#endif
return FALSE;
@@ -3680,7 +3686,7 @@ e_day_view_on_top_canvas_button_press (GtkWidget *widget,
if (!WITHOUT_CLUTTER) {
e_day_view_cancel_editing (day_view);
e_day_view_on_editing_stopped (day_view, NULL, TRUE);
- gtk_widget_grab_focus (day_view);
+ gtk_widget_grab_focus ((GtkWidget *)day_view);
}
#endif
e_day_view_stop_editing_event (day_view);
@@ -3832,7 +3838,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
day_view->editing_event_num = -1;
day_view->editing_event_day = -1;
}
- gtk_widget_grab_focus (day_view);
+ gtk_widget_grab_focus ((GtkWidget *)day_view);
}
#endif
@@ -3848,7 +3854,7 @@ e_day_view_on_main_canvas_button_press (GtkWidget *widget,
if (!WITHOUT_CLUTTER) {
e_day_view_cancel_editing (day_view);
e_day_view_on_editing_stopped (day_view, NULL, TRUE);
- gtk_widget_grab_focus (day_view);
+ gtk_widget_grab_focus ((GtkWidget *)day_view);
}
#endif
e_day_view_stop_editing_event (day_view);
@@ -5582,10 +5588,10 @@ e_day_view_reshape_long_event (EDayView *day_view,
}
if (!event->actor) {
- event->actor = e_day_view_clutter_event_item_new (day_view, E_DAY_VIEW_LONG_EVENT, event_num, TRUE);
+ event->actor = (ClutterActor *)e_day_view_clutter_event_item_new (day_view, E_DAY_VIEW_LONG_EVENT, event_num, TRUE);
g_signal_emit_by_name (G_OBJECT(day_view),
"event_added", event);
- clutter_container_add_actor (day_view->top_canvas_stage, event->actor);
+ clutter_container_add_actor ((ClutterContainer *)day_view->top_canvas_stage, event->actor);
clutter_actor_raise_top (event->actor);
clutter_actor_set_position (event->actor, item_x, item_y);
clutter_actor_show (event->actor);
@@ -5828,10 +5834,10 @@ e_day_view_reshape_day_event (EDayView *day_view,
event->actor = NULL;
}
if (!event->actor) {
- event->actor = e_day_view_clutter_event_item_new (day_view, day, event_num, FALSE);
+ event->actor = (ClutterActor *) e_day_view_clutter_event_item_new (day_view, day, event_num, FALSE);
g_signal_emit_by_name (G_OBJECT(day_view),
"event_added", event);
- clutter_container_add_actor (day_view->main_canvas_stage, event->actor);
+ clutter_container_add_actor ((ClutterContainer *)day_view->main_canvas_stage, event->actor);
clutter_actor_raise_top (event->actor);
clutter_actor_set_position (event->actor, item_x, item_y);
clutter_actor_show (event->actor);
@@ -7015,8 +7021,11 @@ e_day_view_start_editing_event (EDayView *day_view,
#if HAVE_CLUTTER
if (!WITHOUT_CLUTTER) {
- gtk_widget_grab_focus (day_view->main_canvas_embed);
- e_day_view_clutter_event_item_switch_editing_mode (event->actor);
+ if (day == E_DAY_VIEW_LONG_EVENT)
+ gtk_widget_grab_focus (day_view->top_canvas_embed);
+ else
+ gtk_widget_grab_focus (day_view->main_canvas_embed);
+ e_day_view_clutter_event_item_switch_editing_mode ((EDayViewClutterEventItem *)event->actor);
day_view->editing_event_num = event_num;
day_view->editing_event_day = day;
}
@@ -7087,7 +7096,8 @@ cancel_editing (EDayView *day_view)
day = day_view->editing_event_day;
event_num = day_view->editing_event_num;
- g_return_if_fail (day != -1);
+ if (day == -1)
+ return;
if (day == E_DAY_VIEW_LONG_EVENT) {
if (!is_array_index_in_bounds (day_view->long_events, event_num))
@@ -7115,7 +7125,7 @@ cancel_editing (EDayView *day_view)
NULL);
#if HAVE_CLUTTER
} else {
- e_day_view_clutter_event_item_switch_normal_mode (event->actor);
+ e_day_view_clutter_event_item_switch_normal_mode ((EDayViewClutterEventItem *)event->actor);
}
#endif
/* Stop editing */
@@ -7711,8 +7721,8 @@ e_day_view_on_editing_stopped (EDayView *day_view,
NULL);
#if HAVE_CLUTTER
} else {
- e_day_view_clutter_event_item_switch_normal_mode (event->actor);
- text = g_strdup(e_day_view_clutter_event_item_get_edit_text (event->actor));
+ e_day_view_clutter_event_item_switch_normal_mode ((EDayViewClutterEventItem *)event->actor);
+ text = g_strdup(e_day_view_clutter_event_item_get_edit_text ((EDayViewClutterEventItem *)event->actor));
}
#endif
g_return_val_if_fail (text != NULL, TRUE);
@@ -7729,7 +7739,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
e_cal_component_get_uid (comp, &uid);
e_day_view_foreach_event_with_uid (day_view, uid,
- e_day_view_remove_event_cb, TRUE);
+ e_day_view_remove_event_cb, GINT_TO_POINTER(TRUE));
e_day_view_check_layout (day_view);
#if HAVE_CLUTTER
if (WITHOUT_CLUTTER) {
@@ -7770,7 +7780,7 @@ e_day_view_on_editing_stopped (EDayView *day_view,
E_CALENDAR_VIEW (day_view));
/* we remove the object since we either got the update from the server or failed */
- e_day_view_remove_event_cb (day_view, day, event_num, TRUE);
+ e_day_view_remove_event_cb (day_view, day, event_num, GINT_TO_POINTER(TRUE));
} else {
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
@@ -8389,13 +8399,13 @@ e_day_view_on_top_canvas_drag_motion (GtkWidget *widget,
EDayView *day_view)
{
gint scroll_x, scroll_y;
- GtkAdjustment *adj = gtk_layout_get_vadjustment (day_view->main_canvas);
+ GtkAdjustment *adj = gtk_layout_get_vadjustment ((GtkLayout *)day_view->main_canvas);
int offset_y = gtk_adjustment_get_value (adj);
#if HAVE_CLUTTER
if (day_view->drag_hidden) {
day_view->drag_hidden = FALSE;
- clutter_container_add_actor (day_view->top_canvas_stage, day_view->drag_actor);
+ clutter_container_add_actor ((ClutterContainer *)day_view->top_canvas_stage, day_view->drag_actor);
clutter_actor_show (day_view->drag_actor);
g_object_unref (day_view->drag_actor);
}
@@ -8553,13 +8563,13 @@ e_day_view_on_main_canvas_drag_motion (GtkWidget *widget,
EDayView *day_view)
{
gint scroll_x, scroll_y;
- GtkAdjustment *adj = gtk_layout_get_vadjustment (day_view->main_canvas);
+ GtkAdjustment *adj = gtk_layout_get_vadjustment ((GtkLayout *)day_view->main_canvas);
int offset_y = gtk_adjustment_get_value (adj);
#if HAVE_CLUTTER
if (day_view->drag_hidden) {
day_view->drag_hidden = FALSE;
- clutter_container_add_actor (day_view->main_canvas_stage, day_view->drag_actor);
+ clutter_container_add_actor ((ClutterContainer *)day_view->main_canvas_stage, day_view->drag_actor);
clutter_actor_show (day_view->drag_actor);
g_object_unref (day_view->drag_actor);
}
@@ -8743,7 +8753,7 @@ e_day_view_on_top_canvas_drag_leave (GtkWidget *widget,
if (!WITHOUT_CLUTTER) {
day_view->drag_hidden = TRUE;
g_object_ref(day_view->drag_actor);
- clutter_container_remove_actor (day_view->top_canvas_stage, day_view->drag_actor);
+ clutter_container_remove_actor ((ClutterContainer *)day_view->top_canvas_stage, day_view->drag_actor);
}
#endif
@@ -8768,7 +8778,7 @@ e_day_view_on_main_canvas_drag_leave (GtkWidget *widget,
if (!WITHOUT_CLUTTER) {
day_view->drag_hidden = TRUE;
g_object_ref(day_view->drag_actor);
- clutter_container_remove_actor (day_view->main_canvas_stage, day_view->drag_actor);
+ clutter_container_remove_actor ((ClutterContainer *)day_view->main_canvas_stage, day_view->drag_actor);
}
#endif
/* Hide the resize bars if they are being used in the drag. */
@@ -8819,7 +8829,7 @@ e_day_view_on_drag_begin (GtkWidget *widget,
day_view->drag_preserve = event->actor;
day_view->drag_hidden = FALSE;
day_view->drag_success = FALSE;
- clutter_container_add_actor (day == E_DAY_VIEW_LONG_EVENT ? day_view->top_canvas_stage : day_view->main_canvas_stage, day_view->drag_actor);
+ clutter_container_add_actor ((ClutterContainer *) (day == E_DAY_VIEW_LONG_EVENT ? day_view->top_canvas_stage : day_view->main_canvas_stage), day_view->drag_actor);
clutter_actor_set_position (day_view->drag_actor, x, y);
clutter_actor_show (day_view->drag_actor);
clutter_actor_raise_top (day_view->drag_actor);
@@ -9254,7 +9264,7 @@ e_day_view_on_main_canvas_drag_data_received (GtkWidget *widget,
y += scroll_y;
#if HAVE_CLUTTER
} else {
- GtkAdjustment *adj = gtk_layout_get_vadjustment (day_view->main_canvas);
+ GtkAdjustment *adj = gtk_layout_get_vadjustment ((GtkLayout *)day_view->main_canvas);
int offset_y = gtk_adjustment_get_value (adj);
y+= offset_y;
diff --git a/calendar/gui/e-month-view.c b/calendar/gui/e-month-view.c
index ca987f7..99ccd20 100644
--- a/calendar/gui/e-month-view.c
+++ b/calendar/gui/e-month-view.c
@@ -72,7 +72,7 @@ month_view_cursor_key_up (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -113,7 +113,7 @@ month_view_cursor_key_down (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *) week_view->main_canvas_actor);
}
#endif
}
@@ -150,7 +150,7 @@ month_view_cursor_key_left (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *) week_view->main_canvas_actor);
}
#endif
}
@@ -191,7 +191,7 @@ month_view_cursor_key_right (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *) week_view->main_canvas_actor);
}
#endif
}
diff --git a/calendar/gui/e-week-view-clutter-event-item.c b/calendar/gui/e-week-view-clutter-event-item.c
index dfb94dc..6669b64 100644
--- a/calendar/gui/e-week-view-clutter-event-item.c
+++ b/calendar/gui/e-week-view-clutter-event-item.c
@@ -107,7 +107,6 @@ week_view_clutter_event_item_get_position (EWeekViewClutterEventItem *event_item
gdouble y)
{
EWeekView *week_view;
- GnomeCanvasItem *item;
week_view = event_item->priv->week_view;
@@ -137,7 +136,6 @@ week_view_clutter_event_item_double_click (EWeekViewClutterEventItem *event_item
{
EWeekView *week_view;
EWeekViewEvent *event;
- GnomeCanvasItem *item;
week_view = event_item->priv->week_view;
@@ -183,7 +181,7 @@ week_view_clutter_event_item_double_click (EWeekViewClutterEventItem *event_item
return TRUE;
}
-gboolean
+static gboolean
week_view_clutter_event_item_button_press (EWeekViewClutterEventItem *event_item,
ClutterEvent *bevent)
{
@@ -253,7 +251,7 @@ week_view_clutter_event_item_button_press (EWeekViewClutterEventItem *event_item
e_week_view_show_popup_menu (
week_view, (GdkEventButton*) gevent,
event_item->priv->event_num);
- gdk_event_free (gevent);
+ gdk_event_free ((GdkEvent *)gevent);
//g_signal_stop_emission_by_name (
// event_item->canvas, "button_press_event");
@@ -336,7 +334,7 @@ week_view_draw_time (EWeekView *week_view,
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &fg);
+ gdk_cairo_set_source_color (cr, fg);
/* Draw the hour. */
if (hour_to_display < 10) {
pango_layout_set_text (layout, buffer + 1, 1);
@@ -357,7 +355,7 @@ week_view_draw_time (EWeekView *week_view,
time_x += week_view->digit_width * 2;
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &fg);
+ gdk_cairo_set_source_color (cr, fg);
/* Draw the start minute, in the small font. */
pango_layout_set_font_description (layout, week_view->small_font_desc);
pango_layout_set_text (layout, buffer + 3, 2);
@@ -370,7 +368,7 @@ week_view_draw_time (EWeekView *week_view,
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &fg);
+ gdk_cairo_set_source_color (cr, fg);
pango_layout_set_font_description (layout, style->font_desc);
time_x += week_view->small_digit_width * 2;
@@ -389,7 +387,7 @@ week_view_draw_time (EWeekView *week_view,
} else {
cairo_save (cr);
- gdk_cairo_set_source_color (cr, &fg);
+ gdk_cairo_set_source_color (cr, fg);
/* Draw the start time in one go. */
g_snprintf (buffer, sizeof (buffer), "%2i:%02i%s",
hour_to_display, minute, suffix);
@@ -425,7 +423,6 @@ week_view_clutter_event_item_draw_icons (EWeekViewClutterEventItem *event_item,
EWeekView *week_view;
EWeekViewEvent *event;
ECalComponent *comp;
- GnomeCanvas *canvas;
gint num_icons = 0, icon_x_inc;
gboolean draw_reminder_icon = FALSE, draw_recurrence_icon = FALSE;
gboolean draw_timezone_icon = FALSE, draw_attach_icon = FALSE;
@@ -694,7 +691,7 @@ week_view_clutter_event_item_draw (EWeekViewClutterEventItem *canvas_item)
EWeekViewEventSpan *span;
ECalModel *model;
GdkGC *gc;
- gint x1, y1, x2, y2, time_x, time_y;
+ gint x1, y1, x2=0, y2=0, time_x, time_y;
gint icon_x, icon_y, time_width, min_end_time_x, max_icon_x;
gint rect_x, rect_w, rect_x2 = 0;
gboolean one_day_event, editing_span = FALSE;
@@ -712,8 +709,6 @@ week_view_clutter_event_item_draw (EWeekViewClutterEventItem *canvas_item)
GdkRegion *draw_region;
GdkRectangle rect;
const gchar *color_spec;
- int x=0,y=0;
- int width, height;
gint span_x, span_y, span_w;
event_item = E_WEEK_VIEW_CLUTTER_EVENT_ITEM (canvas_item);
@@ -776,14 +771,14 @@ week_view_clutter_event_item_draw (EWeekViewClutterEventItem *canvas_item)
x2 = rect.width;
clutter_cairo_texture_set_surface_size (event_item->priv->texture, rect.width, rect.height);
clutter_actor_set_size (event_item->priv->text_item, rect.width, rect.height);
- clutter_actor_set_position (event_item, span_x, span_y);
+ clutter_actor_set_position ((ClutterActor *)event_item, span_x, span_y);
if (!can_draw_in_region (draw_region, x1, y1, x2 - x1, y2 - y1)) {
gdk_region_destroy (draw_region);
return;
}
if (event->just_added)
- clutter_actor_set_opacity (event_item, 0);
+ clutter_actor_set_opacity ((ClutterActor *) event_item, 0);
clutter_cairo_texture_clear (event_item->priv->texture);
cr = clutter_cairo_texture_create (event_item->priv->texture);
@@ -932,7 +927,7 @@ week_view_clutter_event_item_draw (EWeekViewClutterEventItem *canvas_item)
/* Draw text */
if (icon_x < x2) {
PangoLayout *layout;
- GdkColor col = e_week_view_get_text_color (week_view, event, week_view);
+ GdkColor col = e_week_view_get_text_color (week_view, event, (GtkWidget *)week_view);
cairo_save (cr);
gdk_cairo_set_source_color (cr, &col);
@@ -1155,7 +1150,7 @@ week_view_clutter_event_item_draw (EWeekViewClutterEventItem *canvas_item)
/* Draw text */
if (icon_x < time_x) {
PangoLayout *layout;
- GdkColor col = e_week_view_get_text_color (week_view, event, week_view);
+ GdkColor col = e_week_view_get_text_color (week_view, event, (GtkWidget *)week_view);
cairo_save (cr);
gdk_cairo_set_source_color (cr, &col);
@@ -1185,7 +1180,7 @@ week_view_clutter_event_item_draw (EWeekViewClutterEventItem *canvas_item)
if (event->just_added) {
event->just_added = FALSE;
- clutter_actor_animate (event_item, CLUTTER_LINEAR,
+ clutter_actor_animate ((ClutterActor *)event_item, CLUTTER_LINEAR,
400, "opacity", 255, NULL);
}
@@ -1331,7 +1326,7 @@ e_week_view_clutter_event_item_get_text (EWeekViewClutterEventItem *event_item)
{
g_return_val_if_fail (E_IS_WEEK_VIEW_CLUTTER_EVENT_ITEM (event_item), -1);
- return event_item->priv->text;
+ return (const char *)event_item->priv->text;
}
void
@@ -1373,7 +1368,7 @@ static void
handle_activate (ClutterActor *actor,
EWeekViewClutterEventItem *item)
{
- gtk_widget_grab_focus (item->priv->week_view);
+ gtk_widget_grab_focus ((GtkWidget *)item->priv->week_view);
e_week_view_cancel_editing (item->priv->week_view);
e_week_view_on_editing_stopped (item->priv->week_view, NULL, TRUE);
}
@@ -1390,7 +1385,7 @@ handle_text_item_event (ClutterActor *actor,
if (event->button.button == 3) {
e_week_view_cancel_editing (item->priv->week_view);
e_week_view_on_editing_stopped (item->priv->week_view, NULL, TRUE);
- gtk_widget_grab_focus (week_view);
+ gtk_widget_grab_focus ((GtkWidget *)week_view);
return FALSE;
}
return FALSE;
@@ -1401,7 +1396,7 @@ handle_text_item_event (ClutterActor *actor,
item->priv->week_view->editing_event_num = -1;
item->priv->week_view->editing_span_num = -1;
}
- gtk_widget_grab_focus (week_view);
+ gtk_widget_grab_focus ((GtkWidget *)week_view);
return TRUE;
}
@@ -1420,28 +1415,28 @@ e_week_view_clutter_event_item_new (EWeekView *view)
MxBoxLayout *box = (MxBoxLayout *)item;
item->priv->week_view = view;
- item->priv->texture = clutter_cairo_texture_new (10, view->row_height);
- clutter_actor_set_reactive (item->priv->texture, TRUE);
+ item->priv->texture = (ClutterCairoTexture *) clutter_cairo_texture_new (10, view->row_height);
+ clutter_actor_set_reactive ((ClutterActor *)item->priv->texture, TRUE);
mx_box_layout_set_orientation (box, MX_ORIENTATION_VERTICAL);
mx_box_layout_add_actor (box,
- item->priv->texture, -1);
+ (ClutterActor *)item->priv->texture, -1);
clutter_container_child_set (CLUTTER_CONTAINER (box),
- item->priv->texture,
+ (ClutterActor *)item->priv->texture,
"expand", TRUE,
"x-fill", TRUE,
"y-fill", TRUE,
NULL);
- clutter_actor_show_all (box);
- clutter_actor_set_reactive (box, TRUE);
+ clutter_actor_show_all ((ClutterActor *)box);
+ clutter_actor_set_reactive ((ClutterActor *)box, TRUE);
item->priv->text_item = clutter_text_new ();
g_signal_connect (item->priv->text_item, "event", G_CALLBACK(handle_text_item_event), item);
- clutter_text_set_activatable (item->priv->text_item, TRUE);
- clutter_text_set_single_line_mode (item->priv->text_item, TRUE);
+ clutter_text_set_activatable ((ClutterText *)item->priv->text_item, TRUE);
+ clutter_text_set_single_line_mode ((ClutterText *)item->priv->text_item, TRUE);
g_signal_connect (item->priv->text_item, "activate", G_CALLBACK(handle_activate), item);
- clutter_text_set_line_wrap (item->priv->text_item, FALSE);
- clutter_text_set_editable (item->priv->text_item, TRUE);
+ clutter_text_set_line_wrap ((ClutterText *)item->priv->text_item, FALSE);
+ clutter_text_set_editable ((ClutterText *)item->priv->text_item, TRUE);
clutter_actor_set_reactive (item->priv->text_item, TRUE);
clutter_actor_hide (item->priv->text_item);
@@ -1562,14 +1557,18 @@ wvce_animate_rotate (ClutterActor *item,
}
static void
-wvce_set_view_editing_1 (EWeekViewClutterEventItem *item)
-{
- clutter_actor_hide (item->priv->texture);
+wvce_set_view_editing_1 (gpointer gp)
+{
+ EWeekViewClutterEventItem *item = (EWeekViewClutterEventItem *)gp;
+
+ clutter_actor_hide ((ClutterActor *)item->priv->texture);
clutter_actor_show (item->priv->text_item);
}
static void
-wvce_set_view_editing_2 (EWeekViewClutterEventItem *item)
-{
+wvce_set_view_editing_2 (gpointer gp)
+{
+ EWeekViewClutterEventItem *item = (EWeekViewClutterEventItem *)gp;
+
clutter_grab_keyboard (item->priv->text_item);
clutter_actor_grab_key_focus (item->priv->text_item);
}
@@ -1577,11 +1576,9 @@ wvce_set_view_editing_2 (EWeekViewClutterEventItem *item)
void
e_week_view_clutter_event_item_switch_editing_mode (EWeekViewClutterEventItem *item)
{
- float height=0, width=0;
+ clutter_text_set_text ((ClutterText *)item->priv->text_item, item->priv->text);
- clutter_text_set_text (item->priv->text_item, item->priv->text);
-
- wvce_animate_rotate (item, wvce_set_view_editing_1, item,
+ wvce_animate_rotate ((ClutterActor *)item, wvce_set_view_editing_1, item,
wvce_set_view_editing_2, item);
//wvce_set_view_editing_1 (item);
//wvce_set_view_editing_2 (item);
@@ -1662,14 +1659,18 @@ wvce_animate_scale (ClutterActor *item,
}
static void
-wvce_set_view_normal_1 (EWeekViewClutterEventItem *item)
-{
+wvce_set_view_normal_1 (gpointer gp)
+{
+ EWeekViewClutterEventItem *item = (EWeekViewClutterEventItem *)gp;
+
clutter_actor_hide (item->priv->text_item);
- clutter_actor_show (item->priv->texture);
+ clutter_actor_show ((ClutterActor *)item->priv->texture);
}
static void
-wvce_set_view_normal_2 (EWeekViewClutterEventItem *item)
-{
+wvce_set_view_normal_2 (gpointer gp)
+{
+ EWeekViewClutterEventItem *item = (EWeekViewClutterEventItem *)gp;
+
/* Do nothing */
}
@@ -1677,7 +1678,7 @@ void
e_week_view_clutter_event_item_switch_normal_mode (EWeekViewClutterEventItem *item)
{
- wvce_animate_scale (item, wvce_set_view_normal_1, item,
+ wvce_animate_scale ((ClutterActor *)item, wvce_set_view_normal_1, item,
wvce_set_view_normal_2, item);
//clutter_actor_hide (item->priv->text_item);
@@ -1692,7 +1693,7 @@ e_week_view_clutter_event_item_switch_viewing_mode (EWeekViewClutterEventItem *i
const char *
e_week_view_clutter_event_item_get_edit_text (EWeekViewClutterEventItem *item)
{
- return clutter_text_get_text (item->priv->text_item);
+ return clutter_text_get_text ((ClutterText *)item->priv->text_item);
}
@@ -1727,14 +1728,14 @@ wvce_animate_scale_delete (ClutterActor *item)
void
e_week_view_clutter_event_item_scale_destroy (EWeekViewClutterEventItem *item)
{
- wvce_animate_scale_delete (item);
+ wvce_animate_scale_delete ((ClutterActor *)item);
}
void
e_week_view_clutter_event_item_fade_destroy (EWeekViewClutterEventItem *item)
{
- clutter_actor_animate (item, CLUTTER_EASE_OUT_SINE, 200,
+ clutter_actor_animate ((ClutterActor *)item, CLUTTER_EASE_OUT_SINE, 200,
"opacity", 0,
"signal-swapped-after::completed", clutter_actor_destroy, item,
NULL);
diff --git a/calendar/gui/e-week-view-clutter-main-item.c b/calendar/gui/e-week-view-clutter-main-item.c
index ea53e95..dca68b2 100644
--- a/calendar/gui/e-week-view-clutter-main-item.c
+++ b/calendar/gui/e-week-view-clutter-main-item.c
@@ -80,11 +80,10 @@ week_view_clutter_main_item_draw_day_selection (EWeekViewClutterMainItem *main_i
{
EWeekView *week_view;
GtkStyle *style;
- gint right_edge, bottom_edge, date_width, date_x, line_y;
+ gint date_width, date_x, line_y;
gboolean show_day_name, show_month_name, selected;
gchar buffer[128], *format_string;
gint day_of_week, month, day_of_month, max_width;
- GdkColor *bg_color;
PangoFontDescription *font_desc;
PangoContext *pango_context;
PangoFontMetrics *font_metrics;
@@ -261,8 +260,8 @@ week_view_clutter_main_item_draw_selection (EWeekViewClutterMainItem *main_item)
cairo_t *cr;
gint day_x, day_y;
gint day_w, day_h;
- gint width;
- gint height;
+ guint width;
+ guint height;
gint x=0, y=0;
gint day = 0;
EWeekView *week_view;
@@ -273,13 +272,13 @@ week_view_clutter_main_item_draw_selection (EWeekViewClutterMainItem *main_item)
if (!main_item->priv->selection_actor) {
main_item->priv->selection_actor = clutter_cairo_texture_new (width, height);
- clutter_container_add_actor (week_view->main_canvas_stage, main_item->priv->selection_actor);
+ clutter_container_add_actor ((ClutterContainer *)week_view->main_canvas_stage, main_item->priv->selection_actor);
clutter_actor_show (main_item->priv->selection_actor);
clutter_actor_raise (main_item->priv->selection_actor, (ClutterActor *)main_item);
}
- clutter_cairo_texture_clear (main_item->priv->selection_actor);
- cr = clutter_cairo_texture_create (main_item->priv->selection_actor);
+ clutter_cairo_texture_clear ((ClutterCairoTexture *)main_item->priv->selection_actor);
+ cr = clutter_cairo_texture_create ((ClutterCairoTexture *)main_item->priv->selection_actor);
/* Step through each of the days. */
date = week_view->first_day_shown;
@@ -597,7 +596,7 @@ week_view_clutter_main_item_draw (ClutterCairoTexture *canvas_item)
GDate date;
gint num_days, day, day_x, day_y, day_w, day_h;
gint x=0, y=0;
- gint width, height;
+ guint width, height;
cairo_t *cr;
clutter_cairo_texture_clear (canvas_item);
@@ -730,7 +729,7 @@ e_week_view_clutter_main_item_redraw (EWeekViewClutterMainItem *item)
item->priv->selection_actor = NULL;
}
clutter_cairo_texture_clear ((ClutterCairoTexture *)item);
- week_view_clutter_main_item_draw ((ClutterActor *)item);
+ week_view_clutter_main_item_draw ((ClutterCairoTexture *)item);
}
void
@@ -743,7 +742,7 @@ e_week_view_clutter_main_item_set_size (EWeekViewClutterMainItem *item,
item->priv->selection_actor = NULL;
}
clutter_cairo_texture_set_surface_size ((ClutterCairoTexture *)item, width, height);
- week_view_clutter_main_item_draw (item);
+ week_view_clutter_main_item_draw ((ClutterCairoTexture *)item);
}
void
diff --git a/calendar/gui/e-week-view-clutter-titles-item.c b/calendar/gui/e-week-view-clutter-titles-item.c
index 3ee2519..ead0c77 100644
--- a/calendar/gui/e-week-view-clutter-titles-item.c
+++ b/calendar/gui/e-week-view-clutter-titles-item.c
@@ -109,7 +109,7 @@ week_view_clutter_titles_item_draw (ClutterCairoTexture *canvas_item)
gint weekday;
PangoLayout *layout;
gint x=0, y=0;
- gint width, height;
+ guint width, height;
cairo_t *cr;
clutter_cairo_texture_clear (canvas_item);
@@ -369,7 +369,7 @@ void
e_week_view_clutter_titles_item_redraw (EWeekViewClutterTitlesItem *item)
{
clutter_cairo_texture_clear ((ClutterCairoTexture *)item);
- week_view_clutter_titles_item_draw ((ClutterActor *)item);
+ week_view_clutter_titles_item_draw ((ClutterCairoTexture *)item);
}
void
@@ -378,5 +378,5 @@ e_week_view_clutter_titles_item_set_size (EWeekViewClutterTitlesItem *item,
int height)
{
clutter_cairo_texture_set_surface_size ((ClutterCairoTexture *)item, width, height);
- week_view_clutter_titles_item_draw (item);
+ week_view_clutter_titles_item_draw ((ClutterCairoTexture *) item);
}
diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c
index 659b33e..3212f37 100644
--- a/calendar/gui/e-week-view.c
+++ b/calendar/gui/e-week-view.c
@@ -298,7 +298,7 @@ week_view_update_row (EWeekView *week_view, gint row)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
e_week_view_queue_layout (week_view);
@@ -350,7 +350,7 @@ week_view_model_comps_deleted_cb (EWeekView *week_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
e_week_view_queue_layout (week_view);
@@ -395,7 +395,7 @@ week_view_model_rows_inserted_cb (EWeekView *week_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
e_week_view_queue_layout (week_view);
@@ -470,7 +470,7 @@ week_view_time_range_changed_cb (EWeekView *week_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
/* FIXME Preserve selection if possible */
@@ -531,8 +531,8 @@ week_view_notify_week_start_day_cb (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_titles_item_redraw (week_view->titles_canvas_actor);
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_titles_item_redraw ((EWeekViewClutterTitlesItem *)week_view->titles_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -644,7 +644,7 @@ week_view_cursor_key_up (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -670,7 +670,7 @@ week_view_cursor_key_down (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -690,7 +690,7 @@ week_view_cursor_key_left (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -710,7 +710,7 @@ week_view_cursor_key_right (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -788,7 +788,6 @@ main_canvas_set_canvas_size (GtkWidget *widget,
{
ClutterActor *stage = week_view->main_canvas_stage;
GtkWidget *embed = week_view->main_canvas_embed;
- guint w,h;
gtk_widget_set_size_request (embed, allocation->width, allocation->height);
clutter_actor_set_size (stage, allocation->width, allocation->height);
@@ -803,7 +802,6 @@ titles_canvas_set_canvas_size (GtkWidget *widget,
{
ClutterActor *stage = week_view->titles_canvas_stage;
GtkWidget *embed = week_view->titles_canvas_embed;
- guint w,h;
gtk_widget_set_size_request (embed, allocation->width, allocation->height);
clutter_actor_set_size (stage, allocation->width, allocation->height);
@@ -1024,7 +1022,7 @@ e_week_view_init (EWeekView *week_view)
for (i = 0; i < E_WEEK_VIEW_MAX_WEEKS * 7; i++) {
week_view->jump_actors[i] = gtk_clutter_texture_new_from_pixbuf (pixbuf);
clutter_actor_set_reactive (week_view->jump_actors[i], TRUE);
- clutter_container_add_actor (week_view->main_canvas_stage, week_view->jump_actors[i]);
+ clutter_container_add_actor ((ClutterContainer *)week_view->main_canvas_stage, week_view->jump_actors[i]);
g_signal_connect (week_view->jump_actors[i], "button-press-event",
G_CALLBACK (e_week_view_jump_to_actor_item), week_view);
}
@@ -1602,7 +1600,7 @@ e_week_view_focus_in (GtkWidget *widget, GdkEventFocus *event)
//clutter_actor_animate (week_view->titles_canvas_actor, CLUTTER_LINEAR,
// 1000, "opacity", 255, NULL);
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
return FALSE;
@@ -1630,7 +1628,7 @@ e_week_view_focus_out (GtkWidget *widget, GdkEventFocus *event)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
return FALSE;
@@ -1843,7 +1841,7 @@ e_week_view_update_query (EWeekView *week_view)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
e_week_view_free_events (week_view);
@@ -1951,7 +1949,7 @@ e_week_view_set_selected_time_range (ECalendarView *cal_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -1995,7 +1993,7 @@ e_week_view_set_selected_time_range_visible (EWeekView *week_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -2152,7 +2150,7 @@ e_week_view_set_first_day_shown (EWeekView *week_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -2361,8 +2359,8 @@ e_week_view_set_compress_weekend (EWeekView *week_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_titles_item_redraw (week_view->titles_canvas_actor);
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_titles_item_redraw ((EWeekViewClutterTitlesItem *)week_view->titles_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
g_object_notify (G_OBJECT (week_view), "compress-weekend");
@@ -2540,9 +2538,9 @@ e_week_view_remove_event_cb (EWeekView *week_view,
#if HAVE_CLUTTER
if (span->actor_item) {
if (delete_from_cal||event->marked_for_delete)
- e_week_view_clutter_event_item_scale_destroy (span->actor_item);
+ e_week_view_clutter_event_item_scale_destroy ((EWeekViewClutterEventItem *)span->actor_item);
else
- e_week_view_clutter_event_item_fade_destroy (span->actor_item);
+ e_week_view_clutter_event_item_fade_destroy ((EWeekViewClutterEventItem *)span->actor_item);
span->actor_item = NULL;
}
#endif
@@ -2764,7 +2762,7 @@ e_week_view_on_button_press (GtkWidget *widget,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -2784,7 +2782,7 @@ e_week_view_on_button_press (GtkWidget *widget,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -2811,9 +2809,9 @@ week_view_clutter_button_press (ClutterActor *actor,
}
if (event->button.click_count > 1 )
- bevent = gdk_event_new (GDK_2BUTTON_PRESS);
+ bevent = (GdkEventButton *)gdk_event_new (GDK_2BUTTON_PRESS);
else
- bevent = gdk_event_new (GDK_BUTTON_PRESS);
+ bevent = (GdkEventButton *)gdk_event_new (GDK_BUTTON_PRESS);
bevent->time = event->button.time;
bevent->button = event->button.button;
@@ -2821,7 +2819,7 @@ week_view_clutter_button_press (ClutterActor *actor,
bevent->y = (gfloat) event->button.y;
ret = e_week_view_on_button_press (week_view->main_canvas, bevent, week_view);
- gdk_event_free (bevent);
+ gdk_event_free ((GdkEvent *)bevent);
return ret;
}
@@ -2836,7 +2834,7 @@ e_week_view_on_clutter_button_release (ClutterActor *actor,
GdkEventButton *bevent;
gboolean ret;
- bevent = gdk_event_new (GDK_BUTTON_RELEASE);
+ bevent = (GdkEventButton *)gdk_event_new (GDK_BUTTON_RELEASE);
bevent->time = event->time;
bevent->button = event->button;
@@ -2844,7 +2842,7 @@ e_week_view_on_clutter_button_release (ClutterActor *actor,
bevent->y = (gfloat) event->y;
ret = e_week_view_on_button_release (week_view->main_canvas, bevent, week_view);
- gdk_event_free (bevent);
+ gdk_event_free ((GdkEvent *)bevent);
return ret;
}
@@ -2929,17 +2927,17 @@ e_week_view_on_clutter_motion (ClutterActor *actor,
ClutterMotionEvent *event,
EWeekView *week_view)
{
- GdkEventButton *bevent;
+ GdkEventMotion *bevent;
gboolean ret;
- bevent = gdk_event_new (GDK_MOTION_NOTIFY);
+ bevent = (GdkEventMotion *)gdk_event_new (GDK_MOTION_NOTIFY);
bevent->time = event->time;
bevent->x = (gfloat) event->x;
bevent->y = (gfloat) event->y;
ret = e_week_view_on_motion (week_view->main_canvas, bevent, week_view);
- gdk_event_free (bevent);
+ gdk_event_free ((GdkEvent *)bevent);
return ret;
}
@@ -3073,7 +3071,7 @@ e_week_view_update_selection (EWeekView *week_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_update_selection (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_update_selection ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
}
@@ -3598,11 +3596,11 @@ e_week_view_reshape_event_span (EWeekView *week_view,
char *summary;
gboolean free_text = FALSE;
- summary = e_calendar_view_get_icalcomponent_summary (event->comp_data->client, event->comp_data->icalcomp, &free_text);
+ summary = (char *)e_calendar_view_get_icalcomponent_summary (event->comp_data->client, event->comp_data->icalcomp, &free_text);
/* Create the background canvas item if necessary. */
if (!span->actor_item) {
- span->actor_item = e_week_view_clutter_event_item_new (week_view);
+ span->actor_item = (ClutterActor *)e_week_view_clutter_event_item_new (week_view);
//g_object_set_data ((GObject *)span->background_item, "event-num", GINT_TO_POINTER (event_num));
//g_signal_connect (span->background_item, "event",
@@ -3614,8 +3612,8 @@ e_week_view_reshape_event_span (EWeekView *week_view,
"span_num", span_num,
"text", summary ? summary : "",
NULL);
- e_week_view_clutter_event_item_redraw (span->actor_item);
- clutter_container_add_actor (week_view->main_canvas_stage, span->actor_item);
+ e_week_view_clutter_event_item_redraw ((EWeekViewClutterEventItem *)span->actor_item);
+ clutter_container_add_actor ((ClutterContainer *)week_view->main_canvas_stage, span->actor_item);
clutter_actor_raise_top (span->actor_item);
} else {
g_object_set (span->actor_item,
@@ -3623,7 +3621,7 @@ e_week_view_reshape_event_span (EWeekView *week_view,
"span_num", span_num,
"text", summary ? summary : "",
NULL);
- e_week_view_clutter_event_item_redraw (span->actor_item);
+ e_week_view_clutter_event_item_redraw ((EWeekViewClutterEventItem *)span->actor_item);
}
if (free_text)
g_free ((gchar *)summary);
@@ -3864,7 +3862,7 @@ e_week_view_start_editing_event (EWeekView *week_view,
#if HAVE_CLUTTER
if (!WITHOUT_CLUTTER) {
gtk_widget_grab_focus (week_view->main_canvas_embed);
- e_week_view_clutter_event_item_switch_editing_mode (span->actor_item);
+ e_week_view_clutter_event_item_switch_editing_mode ((EWeekViewClutterEventItem *)span->actor_item);
}
#endif
/* If the event is not shown, don't try to edit it. */
@@ -3986,7 +3984,7 @@ cancel_editing (EWeekView *week_view)
g_object_set (G_OBJECT (span->text_item), "text", summary ? summary : "", NULL);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_event_item_switch_normal_mode (span->actor_item);
+ e_week_view_clutter_event_item_switch_normal_mode ((EWeekViewClutterEventItem *)span->actor_item);
}
#endif
if (free_text)
@@ -4396,7 +4394,7 @@ e_week_view_change_event_time (EWeekView *week_view, time_t start_dt, time_t end
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
goto out;
@@ -4505,8 +4503,8 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
g_object_get (G_OBJECT (span->text_item), "text", &text, NULL);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_event_item_switch_normal_mode (span->actor_item);
- text = g_strdup(e_week_view_clutter_event_item_get_edit_text (span->actor_item));
+ e_week_view_clutter_event_item_switch_normal_mode ((EWeekViewClutterEventItem *)span->actor_item);
+ text = g_strdup(e_week_view_clutter_event_item_get_edit_text ((EWeekViewClutterEventItem *)span->actor_item));
}
#endif
comp = e_cal_component_new ();
@@ -4519,7 +4517,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
e_cal_component_get_uid (comp, &uid);
g_signal_handlers_disconnect_by_func(item, e_week_view_on_text_item_event, week_view);
e_week_view_foreach_event_with_uid (week_view, uid,
- e_week_view_remove_event_cb, TRUE);
+ e_week_view_remove_event_cb, GINT_TO_POINTER(TRUE));
week_view->event_destroyed = TRUE;
#if HAVE_CLUTTER
if (WITHOUT_CLUTTER) {
@@ -4527,7 +4525,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
e_week_view_check_layout (week_view);
@@ -4560,7 +4558,7 @@ e_week_view_on_editing_stopped (EWeekView *week_view,
E_CALENDAR_VIEW (week_view));
/* we remove the object since we either got the update from the server or failed */
- e_week_view_remove_event_cb (week_view, event_num, TRUE);
+ e_week_view_remove_event_cb (week_view, event_num, GINT_TO_POINTER(TRUE));
} else {
CalObjModType mod = CALOBJ_MOD_ALL;
GtkWindow *toplevel;
@@ -4872,7 +4870,7 @@ e_week_view_add_new_event_in_selected_range (EWeekView *week_view, const gchar *
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
if (!e_week_view_find_event_from_uid (week_view, ecal, uid, NULL, &event_num)) {
@@ -5275,7 +5273,7 @@ e_week_view_layout_timeout_cb (gpointer data)
gtk_widget_queue_draw (week_view->main_canvas);
#if HAVE_CLUTTER
} else {
- e_week_view_clutter_main_item_redraw (week_view->main_canvas_actor);
+ e_week_view_clutter_main_item_redraw ((EWeekViewClutterMainItem *)week_view->main_canvas_actor);
}
#endif
e_week_view_check_layout (week_view);
diff --git a/calendar/gui/ea-calendar.c b/calendar/gui/ea-calendar.c
index dfed18e..8cf6210 100644
--- a/calendar/gui/ea-calendar.c
+++ b/calendar/gui/ea-calendar.c
@@ -159,7 +159,7 @@ ea_calendar_focus_watcher (GSignalInvocationHint *ihint,
else if (E_IS_DAY_VIEW (object)) {
EDayView *day_view = E_DAY_VIEW (object);
if (event->type == GDK_FOCUS_CHANGE) {
- if (event->focus_change.in) {
+ if (event->focus_change.in && day_view->main_canvas_item) {
/* give main item chance to emit focus */
gnome_canvas_item_grab_focus (day_view->main_canvas_item);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]