@@ -137,6 +137,7 @@ MainWindow::MainWindow(QApplication& app, bool i18n, QSplashScreen* splash)
137
137
bool startupOK = false ;
138
138
139
139
m_spAPI->Init (rootPath ().toStdString ());
140
+ guiID = QString::fromStdString (m_spAPI->GetGuid ());
140
141
141
142
std::cout << " [GUI] - hiding main window" << std::endl;
142
143
hide ();
@@ -170,9 +171,6 @@ MainWindow::MainWindow(QApplication& app, bool i18n, QSplashScreen* splash)
170
171
QThreadPool::globalInstance ()->setMaxThreadCount (3 );
171
172
172
173
startupOK = m_spAPI->WaitForServer ();
173
- guiID = QString::fromStdString (m_spAPI->GetGuid ());
174
- server_osc_cues_port = m_spAPI->GetPort (SonicPiPortId::server_osc_cues);
175
- scsynth_port = m_spAPI->GetPort (SonicPiPortId::scsynth);
176
174
177
175
if (startupOK)
178
176
{
@@ -350,7 +348,7 @@ void MainWindow::setupWindowStructure()
350
348
prefsWidget->setAllowedAreas (Qt::RightDockWidgetArea);
351
349
prefsWidget->setFeatures (QDockWidget::DockWidgetClosable);
352
350
353
- settingsWidget = new SettingsWidget (server_osc_cues_port , piSettings, this );
351
+ settingsWidget = new SettingsWidget (m_spAPI-> GetPort (SonicPiPortId::server_osc_cues) , piSettings, this );
354
352
connect (settingsWidget, SIGNAL (volumeChanged (int )), this , SLOT (changeSystemPreAmp (int )));
355
353
connect (settingsWidget, SIGNAL (mixerSettingsChanged ()), this , SLOT (mixerSettingsChanged ()));
356
354
connect (settingsWidget, SIGNAL (midiSettingsChanged ()), this , SLOT (toggleMidi ()));
@@ -2783,7 +2781,7 @@ void MainWindow::createToolBar()
2783
2781
}
2784
2782
2785
2783
QMenu* incomingOSCPortMenu = ioMenu->addMenu (tr (" Incoming OSC Port" ));
2786
- incomingOSCPortMenu->addAction (QString::number (server_osc_cues_port ));
2784
+ incomingOSCPortMenu->addAction (QString::number (m_spAPI-> GetPort (SonicPiPortId::server_osc_cues) ));
2787
2785
2788
2786
viewMenu = menuBar ()->addMenu (tr (" View" ));
2789
2787
0 commit comments