diff options
| author | deva <deva> | 2010-08-20 07:16:06 +0000 | 
|---|---|---|
| committer | deva <deva> | 2010-08-20 07:16:06 +0000 | 
| commit | 7e97935b7d719591005fc761ba885c0d9b7dd99f (patch) | |
| tree | 0418c7a419555bdc1228c5e7fe8845acd0a21585 | |
| parent | fb6bcbfc31da3cdef6f6950e3e6aec900909b02e (diff) | |
Set Values just after window generation is macro is static.
| -rw-r--r-- | client/macro.cc | 2 | ||||
| -rw-r--r-- | client/macrowindow.cc | 7 | ||||
| -rw-r--r-- | client/macrowindow.h | 4 | ||||
| -rw-r--r-- | client/widgets/widget.cc | 2 | 
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 ¯os,    //  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;  | 
