evolution-rss r286 - in trunk: . src
- From: lucilanga svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-rss r286 - in trunk: . src
- Date: Wed, 4 Jun 2008 18:22:43 +0000 (UTC)
Author: lucilanga
Date: Wed Jun 4 18:22:42 2008
New Revision: 286
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=286&view=rev
Log:
2008-06-04 Lucian Langa <lucilanga gnome org>
* correctly parse utf 8 content
* Fix for bug #531751
* added X-evolution-rss-feed-id for feed
aricles's UUID
* implemented usage of evolution's proxy
config options: for now support only evo's
manual proxy config option, no auth for the
time being
Modified:
trunk/ChangeLog
trunk/TODO
trunk/src/network-soup.c
trunk/src/network.h
trunk/src/rss-config-factory.c
trunk/src/rss-html-rendering.glade
trunk/src/rss-ui.glade
trunk/src/rss.c
trunk/src/rss.h
Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Wed Jun 4 18:22:42 2008
@@ -27,9 +27,7 @@
* search in the content of page for feed
* obey ttl entity
* check rename feed when evo 2.24 x86_64
- * make feed message forwardable/replayable
- * add debug points for showing steps of current operation (group operations)
* when adding a feed as opml file offer to import (file detection)
- * possibly make network timeout customizable
* run-time migration function from text/evolution-rss-feed -> x-evolution/evolution-rss-feed
- * add x-evolution/mesage uid
+ * possibly make network timeout customizable
+ * test new proxy autehntification
Modified: trunk/src/network-soup.c
==============================================================================
--- trunk/src/network-soup.c (original)
+++ trunk/src/network-soup.c Wed Jun 4 18:22:42 2008
@@ -170,8 +170,9 @@
void
proxify_session(SoupSession *session)
{
- gboolean use_proxy =
- gconf_client_get_bool(rss_gconf, GCONF_KEY_USE_PROXY, NULL);
+#if (EVOLUTION_VERSION < 22300) // include devel too
+ gboolean use_proxy =
+ gconf_client_get_bool(rss_gconf, GCONF_KEY_USE_PROXY, NULL);
gint port_proxy =
gconf_client_get_int(rss_gconf, GCONF_KEY_PORT_PROXY, NULL);
gchar *host_proxy =
@@ -182,6 +183,24 @@
gconf_client_get_string(rss_gconf, GCONF_KEY_USER_PROXY, NULL);
gchar *pass_proxy =
gconf_client_get_string(rss_gconf, GCONF_KEY_PASS_PROXY, NULL);
+#else
+ gboolean use_proxy =
+ gconf_client_get_bool(rss_gconf, GCONF_E_USE_PROXY_KEY, NULL);
+ guint proxy_type =
+ gconf_client_get_int(rss_gconf, GCONF_E_PROXY_TYPE_KEY, NULL);
+ if (proxy_type != 2) //emulate the same behaviour
+ use_proxy = 0;
+ gint port_proxy =
+ gconf_client_get_int(rss_gconf, GCONF_E_HTTP_PORT_KEY, NULL);
+ gchar *host_proxy =
+ gconf_client_get_string(rss_gconf, GCONF_E_HTTP_HOST_KEY, NULL);
+ gboolean auth_proxy =
+ gconf_client_get_bool(rss_gconf, GCONF_E_USE_AUTH_KEY, NULL);
+ gchar *user_proxy =
+ gconf_client_get_string(rss_gconf, GCONF_E_AUTH_USER_KEY, NULL);
+ gchar *pass_proxy =
+ gconf_client_get_string(rss_gconf, GCONF_E_AUTH_PWD_KEY, NULL);
+#endif
if (use_proxy && host_proxy && port_proxy > 0)
{
Modified: trunk/src/network.h
==============================================================================
--- trunk/src/network.h (original)
+++ trunk/src/network.h Wed Jun 4 18:22:42 2008
@@ -21,6 +21,43 @@
#ifndef __NETWORK_H__
#define __NETWORK_H__
+#define GCONF_KEY_USE_PROXY "/apps/evolution/evolution-rss/use_proxy"
+#define GCONF_KEY_HOST_PROXY "/apps/evolution/evolution-rss/host_proxy"
+#define GCONF_KEY_PORT_PROXY "/apps/evolution/evolution-rss/port_proxy"
+#define GCONF_KEY_AUTH_PROXY "/apps/evolution/evolution-rss/auth_proxy"
+#define GCONF_KEY_USER_PROXY "/apps/evolution/evolution-rss/user_proxy"
+#define GCONF_KEY_PASS_PROXY "/apps/evolution/evolution-rss/pass_proxy"
+
+#define GCONF_E_SHELL_NETWORK_CONFIG_PATH "/apps/evolution/shell/network_config/"
+#define GCONF_E_HTTP_HOST_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "http_host"
+#define GCONF_E_HTTP_PORT_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "http_port"
+#define GCONF_E_HTTPS_HOST_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "secure_host"
+#define GCONF_E_HTTPS_PORT_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "secure_port"
+#define GCONF_E_SOCKS_HOST_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "socks_host"
+#define GCONF_E_SOCKS_PORT_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "socks_port"
+#define GCONF_E_IGNORE_HOSTS_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "ignore_hosts"
+#define GCONF_E_USE_AUTH_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "use_authentication"
+#define GCONF_E_PROXY_TYPE_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "proxy_type"
+#define GCONF_E_AUTH_USER_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "authentication_user"
+#define GCONF_E_AUTH_PWD_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "authentication_password"
+#define GCONF_E_USE_PROXY_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "use_http_proxy"
+#define GCONF_E_AUTOCONFIG_URL_KEY GCONF_E_SHELL_NETWORK_CONFIG_PATH "autoconfig_url"
+
+#define GCONF_SYS_PROXY_PATH "/system/proxy/"
+#define GCONF_SYS_HTTP_PROXY_PATH "/system/http_proxy"
+#define GCONF_SYS_HTTP_HOST_KEY GCONF_SYS_HTTP_PROXY_PATH "host"
+#define GCONF_SYS_HTTP_PORT_KEY GCONF_SYS_HTTP_PROXY_PATH "port"
+#define GCONF_SYS_HTTPS_HOST_KEY GCONF_SYS_PROXY_PATH "secure_host"
+#define GCONF_SYS_HTTPS_PORT_KEY GCONF_SYS_PROXY_PATH "secure_port"
+#define GCONF_SYS_SOCKS_HOST_KEY GCONF_SYS_PROXY_PATH "socks_host"
+#define GCONF_SYS_SOCKS_PORT_KEY GCONF_SYS_PROXY_PATH "socks_port"
+#define GCONF_SYS_AUTOCONFIG_URL_KEY GCONF_SYS_PROXY_PATH "autoconfig_url"
+#define GCONF_SYS_IGNORE_HOSTS_KEY GCONF_SYS_HTTP_PROXY_PATH "ignore_hosts"
+#define GCONF_SYS_USE_PROXY_KEY GCONF_SYS_HTTP_PROXY_PATH "use_http_proxy"
+#define GCONF_SYS_USE_AUTH_KEY GCONF_SYS_HTTP_PROXY_PATH "use_authentication"
+#define GCONF_SYS_AUTH_USER_KEY GCONF_SYS_HTTP_PROXY_PATH "authentication_user"
+#define GCONF_SYS_AUTH_PWD_KEY GCONF_SYS_HTTP_PROXY_PATH "authentication_password"
+
typedef enum {
NET_ERROR_GENERIC,
NET_ERROR_PROTOCOL,
Modified: trunk/src/rss-config-factory.c
==============================================================================
--- trunk/src/rss-config-factory.c (original)
+++ trunk/src/rss-config-factory.c Wed Jun 4 18:22:42 2008
@@ -1830,6 +1830,14 @@
gtk_box_pack_start(GTK_BOX(sf->combo_hbox), combo, FALSE, FALSE, 0);
#endif
+#if (EVOLUTION_VERSION < 22300) // include devel too
+ /*first make the tab visible */
+ g_object_set(glade_xml_get_widget(sf->gui, "label_HTML"),
+ "visible", TRUE,
+ NULL);
+ g_object_set(glade_xml_get_widget(sf->gui, "vbox_HTML"),
+ "visible", TRUE,
+ NULL);
/* Network tab */
sf->use_proxy = glade_xml_get_widget(sf->gui, "use_proxy");
sf->host_proxy = glade_xml_get_widget(sf->gui, "host_proxy");
@@ -1851,6 +1859,7 @@
gtk_spin_button_set_value((GtkSpinButton *)sf->port_proxy, (gdouble)port);
g_signal_connect(sf->port_proxy, "changed", G_CALLBACK(port_proxy_cb), NULL);
g_signal_connect(sf->port_proxy, "value_changed", G_CALLBACK(port_proxy_cb), NULL);
+#endif
g_signal_connect(sf->details, "clicked", G_CALLBACK(details_cb), sf->gui);
Modified: trunk/src/rss-html-rendering.glade
==============================================================================
--- trunk/src/rss-html-rendering.glade (original)
+++ trunk/src/rss-html-rendering.glade Wed Jun 4 18:22:42 2008
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.4 on Sun May 25 18:50:22 2008 -->
+<!--Generated with glade3 3.4.4 on Wed Jun 4 19:43:17 2008 -->
<glade-interface>
<widget class="GtkWindow" id="window1">
<child>
@@ -25,7 +25,8 @@
<child>
<widget class="GtkLabel" id="label3">
<property name="visible">True</property>
- <property name="label" translatable="yes">Engine: </property>
+ <property name="label" translatable="yes"><b>Engine: </b></property>
+ <property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
@@ -81,6 +82,38 @@
<property name="position">1</property>
</packing>
</child>
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="spacing">10</property>
+ <child>
+ <widget class="GtkLabel" id="label2">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Network timeout:</b></property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkSpinButton" id="spinbutton1">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="adjustment">0 0 100 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="fill">False</property>
+ <property name="padding">2</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
</child>
</widget>
Modified: trunk/src/rss-ui.glade
==============================================================================
--- trunk/src/rss-ui.glade (original)
+++ trunk/src/rss-ui.glade Wed Jun 4 18:22:42 2008
@@ -456,8 +456,7 @@
</packing>
</child>
<child>
- <widget class="GtkVBox" id="vbox17">
- <property name="visible">True</property>
+ <widget class="GtkVBox" id="vbox_NETWORK">
<property name="border_width">12</property>
<property name="spacing">12</property>
<child>
@@ -496,34 +495,42 @@
<placeholder/>
</child>
<child>
- <widget class="GtkLabel" id="label84">
+ <widget class="GtkEntry" id="entry8">
<property name="visible">True</property>
- <property name="label" translatable="yes">HTTP proxy:</property>
+ <property name="can_focus">True</property>
</widget>
<packing>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="host_proxy">
+ <widget class="GtkLabel" id="label91">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">No proxy for:</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label85">
+ <widget class="GtkButton" id="details">
<property name="visible">True</property>
- <property name="label" translatable="yes">Port:</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Details</property>
+ <property name="use_underline">True</property>
+ <property name="response_id">0</property>
</widget>
<packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
@@ -542,43 +549,35 @@
</packing>
</child>
<child>
- <widget class="GtkButton" id="details">
+ <widget class="GtkLabel" id="label85">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Details</property>
- <property name="use_underline">True</property>
- <property name="response_id">0</property>
+ <property name="label" translatable="yes">Port:</property>
</widget>
<packing>
- <property name="left_attach">4</property>
- <property name="right_attach">5</property>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="label91">
+ <widget class="GtkEntry" id="host_proxy">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">No proxy for:</property>
+ <property name="can_focus">True</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="y_options"></property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="entry8">
+ <widget class="GtkLabel" id="label84">
<property name="visible">True</property>
- <property name="can_focus">True</property>
+ <property name="label" translatable="yes">HTTP proxy:</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
@@ -599,7 +598,6 @@
</child>
<child>
<widget class="GtkLabel" id="label_NETWORK">
- <property name="visible">True</property>
<property name="label" translatable="yes">Network</property>
</widget>
<packing>
@@ -643,26 +641,16 @@
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
- <widget class="GtkLabel" id="label89">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Username:</property>
- </widget>
- <packing>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label90">
+ <widget class="GtkEntry" id="proxy_pass">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Password: </property>
+ <property name="can_focus">True</property>
+ <property name="visibility">False</property>
</widget>
<packing>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
- <property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
@@ -678,16 +666,26 @@
</packing>
</child>
<child>
- <widget class="GtkEntry" id="proxy_pass">
+ <widget class="GtkLabel" id="label90">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="visibility">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Password: </property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label89">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Username:</property>
+ </widget>
+ <packing>
+ <property name="x_options">GTK_FILL</property>
<property name="y_options"></property>
</packing>
</child>
@@ -865,8 +863,8 @@
<property name="modal">True</property>
<property name="destroy_with_parent">True</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property>
<property name="local_only">False</property>
+ <property name="action">GTK_FILE_CHOOSER_ACTION_SAVE</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="vbox26">
<property name="visible">True</property>
Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c (original)
+++ trunk/src/rss.c Wed Jun 4 18:22:42 2008
@@ -3246,6 +3246,7 @@
camel_medium_set_header(CAMEL_MEDIUM(new), "Received", buf);
camel_medium_set_header(CAMEL_MEDIUM(new), "Website", CF->website);
camel_medium_set_header(CAMEL_MEDIUM(new), "RSS-ID", CF->feedid);
+ camel_medium_set_header(CAMEL_MEDIUM(new), "X-evolution-rss-feed-ID", g_strstrip(CF->feed_uri));
rtext = camel_data_wrapper_new ();
type = camel_content_type_new ("x-evolution", "evolution-rss-feed");
camel_content_type_set_param (type, "format", "flowed");
@@ -4247,7 +4248,7 @@
CF->feedid = g_strdup(buf);
CF->encl = g_strdup(encl);
CF->feed_fname = g_strdup(feed_name); //feed file name
- CF->feed_uri = g_strdup(feed); //feed file url (to be checked/written to feed file)
+ CF->feed_uri = g_strdup(feed); //feed file url
if (encl)
{
Modified: trunk/src/rss.h
==============================================================================
--- trunk/src/rss.h (original)
+++ trunk/src/rss.h Wed Jun 4 18:22:42 2008
@@ -131,12 +131,6 @@
#define GCONF_KEY_START_CHECK "/apps/evolution/evolution-rss/startup_check"
#define GCONF_KEY_REP_CHECK "/apps/evolution/evolution-rss/rep_check"
#define GCONF_KEY_REP_CHECK_TIMEOUT "/apps/evolution/evolution-rss/rep_check_timeout"
-#define GCONF_KEY_USE_PROXY "/apps/evolution/evolution-rss/use_proxy"
-#define GCONF_KEY_HOST_PROXY "/apps/evolution/evolution-rss/host_proxy"
-#define GCONF_KEY_PORT_PROXY "/apps/evolution/evolution-rss/port_proxy"
-#define GCONF_KEY_AUTH_PROXY "/apps/evolution/evolution-rss/auth_proxy"
-#define GCONF_KEY_USER_PROXY "/apps/evolution/evolution-rss/user_proxy"
-#define GCONF_KEY_PASS_PROXY "/apps/evolution/evolution-rss/pass_proxy"
#define GCONF_KEY_REMOVE_FOLDER "/apps/evolution/evolution-rss/remove_folder"
#define GCONF_KEY_HTML_RENDER "/apps/evolution/evolution-rss/html_render"
#define GCONF_KEY_HTML_JS "/apps/evolution/evolution-rss/html_js"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]