changeset 902:c130ba2a5524 trunk

[svn] prevent tonegen aboutbox from spawning multiple times
author giacomo
date Thu, 30 Mar 2006 14:03:48 -0800
parents 9d09a5e6c3d5
children 495a1a6f1d99
files Plugins/Input/tonegen/tonegen.c
diffstat 1 files changed, 13 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/tonegen/tonegen.c	Thu Mar 30 13:55:46 2006 -0800
+++ b/Plugins/Input/tonegen/tonegen.c	Thu Mar 30 14:03:48 2006 -0800
@@ -45,16 +45,19 @@
 static void tone_about(void)
 {
 	static GtkWidget *box;
-	box = xmms_show_message(
-		_("About Tone Generator"),
-/* I18N: UTF-8 Translation: "Haavard Kvaalen" -> "H\303\245vard Kv\303\245len" */
-		_("Sinus tone generator by Haavard Kvaalen <havardk@xmms.org>\n"
-		  "Modified by Daniel J. Peng <danielpeng@bigfoot.com>\n\n"
-		  "To use it, add a URL: tone://frequency1;frequency2;frequency3;...\n"
-		  "e.g. tone://2000;2005 to play a 2000Hz tone and a 2005Hz tone"),
-		_("Ok"), FALSE, NULL, NULL);
-	g_signal_connect(GTK_OBJECT(box), "destroy",
-			   (GCallback)gtk_widget_destroyed, &box);
+	if (!box)
+	{
+		box = xmms_show_message(
+			_("About Tone Generator"),
+	/* I18N: UTF-8 Translation: "Haavard Kvaalen" -> "H\303\245vard Kv\303\245len" */
+			_("Sinus tone generator by Haavard Kvaalen <havardk@xmms.org>\n"
+			  "Modified by Daniel J. Peng <danielpeng@bigfoot.com>\n\n"
+		  	"To use it, add a URL: tone://frequency1;frequency2;frequency3;...\n"
+		  	"e.g. tone://2000;2005 to play a 2000Hz tone and a 2005Hz tone"),
+			_("Ok"), FALSE, NULL, NULL);
+		g_signal_connect(GTK_OBJECT(box), "destroy",
+				   (GCallback)gtk_widget_destroyed, &box);
+	}
 }
 
 static int tone_is_our_file(char *filename)