Style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39464 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
50913c0873
commit
b3b19de56b
@ -129,7 +129,8 @@ AppearancePrefView::AppearancePrefView(const char* name,
|
||||
fColorSchemaField->SetAlignment(B_ALIGN_RIGHT);
|
||||
|
||||
fColorControl->SetEnabled(false);
|
||||
fColorControl->SetValue(PrefHandler::Default()->getRGB(PREF_TEXT_FORE_COLOR));
|
||||
fColorControl->SetValue(
|
||||
PrefHandler::Default()->getRGB(PREF_TEXT_FORE_COLOR));
|
||||
|
||||
fWarnOnExit->SetValue(PrefHandler::Default()->getBool(PREF_WARN_ON_EXIT));
|
||||
|
||||
@ -419,7 +420,7 @@ AppearancePrefView::_MakeSizeMenu(uint32 command, uint8 defaultSize)
|
||||
|
||||
|
||||
/*static*/ BPopUpMenu*
|
||||
AppearancePrefView::_MakeMenu(uint32 msg, const char **items,
|
||||
AppearancePrefView::_MakeMenu(uint32 msg, const char** items,
|
||||
const char* defaultItemName)
|
||||
{
|
||||
BPopUpMenu* menu = new BPopUpMenu("");
|
||||
@ -429,7 +430,7 @@ AppearancePrefView::_MakeMenu(uint32 msg, const char **items,
|
||||
if (!strcmp((*items), ""))
|
||||
menu->AddSeparatorItem();
|
||||
else {
|
||||
BMessage *message = new BMessage(msg);
|
||||
BMessage* message = new BMessage(msg);
|
||||
menu->AddItem(new BMenuItem((*items), message));
|
||||
}
|
||||
|
||||
@ -444,7 +445,7 @@ AppearancePrefView::_MakeMenu(uint32 msg, const char **items,
|
||||
|
||||
|
||||
/*static*/ BPopUpMenu*
|
||||
AppearancePrefView::_MakeColorSchemaMenu(uint32 msg, const color_schema **items,
|
||||
AppearancePrefView::_MakeColorSchemaMenu(uint32 msg, const color_schema** items,
|
||||
const color_schema* defaultItemName)
|
||||
{
|
||||
BPopUpMenu* menu = new BPopUpMenu("");
|
||||
@ -454,7 +455,7 @@ AppearancePrefView::_MakeColorSchemaMenu(uint32 msg, const color_schema **items,
|
||||
if (!strcmp((*items)->name, ""))
|
||||
menu->AddSeparatorItem();
|
||||
else {
|
||||
BMessage *message = new BMessage(msg);
|
||||
BMessage* message = new BMessage(msg);
|
||||
message->AddPointer("color_schema", (const void*)*items);
|
||||
menu->AddItem(new BMenuItem((*items)->name, message));
|
||||
}
|
||||
|
@ -1,16 +1,16 @@
|
||||
/*
|
||||
* Copyright 2001-2007, Haiku, Inc.
|
||||
* Copyright 2001-2010, Haiku, Inc.
|
||||
* Copyright 2003-2004 Kian Duffy, myob@users.sourceforge.net
|
||||
* Parts Copyright 1998-1999 Kazuho Okui and Takashi Murai.
|
||||
* Parts Copyright 1998-1999 Kazuho Okui and Takashi Murai.
|
||||
* All rights reserved. Distributed under the terms of the MIT license.
|
||||
*/
|
||||
#ifndef APPEARANCE_PREF_VIEW_H
|
||||
#define APPEARANCE_PREF_VIEW_H
|
||||
|
||||
|
||||
#include <GroupView.h>
|
||||
#include <Messenger.h>
|
||||
#include <String.h>
|
||||
#include <GroupView.h>
|
||||
|
||||
|
||||
const ulong MSG_HALF_FONT_CHANGED = 'mchf';
|
||||
@ -36,45 +36,48 @@ class BMenuField;
|
||||
class BPopUpMenu;
|
||||
class BCheckBox;
|
||||
|
||||
|
||||
class AppearancePrefView : public BGroupView {
|
||||
public:
|
||||
AppearancePrefView(const char *name,
|
||||
AppearancePrefView(const char* name,
|
||||
const BMessenger &messenger);
|
||||
|
||||
virtual void Revert();
|
||||
virtual void MessageReceived(BMessage *message);
|
||||
virtual void MessageReceived(BMessage* message);
|
||||
virtual void AttachedToWindow();
|
||||
|
||||
virtual void GetPreferredSize(float *_width,
|
||||
float *_height);
|
||||
virtual void GetPreferredSize(float* _width,
|
||||
float* _height);
|
||||
|
||||
private:
|
||||
void _EnableCustomColors(bool enable);
|
||||
|
||||
void _ChangeColorSchema(color_schema *schema);
|
||||
void _SetCurrentColorSchema(BMenuField *field);
|
||||
void _ChangeColorSchema(color_schema* schema);
|
||||
void _SetCurrentColorSchema(BMenuField* field);
|
||||
|
||||
static BMenu* _MakeFontMenu(uint32 command,
|
||||
const char *defaultFamily,
|
||||
const char *defaultStyle);
|
||||
const char* defaultFamily,
|
||||
const char* defaultStyle);
|
||||
static BMenu* _MakeSizeMenu(uint32 command,
|
||||
uint8 defaultSize);
|
||||
|
||||
static BPopUpMenu* _MakeMenu(uint32 msg, const char **items,
|
||||
const char *defaultItem);
|
||||
|
||||
static BPopUpMenu* _MakeColorSchemaMenu(uint32 msg, const color_schema **schemas,
|
||||
const color_schema *defaultItemName);
|
||||
|
||||
BCheckBox *fWarnOnExit;
|
||||
BMenuField *fFont;
|
||||
BMenuField *fFontSize;
|
||||
static BPopUpMenu* _MakeMenu(uint32 msg, const char** items,
|
||||
const char* defaultItem);
|
||||
|
||||
BMenuField *fColorSchemaField;
|
||||
BMenuField *fColorField;
|
||||
BColorControl *fColorControl;
|
||||
static BPopUpMenu* _MakeColorSchemaMenu(uint32 msg,
|
||||
const color_schema** schemas,
|
||||
const color_schema* defaultItemName);
|
||||
|
||||
BCheckBox* fWarnOnExit;
|
||||
BMenuField* fFont;
|
||||
BMenuField* fFontSize;
|
||||
|
||||
BMenuField* fColorSchemaField;
|
||||
BMenuField* fColorField;
|
||||
BColorControl* fColorControl;
|
||||
|
||||
BMessenger fTerminalMessenger;
|
||||
};
|
||||
|
||||
|
||||
#endif // APPEARANCE_PREF_VIEW_H
|
||||
|
Loading…
Reference in New Issue
Block a user