[evolution-rss/evolution-rss-0-2-0] prefer folder info instead of folder object in display_folder_icon() It considerably speeds up the s
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss/evolution-rss-0-2-0] prefer folder info instead of folder object in display_folder_icon() It considerably speeds up the s
- Date: Sat, 30 Oct 2010 16:29:48 +0000 (UTC)
commit da162058db718cd8c13cd3c9b921216196b5f802
Author: Lucian Langa <lucilanga gnome org>
Date: Sat Oct 30 19:28:57 2010 +0300
prefer folder info instead of folder object in display_folder_icon()
It considerably speeds up the startup phase
src/rss-image.c | 19 ++++++++-----------
1 files changed, 8 insertions(+), 11 deletions(-)
---
diff --git a/src/rss-image.c b/src/rss-image.c
index e8df219..3cff85c 100644
--- a/src/rss-image.c
+++ b/src/rss-image.c
@@ -409,7 +409,7 @@ display_folder_icon(GtkTreeStore *tree_store, gchar *key)
EMFolderTreeModel *mod = (EMFolderTreeModel *)tree_store;
struct _EMFolderTreeModelStoreInfo *si;
CamelStore *store = rss_component_peek_local_store();
- CamelFolder *rss_folder;
+ CamelFolderInfo *rssi;
gint i=0, size;
gint *sizes;
@@ -419,14 +419,15 @@ display_folder_icon(GtkTreeStore *tree_store, gchar *key)
if (pixbuf) {
gchar *name = g_hash_table_lookup(rf->hrname_r, key);
- gchar *full_name = g_strdup_printf(
- "%s" G_DIR_SEPARATOR_S "%s",
+ gchar *full_name = g_build_path(
+ G_DIR_SEPARATOR_S,
get_main_folder(),
- lookup_feed_folder(name));
- rss_folder = camel_store_get_folder (
+ lookup_feed_folder(name),
+ NULL);
+ rssi = camel_store_get_folder_info (
store,
full_name, 0, NULL);
- if (!rss_folder) {
+ if (!rssi) {
g_free(full_name);
result = FALSE;
goto out;
@@ -463,11 +464,7 @@ display_folder_icon(GtkTreeStore *tree_store, gchar *key)
COL_STRING_ICON_NAME, key,
-1);
g_free(full_name);
-#if (DATASERVER_VERSION >= 2031001)
- g_object_unref (rss_folder);
-#else
- camel_object_unref (rss_folder);
-#endif
+ camel_store_free_folder_info (store, rssi);
g_object_unref(pixbuf);
result = TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]