[Xfce4-commits] <xfce4-indicator-plugin:master> Added an About dialog.

Andrzej noreply at xfce.org
Thu Apr 4 17:44:31 CEST 2013


Updating branch refs/heads/master
         to dd4f96d9db59a24ad421fc13e8c633a384ce92a4 (commit)
       from bc0abf05233f99011c77d4d6dd27943059be37bd (commit)

commit dd4f96d9db59a24ad421fc13e8c633a384ce92a4
Author: Andrzej <ndrwrdck at gmail.com>
Date:   Fri Mar 22 00:31:56 2013 +0000

    Added an About dialog.

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

diff --git a/panel-plugin/indicator.c b/panel-plugin/indicator.c
index d5d56f8..26d0ebb 100644
--- a/panel-plugin/indicator.c
+++ b/panel-plugin/indicator.c
@@ -53,6 +53,7 @@ static void             indicator_construct                        (XfcePanelPlu
 static void             indicator_free                             (XfcePanelPlugin       *plugin);
 static gboolean         load_module                                (const gchar           *name,
                                                                     IndicatorPlugin       *indicator);
+static void             indicator_show_about                       (XfcePanelPlugin       *plugin);
 static void             indicator_configure_plugin                 (XfcePanelPlugin       *plugin);
 static gboolean         indicator_size_changed                     (XfcePanelPlugin       *plugin,
                                                                     gint                   size);
@@ -99,6 +100,7 @@ indicator_class_init (IndicatorPluginClass *klass)
   plugin_class->construct = indicator_construct;
   plugin_class->free_data = indicator_free;
   plugin_class->size_changed = indicator_size_changed;
+  plugin_class->about = indicator_show_about;
   plugin_class->configure_plugin = indicator_configure_plugin;
 #ifdef HAS_PANEL_49
   plugin_class->mode_changed = indicator_mode_changed;
@@ -135,6 +137,35 @@ indicator_free (XfcePanelPlugin *plugin)
 
 
 static void
+indicator_show_about (XfcePanelPlugin *plugin)
+{
+   GdkPixbuf *icon;
+
+   const gchar *auth[] = {
+     "Mark Trompell <mark at foresightlinux.org>", "Andrzej Radecki <ndrwrdck at gmail.com>",
+     "Lionel Le Folgoc <lionel at lefolgoc.net>", "Jason Conti <jconti at launchpad.net>",
+     "Nick Schermer <nick at xfce.org>", "Evgeni Golov <evgeni at debian.org>", NULL };
+
+   g_return_if_fail (XFCE_IS_INDICATOR_PLUGIN (plugin));
+
+   icon = xfce_panel_pixbuf_from_source("xfce4-indicator-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", _("An indicator of something that needs your attention on the desktop"),
+                         "website", "http://goodies.xfce.org/projects/panel-plugins/xfce4-indicator-plugin",
+                         "copyright", _("Copyright (c) 2009-2013\n"),
+                         "authors", auth, NULL);
+
+   if(icon)
+     g_object_unref(G_OBJECT(icon));
+}
+
+
+
+static void
 indicator_configure_plugin (XfcePanelPlugin *plugin)
 {
   IndicatorPlugin *indicator = XFCE_INDICATOR_PLUGIN (plugin);
@@ -202,6 +233,7 @@ indicator_construct (XfcePanelPlugin *plugin)
   GtkWidget        *label;
 
   xfce_panel_plugin_menu_show_configure (plugin);
+  xfce_panel_plugin_menu_show_about (plugin);
 
   /* setup transation domain */
   xfce_textdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");


More information about the Xfce4-commits mailing list