[Goodies-commits] r4111 - xfce4-mpc-plugin/trunk/panel-plugin
Landry Breuil
landry at xfce.org
Mon Mar 24 18:39:36 CET 2008
Author: landry
Date: 2008-03-24 17:39:36 +0000 (Mon, 24 Mar 2008)
New Revision: 4111
Modified:
xfce4-mpc-plugin/trunk/panel-plugin/simple-libmpd.c
xfce4-mpc-plugin/trunk/panel-plugin/simple-libmpd.h
xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.c
xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.h
Log:
- bump copyright year
- add an aboutbox, shamelessly inspired from mailwatch plugin (adds some po-strings)
Modified: xfce4-mpc-plugin/trunk/panel-plugin/simple-libmpd.c
===================================================================
--- xfce4-mpc-plugin/trunk/panel-plugin/simple-libmpd.c 2008-03-24 16:41:54 UTC (rev 4110)
+++ xfce4-mpc-plugin/trunk/panel-plugin/simple-libmpd.c 2008-03-24 17:39:36 UTC (rev 4111)
@@ -1,6 +1,6 @@
/* simple-libmpd.c
*
- * Copyright (c) 2006-2007 Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
+ * Copyright (c) 2006-2008 Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
* This code is licenced under a BSD-style licence.
* (OpenBSD variant modeled after the ISC licence)
* All rights reserved.
Modified: xfce4-mpc-plugin/trunk/panel-plugin/simple-libmpd.h
===================================================================
--- xfce4-mpc-plugin/trunk/panel-plugin/simple-libmpd.h 2008-03-24 16:41:54 UTC (rev 4110)
+++ xfce4-mpc-plugin/trunk/panel-plugin/simple-libmpd.h 2008-03-24 17:39:36 UTC (rev 4111)
@@ -1,6 +1,6 @@
/* simple-libmpd.h
*
- * Copyright (c) 2006-2007 Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
+ * Copyright (c) 2006-2008 Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
* This code is licenced under a BSD-style licence.
* (OpenBSD variant modeled after the ISC licence)
* All rights reserved.
Modified: xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.c
===================================================================
--- xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.c 2008-03-24 16:41:54 UTC (rev 4110)
+++ xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.c 2008-03-24 17:39:36 UTC (rev 4111)
@@ -1,6 +1,6 @@
/* xfce4-mpc-plugin.c
*
- * Copyright (c) 2006-2007 Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
+ * Copyright (c) 2006-2008 Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
* This code is licenced under a BSD-style licence.
* (OpenBSD variant modeled after the ISC licence)
* All rights reserved.
@@ -567,7 +567,7 @@
GtkWidget *image;
button = (GtkWidget*) xfce_create_panel_button();
- image = gtk_image_new_from_stock(icon,GTK_ICON_SIZE_BUTTON);
+ image = gtk_image_new_from_stock(icon,GTK_ICON_SIZE_BUTTON); /* FIXME for small panels */
gtk_button_set_image(GTK_BUTTON(button),image);
xfce_panel_plugin_add_action_widget (plugin, button);
@@ -627,6 +627,35 @@
}
static void
+mpc_show_about(XfcePanelPlugin *plugin, t_mpc* mpc)
+{
+ XfceAboutInfo *ainfo;
+ GdkPixbuf *icon;
+
+ if (mpc->about)
+ {
+ gtk_window_present(GTK_WINDOW(mpc->about));
+ return;
+ }
+ ainfo = xfce_about_info_new(_("Xfce4 Mpc Plugin"), PACKAGE_VERSION,
+ _("A simple panel-plugin client for Music Player Daemon"),
+ _("Copyright (c) 2006-2008 Landry Breuil\n"),
+ XFCE_LICENSE_BSD);
+ xfce_about_info_add_credit(ainfo, "Landry Breuil", "landry at fr.homeunix.org", _("Maintainer, Original Author"));
+ xfce_about_info_set_homepage(ainfo, "http://goodies.xfce.org/projects/panel-plugins/xfce4-mpc-plugin");
+
+ icon = xfce_themed_icon_load("xfce-multimedia", 32);
+
+ mpc->about = xfce_about_dialog_new_with_values(NULL, ainfo, icon);
+ gtk_widget_show_all(mpc->about);
+ g_signal_connect(G_OBJECT(mpc->about), "response", G_CALLBACK(gtk_widget_destroy), NULL);
+ g_signal_connect(G_OBJECT(mpc->about), "destroy", G_CALLBACK(gtk_widget_destroyed), &mpc->about);
+
+ if(icon)
+ g_object_unref(G_OBJECT(icon));
+}
+
+static void
mpc_construct (XfcePanelPlugin * plugin)
{
t_mpc *mpc;
@@ -666,6 +695,8 @@
xfce_panel_plugin_menu_show_configure (plugin);
g_signal_connect (plugin, "configure-plugin", G_CALLBACK (mpc_create_options), mpc);
+ xfce_panel_plugin_menu_show_about(plugin);
+ g_signal_connect (plugin, "about", G_CALLBACK (mpc_show_about), mpc);
}
Modified: xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.h
===================================================================
--- xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.h 2008-03-24 16:41:54 UTC (rev 4110)
+++ xfce4-mpc-plugin/trunk/panel-plugin/xfce4-mpc-plugin.h 2008-03-24 17:39:36 UTC (rev 4111)
@@ -1,6 +1,6 @@
/* xfce4-mpc-plugin.h
*
- * Copyright (c) 2006-2007 Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
+ * Copyright (c) 2006-2008 Landry Breuil (landry at fr.homeunix.org / gaston at gcu.info)
* This code is licenced under a BSD-style licence.
* (OpenBSD variant modeled after the ISC licence)
* All rights reserved.
@@ -34,7 +34,7 @@
typedef struct {
XfcePanelPlugin *plugin;
GtkTooltips *tips;
- GtkWidget *frame,*ebox,*box,*prev,*stop,*toggle,*next,*random,*repeat,*appl;
+ GtkWidget *frame,*ebox,*box,*prev,*stop,*toggle,*next,*random,*repeat,*appl,*about;
GtkWidget *playlist;
gboolean show_frame;
/* mpd handle */
More information about the Goodies-commits
mailing list