From 4d38b0a057c9c78c3e400c953b6ab5ea6d2a37b0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 12 Aug 2004 23:26:31 +0000 Subject: add support for listing clients and modules git-svn-id: file:///home/lennart/svn/public/paman/trunk@5 cdefa82f-4ce1-0310-97f5-ab6066f37c3c --- SourceWindow.cc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'SourceWindow.cc') diff --git a/SourceWindow.cc b/SourceWindow.cc index e91f8be..b5119d9 100644 --- a/SourceWindow.cc +++ b/SourceWindow.cc @@ -12,7 +12,8 @@ SourceWindow::SourceWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("nameLabel", nameLabel); refGlade->get_widget("descriptionLabel", descriptionLabel); @@ -22,9 +23,11 @@ SourceWindow::SourceWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("monitorOfSinkLabel", monitorOfSinkLabel); refGlade->get_widget("closeButton", closeButton); refGlade->get_widget("toParentSinkButton", toParentSinkButton); - + refGlade->get_widget("toOwnerModuleButton", toOwnerModuleButton); + closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceWindow::onCloseButton)); toParentSinkButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceWindow::onParentSinkButton)); + toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceWindow::onToOwnerModuleButton)); } SourceWindow* SourceWindow::create() { @@ -49,7 +52,7 @@ void SourceWindow::updateInfo(const SourceInfo &i) { monitorOfSinkLabel->set_markup("n/a"); toParentSinkButton->set_sensitive(false); if (i.monitor_of_sink != (uint32_t) -1) { - SinkInfo *sink = serverInfo->getSinkInfo(i.monitor_of_sink); + SinkInfo *sink = serverInfoManager->getSinkInfo(i.monitor_of_sink); if (sink) { monitorOfSinkLabel->set_text(sink->name); toParentSinkButton->set_sensitive(true); @@ -59,6 +62,9 @@ void SourceWindow::updateInfo(const SourceInfo &i) { monitor_of_sink = i.monitor_of_sink; set_title("Source: "+i.name); + + owner_module = i.owner_module; + toOwnerModuleButton->set_sensitive(owner_module != (uint32_t) -1); } void SourceWindow::onCloseButton() { @@ -67,5 +73,10 @@ void SourceWindow::onCloseButton() { void SourceWindow::onParentSinkButton() { if (monitor_of_sink != (uint32_t) -1) - serverInfo->showSinkWindow(monitor_of_sink); + serverInfoManager->showSinkWindow(monitor_of_sink); +} + +void SourceWindow::onToOwnerModuleButton() { + if (owner_module != (uint32_t) -1) + serverInfoManager->showModuleWindow(owner_module); } -- cgit