aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-10-25 05:55:54 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-10-27 21:25:01 +0800
commit58166e645971a4812fef23702f45cacc8e64e419 (patch)
treebedad70e39e2215a53105e0303c168e86140371a /calendar/gui/e-day-view.c
parentc58b70659747967568a536e217b9440424709f92 (diff)
downloadgsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.gz
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.zst
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.zip
Prefer G_N_ELEMENTS over sizeof calculations.
Diffstat (limited to 'calendar/gui/e-day-view.c')
-rw-r--r--calendar/gui/e-day-view.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c
index af6fdc66e7..46a37ddc46 100644
--- a/calendar/gui/e-day-view.c
+++ b/calendar/gui/e-day-view.c
@@ -112,7 +112,6 @@ static GtkTargetEntry target_table[] = {
{ (gchar *) "text/x-calendar", 0, TARGET_VCALENDAR },
{ (gchar *) "text/calendar", 0, TARGET_VCALENDAR }
};
-static guint n_targets = sizeof(target_table) / sizeof(target_table[0]);
static void e_day_view_destroy (GtkObject *object);
static void e_day_view_realize (GtkWidget *widget);
@@ -1336,11 +1335,11 @@ e_day_view_init (EDayView *day_view)
/* Set up the drop sites. */
gtk_drag_dest_set (day_view->top_canvas,
GTK_DEST_DEFAULT_ALL,
- target_table, n_targets,
+ target_table, G_N_ELEMENTS (target_table),
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
gtk_drag_dest_set (day_view->main_canvas,
GTK_DEST_DEFAULT_ALL,
- target_table, n_targets,
+ target_table, G_N_ELEMENTS (target_table),
GDK_ACTION_COPY | GDK_ACTION_MOVE | GDK_ACTION_ASK);
/* connect to ECalendarView's signals */
@@ -3927,8 +3926,8 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget,
day_view->resize_bars_event_num = -1;
}
- target_list = gtk_target_list_new (target_table,
- n_targets);
+ target_list = gtk_target_list_new (
+ target_table, G_N_ELEMENTS (target_table));
gtk_drag_begin (widget, target_list,
GDK_ACTION_COPY | GDK_ACTION_MOVE,
1, (GdkEvent*)mevent);
@@ -4030,8 +4029,8 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget,
day_view->resize_bars_event_num = -1;
}
- target_list = gtk_target_list_new (target_table,
- n_targets);
+ target_list = gtk_target_list_new (
+ target_table, G_N_ELEMENTS (target_table));
gtk_drag_begin (widget, target_list,
GDK_ACTION_COPY | GDK_ACTION_MOVE,
1, (GdkEvent*)mevent);