mirror of
https://github.com/FirestormViewer/phoenix-firestorm.git
synced 2026-08-14 08:53:53 +00:00
Pull blocklist changes from develop
This commit is contained in:
@@ -170,7 +170,8 @@ void FSPanelBlockList::refreshBlockedList()
|
||||
{
|
||||
mBlockedList->deleteAllItems();
|
||||
|
||||
for (const auto& mute : LLMuteList::getInstance()->getMutes())
|
||||
const LLMuteList* mute_list = LLMuteList::getInstance();
|
||||
for (const auto& mute : mute_list->getMutes())
|
||||
{
|
||||
LLScrollListItem::Params item_p;
|
||||
item_p.enabled(true);
|
||||
@@ -185,8 +186,32 @@ void FSPanelBlockList::refreshBlockedList()
|
||||
mBlockedList->refreshLineHeight();
|
||||
|
||||
LLUICtrl* block_limit = getChild<LLUICtrl>("block_limit");
|
||||
block_limit->setTextArg("[COUNT]", llformat("%d", LLMuteList::getInstance()->getMutes().size()));
|
||||
block_limit->setTextArg("[COUNT]", llformat("%d", mute_list->getMutes().size()));
|
||||
block_limit->setTextArg("[LIMIT]", llformat("%d", gSavedSettings.getS32("MuteListLimit")));
|
||||
|
||||
updateEmptyListMessage();
|
||||
}
|
||||
|
||||
void FSPanelBlockList::updateEmptyListMessage()
|
||||
{
|
||||
static std::string no_blocked_msg = getString("no_blocked");
|
||||
static std::string no_filtered_msg = getString("no_filtered_blocked");
|
||||
static std::string loading_msg = getString("loading_blocked");
|
||||
static std::string failed_msg = getString("failed_blocked");
|
||||
|
||||
const LLMuteList* mute_list = LLMuteList::getInstance();
|
||||
if (!mute_list->isLoaded() && !mute_list->isFailed())
|
||||
{
|
||||
mBlockedList->setCommentText(loading_msg);
|
||||
}
|
||||
else if (mute_list->isFailed())
|
||||
{
|
||||
mBlockedList->setCommentText(failed_msg);
|
||||
}
|
||||
else
|
||||
{
|
||||
mBlockedList->setCommentText(mBlockedList->isFiltered() ? no_filtered_msg : no_blocked_msg);
|
||||
}
|
||||
}
|
||||
|
||||
void FSPanelBlockList::updateButtons()
|
||||
@@ -475,6 +500,8 @@ void FSPanelBlockList::onFilterEdit(std::string search_string)
|
||||
|
||||
// Apply new filter.
|
||||
mBlockedList->setFilterString(mFilterSubStringOrig);
|
||||
|
||||
updateEmptyListMessage();
|
||||
}
|
||||
|
||||
void FSPanelBlockList::onSortChanged()
|
||||
|
||||
@@ -87,6 +87,7 @@ private:
|
||||
void updateButtons();
|
||||
void removePicker();
|
||||
void onSortChanged();
|
||||
void updateEmptyListMessage();
|
||||
|
||||
// UI callbacks
|
||||
void removeMutes();
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
|
||||
<panel name="block_list_panel" width="300">
|
||||
<string name="no_blocked" value="Keine blockierten Einwohner oder Objekte."/>
|
||||
<string name="no_filtered_blocked" value="Keine blockierten Einwohner oder Objekte entsprechen den Filterkriterien."/>
|
||||
<string name="loading_blocked" value="Blockierte Einwohner und Objekte werden geladen..."/>
|
||||
<string name="failed_blocked" value="Blockliste ist derzeit nicht verfügbar."/>
|
||||
<panel label="bottom_panel" name="blocked_buttons_panel">
|
||||
<filter_editor label="Filtern" name="blocked_filter_input"/>
|
||||
<menu_button name="blocked_gear_btn" tool_tip="Aktionen für ausgewählte(s) Person/Objekt"/>
|
||||
<menu_button name="view_btn" tool_tip="Sortieroptionen"/>
|
||||
<menu_button name="plus_btn" tool_tip="Einwohner oder Objekt zum ignorieren auswählen"/>
|
||||
<button name="unblock_btn" tool_tip="Einwohner oder Objekt aus der Liste der ignorierten Einwohner oder Objekte entfernen"/>
|
||||
<menu_button name="plus_btn" tool_tip="Einwohner oder Objekt zum blockieren auswählen"/>
|
||||
<button name="unblock_btn" tool_tip="Einwohner oder Objekt aus der Liste der blockierten Einwohner oder Objekte entfernen"/>
|
||||
</panel>
|
||||
<text name="block_limit">
|
||||
Blockierte Einträge: [COUNT] ([LIMIT] max.)
|
||||
|
||||
@@ -10,6 +10,18 @@
|
||||
min_height="350"
|
||||
min_width="240"
|
||||
width="300">
|
||||
<string
|
||||
name="no_blocked"
|
||||
value="No blocked residents or objects." />
|
||||
<string
|
||||
name="no_filtered_blocked"
|
||||
value="No blocked residents or objects match your search." />
|
||||
<string
|
||||
name="loading_blocked"
|
||||
value="Loading blocked residents and objects..." />
|
||||
<string
|
||||
name="failed_blocked"
|
||||
value="Blocked list is currently unavailable." />
|
||||
<panel
|
||||
follows="left|top|right"
|
||||
height="27"
|
||||
|
||||
Reference in New Issue
Block a user