diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2009-05-04 05:20:54 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2009-05-04 05:20:54 +0000 |
| commit | 2dcad8b8dd3e13db62e7de20293c5369dc5e9445 (patch) | |
| tree | 863fd4014431356803427bca8f813d51c234c1fb /src/preferences.h | |
| parent | Fixed broken preferences singleton and removed GUI encapsulation leakage. Fix... (diff) | |
| download | inkscape-2dcad8b8dd3e13db62e7de20293c5369dc5e9445.tar.gz inkscape-2dcad8b8dd3e13db62e7de20293c5369dc5e9445.zip | |
Implement warning of prior errors.
(bzr r7817)
Diffstat (limited to 'src/preferences.h')
| -rw-r--r-- | src/preferences.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/preferences.h b/src/preferences.h index 3c25a520f..7aded5a03 100644 --- a/src/preferences.h +++ b/src/preferences.h @@ -229,6 +229,20 @@ public: /*@}*/ /** + * @brief Return details of the last encountered error, if any. + * + * This method will return true if an error has been encountered, and fill + * in the primary and secondary error strings of the last error. If an error + * had been encountered, this will reset it. + * + * @param string to set to the primary error message. + * @param string to set to the secondary error message. + * + * @return True if an error has occurred since last checking, false otherwise. + */ + bool getLastError( Glib::ustring& primary, Glib::ustring& secondary ); + + /** * @name Iterate over directories and entries. * @{ */ @@ -458,9 +472,12 @@ private: std::string _prefs_basename; ///< Basename of the prefs file std::string _prefs_dir; ///< Directory in which to look for the prefs file std::string _prefs_filename; ///< Full filename (with directory) of the prefs file + Glib::ustring _lastErrPrimary; ///< Last primary error message, if any. + Glib::ustring _lastErrSecondary; ///< Last secondary error message, if any. XML::Document *_prefs_doc; ///< XML document storing all the preferences ErrorReporter* _errorHandler; ///< Pointer to object reporting errors. bool _writable; ///< Will the preferences be saved at exit? + bool _hasError; ///< Indication that some error has occurred; /// Wrapper class for XML node observers class PrefNodeObserver; |
