Merge remote-tracking branch 'Liru/master'
This commit is contained in:
@@ -1308,7 +1308,7 @@ This should be as low as possible, but too low may break functionality</string>
|
|||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>AntiSpamNotFriends</key>
|
<key>AntiSpamNotFriend</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
<string>When true, dialogs from friends will not be blocked unless the _NACL_Antispam is true.</string>
|
<string>When true, dialogs from friends will not be blocked unless the _NACL_Antispam is true.</string>
|
||||||
|
|||||||
@@ -20,15 +20,14 @@
|
|||||||
|
|
||||||
#include "llsingleton.h"
|
#include "llsingleton.h"
|
||||||
|
|
||||||
template<typename Type>
|
template<typename Type, typename Signal = boost::signals2::signal<void()> >
|
||||||
class SignaledType
|
class SignaledType
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SignaledType() : mValue() {}
|
SignaledType() : mValue() {}
|
||||||
SignaledType(Type b) : mValue(b) {}
|
SignaledType(Type b) : mValue(b) {}
|
||||||
|
|
||||||
template<typename Slot>
|
boost::signals2::connection connect(const typename Signal::slot_type& slot) { return mSignal.connect(slot); }
|
||||||
boost::signals2::connection connect(Slot slot) { return mSignal.connect(slot); }
|
|
||||||
|
|
||||||
SignaledType& operator =(Type val)
|
SignaledType& operator =(Type val)
|
||||||
{
|
{
|
||||||
@@ -42,7 +41,7 @@ public:
|
|||||||
operator Type() const { return mValue; }
|
operator Type() const { return mValue; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
boost::signals2::signal<void()> mSignal;
|
Signal mSignal;
|
||||||
Type mValue;
|
Type mValue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ namespace
|
|||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
LLFloaterAvatarList::instance().focusOnPrev(userdata);
|
LLFloaterAvatarList::instance().focusOnPrev(userdata.asInteger());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -381,7 +381,7 @@ namespace
|
|||||||
{
|
{
|
||||||
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
bool handleEvent(LLPointer<LLEvent> event, const LLSD& userdata)
|
||||||
{
|
{
|
||||||
LLFloaterAvatarList::instance().focusOnNext(userdata);
|
LLFloaterAvatarList::instance().focusOnNext(userdata.asInteger());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -187,12 +187,12 @@ LLPanelLogin::LLPanelLogin(const LLRect &rect,
|
|||||||
|
|
||||||
reshape(rect.getWidth(), rect.getHeight());
|
reshape(rect.getWidth(), rect.getHeight());
|
||||||
|
|
||||||
LLComboBox* name_combo = sInstance->getChild<LLComboBox>("name_combo");
|
LLComboBox* username_combo(getChild<LLComboBox>("username_combo"));
|
||||||
name_combo->setCommitCallback(boost::bind(LLPanelLogin::onSelectLoginEntry, _1, this));
|
username_combo->setCommitCallback(boost::bind(LLPanelLogin::onSelectLoginEntry, _1, this));
|
||||||
name_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLoginComboLostFocus, this, name_combo));
|
username_combo->setFocusLostCallback(boost::bind(&LLPanelLogin::onLoginComboLostFocus, this, username_combo));
|
||||||
name_combo->setPrevalidate(LLLineEditor::prevalidatePrintableNotPipe);
|
username_combo->setPrevalidate(LLLineEditor::prevalidatePrintableNotPipe);
|
||||||
name_combo->setSuppressTentative(true);
|
username_combo->setSuppressTentative(true);
|
||||||
name_combo->setSuppressAutoComplete(true);
|
username_combo->setSuppressAutoComplete(true);
|
||||||
|
|
||||||
childSetCommitCallback("remember_name_check", onNameCheckChanged);
|
childSetCommitCallback("remember_name_check", onNameCheckChanged);
|
||||||
|
|
||||||
@@ -349,7 +349,7 @@ void LLPanelLogin::setLoginHistory(LLSavedLogins const& login_history)
|
|||||||
{
|
{
|
||||||
sInstance->mLoginHistoryData = 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);
|
llassert(login_combo);
|
||||||
login_combo->clear();
|
login_combo->clear();
|
||||||
|
|
||||||
@@ -531,7 +531,7 @@ void LLPanelLogin::setFields(const std::string& firstname,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLComboBox* login_combo = sInstance->getChild<LLComboBox>("name_combo");
|
LLComboBox* login_combo = sInstance->getChild<LLComboBox>("username_combo");
|
||||||
|
|
||||||
llassert_always(firstname.find(' ') == std::string::npos);
|
llassert_always(firstname.find(' ') == std::string::npos);
|
||||||
login_combo->setLabel(nameJoin(firstname, lastname, false));
|
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");
|
LLCheckBoxCtrl* remember_pass_check = sInstance->getChild<LLCheckBoxCtrl>("remember_check");
|
||||||
std::string fullname = nameJoin(entry.getFirstName(), entry.getLastName(), entry.isSecondLife());
|
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->setTextEntry(fullname);
|
||||||
login_combo->resetTextDirty();
|
login_combo->resetTextDirty();
|
||||||
//sInstance->childSetText("name_combo", fullname);
|
//sInstance->childSetText("username_combo", fullname);
|
||||||
|
|
||||||
std::string grid = entry.getGrid();
|
std::string grid = entry.getGrid();
|
||||||
//grid comes via LLSavedLoginEntry, which uses full grid names, not nicks
|
//grid comes via LLSavedLoginEntry, which uses full grid names, not nicks
|
||||||
@@ -615,7 +615,7 @@ void LLPanelLogin::getFields(std::string *firstname,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
nameSplit(sInstance->getChild<LLComboBox>("name_combo")->getTextEntry(), *firstname, *lastname);
|
nameSplit(sInstance->getChild<LLComboBox>("username_combo")->getTextEntry(), *firstname, *lastname);
|
||||||
LLStringUtil::trim(*firstname);
|
LLStringUtil::trim(*firstname);
|
||||||
LLStringUtil::trim(*lastname);
|
LLStringUtil::trim(*lastname);
|
||||||
|
|
||||||
@@ -891,7 +891,7 @@ void LLPanelLogin::onClickConnect(void *)
|
|||||||
sInstance->setFocus(FALSE);
|
sInstance->setFocus(FALSE);
|
||||||
|
|
||||||
std::string first, last, password;
|
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
|
// has both first and last name typed
|
||||||
sInstance->mCallback(0, sInstance->mCallbackData);
|
sInstance->mCallback(0, sInstance->mCallbackData);
|
||||||
@@ -1040,7 +1040,7 @@ void LLPanelLogin::onSelectLoginEntry(LLUICtrl* ctrl, void* data)
|
|||||||
{
|
{
|
||||||
if (sInstance)
|
if (sInstance)
|
||||||
{
|
{
|
||||||
LLComboBox* combo = sInstance->getChild<LLComboBox>("name_combo");
|
LLComboBox* combo = sInstance->getChild<LLComboBox>("username_combo");
|
||||||
if (ctrl == combo)
|
if (ctrl == combo)
|
||||||
{
|
{
|
||||||
LLSD selected_entry = combo->getSelectedValue();
|
LLSD selected_entry = combo->getSelectedValue();
|
||||||
|
|||||||
@@ -3436,6 +3436,9 @@ void reset_login()
|
|||||||
gLoginMenuBarView->setEnabled( TRUE );
|
gLoginMenuBarView->setEnabled( TRUE );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Clear the console
|
||||||
|
if (gConsole) gConsole->clear();
|
||||||
|
|
||||||
// Hide any other stuff
|
// Hide any other stuff
|
||||||
LLFloaterMap::hideInstance();
|
LLFloaterMap::hideInstance();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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)
|
if (antispam_not_mine && is_owned_by_me)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
static LLCachedControl<bool> antispam_not_friends(gSavedSettings,"AntiSpamNotFriends");
|
static LLCachedControl<bool> antispam_not_friend(gSavedSettings,"AntiSpamNotFriend");
|
||||||
if (antispam_not_friends && is_friend)
|
if (antispam_not_friend && is_friend)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Last, definitely filter
|
// Last, definitely filter
|
||||||
@@ -8058,14 +8058,9 @@ void process_initiate_download(LLMessageSystem* msg, void**)
|
|||||||
void process_script_teleport_request(LLMessageSystem* msg, void**)
|
void process_script_teleport_request(LLMessageSystem* msg, void**)
|
||||||
{
|
{
|
||||||
if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return;
|
if (!gSavedSettings.getBOOL("ScriptsCanShowUI")) return;
|
||||||
|
|
||||||
// NaCl - Antispam
|
// NaCl - Antispam
|
||||||
{
|
if (is_spam_filtered(IM_COUNT, false, false)) return;
|
||||||
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;
|
|
||||||
}
|
|
||||||
// NaCl End
|
// NaCl End
|
||||||
|
|
||||||
std::string object_name;
|
std::string object_name;
|
||||||
|
|||||||
@@ -72,10 +72,10 @@
|
|||||||
<on_enable function="List.EnableSingleSelected"/>
|
<on_enable function="List.EnableSingleSelected"/>
|
||||||
</menu_item_call>
|
</menu_item_call>
|
||||||
<menu_item_call label="Focus Next" name="Focus Next">
|
<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>
|
||||||
<menu_item_call label="Focus Previous" name="Focus Previous">
|
<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_call>
|
||||||
<menu_item_separator/>
|
<menu_item_separator/>
|
||||||
<menu_item_call label="Mark/Unmark" name="Mark/Unmark">
|
<menu_item_call label="Mark/Unmark" name="Mark/Unmark">
|
||||||
@@ -83,10 +83,10 @@
|
|||||||
<on_enable function="List.EnableAnySelected"/>
|
<on_enable function="List.EnableAnySelected"/>
|
||||||
</menu_item_call>
|
</menu_item_call>
|
||||||
<menu_item_call label="Focus Next Marked" name="Focus Next Marked">
|
<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>
|
||||||
<menu_item_call label="Focus Previous Marked" name="Focus Previous Marked">
|
<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_item_call>
|
||||||
</menu>
|
</menu>
|
||||||
<menu label="Alerts" name="Alerts" create_jump_keys="true">
|
<menu label="Alerts" name="Alerts" create_jump_keys="true">
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</text>
|
</text>
|
||||||
<combo_box bevel_style="in" border_style="line" border_thickness="1" bottom_delta="-24"
|
<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"
|
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" />
|
select_all_on_focus_received="true" width="155" allow_text_entry="true" />
|
||||||
<check_box bottom="0" control_name="RememberName"
|
<check_box bottom="0" control_name="RememberName"
|
||||||
follows="left|bottom" font="SansSerifSmall" height="16"
|
follows="left|bottom" font="SansSerifSmall" height="16"
|
||||||
|
|||||||
Reference in New Issue
Block a user