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