# HG changeset patch # User chainsaw # Date 1135549180 28800 # Node ID 51b8f124936e060f95b9f429376c47cf7f759afb # Parent e089ce1ba088e701d6c96c5bc5b88d22ba68d9c7 [svn] And that concludes the story of the whacky OK button. Thank you. diff -r e089ce1ba088 -r 51b8f124936e Plugins/Output/crossfade/configure.c --- a/Plugins/Output/crossfade/configure.c Sun Dec 25 14:10:13 2005 -0800 +++ b/Plugins/Output/crossfade/configure.c Sun Dec 25 14:19:40 2005 -0800 @@ -43,6 +43,8 @@ #include #include #include +#include +#include #ifdef HAVE_LIBSAMPLERATE # include @@ -103,7 +105,6 @@ static GtkWidget *config_win = NULL; -static GtkWidget *about_win = NULL; static GtkWidget *set_wgt; static GtkWidget *get_wgt; @@ -1822,45 +1823,36 @@ void xfade_about() { - if(!about_win) { - gchar *about_text = - "Audacious crossfading plugin\n" - "Code adapted for Audacious usage by Tony Vroon from:\n" - "XMMS Crossfade Plugin "VERSION"\n" - "Copyright (C) 2000-2004 Peter Eisenlohr \n" - "\n" - "based on the original OSS Output Plugin Copyright (C) 1998-2000\n" - "Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies\n" - "\n" - "This program is free software; you can redistribute it and/or modify\n" - "it under the terms of the GNU General Public License as published by\n" - "the Free Software Foundation; either version 2 of the License, or\n" - "(at your option) any later version.\n" - "\n" - "This program is distributed in the hope that it will be useful,\n" - "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" - "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" - "GNU General Public License for more details.\n" - "\n" - "You should have received a copy of the GNU General Public License\n" - "along with this program; if not, write to the Free Software\n" - "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" - "USA."; + static GtkWidget *dialog; + + if (dialog != NULL) + return; - about_win = create_about_win(); + dialog = xmms_show_message( + _("About crossfade"), + _("Audacious crossfading plugin\n" + "Code adapted for Audacious usage by Tony Vroon from:\n" + "XMMS Crossfade Plugin "VERSION"\n" + "Copyright (C) 2000-2004 Peter Eisenlohr \n" + "\n" + "based on the original OSS Output Plugin Copyright (C) 1998-2000\n" + "Peter Alm, Mikael Alm, Olle Hallnas, Thomas Nilsson and 4Front Technologies\n" + "\n" + "This program is free software; you can redistribute it and/or modify\n" + "it under the terms of the GNU General Public License as published by\n" + "the Free Software Foundation; either version 2 of the License, or\n" + "(at your option) any later version.\n" + "\n" + "This program is distributed in the hope that it will be useful,\n" + "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" + "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" + "GNU General Public License for more details.\n" + "\n" + "You should have received a copy of the GNU General Public License\n" + "along with this program; if not, write to the Free Software\n" + "Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n" + "USA."),_("OK"), FALSE, NULL, NULL); - /* update about_win when window is destroyed */ - gtk_signal_connect(GTK_OBJECT(about_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &about_win); - - /* set about box text (this is done here and not in interface.c because - of the VERSION #define -- there is no way to do this with GLADE */ - if((set_wgt = lookup_widget(about_win, "about_label"))) - gtk_label_set_text(GTK_LABEL(set_wgt), about_text); - - /* show near mouse pointer */ - gtk_window_set_position(GTK_WINDOW(about_win), GTK_WIN_POS_MOUSE); - gtk_widget_show(about_win); - } - else - gdk_window_raise(about_win->window); + gtk_signal_connect(GTK_OBJECT(dialog), "destroy", + GTK_SIGNAL_FUNC(gtk_widget_destroyed), &dialog); }