diff options
Diffstat (limited to 'indra/newview/llfloaterpreference.h')
-rw-r--r-- | indra/newview/llfloaterpreference.h | 69 |
1 files changed, 8 insertions, 61 deletions
diff --git a/indra/newview/llfloaterpreference.h b/indra/newview/llfloaterpreference.h index 1268935712..526214a617 100644 --- a/indra/newview/llfloaterpreference.h +++ b/indra/newview/llfloaterpreference.h @@ -37,17 +37,13 @@ #include "llavatarpropertiesprocessor.h" #include "llconversationlog.h" #include "llsearcheditor.h" -#include "llsetkeybinddialog.h" -#include "llkeyconflict.h" class LLConversationLogObserver; class LLPanelPreference; class LLPanelLCD; class LLPanelDebug; class LLMessageSystem; -class LLComboBox; class LLScrollListCtrl; -class LLScrollListCell; class LLSliderCtrl; class LLSD; class LLTextBox; @@ -106,8 +102,6 @@ public: void selectPrivacyPanel(); void selectChatPanel(); void getControlNames(std::vector<std::string>& names); - // updates click/double-click action controls depending on values from settings.xml - void updateClickActionViews(); protected: void onBtnOK(const LLSD& userdata); @@ -135,7 +129,9 @@ protected: // callback for commit in the "Single click on land" and "Double click on land" comboboxes. void onClickActionChange(); - // updates click/double-click action keybindngs depending on view values + // updates click/double-click action settings depending on controls values + void updateClickActionSettings(); + // updates click/double-click action controls depending on values from settings.xml void updateClickActionControls(); public: @@ -150,6 +146,10 @@ public: void onClickResetCache(); void onClickSkin(LLUICtrl* ctrl,const LLSD& userdata); void onSelectSkin(); + void onClickSetKey(); + void setKey(KEY key); + void setMouse(LLMouseHandler::EClickType click); + void onClickSetMiddleMouse(); void onClickSetSounds(); void onClickEnablePopup(); void onClickDisablePopup(); @@ -204,6 +204,7 @@ private: static std::string sSkin; notifications_map mNotificationOptions; + bool mClickActionDirty; ///< Set to true when the click/double-click options get changed by user. bool mGotPersonalInfo; bool mOriginalIMViaEmail; bool mLanguageChanged; @@ -293,60 +294,6 @@ private: LOG_CLASS(LLPanelPreferenceGraphics); }; -class LLPanelPreferenceControls : public LLPanelPreference, public LLKeyBindResponderInterface -{ - LOG_CLASS(LLPanelPreferenceControls); -public: - LLPanelPreferenceControls(); - virtual ~LLPanelPreferenceControls(); - - BOOL postBuild(); - - void apply(); - void cancel(); - void saveSettings(); - void resetDirtyChilds(); - - void onListCommit(); - void onModeCommit(); - void onRestoreDefaultsBtn(); - void onRestoreDefaultsResponse(const LLSD& notification, const LLSD& response); - - // Bypass to let Move & view read values without need to create own key binding handler - // Todo: consider a better way to share access to keybindings - bool canKeyBindHandle(const std::string &control, EMouseClickType click, KEY key, MASK mask); - // Bypasses to let Move & view modify values without need to create own key binding handler - void setKeyBind(const std::string &control, EMouseClickType click, KEY key, MASK mask, bool set /*set or reset*/ ); - void updateAndApply(); - - // from interface - /*virtual*/ bool onSetKeyBind(EMouseClickType click, KEY key, MASK mask, bool all_modes); - /*virtual*/ void onDefaultKeyBind(bool all_modes); - /*virtual*/ void onCancelKeyBind(); - -private: - // reloads settings, discards current changes, updates table - void regenerateControls(); - - // These fuctions do not clean previous content - bool addControlTableColumns(const std::string &filename); - bool addControlTableRows(const std::string &filename); - void addControlTableSeparator(); - - // Cleans content and then adds content from xml files according to current mEditingMode - void populateControlTable(); - - // Updates keybindings from storage to table - void updateTable(); - - LLScrollListCtrl* pControlsTable; - LLComboBox *pKeyModeBox; - LLKeyConflictHandler mConflictHandler[LLKeyConflictHandler::MODE_COUNT]; - std::string mEditingControl; - S32 mEditingColumn; - S32 mEditingMode; -}; - class LLFloaterPreferenceGraphicsAdvanced : public LLFloater { public: |