# HG changeset patch # User giacomo # Date 1143212577 28800 # Node ID 9d393eabf984762147bcf8c5f14748cf6958eb84 # Parent 25f42f39c44cf0bb4f342f1b89aa7e547af03435 [svn] now modplug uses xmms_show_message for its aboutbox diff -r 25f42f39c44c -r 9d393eabf984 Plugins/Input/modplug/gui/callbacks.cpp --- a/Plugins/Input/modplug/gui/callbacks.cpp Thu Mar 23 17:24:41 2006 -0800 +++ b/Plugins/Input/modplug/gui/callbacks.cpp Fri Mar 24 07:02:57 2006 -0800 @@ -21,19 +21,6 @@ return TRUE; } -void -on_about_close_clicked (GtkButton *button, - gpointer user_data) -{ - GtkWidget* lAboutWindow; - - lAboutWindow = lookup_widget((GtkWidget*)button, "About"); - if(!lAboutWindow) - cerr << "ModPlug: on_about_close_clicked: Could not find about window!" << endl; - else - gtk_widget_hide(lAboutWindow); -} - void on_config_apply_clicked (GtkButton *button, diff -r 25f42f39c44c -r 9d393eabf984 Plugins/Input/modplug/gui/callbacks.h --- a/Plugins/Input/modplug/gui/callbacks.h Thu Mar 23 17:24:41 2006 -0800 +++ b/Plugins/Input/modplug/gui/callbacks.h Fri Mar 24 07:02:57 2006 -0800 @@ -6,9 +6,6 @@ GdkEvent *event, gpointer user_data); -void -on_about_close_clicked (GtkButton *button, - gpointer user_data); void on_config_ok_clicked (GtkButton *button, diff -r 25f42f39c44c -r 9d393eabf984 Plugins/Input/modplug/gui/interface.cpp --- a/Plugins/Input/modplug/gui/interface.cpp Thu Mar 23 17:24:41 2006 -0800 +++ b/Plugins/Input/modplug/gui/interface.cpp Fri Mar 24 07:02:57 2006 -0800 @@ -19,71 +19,6 @@ #include "support.h" GtkWidget* -create_About (void) -{ - GtkWidget *About; - GtkWidget *vbox1; - GtkWidget *label1; - GtkWidget *hseparator1; - GtkWidget *hbuttonbox1; - GtkWidget *about_close; - - About = gtk_window_new (GTK_WINDOW_TOPLEVEL); - gtk_object_set_data (GTK_OBJECT (About), "About", About); - gtk_window_set_title (GTK_WINDOW (About), _("About Modplug")); - gtk_window_set_policy (GTK_WINDOW (About), FALSE, FALSE, FALSE); - - vbox1 = gtk_vbox_new (FALSE, 0); - gtk_widget_ref (vbox1); - gtk_object_set_data_full (GTK_OBJECT (About), "vbox1", vbox1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (vbox1); - gtk_container_add (GTK_CONTAINER (About), vbox1); - - label1 = gtk_label_new (_("Modplug Input Plugin for Audacious ver" - VERSION - "\nModplug sound engine written by Olivier Lapicque.\nXMMS interface for Modplug by Kenton Varda.\n(c)2000 Olivier Lapicque and Kenton Varda.\nUpdates and Maintainance by Konstanty Bialkowski.\nPorted to BMP by Theofilos Intzoglou.")); - gtk_widget_ref (label1); - gtk_object_set_data_full (GTK_OBJECT (About), "label1", label1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (label1); - gtk_box_pack_start (GTK_BOX (vbox1), label1, FALSE, FALSE, 0); - gtk_misc_set_padding (GTK_MISC (label1), 6, 6); - - hseparator1 = gtk_hseparator_new (); - gtk_widget_ref (hseparator1); - gtk_object_set_data_full (GTK_OBJECT (About), "hseparator1", hseparator1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hseparator1); - gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, TRUE, TRUE, 0); - gtk_widget_set_usize (hseparator1, -2, 18); - - hbuttonbox1 = gtk_hbutton_box_new (); - gtk_widget_ref (hbuttonbox1); - gtk_object_set_data_full (GTK_OBJECT (About), "hbuttonbox1", hbuttonbox1, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (hbuttonbox1); - gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, TRUE, TRUE, 0); - - about_close = gtk_button_new_with_label (_("Close")); - gtk_widget_ref (about_close); - gtk_object_set_data_full (GTK_OBJECT (About), "about_close", about_close, - (GtkDestroyNotify) gtk_widget_unref); - gtk_widget_show (about_close); - gtk_container_add (GTK_CONTAINER (hbuttonbox1), about_close); - GTK_WIDGET_SET_FLAGS (about_close, GTK_CAN_DEFAULT); - - gtk_signal_connect (GTK_OBJECT (About), "delete_event", - GTK_SIGNAL_FUNC (hide_window), - NULL); - gtk_signal_connect (GTK_OBJECT (about_close), "clicked", - GTK_SIGNAL_FUNC (on_about_close_clicked), - NULL); - - return About; -} - -GtkWidget* create_Config (void) { GtkWidget *Config; diff -r 25f42f39c44c -r 9d393eabf984 Plugins/Input/modplug/gui/interface.h --- a/Plugins/Input/modplug/gui/interface.h Thu Mar 23 17:24:41 2006 -0800 +++ b/Plugins/Input/modplug/gui/interface.h Fri Mar 24 07:02:57 2006 -0800 @@ -2,6 +2,5 @@ * DO NOT EDIT THIS FILE - it is generated by Glade. */ -GtkWidget* create_About (void); GtkWidget* create_Config (void); GtkWidget* create_Info (void); diff -r 25f42f39c44c -r 9d393eabf984 Plugins/Input/modplug/gui/main.cpp --- a/Plugins/Input/modplug/gui/main.cpp Thu Mar 23 17:24:41 2006 -0800 +++ b/Plugins/Input/modplug/gui/main.cpp Fri Mar 24 07:02:57 2006 -0800 @@ -9,6 +9,7 @@ #include #include +#include "libaudacious/util.c" #include "interface.h" #include "support.h" @@ -38,7 +39,14 @@ void ShowAboutWindow() { if(!AboutWin) - AboutWin = create_About(); + { + gchar * about_text = g_strjoin( "" , _("Modplug Input Plugin for Audacious ver") , + VERSION , _("\nModplug sound engine written by Olivier Lapicque.\nXMMS interface for Modplug by Kenton Varda.\n(c)2000 Olivier Lapicque and Kenton Varda.\nUpdates and Maintainance by Konstanty Bialkowski.\nPorted to BMP by Theofilos Intzoglou.") , NULL ); + AboutWin = xmms_show_message( _("About Modplug") , about_text , _("Ok") , FALSE , NULL , NULL ); + gtk_signal_connect( GTK_OBJECT(AboutWin) , "destroy" , + GTK_SIGNAL_FUNC(gtk_widget_destroyed), &AboutWin); + g_free( about_text ); + } gtk_widget_show(AboutWin); }