totem r5845 - in trunk: . browser-plugin lib src



Author: hadess
Date: Wed Dec 10 21:56:08 2008
New Revision: 5845
URL: http://svn.gnome.org/viewvc/totem?rev=5845&view=rev

Log:
2008-12-10  Bastien Nocera  <hadess hadess net>

	* browser-plugin/totemPlugin.cpp:
	* lib/totem-scrsaver.c (screensaver_disable_x11):
	* src/totem-statusbar.c (totem_statusbar_push):
	Use g_timeout_add_seconds instead of g_timeout_add for
	a couple of non time critical places



Modified:
   trunk/ChangeLog
   trunk/browser-plugin/totemPlugin.cpp
   trunk/lib/totem-scrsaver.c
   trunk/src/totem-statusbar.c

Modified: trunk/browser-plugin/totemPlugin.cpp
==============================================================================
--- trunk/browser-plugin/totemPlugin.cpp	(original)
+++ trunk/browser-plugin/totemPlugin.cpp	Wed Dec 10 21:56:08 2008
@@ -570,10 +570,10 @@
 	mViewerReady = false;
 
 	/* Don't wait forever! */
-	const guint kViewerTimeout = 30 * 1000; /* ms */
-        mTimerID = g_timeout_add (kViewerTimeout,
-                                  (GSourceFunc) ViewerForkTimeoutCallback,
-                                  reinterpret_cast<void*>(this));
+	const guint kViewerTimeout = 30; /* seconds */
+        mTimerID = g_timeout_add_seconds (kViewerTimeout,
+					  (GSourceFunc) ViewerForkTimeoutCallback,
+					  reinterpret_cast<void*>(this));
 
 	/* FIXME: once gecko is multihead-safe, this should use gdk_spawn_on_screen_with_pipes */
 	GError *error = NULL;

Modified: trunk/lib/totem-scrsaver.c
==============================================================================
--- trunk/lib/totem-scrsaver.c	(original)
+++ trunk/lib/totem-scrsaver.c	Wed Dec 10 21:56:08 2008
@@ -296,13 +296,12 @@
 				&scr->priv->allow_exposures);
 		XUnlockDisplay (GDK_DISPLAY());
 
-		if (scr->priv->timeout != 0)
-		{
-			g_timeout_add (scr->priv->timeout / 2 * 1000,
-					(GSourceFunc) fake_event, scr);
+		if (scr->priv->timeout != 0) {
+			g_timeout_add_seconds (scr->priv->timeout / 2,
+					       (GSourceFunc) fake_event, scr);
 		} else {
-			g_timeout_add (XSCREENSAVER_MIN_TIMEOUT / 2 * 1000,
-					(GSourceFunc) fake_event, scr);
+			g_timeout_add_seconds (XSCREENSAVER_MIN_TIMEOUT / 2,
+					       (GSourceFunc) fake_event, scr);
 		}
 
 		return;

Modified: trunk/src/totem-statusbar.c
==============================================================================
--- trunk/src/totem-statusbar.c	(original)
+++ trunk/src/totem-statusbar.c	Wed Dec 10 21:56:08 2008
@@ -221,10 +221,9 @@
 
   if (statusbar->timeout == 0)
   {
-    statusbar->timeout = g_timeout_add (1000,
-                    (GSourceFunc) totem_statusbar_timeout_pop, statusbar);
+    statusbar->timeout = g_timeout_add_seconds (1, (GSourceFunc) totem_statusbar_timeout_pop, statusbar);
   }
-  
+
   if (need_update)
     totem_statusbar_sync_description (statusbar);
 }



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