mirror of https://github.com/BOINC/boinc.git
win32 get_initial_project using dialog
svn path=/trunk/boinc/; revision=475
This commit is contained in:
parent
797767b6ee
commit
d06cf09e23
|
@ -25,7 +25,6 @@
|
|||
#include <unistd.h>
|
||||
#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() {
|
||||
|
|
Loading…
Reference in New Issue