Re: problem with FileChooserDialog in latest git



On Tue, Dec 28, 2010 at 12:11 PM, Robert Park <rbpark exolucere ca> wrote:
>>>> dialog = Gtk.FileChooserDialog("Open", None, Gtk.FileChooserAction.OPEN, buttons=(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.ACCEPT))

Now I am encountering a bizarre problem. This exact line of code above
that worked perfectly in the interactive shell, I have cut & pasted
into my application, where it gives the original error message:

$ jhbuild run ./gottengeography.py

(<unknown>:2794): Clutter-CRITICAL **: Unable to make the stage window
0x1c00008 the current GLX drawable
Traceback (most recent call last):
  File "./gottengeography.py", line 610, in add_files_dialog
    chooser = Gtk.FileChooserDialog("Open", None,
Gtk.FileChooserAction.OPEN, buttons=(Gtk.STOCK_CANCEL,
Gtk.ResponseType.CANCEL, Gtk.STOCK_OPEN, Gtk.ResponseType.ACCEPT))
  File "/opt/gnome/lib64/python2.7/site-packages/gi/overrides/Gtk.py",
line 456, in __init__
    buttons=buttons)
  File "/opt/gnome/lib64/python2.7/site-packages/gi/overrides/Gtk.py",
line 371, in __init__
    self.add_buttons(*buttons)
  File "/opt/gnome/lib64/python2.7/site-packages/gi/overrides/Gtk.py",
line 393, in add_buttons
    self.add_button(text, response)
AttributeError: 'FileChooserDialog' object has no attribute 'add_button'


I am starting to suspect that this is caused by libchamplain. You
might remember a while back I was having errors along the lines of
"Gtk 2.0 required but Gtk 3.0 is already loaded" and the fix was to
import champlain before anything else, forcing everything to use 2.0.
So it seems that this is a result of the interactive shell using Gtk3
and my script using Gtk2 in a broken/unsupported way due to
libchamplain.

Groan... any thoughts on what I can do about this?

Thanks.

-- 
http://exolucere.ca


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]