History

more work on authentication, show login window when domain asks

Stephen Birarda committed 12 years ago

Commit 8a0136e1 parent c762b9213 files · +165 −35Browse files

Showing the changes to interface/src/Menu.cpp (1 of 13 files). Show all

Unified · Split

interface/src/Menu.cpp+6−2
@@ -89,7 +89,7 @@ Menu::Menu() : · 88 unmodified lines
89 MenuOption::Login,89 MenuOption::Login,
90 0,90 0,
91 this,91 this,
92 SLOT(login())));92 SLOT(loginForCurrentDomain())));
93 93
94 addDisabledActionAndSeparator(fileMenu, "Scripts");94 addDisabledActionAndSeparator(fileMenu, "Scripts");
95 addActionToQMenuAndActionHash(fileMenu, MenuOption::LoadScript, Qt::CTRL | Qt::Key_O, appInstance, SLOT(loadDialog()));95 addActionToQMenuAndActionHash(fileMenu, MenuOption::LoadScript, Qt::CTRL | Qt::Key_O, appInstance, SLOT(loadDialog()));
@@ -737,7 +737,11 @@ void sendFakeEnterEvent() { · 641 unmodified lines
737const int QLINE_MINIMUM_WIDTH = 400;737const int QLINE_MINIMUM_WIDTH = 400;
738const float DIALOG_RATIO_OF_WINDOW = 0.30f;738const float DIALOG_RATIO_OF_WINDOW = 0.30f;
739 739
740void Menu::login() {740void Menu::loginForCurrentDomain() {
741 showLoginForRootURL(NodeList::getInstance()->getDomainInfo().getRootAuthenticationURL());
742}
743
744void Menu::showLoginForRootURL(const QUrl& rootURL) {
741 QInputDialog loginDialog(Application::getInstance()->getWindow());745 QInputDialog loginDialog(Application::getInstance()->getWindow());
742 loginDialog.setWindowTitle("Login");746 loginDialog.setWindowTitle("Login");
743 loginDialog.setLabelText("Username:");747 loginDialog.setLabelText("Username:");