This commit is contained in:
parent
38e6447885
commit
ac6fae0f47
@ -26,7 +26,7 @@
|
||||
|
||||
namespace WebToolkit {
|
||||
Application::Application(const Wt::WEnvironment &env, bool embedded)
|
||||
: Wt::WApplication(env), m_startup(this, "startup"), m_logout(this, "logout") {
|
||||
: Wt::WApplication(env), m_startup(this, "startup"), m_quit(this, "quit"), m_logout(this, "logout") {
|
||||
messageResourceBundle().use(appRoot() + "wt");
|
||||
messageResourceBundle().use(appRoot() + "auth_strings");
|
||||
messageResourceBundle().use(appRoot() + "auth_css_theme");
|
||||
@ -96,6 +96,10 @@ Application::Application(const Wt::WEnvironment &env, bool embedded)
|
||||
dynamic_cast<Application *>(app)->handlePathChange(path);
|
||||
}
|
||||
});
|
||||
m_quit.connect(this, []() {
|
||||
LOG(info) << "wtapp quit.";
|
||||
Wt::WApplication::instance()->quit();
|
||||
});
|
||||
internalPathChanged().connect(this, &Application::handlePathChange);
|
||||
doJavaScript(m_startup.createCall({}));
|
||||
}
|
||||
|
@ -37,6 +37,7 @@ protected:
|
||||
private:
|
||||
std::unique_ptr<Session> m_session;
|
||||
Wt::JSignal<> m_startup;
|
||||
Wt::JSignal<> m_quit;
|
||||
|
||||
Wt::WContainerWidget *m_root = nullptr;
|
||||
NavigationBar *m_navigationBar = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user