Couldn't resist using one of the nice new BResources::SetToImage()

methods. Currently guarded by an "#ifdef __HAIKU__", as long as we
want to be able to build a BeOS compatible Clock.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16177 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2006-02-01 00:17:47 +00:00
parent 1cac47bfa9
commit 00113ff97b
1 changed files with 8 additions and 0 deletions

View File

@ -48,6 +48,13 @@ TOffscreenView::TOffscreenView(BRect frame, char *name, short mRadius,
for (index = 0; index <= 8; index++) for (index = 0; index <= 8; index++)
fClockFace[index] = NULL; fClockFace[index] = NULL;
#ifdef __HAIKU__
BResources rsrcs;
error = rsrcs.SetToImage(&&dummy_label);
dummy_label:
if (error == B_OK) {
{
#else // !__HAIKU__
// Note: Since we can be run as replicant, we get our resources this way, // Note: Since we can be run as replicant, we get our resources this way,
// not via be_app->AppResources(). // not via be_app->AppResources().
error = be_roster->FindApp(app_signature, &ref); error = be_roster->FindApp(app_signature, &ref);
@ -57,6 +64,7 @@ TOffscreenView::TOffscreenView(BRect frame, char *name, short mRadius,
error = file.InitCheck(); error = file.InitCheck();
if (error == B_NO_ERROR) { if (error == B_NO_ERROR) {
BResources rsrcs(&file); BResources rsrcs(&file);
#endif // !__HAIKU__
for (loop = 0; loop <= 8; loop++) { for (loop = 0; loop <= 8; loop++) {
if ((picH = rsrcs.FindResource('PICT', loop+4, &len))) { if ((picH = rsrcs.FindResource('PICT', loop+4, &len))) {