changeset 900:9eaff2f6cd4b trunk

[svn] prevent libconsole aboutbox from spawning multiple times
author giacomo
date Thu, 30 Mar 2006 13:47:45 -0800
parents 83a1c8396625
children 9d09a5e6c3d5
files Plugins/Input/console/Audacious_Driver.cpp
diffstat 1 files changed, 14 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/Plugins/Input/console/Audacious_Driver.cpp	Wed Mar 29 23:22:58 2006 -0800
+++ b/Plugins/Input/console/Audacious_Driver.cpp	Thu Mar 30 13:47:45 2006 -0800
@@ -667,13 +667,20 @@
 
 extern "C" void console_aboutbox(void)
 {
-	xmms_show_message(_("About the Console Music Decoder"),
-			_("Console music decoder engine based on Game_Music_Emu 0.3.0.\n"
-			  "Audacious implementation by: William Pitcock <nenolod@nenolod.net>, \n"
-			// Please do not put my hotpop.com address in the clear (I hate spam)
-			  "        Shay Green <hotpop.com@blargg>"),
-			_("Ok"),
-			FALSE, NULL, NULL);
+	static GtkWidget * aboutbox = NULL;
+
+	if (!aboutbox)
+	{
+		aboutbox = xmms_show_message(_("About the Console Music Decoder"),
+						_("Console music decoder engine based on Game_Music_Emu 0.3.0.\n"
+						"Audacious implementation by: William Pitcock <nenolod@nenolod.net>, \n"
+						// Please do not put my hotpop.com address in the clear (I hate spam)
+						"        Shay Green <hotpop.com@blargg>"),
+						_("Ok"),
+						FALSE, NULL, NULL);
+		gtk_signal_connect(GTK_OBJECT(aboutbox), "destroy",
+					(GCallback)gtk_widget_destroyed, &aboutbox);
+	}
 }
 
 InputPlugin console_ip =