totem r5806 - in trunk: . src/plugins



Author: pwithnall
Date: Sun Nov 23 22:42:20 2008
New Revision: 5806
URL: http://svn.gnome.org/viewvc/totem?rev=5806&view=rev

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

	* src/plugins/totem-plugins-engine.c (totem_plugins_engine_load),
	(load_plugin_module):
	* src/plugins/totem-python-module.c (totem_python_module_load),
	(totem_python_module_unload), (totem_python_module_new_object),
	(totem_python_module_init), (totem_python_module_finalize):
	* src/plugins/totem-python-plugin.c (totem_python_object_init),
	(totem_python_object_finalize), (totem_python_object_get_type):
	Standardise debug output from the plugin system to use the D() macro.



Modified:
   trunk/ChangeLog
   trunk/src/plugins/totem-plugins-engine.c
   trunk/src/plugins/totem-python-module.c
   trunk/src/plugins/totem-python-plugin.c

Modified: trunk/src/plugins/totem-plugins-engine.c
==============================================================================
--- trunk/src/plugins/totem-plugins-engine.c	(original)
+++ trunk/src/plugins/totem-plugins-engine.c	Sun Nov 23 22:42:20 2008
@@ -160,8 +160,7 @@
 	if (str && strcmp(str, "python") == 0) {
 		info->lang = TOTEM_PLUGIN_LOADER_PY;
 #ifndef ENABLE_PYTHON
-		g_debug ("Cannot load Python extension '%s', Totem was not "
-					"compiled with Python support", file);
+		g_warning ("Cannot load Python extension '%s', Totem was not compiled with Python support", file);
 		g_free (str);
 		goto error;
 #endif
@@ -505,7 +504,7 @@
 #ifdef ENABLE_PYTHON
 			info->module = G_TYPE_MODULE (totem_python_module_new (info->file, info->location));
 #else
-			g_debug ("Cannot load plugin %s, Python plugin support is disabled", info->location);
+			g_warning ("Cannot load plugin %s, Python plugin support is disabled", info->location);
 #endif
 			break;
 	}

Modified: trunk/src/plugins/totem-python-module.c
==============================================================================
--- trunk/src/plugins/totem-python-module.c	(original)
+++ trunk/src/plugins/totem-python-module.c	Sun Nov 23 22:42:20 2008
@@ -36,6 +36,7 @@
 
 #include <gmodule.h>
 
+#include "debug.h"
 #include "totem-plugin.h"
 #include "totem-python-module.h"
 #include "totem-python-plugin.h"
@@ -323,7 +324,7 @@
 		}
 	}
 
-	g_debug ("Failed to find any totem.Plugin-derived classes in Python plugin");
+	g_warning ("Failed to find any totem.Plugin-derived classes in Python plugin");
 
 done:
 
@@ -335,7 +336,7 @@
 totem_python_module_unload (GTypeModule *module)
 {
 	TotemPythonModulePrivate *priv = TOTEM_PYTHON_MODULE_GET_PRIVATE (module);
-	g_debug ("Unloading Python module");
+	D("Unloading Python module");
 
 	priv->type = 0;
 }
@@ -349,7 +350,7 @@
 	if (priv->type == 0)
 		return NULL;
 
-	g_debug ("Creating object of type %s", g_type_name (priv->type));
+	D("Creating object of type %s", g_type_name (priv->type));
 	object = (TotemPythonObject*) (g_object_new (priv->type,
 						  "name", priv->module,
 						  NULL));
@@ -374,7 +375,7 @@
 static void
 totem_python_module_init (TotemPythonModule *module)
 {
-	g_debug ("Init of Python module");
+	D("Init of Python module");
 }
 
 static void
@@ -383,7 +384,7 @@
 	TotemPythonModulePrivate *priv = TOTEM_PYTHON_MODULE_GET_PRIVATE (object);
 
 	if (priv && priv->type) {
-		g_debug ("Finalizing Python module %s", g_type_name (priv->type));
+		D("Finalizing Python module %s", g_type_name (priv->type));
 
 		g_free (priv->module);
 		g_free (priv->path);

Modified: trunk/src/plugins/totem-python-plugin.c
==============================================================================
--- trunk/src/plugins/totem-python-plugin.c	(original)
+++ trunk/src/plugins/totem-python-plugin.c	Sun Nov 23 22:42:20 2008
@@ -28,6 +28,7 @@
 
 #include "totem-python-plugin.h"
 #include "totem-plugin.h"
+#include "debug.h"
 
 #include <pygobject.h>
 #include <string.h>
@@ -197,7 +198,7 @@
 
 	state = pyg_gil_state_ensure();
 
-	g_debug ("Creating Python plugin instance");
+	D("Creating Python plugin instance");
 
 	class = (TotemPythonObjectClass*) (((GTypeInstance*) object)->g_class);
 
@@ -211,7 +212,7 @@
 static void
 totem_python_object_finalize (GObject *object)
 {
-	g_debug ("Finalizing Python plugin instance");
+	D("Finalizing Python plugin instance");
 
 	if (((TotemPythonObject *) object)->instance) {
 		Py_DECREF (((TotemPythonObject *) object)->instance);
@@ -267,7 +268,7 @@
 	type_name = g_strdup_printf ("%s+TotemPythonPlugin",
 				     PyString_AsString (PyObject_GetAttrString (type, "__name__")));
 
-	g_debug ("Registering Python plugin instance: %s", type_name);
+	D("Registering Python plugin instance: %s", type_name);
 	gtype = g_type_module_register_type (module,
 					     TOTEM_TYPE_PLUGIN,
 					     type_name,



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