[evolution-rss] init rss hooks later
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] init rss hooks later
- Date: Sat, 21 Aug 2010 13:36:30 +0000 (UTC)
commit 7ded4369f4be131ae61e808cf490adcc5f49eb9a
Author: Lucian Langa <lucilanga gnome org>
Date: Sat Aug 21 16:29:47 2010 +0300
init rss hooks later
src/rss.c | 36 +++++++++++++++++++-----------------
src/rss.h | 1 +
2 files changed, 20 insertions(+), 17 deletions(-)
---
diff --git a/src/rss.c b/src/rss.c
index f519d8e..7bb5f7b 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -4200,7 +4200,6 @@ store_folder_renamed(CamelStore *store,
#if (DATASERVER_VERSION < 2031001)
RenameInfo *info = event_data;
#endif
-
gchar *main_folder = lookup_main_folder();
#if (DATASERVER_VERSION < 2031001)
if (!g_ascii_strncasecmp(info->old_base, main_folder, strlen(main_folder))
@@ -4559,7 +4558,6 @@ void org_gnome_cooly_rss_startup(void *ep, ESEventTargetUpgrade *t)
#endif
{
gdouble timeout;
- CamelStore *store;
if (gconf_client_get_bool (rss_gconf, GCONF_KEY_START_CHECK, NULL)) {
//as I don't know how to set this I'll setup a 10 secs timeout
@@ -4580,21 +4578,6 @@ void org_gnome_cooly_rss_startup(void *ep, ESEventTargetUpgrade *t)
custom_feed_timeout();
rss_load_images();
-
-
- /* hook in rename event to catch feeds folder rename */
- store = rss_component_peek_local_store();
-#if (DATASERVER_VERSION >= 2031002)
- g_signal_connect(store, "folder_renamed",
- G_CALLBACK(store_folder_renamed), NULL);
- g_signal_connect(store, "folder_deleted",
- G_CALLBACK(store_folder_deleted), NULL);
-#else
- camel_object_hook_event(store, "folder_renamed",
- (CamelObjectEventHookFunc)store_folder_renamed, NULL);
- camel_object_hook_event(store, "folder_deleted",
- (CamelObjectEventHookFunc)store_folder_deleted, NULL);
-#endif
}
/* check if rss folders exists and create'em otherwise */
@@ -4987,6 +4970,24 @@ void quit_cb(void *ep, EShellView *shell_view)
rf->cancel_all=1;
}
+void rss_hooks_init(void)
+{
+ CamelStore *store;
+ /* hook in rename event to catch feeds folder rename */
+ store = rss_component_peek_local_store();
+#if (DATASERVER_VERSION >= 2031002)
+ g_signal_connect(store, "folder_renamed",
+ G_CALLBACK(store_folder_renamed), NULL);
+ g_signal_connect(store, "folder_deleted",
+ G_CALLBACK(store_folder_deleted), NULL);
+#else
+ camel_object_hook_event(store, "folder_renamed",
+ (CamelObjectEventHookFunc)store_folder_renamed, NULL);
+ camel_object_hook_event(store, "folder_deleted",
+ (CamelObjectEventHookFunc)store_folder_deleted, NULL);
+#endif
+}
+
gboolean e_plugin_ui_init (GtkUIManager *ui_manager,
EShellView *shell_view);
@@ -5016,6 +5017,7 @@ e_plugin_ui_init (GtkUIManager *ui_manager,
/* rss_search_bar_hook();*/
webkit_hook_actions();
#endif
+ rss_hooks_init();
return TRUE;
}
#endif
diff --git a/src/rss.h b/src/rss.h
index 854efbd..6e82bc1 100644
--- a/src/rss.h
+++ b/src/rss.h
@@ -403,6 +403,7 @@ void rss_error(
gchar *name,
gchar *error,
gchar *emsg);
+void rss_hooks_init(void);
void rss_select_folder(gchar *folder_name);
gchar *lookup_chn_name_by_url(gchar *url);
gboolean update_articles(gboolean disabler);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]