gnome-python-desktop r531 - trunk/evince
- From: gjc svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-python-desktop r531 - trunk/evince
- Date: Wed, 28 Jan 2009 16:20:34 +0000 (UTC)
Author: gjc
Date: Wed Jan 28 16:20:34 2009
New Revision: 531
URL: http://svn.gnome.org/viewvc/gnome-python-desktop?rev=531&view=rev
Log:
(patch by Tomeu Vizoso) Initialize evince in module init, instead of wrapping an init function. Closes #568287.
Modified:
trunk/evince/evince.override
trunk/evince/evincemodule.c
Modified: trunk/evince/evince.override
==============================================================================
--- trunk/evince/evince.override (original)
+++ trunk/evince/evince.override Wed Jan 28 16:20:34 2009
@@ -75,20 +75,5 @@
return 0;
}
%%
-override evince_embed_init noargs
-static PyObject *
-_wrap_evince_embed_init(PyObject *self)
-{
- /* Init glib threads asap */
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
- pyg_enable_threads ();
-
- ev_file_helpers_init();
- ev_backends_manager_init();
-
- Py_INCREF(Py_None);
- return Py_None;
-}
-
+ignore
+ evince_embed_init
Modified: trunk/evince/evincemodule.c
==============================================================================
--- trunk/evince/evincemodule.c (original)
+++ trunk/evince/evincemodule.c Wed Jan 28 16:20:34 2009
@@ -5,7 +5,10 @@
/* include this first, before NO_IMPORT_PYGOBJECT is defined */
#include <pygobject.h>
+#include <evince-document.h>
+
void pyevince_register_classes (PyObject *d);
+void pyevince_add_constants(PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pyevince_functions[];
@@ -16,6 +19,15 @@
init_pygobject ();
+ /* Init glib threads asap */
+ if (!g_thread_supported ())
+ g_thread_init (NULL);
+
+ pyg_enable_threads ();
+
+ ev_file_helpers_init();
+ ev_backends_manager_init();
+
m = Py_InitModule ("evince", pyevince_functions);
d = PyModule_GetDict (m);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]