FIRE-13886: Extend settings backup to backup muted group chat configuration

Ansariel 2014-05-29 13:00:16 +02:00
parent cc75b3ba34
commit f3aefbdb5e
4 changed files with 27 additions and 5 deletions

View File

@ -29,9 +29,9 @@ public:
bool isMuted(const LLUUID &group) const;
void add(const LLUUID &group);
void remove(const LLUUID &group);
bool loadMuteList();
private:
bool loadMuteList();
bool saveMuteList();
std::string getFilePath() const;

View File

@ -116,6 +116,7 @@
#include "llsdserialize.h"
// Firestorm Includes
#include "exogroupmutelist.h"
#include "fsfloatercontacts.h" // TS: sort contacts list
#include "fsfloaterimcontainer.h"
#include "growlmanager.h"
@ -1007,13 +1008,19 @@ void LLFloaterPreference::onOpen(const LLSD& key)
getChild<LLUICtrl>("plain_text_chat_history")->setValue(gSavedSettings.getBOOL("PlainTextChatHistory"));
// <FS:CR> Show/hide Client Tag panel
bool show_client_tags = false;
bool in_opensim = false;
#ifdef OPENSIM
show_client_tags = LLGridManager::getInstance()->isInOpenSim();
in_opensim = LLGridManager::getInstance()->isInOpenSim();
#endif // OPENSIM
getChild<LLPanel>("client_tags_panel")->setVisible(show_client_tags);
getChild<LLPanel>("client_tags_panel")->setVisible(in_opensim);
// </FS:CR>
// <FS:Ansariel> Group mutes backup
LLScrollListItem* groupmute_item = getChild<LLScrollListCtrl>("restore_per_account_files_list")->getItem(LLSD("groupmutes"));
groupmute_item->setEnabled(in_opensim);
groupmute_item->getColumn(0)->setEnabled(in_opensim);
// </FS:Ansariel>
// Make sure the current state of prefs are saved away when
// when the floater is opened. That will make cancel do its
// job
@ -3908,6 +3915,13 @@ void FSPanelPreferenceBackup:: doRestoreSettings(const LLSD& notification, const
gToolBarView->clearToolbars();
LL_INFOS("SettingsBackup") << "reloading toolbars" << LL_ENDL;
gToolBarView->loadToolbars(FALSE);
#ifdef OPENSIM
if (LLGridManager::instance().isInOpenSim())
{
LL_INFOS("SettingsBackup") << "reloading group mute list" << LL_ENDL;
exoGroupMuteList::instance().loadMuteList();
}
#endif
LLPanelMainInventory::sSaveFilters = false;
}

View File

@ -70,6 +70,9 @@
<row name="restore_per_account_row_tphistory">
<column name="restore_per_account_files_label">Teleport-Liste</column>
</row>
<row name="restore_per_account_row_groupmutes">
<column name="restore_per_account_files_label">Deakt. Gruppenchats</column>
</row>
</scroll_list>
</layout_panel>
<layout_panel name="lp_restore_folders">

View File

@ -225,6 +225,11 @@ Settings groups to be restored (backup will always save all):
<column name="restore_per_account_files_label">Teleport History</column>
<column name="value">teleport_history.txt</column>
</row>
<row name="restore_per_account_row_groupmutes" value="groupmutes">
<column type="checkbox" name="restore_per_account_files_check" value="true" />
<column name="restore_per_account_files_label">Disabled Group Chats</column>
<column name="value">muted_groups.xml</column>
</row>
</scroll_list>
<!-- since enabled_control does not work properly on scroll list items and
enabling/disabling in code did not show any visual difference, we just use