예제 #1
0
    def showEvent(self, event):
        ChildDialog.showEvent(self, event)

        if RS.is_hidden(RS.HD_SnapshotsInfo):
            return

        info_dialog = SnapshotsInfoDialog(self)
        info_dialog.exec()

        if info_dialog.has_to_be_hidden_next_time():
            RS.set_hidden(RS.HD_SnapshotsInfo)
예제 #2
0
    def __init__(self):
        self.client_list = []
        self.trashed_clients = []
        self.favorite_list = []
        self.recent_sessions = []
        self.name = ''
        self.path = ''
        self.notes = ''
        self.server_status = ray.ServerStatus.OFF

        self.is_renameable = True

        self.signaler = Signaler()
        self.patchbay_manager = PatchbayManager(self)

        server = GuiServerThread.instance()
        server.start()

        self.daemon_manager = DaemonManager(self)
        if CommandLineArgs.daemon_url:
            self.daemon_manager.set_osc_address(CommandLineArgs.daemon_url)
        elif CommandLineArgs.daemon_port:
            self.daemon_manager.set_osc_address(CommandLineArgs.daemon_port)
        elif not CommandLineArgs.out_daemon:
            self.daemon_manager.set_new_osc_address()

        # build nsm_child if NSM_URL in env
        self.nsm_child = None

        if CommandLineArgs.under_nsm:
            if CommandLineArgs.out_daemon:
                self.nsm_child = NsmChildOutside(self)
                self.daemon_manager.set_external()
            else:
                self.nsm_child = NsmChild(self)

        # build and show Main UI
        self.main_win = MainWindow(self)
        self.daemon_manager.finish_init()
        self.patchbay_manager.finish_init()
        server.finish_init(self)

        self.main_win.show()

        # display donations dialog under conditions
        if not RS.is_hidden(RS.HD_Donations):
            coreff_counter = RS.settings.value('coreff_counter', 0, type=int)
            coreff_counter += 1
            RS.settings.setValue('coreff_counter', coreff_counter)

            if coreff_counter % 44 == 29:
                self.main_win.donate(True)
예제 #3
0
    def __init__(self, parent):
        ChildDialog.__init__(self, parent)
        self.ui = ui.waiting_close_user.Ui_Dialog()
        self.ui.setupUi(self)

        if is_dark_theme(self):
            self.ui.labelSaveIcon.setPixmap(
                QPixmap(':scalable/breeze-dark/document-nosave.svg'))

        self.ui.pushButtonOk.setFocus(True)
        self.ui.pushButtonUndo.clicked.connect(self._undo_close)
        self.ui.pushButtonSkip.clicked.connect(self._skip)
        self.ui.checkBox.setChecked(not RS.is_hidden(RS.HD_WaitCloseUser))
        self.ui.checkBox.clicked.connect(self._check_box_clicked)
예제 #4
0
    def convert_ardour_to_session(self):
        script_name = 'ardour_from_external_to_session.sh'
        terminal_title = _translate('utilities',
                                    'Convert Ardour session to Ray')

        if not RS.is_hidden(RS.HD_ArdourConversion):
            dialog = ArdourConversionDialog(self.main_win)
            dialog.exec()
            if not dialog.result():
                return

            if dialog.not_again_value():
                RS.set_hidden(RS.HD_ArdourConversion)

        ardour_session, filter = QFileDialog.getOpenFileName(
            self.main_win,
            _translate('utilities', "Choose an Ardour session to convert..."),
            os.getenv('HOME'),
            _translate('utilities', "Ardour sessions (*.ardour)"))

        if not ardour_session:
            return

        executable = "ardour"
        if not shutil.which(executable):
            for i in range(9, 5, -1):
                if shutil.which("ardour%i" % i):
                    executable = "ardour%i" % i
                    break
                if shutil.which("Ardour%i" % i):
                    executable = "Ardour%i" % i
                    break

        args = ["--executable", executable, ardour_session]

        self._start_process(script_name, terminal_title, *args)
예제 #5
0
 def _show_this(self, state: bool):
     RS.set_hidden(RS.HD_OpenNsmSession, bool(state))
예제 #6
0
 def _check_box_clicked(self, state):
     RS.set_hidden(RS.HD_Donations, state)
예제 #7
0
 def _check_box_clicked(self, state):
     RS.set_hidden(RS.HD_WaitCloseUser, bool(state))