[maemo-commits] [maemo-commits] r16309 - projects/haf/branches/hildon-thumbnail/daemonize/thumbs
From: subversion at stage.maemo.org subversion at stage.maemo.orgDate: Wed Oct 1 13:31:35 EEST 2008
- Previous message: [maemo-commits] r16308 - in projects/haf/branches/hildon-thumbnail/daemonize: . thumbs
- Next message: [maemo-commits] r16310 - projects/haf/branches/hildon-thumbnail/daemonize
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Author: pvanhoof Date: 2008-10-01 13:31:33 +0300 (Wed, 01 Oct 2008) New Revision: 16309 Modified: projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-albumart-factory.c Log: Renaming some stuff Modified: projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-albumart-factory.c =================================================================== --- projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-albumart-factory.c 2008-10-01 10:27:38 UTC (rev 16308) +++ projects/haf/branches/hildon-thumbnail/daemonize/thumbs/hildon-albumart-factory.c 2008-10-01 10:31:33 UTC (rev 16309) @@ -53,7 +53,7 @@ gboolean canceled; guint handle_id; -} ThumbsItem; +} ArtsItem; #ifndef gdk_pixbuf_new_from_stream_at_scale @@ -70,8 +70,8 @@ GError **error); #endif -#define THUMBS_ITEM(handle) (ThumbsItem*)(handle) -#define THUMBS_HANDLE(item) (HildonAlbumartFactoryHandle)(item) +#define ARTS_ITEM(handle) (ArtsItem*)(handle) +#define ARTS_HANDLE(item) (HildonAlbumartFactoryHandle)(item) #define HILDON_ALBUMART_APPLICATION "hildon-albumart" #define FACTORY_ERROR g_quark_from_static_string (HILDON_ALBUMART_APPLICATION) @@ -86,9 +86,9 @@ gchar *file; guint64 mtime; guint64 size; -} ThumbsCacheFile; +} ArtsCacheFile; -static void thumb_item_free(ThumbsItem* item) +static void thumb_item_free(ArtsItem* item) { g_free(item->uri); g_free(item->artist); @@ -97,7 +97,7 @@ } static void -create_pixbuf_and_callback (ThumbsItem *item, gchar *path) +create_pixbuf_and_callback (ArtsItem *item, gchar *path) { GFile *filei = NULL; GInputStream *stream = NULL; @@ -142,7 +142,7 @@ gpointer user_data) { gchar *key = g_strdup_printf ("%d", handle); - ThumbsItem *item = g_hash_table_lookup (tasks, key); + ArtsItem *item = g_hash_table_lookup (tasks, key); if (item) { GError *error = NULL; @@ -181,7 +181,7 @@ if(dir) { while((file = g_dir_read_name(dir)) != NULL) { gchar *file_path; - ThumbsCacheFile *item; + ArtsCacheFile *item; GFile *filei; GFileInfo *info; GError *error = NULL; @@ -214,7 +214,7 @@ g_object_unref (filei); g_object_unref (info); - item = g_new(ThumbsCacheFile, 1); + item = g_new(ArtsCacheFile, 1); item->file = file_path; item->mtime = mtime; item->size = size; @@ -227,7 +227,7 @@ } static void -cache_file_free(ThumbsCacheFile *item) +cache_file_free(ArtsCacheFile *item) { g_free (item->file); g_free (item); @@ -236,8 +236,8 @@ static gint cache_file_compare(gconstpointer a, gconstpointer b) { - ThumbsCacheFile *f1 = *(ThumbsCacheFile**)a, - *f2 = *(ThumbsCacheFile**)b; + ArtsCacheFile *f1 = *(ArtsCacheFile**)a, + *f2 = *(ArtsCacheFile**)b; /* Sort in descending order */ if(f2->mtime == f1->mtime) { @@ -267,7 +267,7 @@ g_ptr_array_sort (files, cache_file_compare); for(i = 0; i < files->len; i++) { - ThumbsCacheFile *item = g_ptr_array_index (files, i); + ArtsCacheFile *item = g_ptr_array_index (files, i); size += item->size; if ((max_size >= 0 && size >= max_size) || item->mtime < min_mtime) { @@ -284,7 +284,7 @@ static void on_got_handle (DBusGProxy *proxy, guint OUT_handle, GError *error, gpointer userdata) { - ThumbsItem *item = userdata; + ArtsItem *item = userdata; gchar *key = g_strdup_printf ("%d", OUT_handle); item->handle_id = OUT_handle; @@ -294,22 +294,22 @@ typedef struct { gchar *path; - ThumbsItem *item; -} ThumbsItemAndPaths; + ArtsItem *item; +} ArtsItemAndPaths; static void -free_thumbsitem_and_paths (ThumbsItemAndPaths *info) +free_thumbsitem_and_paths (ArtsItemAndPaths *info) { g_free (info->path); thumb_item_free (info->item); - g_slice_free (ThumbsItemAndPaths, info); + g_slice_free (ArtsItemAndPaths, info); } static gboolean have_all_cb (gpointer user_data) { - ThumbsItemAndPaths *info = user_data; - ThumbsItem *item = info->item; + ArtsItemAndPaths *info = user_data; + ArtsItem *item = info->item; create_pixbuf_and_callback (item, info->path); @@ -324,14 +324,14 @@ { gchar *path; GError *error = NULL; - ThumbsItem *item; + ArtsItem *item; gboolean have_all = FALSE; hildon_thumbnail_util_get_albumart_path (artist, album, uri, &path); have_all = g_file_test (path, G_FILE_TEST_EXISTS); - item = g_new (ThumbsItem, 1); + item = g_new (ArtsItem, 1); item->uri = g_strdup(uri); item->album = g_strdup(album); @@ -342,7 +342,7 @@ item->handle_id = 0; if (have_all) { - ThumbsItemAndPaths *info = g_slice_new (ThumbsItemAndPaths); + ArtsItemAndPaths *info = g_slice_new (ArtsItemAndPaths); info->item = item; info->path = path; @@ -367,14 +367,14 @@ } - return THUMBS_HANDLE (item); + return ARTS_HANDLE (item); } static void on_cancelled (DBusGProxy *proxy, GError *error, gpointer userdata) { - ThumbsItem *item = userdata; + ArtsItem *item = userdata; gchar *key = g_strdup_printf ("%d", item->handle_id); /* Unregister the item */ @@ -384,7 +384,7 @@ void hildon_albumart_factory_cancel(HildonAlbumartFactoryHandle handle) { - ThumbsItem *item = THUMBS_ITEM (handle); + ArtsItem *item = ARTS_ITEM (handle); init();
- Previous message: [maemo-commits] r16308 - in projects/haf/branches/hildon-thumbnail/daemonize: . thumbs
- Next message: [maemo-commits] r16310 - projects/haf/branches/hildon-thumbnail/daemonize
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]