Author: mmlr Date: 2010-01-26 03:30:21 +0100 (Tue, 26 Jan 2010) New Revision: 35292 Changeset: http://dev.haiku-os.org/changeset/35292/haiku Modified: haiku/trunk/src/apps/terminal/TermView.cpp Log: Automatic whitespace cleanup, no functional change. Modified: haiku/trunk/src/apps/terminal/TermView.cpp =================================================================== --- haiku/trunk/src/apps/terminal/TermView.cpp 2010-01-25 23:16:06 UTC (rev 35291) +++ haiku/trunk/src/apps/terminal/TermView.cpp 2010-01-26 02:30:21 UTC (rev 35292) @@ -232,14 +232,14 @@ fReportAnyMouseEvent(false) { BRect frame = Bounds(); - + if (archive->FindInt32("encoding", (int32*)&fEncoding) < B_OK) fEncoding = M_UTF8; if (archive->FindInt32("columns", (int32*)&fColumns) < B_OK) fColumns = COLUMNS_DEFAULT; if (archive->FindInt32("rows", (int32*)&fRows) < B_OK) fRows = ROWS_DEFAULT; - + int32 argc = 0; if (archive->HasInt32("argc")) archive->FindInt32("argc", &argc); @@ -257,7 +257,7 @@ bool useRect = false; if ((archive->FindBool("use_rect", &useRect) == B_OK) && useRect) SetTermSize(frame); - + delete[] argv; } @@ -342,7 +342,7 @@ return B_NO_MEMORY; SetTermFont(be_fixed_font); - + error = fShell->Open(fRows, fColumns, EncodingAsShortString(fEncoding), argc, argv); @@ -550,7 +550,7 @@ { int rows; int columns; - + GetTermSizeFromRect(rect, &rows, &columns); SetTermSize(rows, columns); } @@ -562,7 +562,7 @@ { int columns = (rect.IntegerWidth() + 1) / fFontWidth; int rows = (rect.IntegerHeight() + 1) / fFontHeight; - + if (_rows) *_rows = rows; if (_columns) @@ -621,8 +621,8 @@ { fMouseClipboard = clipboard; } - - + + void TermView::GetTermFont(BFont *font) const { @@ -796,7 +796,7 @@ return B_BAD_VALUE; fShell = shell; - + return fShell->AttachBuffer(TextBuffer()); } @@ -813,7 +813,7 @@ TermView::_Activate() { fActive = true; - + if (fCursorBlinkRunner == NULL) { BMessage blinkMessage(kBlinkCursor); fCursorBlinkRunner = new (std::nothrow) BMessageRunner( @@ -830,7 +830,7 @@ _InvalidateTextRect(fCursor.x, fCursor.y, fCursor.x, fCursor.y); delete fCursorBlinkRunner; fCursorBlinkRunner = NULL; - + fActive = false; } @@ -956,7 +956,7 @@ TermView::_BlinkCursor() { bool wasVisible = _IsCursorVisible(); - + if (!wasVisible && fInline && fInline->IsActive()) return; @@ -1022,7 +1022,7 @@ TermView::AttachedToWindow() { fMouseButtons = 0; - + MakeFocus(true); if (fScrollBar) { fScrollBar->SetSteps(fFontHeight, fFontHeight * fRows); @@ -1144,7 +1144,7 @@ if (fInline && fInline->IsActive()) _DrawInlineMethodString(); - + if (fCursor >= TermPos(x1, y1) && fCursor <= TermPos(x2, y2)) _DrawCursor(); } @@ -1574,7 +1574,7 @@ } break; } - + case B_INPUT_METHOD_EVENT: { int32 opcode; @@ -1707,8 +1707,8 @@ //debug_printf("TermView::ScrollTo(): %f -> %f\n", fScrollOffset, where.y); float diff = where.y - fScrollOffset; if (diff == 0) - return; - + return; + float bottom = Bounds().bottom; int32 oldFirstLine = _LineAt(0); int32 oldLastLine = _LineAt(bottom); @@ -1748,7 +1748,7 @@ TermView::TargetedByScrollView(BScrollView *scrollView) { BView::TargetedByScrollView(scrollView); - + SetScrollBar(scrollView ? scrollView->ScrollBar(B_VERTICAL) : NULL); } @@ -2815,26 +2815,26 @@ { if (!fInline || !fInline->String()) return; - + const int32 numChars = BString(fInline->String()).CountChars(); - + BPoint startPoint = _ConvertFromTerminal(fCursor); BPoint endPoint = startPoint; endPoint.x += fFontWidth * numChars; endPoint.y += fFontHeight + 1; - + BRect eraseRect(startPoint, endPoint); - + PushState(); SetHighColor(kTermColorTable[7]); FillRect(eraseRect); PopState(); - + BPoint loc = _ConvertFromTerminal(fCursor); loc.y += fFontHeight; SetFont(&fHalfFont); SetHighColor(kTermColorTable[0]); - SetLowColor(kTermColorTable[7]); + SetLowColor(kTermColorTable[7]); DrawString(fInline->String(), loc); } @@ -2849,7 +2849,7 @@ _ActivateCursor(false); if (IsFocus()) - be_app->ObscureCursor(); + be_app->ObscureCursor(); // If we find the "be:confirmed" boolean (and the boolean is true), // it means it's over for now, so the current InlineInput object @@ -2858,13 +2858,13 @@ bool confirmed; if (message->FindBool("be:confirmed", &confirmed) != B_OK) confirmed = false; - + fInline->SetString(""); - + Invalidate(); // TODO: Debug only snooze(100000); - + fInline->SetString(string); fInline->ResetClauses(); @@ -2939,10 +2939,10 @@ const int32 &limit = string.CountChars(); BPoint where = _ConvertFromTerminal(fCursor); where.y += fFontHeight; - - for (int32 i = 0; i < limit; i++) { + + for (int32 i = 0; i < limit; i++) { // Add the location of the UTF8 characters - + where.x += fFontWidth; ConvertToScreen(&where); @@ -2966,7 +2966,7 @@ if (inlineInput->IsActive() && Window()) { Invalidate(); - + BMessage message(B_INPUT_METHOD_EVENT); message.AddInt32("be:opcode", B_INPUT_METHOD_STOPPED); inlineInput->Method()->SendMessage(&message);