src/apps Code formatting
* No functional changes code formatting changes only Change-Id: I046ae21d9b288126022fe0bc2ddf827843765e70 Reviewed-on: https://review.haiku-os.org/c/896 Reviewed-by: Stephan Aßmus <[email protected]>
This commit is contained in:
@@ -63,11 +63,11 @@ OpenFileAction::Clicked(HyperTextView* view, BPoint where, BMessage* message)
|
||||
return;
|
||||
}
|
||||
|
||||
BMessenger tracker("application/x-vnd.Be-TRAK");
|
||||
if (tracker.IsValid()) {
|
||||
BMessenger tracker("application/x-vnd.Be-TRAK");
|
||||
if (tracker.IsValid()) {
|
||||
BMessage message(B_REFS_RECEIVED);
|
||||
message.AddRef("refs", &ref);
|
||||
tracker.SendMessage(&message);
|
||||
} else
|
||||
be_roster->Launch(&ref);
|
||||
be_roster->Launch(&ref);
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ HyperTextView::_ActionAt(const BPoint& where) const
|
||||
|
||||
ActionInfo pointer(offset, offset + 1, NULL);
|
||||
|
||||
const ActionInfo* action = fActionInfos->BinarySearch(pointer,
|
||||
const ActionInfo* action = fActionInfos->BinarySearch(pointer,
|
||||
ActionInfo::CompareEqualIfIntersecting);
|
||||
if (action != NULL) {
|
||||
// verify that the text region was hit
|
||||
|
||||
@@ -17,8 +17,8 @@ Application CharacterMap :
|
||||
;
|
||||
|
||||
DoCatalogs CharacterMap :
|
||||
x-vnd.Haiku-CharacterMap
|
||||
:
|
||||
x-vnd.Haiku-CharacterMap
|
||||
:
|
||||
CharacterMap.cpp
|
||||
CharacterView.cpp
|
||||
CharacterWindow.cpp
|
||||
|
||||
@@ -12,7 +12,7 @@ Addon cortex_audioadapter.media_addon :
|
||||
AudioAdapterParams.cpp
|
||||
|
||||
# audioOps/
|
||||
AudioAdapterOp.cpp
|
||||
AudioAdapterOp.cpp
|
||||
|
||||
# common/
|
||||
AudioBuffer.cpp
|
||||
|
||||
@@ -66,7 +66,7 @@ printf("ReadyToRun()\n");
|
||||
|
||||
}
|
||||
|
||||
virtual void RefsReceived(BMessage* message)
|
||||
virtual void RefsReceived(BMessage* message)
|
||||
{
|
||||
printf("RefsReceived()\n");
|
||||
}
|
||||
|
||||
@@ -80,9 +80,9 @@ static const char* const kUsage =
|
||||
static void
|
||||
print_usage_and_exit(bool error)
|
||||
{
|
||||
fprintf(error ? stderr : stdout, kUsage, kProgramName, kProgramName,
|
||||
kProgramName, kProgramName, kProgramName);
|
||||
exit(error ? 1 : 0);
|
||||
fprintf(error ? stderr : stdout, kUsage, kProgramName, kProgramName,
|
||||
kProgramName, kProgramName, kProgramName);
|
||||
exit(error ? 1 : 0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -441,9 +441,9 @@ TeamWindow::MessageReceived(BMessage* message)
|
||||
fInspectorWindow->LoadSettings(fUiSettings);
|
||||
fInspectorWindow->Show();
|
||||
}
|
||||
} catch (...) {
|
||||
// TODO: notify user
|
||||
}
|
||||
} catch (...) {
|
||||
// TODO: notify user
|
||||
}
|
||||
}
|
||||
|
||||
target_addr_t address;
|
||||
@@ -452,7 +452,7 @@ TeamWindow::MessageReceived(BMessage* message)
|
||||
addressMessage.AddUInt64("address", address);
|
||||
fInspectorWindow->PostMessage(&addressMessage);
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
case MSG_INSPECTOR_WINDOW_CLOSED:
|
||||
{
|
||||
@@ -520,9 +520,9 @@ TeamWindow::MessageReceived(BMessage* message)
|
||||
fTeam, fListener, this);
|
||||
if (fTeamSettingsWindow != NULL)
|
||||
fTeamSettingsWindow->Show();
|
||||
} catch (...) {
|
||||
// TODO: notify user
|
||||
}
|
||||
} catch (...) {
|
||||
// TODO: notify user
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -550,9 +550,9 @@ TeamWindow::MessageReceived(BMessage* message)
|
||||
fTeam, breakpoint, fListener, this);
|
||||
if (fBreakpointEditWindow != NULL)
|
||||
fBreakpointEditWindow->Show();
|
||||
} catch (...) {
|
||||
// TODO: notify user
|
||||
}
|
||||
} catch (...) {
|
||||
// TODO: notify user
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -120,7 +120,7 @@ status_t
|
||||
SignalSet::BlockInCurrentThread(SignalSet* oldMask) const
|
||||
{
|
||||
return pthread_sigmask(SIG_BLOCK, &fSignals,
|
||||
oldMask != NULL ? &oldMask->fSignals : NULL);
|
||||
oldMask != NULL ? &oldMask->fSignals : NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -128,7 +128,7 @@ status_t
|
||||
SignalSet::UnblockInCurrentThread(SignalSet* oldMask) const
|
||||
{
|
||||
return pthread_sigmask(SIG_UNBLOCK, &fSignals,
|
||||
oldMask != NULL ? &oldMask->fSignals : NULL);
|
||||
oldMask != NULL ? &oldMask->fSignals : NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@ status_t
|
||||
SignalSet::SetCurrentThreadSignalMask(SignalSet* oldMask) const
|
||||
{
|
||||
return pthread_sigmask(SIG_SETMASK, &fSignals,
|
||||
oldMask != NULL ? &oldMask->fSignals : NULL);
|
||||
oldMask != NULL ? &oldMask->fSignals : NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -86,14 +86,14 @@ const char *kKeypadDescriptionBasic = B_TRANSLATE_MARK(
|
||||
|
||||
// scientific mode keypad layout
|
||||
const char *kKeypadDescriptionScientific = B_TRANSLATE_MARK(
|
||||
"ln sin cos tan π \n"
|
||||
"log asin acos atan sqrt \n"
|
||||
"exp sinh cosh tanh cbrt \n"
|
||||
"! ceil floor E ^ \n"
|
||||
"7 8 9 ( ) \n"
|
||||
"4 5 6 * / \n"
|
||||
"1 2 3 + - \n"
|
||||
"0 . BS = C \n");
|
||||
"ln sin cos tan π \n"
|
||||
"log asin acos atan sqrt \n"
|
||||
"exp sinh cosh tanh cbrt \n"
|
||||
"! ceil floor E ^ \n"
|
||||
"7 8 9 ( ) \n"
|
||||
"4 5 6 * / \n"
|
||||
"1 2 3 + - \n"
|
||||
"0 . BS = C \n");
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
@@ -224,7 +224,7 @@ ExpanderThread::PipeCommand(int argc, const char** argv, int& in, int& out,
|
||||
// create a tty for stdin, as utilities don't generally use stdin
|
||||
int master = posix_openpt(O_RDWR);
|
||||
if (master < 0)
|
||||
return -1;
|
||||
return -1;
|
||||
|
||||
int slave;
|
||||
const char* ttyName;
|
||||
|
||||
@@ -558,7 +558,7 @@ ObjectView::FrameResized(float width, float height)
|
||||
width = Bounds().Width();
|
||||
height = Bounds().Height();
|
||||
fYxRatio = height / width;
|
||||
glViewport(0, 0, (GLint)width + 1, (GLint)height + 1);
|
||||
glViewport(0, 0, (GLint)width + 1, (GLint)height + 1);
|
||||
|
||||
// To prevent weird buffer contents
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
@@ -69,7 +69,7 @@ SVGImporter::Import(Icon* icon, const entry_ref* ref)
|
||||
return B_ERROR;
|
||||
}
|
||||
|
||||
try {
|
||||
try {
|
||||
agg::svg::DocumentBuilder builder;
|
||||
agg::svg::Parser parser(builder);
|
||||
parser.parse(path.Path());
|
||||
|
||||
@@ -433,8 +433,8 @@ TMailApp::QuitRequested()
|
||||
if (!BApplication::QuitRequested())
|
||||
return false;
|
||||
|
||||
fMailWindowFrame = fLastMailWindowFrame;
|
||||
// Last closed window becomes standard window size.
|
||||
fMailWindowFrame = fLastMailWindowFrame;
|
||||
// Last closed window becomes standard window size.
|
||||
|
||||
// Shut down the spam server if it's still running. If the user has trained it on a message, it will stay
|
||||
// open. This is actually a good thing if there's quite a bit of spam -- no waiting for the thing to start
|
||||
|
||||
@@ -12,7 +12,7 @@ Application Mandelbrot :
|
||||
;
|
||||
|
||||
DoCatalogs Mandelbrot :
|
||||
x-vnd.Haiku-Mandelbrot
|
||||
:
|
||||
x-vnd.Haiku-Mandelbrot
|
||||
:
|
||||
Mandelbrot.cpp
|
||||
;
|
||||
|
||||
@@ -81,7 +81,7 @@ TransportControlGroup::TransportControlGroup(BRect frame, bool useSkipButtons,
|
||||
fSeekLayout = seekGroup->GroupLayout();
|
||||
GroupLayout()->AddView(seekGroup);
|
||||
|
||||
// Seek slider
|
||||
// Seek slider
|
||||
fSeekSlider = new SeekSlider("seek slider", new BMessage(MSG_SEEK),
|
||||
0, kPositionFactor);
|
||||
fSeekLayout->AddView(fSeekSlider);
|
||||
@@ -89,11 +89,11 @@ TransportControlGroup::TransportControlGroup(BRect frame, bool useSkipButtons,
|
||||
fPositionToolTip = new PositionToolTip();
|
||||
fSeekSlider->SetToolTip(fPositionToolTip);
|
||||
|
||||
// Duration view
|
||||
// Duration view
|
||||
fDurationView = new DurationView("duration view");
|
||||
fSeekLayout->AddView(fDurationView);
|
||||
|
||||
// Buttons
|
||||
// Buttons
|
||||
|
||||
uint32 topBottomBorder = BControlLook::B_TOP_BORDER
|
||||
| BControlLook::B_BOTTOM_BORDER;
|
||||
@@ -285,8 +285,8 @@ TransportControlGroup::MessageReceived(BMessage* message)
|
||||
}
|
||||
|
||||
default:
|
||||
BView::MessageReceived(message);
|
||||
break;
|
||||
BView::MessageReceived(message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,22 +24,22 @@
|
||||
#define B_TRANSLATION_CONTEXT "Main view"
|
||||
|
||||
const float kDraggerSize = 7;
|
||||
|
||||
|
||||
OverlayView::OverlayView(BRect frame)
|
||||
|
||||
OverlayView::OverlayView(BRect frame)
|
||||
:
|
||||
BView(frame, "OverlayImage", B_FOLLOW_NONE, B_WILL_DRAW)
|
||||
{
|
||||
fBitmap = NULL;
|
||||
fReplicated = false;
|
||||
|
||||
|
||||
frame.left = frame.right - kDraggerSize;
|
||||
frame.top = frame.bottom - kDraggerSize;
|
||||
BDragger *dragger = new BDragger(frame, this, B_FOLLOW_RIGHT | B_FOLLOW_BOTTOM);
|
||||
AddChild(dragger);
|
||||
|
||||
|
||||
SetViewColor(B_TRANSPARENT_COLOR);
|
||||
|
||||
|
||||
fText = new BTextView(Bounds(), "bgView", Bounds(), B_FOLLOW_ALL, B_WILL_DRAW);
|
||||
fText->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||
rgb_color color = ui_color(B_PANEL_TEXT_COLOR);
|
||||
@@ -58,7 +58,7 @@ OverlayView::OverlayView(BRect frame)
|
||||
}
|
||||
|
||||
|
||||
OverlayView::OverlayView(BMessage *archive)
|
||||
OverlayView::OverlayView(BMessage *archive)
|
||||
:
|
||||
BView(archive)
|
||||
{
|
||||
@@ -88,11 +88,11 @@ void
|
||||
OverlayView::MessageReceived(BMessage *msg)
|
||||
{
|
||||
switch (msg->what) {
|
||||
case B_SIMPLE_DATA:
|
||||
case B_SIMPLE_DATA:
|
||||
{
|
||||
if (fReplicated)
|
||||
break;
|
||||
|
||||
|
||||
entry_ref ref;
|
||||
msg->FindRef("refs", &ref);
|
||||
BEntry entry(&ref);
|
||||
@@ -100,13 +100,13 @@ OverlayView::MessageReceived(BMessage *msg)
|
||||
|
||||
delete fBitmap;
|
||||
fBitmap = BTranslationUtils::GetBitmap(path.Path());
|
||||
|
||||
|
||||
if (fBitmap != NULL) {
|
||||
if (fText != NULL) {
|
||||
RemoveChild(fText);
|
||||
fText = NULL;
|
||||
}
|
||||
|
||||
|
||||
BRect rect = fBitmap->Bounds();
|
||||
if (!fReplicated) {
|
||||
Window()->ResizeTo(rect.right, rect.bottom);
|
||||
@@ -117,9 +117,11 @@ OverlayView::MessageReceived(BMessage *msg)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case B_ABOUT_REQUESTED:
|
||||
OverlayAboutRequested();
|
||||
break;
|
||||
case B_ABOUT_REQUESTED:
|
||||
{
|
||||
OverlayAboutRequested();
|
||||
break;
|
||||
}
|
||||
case B_COLORS_UPDATED:
|
||||
{
|
||||
rgb_color color;
|
||||
@@ -153,7 +155,7 @@ OverlayView::Archive(BMessage *archive, bool deep) const
|
||||
fBitmap->Lock();
|
||||
fBitmap->Archive(archive);
|
||||
fBitmap->Unlock();
|
||||
}
|
||||
}
|
||||
//archive->PrintToStream();
|
||||
|
||||
return B_OK;
|
||||
@@ -169,7 +171,7 @@ OverlayView::OverlayAboutRequested()
|
||||
"originally by Seth Flaxman\n\t"
|
||||
"modified by Hartmuth Reh\n\t"
|
||||
"further modified by Humdinger\n",
|
||||
"OK");
|
||||
"OK");
|
||||
BTextView *view = alert->TextView();
|
||||
BFont font;
|
||||
view->SetStylable(true);
|
||||
@@ -177,6 +179,6 @@ OverlayView::OverlayAboutRequested()
|
||||
font.SetSize(font.Size() + 7.0f);
|
||||
font.SetFace(B_BOLD_FACE);
|
||||
view->SetFontAndColor(0, 12, &font);
|
||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||
alert->SetFlags(alert->Flags() | B_CLOSE_ON_ESCAPE);
|
||||
alert->Go();
|
||||
}
|
||||
|
||||
@@ -46,17 +46,17 @@ enum {
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
B_BEBOX_PLATFORM = 0,
|
||||
B_MAC_PLATFORM,
|
||||
B_AT_CLONE_PLATFORM,
|
||||
B_ENIAC_PLATFORM,
|
||||
B_APPLE_II_PLATFORM,
|
||||
B_CRAY_PLATFORM,
|
||||
B_LISA_PLATFORM,
|
||||
B_TI_994A_PLATFORM,
|
||||
B_TIMEX_SINCLAIR_PLATFORM,
|
||||
B_ORAC_1_PLATFORM,
|
||||
B_HAL_PLATFORM,
|
||||
B_BEBOX_PLATFORM = 0,
|
||||
B_MAC_PLATFORM,
|
||||
B_AT_CLONE_PLATFORM,
|
||||
B_ENIAC_PLATFORM,
|
||||
B_APPLE_II_PLATFORM,
|
||||
B_CRAY_PLATFORM,
|
||||
B_LISA_PLATFORM,
|
||||
B_TI_994A_PLATFORM,
|
||||
B_TIMEX_SINCLAIR_PLATFORM,
|
||||
B_ORAC_1_PLATFORM,
|
||||
B_HAL_PLATFORM,
|
||||
B_INVALID_PLATFORM
|
||||
} platform_type;
|
||||
|
||||
|
||||
@@ -22,8 +22,8 @@ Application SoftwareUpdater :
|
||||
;
|
||||
|
||||
DoCatalogs SoftwareUpdater :
|
||||
x-vnd.haiku-softwareupdater
|
||||
:
|
||||
x-vnd.haiku-softwareupdater
|
||||
:
|
||||
CheckAction.cpp
|
||||
CheckManager.cpp
|
||||
SoftwareUpdaterApp.cpp
|
||||
|
||||
@@ -863,9 +863,9 @@ PackageItem::DrawItem(BView* owner, BRect item_rect, bool complete)
|
||||
owner->PushState();
|
||||
|
||||
float width = owner->Frame().Width();
|
||||
float nameWidth = width / 2.0;
|
||||
float offsetWidth = 0;
|
||||
bool showMoreDetails = fSuperItem->GetDetailLevel();
|
||||
float nameWidth = width / 2.0;
|
||||
float offsetWidth = 0;
|
||||
bool showMoreDetails = fSuperItem->GetDetailLevel();
|
||||
|
||||
BBitmap* icon = fSuperItem->GetIcon(showMoreDetails);
|
||||
if (icon != NULL && icon->IsValid()) {
|
||||
@@ -886,8 +886,8 @@ PackageItem::DrawItem(BView* owner, BRect item_rect, bool complete)
|
||||
owner->SetHighColor(ui_color(B_LIST_ITEM_TEXT_COLOR));
|
||||
|
||||
// Package name
|
||||
BString name(fName);
|
||||
owner->TruncateString(&name, B_TRUNCATE_END, nameWidth);
|
||||
BString name(fName);
|
||||
owner->TruncateString(&name, B_TRUNCATE_END, nameWidth);
|
||||
BPoint cursor(item_rect.left + offsetWidth,
|
||||
item_rect.bottom - fSmallTotalHeight - fSmallFontHeight.descent - 2);
|
||||
if (showMoreDetails)
|
||||
|
||||
@@ -16,8 +16,8 @@ Application Sudoku :
|
||||
;
|
||||
|
||||
DoCatalogs Sudoku :
|
||||
x-vnd.Haiku-Sudoku
|
||||
:
|
||||
x-vnd.Haiku-Sudoku
|
||||
:
|
||||
ProgressWindow.cpp
|
||||
Sudoku.cpp
|
||||
SudokuGenerator.cpp
|
||||
|
||||
@@ -364,7 +364,7 @@ Grepper::_RunnerThread()
|
||||
}
|
||||
|
||||
fd_set readSet;
|
||||
struct timeval timeout = { 0, 100000 };
|
||||
struct timeval timeout = { 0, 100000 };
|
||||
char line[B_PATH_NAME_LENGTH * 2];
|
||||
|
||||
FILE* output = fdopen(out, "r");
|
||||
|
||||
@@ -83,7 +83,7 @@ AuthenticationPanel::MessageReceived(BMessage* message)
|
||||
int32 selectionEnd;
|
||||
m_passwordTextControl->TextView()->GetSelection(&selectionStart,
|
||||
&selectionEnd);
|
||||
m_passwordTextControl->TextView()->HideTyping(
|
||||
m_passwordTextControl->TextView()->HideTyping(
|
||||
m_hidePasswordCheckBox->Value() == B_CONTROL_ON);
|
||||
m_passwordTextControl->SetText(text.String());
|
||||
m_passwordTextControl->TextView()->Select(selectionStart,
|
||||
|
||||
@@ -14,7 +14,7 @@ class BTextControl;
|
||||
|
||||
class AuthenticationPanel : public BWindow {
|
||||
public:
|
||||
AuthenticationPanel(BRect parentFrame = BRect());
|
||||
AuthenticationPanel(BRect parentFrame = BRect());
|
||||
virtual ~AuthenticationPanel();
|
||||
|
||||
virtual bool QuitRequested();
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
bool* rememberCredentials);
|
||||
|
||||
private:
|
||||
BRect m_parentWindowFrame;
|
||||
BRect m_parentWindowFrame;
|
||||
BTextControl* m_usernameTextControl;
|
||||
BTextControl* m_passwordTextControl;
|
||||
BCheckBox* m_hidePasswordCheckBox;
|
||||
|
||||
@@ -701,9 +701,9 @@ TabManagerController::SetDoubleClickOutsideTabsMessage(const BMessage& message,
|
||||
|
||||
|
||||
TabManager::TabManager(const BMessenger& target, BMessage* newTabMessage)
|
||||
:
|
||||
fController(new TabManagerController(this)),
|
||||
fTarget(target)
|
||||
:
|
||||
fController(new TabManagerController(this)),
|
||||
fTarget(target)
|
||||
{
|
||||
fController->SetDoubleClickOutsideTabsMessage(*newTabMessage,
|
||||
be_app_messenger);
|
||||
@@ -749,14 +749,14 @@ TabManager::~TabManager()
|
||||
void
|
||||
TabManager::SetTarget(const BMessenger& target)
|
||||
{
|
||||
fTarget = target;
|
||||
fTarget = target;
|
||||
}
|
||||
|
||||
|
||||
const BMessenger&
|
||||
TabManager::Target() const
|
||||
{
|
||||
return fTarget;
|
||||
return fTarget;
|
||||
}
|
||||
|
||||
|
||||
@@ -826,9 +826,9 @@ TabManager::SelectTab(int32 tabIndex)
|
||||
fCardLayout->SetVisibleItem(tabIndex);
|
||||
fTabContainerView->SelectTab(tabIndex);
|
||||
|
||||
BMessage message(TAB_CHANGED);
|
||||
message.AddInt32("tab index", tabIndex);
|
||||
fTarget.SendMessage(&message);
|
||||
BMessage message(TAB_CHANGED);
|
||||
message.AddInt32("tab index", tabIndex);
|
||||
fTarget.SendMessage(&message);
|
||||
}
|
||||
|
||||
|
||||
@@ -851,9 +851,9 @@ TabManager::SelectedTabIndex() const
|
||||
void
|
||||
TabManager::CloseTab(int32 tabIndex)
|
||||
{
|
||||
BMessage message(CLOSE_TAB);
|
||||
message.AddInt32("tab index", tabIndex);
|
||||
fTarget.SendMessage(&message);
|
||||
BMessage message(CLOSE_TAB);
|
||||
message.AddInt32("tab index", tabIndex);
|
||||
fTarget.SendMessage(&message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
#include <TabView.h>
|
||||
|
||||
enum {
|
||||
TAB_CHANGED = 'tcha',
|
||||
CLOSE_TAB = 'cltb'
|
||||
TAB_CHANGED = 'tcha',
|
||||
CLOSE_TAB = 'cltb'
|
||||
};
|
||||
|
||||
class BBitmap;
|
||||
@@ -25,8 +25,8 @@ class TabManagerController;
|
||||
|
||||
class TabManager {
|
||||
public:
|
||||
TabManager(const BMessenger& target,
|
||||
BMessage* newTabMessage);
|
||||
TabManager(const BMessenger& target,
|
||||
BMessage* newTabMessage);
|
||||
virtual ~TabManager();
|
||||
|
||||
void SetTarget(const BMessenger& target);
|
||||
|
||||
Reference in New Issue
Block a user