(self, selection)
A different profile was selected
A different profile was selected
A different profile was selected
def on_profile_selection_changed(self, selection):
        """A different profile was selected"""
        (listmodel, rowiter) = selection.get_selected()
        if not rowiter:
            # Something is wrong, just jump to the first item in the list
            treeview = selection.get_tree_view()
            liststore = treeview.get_model()
            selection.select_iter(liststore.get_iter_first())
            return
        profile = listmodel.get_value(rowiter, 0)
        self.set_profile_values(profile)
        self.previous_profile_selection = profile

        widget = self.builder.get_object('profileremovebutton')
        if profile == 'default':
            widget.set_sensitive(False)
        else:
            widget.set_sensitive(True)
def on_profile_selection_changed ( self , selection ) : ( listmodel , rowiter ) = selection . get_selected ( ) if not rowiter : # Something is wrong, just jump to the first item in the list treeview = selection . get_tree_view ( ) liststore = treeview . get_model ( ) selection . select_iter ( liststore . get_iter_first ( ) ) return profile = listmodel . get_value ( rowiter , 0 ) self . set_profile_values ( profile ) self . previous_profile_selection = profile widget = self . builder . get_object ( 'profileremovebutton' ) if profile == 'default' : widget . set_sensitive ( False ) else : widget . set_sensitive ( True )