[Goodies-commits] r7539 - in xfce4-weather-plugin/trunk: . panel-plugin
Colin Leroy
colin at xfce.org
Fri Jun 12 18:39:42 CEST 2009
Author: colin
Date: 2009-06-12 16:39:42 +0000 (Fri, 12 Jun 2009)
New Revision: 7539
Modified:
xfce4-weather-plugin/trunk/ChangeLog
xfce4-weather-plugin/trunk/panel-plugin/weather-summary.c
xfce4-weather-plugin/trunk/panel-plugin/weather.c
xfce4-weather-plugin/trunk/panel-plugin/weather.h
Log:
2009-06-12 Colin Leroy <colin at colino.net>
* panel-plugin/*: Add an about button in the summary window.
Modified: xfce4-weather-plugin/trunk/ChangeLog
===================================================================
--- xfce4-weather-plugin/trunk/ChangeLog 2009-06-12 15:43:34 UTC (rev 7538)
+++ xfce4-weather-plugin/trunk/ChangeLog 2009-06-12 16:39:42 UTC (rev 7539)
@@ -1,3 +1,7 @@
+2009-06-12 Colin Leroy <colin at colino.net>
+
+ * panel-plugin/*: Add an about button in the summary window.
+
2009-06-11 Colin Leroy <colin at colino.net>
* panel-plugin/*: Comply better with weather.com's XOAP license:
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather-summary.c
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather-summary.c 2009-06-12 15:43:34 UTC (rev 7538)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather-summary.c 2009-06-12 16:39:42 UTC (rev 7539)
@@ -68,9 +68,9 @@
{
if (event->type == GDK_BUTTON_RELEASE) {
const gchar *url = g_object_get_data(G_OBJECT(tag), "url");
- gchar *str = g_strdup_printf("exo-open %s", url);
+ gchar *str = g_strdup_printf("exo-open --launch WebBrowser %s", url);
- xfce_exec(str, FALSE, FALSE, NULL);
+ g_spawn_command_line_async(str, NULL);
g_free(str);
} else if (event->type == GDK_LEAVE_NOTIFY) {
gdk_window_set_cursor(gtk_text_view_get_window(GTK_TEXT_VIEW(obj),
@@ -534,6 +534,17 @@
return widg;
}
+static void
+summary_dialog_response (GtkWidget *dlg,
+ gint response,
+ GtkWidget *window)
+{
+ if (response == GTK_RESPONSE_ACCEPT)
+ gtk_widget_destroy(window);
+ else
+ g_spawn_command_line_async ("exo-open --launch WebBrowser " PLUGIN_WEBSITE, NULL);
+}
+
GtkWidget *
create_summary_window (xml_weather *data,
units unit)
@@ -545,7 +556,9 @@
window = xfce_titled_dialog_new_with_buttons (_("Weather Update"),
NULL,
GTK_DIALOG_NO_SEPARATOR,
- GTK_STOCK_OK,
+ GTK_STOCK_ABOUT,
+ GTK_RESPONSE_HELP,
+ GTK_STOCK_CLOSE,
GTK_RESPONSE_ACCEPT, NULL);
title = g_strdup_printf (_("Weather report for: %s"), get_data (data, DNAM));
@@ -579,7 +592,7 @@
gtk_box_pack_start (GTK_BOX (vbox), notebook, TRUE, TRUE, 0);
g_signal_connect (G_OBJECT (window), "response",
- G_CALLBACK (gtk_widget_destroy), window);
+ G_CALLBACK (summary_dialog_response), window);
gtk_window_set_default_size (GTK_WINDOW (window), 500, 400);
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather.c
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather.c 2009-06-12 15:43:34 UTC (rev 7538)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather.c 2009-06-12 16:39:42 UTC (rev 7539)
@@ -41,7 +41,6 @@
#define XFCEWEATHER_ROOT "weather"
#define UPDATE_TIME 1600
#define BORDER 8
-#define PLUGIN_WEBSITE "http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin"
gboolean
check_envproxy (gchar **proxy_host,
Modified: xfce4-weather-plugin/trunk/panel-plugin/weather.h
===================================================================
--- xfce4-weather-plugin/trunk/panel-plugin/weather.h 2009-06-12 15:43:34 UTC (rev 7538)
+++ xfce4-weather-plugin/trunk/panel-plugin/weather.h 2009-06-12 16:39:42 UTC (rev 7539)
@@ -22,6 +22,7 @@
#include <libxfce4panel/xfce-panel-plugin.h>
#include <libxfce4util/libxfce4util.h>
+#define PLUGIN_WEBSITE "http://goodies.xfce.org/projects/panel-plugins/xfce4-weather-plugin"
#define PARTNER_ID "1121946239"
#define LICENSE_KEY "3c4cd39ee5dec84f"
More information about the Goodies-commits
mailing list