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