changeset 2195:9773d2c69857

Automated merge with ssh://hg.atheme.org//hg/audacious-plugins
author Jonathan Schleifer <js-audacious@webkeks.org>
date Wed, 28 Nov 2007 18:15:40 +0100
parents c19a820de01e (current diff) 80d7ab8f2ec5 (diff)
children dfa3c3aa2dc7
files
diffstat 19 files changed, 128 insertions(+), 126 deletions(-) [+]
line wrap: on
line diff
--- a/src/CoreAudio/configure.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/CoreAudio/configure.c	Wed Nov 28 18:15:40 2007 +0100
@@ -157,7 +157,7 @@
 	
 	if (configure_win)
 	{
-		gdk_window_raise(configure_win->window);
+                gtk_window_present(GTK_WINDOW(configure_win));
 		return;
 	}
 
--- a/src/alsa/configure.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/alsa/configure.c	Wed Nov 28 18:15:40 2007 +0100
@@ -248,7 +248,7 @@
 
 	if (configure_win)
 	{
-		gdk_window_raise(configure_win->window);
+                gtk_window_present(GTK_WINDOW(configure_win));
 		return;
 	}
 
--- a/src/amidi-plug/i_configure.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/amidi-plug/i_configure.c	Wed Nov 28 18:15:40 2007 +0100
@@ -234,7 +234,7 @@
     g_object_set_data( G_OBJECT(button_ok) , "bapply_pressed" , GUINT_TO_POINTER(0) );
     if ( configwin_warnmsg != NULL )
     {
-      gdk_window_raise( configwin_warnmsg->window );
+      gtk_window_present(GTK_WINDOW(configwin_warnmsg));
     }
     else
     {
--- a/src/cdaudio-ng/cdaudio-ng.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/cdaudio-ng/cdaudio-ng.c	Wed Nov 28 18:15:40 2007 +0100
@@ -206,17 +206,17 @@
 	static GtkWidget* about_window = NULL;
 
 	if (about_window) {
-		gdk_window_raise(about_window->window);
-	}
-	about_window = audacious_info_dialog(_("About CD Audio Plugin NG"),
-	_("Copyright (c) 2007, by Calin Crisan <ccrisan@gmail.com> and The Audacious Team.\n\n"
-	"Many thanks to libcdio developers <http://www.gnu.org/software/libcdio/>\n"
-	"\tand to libcddb developers <http://libcddb.sourceforge.net/>.\n\n"
-	"Also thank you Tony Vroon for mentoring & guiding me.\n\n"
-	"This was a Google Summer of Code 2007 project."), _("OK"), FALSE, NULL, NULL);
+            gtk_window_present(GTK_WINDOW(about_window));
+	} else {
+            about_window = audacious_info_dialog(_("About CD Audio Plugin NG"),
+	    _("Copyright (c) 2007, by Calin Crisan <ccrisan@gmail.com> and The Audacious Team.\n\n"
+	    "Many thanks to libcdio developers <http://www.gnu.org/software/libcdio/>\n"
+	    "\tand to libcddb developers <http://libcddb.sourceforge.net/>.\n\n"
+	    "Also thank you Tony Vroon for mentoring & guiding me.\n\n"
+	    "This was a Google Summer of Code 2007 project."), _("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);
+        }
 }
 
 static void cdaudio_configure()
--- a/src/cdaudio-ng/configure.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/cdaudio-ng/configure.c	Wed Nov 28 18:15:40 2007 +0100
@@ -244,6 +244,7 @@
 {
 	configure_values_to_gui();
 	gtk_widget_show(configwindow);
+        gtk_window_present(GTK_WINDOW(configwindow));
 }
 
 
--- a/src/demac/ape.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/demac/ape.c	Wed Nov 28 18:15:40 2007 +0100
@@ -58,7 +58,7 @@
 #define TAG(name, field)  {name, offsetof(AVFormatContext, field), sizeof(((AVFormatContext *)0)->field)}
 
 
-static uint16_t get_le16(VFSFile *vfd)
+uint16_t get_le16(VFSFile *vfd)
 {
     unsigned char tmp[2];
     
@@ -66,7 +66,7 @@
     return tmp[0] | (tmp[1] << 8);
 }
 
-static uint32_t get_le32(VFSFile *vfd)
+uint32_t get_le32(VFSFile *vfd)
 {
     unsigned char tmp[4];
     
@@ -74,6 +74,15 @@
     return tmp[0] | (tmp[1] << 8) | (tmp[2] << 16) | (tmp[3] << 24);
 }
 
+uint64_t get_le64(VFSFile *vfd)
+{
+    unsigned char tmp[8];
+    
+    if(aud_vfs_fread(tmp, 1, 8, vfd) != 8) return -1;
+    return (uint64_t)tmp[0] | ((uint64_t)tmp[1] << 8) | ((uint64_t)tmp[2] << 16) | ((uint64_t)tmp[3] << 24) |
+           ((uint64_t)tmp[4] << 32) | ((uint64_t)tmp[5] << 40) | ((uint64_t)tmp[6] << 48) | ((uint64_t)tmp[7] << 56);
+}
+
 #ifdef DEBUG
 static void ape_dumpinfo(APEContext * ape_ctx)
 {
--- a/src/demac/ape.h	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/demac/ape.h	Wed Nov 28 18:15:40 2007 +0100
@@ -32,7 +32,10 @@
 #define av_log(a, b, ...) ;
 #endif
 
-#define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24))
+#define MKTAG(a,b,c,d)           (a | (b << 8) | (c << 16) | (d << 24))
+#define MKTAG64(a,b,c,d,e,f,g,h) ((uint64_t)a | ((uint64_t)b << 8) | ((uint64_t)c << 16) | ((uint64_t)d << 24) | \
+                                 ((uint64_t)e << 32) | ((uint64_t)f << 40) | ((uint64_t)g << 48) | ((uint64_t)h << 56))
+
 #define AV_TIME_BASE 1000
 #define AV_WL16(a,b) { \
           ((uint8_t*)(a))[0] =  (uint16_t)(b) & 0x00ff;        \
@@ -285,6 +288,10 @@
     else                    return a;
 }
 
