Esempio n. 1
0
    def _on_close(self, button, event=None):
        override_mapping = self._get_changed_overrides()
        if (len(override_mapping["to_add"]) == 0 and len(override_mapping["to_remove"]) == 0):
            self.close_dialog()
            return True

        # There are changes pending, check if the user would like to save changes.
        confirm = YesNoDialog(_("Repositories have changes. Save changes?"),
                                 self._get_dialog_widget(), _("Save Changes"))
        confirm.connect("response", self._on_apply_changes_on_close_response, override_mapping)
Esempio n. 2
0
    def _on_reset_repo(self, button):
        selection = SelectionWrapper(self.overrides_treeview.get_selection(),
                                     self.overrides_store)

        if not selection.is_valid():
            return

        confirm = YesNoDialog(_("Are you sure you want to remove all overrides for <b>%s</b>?") % selection['repo_id'],
                                 self._get_dialog_widget(), _("Confirm Remove All Overrides"))
        confirm.connect("response", self._on_reset_repo_response)
Esempio n. 3
0
 def _on_gpgcheck_remove_button_clicked(self, button):
     confirm = YesNoDialog(_("Are you sure you want to remove this override?"),
                              self._get_dialog_widget(), _("Confirm Override Removal"))
     confirm.connect("response", self._on_remove_gpgcheck_confirmation)