aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-day-view-time-item.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-time-item.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-time-item.c')
-rw-r--r--calendar/gui/e-day-view-time-item.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/calendar/gui/e-day-view-time-item.c b/calendar/gui/e-day-view-time-item.c
index 5068ed47e0..ff0f6406a4 100644
--- a/calendar/gui/e-day-view-time-item.c
+++ b/calendar/gui/e-day-view-time-item.c
@@ -733,7 +733,6 @@ e_day_view_time_item_show_popup_menu (EDayViewTimeItem *time_item,
{
static gint divisions[] = { 60, 30, 15, 10, 5 };
EDayView *day_view;
- gint num_divisions = sizeof (divisions) / sizeof (divisions[0]);
GtkWidget *menu, *item, *submenu;
gchar buffer[256];
GSList *group = NULL, *recent_zones, *s;
@@ -752,7 +751,7 @@ e_day_view_time_item_show_popup_menu (EDayViewTimeItem *time_item,
menu, "selection-done",
G_CALLBACK (gtk_widget_destroy), NULL);
- for (i = 0; i < num_divisions; i++) {
+ for (i = 0; i < G_N_ELEMENTS (divisions); i++) {
g_snprintf (buffer, sizeof (buffer),
/* TO TRANSLATORS: %02i is the number of minutes; this is a context menu entry
* to change the length of the time division in the calendar day view, e.g.