Image or File Option Window Crash
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Screenlets |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
I have Screenlets v0.1.5 on Debian 6. When changing an image/file option with a screenlet's properties window, when the file selection window pops up and if no file is given and you press Enter (NOT pressing the Open button) in the empty text field, the file selection window crashes with the following error:
Traceback (most recent call last):
File "/usr/local/
self.
TypeError: Gtk.Entry.
This error is avoided by pressing the Open button with an empty text field, however.
The Properties window and the screenlet are still responsive, but the file selection window won't close until the screenlet closes. It's a minor bug really, and I fixed it by replacing line 159 in screenlets/
self._entry.
With the following 3 lines:
fn = dlg.get_filename()
if not fn: fn = ""
self._entry.
That fixed the problem, and it clears the string if None is given. An alternative would also be to only set the string if the filename is not None:
fn = dlg.get_filename()
if (fn != None): self._entry.
A minor bug, but easy to fix.
Related branches
Changed in screenlets: | |
status: | New → Fix Committed |