Code style cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37331 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Wim van der Meer
2010-07-02 03:07:18 +00:00
parent afa4fdf51e
commit 15676f3a87
19 changed files with 139 additions and 119 deletions
+3 -4
View File
@@ -22,10 +22,10 @@
App::App()
: BApplication(kAppSignature),
:
BApplication(kAppSignature),
fResources(read_resources(kAppSignature)),
fMainWindow(NULL),
fSavedRefsReceived(NULL)
fMainWindow(NULL), fSavedRefsReceived(NULL)
{
}
@@ -118,4 +118,3 @@ App::QuitRequested()
return BApplication::QuitRequested();
}
+1 -1
View File
@@ -9,6 +9,7 @@
#ifndef APP_H
#define APP_H
#include <Application.h>
@@ -32,4 +33,3 @@ private:
};
#endif // APP_H
+1 -1
View File
@@ -9,6 +9,7 @@
#ifndef COMMON_H
#define COMMON_H
#include <Entry.h>
#include <GraphicsDefs.h>
#include <Resources.h>
@@ -100,4 +101,3 @@ BResources* read_resources(const char* appSignature);
void size_to_string(off_t byteCount, char* name);
#endif // COMMON_H
+7 -5
View File
@@ -6,6 +6,8 @@
* as long as it is accompanied by it's documentation and this copyright notice.
* The software comes with no warranty, etc.
*/
#include "ControlsView.h"
#include <Bitmap.h>
@@ -42,7 +44,8 @@ private:
VolumeMenuItem::VolumeMenuItem(BVolume* volume, BMessage* message)
: BMenuItem(kEmptyStr, message),
:
BMenuItem(kEmptyStr, message),
fIcon(new BBitmap(BRect(0, 0, 15, 15), B_RGBA32)),
fVolume(volume)
{
@@ -117,8 +120,9 @@ private:
ControlsView::VolumePopup::VolumePopup(BRect r)
: BMenuField(r, NULL, kVolMenuLabel, new BPopUpMenu(kVolMenuDefault),
false, B_FOLLOW_LEFT)
:
BMenuField(r, NULL, kVolMenuLabel, new BPopUpMenu(kVolMenuDefault), false,
B_FOLLOW_LEFT)
{
SetViewColor(kWindowColor);
SetLowColor(kWindowColor);
@@ -295,5 +299,3 @@ ControlsView::FindDeviceFor(dev_t device, bool invoke)
{
return fVolumePopup->FindDeviceFor(device, invoke);
}
+1 -1
View File
@@ -9,6 +9,7 @@
#ifndef CONTROLS_VIEW_H
#define CONTROLS_VIEW_H
#include <Button.h>
#include <View.h>
@@ -35,4 +36,3 @@ private:
#endif // CONTROLS_VIEW_H
-1
View File
@@ -16,4 +16,3 @@ main()
app.Run();
return 0;
}
+5 -3
View File
@@ -6,6 +6,8 @@
* as long as it is accompanied by it's documentation and this copyright notice.
* The software comes with no warranty, etc.
*/
#include "InfoWindow.h"
#include <stdio.h>
@@ -25,8 +27,10 @@ using std::string;
using std::vector;
using std::pair;
LeftView::LeftView(BRect frame, BBitmap* icon)
: BView(frame, NULL, B_FOLLOW_NONE, B_WILL_DRAW),
:
BView(frame, NULL, B_FOLLOW_NONE, B_WILL_DRAW),
fIcon(icon)
{
SetViewColor(tint_color(kWindowColor, B_LIGHTEN_1_TINT));
@@ -174,5 +178,3 @@ InfoWin::InfoWin(BPoint p, FileInfo *f, BWindow* parent)
InfoWin::~InfoWin()
{
}
+1 -1
View File
@@ -9,6 +9,7 @@
#ifndef INFO_WINDOW_H
#define INFO_WINDOW_H
#include <Window.h>
@@ -34,4 +35,3 @@ public:
};
#endif // INFO_WINDOW_H
+6 -2
View File
@@ -7,6 +7,8 @@
* as long as it is accompanied by it's documentation and this copyright notice.
* The software comes with no warranty, etc.
*/
#include "MainWindow.h"
#include <Application.h>
@@ -24,7 +26,8 @@ const float kMinWinSize = 275.0;
MainWindow::MainWindow(BRect pieRect)
: BWindow(pieRect, "DiskUsage", B_TITLED_WINDOW,
:
BWindow(pieRect, "DiskUsage", B_TITLED_WINDOW,
B_ASYNCHRONOUS_CONTROLS | B_QUIT_ON_WINDOW_CLOSE)
{
BRect r = Bounds();
@@ -57,7 +60,8 @@ MainWindow::MainWindow(BRect pieRect)
// this bug, and Be said it's not a bug -- the Matrox driver actually uses
// a resolution of 1152x900 in that mode. Oh well.
Lock();
float extraHeight = fControlsView->Bounds().Height() + fStatusView->Bounds().Height();
float extraHeight = fControlsView->Bounds().Height()
+ fStatusView->Bounds().Height();
float minHeight = kMinWinSize + extraHeight;
float maxHeight = BScreen(this).Frame().Height();
float maxWidth = maxHeight - extraHeight;
+2
View File
@@ -10,6 +10,7 @@
#ifndef MAIN_WINDOW_H
#define MAIN_WINDOW_H
#include <Window.h>
@@ -19,6 +20,7 @@ struct FileInfo;
class PieView;
class StatusView;
class MainWindow: public BWindow {
public:
MainWindow(BRect pieRect);
+11 -6
View File
@@ -7,11 +7,14 @@
* as long as it is accompanied by it's documentation and this copyright notice.
* The software comes with no warranty, etc.
*/
#include "PieView.h"
#include <fs_info.h>
#include <math.h>
#include <Alert.h>
#include <AppFileInfo.h>
#include <Bitmap.h>
#include <Entry.h>
@@ -23,7 +26,6 @@
#include <Roster.h>
#include <String.h>
#include <Volume.h>
#include <Alert.h>
#include <tracker_private.h>
@@ -65,8 +67,12 @@ private:
};
AppMenuItem::AppMenuItem(const char* appSig, int category):
BMenuItem(kEmptyStr, NULL), fCategory(category), fIcon(NULL), fIsValid(false)
AppMenuItem::AppMenuItem(const char* appSig, int category)
:
BMenuItem(kEmptyStr, NULL),
fCategory(category),
fIcon(NULL),
fIsValid(false)
{
if (be_roster->FindApp(appSig, &fAppRef) == B_NO_ERROR) {
fIcon = new BBitmap(BRect(0.0, 0.0, 15.0, 15.0), B_RGBA32);
@@ -120,7 +126,8 @@ AppMenuItem::DrawContent()
PieView::PieView(BRect frame, MainWindow* window)
: BView(frame, NULL, B_FOLLOW_ALL,
:
BView(frame, NULL, B_FOLLOW_ALL,
B_WILL_DRAW | B_FULL_UPDATE_ON_RESIZE | B_SUBPIXEL_PRECISE),
fWindow(window),
fScanners(),
@@ -849,5 +856,3 @@ PieView::_OpenInfo(FileInfo* info, BPoint p)
tracker.SendMessage(&message);
}
}
+2 -1
View File
@@ -10,6 +10,7 @@
#ifndef PIE_VIEW_H
#define PIE_VIEW_H
#include <View.h>
#include <map>
@@ -29,6 +30,7 @@ class MainWindow;
using std::map;
using std::vector;
class PieView: public BView {
public:
PieView(BRect frame, MainWindow* window);
@@ -92,4 +94,3 @@ private:
};
#endif // PIE_VIEW_H
+5 -4
View File
@@ -6,6 +6,8 @@
* as long as it is accompanied by it's documentation and this copyright notice.
* The software comes with no warranty, etc.
*/
#include "Scanner.h"
#include <stdlib.h>
@@ -17,12 +19,13 @@
using std::vector;
Scanner::Scanner(BVolume *v, BHandler *handler)
: BLooper(),
:
BLooper(),
fListener(handler),
fDoneMessage(kScanDone),
fProgressMessage(kScanProgress),
fVolume(v),
fSnapshot(NULL),
fDesiredPath(),
@@ -271,5 +274,3 @@ Scanner::_ChangeToDesired()
free(workPath);
fDesiredPath.erase();
}
+2 -1
View File
@@ -9,6 +9,7 @@
#ifndef SCANNER_H
#define SCANNER_H
#include <string>
#include <Looper.h>
@@ -23,6 +24,7 @@ class BDirectory;
using std::string;
class Scanner: public BLooper {
public:
Scanner(BVolume* volume, BHandler* handler);
@@ -70,4 +72,3 @@ private:
};
#endif // SCANNER_H
+4 -2
View File
@@ -6,6 +6,8 @@
* as long as it is accompanied by it's documentation and this copyright notice.
* The software comes with no warranty, etc.
*/
#include "Snapshot.h"
#include <stdio.h>
@@ -24,7 +26,8 @@ static const char* kVolumeType = "application/x-vnd.Be-volume";
FileInfo::FileInfo()
: pseudo(false),
:
pseudo(false),
size(0),
count(0),
parent(NULL),
@@ -124,4 +127,3 @@ VolumeSnapshot::~VolumeSnapshot()
delete rootDir;
delete freeSpace;
}
+2 -1
View File
@@ -9,6 +9,7 @@
#ifndef SNAPSHOT_H
#define SNAPSHOT_H
#include <string>
#include <vector>
@@ -21,6 +22,7 @@ class BVolume;
using std::string;
using std::vector;
struct FileInfo {
FileInfo();
~FileInfo();
@@ -53,4 +55,3 @@ struct VolumeSnapshot {
};
#endif // SNAPSHOT_H
+4 -3
View File
@@ -6,6 +6,8 @@
* as long as it is accompanied by it's documentation and this copyright notice.
* The software comes with no warranty, etc.
*/
#include "StatusView.h"
#include <math.h>
@@ -21,7 +23,8 @@
StatusView::StatusView(BRect rect)
: BView(rect, NULL, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM, B_WILL_DRAW),
:
BView(rect, NULL, B_FOLLOW_LEFT_RIGHT | B_FOLLOW_BOTTOM, B_WILL_DRAW),
fCurrentFileInfo(NULL)
{
SetViewColor(kWindowColor);
@@ -130,5 +133,3 @@ StatusView::Show(const FileInfo* info)
fCountView->SetText(kEmptyStr);
}
}
+1 -1
View File
@@ -9,6 +9,7 @@
#ifndef STATUS_VIEW_H
#define STATUS_VIEW_H
#include <View.h>
#include <StringView.h>
#include <Rect.h>
@@ -32,4 +33,3 @@ private:
#endif // STATUS_VIEW_H