diff --git a/src/apps/deskbar/ResourceSet.cpp b/src/apps/deskbar/ResourceSet.cpp
index 6bbb33b..7fd0f29 100644
a
|
b
|
Except as contained in this notice, the name of Be Incorporated shall not be
|
26 | 26 | used in advertising or otherwise to promote the sale, use or other dealings in |
27 | 27 | this Software without prior written authorization from Be Incorporated. |
28 | 28 | |
29 | | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered trademarks |
30 | | of Be Incorporated in the United States and other countries. Other brand product |
31 | | names are registered trademarks or trademarks of their respective holders. |
| 29 | Tracker(TM), Be(R), BeOS(R), and BeIA(TM) are trademarks or registered |
| 30 | trademarks of Be Incorporated in the United States and other countries. Other |
| 31 | brand product names are registered trademarks or trademarks of their respective |
| 32 | holders. |
32 | 33 | All rights reserved. |
33 | 34 | */ |
34 | 35 | |
… |
… |
namespace TResourcePrivate {
|
70 | 71 | : fDeleteOK(false) |
71 | 72 | { |
72 | 73 | } |
73 | | |
| 74 | |
74 | 75 | virtual ~TypeObject() |
75 | 76 | { |
76 | 77 | if (!fDeleteOK) |
77 | 78 | debugger("deleting object owned by BResourceSet"); |
78 | 79 | } |
79 | | |
| 80 | |
80 | 81 | void Delete() |
81 | 82 | { |
82 | 83 | fDeleteOK = true; |
83 | 84 | } |
84 | | |
| 85 | |
85 | 86 | private: |
86 | 87 | TypeObject(const TypeObject &); |
87 | 88 | TypeObject &operator=(const TypeObject &); |
88 | 89 | bool operator==(const TypeObject &); |
89 | 90 | bool operator!=(const TypeObject &); |
90 | | |
| 91 | |
91 | 92 | bool fDeleteOK; |
92 | 93 | }; |
93 | | |
| 94 | |
94 | 95 | class BitmapTypeItem : public BBitmap, public TypeObject { |
95 | 96 | public: |
96 | 97 | BitmapTypeItem(BRect bounds, uint32 flags, color_space depth, |
97 | | int32 bytesPerRow=B_ANY_BYTES_PER_ROW, screen_id screenID |
| 98 | int32 bytesPerRow = B_ANY_BYTES_PER_ROW, screen_id screenID |
98 | 99 | = B_MAIN_SCREEN_ID) |
99 | 100 | : BBitmap(bounds, flags, depth, bytesPerRow, screenID) |
100 | 101 | { |
101 | 102 | } |
102 | | |
| 103 | |
103 | 104 | BitmapTypeItem(const BBitmap* source, bool accepts_views = false, |
104 | 105 | bool need_contiguous = false) |
105 | 106 | : BBitmap(source, accepts_views, need_contiguous) |
106 | 107 | { |
107 | 108 | } |
108 | | |
| 109 | |
109 | 110 | BitmapTypeItem(BMessage* data) |
110 | 111 | : BBitmap(data) |
111 | 112 | { |
112 | 113 | } |
113 | | |
| 114 | |
114 | 115 | virtual ~BitmapTypeItem() |
115 | 116 | { |
116 | 117 | } |
117 | 118 | }; |
118 | | |
| 119 | |
119 | 120 | class StringBlockTypeItem : public TStringBlock, public TypeObject { |
120 | 121 | public: |
121 | 122 | StringBlockTypeItem(BDataIO* data) |
122 | 123 | : TStringBlock(data) |
123 | 124 | { |
124 | 125 | } |
125 | | |
| 126 | |
126 | 127 | StringBlockTypeItem(const void* block, size_t size) |
127 | 128 | : TStringBlock(block, size) |
128 | 129 | { |
129 | 130 | } |
130 | | |
| 131 | |
131 | 132 | virtual ~StringBlockTypeItem() |
132 | 133 | { |
133 | 134 | } |
134 | 135 | }; |
135 | | |
| 136 | |
136 | 137 | class TypeItem { |
137 | 138 | public: |
138 | 139 | TypeItem(int32 id, const char* name, const void* data, size_t size) |
139 | | : fID(id), fName(name), |
140 | | fData(const_cast<void*>(data)), fSize(size), fObject(0), |
141 | | fOwnData(false), fSourceIsFile(false) |
| 140 | : fID(id), fName(name), |
| 141 | fData(const_cast<void*>(data)), fSize(size), fObject(0), |
| 142 | fOwnData(false), fSourceIsFile(false) |
142 | 143 | { |
143 | 144 | } |
144 | | |
| 145 | |
145 | 146 | TypeItem(int32 id, const char* name, BFile* file) |
146 | 147 | : fID(id), |
147 | 148 | fName(name), |
… |
… |
namespace TResourcePrivate {
|
162 | 163 | } |
163 | 164 | } |
164 | 165 | } |
165 | | |
| 166 | |
166 | 167 | virtual ~TypeItem() |
167 | 168 | { |
168 | 169 | if (fOwnData) { |
… |
… |
namespace TResourcePrivate {
|
172 | 173 | } |
173 | 174 | SetObject(NULL); |
174 | 175 | } |
175 | | |
| 176 | |
176 | 177 | int32 ID() const |
177 | | { return fID; } |
| 178 | { |
| 179 | return fID; |
| 180 | } |
178 | 181 | |
179 | 182 | const char* Name() const |
180 | | { return fName.String(); } |
| 183 | { |
| 184 | return fName.String(); |
| 185 | } |
181 | 186 | |
182 | 187 | const void* Data() const |
183 | | { return fData; } |
| 188 | { |
| 189 | return fData; |
| 190 | } |
184 | 191 | |
185 | 192 | size_t Size() const |
186 | | { return fSize; } |
187 | | |
| 193 | { |
| 194 | return fSize; |
| 195 | } |
| 196 | |
188 | 197 | void SetObject(TypeObject* object) |
189 | 198 | { |
190 | 199 | if (object == fObject) |
… |
… |
namespace TResourcePrivate {
|
195 | 204 | } |
196 | 205 | |
197 | 206 | TypeObject* Object() const |
198 | | { return fObject; } |
199 | | |
| 207 | { |
| 208 | return fObject; |
| 209 | } |
| 210 | |
200 | 211 | void SetSourceIsFile(bool state) |
201 | | { fSourceIsFile = state; } |
| 212 | { |
| 213 | fSourceIsFile = state; |
| 214 | } |
202 | 215 | |
203 | 216 | bool SourceIsFile() const |
204 | | { return fSourceIsFile; } |
205 | | |
| 217 | { |
| 218 | return fSourceIsFile; |
| 219 | } |
| 220 | |
206 | 221 | private: |
207 | 222 | int32 fID; |
208 | 223 | BString fName; |
… |
… |
namespace TResourcePrivate {
|
212 | 227 | bool fOwnData; |
213 | 228 | bool fSourceIsFile; |
214 | 229 | }; |
215 | | |
| 230 | |
216 | 231 | static bool FreeTypeItemFunc(void* item) |
217 | 232 | { |
218 | 233 | delete reinterpret_cast<TypeItem*>(item); |
… |
… |
namespace TResourcePrivate {
|
225 | 240 | : fType(type) |
226 | 241 | { |
227 | 242 | } |
228 | | |
| 243 | |
229 | 244 | virtual ~TypeList() |
230 | 245 | { |
231 | 246 | fItems.DoForEach(FreeTypeItemFunc); |
232 | 247 | fItems.MakeEmpty(); |
233 | 248 | } |
234 | | |
| 249 | |
235 | 250 | type_code Type() const |
236 | | { return fType; } |
237 | | |
| 251 | { |
| 252 | return fType; |
| 253 | } |
| 254 | |
238 | 255 | TypeItem* FindItemByID(int32 id) |
239 | 256 | { |
240 | 257 | for (int32 i = 0; i < fItems.CountItems(); i++ ) { |
… |
… |
namespace TResourcePrivate {
|
254 | 271 | } |
255 | 272 | return NULL; |
256 | 273 | } |
257 | | |
| 274 | |
258 | 275 | void AddItem(TypeItem* item) |
259 | 276 | { |
260 | 277 | fItems.AddItem(item); |
261 | 278 | } |
262 | | |
| 279 | |
263 | 280 | private: |
264 | 281 | type_code fType; |
265 | 282 | BList fItems; |
266 | 283 | }; |
267 | | |
268 | 284 | } |
269 | 285 | |
270 | 286 | using namespace TResourcePrivate; |
… |
… |
TStringBlock::TStringBlock(BDataIO* data)
|
282 | 298 | fStrings = (char*)malloc(1024); |
283 | 299 | size_t pos = 0; |
284 | 300 | ssize_t amount; |
285 | | while ((amount=data->Read(fStrings + pos, 1024)) == 1024) { |
| 301 | while ((amount = data->Read(fStrings + pos, 1024)) == 1024) { |
286 | 302 | pos += amount; |
287 | 303 | fStrings = (char*)realloc(fStrings, pos + 1024); |
288 | 304 | } |
289 | 305 | if (amount > 0) |
290 | 306 | pos += amount; |
291 | | |
| 307 | |
292 | 308 | fNumEntries = PreIndex(fStrings, amount); |
293 | 309 | fIndex = (size_t*)malloc(sizeof(size_t) * fNumEntries); |
294 | 310 | MakeIndex(fStrings, amount, fNumEntries, fIndex); |
… |
… |
TStringBlock::TStringBlock(const void* block, size_t size)
|
304 | 320 | { |
305 | 321 | fIndex = (size_t*)const_cast<void*>(block); |
306 | 322 | fStrings = (char*)const_cast<void*>(block); |
307 | | |
| 323 | |
308 | 324 | // Figure out how many entries there are. |
309 | 325 | size_t last_off = 0; |
310 | 326 | while (fIndex[fNumEntries] > last_off && fIndex[fNumEntries] < size ) { |
… |
… |
size_t
|
339 | 355 | TStringBlock::PreIndex(char* strings, ssize_t len) |
340 | 356 | { |
341 | 357 | size_t count = 0; |
342 | | |
343 | 358 | char* orig = strings; |
344 | 359 | char* end = strings + len; |
345 | 360 | bool in_cr = false; |
346 | 361 | bool first = true; |
347 | 362 | bool skipping = false; |
| 363 | |
348 | 364 | while (orig < end) { |
349 | 365 | if (*orig == '\n' || *orig == '\r' || *orig == 0) { |
350 | 366 | if (!in_cr && *orig == '\r') |
… |
… |
TStringBlock::PreIndex(char* strings, ssize_t len)
|
371 | 387 | case '\\': |
372 | 388 | *strings = '\\'; |
373 | 389 | break; |
374 | | |
| 390 | |
375 | 391 | case '\n': |
376 | 392 | *strings = '\n'; |
377 | 393 | break; |
378 | | |
| 394 | |
379 | 395 | case '\r': |
380 | 396 | *strings = '\r'; |
381 | 397 | break; |
382 | | |
| 398 | |
383 | 399 | case '\t': |
384 | 400 | *strings = '\t'; |
385 | 401 | break; |
386 | | |
| 402 | |
387 | 403 | default: |
388 | 404 | *strings = *orig; |
389 | 405 | break; |
390 | 406 | } |
391 | | } else |
| 407 | } else |
392 | 408 | *strings = *orig; |
393 | 409 | |
394 | 410 | orig++; |
395 | 411 | strings++; |
396 | 412 | } |
397 | | |
398 | 413 | return count; |
399 | 414 | } |
400 | 415 | |
… |
… |
TStringBlock::MakeIndex(const char* strings, ssize_t len,
|
405 | 420 | { |
406 | 421 | *resultingIndex++ = 0; |
407 | 422 | indexLength--; |
408 | | |
| 423 | |
409 | 424 | ssize_t pos = 0; |
410 | 425 | while (pos < len && indexLength > 0) { |
411 | 426 | if (strings[pos] == 0 ) { |
… |
… |
TResourceSet::AddResources(BResources* RESOURCES_ONLY(resources))
|
475 | 490 | #if USE_RESOURCES |
476 | 491 | if (!resources) |
477 | 492 | return B_BAD_VALUE; |
478 | | |
| 493 | |
479 | 494 | BAutolock lock(&fLock); |
480 | 495 | status_t err = fResources.AddItem(resources) ? B_OK : B_ERROR; |
481 | 496 | if (err != B_OK) |
… |
… |
TResourceSet::AddDirectory(const char* fullPath)
|
499 | 514 | delete path; |
500 | 515 | return err; |
501 | 516 | } |
502 | | |
| 517 | |
503 | 518 | BAutolock lock(&fLock); |
504 | 519 | err = fDirectories.AddItem(path) ? B_OK : B_ERROR; |
505 | 520 | if (err != B_OK) |
… |
… |
TResourceSet::AddEnvDirectory(const char* in, const char* defaultValue)
|
514 | 529 | { |
515 | 530 | BString buf; |
516 | 531 | status_t err = ExpandString(&buf, in); |
517 | | |
| 532 | |
518 | 533 | if (err != B_OK) { |
519 | 534 | if (defaultValue) |
520 | 535 | return AddDirectory(defaultValue); |
521 | 536 | return err; |
522 | 537 | } |
523 | | |
| 538 | |
524 | 539 | return AddDirectory(buf.String()); |
525 | 540 | } |
526 | 541 | |
… |
… |
status_t
|
529 | 544 | TResourceSet::ExpandString(BString* out, const char* in) |
530 | 545 | { |
531 | 546 | const char* start = in; |
| 547 | |
532 | 548 | while (*in) { |
533 | 549 | if (*in == '$') { |
534 | 550 | if (start < in) |
535 | | out->Append(start, (int32)(in - start)); |
536 | | |
| 551 | out->Append(start, (int32)(in - start)); |
| 552 | |
537 | 553 | in++; |
538 | 554 | char variableName[1024]; |
539 | 555 | size_t i = 0; |
… |
… |
TResourceSet::ExpandString(BString* out, const char* in)
|
545 | 561 | if (*in) |
546 | 562 | in++; |
547 | 563 | |
548 | | } else |
549 | | while ((isalnum(*in) || *in == '_') && i |
550 | | < sizeof(variableName) - 1) |
| 564 | } else { |
| 565 | while ((isalnum(*in) || *in == '_') |
| 566 | && i < sizeof(variableName) - 1) |
551 | 567 | variableName[i++] = *in++; |
552 | | |
| 568 | } |
| 569 | |
553 | 570 | start = in; |
554 | | |
555 | 571 | variableName[i] = '\0'; |
556 | | |
| 572 | |
557 | 573 | const char* val = getenv(variableName); |
558 | 574 | if (!val) { |
559 | 575 | PRINT(("Error: env var %s not found.\n", &variableName[0])); |
560 | 576 | return B_NAME_NOT_FOUND; |
561 | 577 | } |
562 | | |
| 578 | |
563 | 579 | status_t err = ExpandString(out, val); |
564 | 580 | if (err != B_OK) |
565 | 581 | return err; |
566 | | |
| 582 | |
567 | 583 | } else if (*in == '\\') { |
568 | 584 | if (start < in) |
569 | 585 | out->Append(start, (int32)(in - start)); |
… |
… |
TResourceSet::ExpandString(BString* out, const char* in)
|
576 | 592 | |
577 | 593 | if (start < in) |
578 | 594 | out->Append(start, (int32)(in - start)); |
579 | | |
| 595 | |
580 | 596 | return B_OK; |
581 | 597 | } |
582 | 598 | |
… |
… |
const void*
|
585 | 601 | TResourceSet::FindResource(type_code type, int32 id, size_t* outSize) |
586 | 602 | { |
587 | 603 | TypeItem* item = FindItemID(type, id); |
588 | | |
| 604 | |
589 | 605 | if (outSize) |
590 | 606 | *outSize = item ? item->Size() : 0; |
591 | 607 | |
… |
… |
const void*
|
597 | 613 | TResourceSet::FindResource(type_code type, const char* name, size_t* outSize) |
598 | 614 | { |
599 | 615 | TypeItem* item = FindItemName(type, name); |
600 | | |
| 616 | |
601 | 617 | if (outSize) |
602 | 618 | *outSize = item ? item->Size() : 0; |
603 | 619 | |
… |
… |
TResourceSet::FindStringBlock(type_code type, const char* name)
|
632 | 648 | return ReturnStringBlockItem(FindItemName(type, name)); |
633 | 649 | } |
634 | 650 | |
635 | | |
| 651 | |
636 | 652 | const char* |
637 | 653 | TResourceSet::FindString(type_code type, int32 id, uint32 index) |
638 | 654 | { |
639 | 655 | const TStringBlock* stringBlock = FindStringBlock(type, id); |
| 656 | |
640 | 657 | if (!stringBlock) |
641 | 658 | return NULL; |
642 | 659 | |
… |
… |
const char*
|
648 | 665 | TResourceSet::FindString(type_code type, const char* name, uint32 index) |
649 | 666 | { |
650 | 667 | const TStringBlock* stringBlock = FindStringBlock(type, name); |
| 668 | |
651 | 669 | if (!stringBlock) |
652 | 670 | return NULL; |
653 | 671 | |
654 | 672 | return stringBlock->String(index); |
655 | 673 | } |
656 | 674 | |
657 | | |
| 675 | |
658 | 676 | TypeList* |
659 | 677 | TResourceSet::FindTypeList(type_code type) |
660 | 678 | { |
661 | 679 | BAutolock lock(&fLock); |
662 | | |
| 680 | |
663 | 681 | int32 count = fTypes.CountItems(); |
664 | 682 | for (int32 i = 0; i < count; i++ ) { |
665 | 683 | TypeList* list = (TypeList*)fTypes.ItemAt(i); |
666 | 684 | if (list && list->Type() == type) |
667 | 685 | return list; |
668 | 686 | } |
669 | | |
| 687 | |
670 | 688 | return NULL; |
671 | 689 | } |
672 | 690 | |
… |
… |
TResourceSet::FindItemID(type_code type, int32 id)
|
676 | 694 | { |
677 | 695 | TypeList* list = FindTypeList(type); |
678 | 696 | TypeItem* item = NULL; |
679 | | |
680 | | if (list) item = list->FindItemByID(id); |
681 | | |
| 697 | |
| 698 | if (list) |
| 699 | item = list->FindItemByID(id); |
| 700 | |
682 | 701 | if (!item) |
683 | 702 | item = LoadResource(type, id, 0, &list); |
684 | | |
| 703 | |
685 | 704 | return item; |
686 | 705 | } |
687 | 706 | |
… |
… |
TResourceSet::FindItemName(type_code type, const char* name)
|
691 | 710 | { |
692 | 711 | TypeList* list = FindTypeList(type); |
693 | 712 | TypeItem* item = NULL; |
694 | | |
| 713 | |
695 | 714 | if (list) |
696 | 715 | item = list->FindItemByName(name); |
697 | | |
| 716 | |
698 | 717 | if (!item) |
699 | 718 | item = LoadResource(type, -1, name, &list); |
700 | | |
| 719 | |
701 | 720 | return item; |
702 | 721 | } |
703 | 722 | |
… |
… |
TResourceSet::LoadResource(type_code type, int32 id, const char* name,
|
707 | 726 | TypeList** inOutList) |
708 | 727 | { |
709 | 728 | TypeItem* item = NULL; |
710 | | |
| 729 | |
711 | 730 | if (name) { |
712 | 731 | BEntry entry; |
713 | | |
| 732 | |
714 | 733 | // If a named resource, first look in directories. |
715 | 734 | fLock.Lock(); |
716 | 735 | int32 count = fDirectories.CountItems(); |
… |
… |
TResourceSet::LoadResource(type_code type, int32 id, const char* name,
|
731 | 750 | } |
732 | 751 | fLock.Unlock(); |
733 | 752 | } |
734 | | |
| 753 | |
735 | 754 | #if USE_RESOURCES |
736 | 755 | if (!item) { |
737 | 756 | // Look through resource objects for data. |
… |
… |
TResourceSet::LoadResource(type_code type, int32 id, const char* name,
|
746 | 765 | data = resource->LoadResource(type, id, &size); |
747 | 766 | else if (name != NULL) |
748 | 767 | data = resource->LoadResource(type, name, &size); |
749 | | |
| 768 | |
750 | 769 | if (data && size) { |
751 | 770 | item = new TypeItem(id, name, data, size); |
752 | 771 | item->SetSourceIsFile(false); |
… |
… |
TResourceSet::ReturnBitmapItem(type_code, TypeItem* from)
|
787 | 806 | { |
788 | 807 | if (!from) |
789 | 808 | return NULL; |
790 | | |
| 809 | |
791 | 810 | TypeObject* obj = from->Object(); |
792 | 811 | BitmapTypeItem* bitmap = dynamic_cast<BitmapTypeItem*>(obj); |
793 | 812 | if (bitmap) |
… |
… |
TResourceSet::ReturnBitmapItem(type_code, TypeItem* from)
|
803 | 822 | // Try to read as an archived bitmap. |
804 | 823 | stream.Seek(0, SEEK_SET); |
805 | 824 | BMessage archive; |
806 | | if (archive.Unflatten(&stream) == B_OK ) { |
| 825 | if (archive.Unflatten(&stream) == B_OK) { |
807 | 826 | bitmap = new BitmapTypeItem(&archive); |
808 | 827 | if (bitmap && bitmap->InitCheck() != B_OK) { |
809 | | bitmap->Delete(); // allows us to delete this bitmap... |
| 828 | bitmap->Delete(); |
| 829 | // allows us to delete this bitmap... |
810 | 830 | delete bitmap; |
811 | 831 | bitmap = NULL; |
812 | 832 | } |
… |
… |
TResourceSet::ReturnBitmapItem(type_code, TypeItem* from)
|
815 | 835 | if (bitmap) { |
816 | 836 | BAutolock lock(&fLock); |
817 | 837 | if (from->Object() != NULL) { |
818 | | // Whoops! Someone snuck in under us. |
| 838 | // Whoops! Someone snuck in under us. |
819 | 839 | bitmap->Delete(); |
820 | 840 | delete bitmap; |
821 | 841 | bitmap = dynamic_cast<BitmapTypeItem*>(from->Object()); |
822 | | } else |
| 842 | } else |
823 | 843 | from->SetObject(bitmap); |
824 | 844 | } |
825 | 845 | |
… |
… |
TResourceSet::ReturnStringBlockItem(TypeItem* from)
|
832 | 852 | { |
833 | 853 | if (!from) |
834 | 854 | return NULL; |
835 | | |
| 855 | |
836 | 856 | TypeObject* obj = from->Object(); |
837 | 857 | StringBlockTypeItem* stringBlock = dynamic_cast<StringBlockTypeItem*>(obj); |
838 | 858 | if (stringBlock) |
839 | 859 | return stringBlock; |
840 | | |
| 860 | |
841 | 861 | // Can't change an existing object. |
842 | 862 | if (obj) |
843 | 863 | return NULL; |
844 | | |
| 864 | |
845 | 865 | // Don't have a string block in the item -- we'll create one. |
846 | 866 | if (from->SourceIsFile() ) { |
847 | 867 | BMemoryIO stream(from->Data(), from->Size()); |
848 | 868 | stringBlock = new StringBlockTypeItem(&stream); |
849 | 869 | } else |
850 | 870 | stringBlock = new StringBlockTypeItem(from->Data(), from->Size()); |
851 | | |
| 871 | |
852 | 872 | if (stringBlock) { |
853 | 873 | BAutolock lock(&fLock); |
854 | 874 | if (from->Object() != NULL) { |
855 | | // Whoops! Someone snuck in under us. |
| 875 | // Whoops! Someone snuck in under us. |
856 | 876 | delete stringBlock; |
857 | 877 | stringBlock = dynamic_cast<StringBlockTypeItem*>(from->Object()); |
858 | 878 | } else |
859 | 879 | from->SetObject(stringBlock); |
860 | 880 | } |
861 | | |
| 881 | |
862 | 882 | return stringBlock; |
863 | 883 | } |
864 | 884 | |
… |
… |
TResourceSet::ReturnStringBlockItem(TypeItem* from)
|
867 | 887 | |
868 | 888 | |
869 | 889 | namespace TResourcePrivate { |
870 | | |
871 | 890 | TResourceSet* gResources = NULL; |
872 | 891 | BLocker gResourceLocker; |
873 | | |
874 | 892 | } |
875 | 893 | |
876 | 894 | |
… |
… |
AppResSet()
|
880 | 898 | // If already have it, return immediately. |
881 | 899 | if (gResources) |
882 | 900 | return gResources; |
883 | | |
| 901 | |
884 | 902 | // Don't have 'em, lock access to make 'em. |
885 | 903 | if (!gResourceLocker.Lock()) |
886 | 904 | return NULL; |
… |
… |
AppResSet()
|
889 | 907 | gResourceLocker.Unlock(); |
890 | 908 | return gResources; |
891 | 909 | } |
892 | | |
| 910 | |
893 | 911 | // Make 'em. |
894 | 912 | gResources = new TResourceSet; |
895 | 913 | gResources->AddResources(BApplication::AppResources()); |