aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.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 /mail/message-list.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 'mail/message-list.c')
-rw-r--r--mail/message-list.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mail/message-list.c b/mail/message-list.c
index c45dbf3437..90c0812aff 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -2213,7 +2213,7 @@ ml_tree_drag_motion(ETree *tree, GdkDragContext *context, gint x, gint y, guint
gint i;
d(printf("atom drop '%s'\n", gdk_atom_name(targets->data)));
- for (i=0;i<sizeof(ml_drag_info)/sizeof(ml_drag_info[0]);i++)
+ for (i = 0; i < G_N_ELEMENTS (ml_drag_info); i++)
if (targets->data == (gpointer)ml_drag_info[i].atom)
actions |= ml_drag_info[i].actions;
}
@@ -2488,7 +2488,7 @@ message_list_class_init (MessageListClass *class)
GtkObjectClass *gtk_object_class;
gint i;
- for (i=0;i<sizeof(ml_drag_info)/sizeof(ml_drag_info[0]);i++)
+ for (i = 0; i < G_N_ELEMENTS (ml_drag_info); i++)
ml_drag_info[i].atom = gdk_atom_intern(ml_drag_info[i].target, FALSE);
g_type_class_add_private (class, sizeof (MessageListPrivate));
@@ -2640,14 +2640,14 @@ message_list_construct (MessageList *message_list)
G_CALLBACK (on_selection_changed_cmd), message_list);
e_tree_drag_source_set(message_list->tree, GDK_BUTTON1_MASK,
- ml_drag_types, sizeof(ml_drag_types)/sizeof(ml_drag_types[0]),
+ ml_drag_types, G_N_ELEMENTS (ml_drag_types),
GDK_ACTION_MOVE|GDK_ACTION_COPY);
g_signal_connect(message_list->tree, "tree_drag_data_get",
G_CALLBACK(ml_tree_drag_data_get), message_list);
e_tree_drag_dest_set(message_list->tree, GTK_DEST_DEFAULT_ALL,
- ml_drop_types, sizeof(ml_drop_types)/sizeof(ml_drop_types[0]),
+ ml_drop_types, G_N_ELEMENTS (ml_drop_types),
GDK_ACTION_MOVE|GDK_ACTION_COPY);
g_signal_connect(message_list->tree, "tree_drag_data_received",