aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llimpanel.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llimpanel.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp
index 014c050..625da78 100644
--- a/linden/indra/newview/llimpanel.cpp
+++ b/linden/indra/newview/llimpanel.cpp
@@ -73,6 +73,7 @@
73#include "llhttpclient.h" 73#include "llhttpclient.h"
74#include "llmutelist.h" 74#include "llmutelist.h"
75#include "llstylemap.h" 75#include "llstylemap.h"
76#include <sys/stat.h>
76 77
77// 78//
78// Constants 79// Constants
@@ -1269,6 +1270,7 @@ BOOL LLFloaterIMPanel::postBuild()
1269 1270
1270 childSetAction("profile_callee_btn", onClickProfile, this); 1271 childSetAction("profile_callee_btn", onClickProfile, this);
1271 childSetAction("group_info_btn", onClickGroupInfo, this); 1272 childSetAction("group_info_btn", onClickGroupInfo, this);
1273 childSetAction("history_btn", onClickHistory, this);
1272 1274
1273 childSetAction("start_call_btn", onClickStartCall, this); 1275 childSetAction("start_call_btn", onClickStartCall, this);
1274 childSetAction("end_call_btn", onClickEndCall, this); 1276 childSetAction("end_call_btn", onClickEndCall, this);
@@ -1800,6 +1802,41 @@ void LLFloaterIMPanel::onClickProfile( void* userdata )
1800} 1802}
1801 1803
1802// static 1804// static
1805void LLFloaterIMPanel::onClickHistory( void* userdata )
1806{
1807 LLFloaterIMPanel* self = (LLFloaterIMPanel*) userdata;
1808
1809 if (self->mOtherParticipantUUID.notNull())
1810 {
1811 struct stat fileInfo;
1812 int result;
1813
1814 std::string fullname = self->getTitle();;
1815 //gCacheName->getFullName(self->mOtherParticipantUUID, fullname);
1816 //if(fullname == "(Loading...)")
1817 std::string file_path = gDirUtilp->getPerAccountChatLogsDir() + "\\" + fullname + ".txt";
1818
1819 // check if file exists by trying to get its attributes
1820 result = stat(file_path.c_str(), &fileInfo);
1821 if(result == 0)
1822 {
1823 char command[256];
1824 sprintf(command, "\"%s\\%s.txt\"", gDirUtilp->getPerAccountChatLogsDir().c_str(),fullname.c_str());
1825 gViewerWindow->getWindow()->ShellEx(command);
1826
1827 llinfos << command << llendl;
1828 }
1829 else
1830 {
1831 LLStringUtil::format_map_t args;
1832 args["[NAME]"] = fullname;
1833 gViewerWindow->alertXml("IMLogNotFound", args);
1834 llinfos << file_path << llendl;
1835 }
1836 }
1837}
1838
1839// static
1803void LLFloaterIMPanel::onClickGroupInfo( void* userdata ) 1840void LLFloaterIMPanel::onClickGroupInfo( void* userdata )
1804{ 1841{
1805 // Bring up the Profile window 1842 // Bring up the Profile window