From 69209c38968c6f4066a772e0a51a2928749217de Mon Sep 17 00:00:00 2001 From: "FWoltermann@gmail.com" Date: Fri, 9 Dec 2011 19:00:23 +0000 Subject: Re-indenting the code to use standard tabs. Yes, I know this is pretty pointless, but who cares? --- Stars45/NetPassDlg.cpp | 112 ++++++++++++++++++++++++------------------------- 1 file changed, 56 insertions(+), 56 deletions(-) (limited to 'Stars45/NetPassDlg.cpp') diff --git a/Stars45/NetPassDlg.cpp b/Stars45/NetPassDlg.cpp index faeccb3..5ea1542 100644 --- a/Stars45/NetPassDlg.cpp +++ b/Stars45/NetPassDlg.cpp @@ -1,15 +1,15 @@ /* Project Starshatter 4.5 - Destroyer Studios LLC - Copyright © 1997-2004. All Rights Reserved. + Destroyer Studios LLC + Copyright © 1997-2004. All Rights Reserved. - SUBSYSTEM: Stars.exe - FILE: NetPassDlg.cpp - AUTHOR: John DiCamillo + SUBSYSTEM: Stars.exe + FILE: NetPassDlg.cpp + AUTHOR: John DiCamillo - OVERVIEW - ======== - Network Server Password Dialog Active Window class + OVERVIEW + ======== + Network Server Password Dialog Active Window class */ #include "MemDebug.h" @@ -39,10 +39,10 @@ DEF_MAP_CLIENT(NetPassDlg, OnCancel); // +--------------------------------------------------------------------+ NetPassDlg::NetPassDlg(Screen* s, FormDef& def, MenuScreen* mgr) - : FormWindow(s, 0, 0, s->Width(), s->Height()), manager(mgr), - btn_apply(0), btn_cancel(0), edt_pass(0), lbl_name(0) +: FormWindow(s, 0, 0, s->Width(), s->Height()), manager(mgr), +btn_apply(0), btn_cancel(0), edt_pass(0), lbl_name(0) { - Init(def); + Init(def); } NetPassDlg::~NetPassDlg() @@ -54,17 +54,17 @@ NetPassDlg::~NetPassDlg() void NetPassDlg::RegisterControls() { - btn_apply = (Button*) FindControl(1); - btn_cancel = (Button*) FindControl(2); + btn_apply = (Button*) FindControl(1); + btn_cancel = (Button*) FindControl(2); - REGISTER_CLIENT(EID_CLICK, btn_apply, NetPassDlg, OnApply); - REGISTER_CLIENT(EID_CLICK, btn_cancel, NetPassDlg, OnCancel); + REGISTER_CLIENT(EID_CLICK, btn_apply, NetPassDlg, OnApply); + REGISTER_CLIENT(EID_CLICK, btn_cancel, NetPassDlg, OnCancel); - lbl_name = FindControl(110); - edt_pass = (EditBox*) FindControl(200); + lbl_name = FindControl(110); + edt_pass = (EditBox*) FindControl(200); - if (edt_pass) - edt_pass->SetText(""); + if (edt_pass) + edt_pass->SetText(""); } // +--------------------------------------------------------------------+ @@ -72,23 +72,23 @@ NetPassDlg::RegisterControls() void NetPassDlg::Show() { - if (!IsShown()) { - FormWindow::Show(); + if (!IsShown()) { + FormWindow::Show(); - NetClientConfig* config = NetClientConfig::GetInstance(); + NetClientConfig* config = NetClientConfig::GetInstance(); - if (config && lbl_name) { - NetServerInfo* info = config->GetSelectedServer(); + if (config && lbl_name) { + NetServerInfo* info = config->GetSelectedServer(); - if (info) - lbl_name->SetText(info->name); - } + if (info) + lbl_name->SetText(info->name); + } - if (edt_pass) { - edt_pass->SetText(""); - edt_pass->SetFocus(); - } - } + if (edt_pass) { + edt_pass->SetText(""); + edt_pass->SetFocus(); + } + } } // +--------------------------------------------------------------------+ @@ -98,9 +98,9 @@ static bool tab_latch = false; void NetPassDlg::ExecFrame() { - if (Keyboard::KeyDown(VK_RETURN)) { - OnApply(0); - } + if (Keyboard::KeyDown(VK_RETURN)) { + OnApply(0); + } } // +--------------------------------------------------------------------+ @@ -108,36 +108,36 @@ NetPassDlg::ExecFrame() void NetPassDlg::OnApply(AWEvent* event) { - NetClientConfig* config = NetClientConfig::GetInstance(); + NetClientConfig* config = NetClientConfig::GetInstance(); - if (config && edt_pass) { - NetServerInfo* info = config->GetSelectedServer(); + if (config && edt_pass) { + NetServerInfo* info = config->GetSelectedServer(); - if (info && edt_pass->GetText().length() < 250) { - char buffer[256]; - strcpy(buffer, edt_pass->GetText().data()); + if (info && edt_pass->GetText().length() < 250) { + char buffer[256]; + strcpy(buffer, edt_pass->GetText().data()); - // trim from first occurrence of invalid character - char* p = strpbrk(buffer, "\n\r\t"); - if (p) *p = 0; + // trim from first occurrence of invalid character + char* p = strpbrk(buffer, "\n\r\t"); + if (p) *p = 0; - info->password = SafeQuotes(buffer); + info->password = SafeQuotes(buffer); - if (manager) { - manager->ShowNetLobbyDlg(); - return; - } - } - } + if (manager) { + manager->ShowNetLobbyDlg(); + return; + } + } + } - if (manager) { - manager->ShowNetClientDlg(); - } + if (manager) { + manager->ShowNetClientDlg(); + } } void NetPassDlg::OnCancel(AWEvent* event) { - if (manager) - manager->ShowNetClientDlg(); + if (manager) + manager->ShowNetClientDlg(); } -- cgit v1.1