Use _katze_array_update consistently internally

This commit is contained in:
Christian Dywan 2012-03-08 00:44:39 +01:00
parent 1309a77aae
commit f3a5d49434

View file

@ -74,6 +74,13 @@ GList* kalistglobal;
static void static void
katze_array_finalize (GObject* object); katze_array_finalize (GObject* object);
static void
_katze_array_update (KatzeArray* array)
{
g_object_set_data (G_OBJECT (array), "last-update",
GINT_TO_POINTER (time (NULL)));
}
static void static void
_katze_array_add_item (KatzeArray* array, _katze_array_add_item (KatzeArray* array,
gpointer item) gpointer item)
@ -84,8 +91,7 @@ _katze_array_add_item (KatzeArray* array,
katze_item_set_parent (item, array); katze_item_set_parent (item, array);
array->items = g_list_append (array->items, item); array->items = g_list_append (array->items, item);
g_object_set_data (G_OBJECT (array), "last-update", _katze_array_update (array);
GINT_TO_POINTER (time (NULL)));
} }
static void static void
@ -97,8 +103,7 @@ _katze_array_remove_item (KatzeArray* array,
if (KATZE_IS_ITEM (item)) if (KATZE_IS_ITEM (item))
katze_item_set_parent (item, NULL); katze_item_set_parent (item, NULL);
g_object_unref (item); g_object_unref (item);
g_object_set_data (G_OBJECT (array), "last-update", _katze_array_update (array);
GINT_TO_POINTER (time (NULL)));
} }
static void static void
@ -108,8 +113,7 @@ _katze_array_move_item (KatzeArray* array,
{ {
array->items = g_list_remove (array->items, item); array->items = g_list_remove (array->items, item);
array->items = g_list_insert (array->items, item, position); array->items = g_list_insert (array->items, item, position);
g_object_set_data (G_OBJECT (array), "last-update", _katze_array_update (array);
GINT_TO_POINTER (time (NULL)));
} }
static void static void
@ -121,15 +125,7 @@ _katze_array_clear (KatzeArray* array)
g_signal_emit (array, signals[REMOVE_ITEM], 0, item); g_signal_emit (array, signals[REMOVE_ITEM], 0, item);
g_list_free (array->items); g_list_free (array->items);
array->items = NULL; array->items = NULL;
g_object_set_data (G_OBJECT (array), "last-update", _katze_array_update (array);
GINT_TO_POINTER (time (NULL)));
}
static void
_katze_array_update (KatzeArray* array)
{
g_object_set_data (G_OBJECT (array), "last-update",
GINT_TO_POINTER (time (NULL)));
} }
static void static void