[Nautilus-list] Remove Eazel from nautilus news



Hi,

attached is a patch which removes explicitly the Eazel news entry from the
nautilus sidebar. The changes in nautilus-news.c are only neccessary
because there exists local copies of the xml file for every user, so a
simple substitution of the system wide file isn't sufficient. Although
the hardcoded thing isn't a nice solution.

What do you think?

Regards,

   Jens
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/nautilus/ChangeLog,v
retrieving revision 1.4680
diff -u -r1.4680 ChangeLog
--- ChangeLog	2001/07/09 23:18:45	1.4680
+++ ChangeLog	2001/07/10 13:18:02
@@ -1,3 +1,9 @@
+2001-07-10  Jens Finke  <jens gnome org>
+
+	* components/news/nautilus-news.c: Don't load Eazel news anymore,
+	even if there is an entry in the users local news file.
+	* components/news/news_channels.xml: Removed Eazel news entry.
+
 2001-07-09  Darin Adler  <darin bentspoon com>
 
 	* cut-n-paste-code/widgets/gimphwrapbox/gtkwrapbox.c:
Index: components/news/news_channels.xml
===================================================================
RCS file: /cvs/gnome/nautilus/components/news/news_channels.xml,v
retrieving revision 1.11
diff -u -r1.11 news_channels.xml
--- components/news/news_channels.xml	2001/05/03 21:27:04	1.11
+++ components/news/news_channels.xml	2001/07/10 13:18:02
@@ -10,7 +10,6 @@
 	<rss_channel name="CNN" uri="http://www.cnn.com/cnn.rss"; show="false" open="false"/>
 	<rss_channel name="Dictionary.com" uri="http://www.dictionary.com/wordoftheday/wotd.rss"; show="false" open="false"/>
 	<rss_channel name="DVD Review" uri="http://www.dvdreview.com/rss/newschannel.rss"; show="false" open="false"/>
-	<rss_channel name="Eazel" uri="http://news.eazel.com/eazel.rss"; show="false" open="false"/>
 	<rss_channel name="Freshmeat" uri="http://freshmeat.net/backend/fm.rdf"; show="false" open="false"/>
 	<rss_channel name="GNOME News" uri="http://news.gnome.org/gnome-news/rdf"; show="false" open="false"/>	
 	<rss_channel name="Internet.com" uri="http://headlines.internet.com/internetnews/prod-news/news.rss"; show="false" open="false"/>
Index: components/news/nautilus-news.c
===================================================================
RCS file: /cvs/gnome/nautilus/components/news/nautilus-news.c,v
retrieving revision 1.37
diff -u -r1.37 nautilus-news.c
--- components/news/nautilus-news.c	2001/05/22 06:32:28	1.37
+++ components/news/nautilus-news.c	2001/07/10 13:18:02
@@ -1615,6 +1615,12 @@
 	while (current_channel != NULL) {
 		if (eel_strcmp (current_channel->name, "rss_channel") == 0) { 				
 			name = xmlGetProp (current_channel, "name");
+                        if (g_strcasecmp (name, "Eazel") == 0) {
+                                /* skip 'Eazel' news, cos they don't exist anymore */
+                                current_channel = current_channel->next;
+                                xmlFree (name);
+                                continue;
+                        }
 			uri = xmlGetProp (current_channel, "uri");
 			open_str = xmlGetProp (current_channel, "open");
 			show_str = xmlGetProp (current_channel, "show");
@@ -1683,8 +1689,8 @@
 		channel_doc = xmlParseFile (path);
 
 		if (channel_doc) {
-			nautilus_news_add_channels (news_data, channel_doc);
-			xmlFreeDoc (channel_doc);
+                        nautilus_news_add_channels (news_data, channel_doc);
+		        xmlFreeDoc (channel_doc);
 		}
 	g_free (path);
 	}
@@ -2159,6 +2165,13 @@
 	while (current_channel != NULL) {
 		if (eel_strcmp (current_channel->name, "rss_channel") == 0) { 				
 			channel_name = xmlGetProp (current_channel, "name");
+                        if (g_strcasecmp (channel_name, "Eazel") == 0) {
+                                /* skip 'Eazel' news, cos they don't exist anymore */
+                                g_message (_("Drop Eazel News.\n"));
+                                xmlFree (channel_name);
+                                current_channel = current_channel->next;
+                                continue;
+                        }
 			show_str = xmlGetProp (current_channel, "show");
 			is_shown = eel_strcasecmp (show_str, "true") == 0;
 			


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