totem r5858 - in trunk: . browser-plugin src src/plugins src/plugins/gromit



Author: pwithnall
Date: Fri Dec 12 16:33:45 2008
New Revision: 5858
URL: http://svn.gnome.org/viewvc/totem?rev=5858&view=rev

Log:
2008-12-12  Philip Withnall  <philip tecnocode co uk>

	* browser-plugin/test-glow-button.c (main):
	* src/plugins/gromit/totem-gromit.c (totem_gromit_clear):
	* src/plugins/totem-plugins-engine.c 
(totem_plugins_engine_init),
	(totem_plugins_engine_shutdown):
	* src/plugins/totem-python-module.c (totem_python_shutdown):
	* src/test-properties-page.c (main): Use g_timeout_add_seconds
	instead of g_timeout_add where possible to allow for event 
grouping.
	(Closes: #564073)



Modified:
   trunk/ChangeLog
   trunk/browser-plugin/test-glow-button.c
   trunk/src/plugins/gromit/totem-gromit.c
   trunk/src/plugins/totem-plugins-engine.c
   trunk/src/plugins/totem-python-module.c
   trunk/src/test-properties-page.c

Modified: trunk/browser-plugin/test-glow-button.c
==============================================================================
--- trunk/browser-plugin/test-glow-button.c	(original)
+++ trunk/browser-plugin/test-glow-button.c	Fri Dec 12 16:33:45 2008
@@ -44,8 +44,8 @@
 
 	totem_glow_button_set_glow (TOTEM_GLOW_BUTTON (button), TRUE);
 
-//	g_timeout_add (1000, idle_cb, button);
-	g_timeout_add (5000, idle_un_cb, button);
+//	g_timeout_add_seconds (1, idle_cb, button);
+	g_timeout_add_seconds (5, idle_un_cb, button);
 
 	gtk_widget_show_all (window);
 

Modified: trunk/src/plugins/gromit/totem-gromit.c
==============================================================================
--- trunk/src/plugins/gromit/totem-gromit.c	(original)
+++ trunk/src/plugins/gromit/totem-gromit.c	Fri Dec 12 16:33:45 2008
@@ -69,7 +69,7 @@
 	TotemPluginClass parent_class;
 } TotemGromitPluginClass;
 
-#define INTERVAL 10000
+#define INTERVAL 10 /* seconds */
 
 static const char *start_cmd[] =	{ NULL, "-a", "-k", "none", NULL };
 static const char *toggle_cmd[] =	{ NULL, "-t", NULL };
@@ -238,7 +238,7 @@
 
 	launch (visibility_cmd);
 	launch (clear_cmd);
-	plugin->id = g_timeout_add (INTERVAL, totem_gromit_timeout_cb, plugin);
+	plugin->id = g_timeout_add_seconds (INTERVAL, totem_gromit_timeout_cb, plugin);
 }
 
 static gboolean

Modified: trunk/src/plugins/totem-plugins-engine.c
==============================================================================
--- trunk/src/plugins/totem-plugins-engine.c	(original)
+++ trunk/src/plugins/totem-plugins-engine.c	Fri Dec 12 16:33:45 2008
@@ -375,7 +375,13 @@
 
 	totem_plugins_engine_load_all ();
 
-	garbage_collect_id = g_timeout_add_full (G_PRIORITY_LOW, 20000, garbage_collect_cb, NULL, NULL);
+#if 0
+#ifdef ENABLE_PYTHON
+	/* Commented out because it's a no-op. A further section is commented out below, and more's commented out
+	 * in totem-python-module.c. */
+	garbage_collect_id = g_timeout_add_seconds_full (G_PRIORITY_LOW, 20, garbage_collect_cb, NULL, NULL);
+#endif
+#endif
 
 	return TRUE;
 }
@@ -432,9 +438,13 @@
 		g_object_unref (totem_plugins_object);
 	totem_plugins_object = NULL;
 
+#if 0
+#ifdef ENABLE_PYTHON
 	if (garbage_collect_id > 0)
 		g_source_remove (garbage_collect_id);
 	totem_plugins_engine_garbage_collect ();
+#endif
+#endif
 
 	if (client != NULL)
 		g_object_unref (client);

Modified: trunk/src/plugins/totem-python-module.c
==============================================================================
--- trunk/src/plugins/totem-python-module.c	(original)
+++ trunk/src/plugins/totem-python-module.c	Fri Dec 12 16:33:45 2008
@@ -541,7 +541,7 @@
 			/* loop */;
 
 		/* This helps to force Python to give up its shell reference */
-		g_timeout_add (1000, finalise_collect_cb, NULL);
+		g_idle_add (finalise_collect_cb, NULL);
 
 		/* Disable for now, due to bug 334188
 		Py_Finalize ();*/

Modified: trunk/src/test-properties-page.c
==============================================================================
--- trunk/src/test-properties-page.c	(original)
+++ trunk/src/test-properties-page.c	Fri Dec 12 16:33:45 2008
@@ -92,7 +92,7 @@
 #else
 		create_props (argv[1]);
 #endif
-		g_timeout_add (4000, main_loop_exit, NULL);
+		g_timeout_add_seconds (4, main_loop_exit, NULL);
 		gtk_main ();
 #if 1
 		destroy_props ();



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