r7444 - mugshot-client/trunk/linux



Author: walters
Date: 2008-04-21 12:34:37 -0500 (Mon, 21 Apr 2008)
New Revision: 7444

Added:
   mugshot-client/trunk/linux/mugshot-autostart-check.in
Modified:
   mugshot-client/trunk/linux/Makefile-mugshot.am
   mugshot-client/trunk/linux/mugshot-autostart.desktop.in
Log:
#1387: Autostart mugshot if we have a signin cookie


Modified: mugshot-client/trunk/linux/Makefile-mugshot.am
===================================================================
--- mugshot-client/trunk/linux/Makefile-mugshot.am	2008-04-18 22:28:28 UTC (rev 7443)
+++ mugshot-client/trunk/linux/Makefile-mugshot.am	2008-04-21 17:34:37 UTC (rev 7444)
@@ -102,9 +102,16 @@
 	done ;										\
 	echo '{ NULL, NULL, NULL } };' >> $(EMBEDDED_IMAGE_HEADER) || exit 1
 
-BUILT_SOURCES += $(EMBEDDED_IMAGE_HEADER)
-MAINTAINERCLEANFILES +=	$(EMBEDDED_IMAGE_HEADER)
+mugshot-autostart-check: mugshot-autostart-check.in
+	sed -e 's,[ ]LIBEXECDIR[@],$(libexecdir),g' mugshot-autostart-check.in > mugshot-autostart-check.tmp && mv mugshot-autostart-check.tmp mugshot-autostart-check
 
+autocheckstartdir=$(libexecdir)
+autocheckstart_SCRIPTS = mugshot-autostart-check
+EXTRA_DIST += mugshot-autostart-check.in
+
+BUILT_SOURCES += $(EMBEDDED_IMAGE_HEADER) mugshot-autostart-check
+MAINTAINERCLEANFILES +=	$(EMBEDDED_IMAGE_HEADER) mugshot-autostart-check
+
 ## we need to nodist these because otherwise automake would copy 
 ## ../common to distdir/../common which puts common outside of distdir.
 ## so we handle the disting manually so the destination is always distdir/common-dist
@@ -140,7 +147,7 @@
 mugshot.desktop: mugshot.desktop.in
 	cat $(srcdir)/mugshot.desktop.in | sed -e 's/^_//g' > mugshot.desktop
 mugshot-autostart.desktop: mugshot-autostart.desktop.in
-	cat $(srcdir)/mugshot-autostart.desktop.in | sed -e 's/^_//g' > mugshot-autostart.desktop
+	cat $(srcdir)/mugshot-autostart.desktop.in | sed -e 's/^_//g' -e 's,[ ]LIBEXECDIR[@],$(libexecdir),g' > mugshot-autostart.desktop
 
 EXTRA_DIST += $(autostart_in_files) $(desktopfiles_in_files) #$(service_in_files)
 MAINTAINERCLEANFILES +=	$(autostart_files) $(desktopfiles_files) #$(service_DATA)

Added: mugshot-client/trunk/linux/mugshot-autostart-check.in
===================================================================
--- mugshot-client/trunk/linux/mugshot-autostart-check.in	2008-04-18 22:28:28 UTC (rev 7443)
+++ mugshot-client/trunk/linux/mugshot-autostart-check.in	2008-04-21 17:34:37 UTC (rev 7444)
@@ -0,0 +1,8 @@
+#!/usr/bin/python
+import os,sys,subprocess
+p = subprocess.Popen([os.path.join("@LIBEXECDIR@", "desktop-data-engine"), "--check-if-mugshot-exists"])
+ret = p.wait()
+if ret == 0:
+  subprocess.Popen(['mugshot', '--no-show-window'])
+
+

Modified: mugshot-client/trunk/linux/mugshot-autostart.desktop.in
===================================================================
--- mugshot-client/trunk/linux/mugshot-autostart.desktop.in	2008-04-18 22:28:28 UTC (rev 7443)
+++ mugshot-client/trunk/linux/mugshot-autostart.desktop.in	2008-04-21 17:34:37 UTC (rev 7444)
@@ -4,7 +4,7 @@
 Name=Mugshot
 GenericName=Mugshot
 _Comment=Companion software for mugshot.org
-Exec=mugshot --no-show-window
+Exec= LIBEXECDIR@/mugshot-autostart-check
 Terminal=false
 Type=Application
 Icon=mugshot



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]