evolution-rss r353 - in trunk: . src
- From: lucilanga svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution-rss r353 - in trunk: . src
- Date: Wed, 6 Aug 2008 15:05:33 +0000 (UTC)
Author: lucilanga
Date: Wed Aug 6 15:05:33 2008
New Revision: 353
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=353&view=rev
Log:
2008-08-06 Lucian Langa <lucilanga gnome org>
* src/rss.c: fetch_image() - fetch image
from cache if found.
* src/misc.c: sanitize_url() - fix
order of scaned protocols
* src/rss-html-preview.glade - add
feeds icon options
Modified:
trunk/ChangeLog
trunk/TODO
trunk/src/dbus.c
trunk/src/misc.c
trunk/src/rss-config-factory.c
trunk/src/rss-html-rendering.glade
trunk/src/rss.c
Modified: trunk/TODO
==============================================================================
--- trunk/TODO (original)
+++ trunk/TODO Wed Aug 6 15:05:33 2008
@@ -36,3 +36,4 @@
* fix annoying cursor jump when browsing through evo-rss folders
* try harder to get feeds images (check by size 0)
* provide predefined groups of feeds (OSS & co)
+ * evolution import rss add no. of retries
Modified: trunk/src/dbus.c
==============================================================================
--- trunk/src/dbus.c (original)
+++ trunk/src/dbus.c Wed Aug 6 15:05:33 2008
@@ -93,7 +93,7 @@
dbus_error_init (&error);
if (dbus_message_get_args
(message, &error, DBUS_TYPE_STRING, &s, DBUS_TYPE_INVALID)) {
- d(g_print("New Feed received: %s\n", s));
+ g_print("New Feed received: %s\n", s);
feed->feed_url = g_strdup(s);
feed->add=1;
feed->enabled=feed->validate=1;
@@ -103,6 +103,7 @@
gchar *text = feed->feed_url;
feed->feed_url = sanitize_url(feed->feed_url);
g_free(text);
+ g_print("feed URL: %s\n", feed->feed_url);
if (g_hash_table_find(rf->hr,
check_if_match,
feed->feed_url))
Modified: trunk/src/misc.c
==============================================================================
--- trunk/src/misc.c (original)
+++ trunk/src/misc.c Wed Aug 6 15:05:33 2008
@@ -63,12 +63,12 @@
gchar *
sanitize_url(gchar *text)
{
+ if (strstr(text, "feed://"))
+ text = strextr(text, "feed://");
if (strstr(text, "feed//"))
text = strextr(text, "feed//");
if (strstr(text, "feed:"))
text = strextr(text, "feed:");
- if (strstr(text, "feed://"))
- text = strextr(text, "feed://");
if (!strstr (text, "http://")
&& !strstr (text, "https://"))
return g_strconcat("http://", text, NULL);
Modified: trunk/src/rss-config-factory.c
==============================================================================
--- trunk/src/rss-config-factory.c (original)
+++ trunk/src/rss-config-factory.c Wed Aug 6 15:05:33 2008
@@ -1683,7 +1683,7 @@
ui->gconf = gconf_client_get_default ();
hbox = gtk_vbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), glade_xml_get_widget (ui->xml, "html-rendering"), FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), glade_xml_get_widget (ui->xml, "settingsbox"), FALSE, FALSE, 0);
g_object_set_data_full (G_OBJECT (hbox), "ui-data", ui, destroy_ui_data);
Modified: trunk/src/rss-html-rendering.glade
==============================================================================
--- trunk/src/rss-html-rendering.glade (original)
+++ trunk/src/rss-html-rendering.glade Wed Aug 6 15:05:33 2008
@@ -1,185 +1,402 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.4 on Wed Aug 6 07:49:55 2008 -->
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
<glade-interface>
- <widget class="GtkWindow" id="window1">
- <child>
- <widget class="GtkFrame" id="html-rendering">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="top_padding">2</property>
- <property name="left_padding">12</property>
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="spacing">5</property>
- <property name="homogeneous">True</property>
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="spacing">10</property>
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>Engine: </b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <child>
- <widget class="GtkCheckButton" id="checkbutton1">
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Block pop-up windows</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkCheckButton" id="enable_java">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Enable Java</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="enable_js">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Enable JavaScript</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <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="nettimeout">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="adjustment">60 60 3600 1 10 10</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">seconds</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="fill">False</property>
- <property name="padding">2</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <child>
- <widget class="GtkCheckButton" id="checkbutton2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Display tray icon</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- </child>
- <child>
- <widget class="GtkCheckButton" id="checkbutton3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Blink on new article received</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="position">1</property>
- </packing>
- </child>
- <child>
- <widget class="GtkCheckButton" id="checkbutton4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Display feed icons</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="position">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="position">3</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes"><b>HTML Rendering</b></property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
+
+<widget class="GtkWindow" id="window1">
+ <property name="title" translatable="yes"></property>
+ <property name="type">GTK_WINDOW_TOPLEVEL</property>
+ <property name="window_position">GTK_WIN_POS_NONE</property>
+ <property name="modal">False</property>
+ <property name="resizable">True</property>
+ <property name="destroy_with_parent">False</property>
+ <property name="decorated">True</property>
+ <property name="skip_taskbar_hint">False</property>
+ <property name="skip_pager_hint">False</property>
+ <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+ <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+ <property name="focus_on_map">True</property>
+ <property name="urgency_hint">False</property>
+
+ <child>
+ <widget class="GtkVBox" id="settingsbox">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkFrame" id="html-rendering">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment1">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">2</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">True</property>
+ <property name="spacing">5</property>
+
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">10</property>
+
+ <child>
+ <widget class="GtkLabel" id="label3">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Engine: </b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkVBox" id="vbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton1">
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Block pop-up windows</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="enable_java">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enable Java</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="enable_js">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Enable JavaScript</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</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_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkSpinButton" id="nettimeout">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="climb_rate">1</property>
+ <property name="digits">0</property>
+ <property name="numeric">False</property>
+ <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+ <property name="snap_to_ticks">False</property>
+ <property name="wrap">False</property>
+ <property name="adjustment">60 60 3600 1 10 10</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label4">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">seconds</property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">False</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">2</property>
+ <property name="expand">True</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>HTML Rendering</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkFrame" id="frame1">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="label_yalign">0.5</property>
+ <property name="shadow_type">GTK_SHADOW_NONE</property>
+
+ <child>
+ <widget class="GtkAlignment" id="alignment2">
+ <property name="visible">True</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xscale">1</property>
+ <property name="yscale">1</property>
+ <property name="top_padding">0</property>
+ <property name="bottom_padding">0</property>
+ <property name="left_padding">12</property>
+ <property name="right_padding">0</property>
+
+ <child>
+ <widget class="GtkVBox" id="vbox3">
+ <property name="visible">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">0</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton2">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Show icon in notification area</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton3">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Blink icon in notification area</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkCheckButton" id="checkbutton4">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Show feed icon</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="focus_on_click">True</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
+ </widget>
+ </child>
+
+ <child>
+ <widget class="GtkLabel" id="label5">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes"><b>Article Notification</b></property>
+ <property name="use_underline">False</property>
+ <property name="use_markup">True</property>
+ <property name="justify">GTK_JUSTIFY_LEFT</property>
+ <property name="wrap">False</property>
+ <property name="selectable">False</property>
+ <property name="xalign">0.5</property>
+ <property name="yalign">0.5</property>
+ <property name="xpad">0</property>
+ <property name="ypad">0</property>
+ <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+ <property name="width_chars">-1</property>
+ <property name="single_line_mode">False</property>
+ <property name="angle">0</property>
+ </widget>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ </packing>
+ </child>
+
+ <child>
+ <placeholder/>
+ </child>
+ </widget>
+ </child>
+</widget>
+
</glade-interface>
Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c (original)
+++ trunk/src/rss.c Wed Aug 6 15:05:33 2008
@@ -83,7 +83,8 @@
#include <shell/evolution-config-control.h>
#include <shell/e-component-view.h>///
#include <shell/es-event.h>
-#include <camel/camel-data-cache.h>///
+#include <camel/camel-data-cache.h>
+#include <camel/camel-file-utils.h>
#include <libxml/parserInternals.h>
#include <libxml/xmlmemory.h>
@@ -172,19 +173,6 @@
guint shandler; //mycall handler_id
};
-/*struct _GtkHTMLEmbedded {
- HTMLObject object;
-
- gchar *name;
- gchar *value;
- HTMLForm *form;
- GtkWidget *widget, *parent;
- gint width, height;
-
- gint abs_x, abs_y;
- guint changed_id;
-};*/
-
GtkWidget *evo_window;
static GdkPixbuf *folder_icon;
GHashTable *icons = NULL;
@@ -1984,7 +1972,7 @@
void org_gnome_cooly_folder_icon(void *ep, EMEventTargetCustomIcon *t)
{
static gboolean initialised = FALSE;
- GdkImage *icon;
+ GdkPixbuf *icon;
if (g_ascii_strncasecmp(t->folder_name, "RSS", 3))
return;
if (!g_ascii_strcasecmp(t->folder_name, "RSS"))
@@ -2706,8 +2694,9 @@
update_feed_image(gchar *image, gchar *key)
{
GError *err = NULL;
+ if (!image)
+ return;
g_return_if_fail (image != NULL);
- g_print("image:%s\n", image);
gchar *feed_dir = rss_component_peek_base_directory(mail_component_peek());
if (!g_file_test(feed_dir, G_FILE_TEST_EXISTS))
g_mkdir_with_parents (feed_dir, 0755);
@@ -2722,10 +2711,9 @@
feed_file,
0,
&err);
- g_print("=>img file:%s\n", feed_file);
if (err) {
g_free(feed_file);
- return NULL;
+ return;
}
}
}
@@ -2973,7 +2961,7 @@
icon_activated (GtkStatusIcon *icon, gpointer pnotify)
{
GList *p, *pnext;
- for (p = evo_window; p != NULL; p = pnext) {
+ for (p = (gpointer)evo_window; p != NULL; p = pnext) {
pnext = p->next;
if (gtk_window_is_active(GTK_WINDOW(p->data)))
@@ -2985,7 +2973,7 @@
else
{
gtk_window_iconify(GTK_WINDOW(p->data));
- gtkut_window_popup(GTK_WINDOW(p->data));
+ gtkut_window_popup(GTK_WIDGET(p->data));
gtk_window_set_skip_taskbar_hint(GTK_WINDOW(p->data), FALSE);
}
}
@@ -3025,7 +3013,7 @@
}
static void
-flicker_status_icon(gchar *channel, gchar *title)
+flicker_status_icon(const char *channel, gchar *title)
{
gchar *total = g_strdup_printf("%s: %s\n\n", channel, title);
create_status_icon();
@@ -3116,7 +3104,7 @@
{
EShell *shell = t->shell;
EShellPrivate *priv = (EShellPrivate *)shell->priv;
- evo_window = priv->windows;
+ evo_window = (GtkWidget *)priv->windows;
}
void org_gnome_cooly_rss_startup(void *ep, EMPopupTargetSelect *t);
@@ -4290,6 +4278,12 @@
dir = alloca(strlen(cdc->path) + strlen(path) + 8);
sprintf(dir, "%s/%s/%02x", cdc->path, path, hash);
tmp = camel_file_util_safe_filename(key);
+ if (!tmp)
+ return NULL;
+ g_print("key:%s\n", key);
+ g_print("dir:%s\n", dir);
+ g_print("strlen(tmp):%d\n", strlen(tmp));
+ g_print("tmp:%s\n", tmp);
real = g_strdup_printf("%s/%s", dir, tmp);
g_free(tmp);
@@ -4302,6 +4296,7 @@
GError *err = NULL;
gchar *tmpdir = NULL;
gchar *name = NULL;
+ CamelStream *stream;
if (!url)
return NULL;
gchar *feed_dir = g_build_path("/", rss_component_peek_base_directory(mail_component_peek()), "static", NULL);
@@ -4309,7 +4304,13 @@
g_mkdir_with_parents (feed_dir, 0755);
http_cache = camel_data_cache_new(feed_dir, 0, NULL);
g_free(feed_dir);
- CamelStream *stream = camel_data_cache_add(http_cache, HTTP_CACHE_PATH, url, NULL);
+ stream = camel_data_cache_get(http_cache, HTTP_CACHE_PATH, url, NULL);
+ if (!stream) {
+ g_print("image cache MISS\n");
+ stream = camel_data_cache_add(http_cache, HTTP_CACHE_PATH, url, NULL);
+ } else
+ g_print("image cache HIT\n");
+ g_print("fetch url:%s\n", url);
/* test for *loading* images*/
/* gchar *iconfile = g_build_filename (EVOLUTION_ICONDIR,
@@ -4332,6 +4333,7 @@
0,
&err);
if (err) return NULL;
+ g_print("fetch url:%s\n", url);
return data_cache_path(http_cache, FALSE, HTTP_CACHE_PATH, url);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]