From 7cc0dec4a202b87867715b4e2716cfcf03b913fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 29 Dec 2005 15:57:24 +0000 Subject: [PATCH] Got rid of the remaining SERVER_TRUE constants. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15719 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/View.cpp | 49 ++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/src/kits/interface/View.cpp b/src/kits/interface/View.cpp index ffb6ec6a13..21891983c7 100644 --- a/src/kits/interface/View.cpp +++ b/src/kits/interface/View.cpp @@ -247,7 +247,7 @@ ViewState::UpdateFrom(BPrivate::PortLink &link) int32 code; if (link.FlushWithReply(code) != B_OK - || code != SERVER_TRUE) + || code != B_OK) return; uint32 fontID; @@ -960,7 +960,7 @@ BView::Origin() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { fOwner->fLink->Read(&fState->origin); fState->valid_flags |= B_VIEW_ORIGIN_BIT; @@ -1395,7 +1395,7 @@ BView::GetMouse(BPoint *location, uint32 *buttons, bool checkMessageQueue) int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { fOwner->fLink->Read(location); fOwner->fLink->Read(buttons); @@ -1603,7 +1603,7 @@ BView::LineMiterLimit() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { int8 cap, join; fOwner->fLink->Read((int8 *)&cap); fOwner->fLink->Read((int8 *)&join); @@ -1676,7 +1676,7 @@ BView::Scale() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) + && code == B_OK) fOwner->fLink->Read(&fState->scale); fState->valid_flags |= B_VIEW_SCALE_BIT; @@ -1717,7 +1717,7 @@ BView::DrawingMode() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { int8 drawingMode; fOwner->fLink->Read(&drawingMode); @@ -1766,7 +1766,7 @@ BView::GetBlendingMode(source_alpha *_sourceAlpha, int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { int8 alphaSourceMode, alphaFunctionMode; fOwner->fLink->Read(&alphaSourceMode); fOwner->fLink->Read(&alphaFunctionMode); @@ -1838,7 +1838,7 @@ BView::PenLocation() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { fOwner->fLink->Read(&fState->pen_location); fState->valid_flags |= B_VIEW_PEN_LOCATION_BIT; @@ -1879,7 +1879,7 @@ BView::PenSize() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { fOwner->fLink->Read(&fState->pen_size); fState->valid_flags |= B_VIEW_PEN_SIZE_BIT; @@ -1924,7 +1924,7 @@ BView::HighColor() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { fOwner->fLink->Read(&fState->high_color); fState->valid_flags |= B_VIEW_HIGH_COLOR_BIT; @@ -1968,7 +1968,7 @@ BView::LowColor() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { fOwner->fLink->Read(&fState->low_color); fState->valid_flags |= B_VIEW_LOW_COLOR_BIT; @@ -2011,7 +2011,7 @@ BView::ViewColor() const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { fOwner->fLink->Read(&fState->view_color); fState->valid_flags |= B_VIEW_VIEW_COLOR_BIT; @@ -2177,7 +2177,7 @@ BView::GetClippingRegion(BRegion* region) const int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { int32 count; fOwner->fLink->Read(&count); @@ -3020,7 +3020,7 @@ BView::EndPicture() int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE + && code == B_OK && fOwner->fLink->Read(&token) == B_OK) { BPicture *picture = cpicture; cpicture = picture->step_down(); @@ -3128,12 +3128,12 @@ BView::DrawPicture(const BPicture *picture) return; DrawPictureAsync(picture, PenLocation()); - fOwner->fLink->Attach(SERVER_TRUE); + fOwner->fLink->Attach(B_OK); // ToDo: why a reply? int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { status_t err; fOwner->fLink->Read(&err); } @@ -3147,12 +3147,12 @@ BView::DrawPicture(const BPicture *picture, BPoint where) return; DrawPictureAsync(picture, where); - fOwner->fLink->Attach(SERVER_TRUE); + fOwner->fLink->Attach(B_OK); // ToDo: why a reply? int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { status_t err; fOwner->fLink->Read(&err); } @@ -3166,12 +3166,12 @@ BView::DrawPicture(const char *filename, long offset, BPoint where) return; DrawPictureAsync(filename, offset, where); - fOwner->fLink->Attach(SERVER_TRUE); + fOwner->fLink->Attach(B_OK); // ToDo: why a reply? int32 code; if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) { + && code == B_OK) { status_t err; fOwner->fLink->Read(&err); } @@ -4266,15 +4266,8 @@ BView::_SetViewBitmap(const BBitmap* bitmap, BRect srcRect, fOwner->fLink->Attach(followFlags); fOwner->fLink->Attach(options); - // TODO: this needs fixed between here and the server. - // The server should return whatever error code is needed, whether it - // is B_OK or whatever, not SERVER_TRUE. - status_t status = B_ERROR; - int32 code; - if (fOwner->fLink->FlushWithReply(code) == B_OK - && code == SERVER_TRUE) - fOwner->fLink->Read(&status); + fOwner->fLink->FlushWithReply(status); return status; }