diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-08-16 19:55:43 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-08-16 19:55:43 +0000 |
commit | 7b738b897f6e523024faadef9c1efb6a9aa32f59 (patch) | |
tree | bf003526bb2e10732f8c8eea26981714e35fe872 | |
parent | b3f41bd9945792ac7869db78fd75983546222622 (diff) |
add sink input/source output support (currently broken)
git-svn-id: file:///home/lennart/svn/public/paman/trunk@12 cdefa82f-4ce1-0310-97f5-ab6066f37c3c
-rw-r--r-- | src/MainWindow.cc | 59 | ||||
-rw-r--r-- | src/MainWindow.hh | 6 | ||||
-rw-r--r-- | src/Makefile.am | 4 | ||||
-rw-r--r-- | src/ServerInfoManager.cc | 172 | ||||
-rw-r--r-- | src/ServerInfoManager.hh | 57 | ||||
-rw-r--r-- | src/SinkInputWindow.cc | 102 | ||||
-rw-r--r-- | src/SinkInputWindow.hh | 26 | ||||
-rw-r--r-- | src/SourceOutputWindow.cc | 108 | ||||
-rw-r--r-- | src/SourceOutputWindow.hh | 37 | ||||
-rw-r--r-- | src/paman.glade | 1076 |
10 files changed, 1505 insertions, 142 deletions
diff --git a/src/MainWindow.cc b/src/MainWindow.cc index fdb817a..26a3b90 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -12,6 +12,8 @@ enum { ROW_TYPE_SOURCE_CATEGORY, ROW_TYPE_SINK, ROW_TYPE_SOURCE, + ROW_TYPE_SINK_INPUT, + ROW_TYPE_SOURCE_OUTPUT, }; MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : @@ -136,6 +138,44 @@ void MainWindow::updateInfo(ModuleInfo &i) { moduleOpenButton->set_sensitive(true); } +void MainWindow::updateInfo(SinkInputInfo &i) { + if (!i.treeRef) { + SinkInfo *si = serverInfoManager->getSinkInfo(i.sink); + if (!si) + return; + + Gtk::TreeIter iter = deviceTreeStore->get_iter(si->treeRef.get_path()); + i.treeRef = Gtk::TreeRowReference(deviceTreeStore, Gtk::TreePath(deviceTreeStore->append(iter->children()))); + } + + Gtk::TreeRow row = *(deviceTreeStore->get_iter(i.treeRef.get_path())); + row[deviceTreeModelColumns.name] = i.name; + row[deviceTreeModelColumns.index] = i.index; + row[deviceTreeModelColumns.type] = ROW_TYPE_SINK_INPUT; + + deviceTreeView->expand_row(sinkRef.get_path(), true); + onDeviceTreeViewCursorChanged(); +} + +void MainWindow::updateInfo(SourceOutputInfo &i) { + if (!i.treeRef) { + SourceInfo *si = serverInfoManager->getSourceInfo(i.source); + if (!si) + return; + + Gtk::TreeIter iter = deviceTreeStore->get_iter(si->treeRef.get_path()); + i.treeRef = Gtk::TreeRowReference(deviceTreeStore, Gtk::TreePath(deviceTreeStore->append(iter->children()))); + } + + Gtk::TreeRow row = *(deviceTreeStore->get_iter(i.treeRef.get_path())); + row[deviceTreeModelColumns.name] = i.name; + row[deviceTreeModelColumns.index] = i.index; + row[deviceTreeModelColumns.type] = ROW_TYPE_SOURCE_OUTPUT; + + deviceTreeView->expand_row(sinkRef.get_path(), true); + onDeviceTreeViewCursorChanged(); +} + void MainWindow::removeInfo(SinkInfo &i) { if (i.treeRef) deviceTreeStore->erase(deviceTreeStore->get_iter(i.treeRef.get_path())); @@ -164,6 +204,21 @@ void MainWindow::removeInfo(ModuleInfo &i) { moduleOpenButton->set_sensitive(!moduleTreeStore->children().empty()); } +void MainWindow::removeInfo(SourceOutputInfo &i) { + if (!i.treeRef) + deviceTreeStore->erase(deviceTreeStore->get_iter(i.treeRef.get_path())); + + onDeviceTreeViewCursorChanged(); +} + +void MainWindow::removeInfo(SinkInputInfo &i) { + if (!i.treeRef) + deviceTreeStore->erase(deviceTreeStore->get_iter(i.treeRef.get_path())); + + onDeviceTreeViewCursorChanged(); +} + + void MainWindow::onDeviceTreeViewCursorChanged() { Gtk::TreeModel::Path p; Gtk::TreeViewColumn *c; @@ -271,6 +326,10 @@ void MainWindow::showDeviceWindow(const Gtk::TreePath &p) { serverInfoManager->showSinkWindow(row[deviceTreeModelColumns.index]); else if (row[deviceTreeModelColumns.type] == ROW_TYPE_SOURCE) serverInfoManager->showSourceWindow(row[deviceTreeModelColumns.index]); + else if (row[deviceTreeModelColumns.type] == ROW_TYPE_SINK_INPUT) + serverInfoManager->showSinkInputWindow(row[deviceTreeModelColumns.index]); + else if (row[deviceTreeModelColumns.type] == ROW_TYPE_SOURCE_OUTPUT) + serverInfoManager->showSourceOutputWindow(row[deviceTreeModelColumns.index]); } void MainWindow::showClientWindow(const Gtk::TreePath &p) { diff --git a/src/MainWindow.hh b/src/MainWindow.hh index 0157f9c..d843acf 100644 --- a/src/MainWindow.hh +++ b/src/MainWindow.hh @@ -89,12 +89,16 @@ public: virtual void updateInfo(SourceInfo &i); virtual void updateInfo(ClientInfo &i); virtual void updateInfo(ModuleInfo &i); + virtual void updateInfo(SinkInputInfo &i); + virtual void updateInfo(SourceOutputInfo &i); virtual void removeInfo(SinkInfo &i); virtual void removeInfo(SourceInfo &i); virtual void removeInfo(ClientInfo &i); virtual void removeInfo(ModuleInfo &i); - + virtual void removeInfo(SinkInputInfo &i); + virtual void removeInfo(SourceOutputInfo &i); + virtual void onDeviceTreeViewCursorChanged(); virtual void onDeviceTreeViewRowActivated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* /* column */); virtual void onClientTreeViewRowActivated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* /* column */); diff --git a/src/Makefile.am b/src/Makefile.am index ff42d0e..82f61d6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,7 +7,9 @@ paman_SOURCES=MainWindow.cc MainWindow.hh \ ServerInfoManager.cc ServerInfoManager.hh \ paman.cc paman.hh \ ClientWindow.cc ClientWindow.hh \ - ModuleWindow.cc ModuleWindow.hh + ModuleWindow.cc ModuleWindow.hh \ + SinkInputWindow.cc SinkInputWindow.hh \ + SourceOutputWindow.cc SourceOutputWindow.hh paman_LDADD=$(AM_LDADD) $(GUILIBS_LIBS) $(POLYP_LIBS) paman_CXXFLAGS=$(AM_CXXFLAGS) $(GUILIBS_CFLAGS) $(POLYP_CFLAGS) diff --git a/src/ServerInfoManager.cc b/src/ServerInfoManager.cc index c816f21..f271354 100644 --- a/src/ServerInfoManager.cc +++ b/src/ServerInfoManager.cc @@ -159,12 +159,96 @@ void ModuleInfo::showWindow() { } } +SinkInputInfo::SinkInputInfo(const struct pa_sink_input_info &i) : + name(i.name), + index(i.index), + sample_spec(i.sample_spec), + sink(i.sink), + client(i.client), + owner_module(i.owner_module), + volume(i.volume), + latency(i.latency), + window(NULL) { +} + +SinkInputInfo::~SinkInputInfo() { + if (window) + delete window; +} + +void SinkInputInfo::update(const struct pa_sink_input_info &i) { + name = i.name; + index = i.index; + sample_spec = i.sample_spec; + sink = i.sink; + client = i.client; + owner_module = i.owner_module; + volume = i.volume; + latency = i.latency; + + if (window) + window->updateInfo(*this); + g_assert(mainWindow); + mainWindow->updateInfo(*this); +} + +void SinkInputInfo::showWindow() { + if (window) + window->present(); + else { + window = SinkInputWindow::create(); + window->updateInfo(*this); + window->show(); + } +} + +SourceOutputInfo::SourceOutputInfo(const struct pa_source_output_info &i) : + name(i.name), + index(i.index), + sample_spec(i.sample_spec), + source(source), + client(client), + owner_module(owner_module), + window(NULL) { +} + +SourceOutputInfo::~SourceOutputInfo() { + if (window) + delete window; +} + +void SourceOutputInfo::update(const struct pa_source_output_info &i) { + index = i.index; + name = i.name; + sample_spec = i.sample_spec; + source = i.source; + client = i.client; + owner_module = i.owner_module; + + if (window) + window->updateInfo(*this); + g_assert(mainWindow); + mainWindow->updateInfo(*this); +} + +void SourceOutputInfo::showWindow() { + if (window) + window->present(); + else { + window = SourceOutputWindow::create(); + window->updateInfo(*this); + window->show(); + } +} + extern "C" { static void server_info_callback(struct pa_context *c, const struct pa_server_info *i, void *userdata); static void sink_info_callback(struct pa_context *c, const struct pa_sink_info *i, int is_last, void *userdata); static void source_info_callback(struct pa_context *c, const struct pa_source_info *i, int is_last, void *userdata); static void client_info_callback(struct pa_context *c, const struct pa_client_info *i, int is_last, void *userdata); static void module_info_callback(struct pa_context *c, const struct pa_module_info *i, int is_last, void *userdata); + static void sink_input_info_callback(struct pa_context *c, const struct pa_sink_input_info *i, int is_last, void *userdata); + static void source_output_info_callback(struct pa_context *c, const struct pa_source_output_info *i, int is_last, void *userdata); static void subscribe_callback(struct pa_context *c, enum pa_subscription_event_type t, uint32_t index, void *userdata); }; @@ -199,6 +283,16 @@ static void module_info_callback(struct pa_context *c, const struct pa_module_in if (i) si->updateInfo(*i); } +static void sink_input_info_callback(struct pa_context *c, const struct pa_sink_input_info *i, int is_last, void *userdata) { + ServerInfoManager *si = (ServerInfoManager*) userdata; + if (i) si->updateInfo(*i); +} + +static void source_output_info_callback(struct pa_context *c, const struct pa_source_output_info *i, int is_last, void *userdata) { + ServerInfoManager *si = (ServerInfoManager*) userdata; + if (i) si->updateInfo(*i); +} + static void subscribe_callback(struct pa_context *c, enum pa_subscription_event_type t, uint32_t index, void *userdata) { ServerInfoManager *si = (ServerInfoManager*) userdata; @@ -230,13 +324,19 @@ static void subscribe_callback(struct pa_context *c, enum pa_subscription_event_ pa_operation_unref(pa_context_get_client_info(c, index, client_info_callback, si)); break; case PA_SUBSCRIPTION_EVENT_SINK_INPUT: -// fprintf(stderr, "SINK INPUT EVENT\n"); + if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) + si->removeSinkInputInfo(index); + else + pa_operation_unref(pa_context_get_sink_input_info(c, index, sink_input_info_callback, si)); break; case PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT: -// fprintf(stderr, "SOURCE OUTPUT EVENT\n"); + if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) + si->removeSourceOutputInfo(index); + else + pa_operation_unref(pa_context_get_source_output_info(c, index, source_output_info_callback, si)); break; default: -// fprintf(stderr, "OTHER EVENT\n"); + fprintf(stderr, "OTHER EVENT\n"); break; } } @@ -248,6 +348,8 @@ ServerInfoManager::ServerInfoManager(struct pa_context &c) : pa_operation_unref(pa_context_get_source_info_list(&c, source_info_callback, this)); pa_operation_unref(pa_context_get_module_info_list(&c, module_info_callback, this)); pa_operation_unref(pa_context_get_client_info_list(&c, client_info_callback, this)); + pa_operation_unref(pa_context_get_sink_input_info_list(&c, sink_input_info_callback, this)); + pa_operation_unref(pa_context_get_source_output_info_list(&c, source_output_info_callback, this)); pa_context_set_subscribe_callback(&c, subscribe_callback, this); @@ -273,6 +375,12 @@ ServerInfoManager::~ServerInfoManager() { for (std::map<int, ModuleInfo*>::iterator i = modules.begin(); i != modules.end(); i++) delete i->second; + + for (std::map<int, SinkInputInfo*>::iterator i = sinkInputs.begin(); i != sinkInputs.end(); i++) + delete i->second; + + for (std::map<int, SourceOutputInfo*>::iterator i = sourceOutputs.begin(); i != sourceOutputs.end(); i++) + delete i->second; } void ServerInfoManager::updateInfo(const struct pa_sink_info &i) { @@ -319,6 +427,28 @@ void ServerInfoManager::updateInfo(const struct pa_module_info &i) { } } +void ServerInfoManager::updateInfo(const struct pa_sink_input_info &i) { + SinkInputInfo *si; + if ((si = sinkInputs[i.index])) + si->update(i); + else { + SinkInputInfo *n = new SinkInputInfo(i); + sinkInputs[i.index] = n; + mainWindow->updateInfo(*n); + } +} + +void ServerInfoManager::updateInfo(const struct pa_source_output_info &i) { + SourceOutputInfo *si; + if ((si = sourceOutputs[i.index])) + si->update(i); + else { + SourceOutputInfo *n = new SourceOutputInfo(i); + sourceOutputs[i.index] = n; + mainWindow->updateInfo(*n); + } +} + void ServerInfoManager::showSinkWindow(uint32_t index) { SinkInfo *i; @@ -347,6 +477,20 @@ void ServerInfoManager::showModuleWindow(uint32_t index) { i->showWindow(); } +void ServerInfoManager::showSinkInputWindow(uint32_t index) { + SinkInputInfo *i; + + if ((i = sinkInputs[index])) + i->showWindow(); +} + +void ServerInfoManager::showSourceOutputWindow(uint32_t index) { + SourceOutputInfo *i; + + if ((i = sourceOutputs[index])) + i->showWindow(); +} + SourceInfo* ServerInfoManager::getSourceInfo(uint32_t index) { return sources[index]; @@ -402,6 +546,28 @@ void ServerInfoManager::removeModuleInfo(uint32_t index) { } } +void ServerInfoManager::removeSinkInputInfo(uint32_t index) { + SinkInputInfo *i; + if ((i = sinkInputs[index])) { + sinkInputs.erase(index); + mainWindow->removeInfo(*i); + delete i; + } +} + +void ServerInfoManager::removeSourceOutputInfo(uint32_t index) { + SourceOutputInfo *i; + if ((i = sourceOutputs[index])) { + sourceOutputs.erase(index); + mainWindow->removeInfo(*i); + delete i; + } +} + void ServerInfoManager::setSinkVolume(uint32_t index, uint32_t volume) { pa_operation_unref(pa_context_set_sink_volume_by_index(&context, index, volume, NULL, NULL)); } + +void ServerInfoManager::setSinkInputVolume(uint32_t index, uint32_t volume) { + pa_operation_unref(pa_context_set_sink_input_volume(&context, index, volume, NULL, NULL)); +} diff --git a/src/ServerInfoManager.hh b/src/ServerInfoManager.hh index 5c22f64..ba07800 100644 --- a/src/ServerInfoManager.hh +++ b/src/ServerInfoManager.hh @@ -11,12 +11,16 @@ class SourceInfo; class ServerInfo; class ClientInfo; class ModuleInfo; +class SinkInputInfo; +class SourceOutputInfo; #include "SinkWindow.hh" #include "SourceWindow.hh" #include "ClientWindow.hh" #include "ModuleWindow.hh" #include "MainWindow.hh" +#include "SinkInputWindow.hh" +#include "SourceOutputWindow.hh" class SinkInfo { public: @@ -91,6 +95,50 @@ public: ClientWindow *window; }; +class SinkInputInfo { +public: + + SinkInputInfo(const struct pa_sink_input_info &i); + ~SinkInputInfo(); + + void update(const struct pa_sink_input_info &i); + void showWindow(); + + Glib::ustring name; + uint32_t index; + struct pa_sample_spec sample_spec; + uint32_t sink; + uint32_t client; + uint32_t owner_module; + uint32_t volume; + uint32_t latency; + + Gtk::TreeRowReference treeRef; + + SinkInputWindow *window; +}; + +class SourceOutputInfo { +public: + + SourceOutputInfo(const struct pa_source_output_info &i); + ~SourceOutputInfo(); + + void update(const struct pa_source_output_info &i); + void showWindow(); + + Glib::ustring name; + uint32_t index; + struct pa_sample_spec sample_spec; + uint32_t source; + uint32_t client; + uint32_t owner_module; + + Gtk::TreeRowReference treeRef; + + SourceOutputWindow *window; +}; + class ServerInfoManager { public: ServerInfoManager(struct pa_context &c); @@ -100,11 +148,15 @@ public: void updateInfo(const struct pa_source_info &i); void updateInfo(const struct pa_client_info &i); void updateInfo(const struct pa_module_info &i); + void updateInfo(const struct pa_sink_input_info &i); + void updateInfo(const struct pa_source_output_info &i); void showSinkWindow(uint32_t index); void showSourceWindow(uint32_t index); void showClientWindow(uint32_t index); void showModuleWindow(uint32_t index); + void showSinkInputWindow(uint32_t index); + void showSourceOutputWindow(uint32_t index); SourceInfo* getSourceInfo(uint32_t index); SinkInfo* getSinkInfo(uint32_t index); @@ -115,14 +167,19 @@ public: void removeSourceInfo(uint32_t index); void removeClientInfo(uint32_t index); void removeModuleInfo(uint32_t index); + void removeSinkInputInfo(uint32_t index); + void removeSourceOutputInfo(uint32_t index); void setSinkVolume(uint32_t index, uint32_t volume); + void setSinkInputVolume(uint32_t index, uint32_t volume); protected: std::map<int, SinkInfo*> sinks; std::map<int, SourceInfo*> sources; std::map<int, ClientInfo*> clients; std::map<int, ModuleInfo*> modules; + std::map<int, SinkInputInfo*> sinkInputs; + std::map<int, SourceOutputInfo*> sourceOutputs; struct pa_context &context; }; diff --git a/src/SinkInputWindow.cc b/src/SinkInputWindow.cc index 68d3ec4..7baa13c 100644 --- a/src/SinkInputWindow.cc +++ b/src/SinkInputWindow.cc @@ -1,111 +1,131 @@ #include <iostream> #include "paman.hh" -#include "SinkWindow.hh" +#include "SinkInputWindow.hh" -#define GLADE_NAME "sinkWindow" +#define GLADE_NAME "sinkInputWindow" -SinkWindow::SinkWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : +SinkInputWindow::SinkInputWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : Gtk::Window(cobject), nameLabel(NULL), - descriptionLabel(NULL), indexLabel(NULL), sampleTypeLabel(NULL), latencyLabel(NULL), + sinkLabel(NULL), + clientLabel(NULL), ownerModuleLabel(NULL), - monitorSourceLabel(NULL), volumeLabel(NULL), closeButton(NULL), - toMonitorSourceButton(NULL), toOwnerModuleButton(NULL), + toClientButton(NULL), + toSinkButton(NULL), volumeResetButton(NULL), volumeMuteButton(NULL), volumeScale(NULL) { refGlade->get_widget("nameLabel", nameLabel); - refGlade->get_widget("descriptionLabel", descriptionLabel); refGlade->get_widget("indexLabel", indexLabel); refGlade->get_widget("sampleTypeLabel", sampleTypeLabel); refGlade->get_widget("latencyLabel", latencyLabel); + refGlade->get_widget("sinkLabel", sinkLabel); + refGlade->get_widget("clientLabel", clientLabel); refGlade->get_widget("ownerModuleLabel", ownerModuleLabel); - refGlade->get_widget("monitorSourceLabel", monitorSourceLabel); refGlade->get_widget("closeButton", closeButton); - refGlade->get_widget("toMonitorSourceButton", toMonitorSourceButton); refGlade->get_widget("toOwnerModuleButton", toOwnerModuleButton); + refGlade->get_widget("toClientButton", toClientButton); + refGlade->get_widget("toSinkButton", toSinkButton); refGlade->get_widget("volumeLabel", volumeLabel); refGlade->get_widget("volumeScale", volumeScale); refGlade->get_widget("volumeResetButton", volumeResetButton); refGlade->get_widget("volumeMuteButton", volumeMuteButton); - closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onCloseButton)); - toMonitorSourceButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onToMonitorSourceButton)); - toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onToOwnerModuleButton)); - volumeScale->signal_value_changed().connect(sigc::mem_fun(*this, &SinkWindow::onVolumeScaleValueChanged)); - volumeResetButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onVolumeResetButton)); - volumeMuteButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onVolumeMuteButton)); + closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkInputWindow::onCloseButton)); + toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkInputWindow::onToOwnerModuleButton)); + toClientButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkInputWindow::onToClientButton)); + toSinkButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkInputWindow::onToSinkButton)); + volumeScale->signal_value_changed().connect(sigc::mem_fun(*this, &SinkInputWindow::onVolumeScaleValueChanged)); + volumeResetButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkInputWindow::onVolumeResetButton)); + volumeMuteButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkInputWindow::onVolumeMuteButton)); } -SinkWindow* SinkWindow::create() { - SinkWindow *w = NULL; +SinkInputWindow* SinkInputWindow::create() { + SinkInputWindow *w = NULL; Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLADE_FILE, GLADE_NAME); refXml->get_widget_derived(GLADE_NAME, w); return w; } -void SinkWindow::updateInfo(const SinkInfo &i) { +void SinkInputWindow::updateInfo(const SinkInputInfo &i) { char t[20], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; nameLabel->set_text(i.name); - descriptionLabel->set_text(i.description); snprintf(t, sizeof(t), "#%u", i.index); indexLabel->set_text(t); pa_sample_snprint(ss, sizeof(ss), &i.sample_spec); sampleTypeLabel->set_text(ss); - snprintf(t, sizeof(t), "#%u", i.owner_module); - ownerModuleLabel->set_text(t); + + if (i.owner_module == PA_INVALID_INDEX) + ownerModuleLabel->set_markup("<i>n/a</i>"); + else { + snprintf(t, sizeof(t), "#%u", i.owner_module); + ownerModuleLabel->set_text(t); + } snprintf(t, sizeof(t), "%u usec", i.latency); latencyLabel->set_text(t); - SourceInfo *source = serverInfoManager->getSourceInfo(i.monitor_source); - monitorSourceLabel->set_text(source->name); + SinkInfo *sink = serverInfoManager->getSinkInfo(i.sink); + sinkLabel->set_text(sink->name); + + if (i.client == PA_INVALID_INDEX) + clientLabel->set_markup("<i>n/a</i>"); + else { + ClientInfo *client = serverInfoManager->getClientInfo(i.client); + clientLabel->set_text(client->name); + } - volumeScale->set_value(((double) i.volume / 0x100) * 100); - snprintf(t, sizeof(t), "%u%%", (i.volume*100)/0x100); + volumeScale->set_value((double) i.volume * 100 / 0x100); + snprintf(t, sizeof(t), "%u%%", (i.volume * 100)/ 0x100); volumeLabel->set_text(t); - set_title("Sink: "+i.name); - - monitor_source = i.monitor_source; + set_title("Sink Input: "+i.name); + + this->sink = i.sink; + client = i.client; owner_module = i.owner_module; index = i.index; - toOwnerModuleButton->set_sensitive(owner_module != (uint32_t) -1); + toOwnerModuleButton->set_sensitive(owner_module != PA_INVALID_INDEX); + toClientButton->set_sensitive(client != PA_INVALID_INDEX); } -void SinkWindow::onCloseButton() { +void SinkInputWindow::onCloseButton() { hide(); } -void SinkWindow::onToMonitorSourceButton() { - serverInfoManager->showSourceWindow(monitor_source); +void SinkInputWindow::onToOwnerModuleButton() { + if (owner_module != PA_INVALID_INDEX) + serverInfoManager->showModuleWindow(owner_module); } -void SinkWindow::onToOwnerModuleButton() { - if (owner_module != (uint32_t) -1) - serverInfoManager->showModuleWindow(owner_module); +void SinkInputWindow::onToSinkButton() { + serverInfoManager->showSinkWindow(sink); +} + +void SinkInputWindow::onToClientButton() { + serverInfoManager->showClientWindow(client); } -void SinkWindow::onVolumeScaleValueChanged() { - serverInfoManager->setSinkVolume(index, (uint32_t) ((volumeScale->get_value()*0x100)/100)); +void SinkInputWindow::onVolumeScaleValueChanged() { + serverInfoManager->setSinkInputVolume(index, (uint32_t) ((volumeScale->get_value()*0x100)/100)); } -void SinkWindow::onVolumeResetButton() { - serverInfoManager->setSinkVolume(index, PA_VOLUME_NORM); +void SinkInputWindow::onVolumeResetButton() { + serverInfoManager->setSinkInputVolume(index, PA_VOLUME_NORM); } -void SinkWindow::onVolumeMuteButton() { - serverInfoManager->setSinkVolume(index, PA_VOLUME_MUTE); +void SinkInputWindow::onVolumeMuteButton() { + serverInfoManager->setSinkInputVolume(index, PA_VOLUME_MUTE); } diff --git a/src/SinkInputWindow.hh b/src/SinkInputWindow.hh index b0417aa..aaf76f4 100644 --- a/src/SinkInputWindow.hh +++ b/src/SinkInputWindow.hh @@ -1,42 +1,44 @@ -#ifndef foosinkwindowhhfoo -#define foosinkwindowhhfoo +#ifndef foosinkinputwindowhhfoo +#define foosinkinputwindowhhfoo #include <gtkmm.h> #include <libglademm.h> -class SinkWindow; +class SinkInputWindow; #include "ServerInfoManager.hh" -class SinkWindow : public Gtk::Window { +class SinkInputWindow : public Gtk::Window { public: - SinkWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade); - static SinkWindow* create(); + SinkInputWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade); + static SinkInputWindow* create(); Gtk::Label *nameLabel, - *descriptionLabel, *indexLabel, *sampleTypeLabel, *latencyLabel, + *sinkLabel, + *clientLabel, *ownerModuleLabel, - *monitorSourceLabel, *volumeLabel; Gtk::Button *closeButton, - *toMonitorSourceButton, *toOwnerModuleButton, + *toClientButton, + *toSinkButton, *volumeResetButton, *volumeMuteButton; Gtk::HScale *volumeScale; - uint32_t index, owner_module, monitor_source; + uint32_t index, owner_module, sink, client; - void updateInfo(const SinkInfo &i); + void updateInfo(const SinkInputInfo &i); virtual void onCloseButton(); - virtual void onToMonitorSourceButton(); virtual void onToOwnerModuleButton(); + virtual void onToClientButton(); + virtual void onToSinkButton(); virtual void onVolumeScaleValueChanged(); virtual void onVolumeResetButton(); virtual void onVolumeMuteButton(); diff --git a/src/SourceOutputWindow.cc b/src/SourceOutputWindow.cc index 68d3ec4..fd5ae35 100644 --- a/src/SourceOutputWindow.cc +++ b/src/SourceOutputWindow.cc @@ -1,111 +1,99 @@ #include <iostream> #include "paman.hh" -#include "SinkWindow.hh" +#include "SourceOutputWindow.hh" -#define GLADE_NAME "sinkWindow" +#define GLADE_NAME "sourceOutputWindow" -SinkWindow::SinkWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : +SourceOutputWindow::SourceOutputWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : Gtk::Window(cobject), nameLabel(NULL), - descriptionLabel(NULL), indexLabel(NULL), sampleTypeLabel(NULL), - latencyLabel(NULL), + sourceLabel(NULL), + clientLabel(NULL), ownerModuleLabel(NULL), - monitorSourceLabel(NULL), - volumeLabel(NULL), closeButton(NULL), - toMonitorSourceButton(NULL), toOwnerModuleButton(NULL), - volumeResetButton(NULL), - volumeMuteButton(NULL), - volumeScale(NULL) { + toClientButton(NULL), + toSourceButton(NULL) { refGlade->get_widget("nameLabel", nameLabel); - refGlade->get_widget("descriptionLabel", descriptionLabel); refGlade->get_widget("indexLabel", indexLabel); refGlade->get_widget("sampleTypeLabel", sampleTypeLabel); - refGlade->get_widget("latencyLabel", latencyLabel); + refGlade->get_widget("sourceLabel", sourceLabel); + refGlade->get_widget("clientLabel", clientLabel); refGlade->get_widget("ownerModuleLabel", ownerModuleLabel); - refGlade->get_widget("monitorSourceLabel", monitorSourceLabel); refGlade->get_widget("closeButton", closeButton); - refGlade->get_widget("toMonitorSourceButton", toMonitorSourceButton); refGlade->get_widget("toOwnerModuleButton", toOwnerModuleButton); - refGlade->get_widget("volumeLabel", volumeLabel); - refGlade->get_widget("volumeScale", volumeScale); - refGlade->get_widget("volumeResetButton", volumeResetButton); - refGlade->get_widget("volumeMuteButton", volumeMuteButton); - - closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onCloseButton)); - toMonitorSourceButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onToMonitorSourceButton)); - toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onToOwnerModuleButton)); - volumeScale->signal_value_changed().connect(sigc::mem_fun(*this, &SinkWindow::onVolumeScaleValueChanged)); - volumeResetButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onVolumeResetButton)); - volumeMuteButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onVolumeMuteButton)); + refGlade->get_widget("toClientButton", toClientButton); + refGlade->get_widget("toSourceButton", toSourceButton); + + closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceOutputWindow::onCloseButton)); + toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceOutputWindow::onToOwnerModuleButton)); + toClientButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceOutputWindow::onToClientButton)); + toSourceButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceOutputWindow::onToSourceButton)); } -SinkWindow* SinkWindow::create() { - SinkWindow *w = NULL; +SourceOutputWindow* SourceOutputWindow::create() { + SourceOutputWindow *w = NULL; Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLADE_FILE, GLADE_NAME); refXml->get_widget_derived(GLADE_NAME, w); return w; } -void SinkWindow::updateInfo(const SinkInfo &i) { +void SourceOutputWindow::updateInfo(const SourceOutputInfo &i) { char t[20], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; nameLabel->set_text(i.name); - descriptionLabel->set_text(i.description); snprintf(t, sizeof(t), "#%u", i.index); indexLabel->set_text(t); pa_sample_snprint(ss, sizeof(ss), &i.sample_spec); sampleTypeLabel->set_text(ss); - snprintf(t, sizeof(t), "#%u", i.owner_module); - ownerModuleLabel->set_text(t); - snprintf(t, sizeof(t), "%u usec", i.latency); - latencyLabel->set_text(t); + if (i.owner_module == PA_INVALID_INDEX) + ownerModuleLabel->set_markup("<i>n/a</i>"); + else { + snprintf(t, sizeof(t), "#%u", i.owner_module); + ownerModuleLabel->set_text(t); + } - SourceInfo *source = serverInfoManager->getSourceInfo(i.monitor_source); - monitorSourceLabel->set_text(source->name); + SourceInfo *source = serverInfoManager->getSourceInfo(i.source); + sourceLabel->set_text(source->name); - volumeScale->set_value(((double) i.volume / 0x100) * 100); - snprintf(t, sizeof(t), "%u%%", (i.volume*100)/0x100); - volumeLabel->set_text(t); - - set_title("Sink: "+i.name); + if (i.client == PA_INVALID_INDEX) + clientLabel->set_markup("<i>n/a</i>"); + else { + ClientInfo *client = serverInfoManager->getClientInfo(i.client); + clientLabel->set_text(client->name); + } + + set_title("Source Output: "+i.name); - monitor_source = i.monitor_source; + this->source = i.source; owner_module = i.owner_module; - index = i.index; + client = i.client; - toOwnerModuleButton->set_sensitive(owner_module != (uint32_t) -1); + toOwnerModuleButton->set_sensitive(owner_module != PA_INVALID_INDEX); + toClientButton->set_sensitive(client != PA_INVALID_INDEX); } -void SinkWindow::onCloseButton() { +void SourceOutputWindow::onCloseButton() { hide(); } -void SinkWindow::onToMonitorSourceButton() { - serverInfoManager->showSourceWindow(monitor_source); -} - -void SinkWindow::onToOwnerModuleButton() { - if (owner_module != (uint32_t) -1) +void SourceOutputWindow::onToOwnerModuleButton() { + if (owner_module != PA_INVALID_INDEX) serverInfoManager->showModuleWindow(owner_module); } -void SinkWindow::onVolumeScaleValueChanged() { - serverInfoManager->setSinkVolume(index, (uint32_t) ((volumeScale->get_value()*0x100)/100)); -} - -void SinkWindow::onVolumeResetButton() { - serverInfoManager->setSinkVolume(index, PA_VOLUME_NORM); +void SourceOutputWindow::onToClientButton() { + if (client != PA_INVALID_INDEX) + serverInfoManager->showClientWindow(client); } -void SinkWindow::onVolumeMuteButton() { - serverInfoManager->setSinkVolume(index, PA_VOLUME_MUTE); +void SourceOutputWindow::onToSourceButton() { + if (source != PA_INVALID_INDEX) + serverInfoManager->showSourceWindow(source); } - diff --git a/src/SourceOutputWindow.hh b/src/SourceOutputWindow.hh index b0417aa..a98a9d0 100644 --- a/src/SourceOutputWindow.hh +++ b/src/SourceOutputWindow.hh @@ -1,45 +1,38 @@ -#ifndef foosinkwindowhhfoo -#define foosinkwindowhhfoo +#ifndef foosourceoutputwindowhhfoo +#define foosourceoutputwindowhhfoo #include <gtkmm.h> #include <libglademm.h> -class SinkWindow; +class SourceOutputWindow; #include "ServerInfoManager.hh" -class SinkWindow : public Gtk::Window { +class SourceOutputWindow : public Gtk::Window { public: - SinkWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade); - static SinkWindow* create(); + SourceOutputWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade); + static SourceOutputWindow* create(); Gtk::Label *nameLabel, - *descriptionLabel, *indexLabel, *sampleTypeLabel, - *latencyLabel, - *ownerModuleLabel, - *monitorSourceLabel, - *volumeLabel; + *sourceLabel, + *clientLabel, + *ownerModuleLabel; Gtk::Button *closeButton, - *toMonitorSourceButton, *toOwnerModuleButton, - *volumeResetButton, - *volumeMuteButton; + *toClientButton, + *toSourceButton; - Gtk::HScale *volumeScale; - - uint32_t index, owner_module, monitor_source; + uint32_t owner_module, source, client; - void updateInfo(const SinkInfo &i); + void updateInfo(const SourceOutputInfo &i); virtual void onCloseButton(); - virtual void onToMonitorSourceButton(); virtual void onToOwnerModuleButton(); - virtual void onVolumeScaleValueChanged(); - virtual void onVolumeResetButton(); - virtual void onVolumeMuteButton(); + virtual void onToClientButton(); + virtual void onToSourceButton(); }; #endif diff --git a/src/paman.glade b/src/paman.glade index e8915e9..464d278 100644 --- a/src/paman.glade +++ b/src/paman.glade @@ -1400,7 +1400,7 @@ <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">To Owner Module</property> + <property name="label" translatable="yes">Go To Owner Module</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> @@ -1412,7 +1412,7 @@ <property name="visible">True</property> <property name="can_default">True</property> <property name="can_focus">True</property> - <property name="label" translatable="yes">To Monitor Source</property> + <property name="label" translatable="yes">Go To Monitor Source</property> <property name="use_underline">True</property> <property name="relief">GTK_RELIEF_NORMAL</property> <property name="focus_on_click">True</property> @@ -2597,4 +2597,1076 @@ </child> </widget> +<widget class="GtkWindow" id="sinkInputWindow"> + <property name="title" translatable="yes">Sink Input</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + + <child> + <widget class="GtkVBox" id="vbox13"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkNotebook" id="notebook6"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="show_tabs">True</property> + <property name="show_border">True</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> + + <child> + <widget class="GtkVBox" id="vbox14"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkTable" id="table6"> + <property name="visible">True</property> + <property name="n_rows">8</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">10</property> + + <child> + <widget class="GtkLabel" id="label4747"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Name:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4748"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Index:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="nameLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4745</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="indexLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4746</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4749"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Sample Type:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4750"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Latency:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4751"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Owner Module:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4752"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Connected to Sink:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4753"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Client:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4754"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Volume:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="sampleTypeLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4755</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="latencyLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4756</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="sinkLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4757</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="clientLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4758</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="ownerModuleLabel"> + <property name="visible">True</property> + <property name="label" translatable="yes">label4759</property> + <property name="use_underline">False</property> + <property name="use_markup">False</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">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">6</property> + <property name="bottom_attach">7</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkHBox" id="hbox10"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkLabel" id="volumeLabel"> + <property name="width_request">40</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">100%</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">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkHScale" id="volumeScale"> + <property name="width_request">100</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="draw_value">False</property> + <property name="value_pos">GTK_POS_LEFT</property> + <property name="digits">0</property> + <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property> + <property name="inverted">False</property> + <property name="adjustment">147.692 0 500 10 100 20</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="volumeResetButton"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Reset to 100%, i.e. normal volume</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Reset</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkButton" id="volumeMuteButton"> + <property name="visible">True</property> + <property name="tooltip" translatable="yes">Mute to 0%, i.e. turn this sink off</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Mute</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NONE</property> + <property name="focus_on_click">True</property> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">7</property> + <property name="bottom_attach">8</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHButtonBox" id="hbuttonbox13"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_START</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkButton" id="toOwnerModuleButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Go To Owner Module</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="toClientButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Go To Client</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="toSinkButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Go To Sink</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</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> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4743"> + <property name="visible">True</property> + <property name="label" translatable="yes">Basic</property> + <property name="use_underline">False</property> + <property name="use_markup">False</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> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHButtonBox" id="hbuttonbox12"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkButton" id="closeButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-close</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> +</widget> + +<widget class="GtkWindow" id="sourceOutputWindow"> + <property name="title" translatable="yes">Source Output</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="resizable">False</property> + <property name="destroy_with_parent">False</property> + <property name="decorated">True</property> + <property name="skip_taskbar_hint">False</property> + <property name="skip_pager_hint">False</property> + <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + + <child> + <widget class="GtkVBox" id="vbox15"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkNotebook" id="notebook7"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="show_tabs">True</property> + <property name="show_border">True</property> + <property name="tab_pos">GTK_POS_TOP</property> + <property name="scrollable">False</property> + <property name="enable_popup">False</property> + + <child> + <widget class="GtkVBox" id="vbox16"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkTable" id="table7"> + <property name="visible">True</property> + <property name="n_rows">6</property> + <property name="n_columns">2</property> + <property name="homogeneous">False</property> + <property name="row_spacing">5</property> + <property name="column_spacing">10</property> + + <child> + <widget class="GtkLabel" id="label4760"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Name:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4761"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Index:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="nameLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4745</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">0</property> + <property name="bottom_attach">1</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="indexLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4746</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">1</property> + <property name="bottom_attach">2</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4764"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Sample Type:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="sampleTypeLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4755</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">2</property> + <property name="bottom_attach">3</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4767"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Connected to Source:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4768"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Client:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4766"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Owner Module:</b></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">1</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">0</property> + <property name="right_attach">1</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="sourceLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4757</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">3</property> + <property name="bottom_attach">4</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="clientLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4758</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">4</property> + <property name="bottom_attach">5</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="ownerModuleLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">label4759</property> + <property name="use_underline">False</property> + <property name="use_markup">False</property> + <property name="justify">GTK_JUSTIFY_LEFT</property> + <property name="wrap">False</property> + <property name="selectable">True</property> + <property name="xalign">0</property> + <property name="yalign">0.5</property> + <property name="xpad">0</property> + <property name="ypad">0</property> + </widget> + <packing> + <property name="left_attach">1</property> + <property name="right_attach">2</property> + <property name="top_attach">5</property> + <property name="bottom_attach">6</property> + <property name="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHButtonBox" id="hbuttonbox14"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_START</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkButton" id="toOwnerModuleButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Go To Owner Module</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="toClientButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Go To Client</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + + <child> + <widget class="GtkButton" id="toSourceButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">Go To Source</property> + <property name="use_underline">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</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> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4776"> + <property name="visible">True</property> + <property name="label" translatable="yes">Basic</property> + <property name="use_underline">False</property> + <property name="use_markup">False</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> + </widget> + <packing> + <property name="type">tab</property> + </packing> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHButtonBox" id="hbuttonbox15"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkButton" id="closeButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label">gtk-close</property> + <property name="use_stock">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + </widget> + </child> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> +</widget> + </glade-interface> |