wck-plugin.c 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /* $Id$
  2. *
  3. * This program is free software; you can redistribute it and/or modify
  4. * it under the terms of the GNU General Public License as published by
  5. * the Free Software Foundation; either version 3 of the License, or
  6. * (at your option) any later version.
  7. *
  8. * This program is distributed in the hope that it will be useful,
  9. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. *
  13. * You should have received a copy of the GNU General Public License along
  14. * with this program; if not, write to the Free Software Foundation, Inc.,
  15. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  16. *
  17. * Copyright (C) 2013 Cedric Leporcq <cedl38@gmail.com>
  18. *
  19. */
  20. #ifdef HAVE_CONFIG_H
  21. #include <config.h>
  22. #endif
  23. #include <string.h>
  24. #include <gtk/gtk.h>
  25. #include <libxfce4ui/libxfce4ui.h>
  26. #include "wck-plugin.h"
  27. void
  28. wck_about (XfcePanelPlugin *plugin, const gchar *icon_name)
  29. {
  30. /* about dialog code. you can use the GtkAboutDialog
  31. * or the XfceAboutInfo widget */
  32. GdkPixbuf *icon;
  33. const gchar *auth[] = {
  34. "Alessio Piccoli <alepic@geckoblu.net>",
  35. "Cedric Leporcq <cedl38@gmail.com>",
  36. "",
  37. "This code is based on original 'Window Applets' from Andrej Belcijan.",
  38. "See http://gnome-look.org/content/show.php?content=103732 for details.",
  39. NULL };
  40. icon = xfce_panel_pixbuf_from_source(icon_name, NULL, 32);
  41. gtk_show_about_dialog (NULL,
  42. "logo", icon,
  43. "license", xfce_get_license_text(XFCE_LICENSE_TEXT_GPL),
  44. "version", PACKAGE_VERSION,
  45. "program-name", xfce_panel_plugin_get_display_name (plugin),
  46. "comments", xfce_panel_plugin_get_comment (plugin),
  47. "website", PLUGIN_WEBSITE,
  48. "copyright", "Copyright \302\251 2013\n",
  49. "authors", auth,
  50. NULL );
  51. // TODO: add translators.
  52. if (icon)
  53. g_object_unref(G_OBJECT(icon) );
  54. }