[nautilus-python/nautilus-3.0] Revert the change where I converted the update_complete closure to pygboxed
- From: Adam Plumb <adamplumb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-python/nautilus-3.0] Revert the change where I converted the update_complete closure to pygboxed
- Date: Thu, 17 Mar 2011 13:11:15 +0000 (UTC)
commit 557266ec9f73976eb8bc1de0f6c61dd870bcfd3e
Author: Adam Plumb <adamplumb gmail com>
Date: Thu Mar 17 09:10:39 2011 -0400
Revert the change where I converted the update_complete closure to pygboxed
src/nautilus-python-object.c | 3 +--
src/nautilus-python.c | 19 +------------------
src/nautilus-python.h | 3 ---
3 files changed, 2 insertions(+), 23 deletions(-)
---
diff --git a/src/nautilus-python-object.c b/src/nautilus-python-object.c
index bb99384..83c9823 100644
--- a/src/nautilus-python-object.c
+++ b/src/nautilus-python-object.c
@@ -398,7 +398,6 @@ nautilus_python_object_update_file_info (NautilusInfoProvider *provider,
PyObject *py_ret = NULL;
PyGILState_STATE state = pyg_gil_state_ensure();
PyObject *py_handle = nautilus_python_boxed_new (_PyNautilusOperationHandle_Type, *handle, FALSE);
- PyObject *py_update_complete = nautilus_python_boxed_new (_PyGClosure_Type, update_complete, FALSE);
debug_enter();
@@ -410,7 +409,7 @@ nautilus_python_object_update_file_info (NautilusInfoProvider *provider,
METHOD_PREFIX "update_file_info_full", "(NNNN)",
pygobject_new((GObject*)provider),
py_handle,
- py_update_complete,
+ pyg_boxed_new(G_TYPE_CLOSURE, update_complete, TRUE, TRUE),
pygobject_new((GObject*)file));
}
else if (PyObject_HasAttrString(object->instance, "update_file_info"))
diff --git a/src/nautilus-python.c b/src/nautilus-python.c
index 4efc5b5..29a72d1 100644
--- a/src/nautilus-python.c
+++ b/src/nautilus-python.c
@@ -74,7 +74,7 @@ np_init_pygobject(void)
static inline gboolean
np_init_pygi(void)
{
- PyObject *gi, *gobject;
+ PyObject *gi;
gi = PyImport_ImportModule ("gi");
if (gi == NULL)
@@ -83,23 +83,6 @@ np_init_pygi(void)
g_warning("could not import gi");
return FALSE;
}
-
- gobject = PyImport_ImportModule("gi.repository.GObject");
- if (gobject)
- {
- _PyGClosure_Type = (PyTypeObject *) PyObject_GetAttrString(gobject, "Closure");
- if (_PyGClosure_Type == NULL)
- {
- PyErr_Print();
- return FALSE;
- }
- }
- else
- {
- PyErr_Print();
- return FALSE;
- }
-
return TRUE;
}
diff --git a/src/nautilus-python.h b/src/nautilus-python.h
index ee56f4e..f15244f 100644
--- a/src/nautilus-python.h
+++ b/src/nautilus-python.h
@@ -48,9 +48,6 @@ extern NautilusPythonDebug nautilus_python_debug;
PyTypeObject *_PyGtkWidget_Type;
#define PyGtkWidget_Type (*_PyGtkWidget_Type)
-PyTypeObject *_PyGClosure_Type;
-#define PyGClosure_Type (*_PyGClosure_Type)
-
PyTypeObject *_PyNautilusColumn_Type;
#define PyNautilusColumn_Type (*_PyNautilusColumn_Type)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]