From 0a96da93d180a27d0d4ae58915dd516b17f1f6ba Mon Sep 17 00:00:00 2001 From: Alex Wilson Date: Mon, 16 Jul 2012 13:31:51 +1200 Subject: [PATCH] Fix style on inline methods in PoorMan. --- src/apps/poorman/PoorManLoggingView.h | 52 +++++++++----- src/apps/poorman/PoorManSiteView.h | 46 +++++++++---- src/apps/poorman/PoorManWindow.h | 98 +++++++++++++++++++-------- 3 files changed, 136 insertions(+), 60 deletions(-) diff --git a/src/apps/poorman/PoorManLoggingView.h b/src/apps/poorman/PoorManLoggingView.h index 9648f08be4..4203505f79 100644 --- a/src/apps/poorman/PoorManLoggingView.h +++ b/src/apps/poorman/PoorManLoggingView.h @@ -18,23 +18,41 @@ class PoorManLoggingView: public BView { public: PoorManLoggingView(const char* name); - void SetLogConsoleValue(bool state) - { if (state) - fLogConsole->SetValue(B_CONTROL_ON); - else fLogConsole->SetValue(B_CONTROL_OFF); } - bool LogConsoleValue() - { return (fLogConsole->Value() == B_CONTROL_ON) - ? true : false; } - void SetLogFileValue(bool state) - { if (state) fLogFile->SetValue(B_CONTROL_ON); - else fLogFile->SetValue(B_CONTROL_OFF); } - bool LogFileValue() - { return (fLogFile->Value() == B_CONTROL_ON) - ? true : false; } - const char* LogFileName() - { return fLogFileName->Text(); } - void SetLogFileName(const char* log) - { fLogFileName->SetText(log); } + void SetLogConsoleValue(bool state) + { + if (state) + fLogConsole->SetValue(B_CONTROL_ON); + else + fLogConsole->SetValue(B_CONTROL_OFF); + } + + bool LogConsoleValue() + { + return (fLogConsole->Value() == B_CONTROL_ON); + } + + void SetLogFileValue(bool state) + { + if (state) + fLogFile->SetValue(B_CONTROL_ON); + else + fLogFile->SetValue(B_CONTROL_OFF); + } + + bool LogFileValue() + { + return (fLogFile->Value() == B_CONTROL_ON); + } + + const char* LogFileName() + { + return fLogFileName->Text(); + } + + void SetLogFileName(const char* log) + { + fLogFileName->SetText(log); + } private: // Logging Tab diff --git a/src/apps/poorman/PoorManSiteView.h b/src/apps/poorman/PoorManSiteView.h index 8bd8716da4..8765347219 100644 --- a/src/apps/poorman/PoorManSiteView.h +++ b/src/apps/poorman/PoorManSiteView.h @@ -18,20 +18,38 @@ class PoorManSiteView: public BView { public: PoorManSiteView(const char *name); - void SetSendDirValue(bool state) - { if (state) fSendDir->SetValue(B_CONTROL_ON); - else fSendDir->SetValue(B_CONTROL_OFF); } - bool SendDirValue() - { return (fSendDir->Value() == B_CONTROL_ON) - ? true : false; } - const char* IndexFileName() - { return fIndexFileName->Text(); } - void SetIndexFileName(const char* name) - { fIndexFileName->SetText(name); } - const char* WebDir() - { return fWebDir->Text(); } - void SetWebDir(const char* dir) - { fWebDir->SetText(dir); } + void SetSendDirValue(bool state) + { + if (state) + fSendDir->SetValue(B_CONTROL_ON); + else + fSendDir->SetValue(B_CONTROL_OFF); + } + + bool SendDirValue() + { + return (fSendDir->Value() == B_CONTROL_ON); + } + + const char* IndexFileName() + { + return fIndexFileName->Text(); + } + + void SetIndexFileName(const char* name) + { + fIndexFileName->SetText(name); + } + + const char* WebDir() + { + return fWebDir->Text(); + } + + void SetWebDir(const char* dir) + { + fWebDir->SetText(dir); + } private: // Site Tab diff --git a/src/apps/poorman/PoorManWindow.h b/src/apps/poorman/PoorManWindow.h index a2ddc516ea..20367ec78e 100644 --- a/src/apps/poorman/PoorManWindow.h +++ b/src/apps/poorman/PoorManWindow.h @@ -60,35 +60,75 @@ public: // ------------------------------------------- // Preferences and Settings // Site Tab - bool DirListFlag() - { return fDirListFlag; } - void SetDirListFlag(bool flag) - { fDirListFlag = flag; } - const char* IndexFileName() - { return fIndexFileName.String(); } - void SetIndexFileName(const char* str) - { fIndexFileName.SetTo(str); } - const char* WebDir() - { return fWebDirectory.String(); } - void SetWebDir(const char* str) - { fWebDirectory.SetTo(str); } - // Logging Tab - bool LogConsoleFlag() - { return fLogConsoleFlag; } - void SetLogConsoleFlag(bool flag) - { fLogConsoleFlag = flag; } - bool LogFileFlag() - { return fLogFileFlag; } - void SetLogFileFlag(bool flag) - { fLogFileFlag = flag; } - const char* LogPath() - { return fLogPath.String(); } - void SetLogPath(const char* str); - // Advanced Tab - int16 MaxConnections() - { return fMaxConnections; } - void SetMaxConnections(int16 num) - { fMaxConnections = num; } + bool DirListFlag() + { + return fDirListFlag; + } + + void SetDirListFlag(bool flag) + { + fDirListFlag = flag; + } + + const char* IndexFileName() + { + return fIndexFileName.String(); + } + + void SetIndexFileName(const char* str) + { + fIndexFileName.SetTo(str); + } + + const char* WebDir() + { + return fWebDirectory.String(); + } + + void SetWebDir(const char* str) + { + fWebDirectory.SetTo(str); + } + + // Logging Tab + + bool LogConsoleFlag() + { + return fLogConsoleFlag; + } + + void SetLogConsoleFlag(bool flag) + { + fLogConsoleFlag = flag; + } + + bool LogFileFlag() + { + return fLogFileFlag; + } + + void SetLogFileFlag(bool flag) + { + fLogFileFlag = flag; + } + + const char* LogPath() + { + return fLogPath.String(); + } + + void SetLogPath(const char* str); + + // Advanced Tab + int16 MaxConnections() + { + return fMaxConnections; + } + + void SetMaxConnections(int16 num) + { + fMaxConnections = num; + } private: // -------------------------------------------