[Xfce4-commits] <xfce4-systemload-plugin:master> add about dialog

Landry Breuil noreply at xfce.org
Wed Apr 18 18:38:02 CEST 2012


Updating branch refs/heads/master
         to 0fb772164ed057c4777b8c4f00c58f1f947478ba (commit)
       from ab1d21c1b5fa86fea6ccec0e9f7f1ddb15135f29 (commit)

commit 0fb772164ed057c4777b8c4f00c58f1f947478ba
Author: Landry Breuil <landry at xfce.org>
Date:   Wed Apr 18 17:48:45 2012 +0200

    add about dialog

 panel-plugin/systemload.c |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/panel-plugin/systemload.c b/panel-plugin/systemload.c
index bffb9d9..03b6e04 100644
--- a/panel-plugin/systemload.c
+++ b/panel-plugin/systemload.c
@@ -869,6 +869,29 @@ monitor_create_options(XfcePanelPlugin *plugin, t_global_monitor *global)
 }
 
 static void
+monitor_show_about(XfcePanelPlugin *plugin, t_global_monitor *global)
+{
+   GdkPixbuf *icon;
+   const gchar *auth[] = {
+      "Riccardo Persichetti <riccardo.persichetti at tin.it>",
+      "Florian Rivoal <frivoal at xfce.org>",
+      "David Schneider <dnschneid at gmail.com>", NULL };
+   icon = xfce_panel_pixbuf_from_source("utilities-system-monitor", NULL, 32);
+   gtk_show_about_dialog(NULL,
+      "logo", icon,
+      "license", xfce_get_license_text (XFCE_LICENSE_TEXT_BSD),
+      "version", PACKAGE_VERSION,
+      "program-name", PACKAGE_NAME,
+      "comments", _("Monitor CPU load, swap usage and memory footprint"),
+      "website", "http://goodies.xfce.org/projects/panel-plugins/xfce4-systemload-plugin",
+      "copyright", _("Copyright (c) 2003-2012\n"),
+      "authors", auth, NULL);
+
+   if(icon)
+      g_object_unref(G_OBJECT(icon));
+}
+
+static void
 systemload_construct (XfcePanelPlugin *plugin)
 {
     t_global_monitor *global;
@@ -910,6 +933,10 @@ systemload_construct (XfcePanelPlugin *plugin)
     xfce_panel_plugin_menu_show_configure (plugin);
     g_signal_connect (plugin, "configure-plugin", 
                       G_CALLBACK (monitor_create_options), global);
+
+    xfce_panel_plugin_menu_show_about(plugin);
+    g_signal_connect (plugin, "about", G_CALLBACK (monitor_show_about),
+                       global);
 }
 
 XFCE_PANEL_PLUGIN_REGISTER (systemload_construct);


More information about the Xfce4-commits mailing list