Implement availability of the DestinationOption.
svn: r12671
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user