Backgrounds: style fixes only

* Update copyright headers
* Fill in pragmas
* Eliminate superfluous B_USE_DEFAULT_SPACING, 80 char limit too
* rename msg variable to message
This commit is contained in:
John Scipione 2013-12-29 18:59:20 -05:00
parent a0848a1916
commit 0a669f8cd8
5 changed files with 33 additions and 32 deletions

View File

@ -1,10 +1,10 @@
/*
* Copyright 2002-2009, Haiku, Inc. All Rights Reserved.
* Copyright 2002-2009 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Jerome Duval (jerome.duval@free.fr)
* Axel Dörfler, axeld@pinc-software.de
* Jerome Duval, jerome.duval@free.fr
*/
@ -51,7 +51,7 @@ private:
};
// #pragma mark -
// #pragma mark - BackgroundsApplication
BackgroundsApplication::BackgroundsApplication()
@ -85,7 +85,7 @@ BackgroundsApplication::RefsReceived(BMessage* message)
}
// #pragma mark -
// #pragma mark - BackgroundsWindow
BackgroundsWindow::BackgroundsWindow()
@ -133,7 +133,7 @@ BackgroundsWindow::WorkspaceActivated(int32 oldWorkspaces, bool active)
}
// #pragma mark -
// #pragma mark - main method
int
@ -143,4 +143,3 @@ main(int argc, char** argv)
app.Run();
return 0;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2013 Haiku, Inc. All Rights Reserved.
* Copyright 2002-2013 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@ -188,7 +188,7 @@ BackgroundsView::BackgroundsView()
fPicker = new BColorControl(BPoint(0, 0), B_CELLS_32x8, 8.0, "Picker",
new BMessage(kMsgUpdateColor));
rightbox->AddChild(BLayoutBuilder::Group<>(B_VERTICAL, B_USE_DEFAULT_SPACING)
rightbox->AddChild(BLayoutBuilder::Group<>(B_VERTICAL)
.AddGrid(B_USE_DEFAULT_SPACING, B_USE_SMALL_SPACING)
.Add(imageMenuField->CreateLabelLayoutItem(), 0, 0)
.Add(imageMenuField->CreateMenuBarLayoutItem(), 1, 0, 2, 1)
@ -284,12 +284,12 @@ BackgroundsView::AllAttached()
void
BackgroundsView::MessageReceived(BMessage* msg)
BackgroundsView::MessageReceived(BMessage* message)
{
switch (msg->what) {
switch (message->what) {
case B_SIMPLE_DATA:
case B_REFS_RECEIVED:
RefsReceived(msg);
RefsReceived(message);
break;
case kMsgUpdatePreviewPlacement:
@ -355,7 +355,7 @@ BackgroundsView::MessageReceived(BMessage* msg)
{
PRINT(("cancel received\n"));
void* pointer;
msg->FindPointer("source", &pointer);
message->FindPointer("source", &pointer);
if (pointer == fPanel) {
if (fLastImageIndex >= 0)
_FindImageItem(fLastImageIndex)->SetMarked(true);
@ -404,7 +404,7 @@ BackgroundsView::MessageReceived(BMessage* msg)
break;
default:
BView::MessageReceived(msg);
BView::MessageReceived(message);
break;
}
}
@ -945,12 +945,12 @@ BackgroundsView::_UpdateButtons()
void
BackgroundsView::RefsReceived(BMessage* msg)
BackgroundsView::RefsReceived(BMessage* message)
{
if (!msg->HasRef("refs") && msg->HasRef("dir_ref")) {
if (!message->HasRef("refs") && message->HasRef("dir_ref")) {
entry_ref dirRef;
if (msg->FindRef("dir_ref", &dirRef) == B_OK)
msg->AddRef("refs", &dirRef);
if (message->FindRef("dir_ref", &dirRef) == B_OK)
message->AddRef("refs", &dirRef);
}
entry_ref ref;
@ -959,7 +959,7 @@ BackgroundsView::RefsReceived(BMessage* msg)
BPath desktopPath;
find_directory(B_DESKTOP_DIRECTORY, &desktopPath);
while (msg->FindRef("refs", i++, &ref) == B_OK) {
while (message->FindRef("refs", i++, &ref) == B_OK) {
BPath path;
BEntry entry(&ref, true);
path.SetTo(&entry);
@ -987,7 +987,7 @@ BackgroundsView::RefsReceived(BMessage* msg)
// An optional placement may have been sent
int32 placement = 0;
if (msg->FindInt32("placement", &placement) == B_OK) {
if (message->FindInt32("placement", &placement) == B_OK) {
BMenuItem* item = fPlacementMenu->FindItem(placement);
if (item)
item->SetMarked(true);

View File

@ -1,9 +1,9 @@
/*
* Copyright 2002-2009, Haiku, Inc. All Rights Reserved.
* Copyright 2002-2009 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Jerome Duval (jerome.duval@free.fr)
* Jerome Duval, jerome.duval@free.fr
*/
#ifndef BACKGROUNDS_VIEW_H
#define BACKGROUNDS_VIEW_H
@ -105,9 +105,9 @@ public:
~BackgroundsView();
void AllAttached();
void MessageReceived(BMessage* msg);
void MessageReceived(BMessage* message);
void RefsReceived(BMessage* msg);
void RefsReceived(BMessage* message);
void SaveSettings();
void WorkspaceActivated(uint32 oldWorkspaces,
@ -177,4 +177,3 @@ protected:
};
#endif // BACKGROUNDS_VIEW_H

View File

@ -1,9 +1,9 @@
/*
* Copyright 2002-2009, Haiku, Inc. All Rights Reserved.
* Copyright 2002-2009 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Jerome Duval (jerome.duval@free.fr)
* Jerome Duval, jerome.duval@free.fr
*/
@ -23,11 +23,15 @@
#define B_TRANSLATION_CONTEXT "Image Filepanel"
// #pragma mark - ImageFilePanel
ImageFilePanel::ImageFilePanel(file_panel_mode mode, BMessenger* target,
const entry_ref* startDirectory, uint32 nodeFlavors,
bool allowMultipleSelection, BMessage* message, BRefFilter* filter,
bool modal, bool hideWhenDone)
: BFilePanel(mode, target, startDirectory, nodeFlavors,
:
BFilePanel(mode, target, startDirectory, nodeFlavors,
allowMultipleSelection, message, filter, modal, hideWhenDone),
fImageView(NULL),
fResolutionView(NULL),
@ -167,7 +171,7 @@ ImageFilePanel::SelectionChanged()
}
// #pragma mark -
// #pragma mark - CustomRefFilter
CustomRefFilter::CustomRefFilter(bool imageFiltering)
@ -194,4 +198,3 @@ CustomRefFilter::Filter(const entry_ref* ref, BNode* node,
return false;
}

View File

@ -1,10 +1,11 @@
/*
* Copyright 2002-2009, Haiku, Inc. All Rights Reserved.
* Copyright 2002-2009 Haiku, Inc. All rights reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
* Jerome Duval (jerome.duval@free.fr)
* Jerome Duval, jerome.duval@free.fr
*/
#ifndef IMAGE_FILE_PANEL_H
#define IMAGE_FILE_PANEL_H
@ -55,4 +56,3 @@ protected:
};
#endif // IMAGE_FILE_PANEL_H