From 1f1c8c85762910ff0b031aa8ee3eec2a7f74df7d Mon Sep 17 00:00:00 2001 From: Colin Guthrie Date: Sat, 28 Feb 2009 18:01:07 +0000 Subject: Create a new 'Configuration' tab Move the card listing into this tab. --- src/pavucontrol.cc | 40 +- src/pavucontrol.glade | 2032 +++++++++++++++++++------------------------------ 2 files changed, 823 insertions(+), 1249 deletions(-) (limited to 'src') diff --git a/src/pavucontrol.cc b/src/pavucontrol.cc index ae0e464..c9c5ae2 100644 --- a/src/pavucontrol.cc +++ b/src/pavucontrol.cc @@ -24,7 +24,6 @@ #include #include -#include #include #include @@ -356,8 +355,8 @@ public: void removeClient(uint32_t index); Gtk::Notebook *notebook; - Gtk::VBox *streamsVBox, *recsVBox, *sinksVBox, *sourcesVBox; - Gtk::Label *noStreamsLabel, *noRecsLabel, *noSinksLabel, *noSourcesLabel; + Gtk::VBox *streamsVBox, *recsVBox, *sinksVBox, *sourcesVBox, *cardsVBox; + Gtk::Label *noStreamsLabel, *noRecsLabel, *noSinksLabel, *noSourcesLabel, *noCardsLabel; Gtk::ComboBox *sinkInputTypeComboBox, *sourceOutputTypeComboBox, *sinkTypeComboBox, *sourceTypeComboBox; std::map cardWidgets; @@ -1126,10 +1125,12 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("cardsVBox", cardsVBox); x->get_widget("streamsVBox", streamsVBox); x->get_widget("recsVBox", recsVBox); x->get_widget("sinksVBox", sinksVBox); x->get_widget("sourcesVBox", sourcesVBox); + x->get_widget("noCardsLabel", noCardsLabel); x->get_widget("noStreamsLabel", noStreamsLabel); x->get_widget("noRecsLabel", noRecsLabel); x->get_widget("noSinksLabel", noSinksLabel); @@ -1140,6 +1141,7 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("sourceTypeComboBox", sourceTypeComboBox); x->get_widget("notebook", notebook); + cardsVBox->set_reallocate_redraws(true); sourcesVBox->set_reallocate_redraws(true); streamsVBox->set_reallocate_redraws(true); recsVBox->set_reallocate_redraws(true); @@ -1185,8 +1187,7 @@ void MainWindow::updateCard(const pa_card_info &info) { w = cardWidgets[info.index]; else { cardWidgets[info.index] = w = CardWidget::create(); - sinksVBox->pack_start(*w, false, false, 0); - //sourcesVBox->pack_start(*w, false, false, 0); + cardsVBox->pack_start(*w, false, false, 0); w->index = info.index; is_new = true; } @@ -1198,7 +1199,7 @@ void MainWindow::updateCard(const pa_card_info &info) { else w->name = info.name; - w->boldNameLabel->set_text("Card: "); + w->boldNameLabel->set_text(""); gchar *txt; w->nameLabel->set_markup(txt = g_markup_printf_escaped("%s", w->name.c_str())); g_free(txt); @@ -1299,6 +1300,7 @@ void MainWindow::createMonitorStreamForSource(uint32_t source_idx) { char t[16]; pa_buffer_attr attr; pa_sample_spec ss; + return; ss.channels = 1; ss.format = PA_SAMPLE_FLOAT32; @@ -1331,6 +1333,7 @@ void MainWindow::createMonitorStreamForSinkInput(uint32_t sink_input_idx, uint32 pa_buffer_attr attr; pa_sample_spec ss; uint32_t monitor_source_idx; + return; ss.channels = 1; ss.format = PA_SAMPLE_FLOAT32; @@ -1704,8 +1707,6 @@ void MainWindow::updateDeviceVisibility() { void MainWindow::reallyUpdateDeviceVisibility() { bool is_empty = true; - std::set visible_cards; - std::set::iterator it_card; for (std::map::iterator i = sinkInputWidgets.begin(); i != sinkInputWidgets.end(); ++i) { SinkInputWidget* w = i->second; @@ -1743,7 +1744,6 @@ void MainWindow::reallyUpdateDeviceVisibility() { noRecsLabel->hide(); is_empty = true; - visible_cards.clear(); for (std::map::iterator i = sinkWidgets.begin(); i != sinkWidgets.end(); ++i) { SinkWidget* w = i->second; @@ -1751,26 +1751,28 @@ void MainWindow::reallyUpdateDeviceVisibility() { if (showSinkType == SINK_ALL || w->type == showSinkType) { w->show(); is_empty = false; - if (w->card_index != PA_INVALID_INDEX) - visible_cards.insert(w->card_index); } else w->hide(); } + if (is_empty) + noSinksLabel->show(); + else + noSinksLabel->hide(); + + is_empty = true; + for (std::map::iterator i = cardWidgets.begin(); i != cardWidgets.end(); ++i) { CardWidget* w = i->second; - if (true || (!visible_cards.count(w->index) && w->hasSinks)) { - w->show(); - is_empty = false; - } else - w->hide(); + w->show(); + is_empty = false; } if (is_empty) - noSinksLabel->show(); + noCardsLabel->show(); else - noSinksLabel->hide(); + noCardsLabel->hide(); is_empty = true; @@ -1801,6 +1803,8 @@ void MainWindow::reallyUpdateDeviceVisibility() { streamsVBox->show(); recsVBox->hide(); recsVBox->show(); + cardsVBox->hide(); + cardsVBox->show(); } void MainWindow::removeCard(uint32_t index) { diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade index bcf4ff3..6f8fe60 100644 --- a/src/pavucontrol.glade +++ b/src/pavucontrol.glade @@ -1,1243 +1,813 @@ - - - + - - - Volume Control - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 500 - 400 - True - False - multimedia-volume-control - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - 12 - True - False - 12 - - - - True - True - True - False - GTK_POS_TOP - False - False - - - - True - False - 0 - - - - 12 - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - GTK_SHADOW_NONE - - - - True - False - 0 - - - - True - False - <i>No application is currently playing audio.</i> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 16 - 16 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - - - - 0 - True - True - - - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 12 - 12 - 12 - - - - True - False - 6 - - - - True - <b>_Show:</b> - True - True - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - All Streams + + + + Volume Control + 500 + 400 + multimedia-volume-control + + + True + 12 + 12 + + + True + True + False + + + True + + + True + True + 12 + never + automatic + + + True + none + + + True + + + True + False + 16 + 16 + <i>No application is currently playing audio.</i> + True + + + 0 + + + + + + + + + 0 + + + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 1 + <b>_Show:</b> + True + True + + + 0 + + + + + True + All Streams Applications Virtual Streams - False - True - - - 0 - False - True - - - - - - - 0 - False - False - - - - - False - True - - - - - - True - _Playback - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 0 - - - - 12 - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - GTK_SHADOW_NONE - - - - True - False - 0 - - - - True - False - <i>No application is currently recording audio.</i> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 16 - 16 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - - - - 0 - True - True - - - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 12 - 12 - 12 - - - - True - False - 6 - - - - True - <b>_Show:</b> - True - True - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - All Streams + + + False + 1 + + + + + + + False + False + 1 + + + + + + + True + _Playback + True + + + False + tab + + + + + True + + + True + True + 12 + never + automatic + + + True + none + + + True + + + True + False + 16 + 16 + <i>No application is currently recording audio.</i> + True + + + 0 + + + + + + + + + 0 + + + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 1 + <b>_Show:</b> + True + True + + + 0 + + + + + True + All Streams Applications Virtual Streams - False - True - - - 0 - False - True - - - - - - - 0 - False - False - - - - - False - True - - - - - - True - _Recording - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 0 - - - - 12 - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - GTK_SHADOW_NONE - - - - True - False - 0 - - - - True - False - <i>No output devices available</i> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 16 - 16 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - - - - 0 - True - True - - - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 12 - 12 - 12 - - - - True - False - 6 - - - - True - <b>S_how:</b> - True - True - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - sinkTypeComboBox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - All Output Devices + + + False + 1 + + + + + + + False + False + 1 + + + + + 1 + + + + + True + _Recording + True + + + 1 + False + tab + + + + + True + + + True + True + 12 + never + automatic + + + True + none + + + True + + + True + False + 16 + 16 + <i>No output devices available</i> + True + + + 0 + + + + + + + + + 0 + + + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 1 + <b>S_how:</b> + True + True + sinkTypeComboBox + + + 0 + + + + + True + All Output Devices Hardware Output Devices Virtual Output Devices - False - True - - - 0 - False - True - - - - - - - 0 - False - True - - - - - False - True - - - - - - True - _Output Devices - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - - True - False - 0 - - - - 12 - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - GTK_SHADOW_NONE - - - - True - False - 0 - - - - True - False - <i>No input devices available</i> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 16 - 16 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - - - - 0 - True - True - - - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 12 - 12 - 12 - - - - True - False - 6 - - - - True - <b>Sho_w:</b> - True - True - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - sourceTypeComboBox - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - True - True - - - - - - True - All Input Devices + + + False + 1 + + + + + + + False + 1 + + + + + 2 + + + + + True + _Output Devices + True + + + 2 + False + tab + + + + + True + + + True + True + 12 + never + automatic + + + True + none + + + True + + + True + False + 16 + 16 + <i>No input devices available</i> + True + + + 0 + + + + + + + + + 0 + + + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 1 + <b>Sho_w:</b> + True + True + sourceTypeComboBox + + + 0 + + + + + True + All Input Devices All Except Monitors Hardware Input Devices Virtual Input Devices Monitors - False - True - - - 0 - False - True - - - - - - - 0 - False - True - - - - - False - True - - - - - - True - _Input Devices - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - 0 - True - True - - - - - - - - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - True - False - - - - True - False - 0 - - - - 12 - True - False - 6 - - - - True - False - 6 - - - - True - gtk-missing-image - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - True - - - - - - True - False - 0 - - - - True - - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - True - - - - - - True - Stream Title - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_MIDDLE - -1 - False - 0 - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - False - 3 - - - - True - Mute audio - True - GTK_RELIEF_NONE - True - False - False - - - - True - 1 - audio-volume-muted - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - - True - Lock channels together - True - GTK_RELIEF_NONE - True - True - False - - - - True - 1 - stock_lock - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - - True - Open menu - True - GTK_RELIEF_NONE - True - False - False - - - - True - GTK_ARROW_DOWN - GTK_SHADOW_OUT - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - - - - - 0 - False - True - - - - - 0 - False - False - - - - - - True - False - 6 - - - - - - - - - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - - - 0 - False - False - - - - - - - - - - True - window2 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - False - 6 - - - - True - <b>left-front</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - 15 - False - 0 - - - 0 - False - False - - - - - - True - True - False - GTK_POS_TOP - 0 - GTK_UPDATE_CONTINUOUS - False - 44.2408370972 0 100 5 0 0 - - - 0 - True - True - - - - - - True - 50% - False - False - GTK_JUSTIFY_LEFT - False - False - 1 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - 9 - False - 0 - - - 0 - False - False - - - - - - - - True - window1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_NORMAL - GDK_GRAVITY_NORTH_WEST - True - False - - - - True - True - False - - - - True - False - 0 - - - - 12 - True - False - 6 - - - - True - False - 6 - - - - True - gtk-missing-image - 4 - 0 - 0.5 - 0 - 0 - - - 0 - False - True - - - - - - True - False - 0 - - - - True - - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - True - - - - - - True - Stream Title - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_MIDDLE - -1 - False - 0 - - - 0 - True - True - - - - - 0 - True - True - - - - - - True - True - GTK_RELIEF_NONE - True - False - False - - - - True - GTK_ARROW_DOWN - GTK_SHADOW_OUT - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - True - - - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - - - 0 - False - False - - - - - - - - + + + False + 1 + + + + + + + False + 1 + + + + + 3 + + + + + True + _Input Devices + True + + + 3 + False + tab + + + + + True + vertical + + + True + True + automatic + automatic + + + True + queue + + + True + vertical + + + True + False + 16 + 16 + <i>No cards available for configuration</i> + True + + + 0 + + + + + + + + + 0 + + + + + 4 + + + + + True + _Configutation + True + + + 4 + False + tab + + + + + 0 + + + + + + + True + window1 + + + True + + + True + + + True + 12 + 6 + + + True + 6 + + + True + gtk-missing-image + 4 + + + False + 0 + + + + + True + + + True + True + + + False + 0 + + + + + True + 0 + Stream Title + True + middle + + + 1 + + + + + 1 + + + + + True + 3 + + + True + True + False + Mute audio + none + + + True + audio-volume-muted + 1 + + + + + False + False + 0 + + + + + True + True + False + Lock channels together + none + True + + + True + stock_lock + 1 + + + + + False + False + 1 + + + + + True + True + False + Open menu + none + + + True + down + + + + + False + False + 2 + + + + + False + 2 + + + + + False + False + 0 + + + + + True + 6 + + + + + + + + + False + False + 1 + + + + + False + False + 0 + + + + + True + + + False + False + 1 + + + + + + + + + True + window2 + + + True + 6 + + + True + 0 + <b>left-front</b> + True + 15 + + + False + False + 0 + + + + + True + True + 44.2408370972 0 100 5 0 0 + 0 + False + + + 1 + + + + + True + 1 + 50% + 9 + + + False + False + 2 + + + + + + + True + window1 + + + True + + + True + + + True + 12 + 6 + + + True + 6 + + + True + 0 + gtk-missing-image + 4 + + + False + 0 + + + + + True + + + True + True + + + False + 0 + + + + + True + 0 + Stream Title + True + middle + + + 1 + + + + + 1 + + + + + True + True + False + none + + + True + down + + + + + False + 2 + + + + + False + False + 0 + + + + + False + False + 0 + + + + + True + + + False + False + 1 + + + + + + + -- cgit