[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xine-cvslog
Subject:    [xine-cvs] CVS: gnome-xine/src defs.h, 1.5, 1.6 gtkvideo.c, 1.126,
From:       Darren Salt <dsalt () users ! sourceforge ! net>
Date:       2006-08-27 18:33:26
Message-ID: E1GHPRm-0008ML-CL () sc8-pr-cvs10 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/xine/gnome-xine/src
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv32061/src

Modified Files:
	defs.h gtkvideo.c lirc.c server.c 
Log Message:
Some #ifdef cleanup.


Index: defs.h
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/defs.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- defs.h	6 Jul 2006 18:03:31 -0000	1.5
+++ defs.h	27 Aug 2006 18:33:23 -0000	1.6
@@ -47,8 +47,10 @@
 /* debug logging */
 #ifdef LOG
 #define logprintf(FMT,...) g_print (FMT, ## __VA_ARGS__)
+#define logperror(STR) perror (STR)
 #else
 #define logprintf(FMT,...)
+#define logperror(STR)
 #endif
 
 #endif

Index: gtkvideo.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/gtkvideo.c,v
retrieving revision 1.126
retrieving revision 1.127
diff -u -r1.126 -r1.127
--- gtkvideo.c	26 Jul 2006 23:58:59 -0000	1.126
+++ gtkvideo.c	27 Aug 2006 18:33:24 -0000	1.127
@@ -262,6 +262,13 @@
     g_error_free (error);
 }
 
+static inline void
+gtv_screensaver_maybe_inhibit_dbus (gtk_video_private_t *priv, gboolean inhibit)
+{
+  if (screensaver_is_running_dbus (priv))
+    gtv_screensaver_inhibit_dbus (priv, inhibit);
+}
+
 static void
 gtv_gs_proxy_destroy_cb (GObject *obj, gtk_video_private_t *priv)
 {
@@ -313,6 +320,8 @@
 }
 #else
 #define screensaver_is_running_dbus(PRIV) (FALSE)
+#define gtv_screensaver_maybe_inhibit_dbus(PRIV, INHIBIT)
+#define gtv_init_dbus(PRIV)
 #define gtv_finalise_dbus(PRIV)
 #endif
 
@@ -1159,9 +1168,7 @@
   else
     priv->video_driver_id = NULL;
 
-#ifdef WITH_DBUS
   gtv_init_dbus (gtv);
-#endif
 
   return this;
 }
@@ -1345,10 +1352,7 @@
     gtv_hide_pointer (gtv);
     priv->screen_blanker_timeout =
       g_timeout_add (4000, (GSourceFunc) gtv_screen_blanker_cb, gtv);
-#ifdef WITH_DBUS
-    if (screensaver_is_running_dbus (gtv->priv))
-      gtv_screensaver_inhibit_dbus (gtv->priv, TRUE);
-#endif
+    gtv_screensaver_maybe_inhibit_dbus (gtv->priv, TRUE);
   }
   else
   {
@@ -1365,10 +1369,7 @@
       g_source_remove (priv->screen_blanker_timeout);
       priv->screen_blanker_timeout = 0;
     }
-#ifdef WITH_DBUS
-    if (screensaver_is_running_dbus (gtv->priv))
-      gtv_screensaver_inhibit_dbus (gtv->priv, FALSE);
-#endif
+    gtv_screensaver_maybe_inhibit_dbus (gtv->priv, FALSE);
     gtv_show_pointer (gtv);
     gdk_flush ();
     sched_yield (); /* hmm, seems to be needed here... */

Index: lirc.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/lirc.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- lirc.c	19 Jul 2006 01:51:47 -0000	1.26
+++ lirc.c	27 Aug 2006 18:33:24 -0000	1.27
@@ -178,9 +178,7 @@
     pthread_cleanup_pop (1);
   }
 }
-#endif /* HAVE_LIRC */
 
-#ifdef HAVE_LIRC
 static void gxine_lirc_start (void)
 {
   pthread_attr_t attr;
@@ -193,6 +191,10 @@
   pthread_attr_destroy (&attr);
   pthread_mutex_unlock (&lirc_init_mutex);
 }
+
+#else
+#define gxine_lirc_thread (0)
+#define gxine_lirc_start()
 #endif
 
 void gxine_lirc_quit (void)
@@ -211,15 +213,11 @@
 {
   se_log_fncall ("reload_lirc");
   se_argc_check_max (0, "reload_lirc");
-#ifdef HAVE_LIRC
   gxine_lirc_quit ();
   if (gxine_lirc_thread)
     pthread_join (gxine_lirc_thread, NULL);
   gxine_lirc_start ();
   *rval = gxine_lirc_thread ? JSVAL_TRUE : JSVAL_FALSE;
-#else
-  *rval = JSVAL_FALSE;
-#endif
   return JS_TRUE;
 }
 
@@ -227,7 +225,5 @@
 {
   se_defun (gse, NULL, "reload_lirc", js_reload_lirc, 0, 0,
 	    SE_GROUP_HIDDEN, NULL, NULL);
-#ifdef HAVE_LIRC
   gxine_lirc_start ();
-#endif
 }

Index: server.c
===================================================================
RCS file: /cvsroot/xine/gnome-xine/src/server.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- server.c	6 Jul 2006 18:03:32 -0000	1.25
+++ server.c	27 Aug 2006 18:33:24 -0000	1.26
@@ -270,9 +270,7 @@
 
   if (connect (client_fd, &serv_adr.s, sizeof (serv_adr)) < 0)
   {
-#ifdef LOG
-    perror ("connect");
-#endif
+    logperror ("connect");
     server_client_stop ();
     return 0;
   }


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Xine-cvslog mailing list
Xine-cvslog@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xine-cvslog
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic