aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2009-10-13 08:02:51 -0700
committerMcCabe Maxsted2009-10-13 08:02:51 -0700
commitf716f71a8266788cfcf1d7570a03104d06bcf97e (patch)
tree9bc4a727c1380a8300e1914e671f206e5152a0a2
parentUpdated inventory search to include description (from Emerald) (diff)
downloadmeta-impy-f716f71a8266788cfcf1d7570a03104d06bcf97e.zip
meta-impy-f716f71a8266788cfcf1d7570a03104d06bcf97e.tar.gz
meta-impy-f716f71a8266788cfcf1d7570a03104d06bcf97e.tar.bz2
meta-impy-f716f71a8266788cfcf1d7570a03104d06bcf97e.tar.xz
Applied show IM logs button from Emerald viewer and added an alert if there is no history
-rw-r--r--ChangeLog.txt11
-rw-r--r--linden/indra/llwindow/llwindow.h1
-rw-r--r--linden/indra/llwindow/llwindowwin32.cpp12
-rw-r--r--linden/indra/llwindow/llwindowwin32.h1
-rw-r--r--linden/indra/newview/llimpanel.cpp37
-rw-r--r--linden/indra/newview/llimpanel.h1
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/alerts.xml9
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml4
8 files changed, 75 insertions, 1 deletions
diff --git a/ChangeLog.txt b/ChangeLog.txt
index fa273d3..14ef3d3 100644
--- a/ChangeLog.txt
+++ b/ChangeLog.txt
@@ -1,5 +1,16 @@
12009-10-13 McCabe Maxsted <hakushakukun@gmail.com> 12009-10-13 McCabe Maxsted <hakushakukun@gmail.com>
2 2
3 * Applied show IM logs button from Emerald viewer and added an alert if there is no history.
4
5 modified: linden/indra/llwindow/llwindow.h
6 modified: linden/indra/llwindow/llwindowwin32.cpp
7 modified: linden/indra/llwindow/llwindowwin32.h
8 modified: linden/indra/newview/llimpanel.cpp
9 modified: linden/indra/newview/llimpanel.h
10 modified: linden/indra/newview/skins/default/xui/en-us/alerts.xml
11 modified: linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
12
13
3 * Updated inventory search to include description (from Emerald). 14 * Updated inventory search to include description (from Emerald).
4 15
5 modified: linden/indra/newview/llfolderview.cpp 16 modified: linden/indra/newview/llfolderview.cpp
diff --git a/linden/indra/llwindow/llwindow.h b/linden/indra/llwindow/llwindow.h
index 0acbcb9..0004e92 100644
--- a/linden/indra/llwindow/llwindow.h
+++ b/linden/indra/llwindow/llwindow.h
@@ -202,6 +202,7 @@ public:
202 virtual void updateLanguageTextInputArea() {} 202 virtual void updateLanguageTextInputArea() {}
203 virtual void interruptLanguageTextInput() {} 203 virtual void interruptLanguageTextInput() {}
204 virtual void spawnWebBrowser(const std::string& escaped_url) {}; 204 virtual void spawnWebBrowser(const std::string& escaped_url) {};
205 virtual void ShellEx(const std::string& command) {};
205 206
206 static std::string getFontListSans(); 207 static std::string getFontListSans();
207 208
diff --git a/linden/indra/llwindow/llwindowwin32.cpp b/linden/indra/llwindow/llwindowwin32.cpp
index 2944511..a9c7758 100644
--- a/linden/indra/llwindow/llwindowwin32.cpp
+++ b/linden/indra/llwindow/llwindowwin32.cpp
@@ -2885,6 +2885,18 @@ S32 OSMessageBoxWin32(const std::string& text, const std::string& caption, U32 t
2885 return retval; 2885 return retval;
2886} 2886}
2887 2887
2888void LLWindowWin32::ShellEx(const std::string& command )
2889{
2890 LLWString url_wstring = utf8str_to_wstring( command );
2891 llutf16string url_utf16 = wstring_to_utf16str( url_wstring );
2892
2893 SHELLEXECUTEINFO sei = { sizeof( sei ) };
2894 sei.fMask = SEE_MASK_FLAG_DDEWAIT;
2895 sei.nShow = SW_SHOWNORMAL;
2896 sei.lpVerb = L"open";
2897 sei.lpFile = url_utf16.c_str();
2898 ShellExecuteEx( &sei );
2899}
2888 2900
2889void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url ) 2901void LLWindowWin32::spawnWebBrowser(const std::string& escaped_url )
2890{ 2902{
diff --git a/linden/indra/llwindow/llwindowwin32.h b/linden/indra/llwindow/llwindowwin32.h
index 795fc79..bea55c6 100644
--- a/linden/indra/llwindow/llwindowwin32.h
+++ b/linden/indra/llwindow/llwindowwin32.h
@@ -110,6 +110,7 @@ public:
110 /*virtual*/ void updateLanguageTextInputArea(); 110 /*virtual*/ void updateLanguageTextInputArea();
111 /*virtual*/ void interruptLanguageTextInput(); 111 /*virtual*/ void interruptLanguageTextInput();
112 /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); 112 /*virtual*/ void spawnWebBrowser(const std::string& escaped_url);
113 /*virtual*/ void ShellEx(const std::string& command);
113 114
114 static std::string getFontListSans(); 115 static std::string getFontListSans();
115 116
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
diff --git a/linden/indra/newview/llimpanel.h b/linden/indra/newview/llimpanel.h
index 0f9c0f3..0699b12 100644
--- a/linden/indra/newview/llimpanel.h
+++ b/linden/indra/newview/llimpanel.h
@@ -230,6 +230,7 @@ public:
230 static void onTabClick( void* userdata ); 230 static void onTabClick( void* userdata );
231 231
232 static void onClickProfile( void* userdata ); 232 static void onClickProfile( void* userdata );
233 static void onClickHistory( void* userdata );
233 static void onClickGroupInfo( void* userdata ); 234 static void onClickGroupInfo( void* userdata );
234 static void onClickOfferTeleport( void* userdata ); 235 static void onClickOfferTeleport( void* userdata );
235 static void onClickClose( void* userdata ); 236 static void onClickClose( void* userdata );
diff --git a/linden/indra/newview/skins/default/xui/en-us/alerts.xml b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
index edfe62c..24683f0 100644
--- a/linden/indra/newview/skins/default/xui/en-us/alerts.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/alerts.xml
@@ -5222,6 +5222,15 @@ WARNING: Don't restore if you aren't sure where the object will go!
5222 </option> 5222 </option>
5223 </alert> 5223 </alert>
5224 5224
5225 <alert modal="true" name="IMLogNotFound">
5226 <message name="message">
5227 IM history could not be found for [NAME].
5228 </message>
5229 <option name="OK">
5230 OK
5231 </option>
5232 </alert>
5233
5225 <!-- [RLVa:KB] --> 5234 <!-- [RLVa:KB] -->
5226 <alert modal="true" name="FirstRLVGiveToRLV"> 5235 <alert modal="true" name="FirstRLVGiveToRLV">
5227 <message name="message"> 5236 <message name="message">
diff --git a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
index 9a60f57..22e7f1e 100644
--- a/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
+++ b/linden/indra/newview/skins/default/xui/en-us/floater_instant_message.xml
@@ -39,9 +39,11 @@
39 <button bottom_delta="0" follows="left|top" font="SansSerif" 39 <button bottom_delta="0" follows="left|top" font="SansSerif"
40 halign="center" bottom ="-40" height="20" label="Offer Teleport" left_delta="85" 40 halign="center" bottom ="-40" height="20" label="Offer Teleport" left_delta="85"
41 mouse_opaque="true" name="offer_tp_btn" scale_image="true" width="102" /> 41 mouse_opaque="true" name="offer_tp_btn" scale_image="true" width="102" />
42 <button bottom="-40" follows="left|top" halign="center" height="20" label="History" left_delta="107"
43 name="history_btn" visible="true" width="85" />
42 <button bottom="-40" follows="left|top" halign="center" height="20" 44 <button bottom="-40" follows="left|top" halign="center" height="20"
43 image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left" 45 image_overlay="icn_voice-call-start.tga" image_overlay_alignment="left"
44 label="Call" left_delta="107" name="start_call_btn" width="100" /> 46 label="Call" left_delta="92" name="start_call_btn" width="100" />
45 <button bottom="-40" follows="left|top" halign="center" height="20" 47 <button bottom="-40" follows="left|top" halign="center" height="20"
46 image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left" 48 image_overlay="icn_voice-call-end.tga" image_overlay_alignment="left"
47 label="End Call" left_delta="0" name="end_call_btn" pad_right="10" 49 label="End Call" left_delta="0" name="end_call_btn" pad_right="10"