changeset 2511:da7e2ec2ea27

Use macro wrapping for Gtk+ v1 vs v2 differences, yet again.
author Matti Hamalainen <ccr@tnsp.org>
date Thu, 03 Apr 2008 00:59:00 +0300
parents 78b8e3614df7
children e732490b4dbf
files src/sid/xmms-sid.h src/sid/xs_config.c src/sid/xs_fileinfo.c
diffstat 3 files changed, 11 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/sid/xmms-sid.h	Thu Apr 03 00:53:45 2008 +0300
+++ b/src/sid/xmms-sid.h	Thu Apr 03 00:59:00 2008 +0300
@@ -219,6 +219,8 @@
 #define XS_SIGNAL_CONNECT(SOBJ, SNAME, SFUNC, SDATA)        \
     g_signal_connect(G_OBJECT(SOBJ), SNAME, G_CALLBACK(SFUNC), SDATA)
 
+#define XS_WINDOW_PRESENT(XX) gtk_window_present(GTK_WINDOW( XX ))
+
 #ifdef __cplusplus
 }
 #endif
--- a/src/sid/xs_config.c	Thu Apr 03 00:53:45 2008 +0300
+++ b/src/sid/xs_config.c	Thu Apr 03 00:59:00 2008 +0300
@@ -775,7 +775,7 @@
     (void) user_data;
 
     if (xs_sldb_fileselector != NULL) {
-                gtk_window_present(GTK_WINDOW(xs_sldb_fileselector));
+        XS_WINDOW_PRESENT(xs_sldb_fileselector);
         return;
     }
 
@@ -813,7 +813,7 @@
     (void) user_data;
 
     if (xs_stil_fileselector != NULL) {
-                gtk_window_present(GTK_WINDOW(xs_stil_fileselector));
+        XS_WINDOW_PRESENT(xs_stil_fileselector);
         return;
     }
 
@@ -852,7 +852,7 @@
     (void) user_data;
 
     if (xs_hvsc_selector != NULL) {
-                gtk_window_present(GTK_WINDOW(xs_hvsc_selector));
+        XS_WINDOW_PRESENT(xs_hvsc_selector);
         return;
     }
 
@@ -903,9 +903,10 @@
     
     xs_curve_reset(curve);
     xs_curve_set_range(curve, 0,0, XS_SIDPLAY2_NFPOINTS, XS_SIDPLAY2_FMAX);
-    if (!xs_curve_set_points(curve, f->points, f->npoints))
+    if (!xs_curve_set_points(curve, f->points, f->npoints)) {
         // FIXME
         xs_error("Warning: Could not set filter curve widget points!\n");
+    }
 }
 
 
@@ -1010,7 +1011,7 @@
     (void) user_data;
 
     if (xs_filt_importselector != NULL) {
-                gtk_window_present(GTK_WINDOW(xs_filt_importselector));
+        XS_WINDOW_PRESENT(xs_filt_importselector);
         return;
     }
 
@@ -1049,7 +1050,7 @@
     (void) user_data;
 
     if (xs_filt_exportselector != NULL) {
-                gtk_window_present(GTK_WINDOW(xs_filt_exportselector));
+        XS_WINDOW_PRESENT(xs_filt_exportselector);
         return;
     }
 
@@ -1259,7 +1260,7 @@
 
     /* Check if the window already exists */
     if (xs_configwin) {
-                gtk_window_present(GTK_WINDOW(xs_configwin));
+        XS_WINDOW_PRESENT(xs_configwin);
         return;
     }
 
--- a/src/sid/xs_fileinfo.c	Thu Apr 03 00:53:45 2008 +0300
+++ b/src/sid/xs_fileinfo.c	Thu Apr 03 00:59:00 2008 +0300
@@ -202,7 +202,7 @@
 
     /* Check if there already is an open fileinfo window */
     if (xs_fileinfowin)
-                gtk_window_present(GTK_WINDOW(xs_fileinfowin));
+        XS_WINDOW_PRESENT(xs_fileinfowin);
     else {
         xs_fileinfowin = create_xs_fileinfowin();
 #ifndef AUDACIOUS_PLUGIN