summaryrefslogtreecommitdiff
path: root/indra/newview/llpresetsmanager.h
diff options
context:
space:
mode:
authorJonathan Yap <jhwelch@gmail.com>2014-12-01 15:36:59 -0500
committerJonathan Yap <jhwelch@gmail.com>2014-12-01 15:36:59 -0500
commit7360f046634d013fec1e9b37c60840a83b470ce1 (patch)
treed41efe489e36c05d3c3f02d9904ed79a3ff4dc4d /indra/newview/llpresetsmanager.h
parent3e9c3b36960fd17cba9114bc2e4564208346b92e (diff)
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
Diffstat (limited to 'indra/newview/llpresetsmanager.h')
-rw-r--r--indra/newview/llpresetsmanager.h14
1 files changed, 12 insertions, 2 deletions
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 <list>
#include <map>
+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<LLPresetsManager>
{
public:
+
typedef std::list<std::string> preset_name_list_t;
typedef boost::signals2::signal<void()> 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);