diff options
| author | Joel Holdsworth <joel@airwebreathe.org.uk> | 2008-02-28 16:37:08 +0000 |
|---|---|---|
| committer | joelholdsworth <joelholdsworth@users.sourceforge.net> | 2008-02-28 16:37:08 +0000 |
| commit | b985e21bc131d88902e05993a918b493cdd67c6b (patch) | |
| tree | 6166aea320ac803d4e772d35529b0ef59f367169 /src/ui/dialog/filedialogimpl-win32.h | |
| parent | Reworked swatches context menu slightly to make it more compact and a bit cle... (diff) | |
| download | inkscape-b985e21bc131d88902e05993a918b493cdd67c6b.tar.gz inkscape-b985e21bc131d88902e05993a918b493cdd67c6b.zip | |
Fixed off-by-one filter bug with the windows native file dialogs, and tidied code a bit in filedialogimpl-win32.cpp/h
(bzr r4900)
Diffstat (limited to 'src/ui/dialog/filedialogimpl-win32.h')
| -rw-r--r-- | src/ui/dialog/filedialogimpl-win32.h | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/src/ui/dialog/filedialogimpl-win32.h b/src/ui/dialog/filedialogimpl-win32.h index fd0d1c259..9de490193 100644 --- a/src/ui/dialog/filedialogimpl-win32.h +++ b/src/ui/dialog/filedialogimpl-win32.h @@ -57,17 +57,8 @@ public: protected: /// The dialog type FileDialogType dialogType; - - /// This mutex is used to ensure that the worker thread - /// that calls GetOpenFileName cannot collide with the - /// main Inkscape thread - Glib::Mutex *_mutex; - - /// This flag is set true when the GetOpenFileName call - /// has returned - bool _finished; - - /// A pointer to the GTK main-loop context object. This + + /// A pointer to the GTK main-loop context object. This /// is used to keep the rest of the inkscape UI running /// while the file dialog is displayed GMainLoop *_main_loop; @@ -95,8 +86,13 @@ protected: /// The filter string for GetOpenFileName in UTF-16 wchar_t *_filter; - /// The index of the currently selected filter - int _filterIndex; + /// The index of the currently selected filter. + /// This value must be greater than or equal to 1, + /// and less than or equal to _filter_count. + int _filter_index; + + /// The number of filters registered + int _filter_count; /// An array of the extensions associated with the /// file types of each filter. So the Nth entry of @@ -104,8 +100,8 @@ protected: /// filter in the list. NULL if no specific extension is /// specified/ Inkscape::Extension::Extension **_extension_map; - - /// The currently selected extension. Valid after an [OK] + + /// The currently selected extension. Valid after an [OK] Inkscape::Extension::Extension *_extension; }; @@ -213,6 +209,15 @@ private: /// This flag is set true if a file has been selected bool _file_selected; + + /// This flag is set true when the GetOpenFileName call + /// has returned + bool _finished; + + /// This mutex is used to ensure that the worker thread + /// that calls GetOpenFileName cannot collide with the + /// main Inkscape thread + Glib::Mutex *_mutex; /// The controller function for the thread which calls @@ -321,12 +326,13 @@ public: private: - /** - * Create a filter menu for this type of dialog - */ + /// Create a filter menu for this type of dialog void createFilterMenu(); + /// The controller function for the thread which calls + /// GetSaveFileName void GetSaveFileName_thread(); + }; |
