diff options
-rw-r--r-- | MainWindow.cc | 175 | ||||
-rw-r--r-- | MainWindow.hh | 70 | ||||
-rw-r--r-- | Makefile | 9 | ||||
-rw-r--r-- | ServerInfo.cc | 165 | ||||
-rw-r--r-- | ServerInfo.hh | 75 | ||||
-rw-r--r-- | SinkWindow.cc | 68 | ||||
-rw-r--r-- | SinkWindow.hh | 35 | ||||
-rw-r--r-- | SourceWindow.cc | 71 | ||||
-rw-r--r-- | SourceWindow.hh | 30 | ||||
-rw-r--r-- | paman.cc | 101 | ||||
-rw-r--r-- | paman.glade | 1675 | ||||
-rw-r--r-- | paman.gladep | 12 | ||||
-rw-r--r-- | paman.hh | 15 |
13 files changed, 2501 insertions, 0 deletions
diff --git a/MainWindow.cc b/MainWindow.cc new file mode 100644 index 0000000..5db98fc --- /dev/null +++ b/MainWindow.cc @@ -0,0 +1,175 @@ +#include <iostream> +#include <string> +#include <sstream> + +#include "paman.hh" +#include "MainWindow.hh" + +#define GLADE_NAME "mainWindow" + +enum { + ROW_TYPE_SINK_CATEGORY, + ROW_TYPE_SOURCE_CATEGORY, + ROW_TYPE_SINK, + ROW_TYPE_SOURCE, +}; + +MainWindow::MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : + Gtk::Window(cobject), + statusLabel(NULL), + serverNameLabel(NULL), + serverVersionLabel(NULL), + defaultSampleTypeLabel(NULL), + userNameLabel(NULL), + hostNameLabel(NULL), + deviceOpenButton(NULL), + moduleOpenButton(NULL), + connectButton(NULL), + deviceTreeView(NULL), + moduleTreeView(NULL) { + + refGlade->get_widget("statusLabel", statusLabel); + refGlade->get_widget("serverNameLabel", serverNameLabel); + refGlade->get_widget("serverVersionLabel", serverVersionLabel); + refGlade->get_widget("defaultSampleTypeLabel", defaultSampleTypeLabel); + refGlade->get_widget("hostNameLabel", hostNameLabel); + refGlade->get_widget("userNameLabel", userNameLabel); + refGlade->get_widget("deviceTreeView", deviceTreeView); + refGlade->get_widget("moduleTreeView", moduleTreeView); + refGlade->get_widget("deviceOpenButton", deviceOpenButton); + refGlade->get_widget("moduleOpenButton", moduleOpenButton); + refGlade->get_widget("connectButton", connectButton); + + deviceTreeModel = Gtk::TreeStore::create(deviceTreeModelColumns); + deviceTreeView->set_model(deviceTreeModel); + + 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)); + + connectButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onConnectButton)); + deviceOpenButton->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::onDeviceOpenButton)); + + statusLabel->set_text("Connecting ..."); + + clearAllData(); +} + +MainWindow::~MainWindow() { +} + +MainWindow* MainWindow::create() { + MainWindow *w; + Glib::RefPtr<Gnome::Glade::Xml> refXml = Gnome::Glade::Xml::create(GLADE_FILE, GLADE_NAME); + refXml->get_widget_derived(GLADE_NAME, w); + return w; +} + +void MainWindow::updateInfo(const SinkInfo &i) { + Gtk::TreeModel::Row row = *(deviceTreeModel->append(sinkRow.children())); + + row[deviceTreeModelColumns.name] = i.name; + row[deviceTreeModelColumns.description] = i.description; + row[deviceTreeModelColumns.index] = i.index; + row[deviceTreeModelColumns.type] = ROW_TYPE_SINK; + + Gtk::TreePath p(sinkRow); + deviceTreeView->expand_row(p, false); +} + +void MainWindow::updateInfo(const SourceInfo &i) { + Gtk::TreeModel::Row row = *(deviceTreeModel->append(sourceRow.children())); + + row[deviceTreeModelColumns.name] = i.name; + row[deviceTreeModelColumns.description] = i.description; + row[deviceTreeModelColumns.index] = i.index; + row[deviceTreeModelColumns.type] = ROW_TYPE_SOURCE; + + Gtk::TreePath p(sourceRow); + deviceTreeView->expand_row(p, false); +} + +void MainWindow::onDeviceTreeViewCursorChanged() { + Gtk::TreeModel::Path p; + Gtk::TreeViewColumn *c; + deviceTreeView->get_cursor(p, c); + Gtk::TreeModel::Row row = *(deviceTreeModel->get_iter(p)); + + deviceOpenButton->set_sensitive(row != sourceRow && row != sinkRow); +} + +void MainWindow::onDeviceTreeViewRowActivated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* /* column */) { + Gtk::TreeModel::Row row = *(deviceTreeModel->get_iter(path)); + + if (!serverInfo) + return; + + 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::updateInfo(const struct pa_server_info &i) { + char t[PA_SAMPLE_SNPRINT_MAX_LENGTH]; + serverNameLabel->set_text(i.server_name); + serverVersionLabel->set_text(i.server_version); + pa_sample_snprint(t, sizeof(t), &i.sample_spec); + defaultSampleTypeLabel->set_text(t); + hostNameLabel->set_text(i.host_name); + userNameLabel->set_text(i.user_name); +} + +void MainWindow::showSuccess(const char *t) { + statusLabel->set_text(t); +} + +void MainWindow::showFailure(const char *t) { + char s[256]; + snprintf(s, sizeof(s), "<b>Failure:</b> %s", t); + statusLabel->set_markup(s); +} + +void MainWindow::clearAllData() { + deviceTreeModel->clear(); + + sinkRow = *(deviceTreeModel->append()); + sinkRow[deviceTreeModelColumns.name] = "Sinks"; + sinkRow[deviceTreeModelColumns.index] = -1; + sinkRow[deviceTreeModelColumns.type] = ROW_TYPE_SINK_CATEGORY; + + sourceRow = *(deviceTreeModel->append()); + sourceRow[deviceTreeModelColumns.name] = "Sources"; + sourceRow[deviceTreeModelColumns.index] = -1; + sourceRow[deviceTreeModelColumns.type] = ROW_TYPE_SOURCE_CATEGORY; + + deviceOpenButton->set_sensitive(false); + moduleOpenButton->set_sensitive(false); + + serverNameLabel->set_markup("<i>n/a</i>"); + serverVersionLabel->set_markup("<i>n/a</i>"); + defaultSampleTypeLabel->set_markup("<i>n/a</i>"); + hostNameLabel->set_markup("<i>n/a</i>"); + userNameLabel->set_markup("<i>n/a</i>"); +} + +void MainWindow::onDeviceOpenButton() { + Gtk::TreeModel::Path p; + Gtk::TreeViewColumn *c; + deviceTreeView->get_cursor(p, c); + Gtk::TreeModel::Row row = *(deviceTreeModel->get_iter(p)); + + if (!serverInfo) + return; + + 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::onConnectButton() { + create_connection(); +} diff --git a/MainWindow.hh b/MainWindow.hh new file mode 100644 index 0000000..635e66d --- /dev/null +++ b/MainWindow.hh @@ -0,0 +1,70 @@ +#ifndef foomainwindowhhfoo +#define foomainwindowhhfoo + +#include <gtkmm.h> +#include <libglademm.h> +#include <polyp/polyplib.h> + +class MainWinow; + +#include "ServerInfo.hh" + +class MainWindow : public Gtk::Window { +public: + MainWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade); + virtual ~MainWindow(); + static MainWindow* create(); + + Gtk::Label *statusLabel, + *serverNameLabel, + *serverVersionLabel, + *defaultSampleTypeLabel, + *userNameLabel, + *hostNameLabel; + + Gtk::Button *deviceOpenButton, + *moduleOpenButton, + *connectButton; + + Gtk::TreeView *deviceTreeView, *moduleTreeView; + +protected: + + class DeviceTreeModelColumns : public Gtk::TreeModel::ColumnRecord { + public: + + DeviceTreeModelColumns() { + add(name); + add(description); + add(index); + add(type); + } + + Gtk::TreeModelColumn<Glib::ustring> name; + Gtk::TreeModelColumn<Glib::ustring> description; + Gtk::TreeModelColumn<int> index; + Gtk::TreeModelColumn<int> type; + }; + + DeviceTreeModelColumns deviceTreeModelColumns; + Glib::RefPtr<Gtk::TreeStore> deviceTreeModel; + + Gtk::TreeModel::Row sinkRow, sourceRow; + +public: + virtual void updateInfo(const struct pa_server_info &i); + virtual void updateInfo(const SinkInfo &i); + virtual void updateInfo(const SourceInfo &i); + + virtual void onDeviceTreeViewCursorChanged(); + virtual void onDeviceTreeViewRowActivated(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 onConnectButton(); +}; + +#endif diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cfed04f --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ + +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 + $(CXX) $^ -o $@ $(LIBS) + +clean: + rm -rf *.o paman diff --git a/ServerInfo.cc b/ServerInfo.cc new file mode 100644 index 0000000..763f150 --- /dev/null +++ b/ServerInfo.cc @@ -0,0 +1,165 @@ +#include <iostream> +#include <polyp/polyplib-error.h> + +#include "ServerInfo.hh" +#include "paman.hh" + +SinkInfo::SinkInfo(const struct pa_sink_info &i) : + name(i.name), + description(i.description), + index(i.index), + sample_spec(i.sample_spec), + monitor_source(i.monitor_source), + owner_module(i.owner_module), + volume(i.volume), + latency(i.latency), + sinkWindow(NULL) { +} + +SinkInfo::~SinkInfo() { + if (sinkWindow) + delete sinkWindow; +} + +void SinkInfo::update(const struct pa_sink_info &i) { + name = Glib::ustring(i.name); + description = i.description; + index = i.index; + sample_spec = i.sample_spec; + monitor_source = i.monitor_source; + owner_module = i.owner_module; + volume = i.volume; + latency = i.latency; + + if (sinkWindow) + sinkWindow->updateInfo(*this); +} + +void SinkInfo::showWindow() { + if (sinkWindow) + sinkWindow->present(); + else { + sinkWindow = SinkWindow::create(); + sinkWindow->updateInfo(*this); + sinkWindow->show(); + } +} + +SourceInfo::SourceInfo(const struct pa_source_info &i) : + name(i.name), + description(i.description), + index(i.index), + sample_spec(i.sample_spec), + owner_module(i.owner_module), + monitor_of_sink(i.monitor_of_sink), + sourceWindow(NULL) { +} + +SourceInfo::~SourceInfo() { + if (sourceWindow) + delete sourceWindow; +} + +void SourceInfo::update(const struct pa_source_info &i) { + name = i.name; + description = i.description; + index = i.index; + sample_spec = i.sample_spec; + owner_module = i.owner_module; + monitor_of_sink = i.monitor_of_sink; + + if (sourceWindow) + sourceWindow->updateInfo(*this); +} + +void SourceInfo::showWindow() { + if (sourceWindow) + sourceWindow->present(); + else { + sourceWindow = SourceWindow::create(); + sourceWindow->updateInfo(*this); + sourceWindow->show(); + } +} + +static void server_info_callback(struct pa_context *c, const struct pa_server_info *i, void *userdata) { + ServerInfo *si = (ServerInfo*) userdata; + + if (!i) { + mainWindow->showFailure(pa_strerror(pa_context_errno(c))); + return; + } + + mainWindow->updateInfo(*i); +} + +static void sink_info_callback(struct pa_context *c, const struct pa_sink_info *i, int is_last, void *userdata) { + ServerInfo *si = (ServerInfo*) userdata; + if (!is_last) + 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; + if (!is_last) + si->updateInfo(*i); +} + +ServerInfo::ServerInfo(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); +} + +ServerInfo::~ServerInfo() { + for (std::map<int, SinkInfo*>::iterator i = sinks.begin(); i != sinks.end(); i++) + delete i->second; + + for (std::map<int, SourceInfo*>::iterator i = sources.begin(); i != sources.end(); i++) + delete i->second; +} + +void ServerInfo::updateInfo(const struct pa_sink_info &i) { + SinkInfo *si; + if ((si = sinks[i.index])) + si->update(i); + else { + SinkInfo *n = new SinkInfo(i); + sinks[i.index] = n; + mainWindow->updateInfo(*n); + } +} + +void ServerInfo::updateInfo(const struct pa_source_info &i) { + SourceInfo *si; + if ((si = sources[i.index])) + si->update(i); + else { + SourceInfo *n = new SourceInfo(i); + sources[i.index] = n; + mainWindow->updateInfo(*n); + } +} + +void ServerInfo::showSinkWindow(uint32_t index) { + SinkInfo *i; + + if ((i = sinks[index])) + i->showWindow(); +} + +void ServerInfo::showSourceWindow(uint32_t index) { + SourceInfo *i; + + if ((i = sources[index])) + i->showWindow(); +} + +SourceInfo* ServerInfo::getSourceInfo(uint32_t index) { + return sources[index]; +} + +SinkInfo* ServerInfo::getSinkInfo(uint32_t index) { + return sinks[index]; +} diff --git a/ServerInfo.hh b/ServerInfo.hh new file mode 100644 index 0000000..6dea7a9 --- /dev/null +++ b/ServerInfo.hh @@ -0,0 +1,75 @@ +#ifndef fooserverinfohhfoo +#define fooserverinfohhfoo + +#include <gtkmm.h> +#include <map> + +#include <polyp/polyplib.h> + +class SinkInfo; +class SourceInfo; +class ServerInfo; + +#include "SinkWindow.hh" +#include "SourceWindow.hh" +#include "MainWindow.hh" + +class SinkInfo { +public: + + SinkInfo(const struct pa_sink_info &i); + ~SinkInfo(); + + void update(const struct pa_sink_info &i); + void showWindow(); + + Glib::ustring name, description; + uint32_t index; + struct pa_sample_spec sample_spec; + uint32_t monitor_source; + uint32_t owner_module; + uint32_t volume; + uint32_t latency; + + SinkWindow *sinkWindow; +}; + +class SourceInfo { +public: + SourceInfo(const struct pa_source_info &i); + ~SourceInfo(); + + void update(const struct pa_source_info &i); + void showWindow(); + + Glib::ustring name, description; + uint32_t index; + struct pa_sample_spec sample_spec; + uint32_t owner_module; + uint32_t monitor_of_sink; + + SourceWindow *sourceWindow; +}; + +class ServerInfo { +public: + ServerInfo(struct pa_context &c); + ~ServerInfo(); + + void updateInfo(const struct pa_sink_info &i); + void updateInfo(const struct pa_source_info &i); + + void showSinkWindow(uint32_t index); + void showSourceWindow(uint32_t index); + + SourceInfo* getSourceInfo(uint32_t index); + SinkInfo* getSinkInfo(uint32_t index); + +protected: + std::map<int, SinkInfo*> sinks; + std::map<int, SourceInfo*> sources; + + struct pa_context &context; +}; + +#endif diff --git a/SinkWindow.cc b/SinkWindow.cc new file mode 100644 index 0000000..83e0955 --- /dev/null +++ b/SinkWindow.cc @@ -0,0 +1,68 @@ +#include "paman.hh" +#include "SinkWindow.hh" + +#define GLADE_NAME "sinkWindow" + +SinkWindow::SinkWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : + Gtk::Window(cobject), + nameLabel(NULL), + descriptionLabel(NULL), + indexLabel(NULL), + sampleTypeLabel(NULL), + latencyLabel(NULL), + ownerModuleLabel(NULL), + monitorSourceLabel(NULL), + closeButton(NULL), + toMonitorSourceButton(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("ownerModuleLabel", ownerModuleLabel); + refGlade->get_widget("monitorSourceLabel", monitorSourceLabel); + refGlade->get_widget("closeButton", closeButton); + refGlade->get_widget("toMonitorSourceButton", toMonitorSourceButton); + + closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onCloseButton)); + toMonitorSourceButton->signal_clicked().connect(sigc::mem_fun(*this, &SinkWindow::onToMonitorSourceButton)); +} + +SinkWindow* SinkWindow::create() { + SinkWindow *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) { + 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); + + SourceInfo *source = serverInfo->getSourceInfo(i.monitor_source); + monitorSourceLabel->set_text(source->name); + + set_title("Sink: "+i.name); + + monitor_source = i.monitor_source; +} + +void SinkWindow::onCloseButton() { + hide(); +} + +void SinkWindow::onToMonitorSourceButton() { + serverInfo->showSourceWindow(monitor_source); +} diff --git a/SinkWindow.hh b/SinkWindow.hh new file mode 100644 index 0000000..5027751 --- /dev/null +++ b/SinkWindow.hh @@ -0,0 +1,35 @@ +#ifndef foosinkwindowhhfoo +#define foosinkwindowhhfoo + +#include <gtkmm.h> +#include <libglademm.h> + +class SinkWindow; + +#include "ServerInfo.hh" + +class SinkWindow : public Gtk::Window { +public: + SinkWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade); + static SinkWindow* create(); + + Gtk::Label *nameLabel, + *descriptionLabel, + *indexLabel, + *sampleTypeLabel, + *latencyLabel, + *ownerModuleLabel, + *monitorSourceLabel; + + Gtk::Button *closeButton, + *toMonitorSourceButton; + + uint32_t owner_module, monitor_source; + + void updateInfo(const SinkInfo &i); + + virtual void onCloseButton(); + virtual void onToMonitorSourceButton(); +}; + +#endif diff --git a/SourceWindow.cc b/SourceWindow.cc new file mode 100644 index 0000000..e91f8be --- /dev/null +++ b/SourceWindow.cc @@ -0,0 +1,71 @@ +#include "paman.hh" +#include "SourceWindow.hh" + +#define GLADE_NAME "sourceWindow" + +SourceWindow::SourceWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade) : + Gtk::Window(cobject), + nameLabel(NULL), + descriptionLabel(NULL), + indexLabel(NULL), + sampleTypeLabel(NULL), + ownerModuleLabel(NULL), + monitorOfSinkLabel(NULL), + closeButton(NULL), + toParentSinkButton(NULL) { + + refGlade->get_widget("nameLabel", nameLabel); + refGlade->get_widget("descriptionLabel", descriptionLabel); + refGlade->get_widget("indexLabel", indexLabel); + refGlade->get_widget("sampleTypeLabel", sampleTypeLabel); + refGlade->get_widget("ownerModuleLabel", ownerModuleLabel); + refGlade->get_widget("monitorOfSinkLabel", monitorOfSinkLabel); + refGlade->get_widget("closeButton", closeButton); + refGlade->get_widget("toParentSinkButton", toParentSinkButton); + + closeButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceWindow::onCloseButton)); + toParentSinkButton->signal_clicked().connect(sigc::mem_fun(*this, &SourceWindow::onParentSinkButton)); +} + +SourceWindow* SourceWindow::create() { + SourceWindow *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 SourceWindow::updateInfo(const SourceInfo &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); + + monitorOfSinkLabel->set_markup("<i>n/a</i>"); + toParentSinkButton->set_sensitive(false); + if (i.monitor_of_sink != (uint32_t) -1) { + SinkInfo *sink = serverInfo->getSinkInfo(i.monitor_of_sink); + if (sink) { + monitorOfSinkLabel->set_text(sink->name); + toParentSinkButton->set_sensitive(true); + } + } + + monitor_of_sink = i.monitor_of_sink; + + set_title("Source: "+i.name); +} + +void SourceWindow::onCloseButton() { + hide(); +} + +void SourceWindow::onParentSinkButton() { + if (monitor_of_sink != (uint32_t) -1) + serverInfo->showSinkWindow(monitor_of_sink); +} diff --git a/SourceWindow.hh b/SourceWindow.hh new file mode 100644 index 0000000..71e33e0 --- /dev/null +++ b/SourceWindow.hh @@ -0,0 +1,30 @@ +#ifndef foosourcewindowhhfoo +#define foosourcewindowhhfoo + +#include <gtkmm.h> +#include <libglademm.h> + +class SourceWindow : public Gtk::Window { +public: + SourceWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade); + static SourceWindow* create(); + + Gtk::Label *nameLabel, + *descriptionLabel, + *indexLabel, + *sampleTypeLabel, + *ownerModuleLabel, + *monitorOfSinkLabel; + + Gtk::Button *closeButton, + *toParentSinkButton; + + uint32_t monitor_of_sink; + + void updateInfo(const SourceInfo &i); + + virtual void onCloseButton(); + virtual void onParentSinkButton(); +}; + +#endif diff --git a/paman.cc b/paman.cc new file mode 100644 index 0000000..1bde0ba --- /dev/null +++ b/paman.cc @@ -0,0 +1,101 @@ +#include <signal.h> + +#include <gtkmm.h> +#include <libglademm.h> + +#include <polyp/polyplib.h> +#include <polyp/glib-mainloop.h> +#include <polyp/polyplib-error.h> + +#include "paman.hh" +#include "SinkWindow.hh" +#include "MainWindow.hh" + +MainWindow *mainWindow = NULL; +ServerInfo *serverInfo = 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); + + if (!success) { + mainWindow->showFailure(pa_strerror(pa_context_errno(c))); + //pa_context_free(context); /* Mrprmfmfl! */ + context = NULL; + mainWindow->connectButton->set_sensitive(true); + return; + } + + mainWindow->showSuccess("Connected"); + mainWindow->connectButton->set_sensitive(false); + serverInfo = new ServerInfo(*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; + //pa_context_free(contetx); /* Mrprmfmfl! */ + context = NULL; + mainWindow->connectButton->set_sensitive(true); +} + +void create_connection() { + if (serverInfo) { + delete serverInfo; + serverInfo = NULL; + } + if (context) { + pa_context_free(context); + context = NULL; + } + + mainWindow->showSuccess("Connecting ..."); + context = pa_context_new(mainloop_api, "Polypaudio Manager"); + g_assert(context); + pa_context_set_die_callback(context, die_callback, NULL); + + if (pa_context_connect(context, NULL, context_complete_callback, NULL) < 0) { + context_complete_callback(context, 0, NULL); + return; + } + + mainWindow->connectButton->set_sensitive(false); +} + +int main(int argc, char *argv[]) { + struct pa_glib_mainloop *m; + + signal(SIGPIPE, SIG_IGN); + + Gtk::Main kit(argc, argv); + + mainWindow = MainWindow::create(); + g_assert(mainWindow); + + m = pa_glib_mainloop_new(g_main_context_default()); + g_assert(m); + mainloop_api = pa_glib_mainloop_get_api(m); + g_assert(mainloop_api); + + create_connection(); + + Gtk::Main::run(*mainWindow); + +quit: + if (serverInfo) + delete serverInfo; + + if (context) + pa_context_free(context); + + mainloop_api = NULL; + if (mainWindow) + delete mainWindow; + + pa_glib_mainloop_free(m); + + return 0; +} diff --git a/paman.glade b/paman.glade new file mode 100644 index 0000000..07eeb12 --- /dev/null +++ b/paman.glade @@ -0,0 +1,1675 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd"> + +<glade-interface> + +<widget class="GtkWindow" id="mainWindow"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="title" translatable="yes">Polypaudio Manager</property> + <property name="type">GTK_WINDOW_TOPLEVEL</property> + <property name="window_position">GTK_WIN_POS_NONE</property> + <property name="modal">False</property> + <property name="default_width">400</property> + <property name="default_height">300</property> + <property name="resizable">True</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_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + + <child> + <widget class="GtkVBox" id="vbox3"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkNotebook" id="notebook1"> + <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="vbox8"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkAlignment" id="alignment5"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkTable" id="table3"> + <property name="border_width">10</property> + <property name="visible">True</property> + <property name="n_rows">5</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="label43"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Host 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">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="label44"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>User 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">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="label38"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Server Version:</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="label37"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Server 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">1</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="label4711"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Default 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</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="serverNameLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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">1</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="x_options">fill</property> + <property name="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="defaultSampleTypeLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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</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="hostNameLabel"> + <property name="visible">True</property> + <property name="label" translatable="yes"></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">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="userNameLabel"> + <property name="visible">True</property> + <property name="label" translatable="yes"></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">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="serverVersionLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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="left_attach">1</property> + <property name="right_attach">2</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> + </widget> + </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="hbuttonbox7"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="spacing">0</property> + + <child> + <widget class="GtkButton" id="connectButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + + <child> + <widget class="GtkAlignment" id="alignment8"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox7"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image7"> + <property name="visible">True</property> + <property name="stock">gtk-network</property> + <property name="icon_size">4</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4716"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Connect</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </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="label34"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Server Information</property> + <property name="use_underline">True</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> + + <child> + <widget class="GtkVBox" id="vbox4"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow2"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <widget class="GtkTreeView" id="deviceTreeView"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">True</property> + <property name="rules_hint">False</property> + <property name="reorderable">False</property> + <property name="enable_search">True</property> + </widget> + </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="hbuttonbox3"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkButton" id="deviceOpenButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + + <child> + <widget class="GtkAlignment" id="alignment6"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox5"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image5"> + <property name="visible">True</property> + <property name="stock">gtk-jump-to</property> + <property name="icon_size">4</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4712"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Open</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </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="label35"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Devices</property> + <property name="use_underline">True</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> + + <child> + <widget class="GtkVBox" id="vbox5"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkScrolledWindow" id="scrolledwindow3"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property> + <property name="shadow_type">GTK_SHADOW_IN</property> + <property name="window_placement">GTK_CORNER_TOP_LEFT</property> + + <child> + <widget class="GtkTreeView" id="moduleTreeView"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="headers_visible">True</property> + <property name="rules_hint">False</property> + <property name="reorderable">False</property> + <property name="enable_search">True</property> + </widget> + </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="hbuttonbox4"> + <property name="visible">True</property> + <property name="layout_style">GTK_BUTTONBOX_END</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkButton" id="moduleOpenButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="relief">GTK_RELIEF_NORMAL</property> + <property name="focus_on_click">True</property> + + <child> + <widget class="GtkAlignment" id="alignment7"> + <property name="visible">True</property> + <property name="xalign">0.5</property> + <property name="yalign">0.5</property> + <property name="xscale">0</property> + <property name="yscale">0</property> + <property name="top_padding">0</property> + <property name="bottom_padding">0</property> + <property name="left_padding">0</property> + <property name="right_padding">0</property> + + <child> + <widget class="GtkHBox" id="hbox6"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">2</property> + + <child> + <widget class="GtkImage" id="image6"> + <property name="visible">True</property> + <property name="stock">gtk-jump-to</property> + <property name="icon_size">4</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4713"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Open</property> + <property name="use_underline">True</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> + </widget> + </child> + </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="label36"> + <property name="visible">True</property> + <property name="label" translatable="yes">_Modules</property> + <property name="use_underline">True</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="GtkLabel" id="statusLabel"> + <property name="visible">True</property> + <property name="label" translatable="yes">label36</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="padding">0</property> + <property name="expand">False</property> + <property name="fill">False</property> + </packing> + </child> + </widget> + </child> +</widget> + +<widget class="GtkWindow" id="sinkWindow"> + <property name="border_width">5</property> + <property name="title" translatable="yes">Sink</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_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + + <child> + <widget class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkNotebook" id="notebook2"> + <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="vbox6"> + <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="table1"> + <property name="border_width">5</property> + <property name="visible">True</property> + <property name="n_rows">7</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="label2"> + <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="label3"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Description:</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="label7"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Monitor 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">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="label6"> + <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="label5"> + <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">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="label4"> + <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">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="label8"> + <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">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="ownerModuleLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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="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"></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="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"></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="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"></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="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="descriptionLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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="nameLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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="monitorSourceLabel"> + <property name="visible">True</property> + <property name="label" translatable="yes"></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> + </widget> + <packing> + <property name="padding">0</property> + <property name="expand">True</property> + <property name="fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkHButtonBox" id="hbuttonbox5"> + <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="sensitive">False</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">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="toMonitorSourceButton"> + <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="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">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4714"> + <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="hbuttonbox1"> + <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">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +<widget class="GtkWindow" id="sourceWindow"> + <property name="border_width">5</property> + <property name="title" translatable="yes">Source</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_NORMAL</property> + <property name="gravity">GDK_GRAVITY_NORTH_WEST</property> + + <child> + <widget class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <property name="homogeneous">False</property> + <property name="spacing">5</property> + + <child> + <widget class="GtkNotebook" id="notebook3"> + <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="vbox7"> + <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="table2"> + <property name="border_width">5</property> + <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="label18"> + <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="label19"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Description:</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="label23"> + <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">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="label24"> + <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">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="ownerModuleLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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="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"></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="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"></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="y_options"></property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="descriptionLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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="nameLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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="label21"> + <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">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="label20"> + <property name="visible">True</property> + <property name="label" translatable="yes"><b>Monitor of 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">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="monitorOfSinkLabel"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes"></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="hbuttonbox6"> + <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="sensitive">False</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">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="toParentSinkButton"> + <property name="visible">True</property> + <property name="can_default">True</property> + <property name="can_focus">True</property> + <property name="label" translatable="yes">To Parent 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">True</property> + <property name="fill">True</property> + </packing> + </child> + </widget> + <packing> + <property name="tab_expand">False</property> + <property name="tab_fill">True</property> + </packing> + </child> + + <child> + <widget class="GtkLabel" id="label4715"> + <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="hbuttonbox2"> + <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="has_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">True</property> + </packing> + </child> + </widget> + </child> +</widget> + +</glade-interface> diff --git a/paman.gladep b/paman.gladep new file mode 100644 index 0000000..f50f504 --- /dev/null +++ b/paman.gladep @@ -0,0 +1,12 @@ +<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*--> +<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd"> + +<glade-project> + <name>Paman</name> + <program_name>paman</program_name> + <gnome_support>FALSE</gnome_support> + <gettext_support>FALSE</gettext_support> + <output_main_file>FALSE</output_main_file> + <output_support_files>FALSE</output_support_files> + <output_build_files>FALSE</output_build_files> +</glade-project> diff --git a/paman.hh b/paman.hh new file mode 100644 index 0000000..8bebfb9 --- /dev/null +++ b/paman.hh @@ -0,0 +1,15 @@ +#ifndef foopamanhhfoo +#define foopamanhhfoo + +#include "ServerInfo.hh" + +#define GLADE_FILE "paman.glade" + +extern ServerInfo *serverInfo; +extern MainWindow *mainWindow; +extern struct pa_context *context; + +void create_connection(); + + +#endif |