- 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

@ -158,54 +158,106 @@
<property name="enable_popup">False</property>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow5">
<property name="border_width">12</property>
<widget class="GtkVBox" id="vbox32">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkViewport" id="viewport1">
<widget class="GtkScrolledWindow" id="scrolledwindow5">
<property name="border_width">12</property>
<property name="visible">True</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkVBox" id="streamsVBox">
<widget class="GtkViewport" id="viewport1">
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<property name="shadow_type">GTK_SHADOW_IN</property>
<child>
<widget class="GtkLabel" id="noStreamsLabel">
<widget class="GtkVBox" id="streamsVBox">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="label" translatable="yes">&lt;i&gt;No Streams Available&lt;/i&gt;</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</property>
<property name="yalign">0.5</property>
<property name="xpad">16</property>
<property name="ypad">16</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>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child>
<widget class="GtkLabel" id="noStreamsLabel">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="label" translatable="yes">&lt;i&gt;No Streams Available&lt;/i&gt;</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</property>
<property name="yalign">0.5</property>
<property name="xpad">16</property>
<property name="ypad">16</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>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</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>
@ -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>