(self, selection)
A different layout was selected
A different layout was selected
A different layout was selected
def on_layout_selection_changed(self, selection):
        """A different layout was selected"""
        (listmodel, rowiter) = selection.get_selected()
        if not rowiter:
            # Something is wrong, just jump to the first item in the list
            selection.select_iter(self.treestore.get_iter_first())
            return
        layout = listmodel.get_value(rowiter, 0)
        self.set_layout(layout)
        self.previous_layout_selection = layout

        widget = self.builder.get_object('layoutremovebutton')
        if layout == 'default':
            widget.set_sensitive(False)
        else:
            widget.set_sensitive(True)

        command = self.builder.get_object('layout_profile_command')
        chooser = self.builder.get_object('layout_profile_chooser')
        workdir = self.builder.get_object('layout_profile_workingdir')
        command.set_sensitive(False)
        chooser.set_sensitive(False)
        workdir.set_sensitive(False)
def on_layout_selection_changed ( self , selection ) : ( listmodel , rowiter ) = selection . get_selected ( ) if not rowiter : # Something is wrong, just jump to the first item in the list selection . select_iter ( self . treestore . get_iter_first ( ) ) return layout = listmodel . get_value ( rowiter , 0 ) self . set_layout ( layout ) self . previous_layout_selection = layout widget = self . builder . get_object ( 'layoutremovebutton' ) if layout == 'default' : widget . set_sensitive ( False ) else : widget . set_sensitive ( True ) command = self . builder . get_object ( 'layout_profile_command' ) chooser = self . builder . get_object ( 'layout_profile_chooser' ) workdir = self . builder . get_object ( 'layout_profile_workingdir' ) command . set_sensitive ( False ) chooser . set_sensitive ( False ) workdir . set_sensitive ( False )