Merge remote-tracking branch 'Liru/master'

This commit is contained in:
Damian Zhaoying
2013-08-06 15:26:08 -03:00
8 changed files with 31 additions and 34 deletions

View File

@@ -1308,7 +1308,7 @@ This should be as low as possible, but too low may break functionality</string>
<key>Value</key>
<integer>0</integer>
</map>
<key>AntiSpamNotFriends</key>
<key>AntiSpamNotFriend</key>
<map>
<key>Comment</key>
<string>When true, dialogs from friends will not be blocked unless the _NACL_Antispam is true.</string>

View File

@@ -20,15 +20,14 @@
#include "llsingleton.h"
template<typename Type>
template<typename Type, typename Signal = boost::signals2::signal<void()> >
class SignaledType
{
public:
SignaledType() : mValue() {}
SignaledType(Type b) : mValue(b) {}
template<typename Slot>
boost::signals2::connection connect(Slot slot) { return mSignal.connect(slot); }
boost::signals2::connection connect(const typename Signal::slot_type& slot) { return mSignal.connect(slot); }
SignaledType& operator =(Type val)
{
@@ -42,7 +41,7 @@ public:
operator Type() const { return mValue; }
private:
boost::signals2::signal<void()> mSignal;
Signal mSignal;
Type mValue;
};

View File

@@ -372,7 +372,7 @@ namespace
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLFloaterAvatarList::instance().focusOnPrev(userdata);
LLFloaterAvatarList::instance().focusOnPrev(userdata.asInteger());
return true;
}
};
@@ -381,7 +381,7 @@ namespace
{
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
{
LLFloaterAvatarList::instance().focusOnNext(userdata);
LLFloaterAvatarList::instance().focusOnNext(userdata.asInteger());
return true;
}
};

View File

