A few more style fixes to ListView and ColorSet, thanks Axel

This commit is contained in:
John Scipione
2013-04-09 19:24:51 -04:00
parent 26f129eff2
commit 429ae1b151
4 changed files with 9 additions and 8 deletions
+1
View File
@@ -14,6 +14,7 @@
struct track_data; struct track_data;
enum list_view_type { enum list_view_type {
B_SINGLE_SELECTION_LIST, B_SINGLE_SELECTION_LIST,
B_MULTIPLE_SELECTION_LIST B_MULTIPLE_SELECTION_LIST
+2 -2
View File
@@ -885,8 +885,8 @@ BListView::SelectionCommand() const
void void
BListView::SetListType(list_view_type type) BListView::SetListType(list_view_type type)
{ {
if (fListType == B_MULTIPLE_SELECTION_LIST && if (fListType == B_MULTIPLE_SELECTION_LIST
type == B_SINGLE_SELECTION_LIST) { && type == B_SINGLE_SELECTION_LIST) {
Select(CurrentSelection(0)); Select(CurrentSelection(0));
} }
+3 -2
View File
@@ -27,8 +27,7 @@
#define B_TRANSLATION_CONTEXT "Colors tab" #define B_TRANSLATION_CONTEXT "Colors tab"
static ColorDescription sColorDescriptionTable[] = static ColorDescription sColorDescriptionTable[] = {
{
{ B_PANEL_BACKGROUND_COLOR, B_TRANSLATE_MARK("Panel background") }, { B_PANEL_BACKGROUND_COLOR, B_TRANSLATE_MARK("Panel background") },
{ B_PANEL_TEXT_COLOR, B_TRANSLATE_MARK("Panel text") }, { B_PANEL_TEXT_COLOR, B_TRANSLATE_MARK("Panel text") },
{ B_DOCUMENT_BACKGROUND_COLOR, B_TRANSLATE_MARK("Document background") }, { B_DOCUMENT_BACKGROUND_COLOR, B_TRANSLATE_MARK("Document background") },
@@ -75,6 +74,7 @@ static ColorDescription sColorDescriptionTable[] =
const int32 sColorDescriptionCount = sizeof(sColorDescriptionTable) const int32 sColorDescriptionCount = sizeof(sColorDescriptionTable)
/ sizeof(ColorDescription); / sizeof(ColorDescription);
const ColorDescription* const ColorDescription*
get_color_description(int32 index) get_color_description(int32 index)
{ {
@@ -90,6 +90,7 @@ color_description_count(void)
return sColorDescriptionCount; return sColorDescriptionCount;
} }
// #pragma mark - // #pragma mark -
+3 -4
View File
@@ -18,10 +18,9 @@
#include <map> #include <map>
typedef struct typedef struct {
{ color_which which;
color_which which; const char* text;
const char* text;
} ColorDescription; } ColorDescription;