[prev in list] [next in list] [prev in thread] [next in thread] 

List:       abiword-dev
Subject:    Fwd: close an abiwidget
From:       "Martin Sevior" <msevior () gmail ! com>
Date:       2009-01-01 0:12:06
Message-ID: 6d78b3860812311612pff08969iaff606d2bbd50546 () mail ! gmail ! com
[Download RAW message or body]


---------- Forwarded message ----------
From: Martin Sevior <msevior@gmail.com>
Date: Thu, Jan 1, 2009 at 11:11 AM
Subject: Re: close an abiwidget
To: Daniel Carvalho <idnael@gmail.com>


Hi Daniel,
            You close an abiwidget instance by calling the destoy
method of the GtkWidget class.

So if you have a pointer, abi,

GtkWidget * abi = abi_widget_new();

You close it's instance with

 gtk_widget_destroy(abi);

Just like any other GtkWidget.

I'm sure gtk_widget_destroy is wrapped by PyGtk but I haven't done the
work to locate it.

So to close a specific instance with PyAbiWidget would do something
similar. Can you find  some example code in PyGtk with menu tabs where
things open and close correctly?

Cheers

Martin


On Tue, Dec 30, 2008 at 10:52 PM, Daniel Carvalho <idnael@gmail.com> wrote:
>
> hello
>
> I have multiple abiwidgets inside a gtk.Notebook (a container that has
> multiple tabs, one for each child).
>
>
> I'm having diverse cases os segmentation fault, and I think they are
> related with the way I close an editor...
> I just remove the abiwidget from the notebook using the remove method.
>
> Is there some kind of CLOSE() method in abiwidget?
>
>
> I'm trying to identify better what causes the program... In certain
> cases, if I remove the call to editor.invoke_cmd
> ("com.abisource.abiword.loadbindings.fromURI"... the problem is
> solved, but there are other situations where it occurs.
>
>
> I noticed now that there are also problems when opening several
> editors at the same time even if I never close one of then. But this
> varies from computer to computer
>
> Is it possible to start or compile it in debug mode to have more information?
> daniel
>
>
>
>
> Abrir /home/daniel/comp/Doques2/_copia_documentos/documentos/_ola1.txt
> Teste.py:112: GtkWarning: gdk_drawable_get_colormap: assertion
> `GDK_IS_DRAWABLE (drawable)' failed
>  gtk.main()
> Teste.py:112: GtkWarning: gdk_drawable_get_depth: assertion
> `GDK_IS_DRAWABLE (drawable)' failed
>  gtk.main()
> Teste.py:112: GtkWarning:
> /build/buildd/gtk+2.0-2.14.4/gdk/gdkpixbuf-drawable.c:1247: Source
> drawable has no colormap; either pass in a colormap, or set the
> colormap on the drawable with gdk_drawable_set_colormap()
>  gtk.main()
> Teste.py:112: GtkWarning: gdk_draw_line: assertion `GDK_IS_DRAWABLE
> (drawable)' failed
>  gtk.main()
> Abrir /home/daniel/comp/Doques2/_copia_documentos/documentos/_ola2.txt
> Teste.py:112: GtkWarning: gdk_pixbuf_get_from_drawable: assertion
> `gdk_window_is_viewable (src)' failed
>  gtk.main()
> Teste.py:112: GtkWarning:
> /build/buildd/gtk+2.0-2.14.4/gdk/gdkpixbuf-drawable.c:1255: Depth of
> the source drawable is 0 where as the visual depth of the colormap
> passed is 24
>  gtk.main()
> The program 'Teste.py' received an X Window System error.
> This probably reflects a bug in the program.
> The error was 'BadMatch (invalid parameter attributes)'.
>  (Details: serial 8261 error_code 8 request_code 66 minor_code 0)
>  (Note to programmers: normally, X errors are reported asynchronously;
>   that is, you will receive the error a while after causing it.
>   To debug your program, run it with the --sync command line
>   option to change this behavior. You can then get a meaningful
>   backtrace from your debugger if you break on the gdk_x_error() function.)
>
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic