Style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37756 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ed47eeec78
commit
004b2edb11
@ -18,7 +18,7 @@
|
||||
#define B_TRANSLATE_CONTEXT "Terminal arguments parsing"
|
||||
|
||||
|
||||
Arguments::Arguments(int defaultArgsNum, const char * const *defaultArgs)
|
||||
Arguments::Arguments(int defaultArgsNum, const char* const* defaultArgs)
|
||||
: fUsageRequested(false),
|
||||
fBounds(50, 50, 630, 435),
|
||||
fStandardShell(true),
|
||||
@ -36,12 +36,13 @@ Arguments::~Arguments()
|
||||
_SetShellArguments(0, NULL);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Arguments::Parse(int argc, const char *const *argv)
|
||||
Arguments::Parse(int argc, const char* const* argv)
|
||||
{
|
||||
int argi = 1;
|
||||
while (argi < argc) {
|
||||
const char *arg = argv[argi++];
|
||||
const char* arg = argv[argi++];
|
||||
|
||||
if (*arg == '-') {
|
||||
if (strcmp(arg, "-h") == 0 || strcmp(arg, "--help") == 0) {
|
||||
@ -98,7 +99,7 @@ Arguments::Parse(int argc, const char *const *argv)
|
||||
|
||||
|
||||
void
|
||||
Arguments::GetShellArguments(int &argc, const char *const *&argv) const
|
||||
Arguments::GetShellArguments(int& argc, const char* const*& argv) const
|
||||
{
|
||||
argc = fShellArgumentCount;
|
||||
argv = fShellArguments;
|
||||
@ -106,7 +107,7 @@ Arguments::GetShellArguments(int &argc, const char *const *&argv) const
|
||||
|
||||
|
||||
void
|
||||
Arguments::_SetShellArguments(int argc, const char *const *argv)
|
||||
Arguments::_SetShellArguments(int argc, const char* const* argv)
|
||||
{
|
||||
// delete old arguments
|
||||
for (int32 i = 0; i < fShellArgumentCount; i++)
|
||||
|
@ -10,28 +10,28 @@
|
||||
|
||||
class Arguments {
|
||||
public:
|
||||
Arguments(int defaultArgcNum, const char *const *defaultArgv);
|
||||
Arguments(int defaultArgcNum, const char* const* defaultArgv);
|
||||
~Arguments();
|
||||
|
||||
void Parse(int argc, const char *const *argv);
|
||||
void Parse(int argc, const char* const* argv);
|
||||
|
||||
BRect Bounds() const { return fBounds; }
|
||||
const char *Title() const { return fTitle; }
|
||||
const char* Title() const { return fTitle; }
|
||||
bool StandardShell() const { return fStandardShell; }
|
||||
bool FullScreen() const { return fFullScreen; }
|
||||
bool UsageRequested() const { return fUsageRequested; }
|
||||
void GetShellArguments(int &argc, const char *const *&argv) const;
|
||||
void GetShellArguments(int& argc, const char* const*& argv) const;
|
||||
|
||||
private:
|
||||
void _SetShellArguments(int argc, const char *const *argv);
|
||||
void _SetShellArguments(int argc, const char* const* argv);
|
||||
|
||||
bool fUsageRequested;
|
||||
BRect fBounds;
|
||||
bool fStandardShell;
|
||||
bool fFullScreen;
|
||||
int fShellArgumentCount;
|
||||
const char **fShellArguments;
|
||||
const char *fTitle;
|
||||
const char** fShellArguments;
|
||||
const char* fTitle;
|
||||
};
|
||||
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#undef B_TRANSLATE_CONTEXT
|
||||
#define B_TRANSLATE_CONTEXT "Terminal PrefWindow"
|
||||
|
||||
PrefWindow::PrefWindow(const BMessenger &messenger)
|
||||
PrefWindow::PrefWindow(const BMessenger& messenger)
|
||||
: BWindow(BRect(0, 0, 375, 185), B_TRANSLATE("Terminal settings"),
|
||||
B_TITLED_WINDOW_LOOK, B_NORMAL_WINDOW_FEEL,
|
||||
B_NOT_RESIZABLE|B_NOT_ZOOMABLE|B_AUTO_UPDATE_SIZE_LIMITS),
|
||||
@ -84,7 +84,7 @@ PrefWindow::QuitRequested()
|
||||
if (!fDirty)
|
||||
return true;
|
||||
|
||||
BAlert *alert = new BAlert("",
|
||||
BAlert* alert = new BAlert("",
|
||||
B_TRANSLATE("Save changes to this settings panel?"),
|
||||
B_TRANSLATE("Cancel"), B_TRANSLATE("Don't save"), B_TRANSLATE("Save"),
|
||||
B_WIDTH_AS_USUAL, B_OFFSET_SPACING,
|
||||
@ -122,7 +122,7 @@ void
|
||||
PrefWindow::_SaveRequested(BMessage *msg)
|
||||
{
|
||||
entry_ref dirref;
|
||||
const char *filename;
|
||||
const char* filename;
|
||||
|
||||
msg->FindRef("directory", &dirref);
|
||||
msg->FindString("name", &filename);
|
||||
@ -160,7 +160,7 @@ PrefWindow::_Revert()
|
||||
|
||||
|
||||
void
|
||||
PrefWindow::MessageReceived(BMessage *msg)
|
||||
PrefWindow::MessageReceived(BMessage* msg)
|
||||
{
|
||||
switch (msg->what) {
|
||||
case MSG_SAVE_PRESSED:
|
||||
|
Loading…
Reference in New Issue
Block a user