@@ -187,12 +187,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
reshape(rect.getWidth(), rect.getHeight());
LLComboBox* name_combo = sInstance->getChild<LLComboBox>("name_combo");
name_combo->setCommitCallback(boost::bind(LLPanelLogin::onSelectLoginEntry, _1, this));
name_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLoginComboLostFocus, this, name_combo));
name_combo->setPrevalidate(LLLineEditor::prevalidatePrintableNotPipe);
name_combo->setSuppressTentative(true);
name_combo->setSuppressAutoComplete(true);
LLComboBox* username_combo(getChild<LLComboBox>("username_combo"));
username_combo->setCommitCallback(boost::bind(LLPanelLogin::onSelectLoginEntry, _1, this));
username_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLoginComboLostFocus, this, username_combo));
username_combo->setPrevalidate(LLLineEditor::prevalidatePrintableNotPipe);
username_combo->setSuppressTentative(true);
username_combo->setSuppressAutoComplete(true);
childSetCommitCallback("remember_name_check", onNameCheckChanged);
@@ -349,7 +349,7 @@ void LLPanelLogin::setLoginHistory(LLSavedLogins const& login_history)
{
sInstance->mLoginHistoryData = login_history;
LLComboBox* login_combo = sInstance->getChild<LLComboBox>("name_combo");
LLComboBox* login_combo = sInstance->getChild<LLComboBox>("username_combo");
llassert(login_combo);
login_combo->clear();
@@ -531,7 +531,7 @@ void LLPanelLogin::setFields(const std::string& firstname,
return;
}
LLComboBox* login_combo = sInstance->getChild<LLComboBox>("name_combo");
LLComboBox* login_combo = sInstance->getChild<LLComboBox>("username_combo");
llassert_always(firstname.find(' ') == std::string::npos);
login_combo->setLabel(nameJoin(firstname, lastname, false));
@@ -572,10 +572,10 @@ void LLPanelLogin::setFields(const LLSavedLoginEntry& entry, bool takeFocus)
LLCheckBoxCtrl* remember_pass_check = sInstance->getChild<LLCheckBoxCtrl>("remember_check");
std::string fullname = nameJoin(entry.getFirstName(), entry.getLastName(), entry.isSecondLife());
LLComboBox* login_combo = sInstance->getChild<LLComboBox>("name_combo");
LLComboBox* login_combo = sInstance->getChild<LLComboBox>("username_combo");
login_combo->setTextEntry(fullname);
login_combo->resetTextDirty();
//sInstance->childSetText("name_combo", fullname);
//sInstance->childSetText("username_combo", fullname);
std::string grid = entry.getGrid();
//grid comes via LLSavedLoginEntry, which uses full grid names, not nicks
@@ -615,7 +615,7 @@ void LLPanelLogin::getFields(std::string *firstname,
return;
}
nameSplit(sInstance->getChild<LLComboBox>("name_combo")->getTextEntry(), *firstname, *lastname);
nameSplit(sInstance->getChild<LLComboBox>("username_combo")->getTextEntry(), *firstname, *lastname);
LLStringUtil::trim(*firstname);
LLStringUtil::trim(*lastname);
@@ -891,7 +891,7 @@ void LLPanelLogin::onClickConnect(void *)
sInstance->setFocus(FALSE);
std::string first, last, password;
if (nameSplit(sInstance->getChild<LLComboBox>("name_combo")->getTextEntry(), first, last))
if (nameSplit(sInstance->getChild<LLComboBox>("username_combo")->getTextEntry(), first, last))
{
// has both first and last name typed
sInstance->mCallback(0, sInstance->mCallbackData);
@@ -1040,7 +1040,7 @@ void LLPanelLogin::onSelectLoginEntry(LLUICtrl* ctrl, void* data)
{
if (sInstance)
{
LLComboBox* combo = sInstance->getChild<LLComboBox>("name_combo");
LLComboBox* combo = sInstance->getChild<LLComboBox>("username_combo");
if (ctrl == combo)
{
LLSD selected_entry = combo->getSelectedValue();

View File

@@ -3436,6 +3436,9 @@ void reset_login()
gLoginMenuBarView->setEnabled( TRUE );
}
// Clear the console
if (gConsole) gConsole->clear();
// Hide any other stuff
LLFloaterMap::hideInstance();
}

View File

@@ -1716,8 +1716,8 @@ bool is_spam_filtered(const EInstantMessage& dialog, bool is_friend, bool is_own
if (antispam_not_mine && is_owned_by_me)
return false;
static LLCachedControl<bool> antispam_not_friends(gSavedSettings,"AntiSpamNotFriends");
if (antispam_not_friends && is_friend)
static LLCachedControl<bool> antispam_not_friend(gSavedSettings,"AntiSpamNotFriend");
if (antispam_not_friend && is_friend)
return false;
// Last, definitely filter
@@ -8058,14 +8058,9 @@ void process_initiate_download(LLMessageSystem* msg, void**)
void process_script_teleport_request(LLMessageSystem* msg, void**)
{
if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return;
// NaCl - Antispam
{
LLUUID object_id, owner_id;
msg->getUUID( "Data", "ObjectID", object_id);
msg->getUUID( "Data", "OwnerID", owner_id);
if (owner_id.isNull() ? is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(object_id), object_id == gAgentID) : is_spam_filtered(IM_COUNT, LLAvatarActions::isFriend(owner_id), owner_id == gAgentID)) return;
}
if (is_spam_filtered(IM_COUNT, false, false)) return;
// NaCl End
std::string object_name;

View File

@@ -72,10 +72,10 @@
<on_enable function="List.EnableSingleSelected"/>
</menu_item_call>
<menu_item_call label="Focus Next" name="Focus Next">
<on_click function="Radar.FocusNext"/>
<on_click function="Radar.FocusNext" userdata="0"/>
</menu_item_call>
<menu_item_call label="Focus Previous" name="Focus Previous">
<on_click function="Radar.FocusPrev"/>
<on_click function="Radar.FocusPrev" userdata="0"/>
</menu_item_call>
<menu_item_separator/>
<menu_item_call label="Mark/Unmark" name="Mark/Unmark">
@@ -83,10 +83,10 @@
<on_enable function="List.EnableAnySelected"/>
</menu_item_call>
<menu_item_call label="Focus Next Marked" name="Focus Next Marked">
<on_click function="Radar.FocusNext" userdata="true"/>
<on_click function="Radar.FocusNext" userdata="1"/>
</menu_item_call>
<menu_item_call label="Focus Previous Marked" name="Focus Previous Marked">
<on_click function="Radar.FocusPrev" userdata="true"/>
<on_click function="Radar.FocusPrev" userdata="1"/>
</menu_item_call>
</menu>
<menu label="Alerts" name="Alerts" create_jump_keys="true">

View File

@@ -23,7 +23,7 @@
</text>
<combo_box bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-24"
font="SansSerif" handle_edit_keys_directly="true" height="20" left="4"
max_chars="64" mouse_opaque="true" name="name_combo"
max_chars="64" mouse_opaque="true" name="username_combo"
select_all_on_focus_received="true" width="155" allow_text_entry="true" />
<check_box bottom="0" control_name="RememberName"
follows="left|bottom" font="SansSerifSmall" height="16"