[evolution-rss] update scripts
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] update scripts
- Date: Wed, 14 Dec 2011 16:24:41 +0000 (UTC)
commit 1d6aa37e1b0f483e29f35d475ff52535acb1d729
Author: Lucian Langa <lucilanga gnome org>
Date: Wed Dec 14 16:50:40 2011 +0100
update scripts
src/rss-config-factory.c | 14 +++++++++-----
src/rss-image.c | 4 +++-
src/rss.c | 7 +++----
3 files changed, 15 insertions(+), 10 deletions(-)
---
diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c
index 1e17d39..ef71595 100644
--- a/src/rss-config-factory.c
+++ b/src/rss-config-factory.c
@@ -2573,13 +2573,13 @@ gen_folder_list(gpointer key, gpointer value, gpointer user)
folder = g_build_path(G_DIR_SEPARATOR_S, mf, tmp, NULL);
else
folder = g_strdup(mf);
- g_free(mf);
g_free(tmp);
if (!g_list_find_custom(flist, folder, (GCompareFunc)strcmp)) {
d("append folder:%s\n", folder);
flist = g_list_append(flist, folder);
}
}
+ g_free(mf);
}
void
@@ -2647,11 +2647,12 @@ create_folder_feeds(gchar *folder)
{
gchar *tf;
GList *names;
+ gchar *mf = get_main_folder();
GHashTable *nhash = g_hash_table_new(
g_str_hash,
g_str_equal);
strbuf = NULL;
- if (folder && strcmp(folder, get_main_folder()))
+ if (folder && strcmp(folder, mf))
tf = extract_main_folder(folder);
else {
tf = g_strdup(".");
@@ -2672,6 +2673,7 @@ create_folder_feeds(gchar *folder)
rf->reversed_feed_folders,
(GHFunc)create_outline_feeds, tf);
g_free(tf);
+ g_free(mf);
return strbuf;
}
@@ -2711,7 +2713,9 @@ create_xml(GtkWidget *progress)
}
list = g_list_sort(list, (GCompareFunc)g_ascii_strcasecmp);
} else {
- list = g_list_append(list, get_main_folder());
+ gchar *mf = get_main_folder();
+ list = g_list_append(list, mf);
+ g_free(mf);
}
spacer = g_string_new(NULL);
@@ -3607,8 +3611,8 @@ void rss_folder_factory_commit (EPlugin *epl, EConfigTarget *target)
#endif
if (folder == NULL
- || g_ascii_strncasecmp(folder, main_folder, strlen(main_folder))
- || !g_ascii_strcasecmp(folder, main_folder))
+ || g_ascii_strncasecmp(folder, main_folder, strlen(main_folder))
+ || !g_ascii_strcasecmp(folder, main_folder))
return;
key = lookup_key(ofolder);
diff --git a/src/rss-image.c b/src/rss-image.c
index 6000181..d15a9ba 100644
--- a/src/rss-image.c
+++ b/src/rss-image.c
@@ -446,14 +446,16 @@ display_folder_icon(GtkTreeStore *tree_store, gchar *key)
pixbuf = gdk_pixbuf_new_from_file(img_file, NULL);
if (pixbuf) {
+ gchar *mf = get_main_folder();
gchar *name = g_hash_table_lookup(rf->hrname_r, key);
gchar *folder_name = lookup_feed_folder(name);
gchar *full_name = g_build_path(
G_DIR_SEPARATOR_S,
- get_main_folder(),
+ mf,
folder_name,
NULL);
g_free(folder_name);
+ g_free(mf);
/*folder isn't created yet?*/
#if (DATASERVER_VERSION >= 2033001)
rssi = camel_store_get_folder_info_sync (
diff --git a/src/rss.c b/src/rss.c
index 68f42f6..fec09a4 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -2666,7 +2666,7 @@ void org_gnome_cooly_folder_refresh(void *ep, EShellView *shell_view)
folder_name = t->uri;
#endif
if (folder_name == NULL
- || g_ascii_strncasecmp(folder_name, main_folder, strlen(main_folder)))
+ || g_ascii_strncasecmp(folder_name, main_folder, strlen(main_folder)))
goto out;
if (!g_ascii_strcasecmp(folder_name, main_folder))
goto out;
@@ -2707,7 +2707,8 @@ void org_gnome_cooly_folder_refresh(void *ep, EShellView *shell_view)
single_pending = FALSE;
}
g_free(name);
-out: return;
+out: g_free(main_folder);
+ return;
}
void org_gnome_cooly_folder_icon(void *ep, EMEventTargetCustomIcon *t);
@@ -2717,7 +2718,6 @@ void org_gnome_cooly_folder_icon(void *ep, EMEventTargetCustomIcon *t)
gchar *rss_folder, *ofolder, *key;
gchar *main_folder = get_main_folder();
- main_folder = get_main_folder();
if (t->folder_name == NULL
|| g_ascii_strncasecmp(t->folder_name, main_folder, strlen(main_folder)))
goto out;
@@ -2736,7 +2736,6 @@ void org_gnome_cooly_folder_icon(void *ep, EMEventTargetCustomIcon *t)
if (!key)
goto normal;
-
if (!evolution_store)
evolution_store = t->store;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]