diff options
Diffstat (limited to 'src/mainwindow.cc')
-rw-r--r-- | src/mainwindow.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/src/mainwindow.cc b/src/mainwindow.cc index 7a831e8..7ada1ca 100644 --- a/src/mainwindow.cc +++ b/src/mainwindow.cc @@ -73,7 +73,8 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade: showSourceOutputType(SOURCE_OUTPUT_CLIENT), showSourceType(SOURCE_NO_MONITOR), eventRoleWidget(NULL), - canRenameDevices(false) { + canRenameDevices(false), + m_connected(false) { x->get_widget("cardsVBox", cardsVBox); x->get_widget("streamsVBox", streamsVBox); @@ -85,6 +86,7 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade: x->get_widget("noRecsLabel", noRecsLabel); x->get_widget("noSinksLabel", noSinksLabel); x->get_widget("noSourcesLabel", noSourcesLabel); + x->get_widget("connectingLabel", connectingLabel); x->get_widget("sinkInputTypeComboBox", sinkInputTypeComboBox); x->get_widget("sourceOutputTypeComboBox", sourceOutputTypeComboBox); x->get_widget("sinkTypeComboBox", sinkTypeComboBox); @@ -106,6 +108,10 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade: sourceOutputTypeComboBox->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::onSourceOutputTypeComboBoxChanged)); sinkTypeComboBox->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::onSinkTypeComboBoxChanged)); sourceTypeComboBox->signal_changed().connect(sigc::mem_fun(*this, &MainWindow::onSourceTypeComboBoxChanged)); + + /* Hide first and show when we're connected */ + notebook->hide(); + connectingLabel->show(); } MainWindow* MainWindow::create() { @@ -720,6 +726,19 @@ gboolean idle_cb(gpointer data) { return FALSE; } +void MainWindow::setConnectionState(gboolean connected) { + if (m_connected != connected) { + m_connected = connected; + if (m_connected) { + connectingLabel->hide(); + notebook->show(); + } else { + notebook->hide(); + connectingLabel->show(); + } + } +} + void MainWindow::updateDeviceVisibility() { if (idle_source) |