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

commit dd4f96d9db59a24ad421fc13e8c633a384ce92a4
Author: Andrzej <[email protected]>
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 <[email protected]>", "Andrzej Radecki 
<[email protected]>",
+     "Lionel Le Folgoc <[email protected]>", "Jason Conti 
<[email protected]>",
+     "Nick Schermer <[email protected]>", "Evgeni Golov <[email protected]>", 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");
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to