'Update the remote name when a remote from the list is selected'

def update_remotes(self):

    widget = self.remotes
    remotes = self.model.remotes
    selection = qtutils.selected_item(widget, remotes)
    if (not selection):
        self.selected_remotes = []
        return
    self.set_remote_name(selection)
    self.selected_remotes = qtutils.selected_items(self.remotes, self.model.remotes)
    self.set_remote_to(selection, self.selected_remotes)
