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 --- ClientWindow.cc | 59 +++++++ ClientWindow.hh | 32 ++++ MainWindow.cc | 192 ++++++++++++++++------ MainWindow.hh | 50 +++++- Makefile | 2 +- ModuleWindow.cc | 58 +++++++ ModuleWindow.hh | 29 ++++ ServerInfo.cc | 249 +++++++++++++++++++++++------ ServerInfo.hh | 62 +++++-- SinkWindow.cc | 27 +++- SinkWindow.hh | 9 +- SourceWindow.cc | 19 ++- SourceWindow.hh | 6 +- paman.cc | 20 +-- paman.glade | 489 +++++++++++++++++++++++++++++++++++++++++++++++++++----- paman.hh | 2 +- 16 files changed, 1130 insertions(+), 175 deletions(-) create mode 100644 ClientWindow.cc create mode 100644 ClientWindow.hh create mode 100644 ModuleWindow.cc create mode 100644 ModuleWindow.hh diff --git a/ClientWindow.cc b/ClientWindow.cc new file mode 100644 index 0000000..88e2ad3 --- /dev/null +++ b/ClientWindow.cc @@ -0,0 +1,59 @@ +#include + +#include "paman.hh" +#include "ClientWindow.hh" + +#define GLADE_NAME "clientWindow" + +ClientWindow::ClientWindow(BaseObjectType* cobject, const Glib::RefPtr& refGlade) : + Gtk::Window(cobject), + nameLabel(NULL), + protocolLabel(NULL), + indexLabel(NULL), + ownerModuleLabel(NULL), + closeButton(NULL), + toOwnerModuleButton(NULL) { + + refGlade->get_widget("nameLabel", nameLabel); + refGlade->get_widget("protocolLabel", protocolLabel); + refGlade->get_widget("indexLabel", indexLabel); + refGlade->get_widget("ownerModuleLabel", ownerModuleLabel); + refGlade->get_widget("closeButton", closeButton); + refGlade->get_widget("toOwnerModuleButton", toOwnerModuleButton); + + closeButton->signal_clicked().connect(sigc::mem_fun(*this, &ClientWindow::onCloseButton)); + toOwnerModuleButton->signal_clicked().connect(sigc::mem_fun(*this, &ClientWindow::onToOwnerModuleButton)); +} + +ClientWindow* ClientWindow::create() { + ClientWindow *w = NULL; + Glib::RefPtr refXml = Gnome::Glade::Xml::create(GLADE_FILE, GLADE_NAME); + refXml->get_widget_derived(GLADE_NAME, w); + return w; +} + +void ClientWindow::updateInfo(const ClientInfo &i) { + char t[20], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; + + nameLabel->set_text(i.name); + protocolLabel->set_text(i.protocol_name); + snprintf(t, sizeof(t), "#%u", i.index); + indexLabel->set_text(t); + + snprintf(t, sizeof(t), "#%u", i.owner_module); + ownerModuleLabel->set_text(t); + + set_title("Client: "+i.name); + + owner_module = i.owner_module; + toOwnerModuleButton->set_sensitive(owner_module != (uint32_t) -1); +} + +void ClientWindow::onCloseButton() { + hide(); +} + +void ClientWindow::onToOwnerModuleButton() { + if (owner_module != (uint32_t) -1) + serverInfoManager->showModuleWindow(owner_module); +} diff --git a/ClientWindow.hh b/ClientWindow.hh new file mode 100644 index 0000000..61a1973 --- /dev/null +++ b/ClientWindow.hh @@ -0,0 +1,32 @@ +#ifndef fooclientwindowhhfoo +#define fooclientwindowhhfoo + +#include +#include + +class ClientWindow; + +#include "ServerInfo.hh" + +class ClientWindow : public Gtk::Window { +public: + ClientWindow(BaseObjectType* cobject, const Glib::RefPtr& refGlade); + static ClientWindow* create(); + + Gtk::Label *nameLabel, + *protocolLabel, + *indexLabel, + *ownerModuleLabel; + + Gtk::Button *closeButton, + *toOwnerModuleButton; + + uint32_t owner_module; + + void updateInfo(const ClientInfo &i); + + virtual void onCloseButton(); + virtual void onToOwnerModuleButton(); +}; + +#endif diff --git a/MainWindow.cc b/MainWindow.cc index 2e39b82..dfa47b9 100644 --- a/MainWindow.cc +++ b/MainWindow.cc @@ -23,9 +23,11 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("statusLabel", statusLabel); @@ -35,22 +37,35 @@ MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("hostNameLabel", hostNameLabel); refGlade->get_widget("userNameLabel", userNameLabel); refGlade->get_widget("deviceTreeView", deviceTreeView); + refGlade->get_widget("clientTreeView", clientTreeView); refGlade->get_widget("moduleTreeView", moduleTreeView); refGlade->get_widget("deviceOpenButton", deviceOpenButton); + refGlade->get_widget("clientOpenButton", clientOpenButton); refGlade->get_widget("moduleOpenButton", moduleOpenButton); refGlade->get_widget("connectButton", connectButton); deviceTreeStore = Gtk::TreeStore::create(deviceTreeModelColumns); deviceTreeView->set_model(deviceTreeStore); - deviceTreeView->append_column("Name", deviceTreeModelColumns.name); deviceTreeView->append_column("Description", deviceTreeModelColumns.description); - deviceTreeView->signal_row_activated().connect(sigc::mem_fun(*this, &MainWindow::onDeviceTreeViewRowActivated)); deviceTreeView->signal_cursor_changed().connect(sigc::mem_fun(*this, &MainWindow::onDeviceTreeViewCursorChanged)); + clientTreeStore = Gtk::TreeStore::create(clientTreeModelColumns); + clientTreeView->set_model(clientTreeStore); + clientTreeView->append_column("Name", clientTreeModelColumns.name); + clientTreeView->signal_row_activated().connect(sigc::mem_fun(*this, &MainWindow::onClientTreeViewRowActivated)); + + moduleTreeStore = Gtk::TreeStore::create(moduleTreeModelColumns); + moduleTreeView->set_model(moduleTreeStore); + moduleTreeView->append_column("Name", moduleTreeModelColumns.name); + moduleTreeView->append_column("Argument", moduleTreeModelColumns.argument); + moduleTreeView->signal_row_activated().connect(sigc::mem_fun(*this, &MainWindow::onModuleTreeViewRowActivated)); + connectButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onConnectButton)); deviceOpenButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onDeviceOpenButton)); + clientOpenButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onClientOpenButton)); + moduleOpenButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onModuleOpenButton)); statusLabel->set_text("Connecting ..."); @@ -68,51 +83,84 @@ MainWindow* MainWindow::create() { } void MainWindow::updateInfo(SinkInfo &i) { - if (!i.treePathValid) { - Gtk::TreeIter iter = deviceTreeStore.get_iter(sinkPath); - i.treePath = deviceTreeStore->append(iter.children()); - i.treePathValid = true; + if (!i.treeRef) { + Gtk::TreeIter iter = deviceTreeStore->get_iter(sinkRef.get_path()); + i.treeRef = Gtk::TreeRowReference(deviceTreeStore, Gtk::TreePath(deviceTreeStore->append(iter->children()))); } - Gtk::TreeRow row = *(Gtk::TreeIter(i.treePath)) + Gtk::TreeRow row = *(deviceTreeStore->get_iter(i.treeRef.get_path())); row[deviceTreeModelColumns.name] = i.name; row[deviceTreeModelColumns.description] = i.description; row[deviceTreeModelColumns.index] = i.index; row[deviceTreeModelColumns.type] = ROW_TYPE_SINK; - deviceTreeView->expand_row(i.treePath, false); + deviceTreeView->expand_row(sinkRef.get_path(), false); + onDeviceTreeViewCursorChanged(); } void MainWindow::updateInfo(SourceInfo &i) { - if (!i.treePathValid) { - Gtk::TreeIter iter = sourcePath; - i.treePath = deviceTreeModel->append(iter.children()); - i.treePathValid = true; + if (!i.treeRef) { + Gtk::TreeIter iter = deviceTreeStore->get_iter(sourceRef.get_path()); + i.treeRef = Gtk::TreeRowReference(deviceTreeStore, Gtk::TreePath(deviceTreeStore->append(iter->children()))); } - Gtk::TreeRow row(Gtk::TreeIter(i.treePath)) + Gtk::TreeRow row = *(deviceTreeStore->get_iter(i.treeRef.get_path())); row[deviceTreeModelColumns.name] = i.name; row[deviceTreeModelColumns.description] = i.description; row[deviceTreeModelColumns.index] = i.index; row[deviceTreeModelColumns.type] = ROW_TYPE_SOURCE; - deviceTreeView->expand_row(i.treePath, false); + deviceTreeView->expand_row(sourceRef.get_path(), false); + onDeviceTreeViewCursorChanged(); } -void MainWindow::removeInfo(SinkInfo &i) { - if (!i.treePathValid) - return; +void MainWindow::updateInfo(ClientInfo &i) { + if (!i.treeRef) + i.treeRef = Gtk::TreeRowReference(clientTreeStore, Gtk::TreePath(clientTreeStore->append())); - deviceTreeModel->erase(Gtk::TreeIter(i.treePath)); - i.treePathValid = false; + Gtk::TreeRow row = *(clientTreeStore->get_iter(i.treeRef.get_path())); + row[clientTreeModelColumns.name] = i.name; + row[clientTreeModelColumns.index] = i.index; + clientOpenButton->set_sensitive(true); +} + +void MainWindow::updateInfo(ModuleInfo &i) { + if (!i.treeRef) + i.treeRef = Gtk::TreeRowReference(moduleTreeStore, Gtk::TreePath(moduleTreeStore->append())); + + Gtk::TreeRow row = *(moduleTreeStore->get_iter(i.treeRef.get_path())); + row[moduleTreeModelColumns.name] = i.name; + row[moduleTreeModelColumns.argument] = i.argument; + row[moduleTreeModelColumns.index] = i.index; + moduleOpenButton->set_sensitive(true); +} + +void MainWindow::removeInfo(SinkInfo &i) { + if (i.treeRef) + deviceTreeStore->erase(deviceTreeStore->get_iter(i.treeRef.get_path())); + + onDeviceTreeViewCursorChanged(); } void MainWindow::removeInfo(SourceInfo &i) { - if (!i.treePathValid) - return; + if (!i.treeRef) + deviceTreeStore->erase(deviceTreeStore->get_iter(i.treeRef.get_path())); + + onDeviceTreeViewCursorChanged(); +} - deviceTreeModel->erase(Gtk::TreeIter(i.treePath)); - i.treePathValid = false; +void MainWindow::removeInfo(ClientInfo &i) { + if (i.treeRef) + clientTreeStore->erase(clientTreeStore->get_iter(i.treeRef.get_path())); + + clientOpenButton->set_sensitive(!moduleTreeStore->children().empty()); +} + +void MainWindow::removeInfo(ModuleInfo &i) { + if (i.treeRef) + moduleTreeStore->erase(moduleTreeStore->get_iter(i.treeRef.get_path())); + + moduleOpenButton->set_sensitive(!moduleTreeStore->children().empty()); } void MainWindow::onDeviceTreeViewCursorChanged() { @@ -120,19 +168,22 @@ void MainWindow::onDeviceTreeViewCursorChanged() { Gtk::TreeViewColumn *c; deviceTreeView->get_cursor(p, c); - deviceOpenButton->set_sensitive(sourcePath != p && sinkPath != p); + if (!p.gobj()) + return; + + deviceOpenButton->set_sensitive((sourceRef.get_path() != p) && (sinkRef.get_path() != p)); } void MainWindow::onDeviceTreeViewRowActivated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* /* column */) { - Gtk::TreeModel::Row row = *(deviceTreeModel->get_iter(path)); + showDeviceWindow(path); +} - if (!serverInfo) - return; +void MainWindow::onClientTreeViewRowActivated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* /* column */) { + showClientWindow(path); +} - if (row[deviceTreeModelColumns.type] == ROW_TYPE_SINK) - serverInfo->showSinkWindow(row[deviceTreeModelColumns.index]); - else if (row[deviceTreeModelColumns.type] == ROW_TYPE_SOURCE) - serverInfo->showSourceWindow(row[deviceTreeModelColumns.index]); +void MainWindow::onModuleTreeViewRowActivated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* /* column */) { + showModuleWindow(path); } void MainWindow::updateInfo(const struct pa_server_info &i) { @@ -156,22 +207,25 @@ void MainWindow::showFailure(const char *t) { } void MainWindow::clearAllData() { - Gtk::TreeIter i; - deviceTreeModel->clear(); - - i = deviceTreeModel->append(); - sinkPath = i; - *i[deviceTreeModelColumns.name] = "Sinks"; - *i[deviceTreeModelColumns.index] = -1; - *i[deviceTreeModelColumns.type] = ROW_TYPE_SINK_CATEGORY; - - i = deviceTreeModel->append(); - sourcePath = i; - *i[deviceTreeModelColumns.name] = "Sources"; - *i[deviceTreeModelColumns.index] = -1; - *i[deviceTreeModelColumns.type] = ROW_TYPE_SOURCE_CATEGORY; - + deviceTreeStore->clear(); + + Gtk::TreeIter i = deviceTreeStore->append(); + sinkRef = Gtk::TreeRowReference(deviceTreeStore, Gtk::TreePath(i)); + (*i)[deviceTreeModelColumns.name] = "Sinks"; + (*i)[deviceTreeModelColumns.index] = (uint32_t) -1; + (*i)[deviceTreeModelColumns.type] = ROW_TYPE_SINK_CATEGORY; + + i = deviceTreeStore->append(); + sourceRef = Gtk::TreeRowReference(deviceTreeStore, Gtk::TreePath(i)); + (*i)[deviceTreeModelColumns.name] = "Sources"; + (*i)[deviceTreeModelColumns.index] = (uint32_t) -1; + (*i)[deviceTreeModelColumns.type] = ROW_TYPE_SOURCE_CATEGORY; + + clientTreeStore->clear(); + moduleTreeStore->clear(); + deviceOpenButton->set_sensitive(false); + clientOpenButton->set_sensitive(false); moduleOpenButton->set_sensitive(false); serverNameLabel->set_markup("n/a"); @@ -185,17 +239,51 @@ void MainWindow::onDeviceOpenButton() { Gtk::TreeModel::Path p; Gtk::TreeViewColumn *c; deviceTreeView->get_cursor(p, c); - Gtk::TreeModel::Row row = *(deviceTreeModel->get_iter(p)); + showDeviceWindow(p); +} + +void MainWindow::onClientOpenButton() { + Gtk::TreeModel::Path p; + Gtk::TreeViewColumn *c; + clientTreeView->get_cursor(p, c); + showClientWindow(p); +} + +void MainWindow::onModuleOpenButton() { + Gtk::TreeModel::Path p; + Gtk::TreeViewColumn *c; + moduleTreeView->get_cursor(p, c); + showModuleWindow(p); +} - if (!serverInfo) +void MainWindow::onConnectButton() { + create_connection(); +} + +void MainWindow::showDeviceWindow(const Gtk::TreePath &p) { + if (!serverInfoManager) return; + + Gtk::TreeModel::Row row = *(deviceTreeStore->get_iter(p)); if (row[deviceTreeModelColumns.type] == ROW_TYPE_SINK) - serverInfo->showSinkWindow(row[deviceTreeModelColumns.index]); + serverInfoManager->showSinkWindow(row[deviceTreeModelColumns.index]); else if (row[deviceTreeModelColumns.type] == ROW_TYPE_SOURCE) - serverInfo->showSourceWindow(row[deviceTreeModelColumns.index]); + serverInfoManager->showSourceWindow(row[deviceTreeModelColumns.index]); } -void MainWindow::onConnectButton() { - create_connection(); +void MainWindow::showClientWindow(const Gtk::TreePath &p) { + if (!serverInfoManager) + return; + + Gtk::TreeModel::Row row = *(clientTreeStore->get_iter(p)); + serverInfoManager->showClientWindow(row[clientTreeModelColumns.index]); +} + +void MainWindow::showModuleWindow(const Gtk::TreePath &p) { + if (!serverInfoManager) + return; + + Gtk::TreeModel::Row row = *(moduleTreeStore->get_iter(p)); + serverInfoManager->showModuleWindow(row[moduleTreeModelColumns.index]); } diff --git a/MainWindow.hh b/MainWindow.hh index d13dca3..2d5f173 100644 --- a/MainWindow.hh +++ b/MainWindow.hh @@ -23,10 +23,13 @@ public: *hostNameLabel; Gtk::Button *deviceOpenButton, + *clientOpenButton, *moduleOpenButton, *connectButton; - Gtk::TreeView *deviceTreeView, *moduleTreeView; + Gtk::TreeView *deviceTreeView, + *clientTreeView, + *moduleTreeView; protected: @@ -42,32 +45,73 @@ protected: Gtk::TreeModelColumn name; Gtk::TreeModelColumn description; - Gtk::TreeModelColumn index; + Gtk::TreeModelColumn index; Gtk::TreeModelColumn type; }; DeviceTreeModelColumns deviceTreeModelColumns; Glib::RefPtr deviceTreeStore; + Gtk::TreeRowReference sinkRef, sourceRef; - Gtk::TreePath sinkPath, sourcePath; + class ClientTreeModelColumns : public Gtk::TreeModel::ColumnRecord { + public: + ClientTreeModelColumns() { + add(name); + add(index); + } + + Gtk::TreeModelColumn name; + Gtk::TreeModelColumn index; + }; + + ClientTreeModelColumns clientTreeModelColumns; + Glib::RefPtr clientTreeStore; + + class ModuleTreeModelColumns : public Gtk::TreeModel::ColumnRecord { + public: + ModuleTreeModelColumns() { + add(name); + add(argument); + add(index); + } + + Gtk::TreeModelColumn name; + Gtk::TreeModelColumn argument; + Gtk::TreeModelColumn index; + }; + + ModuleTreeModelColumns moduleTreeModelColumns; + Glib::RefPtr moduleTreeStore; public: virtual void updateInfo(const struct pa_server_info &i); virtual void updateInfo(SinkInfo &i); virtual void updateInfo(SourceInfo &i); + virtual void updateInfo(ClientInfo &i); + virtual void updateInfo(ModuleInfo &i); virtual void removeInfo(SinkInfo &i); virtual void removeInfo(SourceInfo &i); + virtual void removeInfo(ClientInfo &i); + virtual void removeInfo(ModuleInfo &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 */); + virtual void onModuleTreeViewRowActivated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* /* column */); virtual void showSuccess(const char *t); virtual void showFailure(const char *t); virtual void clearAllData(); virtual void onDeviceOpenButton(); + virtual void onClientOpenButton(); + virtual void onModuleOpenButton(); virtual void onConnectButton(); + + virtual void showDeviceWindow(const Gtk::TreePath &p); + virtual void showClientWindow(const Gtk::TreePath &p); + virtual void showModuleWindow(const Gtk::TreePath &p); }; #endif diff --git a/Makefile b/Makefile index cfed04f..8a9cb3a 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ CXXFLAGS=`pkg-config gtkmm-2.4 libglademm-2.4 --cflags` -Wall -W -pipe -O0 -g -Wno-unused -I../polypaudio LIBS=`pkg-config gtkmm-2.4 libglademm-2.4 --libs` -L../polypaudio/polyp/.libs -lpolyp -lpolyp-mainloop-glib -lpolyp-error -paman: paman.o MainWindow.o SinkWindow.o SourceWindow.o ServerInfo.o +paman: paman.o MainWindow.o SinkWindow.o SourceWindow.o ServerInfo.o ClientWindow.o ModuleWindow.o $(CXX) $^ -o $@ $(LIBS) clean: diff --git a/ModuleWindow.cc b/ModuleWindow.cc new file mode 100644 index 0000000..04d8fb5 --- /dev/null +++ b/ModuleWindow.cc @@ -0,0 +1,58 @@ +#include + +#include "paman.hh" +#include "ModuleWindow.hh" + +#define GLADE_NAME "moduleWindow" + +ModuleWindow::ModuleWindow(BaseObjectType* cobject, const Glib::RefPtr& refGlade) : + Gtk::Window(cobject), + nameLabel(NULL), + argumentLabel(NULL), + indexLabel(NULL), + autoloadedLabel(NULL), + usageLabel(NULL), + closeButton(NULL) { + + refGlade->get_widget("nameLabel", nameLabel); + refGlade->get_widget("argumentLabel", argumentLabel); + refGlade->get_widget("indexLabel", indexLabel); + refGlade->get_widget("autoloadedLabel", autoloadedLabel); + refGlade->get_widget("usageLabel", usageLabel); + refGlade->get_widget("closeButton", closeButton); + + closeButton->signal_clicked().connect(sigc::mem_fun(*this, &ModuleWindow::onCloseButton)); +} + +ModuleWindow* ModuleWindow::create() { + ModuleWindow *w = NULL; + Glib::RefPtr refXml = Gnome::Glade::Xml::create(GLADE_FILE, GLADE_NAME); + refXml->get_widget_derived(GLADE_NAME, w); + return w; +} + +void ModuleWindow::updateInfo(const ModuleInfo &i) { + char t[20], ss[PA_SAMPLE_SNPRINT_MAX_LENGTH]; + + nameLabel->set_text(i.name); + if (!i.argument.empty()) + argumentLabel->set_text(i.argument); + else + argumentLabel->set_markup("None specified"); + + snprintf(t, sizeof(t), "#%u", i.index); + indexLabel->set_text(t); + autoloadedLabel->set_text(i.autoloaded ? "Yes" : "No"); + + if (i.used != (uint32_t) -1) { + snprintf(t, sizeof(t), "%u", i.used); + usageLabel->set_text(t); + } else + usageLabel->set_markup("n/a"); + + set_title("Module: "+i.name); +} + +void ModuleWindow::onCloseButton() { + hide(); +} diff --git a/ModuleWindow.hh b/ModuleWindow.hh new file mode 100644 index 0000000..c28af52 --- /dev/null +++ b/ModuleWindow.hh @@ -0,0 +1,29 @@ +#ifndef foomodulewindowhhfoo +#define foomodulewindowhhfoo + +#include +#include + +class ModuleWindow; + +#include "ServerInfo.hh" + +class ModuleWindow : public Gtk::Window { +public: + ModuleWindow(BaseObjectType* cobject, const Glib::RefPtr& refGlade); + static ModuleWindow* create(); + + Gtk::Label *nameLabel, + *argumentLabel, + *indexLabel, + *autoloadedLabel, + *usageLabel; + + Gtk::Button *closeButton; + + void updateInfo(const ModuleInfo &i); + + virtual void onCloseButton(); +}; + +#endif diff --git a/ServerInfo.cc b/ServerInfo.cc index ccda5b1..2a32f00 100644 --- a/ServerInfo.cc +++ b/ServerInfo.cc @@ -13,13 +13,12 @@ SinkInfo::SinkInfo(const struct pa_sink_info &i) : owner_module(i.owner_module), volume(i.volume), latency(i.latency), - sinkWindow(NULL), - treePathValid(false) { + window(NULL) { } SinkInfo::~SinkInfo() { - if (sinkWindow) - delete sinkWindow; + if (window) + delete window; } void SinkInfo::update(const struct pa_sink_info &i) { @@ -32,17 +31,17 @@ void SinkInfo::update(const struct pa_sink_info &i) { volume = i.volume; latency = i.latency; - if (sinkWindow) - sinkWindow->updateInfo(*this); + if (window) + window->updateInfo(*this); } void SinkInfo::showWindow() { - if (sinkWindow) - sinkWindow->present(); + if (window) + window->present(); else { - sinkWindow = SinkWindow::create(); - sinkWindow->updateInfo(*this); - sinkWindow->show(); + window = SinkWindow::create(); + window->updateInfo(*this); + window->show(); } } @@ -53,13 +52,12 @@ SourceInfo::SourceInfo(const struct pa_source_info &i) : sample_spec(i.sample_spec), owner_module(i.owner_module), monitor_of_sink(i.monitor_of_sink), - sourceWindow(NULL), - treePathValid(false) { + window(NULL) { } SourceInfo::~SourceInfo() { - if (sourceWindow) - delete sourceWindow; + if (window) + delete window; } void SourceInfo::update(const struct pa_source_info &i) { @@ -70,22 +68,90 @@ void SourceInfo::update(const struct pa_source_info &i) { owner_module = i.owner_module; monitor_of_sink = i.monitor_of_sink; - if (sourceWindow) - sourceWindow->updateInfo(*this); + if (window) + window->updateInfo(*this); } void SourceInfo::showWindow() { - if (sourceWindow) - sourceWindow->present(); + if (window) + window->present(); else { - sourceWindow = SourceWindow::create(); - sourceWindow->updateInfo(*this); - sourceWindow->show(); + window = SourceWindow::create(); + window->updateInfo(*this); + window->show(); + } +} + +ClientInfo::ClientInfo(const struct pa_client_info &i) : + index(i.index), + name(i.name), + protocol_name(i.protocol_name), + owner_module(i.owner_module), + window(NULL) { +} + +ClientInfo::~ClientInfo() { + if (window) + delete window; +} + +void ClientInfo::update(const struct pa_client_info &i) { + name = i.name; + protocol_name = i.protocol_name; + index = i.index; + owner_module = i.owner_module; + + if (window) + window->updateInfo(*this); +} + +void ClientInfo::showWindow() { + if (window) + window->present(); + else { + window = ClientWindow::create(); + window->updateInfo(*this); + window->show(); + } +} + +ModuleInfo::ModuleInfo(const struct pa_module_info &i) : + index(i.index), + name(i.name), + argument(i.argument), + autoloaded(i.auto_unload), + used(i.n_used), + window(NULL) { +} + +ModuleInfo::~ModuleInfo() { + if (window) + delete window; +} + +void ModuleInfo::update(const struct pa_module_info &i) { + name = i.name; + argument = i.argument; + index = i.index; + autoloaded = i.auto_unload; + used = i.n_used; + + if (window) + window->updateInfo(*this); +} + +void ModuleInfo::showWindow() { + if (window) + window->present(); + else { + window = ModuleWindow::create(); + window->updateInfo(*this); + window->show(); } } static void server_info_callback(struct pa_context *c, const struct pa_server_info *i, void *userdata) { - ServerInfo *si = (ServerInfo*) userdata; + ServerInfoManager *si = (ServerInfoManager*) userdata; if (!i) { mainWindow->showFailure(pa_strerror(pa_context_errno(c))); @@ -96,74 +162,96 @@ static void server_info_callback(struct pa_context *c, const struct pa_server_in } static void sink_info_callback(struct pa_context *c, const struct pa_sink_info *i, int is_last, void *userdata) { - ServerInfo *si = (ServerInfo*) userdata; + ServerInfoManager *si = (ServerInfoManager*) userdata; if (!is_last && i) si->updateInfo(*i); } static void source_info_callback(struct pa_context *c, const struct pa_source_info *i, int is_last, void *userdata) { - ServerInfo *si = (ServerInfo*) userdata; + ServerInfoManager *si = (ServerInfoManager*) userdata; + if (!is_last && i) + si->updateInfo(*i); +} + +static void client_info_callback(struct pa_context *c, const struct pa_client_info *i, int is_last, void *userdata) { + ServerInfoManager *si = (ServerInfoManager*) userdata; + if (!is_last && i) + si->updateInfo(*i); +} + +static void module_info_callback(struct pa_context *c, const struct pa_module_info *i, int is_last, void *userdata) { + ServerInfoManager *si = (ServerInfoManager*) userdata; if (!is_last && i) si->updateInfo(*i); } static void subscribe_callback(struct pa_context *c, enum pa_subscription_event_type t, uint32_t index, void *userdata) { - ServerInfo *si = (ServerInfo*) userdata; + ServerInfoManager *si = (ServerInfoManager*) userdata; - fprintf(stderr, "EV: %u %u\n", t, index); +// fprintf(stderr, "EV: %u %u\n", t, index); switch (t & PA_SUBSCRIPTION_EVENT_FACILITY_MASK) { case PA_SUBSCRIPTION_EVENT_SINK: - fprintf(stderr, "SINK EVENT\n"); - - if (t & PA_SUBSCRIPTION_EVENT_TYPE_MASK == PA_SUBSCRIPTION_EVENT_REMOVE) + if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) si->removeSinkInfo(index); else pa_context_get_sink_info_by_index(c, index, sink_info_callback, si); break; case PA_SUBSCRIPTION_EVENT_SOURCE: - fprintf(stderr, "SOURCE EVENT\n"); - - if (t & PA_SUBSCRIPTION_EVENT_TYPE_MASK == PA_SUBSCRIPTION_EVENT_REMOVE) + if ((t & PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) si->removeSourceInfo(index); else pa_context_get_source_info_by_index(c, index, source_info_callback, si); break; case PA_SUBSCRIPTION_EVENT_MODULE: - fprintf(stderr, "MODULE EVENT\n"); + if ((t && PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) + si->removeModuleInfo(index); + else + pa_context_get_module_info(c, index, module_info_callback, si); break; case PA_SUBSCRIPTION_EVENT_CLIENT: - fprintf(stderr, "CLIENT EVENT\n"); + if ((t && PA_SUBSCRIPTION_EVENT_TYPE_MASK) == PA_SUBSCRIPTION_EVENT_REMOVE) + si->removeClientInfo(index); + else + pa_context_get_client_info(c, index, client_info_callback, si); break; case PA_SUBSCRIPTION_EVENT_SINK_INPUT: - fprintf(stderr, "SINK INPUT EVENT\n"); +// fprintf(stderr, "SINK INPUT EVENT\n"); break; case PA_SUBSCRIPTION_EVENT_SOURCE_OUTPUT: - fprintf(stderr, "SOURCE OUTPUT EVENT\n"); +// fprintf(stderr, "SOURCE OUTPUT EVENT\n"); break; default: - fprintf(stderr, "OTHER EVENT\n"); +// fprintf(stderr, "OTHER EVENT\n"); break; } } -ServerInfo::ServerInfo(struct pa_context &c) : +ServerInfoManager::ServerInfoManager(struct pa_context &c) : context(c) { pa_context_get_server_info(&c, server_info_callback, this); pa_context_get_sink_info_list(&c, sink_info_callback, this); pa_context_get_source_info_list(&c, source_info_callback, this); + pa_context_get_module_info_list(&c, module_info_callback, this); + pa_context_get_client_info_list(&c, client_info_callback, this); pa_context_subscribe(&c, (enum pa_subscription_mask) (PA_SUBSCRIPTION_FACILITY_SINK|PA_SUBSCRIPTION_FACILITY_SOURCE|PA_SUBSCRIPTION_FACILITY_MODULE|PA_SUBSCRIPTION_FACILITY_SINK_INPUT|PA_SUBSCRIPTION_FACILITY_SOURCE_OUTPUT|PA_SUBSCRIPTION_FACILITY_CLIENT), subscribe_callback, this); } -ServerInfo::~ServerInfo() { +ServerInfoManager::~ServerInfoManager() { for (std::map::iterator i = sinks.begin(); i != sinks.end(); i++) delete i->second; for (std::map::iterator i = sources.begin(); i != sources.end(); i++) delete i->second; + + for (std::map::iterator i = clients.begin(); i != clients.end(); i++) + delete i->second; + + for (std::map::iterator i = modules.begin(); i != modules.end(); i++) + delete i->second; } -void ServerInfo::updateInfo(const struct pa_sink_info &i) { +void ServerInfoManager::updateInfo(const struct pa_sink_info &i) { SinkInfo *si; if ((si = sinks[i.index])) si->update(i); @@ -174,7 +262,7 @@ void ServerInfo::updateInfo(const struct pa_sink_info &i) { } } -void ServerInfo::updateInfo(const struct pa_source_info &i) { +void ServerInfoManager::updateInfo(const struct pa_source_info &i) { SourceInfo *si; if ((si = sources[i.index])) si->update(i); @@ -185,40 +273,105 @@ void ServerInfo::updateInfo(const struct pa_source_info &i) { } } -void ServerInfo::showSinkWindow(uint32_t index) { +void ServerInfoManager::updateInfo(const struct pa_client_info &i) { + ClientInfo *si; + if ((si = clients[i.index])) + si->update(i); + else { + ClientInfo *n = new ClientInfo(i); + clients[i.index] = n; + mainWindow->updateInfo(*n); + } +} +void ServerInfoManager::updateInfo(const struct pa_module_info &i) { + ModuleInfo *si; + if ((si = modules[i.index])) + si->update(i); + else { + ModuleInfo *n = new ModuleInfo(i); + modules[i.index] = n; + mainWindow->updateInfo(*n); + } +} + +void ServerInfoManager::showSinkWindow(uint32_t index) { SinkInfo *i; if ((i = sinks[index])) i->showWindow(); } -void ServerInfo::showSourceWindow(uint32_t index) { +void ServerInfoManager::showSourceWindow(uint32_t index) { SourceInfo *i; if ((i = sources[index])) i->showWindow(); } -SourceInfo* ServerInfo::getSourceInfo(uint32_t index) { +void ServerInfoManager::showClientWindow(uint32_t index) { + ClientInfo *i; + + if ((i = clients[index])) + i->showWindow(); +} + +void ServerInfoManager::showModuleWindow(uint32_t index) { + ModuleInfo *i; + + if ((i = modules[index])) + i->showWindow(); +} + + +SourceInfo* ServerInfoManager::getSourceInfo(uint32_t index) { return sources[index]; } -SinkInfo* ServerInfo::getSinkInfo(uint32_t index) { +SinkInfo* ServerInfoManager::getSinkInfo(uint32_t index) { return sinks[index]; } -void ServerInfo::removeSinkInfo(uint32_t index) { +ClientInfo* ServerInfoManager::getClientInfo(uint32_t index) { + return clients[index]; +} + +ModuleInfo* ServerInfoManager::getModuleInfo(uint32_t index) { + return modules[index]; +} + +void ServerInfoManager::removeSinkInfo(uint32_t index) { SinkInfo *i; + fprintf(stderr, "REMOVE %i\n", index); if ((i = sinks[index])) { sinks.erase(index); + mainWindow->removeInfo(*i); delete i; } } -void ServerInfo::removeSourceInfo(uint32_t index) { +void ServerInfoManager::removeSourceInfo(uint32_t index) { SourceInfo *i; if ((i = sources[index])) { sources.erase(index); + mainWindow->removeInfo(*i); + delete i; + } +} + +void ServerInfoManager::removeClientInfo(uint32_t index) { + ClientInfo *i; + if ((i = clients[index])) { + clients.erase(index); + mainWindow->removeInfo(*i); + delete i; + } +} + +void ServerInfoManager::removeModuleInfo(uint32_t index) { + ModuleInfo *i; + if ((i = modules[index])) { + modules.erase(index); + mainWindow->removeInfo(*i); delete i; } } diff --git a/ServerInfo.hh b/ServerInfo.hh index f6db437..bba87b3 100644 --- a/ServerInfo.hh +++ b/ServerInfo.hh @@ -9,9 +9,13 @@ class SinkInfo; class SourceInfo; class ServerInfo; +class ClientInfo; +class ModuleInfo; #include "SinkWindow.hh" #include "SourceWindow.hh" +#include "ClientWindow.hh" +#include "ModuleWindow.hh" #include "MainWindow.hh" class SinkInfo { @@ -31,10 +35,9 @@ public: uint32_t volume; uint32_t latency; - Gtk::TreePath treePath; - bool treePathValid; + Gtk::TreeRowReference treeRef; - SinkWindow *sinkWindow; + SinkWindow *window; }; class SourceInfo { @@ -51,32 +54,73 @@ public: uint32_t owner_module; uint32_t monitor_of_sink; - Gtk::TreePath treePath; - bool treePathValid; + Gtk::TreeRowReference treeRef; + SourceWindow *window; +}; + +class ModuleInfo { +public: + ModuleInfo(const struct pa_module_info &i); + ~ModuleInfo(); + + void update(const struct pa_module_info &i); + void showWindow(); + + uint32_t index; + Glib::ustring name, argument; + bool autoloaded; + uint32_t used; + + Gtk::TreeRowReference treeRef; + ModuleWindow *window; +}; + +class ClientInfo { +public: + ClientInfo(const struct pa_client_info &i); + ~ClientInfo(); + + void update(const struct pa_client_info &i); + void showWindow(); - SourceWindow *sourceWindow; + uint32_t index; + Glib::ustring name, protocol_name; + uint32_t owner_module; + + Gtk::TreeRowReference treeRef; + ClientWindow *window; }; -class ServerInfo { +class ServerInfoManager { public: - ServerInfo(struct pa_context &c); - ~ServerInfo(); + ServerInfoManager(struct pa_context &c); + ~ServerInfoManager(); void updateInfo(const struct pa_sink_info &i); 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 showSinkWindow(uint32_t index); void showSourceWindow(uint32_t index); + void showClientWindow(uint32_t index); + void showModuleWindow(uint32_t index); SourceInfo* getSourceInfo(uint32_t index); SinkInfo* getSinkInfo(uint32_t index); + ClientInfo* getClientInfo(uint32_t index); + ModuleInfo* getModuleInfo(uint32_t index); void removeSinkInfo(uint32_t index); void removeSourceInfo(uint32_t index); + void removeClientInfo(uint32_t index); + void removeModuleInfo(uint32_t index); protected: std::map sinks; std::map sources; + std::map clients; + std::map modules; struct pa_context &context; }; diff --git a/SinkWindow.cc b/SinkWindow.cc index 83e0955..5ecd27d 100644 --- a/SinkWindow.cc +++ b/SinkWindow.cc @@ -1,3 +1,5 @@ +#include + #include "paman.hh" #include "SinkWindow.hh" @@ -12,8 +14,11 @@ SinkWindow::SinkWindow(BaseObjectType* cobject, const Glib::RefPtrget_widget("nameLabel", nameLabel); refGlade->get_widget("descriptionLabel", descriptionLabel); @@ -24,9 +29,13 @@ SinkWindow::SinkWindow(BaseObjectType* cobject, const Glib::RefPtrget_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); 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)); } SinkWindow* SinkWindow::create() { @@ -51,12 +60,19 @@ void SinkWindow::updateInfo(const SinkInfo &i) { snprintf(t, sizeof(t), "%u usec", i.latency); latencyLabel->set_text(t); - SourceInfo *source = serverInfo->getSourceInfo(i.monitor_source); + SourceInfo *source = serverInfoManager->getSourceInfo(i.monitor_source); monitorSourceLabel->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); monitor_source = i.monitor_source; + owner_module = i.owner_module; + + toOwnerModuleButton->set_sensitive(owner_module != (uint32_t) -1); } void SinkWindow::onCloseButton() { @@ -64,5 +80,10 @@ void SinkWindow::onCloseButton() { } void SinkWindow::onToMonitorSourceButton() { - serverInfo->showSourceWindow(monitor_source); + serverInfoManager->showSourceWindow(monitor_source); +} + +void SinkWindow::onToOwnerModuleButton() { + if (owner_module != (uint32_t) -1) + serverInfoManager->showModuleWindow(owner_module); } diff --git a/SinkWindow.hh b/SinkWindow.hh index 5027751..39901b6 100644 --- a/SinkWindow.hh +++ b/SinkWindow.hh @@ -19,10 +19,14 @@ public: *sampleTypeLabel, *latencyLabel, *ownerModuleLabel, - *monitorSourceLabel; + *monitorSourceLabel, + *volumeLabel; Gtk::Button *closeButton, - *toMonitorSourceButton; + *toMonitorSourceButton, + *toOwnerModuleButton; + + Gtk::HScale *volumeScale; uint32_t owner_module, monitor_source; @@ -30,6 +34,7 @@ public: virtual void onCloseButton(); virtual void onToMonitorSourceButton(); + virtual void onToOwnerModuleButton(); }; #endif 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); } diff --git a/SourceWindow.hh b/SourceWindow.hh index 71e33e0..964d64f 100644 --- a/SourceWindow.hh +++ b/SourceWindow.hh @@ -17,14 +17,16 @@ public: *monitorOfSinkLabel; Gtk::Button *closeButton, - *toParentSinkButton; + *toParentSinkButton, + *toOwnerModuleButton; - uint32_t monitor_of_sink; + uint32_t monitor_of_sink, owner_module; void updateInfo(const SourceInfo &i); virtual void onCloseButton(); virtual void onParentSinkButton(); + virtual void onToOwnerModuleButton(); }; #endif diff --git a/paman.cc b/paman.cc index 1bde0ba..6fb0d88 100644 --- a/paman.cc +++ b/paman.cc @@ -12,12 +12,12 @@ #include "MainWindow.hh" MainWindow *mainWindow = NULL; -ServerInfo *serverInfo = NULL; +ServerInfoManager *serverInfoManager = NULL; struct pa_context *context = NULL; struct pa_mainloop_api *mainloop_api = NULL; static void context_complete_callback(struct pa_context *c, int success, void *userdata) { - g_assert(c && mainWindow && !serverInfo); + g_assert(c && mainWindow && !serverInfoManager); if (!success) { mainWindow->showFailure(pa_strerror(pa_context_errno(c))); @@ -29,23 +29,23 @@ static void context_complete_callback(struct pa_context *c, int success, void *u mainWindow->showSuccess("Connected"); mainWindow->connectButton->set_sensitive(false); - serverInfo = new ServerInfo(*c); + serverInfoManager = new ServerInfoManager(*c); } static void die_callback(struct pa_context *c, void *userdata) { mainWindow->clearAllData(); mainWindow->showFailure(pa_strerror(pa_context_errno(c))); - delete serverInfo; - serverInfo = NULL; + delete serverInfoManager; + serverInfoManager = NULL; //pa_context_free(contetx); /* Mrprmfmfl! */ context = NULL; mainWindow->connectButton->set_sensitive(true); } void create_connection() { - if (serverInfo) { - delete serverInfo; - serverInfo = NULL; + if (serverInfoManager) { + delete serverInfoManager; + serverInfoManager = NULL; } if (context) { pa_context_free(context); @@ -85,8 +85,8 @@ int main(int argc, char *argv[]) { Gtk::Main::run(*mainWindow); quit: - if (serverInfo) - delete serverInfo; + if (serverInfoManager) + delete serverInfoManager; if (context) pa_context_free(context); diff --git a/paman.glade b/paman.glade index d95bc7c..e7bb10e 100644 --- a/paman.glade +++ b/paman.glade @@ -926,7 +926,7 @@ 5 True - 7 + 8 2 False 5 @@ -1100,30 +1100,6 @@ - - - True - True - - False - False - GTK_JUSTIFY_LEFT - False - True - 0 - 0.5 - 0 - 0 - - - 1 - 2 - 5 - 6 - - - - True @@ -1244,6 +1220,87 @@ + + + True + <b>Volume:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 7 + 8 + fill + + + + + + + True + False + 5 + + + + 40 + True + True + 100% + False + True + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + + 0 + False + False + + + + + + 100 + True + True + False + GTK_POS_LEFT + 0 + GTK_UPDATE_DELAYED + False + 100 0 1000 10 100 0 + + + 0 + True + True + + + + + 1 + 2 + 7 + 8 + fill + + + True @@ -1263,7 +1320,30 @@ 2 6 7 - fill + + + + + + + True + True + + False + False + GTK_JUSTIFY_LEFT + False + True + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 5 + 6 @@ -1284,7 +1364,6 @@ True - False True True To Owner Module @@ -1725,7 +1804,6 @@ True - False True True To Owner Module @@ -1815,9 +1893,9 @@ - + True - window1 + Module GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False @@ -1905,7 +1983,7 @@ - + True label4724 False @@ -1929,7 +2007,7 @@ - + True label4725 False @@ -1955,7 +2033,7 @@ True - <b>Usage:</b> + <b>Usage Counter:</b> False True GTK_JUSTIFY_LEFT @@ -1977,7 +2055,7 @@ - + True label4727 False @@ -2001,9 +2079,9 @@ - + True - label4728 + foo False False GTK_JUSTIFY_LEFT @@ -2025,7 +2103,7 @@ - + True label4729 False @@ -2051,7 +2129,7 @@ True - <b>Arguments:</b> + <b>Argument:</b> False True GTK_JUSTIFY_LEFT @@ -2073,7 +2151,7 @@ - + True <b>Index:</b> False @@ -2135,7 +2213,338 @@ 0 - + + True + True + True + gtk-close + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + False + + + + + + + + True + Client + GTK_WINDOW_TOPLEVEL + GTK_WIN_POS_NONE + False + False + False + True + False + False + GDK_WINDOW_TYPE_HINT_NORMAL + GDK_GRAVITY_NORTH_WEST + + + + 5 + True + False + 5 + + + + True + True + True + True + GTK_POS_TOP + False + False + + + + 5 + True + False + 5 + + + + True + 4 + 2 + False + 5 + 10 + + + + True + <b>Name:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 0 + 1 + fill + + + + + + + True + <b>Owner Module:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 3 + 4 + fill + + + + + + + True + label4725 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 3 + 4 + fill + + + + + + + True + label4727 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 2 + 3 + fill + + + + + + + True + foo + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 1 + 2 + fill + + + + + + + True + label4729 + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + + + 1 + 2 + 0 + 1 + fill + + + + + + + True + <b>Protocol:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 1 + 2 + fill + + + + + + + True + <b>Index:</b> + False + True + GTK_JUSTIFY_LEFT + False + False + 1 + 0.5 + 0 + 0 + + + 0 + 1 + 2 + 3 + fill + + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_START + 0 + + + + True + True + True + To Owner Module + True + GTK_RELIEF_NORMAL + True + + + + + 0 + False + False + + + + + False + True + + + + + + True + Basic + False + False + GTK_JUSTIFY_LEFT + False + False + 0.5 + 0.5 + 0 + 0 + + + tab + + + + + 0 + True + True + + + + + + True + GTK_BUTTONBOX_END + 0 + + + True True True diff --git a/paman.hh b/paman.hh index 8bebfb9..7f2127f 100644 --- a/paman.hh +++ b/paman.hh @@ -5,7 +5,7 @@ #define GLADE_FILE "paman.glade" -extern ServerInfo *serverInfo; +extern ServerInfoManager *serverInfoManager; extern MainWindow *mainWindow; extern struct pa_context *context; -- cgit