- add new option "All Except Monitor Sources" to sources option menu

- show a nice hint that one can right click on a stream


git-svn-id: file:///home/lennart/svn/public/pavucontrol/trunk@45 c17c95f2-f111-0410-90bf-f30a9569010c
This commit is contained in:
Lennart Poettering 2006-08-21 00:56:38 +00:00
parent 0f279b44ac
commit 65cb23b0ed
2 changed files with 94 additions and 38 deletions

View File

@ -46,6 +46,7 @@ enum SinkType {
enum SourceType{
SOURCE_ALL,
SOURCE_NO_MONITOR,
SOURCE_HARDWARE,
SOURCE_VIRTUAL,
SOURCE_MONITOR,
@ -492,8 +493,8 @@ void SinkInputWidget::SinkMenuItem::onToggle() {
MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& x) :
Gtk::Window(cobject),
showSinkType(SINK_HARDWARE),
showSourceType(SOURCE_HARDWARE) {
showSinkType(SINK_ALL),
showSourceType(SOURCE_NO_MONITOR) {
x->get_widget("streamsVBox", streamsVBox);
x->get_widget("sinksVBox", sinksVBox);
@ -679,7 +680,9 @@ void MainWindow::updateDeviceVisibility() {
for (std::map<uint32_t, SourceWidget*>::iterator i = sourceWidgets.begin(); i != sourceWidgets.end(); ++i) {
SourceWidget* w = i->second;
if (showSourceType == SOURCE_ALL || w->type == showSourceType) {
if (showSourceType == SOURCE_ALL ||
w->type == showSourceType ||
(showSourceType == SOURCE_NO_MONITOR && w->type != SOURCE_MONITOR)) {
w->show_all();
is_empty = false;
}
@ -728,7 +731,7 @@ void MainWindow::onSinkTypeComboBoxChanged() {
showSinkType = (SinkType) sinkTypeComboBox->get_active_row_number();
if (showSinkType == (SinkType) -1)
sinkTypeComboBox->set_active((int) SINK_HARDWARE);
sinkTypeComboBox->set_active((int) SINK_ALL);
updateDeviceVisibility();
}
@ -737,7 +740,7 @@ void MainWindow::onSourceTypeComboBoxChanged() {
showSourceType = (SourceType) sourceTypeComboBox->get_active_row_number();
if (showSourceType == (SourceType) -1)
sourceTypeComboBox->set_active((int) SOURCE_HARDWARE);
sourceTypeComboBox->set_active((int) SOURCE_NO_MONITOR);
updateDeviceVisibility();
}

View File

@ -157,6 +157,12 @@
<property name="scrollable">False</property>
<property name="enable_popup">False</property>
<child>
<widget class="GtkVBox" id="vbox32">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow5">
<property name="border_width">12</property>
@ -208,6 +214,52 @@
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkAlignment" id="alignment3">
<property name="visible">True</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xscale">1</property>
<property name="yscale">1</property>
<property name="top_padding">0</property>
<property name="bottom_padding">12</property>
<property name="left_padding">12</property>
<property name="right_padding">12</property>
<child>
<widget class="GtkLabel" id="label4828">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;b&gt;Hint:&lt;/b&gt; Right click on a playback stream to move it to another output device.</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">False</property>
<property name="selectable">False</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
<property name="width_chars">-1</property>
<property name="single_line_mode">False</property>
<property name="angle">0</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
<property name="tab_fill">True</property>
@ -511,6 +563,7 @@ Virtual Sinks</property>
<widget class="GtkComboBox" id="sourceTypeComboBox">
<property name="visible">True</property>
<property name="items" translatable="yes">All Sources
All Except Monitor Sources
Hardware Sources
Virtual Sources
Monitor Sources</property>