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