aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-09-18 00:23:20 -0700
committerMcCabe Maxsted2010-09-18 00:23:20 -0700
commit4616987a25b6c0285e618173ccabce21f2a50926 (patch)
tree6b1c78bd7c4b4c0f658619464de2a386a766cffb /linden
parentUI Scale Reset button finds the actual default, not hardcoded. (diff)
parentFixed events handling on osx to behave correctly on 10.5+ compilation runs. (diff)
downloadmeta-impy-4616987a25b6c0285e618173ccabce21f2a50926.zip
meta-impy-4616987a25b6c0285e618173ccabce21f2a50926.tar.gz
meta-impy-4616987a25b6c0285e618173ccabce21f2a50926.tar.bz2
meta-impy-4616987a25b6c0285e618173ccabce21f2a50926.tar.xz
Merge remote branch 'elektra/weekly' into weekly
Diffstat (limited to 'linden')
-rw-r--r--linden/indra/llwindow/llwindowmacosx.cpp35
-rw-r--r--linden/indra/llwindow/llwindowmacosx.h1
-rw-r--r--linden/indra/newview/llchatbar.cpp5
-rw-r--r--linden/indra/newview/llimpanel.cpp8
4 files changed, 40 insertions, 9 deletions
diff --git a/linden/indra/llwindow/llwindowmacosx.cpp b/linden/indra/llwindow/llwindowmacosx.cpp
index 7e7e0af..7efba51 100644
--- a/linden/indra/llwindow/llwindowmacosx.cpp
+++ b/linden/indra/llwindow/llwindowmacosx.cpp
@@ -1153,16 +1153,15 @@ void LLWindowMacOSX::gatherInput()
1153 } 1153 }
1154 break; 1154 break;
1155 1155
1156 case kHighLevelEvent:
1157 AEProcessAppleEvent (&evt);
1158 break;
1159
1160 case updateEvt: 1156 case updateEvt:
1161 // We shouldn't be getting these regularly (since our window will be buffered), but we need to handle them correctly... 1157 // We shouldn't be getting these regularly (since our window will be buffered), but we need to handle them correctly...
1162 BeginUpdate((WindowRef)evt.message); 1158 BeginUpdate((WindowRef)evt.message);
1163 EndUpdate((WindowRef)evt.message); 1159 EndUpdate((WindowRef)evt.message);
1164 break; 1160 break;
1165 1161
1162 default:
1163 AEProcessAppleEvent (&evt);
1164 break;
1166 } 1165 }
1167 } 1166 }
1168} 1167}
@@ -3163,8 +3162,6 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url)
3163 OSStatus result = noErr; 3162 OSStatus result = noErr;
3164 CFURLRef urlRef = NULL; 3163 CFURLRef urlRef = NULL;
3165 3164
3166 llinfos << "Opening URL " << escaped_url << llendl;
3167
3168 CFStringRef stringRef = CFStringCreateWithCString(NULL, escaped_url.c_str(), kCFStringEncodingUTF8); 3165 CFStringRef stringRef = CFStringCreateWithCString(NULL, escaped_url.c_str(), kCFStringEncodingUTF8);
3169 if (stringRef) 3166 if (stringRef)
3170 { 3167 {
@@ -3194,6 +3191,32 @@ void LLWindowMacOSX::spawnWebBrowser(const std::string& escaped_url)
3194 } 3191 }
3195} 3192}
3196 3193
3194void LLWindowMacOSX::ShellEx(const std::string& command)
3195{
3196 OSStatus result = noErr;
3197 CFURLRef urlRef = NULL;
3198
3199 CFStringRef stringRef = CFStringCreateWithCString(NULL, command.c_str(), kCFStringEncodingUTF8);
3200 if (stringRef)
3201 {
3202 urlRef = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, stringRef, kCFURLPOSIXPathStyle, false);
3203 CFRelease(stringRef);
3204 }
3205
3206 if (urlRef)
3207 {
3208 result = LSOpenCFURLRef(urlRef, NULL);
3209 if (result != noErr)
3210 llinfos << "Error " << result << " on open." << llendl;
3211
3212 CFRelease(urlRef);
3213 }
3214 else
3215 {
3216 llinfos << "Error: couldn't create URL." << llendl;
3217 }
3218}
3219
3197BOOL LLWindowMacOSX::dialog_color_picker ( F32 *r, F32 *g, F32 *b) 3220BOOL LLWindowMacOSX::dialog_color_picker ( F32 *r, F32 *g, F32 *b)
3198{ 3221{
3199 BOOL retval = FALSE; 3222 BOOL retval = FALSE;
diff --git a/linden/indra/llwindow/llwindowmacosx.h b/linden/indra/llwindow/llwindowmacosx.h
index bf5bfc0..9e87e9f 100644
--- a/linden/indra/llwindow/llwindowmacosx.h
+++ b/linden/indra/llwindow/llwindowmacosx.h
@@ -113,6 +113,7 @@ public:
113 /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b); 113 /*virtual*/ void allowLanguageTextInput(LLPreeditor *preeditor, BOOL b);
114 /*virtual*/ void interruptLanguageTextInput(); 114 /*virtual*/ void interruptLanguageTextInput();
115 /*virtual*/ void spawnWebBrowser(const std::string& escaped_url); 115 /*virtual*/ void spawnWebBrowser(const std::string& escaped_url);
116 /*virtual*/ void ShellEx(const std::string& command);
116 117
117 static std::vector<std::string> getDynamicFallbackFontList(); 118 static std::vector<std::string> getDynamicFallbackFontList();
118 119
diff --git a/linden/indra/newview/llchatbar.cpp b/linden/indra/newview/llchatbar.cpp
index 2981958..eaa8cc8 100644
--- a/linden/indra/newview/llchatbar.cpp
+++ b/linden/indra/newview/llchatbar.cpp
@@ -215,16 +215,17 @@ BOOL LLChatBar::handleKeyHere( KEY key, MASK mask )
215 { 215 {
216 if (mInputEditor) 216 if (mInputEditor)
217 { 217 {
218 std::string txt(mInputEditor->getText());
219
218 std::vector<LLUUID> avatar_ids; 220 std::vector<LLUUID> avatar_ids;
219 std::vector<LLVector3d> positions; 221 std::vector<LLVector3d> positions;
220 LLWorld::getInstance()->getAvatars(&avatar_ids, &positions); 222 LLWorld::getInstance()->getAvatars(&avatar_ids, &positions);
221 223
222 if (!avatar_ids.empty()) 224 if (!avatar_ids.empty() && !txt.empty())
223 { 225 {
224 mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one 226 mInputEditor->deleteSelection(); // Clean up prev completion before attempting a new one
225 227
226 S32 cursorPos = mInputEditor->getCursor(); 228 S32 cursorPos = mInputEditor->getCursor();
227 std::string txt(mInputEditor->getText());
228 229
229 if (mCompletionHolder.last_txt != mInputEditor->getText()) 230 if (mCompletionHolder.last_txt != mInputEditor->getText())
230 { 231 {
diff --git a/linden/indra/newview/llimpanel.cpp b/linden/indra/newview/llimpanel.cpp
index 797e997..808a2c9 100644
--- a/linden/indra/newview/llimpanel.cpp
+++ b/linden/indra/newview/llimpanel.cpp
@@ -1875,7 +1875,13 @@ void LLFloaterIMPanel::onCommitCombo(LLUICtrl* caller, void* userdata)
1875 std::string fullname = self->getTitle(); 1875 std::string fullname = self->getTitle();
1876 //gCacheName->getFullName(self->mOtherParticipantUUID, fullname); 1876 //gCacheName->getFullName(self->mOtherParticipantUUID, fullname);
1877 //if(fullname == "(Loading...)") 1877 //if(fullname == "(Loading...)")
1878 std::string file = gDirUtilp->getPerAccountChatLogsDir() + "\\" + fullname + ".txt"; 1878 std::string separator;
1879#ifdef LL_WINDOWS
1880 separator = "\\";
1881#else
1882 separator = "/";
1883#endif
1884 std::string file = gDirUtilp->getPerAccountChatLogsDir() + separator + fullname + ".txt";
1879 1885
1880 llstat stat_info; 1886 llstat stat_info;
1881 if (LLFile::stat(file.c_str(), &stat_info)) 1887 if (LLFile::stat(file.c_str(), &stat_info))