diff options
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rwxr-xr-x | indra/newview/llfloaterpreference.cpp | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index 3d4a1c44d8..9c836489f3 100755 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -1624,6 +1624,36 @@ void LLFloaterPreference::selectChatPanel() selectPanel("chat"); } +S32 LLFloaterPreference::getHighestNotificationIndex() //change this name +{ + static const S32 comboBoxNamesLength = 5; + static std::string comboBoxNames[comboBoxNamesLength] = {"NearbyChatOptions", + "FriendIMOptions", + "NonFriendIMOptions", + "ConferenceIMOptions", + "GroupChatOptions"}; + S32 selectedIndex; + S32 priorityindex = 3; + LLComboBox * comboBox; + + for(S32 i = 0; i < comboBoxNamesLength; ++i) + { + comboBox = getChild<LLComboBox>(comboBoxNames[i]); + + if(comboBox) + { + selectedIndex = comboBox->getCurrentIndex(); + + if(selectedIndex < priorityindex) + { + priorityindex = selectedIndex; + } + } + } + + return priorityindex; +} + //------------------------------Updater--------------------------------------- static bool handleBandwidthChanged(const LLSD& newvalue) |