Implement availability of the DestinationOption.

svn: r12671
This commit is contained in:
Brian Matherly 2009-06-16 03:12:41 +00:00
parent 29cf704047
commit 187539cb72

View File

@ -1226,6 +1226,9 @@ class GuiDestinationOption(gtk.HBox):
self.__option.connect('options-changed', self.__option_changed)
self.__option.connect('avail-changed', self.__update_avail)
self.__update_avail()
def __text_changed(self, obj): # IGNORE:W0613 - obj is unused
"""
Handle the change of the value.
@ -1287,6 +1290,13 @@ class GuiDestinationOption(gtk.HBox):
self.__entry.set_text( self.__option.get_value() )
def __update_avail(self):
"""
Update the availability (sensitivity) of this widget.
"""
avail = self.__option.get_available()
self.set_sensitive(avail)
#-------------------------------------------------------------------------
#
# GuiStyleOption class