summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/macro.cc2
-rw-r--r--client/macrowindow.cc7
-rw-r--r--client/macrowindow.h4
-rw-r--r--client/widgets/widget.cc2
4 files changed, 10 insertions, 5 deletions
diff --git a/client/macro.cc b/client/macro.cc
index 3994a42..3bcdaeb 100644
--- a/client/macro.cc
+++ b/client/macro.cc
@@ -95,7 +95,7 @@ void Macro::init(QBoxLayout *layout, Macros &macros,
// if(macros.find(name) == macros.end()) {
if(window == NULL && drawer == NULL) {
- window = new MacroWindow(netcom, node, templ, !isstatic, iscompact);
+ window = new MacroWindow(netcom, node, templ, isstatic, iscompact);
/*
QWidget *edge = new QWidget();
diff --git a/client/macrowindow.cc b/client/macrowindow.cc
index b10a6f0..08bba6d 100644
--- a/client/macrowindow.cc
+++ b/client/macrowindow.cc
@@ -45,9 +45,11 @@ extern QString host;
extern quint16 port;
MacroWindow::MacroWindow(NetCom &n, QDomNode &xml_doc, QString templ,
- bool collapsed, bool compact)
+ bool is_static, bool compact)
: Collapser(), netcom(n)
{
+ this->is_static = is_static;
+
DEBUG(macrowindow, "Constructor %p\n", this);
mainwidget = NULL;
@@ -61,7 +63,7 @@ MacroWindow::MacroWindow(NetCom &n, QDomNode &xml_doc, QString templ,
update(xml_doc);
- setCollapsed(collapsed);
+ setCollapsed(!is_static);
active = true;
connect(this, SIGNAL(doneCollapsing()), this, SLOT(collapsed()));
@@ -131,6 +133,7 @@ void MacroWindow::initMacro(QDomNode &node)
// Moved to expandWrapper (validation bugfix)
// mainwidget->setValues();
+ if(is_static) mainwidget->setValues();
if(waschanged == true) macroChanged();
diff --git a/client/macrowindow.h b/client/macrowindow.h
index dc60ccc..8aedd1e 100644
--- a/client/macrowindow.h
+++ b/client/macrowindow.h
@@ -41,7 +41,7 @@ class MacroWindow : public Collapser
Q_OBJECT
public:
MacroWindow(NetCom &netcom, QDomNode &xml_doc, QString templ,
- bool collapsed = true, bool compact = false);
+ bool is_static = false, bool compact = false);
~MacroWindow();
LUA *lua;
@@ -88,6 +88,8 @@ private:
bool waschanged;
bool active;
+
+ bool is_static;
};
#endif/*__PRACRO_MACROWINDOW_H__*/
diff --git a/client/widgets/widget.cc b/client/widgets/widget.cc
index 4c44904..b155279 100644
--- a/client/widgets/widget.cc
+++ b/client/widgets/widget.cc
@@ -226,7 +226,7 @@ bool Widget::setKeyboardFocus()
Widget *Widget::findWidget(QString n, bool deep)
{
- // DEBUG(widget, "Find Widget %p\n", this);
+ DEBUG(widget, "Find Widget this: %s\n", name().toStdString().c_str());
if(n == name()) return this;