[Xfce4-commits] <midori:master> Use _katze_array_update consistently internally
Christian Dywan
noreply at xfce.org
Thu Mar 8 01:12:01 CET 2012
Updating branch refs/heads/master
to f3a5d49434e761d282223ec34e398f5372558b34 (commit)
from 1309a77aaedea5ae8357270856b21c4d6548d6db (commit)
commit f3a5d49434e761d282223ec34e398f5372558b34
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Mar 8 00:44:39 2012 +0100
Use _katze_array_update consistently internally
katze/katze-array.c | 26 +++++++++++---------------
1 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/katze/katze-array.c b/katze/katze-array.c
index 7e2e2e1..6d11b5a 100644
--- a/katze/katze-array.c
+++ b/katze/katze-array.c
@@ -75,6 +75,13 @@ static void
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
_katze_array_add_item (KatzeArray* array,
gpointer item)
{
@@ -84,8 +91,7 @@ _katze_array_add_item (KatzeArray* array,
katze_item_set_parent (item, array);
array->items = g_list_append (array->items, item);
- g_object_set_data (G_OBJECT (array), "last-update",
- GINT_TO_POINTER (time (NULL)));
+ _katze_array_update (array);
}
static void
@@ -97,8 +103,7 @@ _katze_array_remove_item (KatzeArray* array,
if (KATZE_IS_ITEM (item))
katze_item_set_parent (item, NULL);
g_object_unref (item);
- g_object_set_data (G_OBJECT (array), "last-update",
- GINT_TO_POINTER (time (NULL)));
+ _katze_array_update (array);
}
static void
@@ -108,8 +113,7 @@ _katze_array_move_item (KatzeArray* array,
{
array->items = g_list_remove (array->items, item);
array->items = g_list_insert (array->items, item, position);
- g_object_set_data (G_OBJECT (array), "last-update",
- GINT_TO_POINTER (time (NULL)));
+ _katze_array_update (array);
}
static void
@@ -121,15 +125,7 @@ _katze_array_clear (KatzeArray* array)
g_signal_emit (array, signals[REMOVE_ITEM], 0, item);
g_list_free (array->items);
array->items = NULL;
- g_object_set_data (G_OBJECT (array), "last-update",
- 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)));
+ _katze_array_update (array);
}
static void
More information about the Xfce4-commits
mailing list