evolution-rss r354 - trunk/src



Author: lucilanga
Date: Wed Aug  6 18:28:02 2008
New Revision: 354
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=354&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/src/evolution-rss.schemas.in
   trunk/src/rss-config-factory.c
   trunk/src/rss-html-rendering.glade
   trunk/src/rss.c
   trunk/src/rss.h

Modified: trunk/src/evolution-rss.schemas.in
==============================================================================
--- trunk/src/evolution-rss.schemas.in	(original)
+++ trunk/src/evolution-rss.schemas.in	Wed Aug  6 18:28:02 2008
@@ -116,6 +116,48 @@
     </schema>
 
     <schema>
+      <key>/schemas/apps/evolution/evolution-rss/status_icon</key>
+      <applyto>/apps/evolution/evolution-rss/status_icon</applyto>
+      <owner>evolution-rss</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+        <short>Enable Status Icon</short>
+        <long>
+    	    Enable status icon in notification area
+        </long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/evolution-rss/blink_icon</key>
+      <applyto>/apps/evolution/evolution-rss/blink_icon</applyto>
+      <owner>evolution-rss</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+        <short>Blink Status Icon</short>
+        <long>
+    	    Blink status icon when new article received
+        </long>
+      </locale>
+    </schema>
+
+    <schema>
+      <key>/schemas/apps/evolution/evolution-rss/feed_icon</key>
+      <applyto>/apps/evolution/evolution-rss/feed_icon</applyto>
+      <owner>evolution-rss</owner>
+      <type>bool</type>
+      <default>true</default>
+      <locale name="C">
+        <short>Enable Feed Icon</short>
+        <long>
+    	    Display feed icon on feed folder
+        </long>
+      </locale>
+    </schema>
+
+    <schema>
       <key>/schemas/apps/evolution/evolution-rss/pass_proxy</key>
       <applyto>/apps/evolution/evolution-rss/pass_proxy</applyto>
       <owner>evolution-rss</owner>

Modified: trunk/src/rss-config-factory.c
==============================================================================
--- trunk/src/rss-config-factory.c	(original)
+++ trunk/src/rss-config-factory.c	Wed Aug  6 18:28:02 2008
@@ -41,6 +41,8 @@
         GtkWidget   *check2;
         GtkWidget   *nettimeout;
         GtkWidget   *check3;
+        GtkWidget   *check4;
+        GtkWidget   *check5;
 } UIData;
 
 static void feeds_dialog_edit(GtkDialog *d, gpointer data);
@@ -1602,7 +1604,7 @@
         gladefile = g_build_filename (EVOLUTION_GLADEDIR,
                         "rss-html-rendering.glade",
                         NULL);
-        ui->xml = glade_xml_new (gladefile, "html-rendering", NULL);
+        ui->xml = glade_xml_new (gladefile, "settingsbox", NULL);
         g_free (gladefile);
 
 
@@ -1680,6 +1682,31 @@
 	g_signal_connect(ui->nettimeout, "changed", G_CALLBACK(network_timeout_cb), ui->nettimeout);
 	g_signal_connect(ui->nettimeout, "value-changed", G_CALLBACK(network_timeout_cb), ui->nettimeout);
 
+	//feed notification
+	
+	ui->check3 = glade_xml_get_widget(ui->xml, "status_icon");
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ui->check3),
+        	gconf_client_get_bool(rss_gconf, GCONF_KEY_STATUS_ICON, NULL));
+	g_signal_connect(ui->check3, 
+		"clicked", 
+		G_CALLBACK(start_check_cb), 
+		GCONF_KEY_STATUS_ICON);
+	ui->check4 = glade_xml_get_widget(ui->xml, "blink_icon");
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ui->check4),
+        	gconf_client_get_bool(rss_gconf, GCONF_KEY_BLINK_ICON, NULL));
+	g_signal_connect(ui->check4, 
+		"clicked", 
+		G_CALLBACK(start_check_cb), 
+		GCONF_KEY_BLINK_ICON);
+	ui->check5 = glade_xml_get_widget(ui->xml, "feed_icon");
+	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ui->check5),
+        	gconf_client_get_bool(rss_gconf, GCONF_KEY_FEED_ICON, NULL));
+	g_signal_connect(ui->check5, 
+		"clicked", 
+		G_CALLBACK(start_check_cb), 
+		GCONF_KEY_FEED_ICON);
+	
+
         ui->gconf = gconf_client_get_default ();
 	hbox = gtk_vbox_new (FALSE, 0);
 

