[evolution-rss] code cleanups
- From: Lucian Langa <lucilanga src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-rss] code cleanups
- Date: Thu, 17 Mar 2011 20:14:05 +0000 (UTC)
commit 21279d3087ff7fb04500915f9e28395706f5bcaa
Author: Lucian Langa <lucilanga gnome org>
Date: Thu Mar 17 22:12:28 2011 +0200
code cleanups
TODO | 6 ------
src/parser.c | 16 +---------------
src/rss-config-factory.c | 2 --
src/rss.c | 17 +++++------------
4 files changed, 6 insertions(+), 35 deletions(-)
---
diff --git a/TODO b/TODO
index 1652a74..92b62a8 100644
--- a/TODO
+++ b/TODO
@@ -1,13 +1,10 @@
* maybe implement md5 for uniqueing articles (for broken feeds)
* detect duplicate items by content not by feedid
- * check webkit area sizing when using zoom in/out
* implement USM (universal subscription mechanism)
* implement notify back of imported feed perhaps libnotify
* when adding a feed as opml file offer to import (file detection)
- * fix recursivity on layer_find_pos
* provide predefined groups of feeds (OSS & co)
- * evolution import rss add no. of retries
* slow delete operation on large folders
* add handling parser error to setup_feed (check HIG for error msg)
* use combo popup for moving and placement of feed folders
@@ -23,7 +20,6 @@
* make gtkhtml rendering non-blocking
* use ellipsize in web auth dialog
* find a way to delete a feed that has not been created (directory isn't there)
- * fix comment cancellation
* fix wrong SSL browser dialog
* check custom interval fetching right after it was setup
* search for threaded implmentation options
@@ -45,5 +41,3 @@
* default render engine broken again
* retest deleting a feed when fetching in progress
* detect rss-id changes (file changes) -> feeds downloaded all over again
- * make move of feed to different folder real work
- * proxify async the download_* functions
diff --git a/src/parser.c b/src/parser.c
index f940b51..a083280 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -544,7 +544,6 @@ layer_find_tag (xmlNodePtr node,
{
xmlBufferPtr buf = xmlBufferCreate();
gchar *content;
- guint len = 0;
int i;
char* (*func)();
@@ -571,7 +570,7 @@ layer_find_tag (xmlNodePtr node,
//we need separate xhtml parsing because of xmlNodegetcontent substitutes html entities
if (nodetype && !strcasecmp(nodetype, "xhtml")) { // test this with "html" or smth else
//this looses html entities
- len = xmlNodeDump(buf, node->doc, node, 0, 0);
+ xmlNodeDump(buf, node->doc, node, 0, 0);
content = g_strdup_printf("%s", xmlBufferContent(buf));
} else {
content = (char *)xmlNodeGetContent(node);
@@ -773,21 +772,8 @@ tree_walk (xmlNodePtr root, RDF *r)
xmlNodePtr channel = NULL, image = NULL;
GArray *item = g_array_new (TRUE, TRUE, sizeof (xmlNodePtr));
gchar *t;
- gchar *charset;
gchar *md2, *tmp, *ver;
- /* check in-memory encoding first,
- * fallback to transport encoding, which may or may not be correct
- */
- if (r->cache->charset == XML_CHAR_ENCODING_UTF8
- || r->cache->charset == XML_CHAR_ENCODING_ASCII) {
- charset = NULL;
- } else {
- /* bad/missing encoding, fallback to latin1 (locale?) */
- charset = r->cache->encoding ?
- (gchar *)r->cache->encoding : (gchar *)"iso-8859-1";
- }
-
do {
walk = rewalk;
rewalk = NULL;
diff --git a/src/rss-config-factory.c b/src/rss-config-factory.c
index e1f7858..cfd346d 100644
--- a/src/rss-config-factory.c
+++ b/src/rss-config-factory.c
@@ -442,7 +442,6 @@ folder_cb (GtkWidget *widget, gpointer data);
void
folder_cb (GtkWidget *widget, gpointer data)
{
- CamelFolder *folder;
EMailBackend *backend;
EMailSession *session;
CamelFolderInfo *folderinfo;
@@ -463,7 +462,6 @@ folder_cb (GtkWidget *widget, gpointer data)
session = e_mail_backend_get_session (backend);
- folder = e_mail_reader_get_folder (reader);
window = e_mail_reader_get_window (reader);
folder_tree = em_folder_tree_new (session);
diff --git a/src/rss.c b/src/rss.c
index 5283e49..29d7bc3 100644
--- a/src/rss.c
+++ b/src/rss.c
@@ -662,7 +662,6 @@ create_user_pass_dialog(RSS_AUTH *auth)
GtkWidget *container, *container2;
GtkWidget *widget, *action_area;
GtkWidget *content_area, *password_dialog;
- AtkObject *a11y;
gchar *markup;
widget = gtk_dialog_new_with_buttons (
@@ -748,7 +747,6 @@ create_user_pass_dialog(RSS_AUTH *auth)
0, 1, 0, 1, GTK_EXPAND | GTK_FILL, 0, 0, 0);
username = gtk_entry_new ();
- a11y = gtk_widget_get_accessible (username);
gtk_entry_set_visibility (GTK_ENTRY (username), TRUE);
gtk_entry_set_activates_default (GTK_ENTRY (username), TRUE);
gtk_widget_grab_focus (username);
@@ -770,7 +768,6 @@ create_user_pass_dialog(RSS_AUTH *auth)
0, 1, 1, 2, GTK_EXPAND | GTK_FILL, 0, 0, 0);
password = gtk_entry_new ();
- a11y = gtk_widget_get_accessible (password);
gtk_entry_set_visibility (GTK_ENTRY (password), FALSE);
gtk_entry_set_activates_default (GTK_ENTRY (password), TRUE);
gtk_widget_grab_focus (password);
@@ -851,13 +848,12 @@ gboolean
proxy_auth_dialog(gchar *title, gchar *user, gchar *pass)
{
GtkDialog *dialog;
- gint result;
RSS_AUTH *auth_info = g_new0(RSS_AUTH, 1);
auth_info->user = user;
auth_info->pass = pass;
dialog = create_user_pass_dialog(auth_info);
- result = gtk_dialog_run(GTK_DIALOG(dialog));
+ gtk_dialog_run(GTK_DIALOG(dialog));
/*LEAK g_free(auth_info);*/
return TRUE;
}
@@ -2048,7 +2044,9 @@ free_rss_browser(EMFormatHTMLPObject *o)
struct _org_gnome_rss_controls_pobject *po =
(struct _org_gnome_rss_controls_pobject *) o;
gpointer key = g_hash_table_lookup(rf->key_session, po->website);
+#ifdef HAVE_GECKO
guint engine;
+#endif
GtkAdjustment *adj;
#if EVOLUTION_VERSION >= 23103
EWebView *web_view;
@@ -2059,10 +2057,10 @@ free_rss_browser(EMFormatHTMLPObject *o)
g_hash_table_remove(rf->key_session, po->website);
soup_session_abort(key);
}
+#ifdef HAVE_GECKO
engine = gconf_client_get_int(rss_gconf,
GCONF_KEY_HTML_RENDER,
NULL);
-#ifdef HAVE_GECKO
if (engine == 2) {
gtk_moz_embed_stop_load((GtkMozEmbed *)rf->mozembed);
}
@@ -2643,8 +2641,6 @@ void org_gnome_cooly_folder_refresh(void *ep, EShellView *shell_view)
EMFolderTree *folder_tree;
EShellSidebar *shell_sidebar = e_shell_view_get_shell_sidebar(
shell_view);
- EActivity *taskid;
-
g_object_get (shell_sidebar, "folder-tree", &folder_tree, NULL);
folder = em_folder_tree_get_selected_folder (folder_tree);
g_return_if_fail (folder != NULL);
@@ -2654,7 +2650,6 @@ void org_gnome_cooly_folder_refresh(void *ep, EShellView *shell_view)
folder_name = folder->full_name;
#endif
#else
- guint taskid;
folder_name = t->uri;
#endif
if (folder_name == NULL
@@ -2692,7 +2687,7 @@ void org_gnome_cooly_folder_refresh(void *ep, EShellView *shell_view)
single_pending = TRUE;
check_folders();
rf->err = NULL;
- taskid = taskbar_op_message(name, key);
+ taskbar_op_message(name, key);
network_timeout();
if (!fetch_one_feed(fname, key, statuscb))
taskbar_op_finish(key);
@@ -2944,7 +2939,6 @@ finish_setup_feed(
SoupMessage *msg,
add_feed *user_data)
{
- guint ret = 0;
guint ttl;
add_feed *feed = (add_feed *)user_data;
RDF *r = NULL;
@@ -3152,7 +3146,6 @@ add:
g_string_free(content, 1);*/
rf->setup = 1;
- ret = 1;
goto out;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]