diff --git a/build/jam/HaikuImage b/build/jam/HaikuImage
index 84af617..409edf3 100644
a
|
b
|
AddFilesToHaikuImage system add-ons media : $(SYSTEM_ADD_ONS_MEDIA) ;
|
648 | 648 | AddFilesToHaikuImage system add-ons media plugins |
649 | 649 | : $(SYSTEM_ADD_ONS_MEDIA_PLUGINS) ; |
650 | 650 | AddFilesToHaikuImage system add-ons Tracker |
651 | | : FileType-F Mark\ as… Mark\ as\ Read-R Open\ Target\ Folder-O |
652 | | Open\ Terminal-T ZipOMatic-Z ; |
| 651 | : FileType Mark\ as… Mark\ as\ Read Open\ Target\ Folder |
| 652 | Open\ Terminal ZipOMatic ; |
653 | 653 | AddSymlinkToHaikuImage system add-ons Tracker |
654 | | : /boot/system/preferences/Backgrounds : Background-B ; |
| 654 | : /boot/system/preferences/Backgrounds : Background ; |
655 | 655 | AddSymlinkToHaikuImage system add-ons Tracker |
656 | | : /boot/system/apps/TextSearch : TextSearch-G ; |
| 656 | : /boot/system/apps/TextSearch : TextSearch ; |
657 | 657 | AddSymlinkToHaikuImage system add-ons Tracker |
658 | | : /boot/system/apps/DiskUsage : DiskUsage-I ; |
| 658 | : /boot/system/apps/DiskUsage : DiskUsage ; |
| 659 | AddAttributeToHaikuImage system add-ons Tracker |
| 660 | : Background : string : _trk/shortcut : B ; |
| 661 | AddAttributeToHaikuImage system add-ons Tracker |
| 662 | : TextSearch : string : _trk/shortcut : G ; |
| 663 | AddAttributeToHaikuImage system add-ons Tracker |
| 664 | : DiskUsage : string : _trk/shortcut : I ; |
| 665 | AddAttributeToHaikuImage system add-ons Tracker |
| 666 | : FileType : string : _trk/shortcut : F ; |
| 667 | AddAttributeToHaikuImage system add-ons Tracker |
| 668 | : Open\ Terminal : string : _trk/shortcut : T ; |
| 669 | AddAttributeToHaikuImage system add-ons Tracker |
| 670 | : Open\ Target\ Folder : string : _trk/shortcut : O ; |
| 671 | AddAttributeToHaikuImage system add-ons Tracker |
| 672 | : Mark\ as\ Read : string : _trk/shortcut : R ; |
| 673 | AddAttributeToHaikuImage system add-ons Tracker |
| 674 | : ZipOMatic : string : _trk/shortcut : Z ; |
659 | 675 | AddFilesToHaikuImage system add-ons input_server devices |
660 | 676 | : <input>keyboard <input>mouse <input>tablet <input>wacom ; |
661 | 677 | AddFilesToHaikuImage system add-ons input_server filters |
diff --git a/build/jam/ImageRules b/build/jam/ImageRules
index dea629b..3ec27a1 100644
a
|
b
|
rule FFilesInContainerDirectory container : directoryTokens
|
216 | 216 | return ; |
217 | 217 | } |
218 | 218 | |
| 219 | rule AddAttributeToContainer container : directoryTokens : file : attrType |
| 220 | : attrName : value |
| 221 | { |
| 222 | local containerGrist = |
| 223 | [ on $(HAIKU_IMAGE_CONTAINER_NAME) return $(HAIKU_CONTAINER_GRIST) ] ; |
| 224 | |
| 225 | local directory = [ AddDirectoryToContainer $(container) |
| 226 | : $(directoryTokens) ] ; |
| 227 | |
| 228 | directory = $(directory:G=$(containerGrist)) ; |
| 229 | |
| 230 | local attribute = $(directory)/$(file) ; |
| 231 | ATTR_NAME on $(attribute) = $(attrName) ; |
| 232 | ATTR_TYPE on $(attribute) = $(attrType) ; |
| 233 | ATTR_VALUE on $(attribute) = $(value) ; |
| 234 | ATTRIBUTES_TO_INSTALL on $(directory) += $(attribute) ; |
| 235 | } |
| 236 | |
219 | 237 | rule AddSymlinkToContainer container : directoryTokens : linkTarget : linkName |
220 | 238 | { |
221 | 239 | # AddSymlinkToContainer <container> : <directory> : <link target> |
… |
… |
rule CreateContainerCopyFilesScript container : script
|
550 | 568 | AddDirectoryToContainerCopyFilesScript $(targetDir) |
551 | 569 | : $(initScript) ; |
552 | 570 | } |
| 571 | |
| 572 | local attributes = [ on $(dir) return $(ATTRIBUTES_TO_INSTALL) ] ; |
| 573 | local attribute ; |
| 574 | for attribute in $(attributes) { |
| 575 | Depends $(script) : $(attribute) ; |
| 576 | Depends $(attribute) : $(initScript) $(serializationDependency) ; |
| 577 | AddAttributeToContainerCopyFilesScript $(attribute) |
| 578 | : $(initScript) ; |
| 579 | } |
553 | 580 | } |
554 | 581 | } |
555 | 582 | |
… |
… |
actions AddSymlinkToContainerCopyFilesScript
|
573 | 600 | echo \$ln -sfn "\"$(SYMLINK_TARGET)\"" "\"\${tPrefix}$(1:G=)\"" >> $(2[1]) |
574 | 601 | } |
575 | 602 | |
| 603 | actions AddAttributeToContainerCopyFilesScript |
| 604 | { |
| 605 | echo tempAttrs=\"\$tmpDir/$(1:B)\" >> $(2[1]) |
| 606 | echo \$rmAttrs -f \"\$tempAttrs\" >> $(2[1]) |
| 607 | echo touch \"\$tempAttrs\" >> $(2[1]) |
| 608 | echo \$addattr -t $(ATTR_TYPE) $(ATTR_NAME) $(ATTR_VALUE) \"\$tempAttrs\" >> $(2[1]) |
| 609 | echo \$copyAttrs \"\${sPrefix}\$tempAttrs\" "\"\${tPrefix}$(1:G=)\"" >> $(2[1]) |
| 610 | } |
576 | 611 | |
577 | 612 | actions AddDirectoryToContainerCopyFilesScript |
578 | 613 | { |
… |
… |
rule AddSymlinkToHaikuImage directoryTokens : linkTarget : linkName
|
693 | 728 | : $(linkTarget) : $(linkName) ; |
694 | 729 | } |
695 | 730 | |
| 731 | rule AddAttributeToHaikuImage directoryTokens : file : attrType : attrName : value |
| 732 | { |
| 733 | AddAttributeToContainer $(HAIKU_IMAGE_CONTAINER_NAME) : $(directoryTokens) |
| 734 | : $(file) : $(attrType) : $(attrName) : $(value) ; |
| 735 | } |
| 736 | |
696 | 737 | rule FSymlinksInHaikuImageDirectory directoryTokens |
697 | 738 | { |
698 | 739 | return [ FSymlinksInContainerDirectory $(HAIKU_IMAGE_CONTAINER_NAME) |
diff --git a/src/add-ons/tracker/filetype/Jamfile b/src/add-ons/tracker/filetype/Jamfile
index 8ca0227..f2209a6 100644
a
|
b
|
SubDir HAIKU_TOP src add-ons tracker filetype ;
|
3 | 3 | SetSubDirSupportedPlatformsBeOSCompatible ; |
4 | 4 | |
5 | 5 | # TODO: does not seem to work: |
6 | | AddResources FileType-F : FileType.rdef ; |
| 6 | AddResources FileType : FileType.rdef ; |
7 | 7 | |
8 | | Addon FileType-F : |
| 8 | Addon FileType : |
9 | 9 | FileType.cpp |
10 | 10 | |
11 | 11 | : be tracker |
diff --git a/src/add-ons/tracker/mark_as/Jamfile b/src/add-ons/tracker/mark_as/Jamfile
index 0a22ea1..f8492aa 100644
a
|
b
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
5 | 5 | UsePrivateHeaders mail ; |
6 | 6 | |
7 | 7 | AddResources Mark\ as… : MarkAs.rdef ; |
8 | | AddResources Mark\ as\ Read-R : MarkAsRead.rdef ; |
| 8 | AddResources Mark\ as\ Read : MarkAsRead.rdef ; |
9 | 9 | |
10 | 10 | Addon Mark\ as… : |
11 | 11 | MarkAs.cpp |
12 | 12 | : be tracker $(TARGET_LIBSUPC++) libmail.so |
13 | 13 | ; |
14 | 14 | |
15 | | Addon Mark\ as\ Read-R : |
| 15 | Addon Mark\ as\ Read : |
16 | 16 | MarkAsRead.cpp |
17 | 17 | : be tracker $(TARGET_LIBSUPC++) libmail.so |
18 | 18 | ; |
diff --git a/src/add-ons/tracker/opentargetfolder/Jamfile b/src/add-ons/tracker/opentargetfolder/Jamfile
index c44dfd8..0fcc931 100644
a
|
b
|
|
1 | 1 | SubDir HAIKU_TOP src add-ons tracker opentargetfolder ; |
2 | 2 | |
3 | | Application Open\ Target\ Folder-O : |
| 3 | Application Open\ Target\ Folder : |
4 | 4 | opentargetfolder.cpp |
5 | 5 | |
6 | 6 | : be tracker $(TARGET_LIBSUPC++) |
diff --git a/src/add-ons/tracker/openterminal/Jamfile b/src/add-ons/tracker/openterminal/Jamfile
index 63f6c26..93a8d35 100644
a
|
b
|
SubDir HAIKU_TOP src add-ons tracker openterminal ;
|
2 | 2 | |
3 | 3 | SetSubDirSupportedPlatformsBeOSCompatible ; |
4 | 4 | |
5 | | AddResources Open\ Terminal-T : OpenTerminal.rdef ; |
| 5 | AddResources Open\ Terminal : OpenTerminal.rdef ; |
6 | 6 | |
7 | | Addon Open\ Terminal-T : |
| 7 | Addon Open\ Terminal : |
8 | 8 | OpenTerminal.cpp |
9 | 9 | |
10 | 10 | : be tracker $(TARGET_LIBSTDC++) |
diff --git a/src/add-ons/tracker/zipomatic/Jamfile b/src/add-ons/tracker/zipomatic/Jamfile
index f974e05..4c84ea6 100644
a
|
b
|
SubDir HAIKU_TOP src add-ons tracker zipomatic ;
|
2 | 2 | |
3 | 3 | UsePrivateHeaders shared ; |
4 | 4 | |
5 | | Application ZipOMatic-Z : |
| 5 | Application ZipOMatic : |
6 | 6 | GenericThread.cpp |
7 | 7 | ZipOMatic.cpp |
8 | 8 | ZipOMaticActivity.cpp |
… |
… |
Application ZipOMatic-Z :
|
13 | 13 | : ZipOMatic.rdef |
14 | 14 | ; |
15 | 15 | |
16 | | DoCatalogs ZipOMatic-Z : |
| 16 | DoCatalogs ZipOMatic : |
17 | 17 | x-vnd.haiku.zip-o-matic |
18 | 18 | : |
19 | 19 | ZipOMatic.cpp |
diff --git a/src/apps/diskusage/Jamfile b/src/apps/diskusage/Jamfile
index 37d3eff..b046505 100644
a
|
b
|
DoCatalogs DiskUsage :
|
28 | 28 | StatusView.cpp |
29 | 29 | VolumeView.cpp |
30 | 30 | ; |
31 | | |
diff --git a/src/kits/tracker/Attributes.h b/src/kits/tracker/Attributes.h
index b79f2eb..597a221 100644
a
|
b
|
namespace BPrivate {
|
51 | 51 | #define kAttrAppVersion "_trk/app_version" |
52 | 52 | #define kAttrSystemVersion "_trk/system_version" |
53 | 53 | #define kAttrOpenWithRelation "_trk/open_with_relation" |
| 54 | #define kAttrShortcut "_trk/shortcut" |
54 | 55 | |
55 | 56 | // private attributes |
56 | 57 | #define kAttrWindowFrame "_trk/windframe" |
diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp
index c2380b2..017f941 100644
a
|
b
|
BContainerWindow::BContainerWindow(LockingList<BWindow>* list,
|
577 | 577 | fIsTrash(false), |
578 | 578 | fInTrash(false), |
579 | 579 | fIsPrinters(false), |
| 580 | fIsAddons(false), |
580 | 581 | fContainerWindowFlags(containerWindowFlags), |
581 | 582 | fBackgroundImage(NULL), |
582 | 583 | fSavedZoomRect(0, 0, -1, -1), |
… |
… |
BContainerWindow::UpdateIfTrash(Model* model)
|
766 | 767 | fIsTrash = model->IsTrash(); |
767 | 768 | fInTrash = FSInTrashDir(model->EntryRef()); |
768 | 769 | fIsPrinters = FSIsPrintersDir(&entry); |
| 770 | fIsAddons = FSIsAddonsDir(&entry); |
769 | 771 | } |
770 | 772 | } |
771 | 773 | |
… |
… |
BContainerWindow::EachAddon(BPath &path, bool (*eachAddon)(const Model*,
|
3011 | 3013 | } |
3012 | 3014 | } |
3013 | 3015 | |
| 3016 | BNode node(model->EntryRef()); |
| 3017 | uint32 key = '\0'; |
3014 | 3018 | char name[B_FILE_NAME_LENGTH]; |
3015 | | uint32 key; |
3016 | | StripShortcut(model, name, key); |
| 3019 | if (node.ReadAttr(kAttrShortcut, |
| 3020 | B_CHAR_TYPE, 0, &key, 1) > 0) { |
| 3021 | strlcpy(name, model->Name(), B_FILE_NAME_LENGTH); |
| 3022 | } else |
| 3023 | StripShortcut(model, name, key); |
3017 | 3024 | |
3018 | 3025 | // do a uniqueness check |
3019 | 3026 | if (uniqueList->EachElement(MatchOne, name)) { |
… |
… |
BContainerWindow::NewAttributeMenu(BMenu* menu)
|
3354 | 3361 | B_STRING_TYPE, 225, B_ALIGN_LEFT, false, false)); |
3355 | 3362 | } |
3356 | 3363 | |
| 3364 | if (IsAddonsDir()) { |
| 3365 | menu->AddItem(NewAttributeMenuItem(B_TRANSLATE("Shortcut"), |
| 3366 | kAttrShortcut, B_CHAR_TYPE, 60, B_ALIGN_LEFT, true, |
| 3367 | false)); |
| 3368 | } |
| 3369 | |
3357 | 3370 | #ifdef OWNER_GROUP_ATTRIBUTES |
3358 | 3371 | menu->AddItem(NewAttributeMenuItem(B_TRANSLATE("Owner"), kAttrStatOwner, |
3359 | 3372 | B_STRING_TYPE, 60, B_ALIGN_LEFT, false, true)); |
diff --git a/src/kits/tracker/ContainerWindow.h b/src/kits/tracker/ContainerWindow.h
index 138d4f6..9ab4097 100644
a
|
b
|
class BContainerWindow : public BWindow {
|
116 | 116 | bool IsTrash() const; |
117 | 117 | bool InTrash() const; |
118 | 118 | bool IsPrintersDir() const; |
| 119 | bool IsAddonsDir() const; |
119 | 120 | |
120 | 121 | virtual bool IsShowing(const node_ref*) const; |
121 | 122 | virtual bool IsShowing(const entry_ref*) const; |
… |
… |
class BContainerWindow : public BWindow {
|
287 | 288 | bool fIsTrash; |
288 | 289 | bool fInTrash; |
289 | 290 | bool fIsPrinters; |
| 291 | bool fIsAddons; |
290 | 292 | |
291 | 293 | uint32 fContainerWindowFlags; |
292 | 294 | BackgroundImage* fBackgroundImage; |
… |
… |
BContainerWindow::IsPrintersDir() const
|
390 | 392 | return fIsPrinters; |
391 | 393 | } |
392 | 394 | |
| 395 | inline bool |
| 396 | BContainerWindow::IsAddonsDir() const |
| 397 | { |
| 398 | return fIsAddons; |
| 399 | } |
| 400 | |
393 | 401 | inline void |
394 | 402 | BContainerWindow::SetUpDiskMenu(BMenu*) |
395 | 403 | { |
diff --git a/src/kits/tracker/DeskWindow.cpp b/src/kits/tracker/DeskWindow.cpp
index b8ea334..1694505 100644
a
|
b
|
AddOneShortcut(const Model* model, const char*, uint32 shortcut,
|
96 | 96 | BMessage* runAddon = new BMessage(kLoadAddOn); |
97 | 97 | runAddon->AddRef("refs", model->EntryRef()); |
98 | 98 | |
| 99 | TTracker::WatchNode(model->NodeRef(), B_WATCH_ATTR, params->window); |
99 | 100 | params->window->AddShortcut(shortcut, B_OPTION_KEY | B_COMMAND_KEY, |
100 | 101 | runAddon); |
101 | 102 | params->currentAddonShortcuts->insert(shortcut); |
diff --git a/src/kits/tracker/FSUtils.cpp b/src/kits/tracker/FSUtils.cpp
index 8a75bbc..eb09fe8 100644
a
|
b
|
FSIsRootDir(const BEntry* entry)
|
2657 | 2657 | |
2658 | 2658 | |
2659 | 2659 | bool |
| 2660 | FSIsAddonsDir(const BEntry* entry) |
| 2661 | { |
| 2662 | BEntry parent; |
| 2663 | char name[B_FILE_NAME_LENGTH]; |
| 2664 | if (entry->GetName(name) != B_OK || entry->GetParent(&parent) != B_OK) |
| 2665 | return false; |
| 2666 | return strcmp(name, "Tracker") == 0 |
| 2667 | && (FSIsDirFlavor(&parent, B_SYSTEM_ADDONS_DIRECTORY) |
| 2668 | || FSIsDirFlavor(&parent, B_COMMON_ADDONS_DIRECTORY) |
| 2669 | || FSIsDirFlavor(&parent, B_USER_ADDONS_DIRECTORY)); |
| 2670 | } |
| 2671 | |
| 2672 | |
| 2673 | bool |
2660 | 2674 | DirectoryMatchesOrContains(const BEntry* entry, directory_which which) |
2661 | 2675 | { |
2662 | 2676 | BPath path; |
diff --git a/src/kits/tracker/FSUtils.h b/src/kits/tracker/FSUtils.h
index d872cfc..d6be989 100644
a
|
b
|
_IMPEXP_TRACKER bool FSIsPrintersDir(const BEntry*);
|
176 | 176 | _IMPEXP_TRACKER bool FSIsDeskDir(const BEntry*); |
177 | 177 | _IMPEXP_TRACKER bool FSIsHomeDir(const BEntry*); |
178 | 178 | _IMPEXP_TRACKER bool FSIsRootDir(const BEntry*); |
| 179 | _IMPEXP_TRACKER bool FSIsAddonsDir(const BEntry*); |
179 | 180 | _IMPEXP_TRACKER void FSMoveToTrash(BObjectList<entry_ref>* srcList, |
180 | 181 | BList* pointList = NULL, bool async = true); |
181 | 182 | // Deprecated |