screenlets-dev team mailing list archive
-
screenlets-dev team
-
Mailing list archive
-
Message #00738
[Bug 769795] [NEW] Labels with value None in options rework problematic
Public bug reported:
Some of the existing Screenlets give value None to labels somehow and
this does not work with new code for options. For example FeedReaderPlus
gives following error:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/screenlets/__init__.py", line 2073, in menuitem_callback
self.show_settings_dialog()
File "/usr/lib/pymodules/python2.6/screenlets/__init__.py", line 1526, in show_settings_dialog
se.show_options_for_object(self)
File "/usr/lib/pymodules/python2.6/screenlets/options/base.py", line 408, in show_options_for_object
w = self.generate_widget( option, val )
File "/usr/lib/pymodules/python2.6/screenlets/options/base.py", line 421, in generate_widget
widget = option.generate_widget(value)
File "/usr/lib/pymodules/python2.6/screenlets/options/string_option.py", line 60, in generate_widget
self.set_value(value)
File "/usr/lib/pymodules/python2.6/screenlets/options/string_option.py", line 75, in set_value
self.widget.set_text(self.value)
TypeError: Gtk.Entry.set_text() argument 1 must be string, not None
And if I secure the value to be empty string instead of None, I get the
following:
Traceback (most recent call last):
File "/usr/lib/pymodules/python2.6/screenlets/__init__.py", line 2073, in menuitem_callback
self.show_settings_dialog()
File "/usr/lib/pymodules/python2.6/screenlets/__init__.py", line 1526, in show_settings_dialog
se.show_options_for_object(self)
File "/usr/lib/pymodules/python2.6/screenlets/options/base.py", line 408, in show_options_for_object
w = self.generate_widget( option, val )
File "/usr/lib/pymodules/python2.6/screenlets/options/base.py", line 425, in generate_widget
label.set_label(option.label)
TypeError: Gtk.Label.set_label() argument 1 must be string, not None
And if I secure this as well, I get some strange empty textareas in
options of the FeedReaderPlus.
I have not really dug into that, but it seems that it's a problem of new
options code. But it could be also some strange code from
FeedReaderPlus. Anyway, to ensure compatibility with previous options
code, I think it's smart to fix it on the options side first.
** Affects: screenlets
Importance: Medium
Assignee: Martin Owens (doctormo)
Status: Confirmed
** Changed in: screenlets
Status: New => Confirmed
** Changed in: screenlets
Importance: Undecided => Medium
** Changed in: screenlets
Assignee: (unassigned) => Martin Owens (doctormo)
--
You received this bug notification because you are a member of
Screenlets Dev Team, which is subscribed to Screenlets.
https://bugs.launchpad.net/bugs/769795
Title:
Labels with value None in options rework problematic
Follow ups
References