From 99cad6b3ea2231d1d9657d92272a13a67ff80d49 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 21 Apr 2008 00:21:04 +0000 Subject: 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 --- src/pavucontrol.cc | 5 + src/pavucontrol.glade | 1851 ++++++++++++++++++------------------------------- 2 files changed, 684 insertions(+), 1172 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::RefPtrget_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(userdata); if (eol) { + if (w->sinkInputWidgets.size() <= 0) + w->notebook->set_current_page(2); + dec_outstanding(w); return; } diff --git a/src/pavucontrol.glade b/src/pavucontrol.glade index fab41ac..8b9f4d9 100644 --- a/src/pavucontrol.glade +++ b/src/pavucontrol.glade @@ -1,1184 +1,691 @@ - - - + + + - - - Volume Control - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 500 - 500 - 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 back audio.</i> - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 16 - 16 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 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 + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + GTK_SHADOW_NONE + + + True + + + True + False + 0 + 16 + 16 + <i>No application is currently playing audio.</i> + True + + + False + False + + + + + + + + + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 1 + <b>_Show:</b> + True + True + + + + + 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 - 0.5 - 16 - 16 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 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 + + + tab + False + + + + + True + + + True + True + 12 + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + GTK_SHADOW_NONE + + + True + + + True + False + 0 + 16 + 16 + <i>No application is currently recording audio.</i> + True + + + False + False + + + + + + + + + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 1 + <b>_Show:</b> + True + True + + + + + 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 - 0.5 - 16 - 16 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 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 + + + tab + 1 + False + + + + + True + + + True + True + 12 + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + GTK_SHADOW_NONE + + + True + + + True + False + 0 + 16 + 16 + <i>No output devices available</i> + True + + + False + False + + + + + + + + + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 1 + <b>S_how:</b> + True + True + sinkTypeComboBox + + + + + 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 - 0.5 - 16 - 16 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 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 + + + tab + 2 + False + + + + + True + + + True + True + 12 + GTK_POLICY_NEVER + GTK_POLICY_AUTOMATIC + + + True + GTK_SHADOW_NONE + + + True + + + True + False + 0 + 16 + 16 + <i>No input devices available</i> + True + + + False + False + + + + + + + + + + + True + 12 + 12 + 12 + + + True + 6 + + + True + 1 + <b>Sho_w:</b> + True + True + sourceTypeComboBox + + + + + 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 - 0 - - - - True - - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - Stream Title - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_MIDDLE - -1 - False - 0 - - - 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 - 0 - - - - True - - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - Stream Title - False - True - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_MIDDLE - -1 - False - 0 - - - 0 - True - True - - - - - - True - True - GTK_RELIEF_NONE - True - False - False - - - - True - GTK_ARROW_RIGHT - GTK_SHADOW_OUT - 0.5 - 0.5 - 0 - 0 - - - - - 0 - False - False - GTK_PACK_END - - - - - 0 - False - False - - - - - 0 - False - False - - - - - - True - - - 0 - False - False - - - - - - - - + + + False + 1 + + + + + + + False + 1 + + + + + 3 + + + + + True + _Input Devices + True + + + tab + 3 + False + + + + + + + + + True + window1 + + + True + + + True + + + True + 12 + 6 + + + True + + + True + True + + + False + False + + + + + True + 0 + Stream Title + True + PANGO_ELLIPSIZE_MIDDLE + + + 1 + + + + + True + 3 + + + True + True + Mute audio + GTK_RELIEF_NONE + 0 + + + True + 1 + audio-volume-muted + + + + + False + False + + + + + True + True + Lock channels together + GTK_RELIEF_NONE + 0 + True + + + True + 1 + stock_lock + + + + + False + False + 1 + + + + + True + True + Open menu + GTK_RELIEF_NONE + 0 + + + True + GTK_ARROW_DOWN + + + + + False + False + 2 + + + + + False + 2 + + + + + False + False + + + + + True + 6 + + + + + + + + + False + False + 1 + + + + + False + False + + + + + True + + + False + False + 1 + + + + + + + + + True + window2 + + + True + 6 + + + True + 0 + <b>left-front</b> + True + 15 + + + False + False + + + + + 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 + + + True + True + + + False + False + + + + + True + 0 + Stream Title + True + PANGO_ELLIPSIZE_MIDDLE + + + 1 + + + + + True + True + GTK_RELIEF_NONE + 0 + + + True + + + + + False + False + GTK_PACK_END + 2 + + + + + False + False + + + + + False + False + + + + + True + + + False + False + 1 + + + + + + + -- cgit