[Xfce4-commits] <xfce4-weather-plugin:master> Add a proper "About" dialog (bug #9379).
Harald Judt
noreply at xfce.org
Mon Nov 12 22:14:01 CET 2012
Updating branch refs/heads/master
to 0ad2cf80cb428b390c54799cb9027b8599d64daf (commit)
from d161affad5b7ca7b32ca619f5de36bbfc71c7166 (commit)
commit 0ad2cf80cb428b390c54799cb9027b8599d64daf
Author: Olivier Duchateau <duchateau.olivier at gmail.com>
Date: Mon Nov 12 21:43:13 2012 +0100
Add a proper "About" dialog (bug #9379).
panel-plugin/weather.c | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/panel-plugin/weather.c b/panel-plugin/weather.c
index c9dcffe..07e8b3a 100644
--- a/panel-plugin/weather.c
+++ b/panel-plugin/weather.c
@@ -1262,6 +1262,38 @@ xfceweather_set_orientation(XfcePanelPlugin *panel,
static void
+xfceweather_show_about(XfcePanelPlugin *plugin,
+ xfceweather_data *data)
+{
+ GdkPixbuf *icon;
+ const gchar *auth[] = {
+ "Bob Schlärmann <weatherplugin at atreidis.nl.eu.org>",
+ "Benedikt Meurer <benny at xfce.org>",
+ "Jasper Huijsmans <jasper at xfce.org>",
+ "Masse Nicolas <masse_nicolas at yahoo.fr>",
+ "Nick Schermer <nick at xfce.org>",
+ "Colin Leroy <colin at colino.net>",
+ "Harald Judt <h.judt at gmx.at>",
+ NULL };
+ icon = xfce_panel_pixbuf_from_source("xfce4-weather", NULL, 48);
+ gtk_show_about_dialog
+ (NULL,
+ "logo", icon,
+ "license", xfce_get_license_text(XFCE_LICENSE_TEXT_GPL),
+ "version", PACKAGE_VERSION,
+ "program-name", PACKAGE_NAME,
+ "comments", _("Show weather conditions and forecasts"),
+ "website", PLUGIN_WEBSITE,
+ "copyright", _("Copyright (c) 2003-2012\n"),
+ "authors", auth,
+ NULL);
+
+ if (icon)
+ g_object_unref(G_OBJECT(icon));
+}
+
+
+static void
weather_construct(XfcePanelPlugin *plugin)
{
xfceweather_data *data;
@@ -1305,6 +1337,10 @@ weather_construct(XfcePanelPlugin *plugin)
g_signal_connect(G_OBJECT(plugin), "configure-plugin",
G_CALLBACK(xfceweather_create_options), data);
+ xfce_panel_plugin_menu_show_about(plugin);
+ g_signal_connect(G_OBJECT(plugin), "about",
+ G_CALLBACK(xfceweather_show_about), data);
+
weather_dump(weather_dump_plugindata, data);
update_weatherdata(data);
More information about the Xfce4-commits
mailing list