Added widget dynamic property used to indicate to enqueue an ui.action message when window visibility changes. This property must be used when the window is destroyed when hidden.
git-svn-id: http://voip.null.ro/svn/yate@2696 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
fe43444343
commit
7a33256e23
|
@ -2101,8 +2101,20 @@ void QtWindow::setVisible(bool visible)
|
||||||
// Notify the client on window visibility changes
|
// Notify the client on window visibility changes
|
||||||
bool changed = (m_visible != visible);
|
bool changed = (m_visible != visible);
|
||||||
m_visible = visible;
|
m_visible = visible;
|
||||||
if (changed && Client::self())
|
if (changed && Client::self()) {
|
||||||
Client::self()->toggle(this,"window_visible_changed",m_visible);
|
QVariant var;
|
||||||
|
if (wndWidget())
|
||||||
|
var = wndWidget()->property("dynamicUiActionVisibleChanged");
|
||||||
|
if (!var.toBool())
|
||||||
|
Client::self()->toggle(this,"window_visible_changed",m_visible);
|
||||||
|
else {
|
||||||
|
Message* m = new Message("ui.action");
|
||||||
|
m->addParam("action","window_visible_changed");
|
||||||
|
m->addParam("visible",String::boolText(m_visible));
|
||||||
|
m->addParam("window",m_id);
|
||||||
|
Engine::enqueue(m);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Show the window
|
// Show the window
|
||||||
|
|
Loading…
Reference in New Issue