Exemplo n.º 1
0
	def closeEvent(self, ev):
		if not self.exit_dont_ask and backend.proj_is_open():
			ret = DialogManager.show_yes_no_dontask('Close project and quit?')
			if ret == 1:
				ev.ignore()
				return
			if ret == 2:
				self.exit_dont_ask = True

		self.edit_book.close_all_cb()

		self.app_write_config()
		if backend.proj_is_open():
			self.app_gui_state_save(backend.proj_dir())
		ev.accept()
Exemplo n.º 2
0
	def proj_open_cb(self):
		proj_path = DialogManager.show_project_open_dialog(self.recent_projects)
		if proj_path != None:
			if backend.proj_is_open():
				self.proj_close_cb()

			self.proj_open(proj_path)
Exemplo n.º 3
0
	def proj_open_cb(self):
		proj_path = DialogManager.show_project_open_dialog(self.recent_projects)
		if proj_path != None:
			if backend.proj_is_open():
				self.proj_close_cb()

			self.proj_open(proj_path)
Exemplo n.º 4
0
    def closeEvent(self, ev):
        if not self.exit_dont_ask and backend.proj_is_open():
            ret = DialogManager.show_yes_no_dontask('Close project and quit?')
            if ret == 1:
                ev.ignore()
                return
            if ret == 2:
                self.exit_dont_ask = True

        # extra proc for editing enabled
        if self.inner_editing:
            self.edit_book.close_all_cb()

        self.app_write_config()
        if backend.proj_is_open():
            self.app_gui_state_save(backend.proj_dir())
        ev.accept()
Exemplo n.º 5
0
	def file_restart_cb(self):
		if not DialogManager.show_yes_no('Restart ?'):
			return
		hint = self.edit_book.get_file_line_list()
		if backend.proj_is_open():
			self.proj_close_cb()
		QApplication.quit()
		os.environ['SEASCOPE_RESTART_HINT'] = '%s' % str(hint)
		QProcess.startDetached(sys.executable, QApplication.arguments(), self.seascope_start_dir);
Exemplo n.º 6
0
	def file_restart_cb(self):
		if not DialogManager.show_yes_no('Restart ?'):
			return
		hint = self.edit_book.get_file_line_list()
		if backend.proj_is_open():
			self.proj_close_cb()
		QApplication.quit()
		os.environ['SEASCOPE_RESTART_HINT'] = '%s' % str(hint)
		QProcess.startDetached(sys.executable, QApplication.arguments(), self.seascope_start_dir);
Exemplo n.º 7
0
    def proj_new_cb(self):
        if backend.proj_is_open():
            if not DialogManager.show_proj_close():
                return
            self.proj_close_cb()

        dlg = BackendChooserDialog()
        bname = dlg.run_dialog()
        if bname == None:
            return

        proj_args = ProjectUi.show_settings_ui(bname, None)
        if not proj_args:
            return

        if not backend.proj_new(bname, proj_args):
            return
        # XXX FIXIT
        self.qui.do_rebuild()
        self.proj_new_or_open()
Exemplo n.º 8
0
	def proj_new_cb(self):
		if backend.proj_is_open():
			if not DialogManager.show_proj_close():
				return
			self.proj_close_cb()

		dlg = BackendChooserDialog()
		bname = dlg.run_dialog()
		if bname == None:
			return

		proj_args = ProjectUi.show_settings_ui(bname, None)
		if not proj_args:
			return

		if not backend.proj_new(bname, proj_args):
			return
		# XXX FIXIT
		self.qui.do_rebuild()
		self.proj_new_or_open()