+uint16_t get_le16(VFSFile *vfd);
+uint32_t get_le32(VFSFile *vfd);
+uint64_t get_le64(VFSFile *vfd);
+
 int ape_read_header(APEContext *ape, VFSFile *pb, int probe_only);
 int ape_read_packet(APEContext *ape, VFSFile *pb, uint8_t *pkt, int *pkt_size);
 int ape_read_close(APEContext *ape);
--- a/src/demac/apev2.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/demac/apev2.c	Wed Nov 28 18:15:40 2007 +0100
@@ -28,24 +28,9 @@
 #include <audacious/vfs.h>
 #include <audacious/plugin.h> 
 
+#include "ape.h"
 #include "apev2.h"
 
-
-static int read_uint32(VFSFile *vfd, guint32* x) {
-    unsigned char tmp[4];
-    int n;
-
-    n = aud_vfs_fread(tmp, 1, 4, vfd);
-
-    if (n != 4)
-        return -1;
-    
-    /* convert to native endianness */
-    *x = tmp[0] | (tmp[1] << 8) | (tmp[2] << 16) | (tmp[3] << 24);
-
-    return 0;
-}
-
 #define TMP_BUFSIZE 256
 #ifndef MIN
 #define MIN(a,b) ((a) < (b) ? (a) : (b))
