# HG changeset patch # User giacomo # Date 1143215473 28800 # Node ID 2f66993e2a5311071e114d83123303be77363b53 # Parent 9d393eabf984762147bcf8c5f14748cf6958eb84 [svn] fixed multiple spawns of adplug aboutbox diff -r 9d393eabf984 -r 2f66993e2a53 Plugins/Input/adplug/adplug-xmms.cc --- a/Plugins/Input/adplug/adplug-xmms.cc Fri Mar 24 07:02:57 2006 -0800 +++ b/Plugins/Input/adplug/adplug-xmms.cc Fri Mar 24 07:51:13 2006 -0800 @@ -23,6 +23,7 @@ #include #include #include +#include #include "adplug.h" #include "emuopl.h" #include "silentopl.h" @@ -57,6 +58,7 @@ extern "C" InputPlugin adplug_ip; static gboolean audio_error = FALSE; +GtkWidget *about_win = NULL; // Configuration (and defaults) static struct { @@ -139,16 +141,24 @@ static void adplug_about(void) { - std::ostringstream text; - - text << ADPLUG_NAME "\n" - "Copyright (C) 2002, 2003 Simon Peter \n\n" - "This plugin is released under the terms and conditions of the GNU LGPL.\n" - "See http://www.gnu.org/licenses/lgpl.html for details." - "\n\nThis plugin uses the AdPlug library, which is copyright (C) Simon Peter, et al.\n" - "Linked AdPlug library version: " << CAdPlug::get_version() << std::ends; - - MessageBox("About " ADPLUG_NAME, text.str().c_str(), "Ugh!"); + if(!about_win) + { + gchar * about_title = g_strjoin( "" , _("About ") , ADPLUG_NAME , NULL ); + const gchar * version_text = CAdPlug::get_version().c_str(); + gchar * about_text = g_strjoin( "" , ADPLUG_NAME , + _("\nCopyright (C) 2002, 2003 Simon Peter \n\n" + "This plugin is released under the terms and conditions of the GNU LGPL.\n" + "See http://www.gnu.org/licenses/lgpl.html for details." + "\n\nThis plugin uses the AdPlug library, which is copyright (C) Simon Peter, et al.\n" + "Linked AdPlug library version: ") , + version_text , NULL ); + about_win = xmms_show_message( about_title , about_text , _("Ok") , FALSE , NULL , NULL ); + gtk_signal_connect( GTK_OBJECT(about_win) , "destroy" , + GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_win ); + g_free( about_text ); + g_free( about_title ); + } + gtk_widget_show( about_win ); } static void close_config_box_ok(GtkButton *button, GPtrArray *rblist)