Changeset 24621
- Timestamp:
- 03/28/08 06:40:55 (2 months ago)
- Files:
-
- haiku/trunk/src/apps/deskbar/BarWindow.cpp (modified) (1 diff)
- haiku/trunk/src/apps/deskbar/StatusView.cpp (modified) (3 diffs)
- haiku/trunk/src/kits/interface/Shelf.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
haiku/trunk/src/apps/deskbar/BarWindow.cpp
r21960 r24621 519 519 shelf = B_DESKBAR_TRAY; 520 520 521 err = fBarView->AddItem(new BMessage(archivedView), shelf, &id); 521 BMessage* archive = new BMessage(archivedView); 522 err = fBarView->AddItem(archive, shelf, &id); 523 if (err < B_OK) 524 delete archive; 522 525 } else if (message->FindRef("addon", &ref) == B_OK) { 523 526 // haiku/trunk/src/apps/deskbar/StatusView.cpp
r23500 r24621 1023 1023 1024 1024 1025 /* * Message must contain an archivable view1026 * in the Archives folder for later rehydration 1027 * returns the current boot id 1028 */ 1029 1025 /*! Message must contain an archivable view for later rehydration. 1026 This function takes over ownership of the provided message on success 1027 only. 1028 Returns the current replicant ID. 1029 */ 1030 1030 status_t 1031 TReplicantTray::AddIcon(BMessage * icon, int32 *id, const entry_ref *addOn)1032 { 1033 if ( !icon || !id)1031 TReplicantTray::AddIcon(BMessage *archive, int32 *id, const entry_ref *addOn) 1032 { 1033 if (archive == NULL || id == NULL) 1034 1034 return B_ERROR; 1035 1035 … … 1042 1042 } else { 1043 1043 const char *signature; 1044 status_t status = icon->FindString("add_on", &signature);1044 status_t status = archive->FindString("add_on", &signature); 1045 1045 if (status == B_OK) { 1046 1046 BRoster roster; … … 1071 1071 1072 1072 *id = 999; 1073 if ( icon->what == B_ARCHIVED_OBJECT)1074 icon->what = 0;1075 1076 BRect originalBounds = icon->FindRect("_frame");1073 if (archive->what == B_ARCHIVED_OBJECT) 1074 archive->what = 0; 1075 1076 BRect originalBounds = archive->FindRect("_frame"); 1077 1077 // this is a work-around for buggy replicants that change their 1078 1078 // size in AttachedToWindow() (such as "SVM") 1079 1079 1080 1080 // !! check for name collisions? 1081 status = fShelf->AddReplicant( icon, BPoint(1, 1));1081 status = fShelf->AddReplicant(archive, BPoint(1, 1)); 1082 1082 if (status != B_OK) 1083 1083 return status; haiku/trunk/src/kits/interface/Shelf.cpp
r24429 r24621 1 1 /* 2 * Copyright 2001-200 7, Haiku.2 * Copyright 2001-2008, Haiku. 3 3 * Distributed under the terms of the MIT License. 4 4 * … … 1053 1053 1054 1054 BMessage archive('ARCV'); 1055 1055 1056 1056 for (int32 i = 0; i < fReplicants.CountItems(); i++) { 1057 1057 if (((replicant_data *)fReplicants.ItemAt(i))->Archive(&archive) == B_OK) … … 1162 1162 1163 1163 1164 //! Takes over ownership of \a data on success only 1164 1165 status_t 1165 1166 BShelf::_AddReplicant(BMessage *data, BPoint *location, uint32 uniqueID) … … 1203 1204 } 1204 1205 } 1205 1206 1206 1207 // Instantiate the object, if this fails we have a zombie 1207 1208 image_id image; … … 1222 1223 if (replicant == NULL) 1223 1224 return send_reply(data, B_ERROR, uniqueID); 1224 1225 1225 } else if (fDisplayZombies && fAllowZombies) 1226 1226 zombie = _CreateZombie(data, dragger);
