Ejemplo n.º 1
0
    def restoreFromMedia(self, path):
        result, msg = self.is_aptoncd_media(path)

        if result:
            self.packageList.load_package_folder(path, recursive=True)
            self.btnRestorePackages.set_sensitive(True)
        else:
            gui.erro_message(constants.MESSAGE_0067, self.get_main_window())
Ejemplo n.º 2
0
    def on_btnRestorePackages(self, widget, *args):
        restore_from = ""

        if self.restoretype == constants.RESTORE_TYPE.RESTORE_FROM_ISO:
            result, mountPath = self.__mount_iso(self.isoFileName)
            if result:
                self.copy_files()
                self.__umount_iso(mountPath)
        elif self.restoretype == constants.RESTORE_TYPE.RESTORE_FROM_MEDIA:
            result, msg = self.is_aptoncd_media(self.cd_path)
            if result:
                self.copy_files()
            else:
                gui.erro_message(constants.MESSAGE_0067, self.get_main_window())
        else:
            gui.warn_message(constants.MESSAGE_0069, self.get_main_window())
Ejemplo n.º 3
0
	def on_cmbLocation_change(self, widget):
		if not utils.checkAccess( widget.get_filename()):
			gui.erro_message(constants.MESSAGE_0018 ,self.window)
			widget.emit_stop_by_name('selection_changed')
			widget.set_current_folder(os.environ['HOME'])