aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
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 /widgets/misc
parentc58b70659747967568a536e217b9440424709f92 (diff)
downloadgsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.gz
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.bz2
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.lz
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.xz
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.zst
gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.zip
Prefer G_N_ELEMENTS over sizeof calculations.
Diffstat (limited to 'widgets/misc')
-rw-r--r--widgets/misc/test-calendar.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/widgets/misc/test-calendar.c b/widgets/misc/test-calendar.c
index 458d60f90a..83b8f11cd7 100644
--- a/widgets/misc/test-calendar.c
+++ b/widgets/misc/test-calendar.c
@@ -41,8 +41,6 @@ static GtkTargetEntry target_table[] = {
{ (gchar *) "E-SHORTCUT", 0, TARGET_SHORTCUT }
};
-static guint n_targets = sizeof(target_table) / sizeof(target_table[0]);
-
static void on_date_range_changed (ECalendarItem *calitem);
static void on_selection_changed (ECalendarItem *calitem);
@@ -85,7 +83,7 @@ main (gint argc, gchar **argv)
gtk_drag_dest_set (cal,
GTK_DEST_DEFAULT_ALL,
- target_table, n_targets,
+ target_table, G_N_ELEMENTS (target_table),
GDK_ACTION_COPY | GDK_ACTION_MOVE);
vbox = gtk_vbox_new (FALSE, 0);