[Pommed-commits] r394 - in trunk: . gpomme

jblache at alioth.debian.org jblache at alioth.debian.org
Tue Nov 27 16:41:41 UTC 2007


Author: jblache
Date: 2007-11-27 16:41:41 +0000 (Tue, 27 Nov 2007)
New Revision: 394

Modified:
   trunk/ChangeLog
   trunk/gpomme/Makefile
   trunk/gpomme/gpomme.c
Log:
Add video switch support to gpomme.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2007-11-27 16:38:21 UTC (rev 393)
+++ trunk/ChangeLog	2007-11-27 16:41:41 UTC (rev 394)
@@ -5,6 +5,7 @@
 	- pommed: add an option to disable the beep on volume change.
 	- pommed: add the videoSwitch DBus notification.
 	- wmpomme: add video switch support.
+	- gpomme: add video switch support.
 
 version 1.12:
 	- pommed: do not expect at least 3 evdevs at startup; there are

Modified: trunk/gpomme/Makefile
===================================================================
--- trunk/gpomme/Makefile	2007-11-27 16:38:21 UTC (rev 393)
+++ trunk/gpomme/Makefile	2007-11-27 16:41:41 UTC (rev 394)
@@ -17,7 +17,9 @@
 CFLAGS = -g -O2 -Wall $(DBUS_CFLAGS) $(GTK_CFLAGS) $(CONFUSE_CFLAGS) $(GLADE_CFLAGS)
 LDFLAGS = -lpthread $(DBUS_LIBS) $(GTK_LIBS) $(CONFUSE_LIBS) $(GLADE_LIBS)
 
-SOURCES = gpomme.c theme.c conffile.c ../client-common/dbus-client.c
+SOURCES = gpomme.c theme.c conffile.c \
+		../client-common/dbus-client.c \
+		../client-common/video-client.c
 POFILES = po/fr.po po/de.po po/es.po po/it.po
 
 OBJS = $(SOURCES:%.c=%.o)
@@ -29,7 +31,7 @@
 
 gpomme: $(OBJS) $(LIBS)
 
-gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h
+gpomme.o: gpomme.c gpomme.h theme.h ../client-common/dbus-client.h ../client-common/video-client.h
 
 theme.o: theme.c theme.h gpomme.h
 
@@ -37,6 +39,8 @@
 
 ../client-common/dbus-client.o: ../client-common/dbus-client.c ../client-common/dbus-client.h
 
+../client-common/video-client.o: ../client-common/video-client.c ../client-common/video-client.h
+
 %.mo: %.po
 	@echo Building $@...
 	@msgfmt --statistics -o $@ $<

Modified: trunk/gpomme/gpomme.c
===================================================================
--- trunk/gpomme/gpomme.c	2007-11-27 16:38:21 UTC (rev 393)
+++ trunk/gpomme/gpomme.c	2007-11-27 16:41:41 UTC (rev 394)
@@ -48,6 +48,7 @@
 #include "conffile.h"
 
 #include "../client-common/dbus-client.h"
+#include "../client-common/video-client.h"
 
 
 #define _(str) gettext(str)
@@ -285,7 +286,7 @@
 
   signals = MBP_DBUS_SIG_LCD | MBP_DBUS_SIG_KBD
     | MBP_DBUS_SIG_VOL | MBP_DBUS_SIG_MUTE
-    | MBP_DBUS_SIG_EJECT;
+    | MBP_DBUS_SIG_EJECT | MBP_DBUS_SIG_VIDEO;
 
   conn = mbp_dbus_init(&dbus_err, signals);
 
@@ -395,6 +396,10 @@
 	{
 	  show_window(IMG_CD_EJECT, _("Eject"), -1.0);
 	}
+      else if (dbus_message_is_signal(msg, "org.pommed.signal.videoSwitch", "videoSwitch"))
+	{
+	  mbp_video_switch();
+	}
       else if (dbus_message_is_signal(msg, DBUS_INTERFACE_LOCAL, "Disconnected"))
 	{
 	  printf("DBus disconnected\n");




More information about the Pommed-commits mailing list