[pygtk] gtkwarnig : how to avoid it ?

euro_ii at libero.it euro_ii at libero.it
Thu Sep 17 19:39:08 WST 2009


Hi,
I'm using the following code to create a standard error message dialog.
but when it runs, it gives me this warning:

GtkWarning: gdk_x11_atom_to_xatom_for_display: assertion `atom != GDK_NONE' failed
_dialog.run()

how can i solve this probelms?

thanks 
Matteo

code:

def _error_dialog(gtkimage, errmsg):
    """
        Show an error dialog
    """
    _window = gtkimage.getWindow()
    _dialog = gtk.MessageDialog( _window,
                                 gtk.DIALOG_DESTROY_WITH_PARENT,
                                 gtk.MESSAGE_ERROR,
                                 gtk.BUTTONS_CLOSE,
                                 errmsg)
    _dialog.set_title("PythonCad Error:")
    _dialog.run()
    _dialog.destroy()




More information about the pygtk mailing list