[nautilus-python] Bug #575813. Remove vestigial gnomevfs parts



commit 592653bdc0fe6ebe12be7bb56e99c0d8c692c573
Author: Daniel Holbach <dholbach ubuntu com>
Date:   Mon Jan 11 16:42:09 2010 -0500

    Bug #575813. Remove vestigial gnomevfs parts

 examples/documentation.py |    3 ---
 src/nautilus-python.c     |   27 +--------------------------
 src/nautilus.override     |   16 ----------------
 src/nautilusmodule.c      |    6 ++----
 4 files changed, 3 insertions(+), 49 deletions(-)
---
diff --git a/examples/documentation.py b/examples/documentation.py
index 79ce171..8c74d42 100644
--- a/examples/documentation.py
+++ b/examples/documentation.py
@@ -116,9 +116,6 @@ class FileInfo:
     def is_directory(self):
         pass
 
-    def get_vfs_file_info(self):
-        pass
-    
     def add_emblem(self, emblem):
         pass
     
diff --git a/src/nautilus-python.c b/src/nautilus-python.c
index b5d7fe2..9b07681 100644
--- a/src/nautilus-python.c
+++ b/src/nautilus-python.c
@@ -27,7 +27,6 @@
 
 #include "nautilus-python.h"
 #include "nautilus-python-object.h"
-#include "pygnomevfs.h"
 
 #include <libnautilus-extension/nautilus-extension-types.h>
 
@@ -87,26 +86,6 @@ static inline gboolean np_init_pygtk(void)
 	return TRUE;
 }
 
-static inline gboolean np_init_pygnomevfs(void)
-{
-    PyObject *module = PyImport_ImportModule("gnomevfs");
-    if (module != NULL) {
-        PyObject *mdict = PyModule_GetDict(module);
-        PyObject *cobject = PyDict_GetItemString(mdict, "_PyGnomeVFS_API");
-        if (PyCObject_Check(cobject))
-            _PyGnomeVFS_API = (struct _PyGnomeVFS_Functions *)PyCObject_AsVoidPtr(cobject);
-        else {
-	         g_warning("could not find _PyGnomeVFS_API object in the gnomevfs module");
-			 return FALSE;
-        }
-    } else {
-        PyErr_Print();
-        g_warning("could not import gnomevfs");
-		return FALSE;
-    }
-	return TRUE;
-}
-
 
 static void
 nautilus_python_load_file(GTypeModule *type_module, const gchar *filename)
@@ -258,11 +237,7 @@ nautilus_python_init_python (void)
 		g_warning("pygtk initialization failed");
 		return FALSE;
 	}
-	/* import gnomevfs */
-	debug("init_gnomevfs");
-	if (!np_init_pygnomevfs())
-		return FALSE;
-
+	
 	/* gobject.threads_init() */
     debug("pyg_enable_threads");
 	setenv("PYGTK_USE_GIL_STATE_API", "", 0);
diff --git a/src/nautilus.override b/src/nautilus.override
index 667b129..ddfd138 100644
--- a/src/nautilus.override
+++ b/src/nautilus.override
@@ -23,8 +23,6 @@ headers
 #define NO_IMPORT_PYGOBJECT
 #include "pygobject.h"
 
-#include "pygnomevfs.h"
-
 #include <libnautilus-extension/nautilus-file-info.h>
 #include <libnautilus-extension/nautilus-info-provider.h>
 #include <libnautilus-extension/nautilus-column-provider.h>
@@ -42,17 +40,3 @@ import gtk.Window as PyGtkWindow_Type
 ignore-glob
   *_get_type
 %%
-override nautilus_file_info_get_vfs_file_info noargs
-static PyObject *
-_wrap_nautilus_file_info_get_vfs_file_info(PyGObject *self)
-{
-    GnomeVFSFileInfo *ret;
-    
-    ret = nautilus_file_info_get_vfs_file_info(NAUTILUS_FILE_INFO(self->obj));
-    if (ret) {
-        return pygnome_vfs_file_info_new(ret);
-    }
-    
-    Py_INCREF(Py_None);
-    return Py_None;
-}
diff --git a/src/nautilusmodule.c b/src/nautilusmodule.c
index 4342943..628e907 100644
--- a/src/nautilusmodule.c
+++ b/src/nautilusmodule.c
@@ -27,7 +27,6 @@
 /* include this first, before NO_IMPORT_PYGOBJECT is defined */
 #include <pygobject.h>
 #include <pygtk/pygtk.h>
-#include "pygnomevfs.h"
 
 void pynautilus_register_classes (PyObject *d);
 void pynautilus_add_constants(PyObject *module, const gchar *strip_prefix);
@@ -40,13 +39,12 @@ initnautilus(void)
     PyObject *m, *d;
     
     if (!g_getenv("INSIDE_NAUTILUS_PYTHON")) {
-	Py_FatalError("This module can only be used from nautilus");
-	return;
+	    Py_FatalError("This module can only be used from nautilus");
+	    return;
     }
 	
     init_pygobject ();
     init_pygtk ();
-    init_pygnomevfs();
 
     m = Py_InitModule ("nautilus", pynautilus_functions);
     d = PyModule_GetDict (m);



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