gtk.FileChooserButton crashes on Windows....
This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
gtk.FileChooserButton crashes on Windows.... | Ragnar Brynjúlfsson | 30 Nov 00:15 |
gtk.FileChooserButton crashes on Windows.... | Ragnar Brynjúlfsson | 25 Dec 21:54 |
gtk.FileChooserButton crashes on Windows....
Hi,
I don't know if I'm doing this right, but when I run the following code in the Python Fu Console in Gimp 2.8.8 on Windows, and try to choose anything from the dropdown menu, I get an error saying "pythonw.exe has stopped working", and the Window and Python Console crash.
import gtk
window = gtk.Window()
dialog = gtk.FileChooserDialog( "Test", None,
gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, (gtk.STOCK_CANCEL,
gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK))
button = gtk.FileChooserButton(dialog)
window.add(button)
window.show_all()
When I run the gtk.FileChooserDialog, I get the following warnings:
C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\python-console.py:1: Warning:
Attempt to add property GtkSettings::gtk-can-change-accels after class was
initialised
#!/usr/bin/env python
C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\python-console.py:1: Warning:
Attempt to add property GtkSettings::gtk-menu-popup-delay after class was
initialised
#!/usr/bin/env python
C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\python-console.py:1: Warning:
Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was
initialised
#!/usr/bin/env python
I mainly use Linux, and when I tried the exact same code there in Gimp 2.8.8, I don't get any warnings, and it actually works like it's supposed to. The difference is that my home folder shows up as a default selection, while on windows it just says (None), though the drop down menu is populated by a few default locations (my home folder, Destkop, C:, etc.).
Am I doing something wrong, or is this possibly a bug?
Cheers,
Ragnar
gtk.FileChooserButton crashes on Windows....
Anyone have any suggestions for this?
I've tried to figure it out, but with no luck. The Python version in GImp 2.8.10 on Windows that i have is 2.7.5, while the one on Linux is 2.7.3. The bug only shows up in Gimp under Windows (tried XP and 8.1), in Gimp 2.8.8 and Gimp 2.8.10, but not in Gimp 2.8.4.
I tried using gtk.settings, to pre-set the settings it complains about, but that did nothing. Also, I don't know if these warning have anything to do with it crashing. If I run the gtk.FileChooserDialog command twice in the Python console, it only complains the first time I run it.
Then I did find a workaround, which is to click the FileChooserButton, and then use the arrow keys and return, to select from the menu...which actually works. So it's only when you click something in the pop-up menu, that it crashes.
This breaks my Gimp Book ( http://ragnarb.com/toolbox/gimp-book/ ) plug-in when run on Windows, so I'm hoping to find a solution for this. Either using FileChooserButton, or replacing it with a simple button that just opens the FileChooserDialog on Windows if possible.
I'm hoping to find a solution to this, as this breaks my Gimp Book plug-in for Windows users.
Any ideas?
Ragnar
On Sat, Nov 30, 2013 at 1:15 AM, Ragnar Brynjlfsson wrote:
Hi,
I don't know if I'm doing this right, but when I run the following code in the Python Fu Console in Gimp 2.8.8 on Windows, and try to choose anything from the dropdown menu, I get an error saying "pythonw.exe has stopped working", and the Window and Python Console crash.
import gtk window = gtk.Window()
dialog = gtk.FileChooserDialog( "Test", None, gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER, (gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL, gtk.STOCK_OPEN, gtk.RESPONSE_OK)) button = gtk.FileChooserButton(dialog) window.add(button)
window.show_all()When I run the gtk.FileChooserDialog, I get the following warnings:
C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\python-console.py:1: Warning: Attempt to add property GtkSettings::gtk-can-change-accels after class was initialised
#!/usr/bin/env python
C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\python-console.py:1: Warning: Attempt to add property GtkSettings::gtk-menu-popup-delay after class was initialised
#!/usr/bin/env python
C:\Program Files\GIMP 2\lib\gimp\2.0\plug-ins\python-console.py:1: Warning: Attempt to add property GtkSettings::gtk-menu-popdown-delay after class was initialised
#!/usr/bin/env pythonI mainly use Linux, and when I tried the exact same code there in Gimp 2.8.8, I don't get any warnings, and it actually works like it's supposed to. The difference is that my home folder shows up as a default selection, while on windows it just says (None), though the drop down menu is populated by a few default locations (my home folder, Destkop, C:, etc.).
Am I doing something wrong, or is this possibly a bug?
Cheers,
Ragnar