Modified: trunk/src/rss-html-rendering.glade
==============================================================================
--- trunk/src/rss-html-rendering.glade	(original)
+++ trunk/src/rss-html-rendering.glade	Wed Aug  6 18:28:02 2008
@@ -1,402 +1,229 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd";>
-
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
+<!--*- mode: xml -*-->
 <glade-interface>
-
-<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">&lt;b&gt;Engine: &lt;/b&gt;</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">&lt;b&gt;Network timeout:&lt;/b&gt;</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">&lt;b&gt;HTML Rendering&lt;/b&gt;</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">&lt;b&gt;Article Notification&lt;/b&gt;</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>
-
+  <widget class="GtkWindow" id="window1">
+    <child>
+      <widget class="GtkVBox" id="settingsbox">
+        <property name="visible">True</property>
+        <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">&lt;b&gt;Engine: &lt;/b&gt;</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="use_underline">True</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="use_underline">True</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="use_underline">True</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">&lt;b&gt;Network timeout:&lt;/b&gt;</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>
+                            <property name="climb_rate">1</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>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label1">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">&lt;b&gt;HTML Rendering&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+        </child>
+        <child>
+          <widget class="GtkFrame" id="frame1">
+            <property name="visible">True</property>
+            <property name="label_xalign">0</property>
+            <property name="shadow_type">GTK_SHADOW_NONE</property>
+            <child>
+              <widget class="GtkAlignment" id="alignment2">
+                <property name="visible">True</property>
+                <property name="left_padding">12</property>
+                <child>
+                  <widget class="GtkVBox" id="vbox3">
+                    <property name="visible">True</property>
+                    <child>
+                      <widget class="GtkCheckButton" id="status_icon">
+                        <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="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                    </child>
+                    <child>
+                      <widget class="GtkAlignment" id="alignment3">
+                        <property name="visible">True</property>
+                        <property name="xscale">0.80000001192092896</property>
+                        <child>
+                          <widget class="GtkCheckButton" id="blink_icon">
+                            <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="response_id">0</property>
+                            <property name="draw_indicator">True</property>
+                          </widget>
+                        </child>
+                      </widget>
+                      <packing>
+                        <property name="position">1</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <widget class="GtkCheckButton" id="feed_icon">
+                        <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="response_id">0</property>
+                        <property name="draw_indicator">True</property>
+                      </widget>
+                      <packing>
+                        <property name="position">2</property>
+                      </packing>
+                    </child>
+                  </widget>
+                </child>
+              </widget>
+            </child>
+            <child>
+              <widget class="GtkLabel" id="label5">
+                <property name="visible">True</property>
+                <property name="label" translatable="yes">&lt;b&gt;Article Notification&lt;/b&gt;</property>
+                <property name="use_markup">True</property>
+              </widget>
+              <packing>
+                <property name="type">label_item</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="position">1</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 18:28:02 2008
@@ -207,6 +207,7 @@
 #else
 finish_image (SoupSession *soup_sess, SoupMessage *msg, CamelStream *user_data);
 #endif
