diff options
Diffstat (limited to 'linden/indra/newview/llfilepicker.cpp')
-rw-r--r-- | linden/indra/newview/llfilepicker.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/linden/indra/newview/llfilepicker.cpp b/linden/indra/newview/llfilepicker.cpp index 1839cb3..89a1de7 100644 --- a/linden/indra/newview/llfilepicker.cpp +++ b/linden/indra/newview/llfilepicker.cpp | |||
@@ -60,6 +60,12 @@ LLFilePicker LLFilePicker::sInstance; | |||
60 | #define XML_FILTER L"XML files (*.xml)\0*.xml\0" | 60 | #define XML_FILTER L"XML files (*.xml)\0*.xml\0" |
61 | #define SLOBJECT_FILTER L"Objects (*.slobject)\0*.slobject\0" | 61 | #define SLOBJECT_FILTER L"Objects (*.slobject)\0*.slobject\0" |
62 | #define RAW_FILTER L"RAW files (*.raw)\0*.raw\0" | 62 | #define RAW_FILTER L"RAW files (*.raw)\0*.raw\0" |
63 | #ifdef LL_WINDOWS | ||
64 | #define APP_FILTER L"Executable files (*.exe)\0*.exe\0" | ||
65 | #else | ||
66 | // If we can, add any mac/linux binary searching here -- MC | ||
67 | #define APP_FILTER L"Executable files (*.*)\0*.*\0" | ||
68 | #endif // LL_WINDOOWS | ||
63 | #endif | 69 | #endif |
64 | 70 | ||
65 | // | 71 | // |
@@ -192,6 +198,10 @@ BOOL LLFilePicker::setupFilter(ELoadFilter filter) | |||
192 | mOFN.lpstrFilter = RAW_FILTER \ | 198 | mOFN.lpstrFilter = RAW_FILTER \ |
193 | L"\0"; | 199 | L"\0"; |
194 | break; | 200 | break; |
201 | case FFLOAD_APP: | ||
202 | mOFN.lpstrFilter = APP_FILTER \ | ||
203 | L"\0"; | ||
204 | break; | ||
195 | default: | 205 | default: |
196 | res = FALSE; | 206 | res = FALSE; |
197 | break; | 207 | break; |
@@ -601,6 +611,17 @@ Boolean LLFilePicker::navOpenFilterProc(AEDesc *theItem, void *info, void *callB | |||
601 | AEDisposeDesc(&desc); | 611 | AEDisposeDesc(&desc); |
602 | } | 612 | } |
603 | } | 613 | } |
614 | else if(filter == FFLOAD_APP) | ||
615 | { | ||
616 | // App bundles are of type APPL; ???? is a folder, and 0 is something going wrong. | ||
617 | if((int)navInfo->fileAndFolder.folderInfo.folderType != FOUR_CHAR_CODE('APPL') && | ||
618 | (int)navInfo->fileAndFolder.folderInfo.folderType != FOUR_CHAR_CODE('\?\?\?\?') && | ||
619 | (int)navInfo->fileAndFolder.folderInfo.folderType != 0 | ||
620 | ) | ||
621 | { | ||
622 | result = false; | ||
623 | } | ||
624 | } | ||
604 | } | 625 | } |
605 | return result; | 626 | return result; |
606 | } | 627 | } |
@@ -844,6 +865,9 @@ BOOL LLFilePicker::getOpenFile(ELoadFilter filter) | |||
844 | reset(); | 865 | reset(); |
845 | 866 | ||
846 | mNavOptions.optionFlags &= ~kNavAllowMultipleFiles; | 867 | mNavOptions.optionFlags &= ~kNavAllowMultipleFiles; |
868 | if(filter == FFLOAD_APP) | ||
869 | mNavOptions.optionFlags |= kNavSupportPackages; | ||
870 | |||
847 | // Modal, so pause agent | 871 | // Modal, so pause agent |
848 | send_agent_pause(); | 872 | send_agent_pause(); |
849 | { | 873 | { |