(self, _button)
Remove a profile from the list
Remove a profile from the list
Remove a profile from the list
def on_profileremovebutton_clicked(self, _button):
        """Remove a profile from the list"""
        guiget = self.builder.get_object

        treeview = guiget('profilelist')
        selection = treeview.get_selection()
        (model, rowiter) = selection.get_selected()
        profile = model.get_value(rowiter, 0)

        if profile == 'default':
            # We shouldn't let people delete this profile
            return

        self.previous_profile_selection = None
        self.config.del_profile(profile)
        model.remove(rowiter)
        selection.select_iter(model.get_iter_first())
        self.layouteditor.update_profiles()
def on_profileremovebutton_clicked ( self , _button ) : guiget = self . builder . get_object treeview = guiget ( 'profilelist' ) selection = treeview . get_selection ( ) ( model , rowiter ) = selection . get_selected ( ) profile = model . get_value ( rowiter , 0 ) if profile == 'default' : # We shouldn't let people delete this profile return self . previous_profile_selection = None self . config . del_profile ( profile ) model . remove ( rowiter ) selection . select_iter ( model . get_iter_first ( ) ) self . layouteditor . update_profiles ( )