[evolution-rss] ship separate desktop file



commit 947c6329b1971cda90f41b07961c9c1431bf8f63
Author: Lucian Langa <lucilanga gnome org>
Date:   Thu May 26 23:06:03 2011 +0300

    ship separate desktop file

 Makefile.am                 |    6 ++++++
 configure.ac                |    1 +
 evolution-rss.desktop.in.in |   19 +++++++++++++++++++
 po/POTFILES.in              |    9 ++++++++-
 src/dbus.c                  |    4 ++--
 src/evolution-import-rss.c  |   13 ++++++++-----
 6 files changed, 44 insertions(+), 8 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 1203a4e..68bea0e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,10 @@
 ACLOCAL_AMFLAGS = -I m4
 
+desktop_in_files = evolution-rss.desktop.in
+desktopdir = $(datadir)/applications
+desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
+ INTLTOOL_DESKTOP_RULE@
+
 INTLTOOL =                      \
 	intltool-extract.in     \
 	intltool-merge.in       \
@@ -15,6 +20,7 @@ EXTRA_DIST = \
 	FAQ
 
 DISTCLEANFILES = \
+	evolution-rss.desktop \
 	intltool-extract \
 	intltool-merge \
 	intltool-update
diff --git a/configure.ac b/configure.ac
index 3ee718c..fb6e1b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -407,6 +407,7 @@ AC_SUBST(IMAGESDIR_IN_SERVER_FILE)
 # Generated files from automake
 AC_CONFIG_FILES([
 Makefile
+evolution-rss.desktop.in
 evolution-rss.spec
 src/Makefile
 po/Makefile.in
diff --git a/evolution-rss.desktop.in.in b/evolution-rss.desktop.in.in
new file mode 100644
index 0000000..277de38
--- /dev/null
+++ b/evolution-rss.desktop.in.in
@@ -0,0 +1,19 @@
+
+[Desktop Entry]
+Name=Evolution RSS
+_GenericName=Evolution RSS Reader
+_Comment=Evolution plugin that enables Evolution Mail to display rss feeds.
+Exec= prefix@/bin/evolution-import-rss
+Icon=evolution
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Network;News;
+#NoDisplay=true
+#OnlyShowIn=News;
+Version= VERSION@
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=evolution-rss
+X-GNOME-Bugzilla-Component=BugBuddyBugs
+X-GNOME-Bugzilla-Version= VERSION@
+X-Desktop-File-Install-Version=0.18
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ca4169e..aea56a9 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,7 +1,11 @@
 # List of source files containing translatable strings.
 # Please keep this file sorted alphabetically.
+evolution-rss.desktop
 src/dbus.c
 src/evolution-rss.schemas.in.in
+src/evolution-import-rss.c
+src/fetch.c
+src/file-gio.c
 src/network-soup.c
 src/notification.c
 src/org-gnome-evolution-rss.eplug.xml
@@ -9,10 +13,13 @@ src/org-gnome-evolution-rss.error.xml
 src/org-gnome-evolution-rss.xml
 src/rss.c
 src/rss.h
+src/rss-cache.c
 src/rss-config.c
 src/rss-config-factory.c
+src/rss-evo-common.c
 src/rss-html-rendering.ui
 src/rss-image.c
+src/rss-icon-factory.c
+src/rss-status-icon.c
 src/rss-main.ui
 src/parser.c
-
diff --git a/src/dbus.c b/src/dbus.c
index a671f19..9b67a68 100644
--- a/src/dbus.c
+++ b/src/dbus.c
@@ -92,12 +92,12 @@ signal_cb (GDBusConnection *connection,
 		gchar *url = NULL;
 		add_feed *feed = g_new0(add_feed, 1);
 		g_variant_get (parameters, "(s)", &url);
-		g_print("New Feed received: %s\n", url);
 		feed->feed_url = url;
 		feed->add=1;
 		feed->enabled=feed->validate=1;
 		feed->fetch_html = 0;
-		if (feed->feed_url) {
+		if (feed->feed_url && strlen(feed->feed_url)) {
+			g_print("New Feed received: %s\n", url);
 			feed->feed_url = sanitize_url(feed->feed_url);
 			d("sanitized feed URL: %s\n", feed->feed_url);
 			if (g_hash_table_find(rf->hr, check_if_match, feed->feed_url)) {
diff --git a/src/evolution-import-rss.c b/src/evolution-import-rss.c
index e4d5161..f1a4812 100644
--- a/src/evolution-import-rss.c
+++ b/src/evolution-import-rss.c
@@ -32,6 +32,7 @@
 #include <gio/gio.h>
 
 #define d(x)
+#define EVOLUTION "evolution&"
 
 #define DBUS_PATH "/org/gnome/evolution/mail/rss"
 #define RSS_DBUS_SERVICE "org.gnome.evolution.mail.rss"
@@ -42,6 +43,8 @@
 //evolution ping roud-trip time in ms, somebody suggest a real value here
 #define EVOLUTION_PING_TIMEOUT 5000
 
+#define run(x) G_STMT_START { g_message ("%s", x); system (x); } G_STMT_END
+
 static GDBusConnection *connection = NULL;
 
 static gboolean init_gdbus (void);
@@ -185,8 +188,8 @@ no_evo_cb (gpointer user_data)
 	if (!evo_running) {
 		g_print("no evolution running!\n");
 		g_print("trying to start...\n");
-		system("evolution&");
-		g_usleep(30);
+		run(EVOLUTION);
+		sleep(30);
 		send_dbus_ping ();
 	}
 	return FALSE;
@@ -243,7 +246,7 @@ main (int argc, char *argv[])
 	feed = argv[1];
 	if (!feed) {
 		g_print("Syntax: %s URL\n", argv[0]);
-		return 0;
+		feed = "";
 	}
 
 	g_type_init ();
@@ -286,8 +289,8 @@ main (int argc, char *argv[])
 	g_main_loop_run(loop);
 
 	while (!evo_running && i < 2) {
-		system("evolution&");
-		g_print("fireing evolution...\n");
+		run(EVOLUTION);
+		g_print("Starting evolution...\n");
 		g_usleep(30);
 		send_dbus_ping ();
 		g_timeout_add (EVOLUTION_PING_TIMEOUT, err_evo_cb, GINT_TO_POINTER(i++));



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