mirror of https://github.com/cy384/ssheven.git
Temporary fix for reopen the window if password fails
This commit is contained in:
parent
3d6c3ec554
commit
1521e6f852
|
@ -0,0 +1,3 @@
|
||||||
|
build-fat/
|
||||||
|
build-m68k/
|
||||||
|
build-ppc/
|
|
@ -579,6 +579,7 @@ void* read_thread(void* arg)
|
||||||
}
|
}
|
||||||
else printf_i("unexpected failure: %s\r\n", libssh2_error_string(rc));
|
else printf_i("unexpected failure: %s\r\n", libssh2_error_string(rc));
|
||||||
ok = 0;
|
ok = 0;
|
||||||
|
process_login();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
128
ssheven.c
128
ssheven.c
|
@ -1151,69 +1151,9 @@ int safety_checks(void)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
void process_login(void)
|
||||||
{
|
{
|
||||||
OSStatus err = noErr;
|
OSStatus err = noErr;
|
||||||
|
|
||||||
// expands the application heap to its maximum requested size
|
|
||||||
// supposedly good for performance
|
|
||||||
// also required before creating threads!
|
|
||||||
MaxApplZone();
|
|
||||||
|
|
||||||
// "Call the MoreMasters procedure several times at the beginning of your program"
|
|
||||||
MoreMasters();
|
|
||||||
MoreMasters();
|
|
||||||
|
|
||||||
// set default preferences, then load from preferences file if possible
|
|
||||||
init_prefs();
|
|
||||||
load_prefs();
|
|
||||||
|
|
||||||
// general gui setup
|
|
||||||
InitGraf(&qd.thePort);
|
|
||||||
InitFonts();
|
|
||||||
InitWindows();
|
|
||||||
InitMenus();
|
|
||||||
|
|
||||||
void* menu = GetNewMBar(MBAR_SSHEVEN);
|
|
||||||
SetMenuBar(menu);
|
|
||||||
AppendResMenu(GetMenuHandle(MENU_APPLE), 'DRVR');
|
|
||||||
|
|
||||||
// disable stuff in edit menu until we implement it
|
|
||||||
menu = GetMenuHandle(MENU_EDIT);
|
|
||||||
DisableItem(menu, 1);
|
|
||||||
DisableItem(menu, 3);
|
|
||||||
//DisableItem(menu, 4);
|
|
||||||
DisableItem(menu, 5);
|
|
||||||
DisableItem(menu, 6);
|
|
||||||
DisableItem(menu, 7);
|
|
||||||
DisableItem(menu, 9);
|
|
||||||
|
|
||||||
DrawMenuBar();
|
|
||||||
|
|
||||||
generate_key_mapping();
|
|
||||||
|
|
||||||
console_setup();
|
|
||||||
|
|
||||||
char* logo = " _____ _____ _ _\r\n"
|
|
||||||
" / ____/ ____| | | |\r\n"
|
|
||||||
" | (___| (___ | |__| | _____ _____ _ __\r\n"
|
|
||||||
" \\___ \\\\___ \\| __ |/ _ \\ \\ / / _ \\ '_ \\\r\n"
|
|
||||||
" ____) |___) | | | | __/\\ V / __/ | | |\r\n"
|
|
||||||
" |_____/_____/|_| |_|\\___| \\_/ \\___|_| |_|\r\n";
|
|
||||||
|
|
||||||
printf_i(logo);
|
|
||||||
printf_i("by cy384, version " SSHEVEN_VERSION ", running in ");
|
|
||||||
|
|
||||||
#if defined(__ppc__)
|
|
||||||
printf_i("PPC mode.\r\n");
|
|
||||||
#else
|
|
||||||
printf_i("68k mode.\r\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
BeginUpdate(con.win);
|
|
||||||
draw_screen(&(con.win->portRect));
|
|
||||||
EndUpdate(con.win);
|
|
||||||
|
|
||||||
int ok = 1;
|
int ok = 1;
|
||||||
|
|
||||||
ok = safety_checks();
|
ok = safety_checks();
|
||||||
|
@ -1296,3 +1236,69 @@ int main(int argc, char** argv)
|
||||||
CloseOpenTransport();
|
CloseOpenTransport();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int main(int argc, char** argv)
|
||||||
|
{
|
||||||
|
// OSStatus err = noErr;
|
||||||
|
|
||||||
|
// expands the application heap to its maximum requested size
|
||||||
|
// supposedly good for performance
|
||||||
|
// also required before creating threads!
|
||||||
|
MaxApplZone();
|
||||||
|
|
||||||
|
// "Call the MoreMasters procedure several times at the beginning of your program"
|
||||||
|
MoreMasters();
|
||||||
|
MoreMasters();
|
||||||
|
|
||||||
|
// set default preferences, then load from preferences file if possible
|
||||||
|
init_prefs();
|
||||||
|
load_prefs();
|
||||||
|
|
||||||
|
// general gui setup
|
||||||
|
InitGraf(&qd.thePort);
|
||||||
|
InitFonts();
|
||||||
|
InitWindows();
|
||||||
|
InitMenus();
|
||||||
|
|
||||||
|
void* menu = GetNewMBar(MBAR_SSHEVEN);
|
||||||
|
SetMenuBar(menu);
|
||||||
|
AppendResMenu(GetMenuHandle(MENU_APPLE), 'DRVR');
|
||||||
|
|
||||||
|
// disable stuff in edit menu until we implement it
|
||||||
|
menu = GetMenuHandle(MENU_EDIT);
|
||||||
|
DisableItem(menu, 1);
|
||||||
|
DisableItem(menu, 3);
|
||||||
|
//DisableItem(menu, 4);
|
||||||
|
DisableItem(menu, 5);
|
||||||
|
DisableItem(menu, 6);
|
||||||
|
DisableItem(menu, 7);
|
||||||
|
DisableItem(menu, 9);
|
||||||
|
|
||||||
|
DrawMenuBar();
|
||||||
|
|
||||||
|
generate_key_mapping();
|
||||||
|
|
||||||
|
console_setup();
|
||||||
|
|
||||||
|
char* logo = " _____ _____ _ _\r\n"
|
||||||
|
" / ____/ ____| | | |\r\n"
|
||||||
|
" | (___| (___ | |__| | _____ _____ _ __\r\n"
|
||||||
|
" \\___ \\\\___ \\| __ |/ _ \\ \\ / / _ \\ '_ \\\r\n"
|
||||||
|
" ____) |___) | | | | __/\\ V / __/ | | |\r\n"
|
||||||
|
" |_____/_____/|_| |_|\\___| \\_/ \\___|_| |_|\r\n";
|
||||||
|
|
||||||
|
printf_i(logo);
|
||||||
|
printf_i("by cy384, version " SSHEVEN_VERSION ", running in ");
|
||||||
|
|
||||||
|
#if defined(__ppc__)
|
||||||
|
printf_i("PPC mode.\r\n");
|
||||||
|
#else
|
||||||
|
printf_i("68k mode.\r\n");
|
||||||
|
#endif
|
||||||
|
|
||||||
|
BeginUpdate(con.win);
|
||||||
|
draw_screen(&(con.win->portRect));
|
||||||
|
EndUpdate(con.win);
|
||||||
|
|
||||||
|
process_login();
|
||||||
|
}
|
||||||
|
|
|
@ -110,3 +110,4 @@ void set_window_title(WindowPtr w, const char* c_name);
|
||||||
OSErr FSpPathFromLocation(FSSpec* spec, int* length, Handle* fullPath);
|
OSErr FSpPathFromLocation(FSSpec* spec, int* length, Handle* fullPath);
|
||||||
|
|
||||||
pascal void ButtonFrameProc(DialogRef dlg, DialogItemIndex itemNo);
|
pascal void ButtonFrameProc(DialogRef dlg, DialogItemIndex itemNo);
|
||||||
|
void process_login(void);
|
||||||
|
|
Loading…
Reference in New Issue