totem r5009 - in trunk: . src



Author: hadess
Date: Tue Jan  8 11:18:00 2008
New Revision: 5009
URL: http://svn.gnome.org/viewvc/totem?rev=5009&view=rev

Log:
2008-01-08  Bastien Nocera  <hadess hadess net>

	* src/totem.c: (totem_action_wait_force_exit), (totem_action_exit):
	Forcefully exit when we can't finish the shutdown in 10 seconds.
	From patch by Patrick Hulin <patrick hulin gmail com>
	(Closes: #355512)



Modified:
   trunk/ChangeLog
   trunk/src/totem.c

Modified: trunk/src/totem.c
==============================================================================
--- trunk/src/totem.c	(original)
+++ trunk/src/totem.c	Tue Jan  8 11:18:00 2008
@@ -192,12 +192,23 @@
 	g_free (contents);
 }
 
+static void
+totem_action_wait_force_exit (gpointer user_data)
+{
+	g_usleep (10 * G_USEC_PER_SEC);
+	exit (1);
+}
+
 void
 totem_action_exit (Totem *totem)
 {
 	GdkDisplay *display = NULL;
 	char *page_id;
 
+	/* Exit forcefully if we can't do the shutdown in 10 seconds */
+	g_thread_create ((GThreadFunc) totem_action_wait_force_exit,
+			 NULL, FALSE, NULL);
+
 	if (gtk_main_level () > 0)
 		gtk_main_quit ();
 



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