comparison src/demac/plugin.c @ 2191:329267b09658

get rid of talking with GDK directly
author Eugene Zagidullin <e.asphyx@gmail.com>
date Wed, 28 Nov 2007 02:50:15 +0300
parents 36b9f3e6cbcf
children dfa3c3aa2dc7
comparison
equal deleted inserted replaced
2190:36b9f3e6cbcf 2191:329267b09658
64 64
65 static GMutex *demac_mutex; 65 static GMutex *demac_mutex;
66 static unsigned long seek_to_msec=(unsigned long)-1; /* -1 == not needed */ 66 static unsigned long seek_to_msec=(unsigned long)-1; /* -1 == not needed */
67 67
68 static InputPlugin demac_ip; 68 static InputPlugin demac_ip;
69 static GtkWidget *about_window = NULL;
69 70
70 #ifdef DEBUG 71 #ifdef DEBUG
71 # include "crc.c" 72 # include "crc.c"
72 #endif 73 #endif
73 74
367 static void demac_cleanup() { 368 static void demac_cleanup() {
368 g_mutex_free(demac_mutex); 369 g_mutex_free(demac_mutex);
369 } 370 }
370 371
371 static void demac_about(void) { 372 static void demac_about(void) {
372 static GtkWidget *about_window = NULL; 373
373 374 if (about_window) {
374 if (about_window) 375 gtk_window_present(GTK_WINDOW(about_window));
375 gdk_window_raise(about_window->window); 376 } else {
376 else {
377 about_window = audacious_info_dialog(_("About Monkey's Audio Plugin"), 377 about_window = audacious_info_dialog(_("About Monkey's Audio Plugin"),
378 _("Copyright (C) 2007 Eugene Zagidullin <e.asphyx@gmail.com>\n" 378 _("Copyright (C) 2007 Eugene Zagidullin <e.asphyx@gmail.com>\n"
379 "Based on ffape decoder, Copyright (C) 2007 Benjamin Zores\n" 379 "Based on ffape decoder, Copyright (C) 2007 Benjamin Zores\n"
380 "ffape itself based on libdemac by Dave Chapman\n\n" 380 "ffape itself based on libdemac by Dave Chapman\n\n"
381 "ffape is a part of FFmpeg project, http://ffmpeg.mplayerhq.hu/"), 381 "ffape is a part of FFmpeg project, http://ffmpeg.mplayerhq.hu/"),
382 _("Ok"), FALSE, NULL, NULL); 382 _("Ok"), FALSE, NULL, NULL);
383 g_signal_connect(G_OBJECT(about_window), "destroy", 383 g_signal_connect(G_OBJECT(about_window), "destroy", G_CALLBACK(gtk_widget_destroyed), &about_window);
384 G_CALLBACK(gtk_widget_destroyed), &about_window);
385 } 384 }
386 } 385 }
387 386
388 static gboolean demac_update_song_tuple(Tuple *tuple, VFSFile *vfd) { 387 static gboolean demac_update_song_tuple(Tuple *tuple, VFSFile *vfd) {
389 fprintf(stderr, "demac_update_song_tuple(): stub\n"); 388 fprintf(stderr, "demac_update_song_tuple(): stub\n");