[Xfce4-commits] <parole:bluesabre/gtk3> Cleanup compiler warnings, add logging to parole-screensaver.

Sean Davis noreply at xfce.org
Sun Aug 11 15:16:06 CEST 2013


Updating branch refs/heads/bluesabre/gtk3
         to d07986b982549509531bb09f76a61f2a02061304 (commit)
       from ad0fd21c0299ae463c50a73ab135566ba78806a4 (commit)

commit d07986b982549509531bb09f76a61f2a02061304
Author: Sean Davis <smd.seandavis at gmail.com>
Date:   Wed Feb 20 20:12:57 2013 -0500

    Cleanup compiler warnings, add logging to parole-screensaver.

 src/common/Makefile.am          |    8 ++++++--
 src/common/parole-screensaver.c |   13 +++++++++++--
 src/parole-player.c             |    4 ++++
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index fe06330..af39af2 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -16,5 +16,9 @@ libparolescreensaver_la_SOURCES = 	\
 	parole-screensaver.c		\
 	parole-screensaver.h
 
-libparolescreensaver_la_CFLAGS =	\
-	$(GTK_CFLAGS)
\ No newline at end of file
+libparolescreensaver_la_CFLAGS =		\
+	$(GTK_CFLAGS)				\
+	$(LIBXFCE4UTIL_CFLAGS)
+
+libparolescreensaver_la_LIBADD = 		\
+	$(LIBXFCE4UTIL_LIBS)
diff --git a/src/common/parole-screensaver.c b/src/common/parole-screensaver.c
index edfe455..95496ce 100644
--- a/src/common/parole-screensaver.c
+++ b/src/common/parole-screensaver.c
@@ -30,6 +30,9 @@
 
 #include <gdk/gdkx.h>
 
+#include <libxfce4util/libxfce4util.h>
+
+#include "src/misc/parole-debug.h"
 #include "parole-screensaver.h"
 
 #define RESET_SCREENSAVER_TIMEOUT	6
@@ -72,11 +75,14 @@ parole_screen_saver_new (void)
 void parole_screen_saver_inhibit (ParoleScreenSaver *saver, GtkWindow *window)
 {
     gchar *cmd;
+    gint returncode;
 
     g_return_if_fail (PAROLE_IS_SCREENSAVER (saver));
 
     cmd = g_strdup_printf("xdg-screensaver suspend %lu", GDK_DRAWABLE_XID (gtk_widget_get_window (GTK_WIDGET (window))));
-    system(cmd);
+    returncode = system(cmd);
+    
+    TRACE("\'xdg-screensaver suspend\' returned %i", returncode);
 
     g_free(cmd);
 }
@@ -84,11 +90,14 @@ void parole_screen_saver_inhibit (ParoleScreenSaver *saver, GtkWindow *window)
 void parole_screen_saver_uninhibit (ParoleScreenSaver *saver, GtkWindow *window)
 {
     gchar *cmd;
+    gint returncode;
 
     g_return_if_fail (PAROLE_IS_SCREENSAVER (saver));
 
     cmd = g_strdup_printf("xdg-screensaver resume %lu", GDK_DRAWABLE_XID (gtk_widget_get_window (GTK_WIDGET (window))));
-    system(cmd);
+    returncode = system(cmd);
+    
+    TRACE("\'xdg-screensaver resume\' returned %i", returncode);
 
     g_free(cmd);
 }
diff --git a/src/parole-player.c b/src/parole-player.c
index f5e5762..898e05d 100644
--- a/src/parole-player.c
+++ b/src/parole-player.c
@@ -147,6 +147,10 @@ void 			parole_player_seekb_cb (GtkWidget *widget, ParolePlayer *player, gdouble
 gboolean        parole_player_scroll_event_cb		(GtkWidget *widget,
 							 GdkEventScroll *ev,
 							 ParolePlayer *player);
+							 
+gboolean    parole_player_window_state_event (GtkWidget *widget,
+                                GdkEventWindowState *event,
+                                ParolePlayer *player);
 
 void		parole_player_leave_fs_cb		(GtkButton *button,
 							 ParolePlayer *player);


More information about the Xfce4-commits mailing list