Mercurial > audlegacy-plugins
changeset 454:6c1c03111db4 trunk
[svn] - use xmms_show_message for the about box
author | giacomo |
---|---|
date | Wed, 17 Jan 2007 08:27:05 -0800 |
parents | 60395c0d7587 |
children | f001b217c88b |
files | ChangeLog src/statusicon/si_ui.c |
diffstat | 2 files changed, 33 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jan 17 03:34:44 2007 -0800 +++ b/ChangeLog Wed Jan 17 08:27:05 2007 -0800 @@ -1,3 +1,12 @@ +2007-01-17 11:34:44 +0000 Giacomo Lozito <james@develia.org> + revision [990] + - status icon plugin: use scroll wheel on the status icon to change volume + trunk/src/statusicon/si.c | 10 ++++++++++ + trunk/src/statusicon/si_audacious.h | 2 ++ + trunk/src/statusicon/si_ui.c | 21 ++++++++++++++++++++- + 3 files changed, 32 insertions(+), 1 deletion(-) + + 2007-01-17 11:13:34 +0000 Giacomo Lozito <james@develia.org> revision [988] - status icon plugin: display main menu on right click
--- a/src/statusicon/si_ui.c Wed Jan 17 03:34:44 2007 -0800 +++ b/src/statusicon/si_ui.c Wed Jan 17 08:27:05 2007 -0800 @@ -287,7 +287,7 @@ allocation.width = req.width; allocation.height = req.height; gtk_widget_size_allocate( GTK_WIDGET(si_applet) , &allocation ); - + return; } @@ -309,13 +309,28 @@ void si_ui_about_show ( void ) { - GtkWidget *about_dlg = gtk_message_dialog_new( - NULL , 0 , GTK_MESSAGE_INFO , GTK_BUTTONS_CLOSE , - _( "Status Icon Plugin " SI_VERSION_PLUGIN "\n" - "written by Giacomo Lozito < james@develia.org >\n\n" - "This plugin provides a status icon, placed in\n" - "the system tray area of the window manager.\n" ) ); - gtk_dialog_run( GTK_DIALOG(about_dlg) ); - gtk_widget_destroy( about_dlg ); + static GtkWidget *about_dlg = NULL; + gchar *about_title; + gchar *about_text; + + if ( about_dlg != NULL ) + { + gtk_window_present( GTK_WINDOW(about_dlg) ); + return; + } + + about_title = g_strdup( _("About Status Icon Plugin") ); + about_text = g_strjoin( "" , "Status Icon Plugin " , SI_VERSION_PLUGIN , + _("\nwritten by Giacomo Lozito < james@develia.org >\n\n" + "This plugin provides a status icon, placed in\n" + "the system tray area of the window manager.\n") , NULL ); + + about_dlg = xmms_show_message( about_title , about_text , _("Ok") , FALSE , NULL , NULL ); + g_signal_connect( G_OBJECT(about_dlg) , "destroy" , + G_CALLBACK(gtk_widget_destroyed), &about_dlg ); + g_free( about_text ); + g_free( about_title ); + + gtk_widget_show_all( about_dlg ); return; }