Minor cleanup in Omnifilter
Small cleanup inspired by a coversation with Zi. Remove a redundant callback and ensure the owner UUID is handled properly. Signed-off-by: PanteraPolnocy <panterapolnocy@gmail.com>master
parent
4c745004bc
commit
4a430585c4
|
|
@ -261,7 +261,7 @@ void Omnifilter::onOwnerChanged()
|
|||
{
|
||||
static LLColor4 default_text_color = mOwnerCtrl->getFgColor();
|
||||
|
||||
if (LLUUID::validate(mOwnerCtrl->getValue()))
|
||||
if (LLUUID::validate(mOwnerCtrl->getValue().asString()))
|
||||
{
|
||||
mOwnerCtrl->setFgColor(default_text_color);
|
||||
}
|
||||
|
|
@ -372,7 +372,6 @@ bool Omnifilter::postBuild()
|
|||
mRemoveNeedleBtn->setCommitCallback(boost::bind(&Omnifilter::onRemoveNeedleClicked, this));
|
||||
mNeedleNameCtrl->setCommitCallback(boost::bind(&Omnifilter::onNeedleNameChanged, this));
|
||||
mSenderNameCtrl->setCommitCallback(boost::bind(&Omnifilter::onNeedleChanged, this));
|
||||
mContentCtrl->setCommitCallback(boost::bind(&Omnifilter::onNeedleChanged, this));
|
||||
mSenderCaseSensitiveCheck->setCommitCallback(boost::bind(&Omnifilter::onNeedleChanged, this));
|
||||
mSenderMatchTypeCombo->setCommitCallback(boost::bind(&Omnifilter::onNeedleChanged, this));
|
||||
mContentCtrl->setCommitCallback(boost::bind(&Omnifilter::onNeedleChanged, this));
|
||||
|
|
|
|||
|
|
@ -319,6 +319,12 @@ void OmnifilterEngine::loadNeedles()
|
|||
new_needle.mSenderNameCaseInsensitive = needle_data["sender_name_case_insensitive"].asBoolean();
|
||||
new_needle.mContentCaseInsensitive = needle_data["content_case_insensitive"].asBoolean();
|
||||
|
||||
const std::string owner_id_str = needle_data["owner_id"].asString();
|
||||
if (!owner_id_str.empty())
|
||||
{
|
||||
new_needle.mOwnerID.set(owner_id_str);
|
||||
}
|
||||
|
||||
mNeedles[new_needle_name] = new_needle;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue