(self)
Update the background tab
Update the background tab
Update the background tab
def update_background_tab(self):
        """Update the background tab"""
        guiget = self.builder.get_object

        # Background type
        backtype = None
        imagewidget = guiget('image_radiobutton')
        transwidget = guiget('transparent_radiobutton')

        if imagewidget.get_active() == True:
            backtype = 'image'
        elif transwidget.get_active() == True:
            backtype = 'transparent'
        else:
            backtype = 'solid'
        self.config['background_type'] = backtype
        self.config.save()

        if backtype == 'image':
                guiget('background_image_file').set_sensitive(True)
        else:
                guiget('background_image_file').set_sensitive(False)

        if backtype in ('transparent', 'image'):
            guiget('darken_background_scale').set_sensitive(True)
        else:
            guiget('darken_background_scale').set_sensitive(False)
def update_background_tab ( self ) : guiget = self . builder . get_object # Background type backtype = None imagewidget = guiget ( 'image_radiobutton' ) transwidget = guiget ( 'transparent_radiobutton' ) if imagewidget . get_active ( ) == True : backtype = 'image' elif transwidget . get_active ( ) == True : backtype = 'transparent' else : backtype = 'solid' self . config [ 'background_type' ] = backtype self . config . save ( ) if backtype == 'image' : guiget ( 'background_image_file' ) . set_sensitive ( True ) else : guiget ( 'background_image_file' ) . set_sensitive ( False ) if backtype in ( 'transparent' , 'image' ) : guiget ( 'darken_background_scale' ) . set_sensitive ( True ) else : guiget ( 'darken_background_scale' ) . set_sensitive ( False )