+gchar *get_main_folder(void);
 
 struct _MailComponentPrivate {
         GMutex *lock;
@@ -1973,13 +1974,14 @@
 {
 	static gboolean initialised = FALSE;
 	GdkPixbuf *icon;
-	if (g_ascii_strncasecmp(t->folder_name, "RSS", 3))
-		return;
-	if (!g_ascii_strcasecmp(t->folder_name, "RSS"))
+	gchar *main_folder = get_main_folder();
+	if (g_ascii_strncasecmp(t->folder_name, main_folder, strlen(main_folder)))
+		goto out;
+	if (!g_ascii_strcasecmp(t->folder_name, main_folder))
 		goto normal;
 	gchar *rss_folder = extract_main_folder(t->folder_name);
 	if (!rss_folder)
-		return;
+		goto out;
 	if (!icons)
 		icons = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
 	gchar *key = g_hash_table_lookup(rf->hrname,
@@ -1987,17 +1989,19 @@
 	if (!key)
 		goto normal;
 	if (!(icon = g_hash_table_lookup(icons, key))) {
-		gchar *feed_dir = rss_component_peek_base_directory(mail_component_peek());
-        	gchar *feed_file = g_strdup_printf("%s/%s.img", feed_dir, key);
-        	if (g_file_test(feed_file, G_FILE_TEST_EXISTS)) {
-			icon = e_icon_factory_get_icon (feed_file, E_ICON_SIZE_MENU);
-			g_hash_table_insert(icons, g_strdup(key), icon);
-			g_object_set (t->renderer, "pixbuf", icon, "visible", 1, NULL);
-			return;
+  		if (gconf_client_get_bool (rss_gconf, GCONF_KEY_FEED_ICON, NULL)) {
+			gchar *feed_dir = rss_component_peek_base_directory(mail_component_peek());
+        		gchar *feed_file = g_strdup_printf("%s/%s.img", feed_dir, key);
+        		if (g_file_test(feed_file, G_FILE_TEST_EXISTS)) {
+				icon = e_icon_factory_get_icon (feed_file, E_ICON_SIZE_MENU);
+				g_hash_table_insert(icons, g_strdup(key), icon);
+				g_object_set (t->renderer, "pixbuf", icon, "visible", 1, NULL);
+				goto out;
+			}
 		}
 	} else {
 		g_object_set (t->renderer, "pixbuf", icon, "visible", 1, NULL);
-		return;
+		goto out;
 	}
 
 normal:	if (!initialised)
@@ -2010,6 +2014,8 @@
 		initialised = TRUE;
 	}
 	g_object_set (t->renderer, "pixbuf", folder_icon, "visible", 1, NULL);
+out:	g_free(main_folder);
+	return;
 }
 #endif
 
@@ -3023,8 +3029,10 @@
 		g_queue_pop_head(status_msg);
 	g_queue_foreach(status_msg, flaten_status, flat_status_msg);
 	gtk_status_icon_set_tooltip (status_icon, flat_status_msg);
-        gtk_status_icon_set_visible (status_icon, TRUE);
-	if (!gtk_status_icon_get_blinking(status_icon))
+  	if (gconf_client_get_bool (rss_gconf, GCONF_KEY_STATUS_ICON, NULL))
+		gtk_status_icon_set_visible (status_icon, TRUE);
+  	if (gconf_client_get_bool (rss_gconf, GCONF_KEY_BLINK_ICON, NULL)
+	 && !gtk_status_icon_get_blinking(status_icon))
         	gtk_status_icon_set_blinking (status_icon, TRUE);
 	g_timeout_add(15 * 1000, flicker_stop, NULL);
         g_free(flat_status_msg);

Modified: trunk/src/rss.h
==============================================================================
--- trunk/src/rss.h	(original)
+++ trunk/src/rss.h	Wed Aug  6 18:28:02 2008
@@ -140,6 +140,9 @@
 #define GCONF_KEY_HTML_RENDER "/apps/evolution/evolution-rss/html_render"
 #define GCONF_KEY_HTML_JS "/apps/evolution/evolution-rss/html_js"
 #define GCONF_KEY_HTML_JAVA "/apps/evolution/evolution-rss/html_java"
+#define GCONF_KEY_STATUS_ICON "/apps/evolution/evolution-rss/status_icon"
+#define GCONF_KEY_BLINK_ICON "/apps/evolution/evolution-rss/blink_icon"
+#define GCONF_KEY_FEED_ICON "/apps/evolution/evolution-rss/feed_icon"
 
 enum {
 	RSS_FEED,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]