From 2eee055dd76bfe30aea7758025cdd499aea95b4d Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 28 Jan 2007 19:56:01 +0000 Subject: Fix the wrapping of the singleton Ephy[Embed]Shell as "epiphany.Shell()". 2007-01-28 Christian Persch * src/epiphany.defs: * src/epiphany.override: Fix the wrapping of the singleton Ephy[Embed]Shell as "epiphany.Shell()". Bug #351705. svn path=/trunk/; revision=6854 --- src/epiphany.defs | 31 ++++++++++++++++--------------- src/epiphany.override | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 15 deletions(-) (limited to 'src') diff --git a/src/epiphany.defs b/src/epiphany.defs index 8d7511948..3f224d122 100644 --- a/src/epiphany.defs +++ b/src/epiphany.defs @@ -3123,6 +3123,7 @@ ;; From ../../src/ephy-shell.h + (define-function ephy_new_tab_flags_get_type (c-name "ephy_new_tab_flags_get_type") (return-type "GType") @@ -3138,11 +3139,11 @@ (return-type "EphyShell*") ) -(define-function ephy_shell_new - (c-name "ephy_shell_new") - (is-constructor-of "EphyShell") - (return-type "EphyShell*") -) +;(define-function ephy_shell_new +; (c-name "ephy_shell_new") +; (is-constructor-of "EphyShell") +; (return-type "EphyShell*") +;) (define-method new_tab (of-object "EphyShell") @@ -3237,11 +3238,11 @@ (return-type "GType") ) -(define-function ephy_statusbar_new - (c-name "ephy_statusbar_new") - (is-constructor-of "EphyStatusbar") - (return-type "GtkWidget*") -) +;(define-function ephy_statusbar_new +; (c-name "ephy_statusbar_new") +; (is-constructor-of "EphyStatusbar") +; (return-type "GtkWidget*") +;) (define-method get_tooltips (of-object "EphyStatusbar") @@ -3311,11 +3312,11 @@ (return-type "GType") ) -(define-function ephy_tab_new - (c-name "ephy_tab_new") - (is-constructor-of "EphyTab") - (return-type "EphyTab*") -) +;(define-function ephy_tab_new +; (c-name "ephy_tab_new") +; (is-constructor-of "EphyTab") +; (return-type "EphyTab*") +;) (define-method get_embed (of-object "EphyTab") diff --git a/src/epiphany.override b/src/epiphany.override index 1676d4e1a..430aa0a3f 100644 --- a/src/epiphany.override +++ b/src/epiphany.override @@ -199,6 +199,38 @@ ignore ephy_find_toolbar_close ephy_find_toolbar_set_embed %% +override-slot EphyShell.tp_init + +static int +_wrap_ephy_shell_tp_init(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { NULL }; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":epiphany.Shell.__init__", kwlist)) { + return -1; + } + + self->obj = (GObject *) g_object_ref (ephy_shell_get_default()); + pygobject_register_wrapper((PyObject *)self); + return 0; +} +%% +override-slot EphyEmbedShell.tp_init + +static int +_wrap_ephy_embed_shell_tp_init(PyGObject *self, PyObject *args, PyObject *kwargs) +{ + static char *kwlist[] = { NULL }; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":epiphany.EmbedShell.__init__", kwlist)) { + return -1; + } + + self->obj = (GObject *) g_object_ref (ephy_embed_shell_get_default()); + pygobject_register_wrapper((PyObject *)self); + return 0; +} +%% override ephy_tab_get_size noargs static PyObject * _wrap_ephy_tab_get_size(PyGObject *self) -- cgit