@@ -69,6 +54,7 @@
 GHashTable* parse_apev2_tag(VFSFile *vfd) {
   unsigned char tmp[TMP_BUFSIZE+1];
   unsigned char tmp2[TMP_BUFSIZE+1];
+  guint64 signature;
   guint32 tag_version;
   guint32 tag_size, item_size, item_flags;
   guint32 tag_items;
@@ -76,19 +62,18 @@
   GHashTable *hash;
 
   aud_vfs_fseek(vfd, -32, SEEK_END);
-  aud_vfs_fread(tmp, 1, 8, vfd);
-  if ((tmp[0]!='A')||(tmp[1]!='P')||(tmp[2]!='E')||(tmp[3]!='T')||
-     (tmp[4]!='A')||(tmp[5]!='G')||(tmp[6]!='E')||(tmp[7]!='X')) {
+  signature = get_le64(vfd);
+  if (signature != MKTAG64('A', 'P', 'E', 'T', 'A', 'G', 'E', 'X')) {
 #ifdef DEBUG
     fprintf(stderr, "** demac: apev2.c: APE tag not found\n");
 #endif
     return NULL;
   }
   
-  read_uint32(vfd, &tag_version);
-  read_uint32(vfd, &tag_size);
-  read_uint32(vfd, &tag_items);
-  read_uint32(vfd, &tag_flags);
+  tag_version = get_le32(vfd);
+  tag_size = get_le32(vfd);
+  tag_items = get_le32(vfd);
+  tag_flags = get_le32(vfd);
 #ifdef DEBUG
   fprintf(stderr, "** demac: apev2.c: found APE tag version %d contains %d items, flags %08x\n", tag_version, tag_items, tag_flags);
 #endif
@@ -105,8 +90,8 @@
   int i;
   unsigned char *p;
   for(i=0; i<tag_items; i++) {
-      read_uint32(vfd, &item_size);
-      read_uint32(vfd, &item_flags);
+      item_size = get_le32(vfd);
+      item_flags = get_le32(vfd);
       
       /* read key */
       for(p = tmp; p <= tmp+TMP_BUFSIZE; p++) {
--- a/src/demac/plugin.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/demac/plugin.c	Wed Nov 28 18:15:40 2007 +0100
@@ -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 <e.asphyx@gmail.com>\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);
     }
 }
 
--- a/src/flacng/plugin.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/flacng/plugin.c	Wed Nov 28 18:15:40 2007 +0100
@@ -714,7 +714,8 @@
     gchar *about_text;
 
     if (about_window) {
-        gdk_window_raise(about_window->window);
+        gtk_window_present(GTK_WINDOW(about_window));
+        return;
     }
 
     about_text = g_strjoin("", _("FLAC Audio Plugin "), _VERSION,
--- a/src/jack/configure.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/jack/configure.c	Wed Nov 28 18:15:40 2007 +0100
@@ -46,20 +46,20 @@
 
 static void configure_win_ok_cb(GtkWidget * w, gpointer data)
 {
-	ConfigDb *cfgfile;
+        ConfigDb *cfgfile;
 
-	jack_cfg.isTraceEnabled = (gint) GTK_CHECK_BUTTON(GTK_isTraceEnabled)->toggle_button.active;
+        jack_cfg.isTraceEnabled = (gint) GTK_CHECK_BUTTON(GTK_isTraceEnabled)->toggle_button.active;
   jack_cfg.port_connection_mode = GET_CHARS(GTK_COMBO(port_connection_mode_combo)->entry);
 
   jack_set_port_connection_mode(); /* update the connection mode */
 
-	cfgfile = aud_cfg_db_open();
+        cfgfile = aud_cfg_db_open();
 
-	aud_cfg_db_set_bool(cfgfile, "jack", "isTraceEnabled", jack_cfg.isTraceEnabled);
-	aud_cfg_db_set_string(cfgfile, "jack", "port_connection_mode", jack_cfg.port_connection_mode);
-	aud_cfg_db_close(cfgfile);
+        aud_cfg_db_set_bool(cfgfile, "jack", "isTraceEnabled", jack_cfg.isTraceEnabled);
+        aud_cfg_db_set_string(cfgfile, "jack", "port_connection_mode", jack_cfg.port_connection_mode);
+        aud_cfg_db_close(cfgfile);
 
-	gtk_widget_destroy(configure_win);
+        gtk_widget_destroy(configure_win);
 }
 
 static void get_port_connection_modes(GtkCombo *combo)
@@ -91,68 +91,68 @@
 
 void jack_configure(void)
 {
-	if (!configure_win)
-	{
-		configure_win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-		gtk_window_set_type_hint ( GTK_WINDOW(configure_win), GDK_WINDOW_TYPE_HINT_DIALOG);
-		gtk_signal_connect(GTK_OBJECT(configure_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &configure_win);
-		gtk_window_set_title(GTK_WINDOW(configure_win), _("jack Plugin configuration"));
-		gtk_window_set_policy(GTK_WINDOW(configure_win), FALSE, FALSE, FALSE);
-		gtk_window_set_position(GTK_WINDOW(configure_win), GTK_WIN_POS_MOUSE);
-		gtk_container_border_width(GTK_CONTAINER(configure_win), 10);
+        if (!configure_win)
+        {
+                configure_win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+                gtk_window_set_type_hint ( GTK_WINDOW(configure_win), GDK_WINDOW_TYPE_HINT_DIALOG);
+                gtk_signal_connect(GTK_OBJECT(configure_win), "destroy", GTK_SIGNAL_FUNC(gtk_widget_destroyed), &configure_win);
+                gtk_window_set_title(GTK_WINDOW(configure_win), _("jack Plugin configuration"));
+                gtk_window_set_policy(GTK_WINDOW(configure_win), FALSE, FALSE, FALSE);
+                gtk_window_set_position(GTK_WINDOW(configure_win), GTK_WIN_POS_MOUSE);
+                gtk_container_border_width(GTK_CONTAINER(configure_win), 10);
 
-    vbox = gtk_vbox_new(FALSE, 10);
-    gtk_container_add(GTK_CONTAINER(configure_win), vbox);
+                vbox = gtk_vbox_new(FALSE, 10);
+                gtk_container_add(GTK_CONTAINER(configure_win), vbox);
 
-    /* add a frame for other xmms-jack options */
-    option_frame = gtk_frame_new(_("Options:"));
-    gtk_box_pack_start(GTK_BOX(vbox), option_frame, FALSE, FALSE, 0);
+                /* add a frame for other xmms-jack options */
+                option_frame = gtk_frame_new(_("Options:"));
+                gtk_box_pack_start(GTK_BOX(vbox), option_frame, FALSE, FALSE, 0);
 
-    /* add a hbox that will contain a label for a dropdown and the dropdown itself */
-    port_connection_mode_box = gtk_hbox_new(FALSE, 5);
-    gtk_container_set_border_width(GTK_CONTAINER(port_connection_mode_box), 5);
-    gtk_container_add(GTK_CONTAINER(option_frame), port_connection_mode_box);
+                /* add a hbox that will contain a label for a dropdown and the dropdown itself */
+                port_connection_mode_box = gtk_hbox_new(FALSE, 5);
+                gtk_container_set_border_width(GTK_CONTAINER(port_connection_mode_box), 5);
+                gtk_container_add(GTK_CONTAINER(option_frame), port_connection_mode_box);
 
-    /* add the label */
-    gtk_box_pack_start(GTK_BOX(port_connection_mode_box), gtk_label_new(_("Connection mode:")),
-                       FALSE, FALSE, 0);
+                /* add the label */
+                gtk_box_pack_start(GTK_BOX(port_connection_mode_box), gtk_label_new(_("Connection mode:")),
+                                   FALSE, FALSE, 0);
 
-    /* add the dropdown */
-    port_connection_mode_combo = gtk_combo_new();
-    get_port_connection_modes(GTK_COMBO(port_connection_mode_combo));
-    gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(port_connection_mode_combo)->entry),
-                       jack_cfg.port_connection_mode);
-    gtk_box_pack_start(GTK_BOX(port_connection_mode_box), port_connection_mode_combo,
-                       TRUE, TRUE, 0);
+                /* add the dropdown */
+                port_connection_mode_combo = gtk_combo_new();
+                get_port_connection_modes(GTK_COMBO(port_connection_mode_combo));
+                gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(port_connection_mode_combo)->entry),
+                                   jack_cfg.port_connection_mode);
+                gtk_box_pack_start(GTK_BOX(port_connection_mode_box), port_connection_mode_combo,
+                                   TRUE, TRUE, 0);
 
-    /* create a check_button for debug output */
-    GTK_isTraceEnabled = gtk_check_button_new_with_label(_("Enable debug printing"));
-    gtk_box_pack_start(GTK_BOX(vbox), GTK_isTraceEnabled, FALSE, FALSE, 0);
-    gtk_widget_show(GTK_isTraceEnabled);
+                /* create a check_button for debug output */
+                GTK_isTraceEnabled = gtk_check_button_new_with_label(_("Enable debug printing"));
+                gtk_box_pack_start(GTK_BOX(vbox), GTK_isTraceEnabled, FALSE, FALSE, 0);
+                gtk_widget_show(GTK_isTraceEnabled);
 
-    /* set the state of the check_button based upon the value of */
-    /* isTracingEnabled */
-    GTK_CHECK_BUTTON(GTK_isTraceEnabled)->toggle_button.active = jack_cfg.isTraceEnabled;
+                /* set the state of the check_button based upon the value of */
+                /* isTracingEnabled */
+                GTK_CHECK_BUTTON(GTK_isTraceEnabled)->toggle_button.active = jack_cfg.isTraceEnabled;
 
-    /* add the box for the ok/canceled buttons at the bottom */
-    bbox = gtk_hbox_new(FALSE, 10);
-    gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
+                /* add the box for the ok/canceled buttons at the bottom */
+                bbox = gtk_hbox_new(FALSE, 10);
+                gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
 
-		ok = gtk_button_new_with_label(_("Ok"));
-		gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(configure_win_ok_cb), NULL);
-		GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
-		gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0);
-		gtk_widget_show(ok);
-		gtk_widget_grab_default(ok);
+                ok = gtk_button_new_with_label(_("Ok"));
+                gtk_signal_connect(GTK_OBJECT(ok), "clicked", GTK_SIGNAL_FUNC(configure_win_ok_cb), NULL);
+                GTK_WIDGET_SET_FLAGS(ok, GTK_CAN_DEFAULT);
+                gtk_box_pack_start(GTK_BOX(bbox), ok, TRUE, TRUE, 0);
+                gtk_widget_show(ok);
+                gtk_widget_grab_default(ok);
 
