evolution-rss r387 - trunk/src



Author: lucilanga
Date: Wed Oct  8 15:03:55 2008
New Revision: 387
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=387&view=rev

Log:
2008-10-08  Lucian Langa  <lucilanga gnome org>

* pixmaps: rss-text-html, rss-text-x-generic
add new summary icons
* src/rss.c: finish_feed(): correctly
add non-validated feed

Added:
   trunk/src/rss-icon-factory.c
   trunk/src/rss-icon-factory.h

Added: trunk/src/rss-icon-factory.c
==============================================================================
--- (empty file)
+++ trunk/src/rss-icon-factory.c	Wed Oct  8 15:03:55 2008
@@ -0,0 +1,42 @@
+
+#include <rss-icon-factory.h>
+
+typedef struct {
+        char *stock_id;
+        char *icon;
+} RssStockIcon;
+
+static RssStockIcon stock_icons [] = {
+        { RSS_TEXT_HTML, RSS_TEXT_HTML_FILE },
+        { RSS_TEXT_GENERIC, RSS_TEXT_GENERIC_FILE },
+        { RSS_MAIN, RSS_MAIN_FILE }
+};
+
+void
+rss_build_stock_images(void)
+{
+        GtkIconFactory *factory;
+        GtkIconSource *source;
+	int i;
+
+        source = gtk_icon_source_new();
+        factory = gtk_icon_factory_new();
+        gtk_icon_factory_add_default(factory);
+
+	for (i = 0; i < G_N_ELEMENTS (stock_icons); i++) {
+		GtkIconSet *set;
+		gchar *iconfile = g_build_filename (EVOLUTION_ICONDIR,
+                                            stock_icons[i].icon,
+                                            NULL);
+
+		gtk_icon_source_set_filename(source, iconfile);
+		g_free(iconfile);
+
+		set = gtk_icon_set_new();
+		gtk_icon_set_add_source(set, source);
+		gtk_icon_factory_add(factory, stock_icons[i].stock_id, set);
+		gtk_icon_set_unref(set);
+	}
+        gtk_icon_source_free(source);
+}
+

Added: trunk/src/rss-icon-factory.h
==============================================================================
--- (empty file)
+++ trunk/src/rss-icon-factory.h	Wed Oct  8 15:03:55 2008
@@ -0,0 +1,10 @@
+
+#define RSS_TEXT_HTML "rss-text-html"
+#define RSS_TEXT_HTML_FILE "rss-text-html.png"
+
+#define RSS_TEXT_GENERIC "rss-text-generic"
+#define RSS_TEXT_GENERIC_FILE "rss-text-x-generic.png"
+
+#define RSS_MAIN "rss-main"
+#define RSS_MAIN_FILE "rss-24.png"
+



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