summaryrefslogtreecommitdiffstats
path: root/ClientWindow.cc
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2004-08-15 11:27:34 +0000
committerLennart Poettering <lennart@poettering.net>2004-08-15 11:27:34 +0000
commit4b682a9eba6590d8fe090f68dda6afe59ae64f85 (patch)
tree75345c90f9174dd45c9b5196645a5054c889b698 /ClientWindow.cc
parentf8b436993e3ea7059984538cd65d50bd50671fe6 (diff)
Move everything to src/ directory
git-svn-id: file:///home/lennart/svn/public/paman/trunk@8 cdefa82f-4ce1-0310-97f5-ab6066f37c3c
Diffstat (limited to 'ClientWindow.cc')
-rw-r--r--ClientWindow.cc59
1 files changed, 0 insertions, 59 deletions
diff --git a/ClientWindow.cc b/ClientWindow.cc
deleted file mode 100644
index 88e2ad3..0000000
--- a/ClientWindow.cc
+++ /dev/null
@@ -1,59 +0,0 @@
-#include <iostream>
-
-#include "paman.hh"
-#include "ClientWindow.hh"
-
-#define GLADE_NAME "clientWindow"
-
-ClientWindow::ClientWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& 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<Gnome::Glade::Xml> 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);
-}