From 7360f046634d013fec1e9b37c60840a83b470ce1 Mon Sep 17 00:00:00 2001 From: Jonathan Yap Date: Mon, 1 Dec 2014 15:36:59 -0500 Subject: STORM-2082 Better control on how (or if) to display Default preset Make sure default preset is created when flyout panel is activated Only display deleted notification upon successful deletion --- indra/newview/llpresetsmanager.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'indra/newview/llpresetsmanager.h') diff --git a/indra/newview/llpresetsmanager.h b/indra/newview/llpresetsmanager.h index 878116e5aa..1bac2c65e1 100644 --- a/indra/newview/llpresetsmanager.h +++ b/indra/newview/llpresetsmanager.h @@ -32,19 +32,29 @@ #include #include +static const std::string PRESETS_DEFAULT = "Default"; static const std::string PRESETS_DIR = "presets"; static const std::string PRESETS_GRAPHIC = "graphic"; static const std::string PRESETS_CAMERA = "camera"; +enum EDefaultOptions +{ + DEFAULT_POSITION_TOP, // Put "Default" as the first item in the combobox + DEFAULT_POSITION_NORMAL, // No special positioning + DEFAULT_HIDE // Do not display "Default" in the combobox +}; + class LLPresetsManager : public LLSingleton { public: + typedef std::list preset_name_list_t; typedef boost::signals2::signal preset_list_signal_t; + void createMissingDefault(); static std::string getPresetsDir(const std::string& subdirectory); - void setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo); - void loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets); + void setPresetNamesInComboBox(const std::string& subdirectory, LLComboBox* combo, EDefaultOptions default_option); + void loadPresetNamesFromDir(const std::string& dir, preset_name_list_t& presets, EDefaultOptions default_option); void savePreset(const std::string& subdirectory, const std::string & name); void loadPreset(const std::string& subdirectory, const std::string & name); bool deletePreset(const std::string& subdirectory, const std::string& name); -- cgit v1.2.3