Commit 232a618f authored by Kitty Barnett's avatar Kitty Barnett

Merged with .Catznip tip

--HG--
branch : Catznip
parents adc89d0c 9cc9afde
......@@ -13491,6 +13491,17 @@
<key>Value</key>
<real>1000.0</real>
</map>
<key>ToolbarAutoAddButtons</key>
<map>
<key>Comment</key>
<string>Buttons in this list will be automatically to the user's toolbar</string>
<key>Persist</key>
<integer>0</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string>quickprefs</string>
</map>
<key>ToolboxAutoMove</key>
<map>
<key>Comment</key>
......
......@@ -264,6 +264,17 @@
<key>Value</key>
<boolean>1</boolean>
</map>
<key>ToolbarAutoAddButtons</key>
<map>
<key>Comment</key>
<string>Buttons in this list have been auto-added to the user's toolbar</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
<string>String</string>
<key>Value</key>
<string></string>
</map>
<key>VoiceEffectDefault</key>
<map>
<key>Comment</key>
......
......@@ -46,6 +46,9 @@
#include "llviewercontrol.h" // HACK for destinations guide on startup
#include <boost/foreach.hpp>
// [SL:KB] - Patch: UI-Toolbars | Checked: Catznip-4.3
#include <boost/algorithm/string.hpp>
// [/SL:KB]
LLToolBarView* gToolBarView = NULL;
......@@ -374,6 +377,33 @@ bool LLToolBarView::loadToolbars(bool force_default)
}
}
}
// [SL:KB] - Patch: UI-Toolbars | Checked: Catznip-4.3
// When we add new toolbar buttons we'd like to auto-add these to showcase them but we don't want to
// constantly annoy the user so do it once and keep track of it in their settings
const std::string strAutoAdd = gSavedSettings.getString("ToolbarAutoAddButtons"), strAutoAddUser = gSavedPerAccountSettings.getString("ToolbarAutoAddButtons");
if (strAutoAdd != strAutoAddUser)
{
std::list<std::string> listAutoAdd, listAutoAddUser, listToAdd;
boost::split(listAutoAdd, strAutoAdd, boost::is_any_of(std::string(",")));
listAutoAdd.sort();
boost::split(listAutoAddUser, strAutoAddUser, boost::is_any_of(std::string(",")));
listAutoAddUser.sort();
std::set_difference(listAutoAdd.begin(), listAutoAdd.end(), listAutoAddUser.begin(), listAutoAddUser.end(), std::inserter(listToAdd, listToAdd.begin()));
for (const std::string& strToolbar : listToAdd)
{
LLCommand* pCmd = LLCommandManager::instance().getCommand(strToolbar);
if ( (pCmd) && (LLToolBarEnums::TOOLBAR_NONE == hasCommand(pCmd->id())) )
{
mToolbars[LLToolBarEnums::TOOLBAR_BOTTOM]->addCommand(pCmd->id());
}
}
gSavedPerAccountSettings.setString("ToolbarAutoAddButtons", strAutoAdd);
}
// [/SL:KB]
mToolbarsLoaded = true;
return true;
}
......
......@@ -39,7 +39,7 @@
text_color="White"
top="5"
value="0"
width="69" />
width="50" />
<up_btn
follows="top|right"
height="23"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment