summaryrefslogtreecommitdiffstats
path: root/src/pavucontrol.cc
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2008-04-21 00:21:04 +0000
committerLennart Poettering <lennart@poettering.net>2008-04-21 00:21:04 +0000
commit99cad6b3ea2231d1d9657d92272a13a67ff80d49 (patch)
treea1f7bb004eafd2474cacaa5ff0f0700478c9bd33 /src/pavucontrol.cc
parentddbfecc15b08b3108009aa8875f22fea798b38e6 (diff)
switch to sink page by default if no streams are active
git-svn-id: file:///home/lennart/svn/public/pavucontrol/trunk@76 c17c95f2-f111-0410-90bf-f30a9569010c
Diffstat (limited to 'src/pavucontrol.cc')
-rw-r--r--src/pavucontrol.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pavucontrol.cc b/src/pavucontrol.cc
index 56cb53f..7af11d0 100644
--- a/src/pavucontrol.cc
+++ b/src/pavucontrol.cc
@@ -271,6 +271,7 @@ public:
void removeSourceOutput(uint32_t index);
void removeClient(uint32_t index);
+ Gtk::Notebook *notebook;
Gtk::VBox *streamsVBox, *recsVBox, *sinksVBox, *sourcesVBox;
Gtk::Label *noStreamsLabel, *noRecsLabel, *noSinksLabel, *noSourcesLabel;
Gtk::ComboBox *sinkInputTypeComboBox, *sourceOutputTypeComboBox, *sinkTypeComboBox, *sourceTypeComboBox;
@@ -823,6 +824,7 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade:
x->get_widget("sourceOutputTypeComboBox", sourceOutputTypeComboBox);
x->get_widget("sinkTypeComboBox", sinkTypeComboBox);
x->get_widget("sourceTypeComboBox", sourceTypeComboBox);
+ x->get_widget("notebook", notebook);
sourcesVBox->set_reallocate_redraws(true);
streamsVBox->set_reallocate_redraws(true);
@@ -1248,6 +1250,9 @@ void sink_input_cb(pa_context *, const pa_sink_input_info *i, int eol, void *use
MainWindow *w = static_cast<MainWindow*>(userdata);
if (eol) {
+ if (w->sinkInputWidgets.size() <= 0)
+ w->notebook->set_current_page(2);
+
dec_outstanding(w);
return;
}