[haiku-commits] haiku: hrev46618 - src/preferences/backgrounds

  • From: jscipione@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Mon, 30 Dec 2013 05:43:06 +0100 (CET)

hrev46618 adds 1 changeset to branch 'master'
old head: a0848a191693aac77d3301a13dc59a27114acaa7
new head: 0a669f8cd8c354dfe1b4c9553454543e36ea9d0b
overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=0a669f8+%5Ea0848a1

----------------------------------------------------------------------------

0a669f8: 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

                                     [ John Scipione <jscipione@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev46618
Commit:      0a669f8cd8c354dfe1b4c9553454543e36ea9d0b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=0a669f8
Author:      John Scipione <jscipione@xxxxxxxxx>
Date:        Sun Dec 29 23:59:20 2013 UTC

----------------------------------------------------------------------------

5 files changed, 33 insertions(+), 32 deletions(-)
src/preferences/backgrounds/Backgrounds.cpp     | 11 ++++-----
src/preferences/backgrounds/BackgroundsView.cpp | 26 ++++++++++-----------
src/preferences/backgrounds/BackgroundsView.h   |  9 ++++---
src/preferences/backgrounds/ImageFilePanel.cpp  | 13 +++++++----
src/preferences/backgrounds/ImageFilePanel.h    |  6 ++---

----------------------------------------------------------------------------

diff --git a/src/preferences/backgrounds/Backgrounds.cpp 
b/src/preferences/backgrounds/Backgrounds.cpp
index 3eb2669..4907bd1 100644
--- a/src/preferences/backgrounds/Backgrounds.cpp
+++ b/src/preferences/backgrounds/Backgrounds.cpp
@@ -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@xxxxxxx)
  *             Axel Dörfler, axeld@xxxxxxxxxxxxxxxx
+ *             Jerome Duval, jerome.duval@xxxxxxx
  */
 
 
@@ -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;
 }
-
diff --git a/src/preferences/backgrounds/BackgroundsView.cpp 
b/src/preferences/backgrounds/BackgroundsView.cpp
index 5312836..5270c2a 100644
--- a/src/preferences/backgrounds/BackgroundsView.cpp
+++ b/src/preferences/backgrounds/BackgroundsView.cpp
@@ -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);
diff --git a/src/preferences/backgrounds/BackgroundsView.h 
b/src/preferences/backgrounds/BackgroundsView.h
index 8623807..eece562 100644
--- a/src/preferences/backgrounds/BackgroundsView.h
+++ b/src/preferences/backgrounds/BackgroundsView.h
@@ -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@xxxxxxx)
+ *             Jerome Duval, jerome.duval@xxxxxxx
  */
 #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
-
diff --git a/src/preferences/backgrounds/ImageFilePanel.cpp 
b/src/preferences/backgrounds/ImageFilePanel.cpp
index 89b1e3b..102e0e9 100644
--- a/src/preferences/backgrounds/ImageFilePanel.cpp
+++ b/src/preferences/backgrounds/ImageFilePanel.cpp
@@ -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@xxxxxxx)
+ *             Jerome Duval, jerome.duval@xxxxxxx
  */
 
 
@@ -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;
 }
-
diff --git a/src/preferences/backgrounds/ImageFilePanel.h 
b/src/preferences/backgrounds/ImageFilePanel.h
index eeb00e1..b38626c 100644
--- a/src/preferences/backgrounds/ImageFilePanel.h
+++ b/src/preferences/backgrounds/ImageFilePanel.h
@@ -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@xxxxxxx)
+ *             Jerome Duval, jerome.duval@xxxxxxx
  */
+
 #ifndef IMAGE_FILE_PANEL_H
 #define IMAGE_FILE_PANEL_H
 
@@ -55,4 +56,3 @@ protected:
 };
 
 #endif // IMAGE_FILE_PANEL_H
-


Other related posts:

  • » [haiku-commits] haiku: hrev46618 - src/preferences/backgrounds - jscipione