[Xfce4-commits] <xfce4-battery-plugin:master> add about dialog
Landry Breuil
noreply at xfce.org
Tue Apr 17 19:56:02 CEST 2012
Updating branch refs/heads/master
to 911268ee270f298ee538b7062cee63345892f4e9 (commit)
from 1158cd19d616208d581862909fcd289323b89cf4 (commit)
commit 911268ee270f298ee538b7062cee63345892f4e9
Author: Landry Breuil <landry at xfce.org>
Date: Tue Apr 17 19:22:33 2012 +0200
add about dialog
panel-plugin/battery.c | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/panel-plugin/battery.c b/panel-plugin/battery.c
index ac40c70..943b379 100644
--- a/panel-plugin/battery.c
+++ b/panel-plugin/battery.c
@@ -1488,6 +1488,29 @@ battmon_create_options(XfcePanelPlugin *plugin, t_battmon *battmon)
gtk_widget_show_all (dlg);
}
+static void
+battmon_show_about(XfcePanelPlugin *plugin, t_battmon *battmon)
+{
+ GdkPixbuf *icon;
+ const gchar *auth[] = {
+ "Benedikt Meurer <benny at xfce.org>", "Edscott Wilson <edscott at imp.mx>",
+ "Eduard Roccatello <eduard at xfce.org>", "Florian Rivoal <frivoal at xfce.org>",
+ "Landry Breuil <landry at xfce.org>", "Nick Schermer <nick at xfce.org>", NULL };
+ icon = xfce_panel_pixbuf_from_source("xfce4-battery-plugin", NULL, 32);
+ 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 and monitor the battery status"),
+ "website", "http://goodies.xfce.org/projects/panel-plugins/xfce4-battery-plugin",
+ "copyright", _("Copyright (c) 2003-2012\n"),
+ "authors", auth, NULL);
+
+ if(icon)
+ g_object_unref(G_OBJECT(icon));
+}
+
/* create the plugin */
static void
battmon_construct (XfcePanelPlugin *plugin)
@@ -1507,6 +1530,9 @@ battmon_construct (XfcePanelPlugin *plugin)
xfce_panel_plugin_menu_show_configure (plugin);
g_signal_connect (plugin, "configure-plugin", G_CALLBACK (battmon_create_options), battmon);
+ xfce_panel_plugin_menu_show_about(plugin);
+ g_signal_connect (plugin, "about", G_CALLBACK (battmon_show_about), battmon);
+
g_signal_connect (plugin, "size-changed", G_CALLBACK (battmon_set_size), battmon);
#if defined (LIBXFCE4PANEL_CHECK_VERSION) && LIBXFCE4PANEL_CHECK_VERSION (4,9,0)
More information about the Xfce4-commits
mailing list