Build fixes for the R5/Dano target, no longer relies on the COMPILE_FOR_R5 macro.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16887 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
05cda59dbf
commit
6f850dfd44
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "AttributeEditors.h"
|
||||
@ -21,6 +21,8 @@
|
||||
#include <Mime.h>
|
||||
#include <TranslationUtils.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
|
||||
static const uint32 kMsgValueChanged = 'vlch';
|
||||
static const uint32 kMimeTypeItem = 'miti';
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -153,7 +153,7 @@ EditorTabView::SetTypeEditorTab(BView *view)
|
||||
|
||||
FrameResized(0, 0);
|
||||
|
||||
#ifdef COMPILE_FOR_R5
|
||||
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
||||
if (Window() != NULL) {
|
||||
// With R5's BTabView, calling select without being
|
||||
// attached to a window crashes...
|
||||
@ -176,7 +176,7 @@ AttributeWindow::AttributeWindow(BRect _rect, entry_ref *ref, const char *attrib
|
||||
// Set alternative window title for devices
|
||||
|
||||
char name[B_FILE_NAME_LENGTH];
|
||||
#ifdef COMPILE_FOR_R5
|
||||
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
||||
strncpy(name, ref->name, sizeof(name));
|
||||
name[sizeof(name) - 1] = '\0';
|
||||
#else
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef DATA_EDITOR_H
|
||||
@ -11,10 +11,14 @@
|
||||
#include <Locker.h>
|
||||
#include <ObjectList.h>
|
||||
|
||||
class BHandler;
|
||||
class BLooper;
|
||||
class BMessenger;
|
||||
|
||||
class DataChange;
|
||||
class StateWatcher;
|
||||
|
||||
|
||||
class DataEditor : public BLocker {
|
||||
public:
|
||||
DataEditor();
|
||||
|
@ -15,6 +15,10 @@
|
||||
#include <Beep.h>
|
||||
|
||||
|
||||
#ifndef __HAIKU__
|
||||
typedef uint32 addr_t;
|
||||
#endif
|
||||
|
||||
static const uint32 kBlockSize = 16;
|
||||
static const uint32 kHorizontalSpace = 8;
|
||||
static const uint32 kVerticalSpace = 4;
|
||||
@ -1246,7 +1250,7 @@ DataView::KeyDown(const char *bytes, int32 numBytes)
|
||||
c += 'A' - 'a';
|
||||
const char *hexNumbers = "0123456789abcdef";
|
||||
addr_t number;
|
||||
if (data == NULL || (number = (addr_t)strchr(hexNumbers, c)) == NULL)
|
||||
if (data == NULL || (number = (addr_t)strchr(hexNumbers, c)) == 0)
|
||||
break;
|
||||
|
||||
SetSelection(fStart, fStart);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the Haiku License.
|
||||
*/
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef FIND_WINDOW_H
|
||||
#define FIND_WINDOW_H
|
||||
|
||||
@ -9,8 +9,10 @@
|
||||
#include <Window.h>
|
||||
#include <Messenger.h>
|
||||
|
||||
class FindTextView;
|
||||
class BCheckBox;
|
||||
class BMenu;
|
||||
|
||||
class FindTextView;
|
||||
|
||||
|
||||
enum find_mode {
|
||||
|
@ -1,13 +1,8 @@
|
||||
SubDir HAIKU_TOP src apps diskprobe ;
|
||||
|
||||
UsePrivateHeaders shared ;
|
||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||
|
||||
if ! $(DANO_COMPATIBLE) {
|
||||
local defines = COMPILE_FOR_R5 ;
|
||||
defines = [ FDefines $(defines) ] ;
|
||||
SubDirCcFlags $(defines) ;
|
||||
SubDirC++Flags $(defines) ;
|
||||
}
|
||||
UsePrivateHeaders shared ;
|
||||
|
||||
Application DiskProbe :
|
||||
DiskProbe.cpp
|
||||
@ -20,10 +15,6 @@ Application DiskProbe :
|
||||
ProbeView.cpp
|
||||
OpenWindow.cpp
|
||||
FindWindow.cpp
|
||||
: libbe.so libtracker.so libtranslation.so
|
||||
: be tracker translation
|
||||
: DiskProbe.rdef
|
||||
;
|
||||
|
||||
if $(HAIKU_COMPATIBLE) {
|
||||
LinkAgainst DiskProbe : libroot.so ;
|
||||
}
|
||||
|
@ -1,13 +1,14 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef OPEN_WINDOW_H
|
||||
#define OPEN_WINDOW_H
|
||||
|
||||
|
||||
#include <Window.h>
|
||||
|
||||
class BEntry;
|
||||
class BMenu;
|
||||
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -36,6 +36,7 @@
|
||||
#include <Beep.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
|
||||
@ -302,7 +303,7 @@ PositionSlider::DrawBar()
|
||||
frame.top++;
|
||||
frame.left++;
|
||||
frame.right = ThumbFrame().left + ThumbFrame().Width() / 2;
|
||||
#ifdef COMPILE_FOR_R5
|
||||
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
||||
if (IsEnabled())
|
||||
view->SetHighColor(102, 152, 203);
|
||||
else
|
||||
@ -320,7 +321,7 @@ PositionSlider::DrawBar()
|
||||
|
||||
rgb_color cornerColor = tint_color(ViewColor(), B_DARKEN_1_TINT);
|
||||
rgb_color darkColor = tint_color(ViewColor(), B_DARKEN_3_TINT);
|
||||
#ifdef COMPILE_FOR_R5
|
||||
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
||||
rgb_color shineColor = {255, 255, 255};
|
||||
rgb_color shadowColor = {0, 0, 0};
|
||||
#else
|
||||
@ -389,6 +390,7 @@ void
|
||||
PositionSlider::SetPosition(off_t position)
|
||||
{
|
||||
position /= fBlockSize;
|
||||
printf("value: %ld\n", int32(1.0 * kMaxSliderLimit * position / ((fSize - 1) / fBlockSize) + 0.5));
|
||||
SetValue(int32(1.0 * kMaxSliderLimit * position / ((fSize - 1) / fBlockSize) + 0.5));
|
||||
}
|
||||
|
||||
@ -611,7 +613,7 @@ HeaderView::Draw(BRect updateRect)
|
||||
{
|
||||
BRect rect = Bounds();
|
||||
|
||||
#ifdef COMPILE_FOR_R5
|
||||
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
||||
SetHighColor(255, 255, 255);
|
||||
#else
|
||||
SetHighColor(ui_color(B_SHINE_COLOR));
|
||||
@ -900,7 +902,7 @@ TypeMenuItem::DrawContent()
|
||||
point.x = Frame().right - 4 - Menu()->StringWidth(fType.String());
|
||||
point.y += fontHeight.ascent;
|
||||
|
||||
#ifdef COMPILE_FOR_R5
|
||||
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
||||
Menu()->SetDrawingMode(B_OP_ALPHA);
|
||||
#endif
|
||||
|
||||
@ -1105,7 +1107,8 @@ ProbeView::UpdateSizeLimits()
|
||||
} else
|
||||
Window()->SetSizeLimits(250, 32768, 200, 32768);
|
||||
|
||||
#ifdef COMPILE_FOR_R5
|
||||
#ifdef HAIKU_TARGET_PLATFORM_BEOS
|
||||
// In Haiku and Dano, the window is resized automatically
|
||||
BRect bounds = Window()->Bounds();
|
||||
float minWidth, maxWidth, minHeight, maxHeight;
|
||||
Window()->GetSizeLimits(&minWidth, &maxWidth, &minHeight, &maxHeight);
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef PROBE_VIEW_H
|
||||
#define PROBE_VIEW_H
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
class BScrollView;
|
||||
class BMenuItem;
|
||||
class BMenu;
|
||||
|
||||
class HeaderView;
|
||||
class DataView;
|
||||
|
@ -1,13 +1,14 @@
|
||||
/*
|
||||
** Copyright 2004, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
/*
|
||||
* Copyright 2004-2006, Axel Dörfler, axeld@pinc-software.de. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
|
||||
#include "ProbeWindow.h"
|
||||
#include "DiskProbe.h"
|
||||
|
||||
#include <Application.h>
|
||||
#include <View.h>
|
||||
|
||||
|
||||
ProbeWindow::ProbeWindow(BRect rect, entry_ref *ref)
|
||||
|
Loading…
Reference in New Issue
Block a user