From d06cf09e234d5fc0b66e78e66ecffa382ca5f462 Mon Sep 17 00:00:00 2001 From: Seth Cooper Date: Sun, 6 Oct 2002 00:47:07 +0000 Subject: [PATCH] win32 get_initial_project using dialog svn path=/trunk/boinc/; revision=475 --- client/main.C | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/client/main.C b/client/main.C index a0847b8362..e36fcba5cd 100644 --- a/client/main.C +++ b/client/main.C @@ -25,7 +25,6 @@ #include #endif - #include "account.h" #include "client_state.h" #include "error_numbers.h" @@ -33,6 +32,7 @@ #include "log_flags.h" #include "prefs.h" #include "util.h" +#include "win/wingui.h" // Display a message to the user. Depending on the priority, the // message may be more or less obtrusive @@ -45,6 +45,18 @@ void show_message(char* message, char* priority) { } } +#ifdef _WIN32 + +int get_initial_project() { + CLoginDialog dlg(IDD_LOGIN); + int retval = dlg.DoModal(); + if (retval != IDOK) return -1; + write_account_file(dlg.m_url.GetBuffer(0), dlg.m_auth.GetBuffer(0)); + return 0; +} + +#else + // Prompt user for project URL and authenticator, // and create an account file // TODO: use better input method here, backspace doesn't always seem to work @@ -70,6 +82,8 @@ int get_initial_project() { return 0; } +#endif + #ifdef __APPLE_CC__ #include "mac_main.h" int main() {