def __init__(self, installer_path): if not os.path.exists(installer_path): raise Exception('No such file: %s' % installer_path) self.path = installer_path AnchoredWindow.__init__(self, IMG_INSTALLER_WELCOME, ANCHOR_IMAGE_OFFSET_X, ANCHOR_IMAGE_OFFSET_Y, WINDOW_WIDTH, WINDOW_HEIGHT, name='installer', title='Setup') self.button_region = None self.button_images = IMG_BUTTONS self.disabled_button_images = IMG_BUTTONS_DISABLED self.buttons = None self.buttons_valid = None self.confirm_window_open = None self.confirm_window_region = None self.confirm_button_images = { 'yes': IMG_BUTTONS['yes'], 'no': IMG_BUTTONS['no'] } self.confirm_buttons = None self.shortcut_checkboxes = None self.running = False self.installing = None self.page = None
def close(self): """Closes the installer by clicking the Close button in the window title bar and confirming if necessary. """ AnchoredWindow.close(self) sleep(1) if not self.page in [self.complete_page, self.cancelled_page]: self.confirm_window_open = True self.confirm_cancel('yes') AnchoredWindow.close(self) sleep(1) self.running = False self.installing = False
def __init__(self, installer_path): if not os.path.exists(installer_path): raise Exception('No such file: %s' % installer_path) self.path = installer_path AnchoredWindow.__init__(self, IMG_INSTALLER_WELCOME, ANCHOR_IMAGE_OFFSET_X, ANCHOR_IMAGE_OFFSET_Y, WINDOW_WIDTH, WINDOW_HEIGHT, name = 'installer', title = 'Setup') self.button_region = None self.button_images = IMG_BUTTONS self.disabled_button_images = IMG_BUTTONS_DISABLED self.buttons = None self.buttons_valid = None self.confirm_window_open = None self.confirm_window_region = None self.confirm_button_images = { 'yes' : IMG_BUTTONS['yes'], 'no' : IMG_BUTTONS['no'] } self.confirm_buttons = None self.shortcut_checkboxes = None self.running = False self.installing = None self.page = None