CHUI-721 FIXED Delete transcripts when performing Clear log action.
parent
2fe6fce018
commit
2f6ffe2183
|
|
@ -531,7 +531,14 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD&
|
|||
{
|
||||
if (0 == LLNotificationsUtil::getSelectedOption(notification, response))
|
||||
{
|
||||
deleteTranscripts();
|
||||
mConversations.clear();
|
||||
notifyObservers();
|
||||
}
|
||||
}
|
||||
|
||||
void LLConversationLog::deleteTranscripts()
|
||||
{
|
||||
gDirUtilp->deleteFilesInDir(gDirUtilp->getPerAccountChatLogsDir(), "*." + LL_TRANSCRIPT_FILE_EXTENSION);
|
||||
LLFloaterIMSessionTab::processChatHistoryStyleUpdate(true);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -140,6 +140,7 @@ public:
|
|||
|
||||
void onClearLog();
|
||||
void onClearLogResponse(const LLSD& notification, const LLSD& response);
|
||||
void deleteTranscripts();
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
|||
|
|
@ -460,9 +460,6 @@ BOOL LLFloaterPreference::postBuild()
|
|||
// set 'enable' property for 'Clear log...' button
|
||||
changed();
|
||||
|
||||
// set 'enable' property for 'Delete transcripts...' button
|
||||
updateDeleteTranscriptsButton();
|
||||
|
||||
LLLogChat::setSaveHistorySignal(boost::bind(&LLFloaterPreference::onLogChatHistorySaved, this));
|
||||
|
||||
return TRUE;
|
||||
|
|
@ -1587,13 +1584,8 @@ void LLFloaterPreference::onDeleteTranscriptsResponse(const LLSD& notification,
|
|||
{
|
||||
if (0 == LLNotificationsUtil::getSelectedOption(notification, response))
|
||||
{
|
||||
gDirUtilp->deleteFilesInDir(gDirUtilp->getPerAccountChatLogsDir(), "*." + LL_TRANSCRIPT_FILE_EXTENSION);
|
||||
|
||||
std::vector<std::string> list_of_transcriptions_file_names;
|
||||
LLLogChat::getListOfTranscriptFiles(list_of_transcriptions_file_names);
|
||||
getChild<LLButton>("delete_transcripts")->setEnabled(list_of_transcriptions_file_names.size() > 0);
|
||||
|
||||
LLFloaterIMSessionTab::processChatHistoryStyleUpdate(true);
|
||||
LLConversationLog::instance().deleteTranscripts();
|
||||
updateDeleteTranscriptsButton();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1668,6 +1660,10 @@ void LLFloaterPreference::selectChatPanel()
|
|||
void LLFloaterPreference::changed()
|
||||
{
|
||||
getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0);
|
||||
|
||||
// set 'enable' property for 'Delete transcripts...' button
|
||||
updateDeleteTranscriptsButton();
|
||||
|
||||
}
|
||||
|
||||
//------------------------------Updater---------------------------------------
|
||||
|
|
|
|||
Loading…
Reference in New Issue