diff options
Diffstat (limited to 'linden/indra/newview/llfilepicker.h')
-rw-r--r-- | linden/indra/newview/llfilepicker.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/linden/indra/newview/llfilepicker.h b/linden/indra/newview/llfilepicker.h index 008c96e..d4b0ebe 100644 --- a/linden/indra/newview/llfilepicker.h +++ b/linden/indra/newview/llfilepicker.h | |||
@@ -2,6 +2,8 @@ | |||
2 | * @file llfilepicker.h | 2 | * @file llfilepicker.h |
3 | * @brief OS-specific file picker | 3 | * @brief OS-specific file picker |
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | ||
6 | * | ||
5 | * Copyright (c) 2001-2007, Linden Research, Inc. | 7 | * Copyright (c) 2001-2007, Linden Research, Inc. |
6 | * | 8 | * |
7 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
@@ -24,6 +26,7 @@ | |||
24 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | 26 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO |
25 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | 27 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, |
26 | * COMPLETENESS OR PERFORMANCE. | 28 | * COMPLETENESS OR PERFORMANCE. |
29 | * $/LicenseInfo$ | ||
27 | */ | 30 | */ |
28 | 31 | ||
29 | // OS specific file selection dialog. This is implemented as a | 32 | // OS specific file selection dialog. This is implemented as a |
@@ -70,11 +73,16 @@ | |||
70 | typedef struct { | 73 | typedef struct { |
71 | GtkWidget *win; | 74 | GtkWidget *win; |
72 | std::vector<LLString> fileVector; | 75 | std::vector<LLString> fileVector; |
76 | std::string contextName; | ||
73 | } StoreFilenamesStruct; | 77 | } StoreFilenamesStruct; |
74 | #endif // LL_GTK | 78 | #endif // LL_GTK |
75 | 79 | ||
76 | class LLFilePicker | 80 | class LLFilePicker |
77 | { | 81 | { |
82 | #ifdef LL_GTK | ||
83 | friend class LLDirPicker; | ||
84 | friend void chooser_responder(GtkWidget *, gint, gpointer); | ||
85 | #endif // LL_GTK | ||
78 | public: | 86 | public: |
79 | // calling this before main() is undefined | 87 | // calling this before main() is undefined |
80 | static LLFilePicker& instance( void ) { return sInstance; } | 88 | static LLFilePicker& instance( void ) { return sInstance; } |
@@ -166,9 +174,9 @@ private: | |||
166 | 174 | ||
167 | #if LL_GTK | 175 | #if LL_GTK |
168 | StoreFilenamesStruct mStoreFilenames; | 176 | StoreFilenamesStruct mStoreFilenames; |
169 | |||
170 | GtkWindow* buildFilePicker(void); | ||
171 | U32 mNextFileIndex; | 177 | U32 mNextFileIndex; |
178 | // we remember the last path that was accessed for a particular usage | ||
179 | static std::map <std::string, std::string> sContextToPathMap; | ||
172 | #endif | 180 | #endif |
173 | 181 | ||
174 | char mFiles[FILENAME_BUFFER_SIZE]; /*Flawfinder: ignore*/ | 182 | char mFiles[FILENAME_BUFFER_SIZE]; /*Flawfinder: ignore*/ |
@@ -179,6 +187,12 @@ private: | |||
179 | 187 | ||
180 | static LLFilePicker sInstance; | 188 | static LLFilePicker sInstance; |
181 | 189 | ||
190 | protected: | ||
191 | #if LL_GTK | ||
192 | GtkWindow* buildFilePicker(bool is_save, bool is_folder, | ||
193 | std::string context = "generic"); | ||
194 | #endif | ||
195 | |||
182 | public: | 196 | public: |
183 | // don't call these directly please. | 197 | // don't call these directly please. |
184 | LLFilePicker(); | 198 | LLFilePicker(); |