diff options
Diffstat (limited to 'calendar/gui/misc.c')
-rw-r--r-- | calendar/gui/misc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/calendar/gui/misc.c b/calendar/gui/misc.c index 332283172b..026cd8417e 100644 --- a/calendar/gui/misc.c +++ b/calendar/gui/misc.c @@ -78,3 +78,16 @@ get_uri_without_password (const char *full_uri) return uristr; } + +gint +get_position_in_array (GPtrArray *objects, gpointer item) +{ + gint i; + + for (i = 0; i < objects->len; i++) { + if (g_ptr_array_index (objects, i) == item) + return i; + } + + return -1; +} |