[nautilus-python/nautilus-3.0] Don't need to import the gi module



commit cb432c20f2318afc683d7c2f0cb6302217d1490c
Author: Adam Plumb <adamplumb gmail com>
Date:   Wed Mar 23 15:05:51 2011 -0400

    Don't need to import the gi module

 src/nautilus-python.c |   24 ------------------------
 1 files changed, 0 insertions(+), 24 deletions(-)
---
diff --git a/src/nautilus-python.c b/src/nautilus-python.c
index 6758d13..0e00285 100644
--- a/src/nautilus-python.c
+++ b/src/nautilus-python.c
@@ -79,22 +79,6 @@ np_init_pygobject(void)
 	return TRUE;
 }
 
-static inline gboolean
-np_init_pygi(void)
-{
-	PyObject *gi;
-	
-	gi = PyImport_ImportModule ("gi");
-	if (gi == NULL)
-	{
-        PyErr_Print();
-        g_warning("could not import gi");
-        return FALSE;
-	}
-	
-	return TRUE;
-}
-
 static void
 nautilus_python_load_file(GTypeModule *type_module, 
 						  const gchar *filename)
@@ -237,14 +221,6 @@ nautilus_python_init_python (void)
 		return FALSE;
 	}
 	
-	/* import gi */
-  	debug("init_pygi");
-	if (!np_init_pygi())
-	{
-		g_warning("pygi initialization failed");
-		return FALSE;
-	}
-	
 	/* import nautilus */
 	g_setenv("INSIDE_NAUTILUS_PYTHON", "", FALSE);
 	debug("import nautilus");



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