[maemo-commits] [maemo-commits] r19051 - in projects/haf/trunk/hildon-welcome: debian src

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Wed Aug 5 14:54:05 EEST 2009
Author: schulhof
Date: 2009-08-05 14:54:00 +0300 (Wed, 05 Aug 2009)
New Revision: 19051

Modified:
   projects/haf/trunk/hildon-welcome/debian/changelog
   projects/haf/trunk/hildon-welcome/src/main.c
Log:
Touch a file in /tmp when ready to play

Modified: projects/haf/trunk/hildon-welcome/debian/changelog
===================================================================
--- projects/haf/trunk/hildon-welcome/debian/changelog	2009-08-05 10:00:28 UTC (rev 19050)
+++ projects/haf/trunk/hildon-welcome/debian/changelog	2009-08-05 11:54:00 UTC (rev 19051)
@@ -1,3 +1,9 @@
+hildon-welcome (0.22-1) unstable; urgency=low
+
+  * Touch /tmp/hildon-welcome-is-finished upon exiting
+
+ -- Gabriel Schulhof <gabriel.schulhof at nokia.com>  Wed,  5 Aug 2009 14:41:39 +0300
+
 hildon-welcome (0.21-1) unstable; urgency=low
 
   * Yank the fork(2)ing code back out, since '&' now seems to work

Modified: projects/haf/trunk/hildon-welcome/src/main.c
===================================================================
--- projects/haf/trunk/hildon-welcome/src/main.c	2009-08-05 10:00:28 UTC (rev 19050)
+++ projects/haf/trunk/hildon-welcome/src/main.c	2009-08-05 11:54:00 UTC (rev 19051)
@@ -30,6 +30,7 @@
 #include <X11/extensions/Xcomposite.h>
 #include <gst/gst.h>
 #include <libprofile.h>
+#include <fcntl.h>
 #ifdef HAVE_MCE
 # include <dbus/dbus.h>
 # include <mce/dbus-names.h>
@@ -154,6 +155,18 @@
 }
 
 static void
+touch_the_file_in_tmp()
+{
+  int fd = -1;
+
+  fd = open("/tmp/hildon-welcome-is-finished", O_CREAT);
+  if (fd >= 0)
+    close(fd);
+  else
+    g_warning("touch_the_file_in_tmp: Failed to create the file\n");
+}
+
+static void
 wait_for_eos(GstElement *pipeline, Display *dpy, int duration, TimeoutParams *play_to)
 {
   GError *err = NULL;
@@ -170,6 +183,7 @@
         g_debug("wait_for_eos: Ready to play: duration = %d\n", duration);
         if ((duration > 500) && !(play_to->timeout_id))
           post_eos_timeout_add(duration, pipeline, NULL, play_to);
+        touch_the_file_in_tmp();
         break;
 
       case GST_MESSAGE_ERROR:

More information about the maemo-commits mailing list