GCC 4 fixes by Ingo Weinhold.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14893 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -857,7 +857,8 @@ TBarView::SendDragMessage(const char *signature, entry_ref *ref)
|
|||||||
// can toss it after send
|
// can toss it after send
|
||||||
err = mess.SendMessage(fDragMessage);
|
err = mess.SendMessage(fDragMessage);
|
||||||
} else if (ref) {
|
} else if (ref) {
|
||||||
FSLaunchItem(ref, fDragMessage, true, true);
|
FSLaunchItem((const entry_ref*)ref, (const BMessage*)fDragMessage,
|
||||||
|
true, true);
|
||||||
} else if (signature && strlen(signature) > 0) {
|
} else if (signature && strlen(signature) > 0) {
|
||||||
roster.Launch(signature, fDragMessage);
|
roster.Launch(signature, fDragMessage);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -66,6 +66,7 @@ All rights reserved.
|
|||||||
#include "TimeView.h"
|
#include "TimeView.h"
|
||||||
#include "BarApp.h"
|
#include "BarApp.h"
|
||||||
|
|
||||||
|
using std::max;
|
||||||
|
|
||||||
#ifdef DB_ADDONS
|
#ifdef DB_ADDONS
|
||||||
// Add-on support
|
// Add-on support
|
||||||
|
|||||||
@@ -70,6 +70,8 @@ struct DeskbarItemInfo {
|
|||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
class TReplicantShelf;
|
||||||
|
|
||||||
class TReplicantTray : public BView {
|
class TReplicantTray : public BView {
|
||||||
public:
|
public:
|
||||||
TReplicantTray(TBarView *bv, bool vertical);
|
TReplicantTray(TBarView *bv, bool vertical);
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
virtual void operator()()
|
virtual void operator()()
|
||||||
{ result = (function)(p1.Pass()); }
|
{ FunctionObjectWithResult<Result>::result = (function)(p1.Pass()); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Result (*function)(Param1);
|
Result (*function)(Param1);
|
||||||
@@ -258,7 +258,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()()
|
virtual void operator()()
|
||||||
{ result = (function)(p1.Pass(), p2.Pass(), p3.Pass()); }
|
{ FunctionObjectWithResult<Result>::result
|
||||||
|
= (function)(p1.Pass(), p2.Pass(), p3.Pass()); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Result (*function)(Param1, Param2, Param3);
|
Result (*function)(Param1, Param2, Param3);
|
||||||
@@ -305,7 +306,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()()
|
virtual void operator()()
|
||||||
{ result = (function)(p1.Pass(), p2.Pass(), p3.Pass(), p4.Pass()); }
|
{ FunctionObjectWithResult<Result>::result
|
||||||
|
= (function)(p1.Pass(), p2.Pass(), p3.Pass(), p4.Pass()); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Result (*function)(Param1, Param2, Param3, Param4);
|
Result (*function)(Param1, Param2, Param3, Param4);
|
||||||
@@ -365,7 +367,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()()
|
virtual void operator()()
|
||||||
{ result = (target->*function)(); }
|
{ FunctionObjectWithResult<R>::result = (target->*function)(); }
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@@ -428,7 +430,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()()
|
virtual void operator()()
|
||||||
{ result = (target->*function)(p1.Pass()); }
|
{ FunctionObjectWithResult<R>::result = (target->*function)(p1.Pass()); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
R (T::*function)(Param1);
|
R (T::*function)(Param1);
|
||||||
@@ -449,7 +451,8 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void operator()()
|
virtual void operator()()
|
||||||
{ result = (target->*function)(p1.Pass(), p2.Pass()); }
|
{ FunctionObjectWithResult<R>::result
|
||||||
|
= (target->*function)(p1.Pass(), p2.Pass()); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
R (T::*function)(Param1, Param2);
|
R (T::*function)(Param1, Param2);
|
||||||
|
|||||||
@@ -148,63 +148,6 @@ class BPose {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<class Param1>
|
|
||||||
void
|
|
||||||
EachTextWidget(BPose *pose, BPoseView *poseView,
|
|
||||||
void (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *, Param1), Param1 p1)
|
|
||||||
{
|
|
||||||
for (int32 index = 0; ;index++) {
|
|
||||||
BColumn *column = poseView->ColumnAt(index);
|
|
||||||
if (!column)
|
|
||||||
break;
|
|
||||||
|
|
||||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
|
||||||
if (widget)
|
|
||||||
(func)(widget, pose, poseView, column, p1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Param1, class Param2>
|
|
||||||
void
|
|
||||||
EachTextWidget(BPose *pose, BPoseView *poseView,
|
|
||||||
void (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *,
|
|
||||||
Param1, Param2), Param1 p1, Param2 p2)
|
|
||||||
{
|
|
||||||
for (int32 index = 0; ;index++) {
|
|
||||||
BColumn *column = poseView->ColumnAt(index);
|
|
||||||
if (!column)
|
|
||||||
break;
|
|
||||||
|
|
||||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
|
||||||
if (widget)
|
|
||||||
(func)(widget, pose, poseView, column, p1, p2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
template<class Result, class Param1, class Param2>
|
|
||||||
Result
|
|
||||||
WhileEachTextWidget(BPose *pose, BPoseView *poseView,
|
|
||||||
Result (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *,
|
|
||||||
Param1, Param2), Param1 p1, Param2 p2)
|
|
||||||
{
|
|
||||||
for (int32 index = 0; ;index++) {
|
|
||||||
BColumn *column = poseView->ColumnAt(index);
|
|
||||||
if (!column)
|
|
||||||
break;
|
|
||||||
|
|
||||||
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
|
||||||
if (widget) {
|
|
||||||
Result result = (func)(widget, pose, poseView, column, p1, p2);
|
|
||||||
if (result)
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline Model *
|
inline Model *
|
||||||
BPose::TargetModel() const
|
BPose::TargetModel() const
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,13 +39,13 @@ All rights reserved.
|
|||||||
#define _POSE_LIST_H
|
#define _POSE_LIST_H
|
||||||
|
|
||||||
#include "ObjectList.h"
|
#include "ObjectList.h"
|
||||||
|
#include "Pose.h"
|
||||||
|
|
||||||
struct node_ref;
|
struct node_ref;
|
||||||
struct entry_ref;
|
struct entry_ref;
|
||||||
|
|
||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
|
|
||||||
class BPose;
|
|
||||||
class Model;
|
class Model;
|
||||||
|
|
||||||
class PoseList : public BObjectList<BPose> {
|
class PoseList : public BObjectList<BPose> {
|
||||||
|
|||||||
@@ -46,7 +46,6 @@ All rights reserved.
|
|||||||
#include "ContainerWindow.h"
|
#include "ContainerWindow.h"
|
||||||
#include "Model.h"
|
#include "Model.h"
|
||||||
#include "PendingNodeMonitorCache.h"
|
#include "PendingNodeMonitorCache.h"
|
||||||
#include "Pose.h"
|
|
||||||
#include "PoseList.h"
|
#include "PoseList.h"
|
||||||
#include "TitleView.h"
|
#include "TitleView.h"
|
||||||
#include "Utilities.h"
|
#include "Utilities.h"
|
||||||
@@ -73,6 +72,7 @@ class BContainerWindow;
|
|||||||
class BHScrollBar;
|
class BHScrollBar;
|
||||||
class EntryListBase;
|
class EntryListBase;
|
||||||
|
|
||||||
|
|
||||||
const int32 kSmallStep = 10;
|
const int32 kSmallStep = 10;
|
||||||
const int32 kListOffset = 20;
|
const int32 kListOffset = 20;
|
||||||
|
|
||||||
@@ -1001,6 +1001,63 @@ BPoseView::FindPose(const entry_ref *entry, int32 *index) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Param1>
|
||||||
|
void
|
||||||
|
EachTextWidget(BPose *pose, BPoseView *poseView,
|
||||||
|
void (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *, Param1), Param1 p1)
|
||||||
|
{
|
||||||
|
for (int32 index = 0; ;index++) {
|
||||||
|
BColumn *column = poseView->ColumnAt(index);
|
||||||
|
if (!column)
|
||||||
|
break;
|
||||||
|
|
||||||
|
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||||
|
if (widget)
|
||||||
|
(func)(widget, pose, poseView, column, p1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Param1, class Param2>
|
||||||
|
void
|
||||||
|
EachTextWidget(BPose *pose, BPoseView *poseView,
|
||||||
|
void (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *,
|
||||||
|
Param1, Param2), Param1 p1, Param2 p2)
|
||||||
|
{
|
||||||
|
for (int32 index = 0; ;index++) {
|
||||||
|
BColumn *column = poseView->ColumnAt(index);
|
||||||
|
if (!column)
|
||||||
|
break;
|
||||||
|
|
||||||
|
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||||
|
if (widget)
|
||||||
|
(func)(widget, pose, poseView, column, p1, p2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
template<class Result, class Param1, class Param2>
|
||||||
|
Result
|
||||||
|
WhileEachTextWidget(BPose *pose, BPoseView *poseView,
|
||||||
|
Result (*func)(BTextWidget *, BPose *, BPoseView *, BColumn *,
|
||||||
|
Param1, Param2), Param1 p1, Param2 p2)
|
||||||
|
{
|
||||||
|
for (int32 index = 0; ;index++) {
|
||||||
|
BColumn *column = poseView->ColumnAt(index);
|
||||||
|
if (!column)
|
||||||
|
break;
|
||||||
|
|
||||||
|
BTextWidget *widget = pose->WidgetFor(column->AttrHash());
|
||||||
|
if (widget) {
|
||||||
|
Result result = (func)(widget, pose, poseView, column, p1, p2);
|
||||||
|
if (result)
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace BPrivate
|
} // namespace BPrivate
|
||||||
|
|
||||||
using namespace BPrivate;
|
using namespace BPrivate;
|
||||||
|
|||||||
@@ -215,7 +215,7 @@ template<class T>
|
|||||||
void
|
void
|
||||||
LaunchInNewThread(const char *name, int32 priority, status_t (T::*function)(), T *onThis)
|
LaunchInNewThread(const char *name, int32 priority, status_t (T::*function)(), T *onThis)
|
||||||
{
|
{
|
||||||
Thread::Launch(new SimpleMemberFunctionObjectWorkaround<T>(func, onThis),
|
Thread::Launch(new SimpleMemberFunctionObjectWorkaround<T>(function, onThis),
|
||||||
priority, name);
|
priority, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class TTrackerState : public Settings {
|
|||||||
~TTrackerState();
|
~TTrackerState();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend TrackerSettings;
|
friend class BPrivate::TrackerSettings;
|
||||||
|
|
||||||
static void InitIfNeeded();
|
static void InitIfNeeded();
|
||||||
TTrackerState(const TTrackerState&);
|
TTrackerState(const TTrackerState&);
|
||||||
|
|||||||
@@ -1067,7 +1067,7 @@ StringToScalar(const char *text)
|
|||||||
return val;
|
return val;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI
|
#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI && !defined(__HAIKU__)
|
||||||
|
|
||||||
bool
|
bool
|
||||||
operator==(const rgb_color &a, const rgb_color &b)
|
operator==(const rgb_color &a, const rgb_color &b)
|
||||||
|
|||||||
@@ -424,7 +424,7 @@ extern void DeleteSubmenu(BMenuItem *submenuItem);
|
|||||||
extern bool BootedInSafeMode();
|
extern bool BootedInSafeMode();
|
||||||
|
|
||||||
// Now is in kits
|
// Now is in kits
|
||||||
#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI
|
#if B_BEOS_VERSION <= B_BEOS_VERSION_MAUI && !defined(__HAIKU__)
|
||||||
|
|
||||||
// Should be in kits
|
// Should be in kits
|
||||||
bool operator==(const rgb_color &, const rgb_color &);
|
bool operator==(const rgb_color &, const rgb_color &);
|
||||||
|
|||||||
Reference in New Issue
Block a user