# HG changeset patch # User Eugene Zagidullin # Date 1196207415 -10800 # Node ID 329267b09658c1efdfc4fa0da8cf4c5569be71c9 # Parent 36b9f3e6cbcff7cc357b7aa2c9295ad2b034021b get rid of talking with GDK directly diff -r 36b9f3e6cbcf -r 329267b09658 src/demac/plugin.c --- a/src/demac/plugin.c Tue Nov 27 18:03:20 2007 +0300 +++ b/src/demac/plugin.c Wed Nov 28 02:50:15 2007 +0300 @@ -66,6 +66,7 @@ static unsigned long seek_to_msec=(unsigned long)-1; /* -1 == not needed */ static InputPlugin demac_ip; +static GtkWidget *about_window = NULL; #ifdef DEBUG # include "crc.c" @@ -369,19 +370,17 @@ } static void demac_about(void) { - static GtkWidget *about_window = NULL; - if (about_window) - gdk_window_raise(about_window->window); - else { + if (about_window) { + gtk_window_present(GTK_WINDOW(about_window)); + } else { about_window = audacious_info_dialog(_("About Monkey's Audio Plugin"), _("Copyright (C) 2007 Eugene Zagidullin \n" "Based on ffape decoder, Copyright (C) 2007 Benjamin Zores\n" "ffape itself based on libdemac by Dave Chapman\n\n" "ffape is a part of FFmpeg project, http://ffmpeg.mplayerhq.hu/"), _("Ok"), FALSE, NULL, NULL); - g_signal_connect(G_OBJECT(about_window), "destroy", - G_CALLBACK(gtk_widget_destroyed), &about_window); + g_signal_connect(G_OBJECT(about_window), "destroy", G_CALLBACK(gtk_widget_destroyed), &about_window); } } diff -r 36b9f3e6cbcf -r 329267b09658 src/vorbis/vorbis.c --- a/src/vorbis/vorbis.c Tue Nov 27 18:03:20 2007 +0300 +++ b/src/vorbis/vorbis.c Wed Nov 28 02:50:15 2007 +0300 @@ -126,6 +126,7 @@ GMutex *vf_mutex; gchar **vorbis_tag_encoding_list = NULL; +static GtkWidget *about_window; static int vorbis_check_fd(char *filename, VFSFile *stream) @@ -725,10 +726,8 @@ static void vorbis_aboutbox(void) { - static GtkWidget *about_window; - if (about_window) - gdk_window_raise(about_window->window); + gtk_window_present(GTK_WINDOW(about_window)); else { about_window = audacious_info_dialog(_("About Ogg Vorbis Audio Plugin"),