implement auto login and remember password

This commit is contained in:
Eduardo Bart
2011-11-16 16:59:55 -02:00
parent f381cb0a74
commit 9159e14895
6 changed files with 62 additions and 10 deletions

View File

@@ -92,8 +92,6 @@ void push_luavalue(const std::string& str)
bool luavalue_cast(int index, std::string& str)
{
str = g_lua.toString(index);
if(str.empty() && g_lua.isString(index) && !g_lua.isNil())
return false;
return true;
}

View File

@@ -361,7 +361,7 @@ void UIWidget::addChild(const UIWidgetPtr& child)
auto self = asUIWidget();
g_dispatcher.addEvent([self,child]() {
// always focus new child
if(child->isFocusable() && child->isExplicitlyVisible() && child->isExplicitlyEnabled())
if(child->getParent() == self && child->isFocusable() && child->isExplicitlyVisible() && child->isExplicitlyEnabled())
self->focusChild(child, Fw::ActiveFocusReason);
});