-		cancel = gtk_button_new_with_label(_("Cancel"));
-		gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(configure_win));
-		GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
-		gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
-		gtk_widget_show(cancel);
+                cancel = gtk_button_new_with_label(_("Cancel"));
+                gtk_signal_connect_object(GTK_OBJECT(cancel), "clicked", GTK_SIGNAL_FUNC(gtk_widget_destroy), GTK_OBJECT(configure_win));
+                GTK_WIDGET_SET_FLAGS(cancel, GTK_CAN_DEFAULT);
+                gtk_box_pack_start(GTK_BOX(bbox), cancel, TRUE, TRUE, 0);
+                gtk_widget_show(cancel);
 
-		gtk_widget_show_all(configure_win);
-	}
-	else
-		gdk_window_raise(configure_win->window);
+                gtk_widget_show_all(configure_win);
+        }
+        else
+                gtk_window_present(GTK_WINDOW(configure_win));
 }
--- a/src/shnplug/gtk.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/shnplug/gtk.c	Wed Nov 28 18:15:40 2007 +0100
@@ -78,7 +78,7 @@
 {
 	if (about_box != NULL)
 	{
-		gdk_window_raise(about_box->window);
+                gtk_window_present(GTK_WINDOW(about_box));
 		return;
 	}
 
@@ -153,7 +153,7 @@
 {
 	if (shn_configurewin != NULL)
 	{
-		gdk_window_raise(shn_configurewin->window);
+                gtk_window_present(GTK_WINDOW(shn_configurewin));
 		return;
 	}
 
--- a/src/sid/xs_about.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/sid/xs_about.c	Wed Nov 28 18:15:40 2007 +0100
@@ -72,7 +72,7 @@
 
 	/* Check if there already is an open about window */
 	if (xs_aboutwin != NULL) {
-		gdk_window_raise(xs_aboutwin->window);
+                gtk_window_present(GTK_WINDOW(xs_aboutwin));
 		return;
 	}
 
--- a/src/sid/xs_config.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/sid/xs_config.c	Wed Nov 28 18:15:40 2007 +0100
@@ -775,7 +775,7 @@
 	(void) user_data;
 
 	if (xs_sldb_fileselector != NULL) {
-		gdk_window_raise(xs_sldb_fileselector->window);
+                gtk_window_present(GTK_WINDOW(xs_sldb_fileselector));
 		return;
 	}
 
@@ -813,7 +813,7 @@
 	(void) user_data;
 
 	if (xs_stil_fileselector != NULL) {
-		gdk_window_raise(xs_stil_fileselector->window);
+                gtk_window_present(GTK_WINDOW(xs_stil_fileselector));
 		return;
 	}
 
@@ -852,7 +852,7 @@
 	(void) user_data;
 
 	if (xs_hvsc_selector != NULL) {
-		gdk_window_raise(xs_hvsc_selector->window);
+                gtk_window_present(GTK_WINDOW(xs_hvsc_selector));
 		return;
 	}
 
@@ -1011,7 +1011,7 @@
 	(void) user_data;
 
 	if (xs_filt_importselector != NULL) {
-		gdk_window_raise(xs_filt_importselector->window);
+                gtk_window_present(GTK_WINDOW(xs_filt_importselector));
 		return;
 	}
 
@@ -1050,7 +1050,7 @@
 	(void) user_data;
 
 	if (xs_filt_exportselector != NULL) {
-		gdk_window_raise(xs_filt_exportselector->window);
+                gtk_window_present(GTK_WINDOW(xs_filt_exportselector));
 		return;
 	}
 
@@ -1260,7 +1260,7 @@
 
 	/* Check if the window already exists */
 	if (xs_configwin) {
-		gdk_window_raise(xs_configwin->window);
+                gtk_window_present(GTK_WINDOW(xs_configwin));
 		return;
 	}
 
--- a/src/sid/xs_fileinfo.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/sid/xs_fileinfo.c	Wed Nov 28 18:15:40 2007 +0100
@@ -202,7 +202,7 @@
 
 	/* Check if there already is an open fileinfo window */
 	if (xs_fileinfowin)
-		gdk_window_raise(xs_fileinfowin->window);
+                gtk_window_present(GTK_WINDOW(xs_fileinfowin));
 	else {
 		xs_fileinfowin = create_xs_fileinfowin();
 #ifndef AUDACIOUS_PLUGIN
--- a/src/sun/configure.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/sun/configure.c	Wed Nov 28 18:15:40 2007 +0100
@@ -527,7 +527,7 @@
 
 	if (configure_win)
 	{
-		gdk_window_raise(configure_win->window);
+                gtk_window_present(GTK_WINDOW(configure_win));
 		return;
 	}
 	configure_win = gtk_window_new(GTK_WINDOW_TOPLEVEL);
--- a/src/timidity/xmms-timidity.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/timidity/xmms-timidity.c	Wed Nov 28 18:15:40 2007 +0100
@@ -122,7 +122,7 @@
 	}
 	else
 	{
-		gdk_window_raise(xmmstimid_about_wnd->window);
+                gtk_window_present(GTK_WINDOW(xmmstimid_about_wnd));
 	}
 }
 
@@ -182,7 +182,7 @@
 	if (tb != NULL) gtk_toggle_button_set_active(tb, TRUE);
 
 	gtk_widget_show(xmmstimid_conf_wnd);
-	gdk_window_raise(xmmstimid_conf_wnd->window);
+        gtk_window_present(GTK_WINDOW(xmmstimid_conf_wnd));
 }
 
 void xmmstimid_conf_ok(GtkButton *button, gpointer user_data) {
--- a/src/vorbis/vorbis.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/vorbis/vorbis.c	Wed Nov 28 18:15:40 2007 +0100
@@ -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"),
--- a/src/vtx/about.c	Wed Nov 28 18:15:33 2007 +0100
+++ b/src/vtx/about.c	Wed Nov 28 18:15:40 2007 +0100
@@ -17,8 +17,9 @@
 vtx_about (void)
 {
   static GtkWidget *box;
-  if (box) gdk_window_raise(box->window);
-  else {
+  if (box) {
+      gtk_window_present(GTK_WINDOW(box));
+  } else {
 	box = audacious_info_dialog (_("About Vortex Player"),
 				_
 				("Vortex file format player by Sashnov Alexander <sashnov@ngs.ru>\n"