diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2009-10-25 05:55:54 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2009-10-27 21:25:01 +0800 |
commit | 58166e645971a4812fef23702f45cacc8e64e419 (patch) | |
tree | bedad70e39e2215a53105e0303c168e86140371a /widgets/table/e-table-header-item.c | |
parent | c58b70659747967568a536e217b9440424709f92 (diff) | |
download | gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.gz gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.tar.zst gsoc2013-evolution-58166e645971a4812fef23702f45cacc8e64e419.zip |
Prefer G_N_ELEMENTS over sizeof calculations.
Diffstat (limited to 'widgets/table/e-table-header-item.c')
-rw-r--r-- | widgets/table/e-table-header-item.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 4bfa15f6ce..684c92037a 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -75,7 +75,6 @@ static guint ethi_signals [LAST_SIGNAL] = { 0, }; #define ethi_get_type e_table_header_item_get_type G_DEFINE_TYPE (ETableHeaderItem, ethi, GNOME_TYPE_CANVAS_ITEM) -#define ELEMENTS(x) (sizeof (x) / sizeof (x[0])) #define d(x) static void ethi_drop_table_header (ETableHeaderItem *ethi); @@ -881,7 +880,7 @@ ethi_realize (GnomeCanvasItem *item) */ ethi_drop_types[0].target = g_strdup_printf("%s-%s", ethi_drop_types[0].target, ethi->dnd_code); gtk_drag_dest_set (GTK_WIDGET (item->canvas), 0, - ethi_drop_types, ELEMENTS (ethi_drop_types), + ethi_drop_types, G_N_ELEMENTS (ethi_drop_types), GDK_ACTION_MOVE); g_free(ethi_drop_types[0].target); @@ -1169,7 +1168,7 @@ ethi_start_drag (ETableHeaderItem *ethi, GdkEvent *event) ethi_drag_types[0].target = g_strdup_printf( "%s-%s", ethi_drag_types[0].target, ethi->dnd_code); list = gtk_target_list_new ( - ethi_drag_types, ELEMENTS (ethi_drag_types)); + ethi_drag_types, G_N_ELEMENTS (ethi_drag_types)); context = gtk_drag_begin (widget, list, GDK_ACTION_MOVE, 1, event); g_free(ethi_drag_types[0].target); |