diff options
author | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-09-13 03:05:57 +0300 |
---|---|---|
committer | Vadim ProductEngine <vsavchuk@productengine.com> | 2011-09-13 03:05:57 +0300 |
commit | 8652b2d1052b989e32f4462a07372901d37f9586 (patch) | |
tree | 2cf24382e6b415a22633106daae26382b5b20d0e /indra/newview/llfloatertranslationsettings.h | |
parent | 83d889098db7253a8d8bec7940a93724ea724449 (diff) |
STORM-1577 WIP Added API key verification to the translation settings floater; new layout.
Diffstat (limited to 'indra/newview/llfloatertranslationsettings.h')
-rw-r--r-- | indra/newview/llfloatertranslationsettings.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/newview/llfloatertranslationsettings.h b/indra/newview/llfloatertranslationsettings.h index 47e2fc80e6..9b47ad72ed 100644 --- a/indra/newview/llfloatertranslationsettings.h +++ b/indra/newview/llfloatertranslationsettings.h @@ -29,6 +29,7 @@ #include "llfloater.h" +class LLButton; class LLCheckBoxCtrl; class LLComboBox; class LLLineEditor; @@ -41,11 +42,22 @@ public: /*virtual*/ BOOL postBuild(); /*virtual*/ void onOpen(const LLSD& key); + void setBingVerified(bool ok, bool alert); + void setGoogleVerified(bool ok, bool alert); + private: std::string getSelectedService() const; - void showError(const std::string& err_name) const; - bool validate() const; + std::string getEnteredBingKey() const; + std::string getEnteredGoogleKey() const; + void showAlert(const std::string& msg_name) const; void updateControlsEnabledState(); + void verifyKey(int service, const std::string& key, bool alert = true); + + void onEditorFocused(LLFocusableElement* control); + void onBingKeyEdited(); + void onGoogleKeyEdited(); + void onBtnBingVerify(); + void onBtnGoogleVerify(); void onBtnOK(); LLCheckBoxCtrl* mMachineTranslationCB; @@ -53,6 +65,12 @@ private: LLLineEditor* mBingAPIKeyEditor; LLLineEditor* mGoogleAPIKeyEditor; LLRadioGroup* mTranslationServiceRadioGroup; + LLButton* mBingVerifyBtn; + LLButton* mGoogleVerifyBtn; + LLButton* mOKBtn; + + bool mBingKeyVerified; + bool mGoogleKeyVerified; }; #endif // LL_LLFLOATERTRANSLATIONSETTINGS_H |