Exemplo n.º 1
0
Arquivo: qdc-gui.py Projeto: ufwt/qdt
    def rebuild_cache(self):
        try:
            qvd = qvd_get(self.proj.build_path,
                          version=self.proj.target_version)
        except BadBuildPath as e:
            showerror(
                title=_("Cache rebuilding is impossible").get(),
                message=(_("Selected Qemu build path is bad. Reason: %s") %
                         (e.message)).get())
            return

        # if 'reload_build_path_task' is not failed
        if hasattr(self.pw, 'reload_build_path_task'):
            # reload_build_path_task always run at program start that is why
            # it's in process when it's not in finished_tasks and not failed
            if self.pw.reload_build_path_task not in self.pw.tm.finished_tasks:
                ans = askyesno(self,
                               title=_("Cache rebuilding"),
                               message=_("Cache building is already \
in process. Do you want to start cache rebuilding?"))
                if not ans:
                    return

        qvd.remove_cache()
        self.pw.reload_build_path()
Exemplo n.º 2
0
Arquivo: qdc-gui.py Projeto: ufwt/qdt
 def check_unsaved(self):
     if self.title_not_saved_asterisk.get() == "*":
         return askyesno(
             self,
             title=self.title_suffix,
             message=
             _("Current project has unsaved changes. They will be lost. Continue?"
               ))
     else:
         return True