Ticket #2185: HWindow.cpp.diff
File HWindow.cpp.diff, 1.4 KB (added by , 16 years ago) |
---|
-
src/preferences/sounds/HWindow.cpp
35 35 #include <fs_attr.h> 36 36 #include <stdio.h> 37 37 #include <Sound.h> 38 #include <FindDirectory.h> 38 39 39 40 /*********************************************************** 40 41 * Constructor … … 330 331 menu->AddItem(new BMenuItem(path.Leaf(), msg), 0); 331 332 } 332 333 333 BPath path ("/boot/beos/etc/sounds");334 status_t err = B_OK;334 BPath path; 335 status_t err = find_directory(B_BEOS_SOUNDS_DIRECTORY, &path); 335 336 BDirectory dir( path.Path() ); 336 337 BEntry entry; 337 338 BPath item_path; … … 351 352 msg->AddRef("refs", &ref); 352 353 menu->AddItem(new BMenuItem(item_path.Leaf(), msg), 0); 353 354 } 354 355 path.SetTo("/boot/home/config/sounds");355 356 err = find_directory(B_USER_SOUNDS_DIRECTORY, &path); 356 357 dir.SetTo(path.Path()); 357 err = B_OK;358 358 while (err == B_OK) { 359 359 err = dir.GetNextEntry((BEntry *)&entry, true); 360 360 if (entry.InitCheck() != B_NO_ERROR) { … … 372 372 msg->AddRef("refs", &ref); 373 373 menu->AddItem(new BMenuItem(item_path.Leaf(), msg), 0); 374 374 } 375 376 path.SetTo("/boot/home/media");375 376 err = find_directory(B_COMMON_SOUNDS_DIRECTORY, &path); 377 377 dir.SetTo(path.Path()); 378 err = B_OK;379 378 while (err == B_OK) { 380 379 err = dir.GetNextEntry((BEntry *)&entry, true); 381 380 if (entry.InitCheck() != B_NO_ERROR) {