From c775ae7cbd92099ee7a71c219a1b4b9ff7e7d82f Mon Sep 17 00:00:00 2001 From: "Graham Madarasz (Graham Linden)" Date: Thu, 26 Sep 2013 18:53:12 -0700 Subject: MAINT-3155 add cocoa equiv for former AppleEventManager shenanigans for SLURL handling --- indra/llwindow/llwindowmacosx-objc.h | 1 + indra/llwindow/llwindowmacosx-objc.mm | 2 +- indra/newview/llappdelegate-objc.mm | 13 +++++++++ indra/newview/llappviewermacosx.cpp | 53 ++++++++++++----------------------- 4 files changed, 33 insertions(+), 36 deletions(-) (limited to 'indra') diff --git a/indra/llwindow/llwindowmacosx-objc.h b/indra/llwindow/llwindowmacosx-objc.h index 32b3bfb078..2cae6f3f72 100755 --- a/indra/llwindow/llwindowmacosx-objc.h +++ b/indra/llwindow/llwindowmacosx-objc.h @@ -49,6 +49,7 @@ void handleQuit(); bool runMainLoop(); void initMainLoop(); void cleanupViewer(); +void handleUrl(const char* url); /* Defined in llwindowmacosx-objc.mm: */ int createNSApp(int argc, const char **argv); diff --git a/indra/llwindow/llwindowmacosx-objc.mm b/indra/llwindow/llwindowmacosx-objc.mm index 0354c2b717..0768d0352e 100755 --- a/indra/llwindow/llwindowmacosx-objc.mm +++ b/indra/llwindow/llwindowmacosx-objc.mm @@ -57,7 +57,7 @@ void setupCocoa() [[NSUserDefaults standardUserDefaults] setObject:@"NO" forKey:@"NSTreatUnknownArgumentsAsOpen"]; [pool release]; - + inited = true; } } diff --git a/indra/newview/llappdelegate-objc.mm b/indra/newview/llappdelegate-objc.mm index 30476b3d22..91251ed7c0 100644 --- a/indra/newview/llappdelegate-objc.mm +++ b/indra/newview/llappdelegate-objc.mm @@ -54,6 +54,19 @@ } [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(languageUpdated) name:@"NSTextInputContextKeyboardSelectionDidChangeNotification" object:nil]; + + [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self andSelector:@selector(handleGetURLEvent:withReplyEvent:) forEventClass:kInternetEventClass andEventID:kAEGetURL]; +} + +- (void) handleGetURLEvent:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent { + NSString *url= nil; + url = [[[[NSAppleEventManager sharedAppleEventManager]// 1 + currentAppleEvent]// 2 + paramDescriptorForKeyword:keyDirectObject]// 3 + stringValue];// 4 + + const char* url_utf8 = [url UTF8String]; + handleUrl(url_utf8); } - (void) applicationDidBecomeActive:(NSNotification *)notification diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 316c90d9d2..2723f0b90d 100755 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -483,41 +483,24 @@ bool LLAppViewerMacOSX::getMasterSystemAudioMute() return (mute != 0); } -OSErr AEGURLHandler(const AppleEvent *messagein, AppleEvent *reply, long refIn) +void handleUrl(const char* url_utf8) { - OSErr result = noErr; - DescType actualType; - char buffer[1024]; // Flawfinder: ignore - Size size; - - result = AEGetParamPtr ( - messagein, - keyDirectObject, - typeCString, - &actualType, - (Ptr)buffer, - sizeof(buffer), - &size); - - if(result == noErr) - { - std::string url = buffer; + if (url_utf8) + { + std::string url = url_utf8; + // Safari 3.2 silently mangles secondlife:///app/ URLs into + // secondlife:/app/ (only one leading slash). + // Fix them up to meet the URL specification. JC + const std::string prefix = "secondlife:/app/"; + std::string test_prefix = url.substr(0, prefix.length()); + LLStringUtil::toLower(test_prefix); + if (test_prefix == prefix) + { + url.replace(0, prefix.length(), "secondlife:///app/"); + } - // Safari 3.2 silently mangles secondlife:///app/ URLs into - // secondlife:/app/ (only one leading slash). - // Fix them up to meet the URL specification. JC - const std::string prefix = "secondlife:/app/"; - std::string test_prefix = url.substr(0, prefix.length()); - LLStringUtil::toLower(test_prefix); - if (test_prefix == prefix) - { - url.replace(0, prefix.length(), "secondlife:///app/"); - } - - LLMediaCtrl* web = NULL; - const bool trusted_browser = false; - LLURLDispatcher::dispatch(url, "", web, trusted_browser); - } - - return(result); + LLMediaCtrl* web = NULL; + const bool trusted_browser = false; + LLURLDispatcher::dispatch(url, "", web, trusted_browser); + } } -- cgit v1.2.3 From 942369270415fd1cdffb213e0c18038ba6e127c7 Mon Sep 17 00:00:00 2001 From: MaximB ProductEngine Date: Mon, 30 Sep 2013 11:41:16 +0300 Subject: MAINT-3193 FIXED crash with LLControlCache::LLControlCache: Control named RenderAutoMuteLoggingnot found. --- indra/newview/llavatarrenderinfoaccountant.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp index 5780268acb..9e3225a264 100644 --- a/indra/newview/llavatarrenderinfoaccountant.cpp +++ b/indra/newview/llavatarrenderinfoaccountant.cpp @@ -393,6 +393,6 @@ void LLAvatarRenderInfoAccountant::expireRenderInfoReportTimer(const LLUUID& reg // static bool LLAvatarRenderInfoAccountant::logRenderInfo() { - static LLCachedControl render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging"); + static LLCachedControl render_mute_logging_enabled(gSavedSettings, "RenderAutoMuteLogging", false); return render_mute_logging_enabled; } -- cgit v1.2.3 From f0a80bb49b43e8e6e2a53194f558c3385ba3214e Mon Sep 17 00:00:00 2001 From: PavelK ProductEngine Date: Fri, 6 Sep 2013 17:48:48 +0300 Subject: MAINT-3030 [CHUIBUG]Conversations pane has alignment issues when collapsed --- indra/newview/llfloaterimcontainer.cpp | 4 ++-- indra/newview/skins/default/xui/en/floater_im_container.xml | 8 ++++---- .../newview/skins/default/xui/en/panel_conversation_list_item.xml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) (limited to 'indra') diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp index f26cb477ee..aa3bec878a 100755 --- a/indra/newview/llfloaterimcontainer.cpp +++ b/indra/newview/llfloaterimcontainer.cpp @@ -790,8 +790,8 @@ void LLFloaterIMContainer::collapseConversationsPane(bool collapse, bool save_is mConversationsPane->setTargetDim(gSavedPerAccountSettings.getS32("ConversationsListPaneWidth")); } - S32 delta_width = - gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") - mConversationsPane->getMinDim(); + S32 delta_width = gSavedPerAccountSettings.getS32("ConversationsListPaneWidth") + - mConversationsPane->getMinDim() - mConversationsStack->getPanelSpacing() + 1; reshapeFloaterAndSetResizeLimits(collapse, delta_width); diff --git a/indra/newview/skins/default/xui/en/floater_im_container.xml b/indra/newview/skins/default/xui/en/floater_im_container.xml index 1215efb7f9..b639d534c3 100755 --- a/indra/newview/skins/default/xui/en/floater_im_container.xml +++ b/indra/newview/skins/default/xui/en/floater_im_container.xml @@ -41,7 +41,7 @@ auto_resize="false" user_resize="true" name="conversations_layout_panel" - min_dim="38" + min_dim="43" expanded_min_dim="136"> + width="36">