From f3aefbdb5ee8d075f316897d3f47b6c0ec26d28f Mon Sep 17 00:00:00 2001 From: Ansariel Date: Thu, 29 May 2014 13:00:16 +0200 Subject: [PATCH] FIRE-13886: Extend settings backup to backup muted group chat configuration --- indra/newview/exogroupmutelist.h | 2 +- indra/newview/llfloaterpreference.cpp | 22 +++++++++++++++---- .../xui/de/panel_preferences_backup.xml | 3 +++ .../xui/en/panel_preferences_backup.xml | 5 +++++ 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/indra/newview/exogroupmutelist.h b/indra/newview/exogroupmutelist.h index 13ac4adb3b..548cae6cd6 100644 --- a/indra/newview/exogroupmutelist.h +++ b/indra/newview/exogroupmutelist.h @@ -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; diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp index e285331f50..65bc57015e 100644 --- a/indra/newview/llfloaterpreference.cpp +++ b/indra/newview/llfloaterpreference.cpp @@ -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("plain_text_chat_history")->setValue(gSavedSettings.getBOOL("PlainTextChatHistory")); // 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("client_tags_panel")->setVisible(show_client_tags); + getChild("client_tags_panel")->setVisible(in_opensim); // - + + // Group mutes backup + LLScrollListItem* groupmute_item = getChild("restore_per_account_files_list")->getItem(LLSD("groupmutes")); + groupmute_item->setEnabled(in_opensim); + groupmute_item->getColumn(0)->setEnabled(in_opensim); + // + // 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; } diff --git a/indra/newview/skins/default/xui/de/panel_preferences_backup.xml b/indra/newview/skins/default/xui/de/panel_preferences_backup.xml index d3a64235e2..16909d56ff 100644 --- a/indra/newview/skins/default/xui/de/panel_preferences_backup.xml +++ b/indra/newview/skins/default/xui/de/panel_preferences_backup.xml @@ -70,6 +70,9 @@ Teleport-Liste + + Deakt. Gruppenchats + diff --git a/indra/newview/skins/default/xui/en/panel_preferences_backup.xml b/indra/newview/skins/default/xui/en/panel_preferences_backup.xml index e254796666..78ed2a3675 100644 --- a/indra/newview/skins/default/xui/en/panel_preferences_backup.xml +++ b/indra/newview/skins/default/xui/en/panel_preferences_backup.xml @@ -225,6 +225,11 @@ Settings groups to be restored (backup will always save all): Teleport History teleport_history.txt + + + Disabled Group Chats + muted_groups.xml +