From d57ea0355b26a7166b859636b47824ce615b66d1 Mon Sep 17 00:00:00 2001 From: "sdagley%netscape.com" Date: Fri, 23 Oct 1998 00:03:43 +0000 Subject: [PATCH] First landing of Apple's changes for NSL support from the Open Location in Navigator dialog. Currently #ifdef'ed out with BUILD_NSL_SUPPORT tag as we haven't figured out how to distribute the required NSL header and library yet. Hopefully that will be addressed soon. --- cmd/macfe/central/uapp.cp | 28 +++++++++++++++++++++++ cmd/macfe/rsrc/navigator/BrowserRat.rsrc | Bin 9800 -> 9896 bytes 2 files changed, 28 insertions(+) diff --git a/cmd/macfe/central/uapp.cp b/cmd/macfe/central/uapp.cp index a51057d0ff5b..cda9d895c10a 100644 --- a/cmd/macfe/central/uapp.cp +++ b/cmd/macfe/central/uapp.cp @@ -185,6 +185,12 @@ PREventQueue *mozilla_event_queue = NULL; #include "privacy.h" +//#define BUILD_NSL_SUPPORT 1 // Are we using Apple's NSL support code? +#ifdef BUILD_NSL_SUPPORT +#define kNSLGetURLRequestStringID 800 +#include "NSLStandardURL.h" +#endif + // HERE ONLY UNTIL NAV SERVICES CODE MERGED INTO TIP Boolean SimpleOpenDlog ( short numTypes, const OSType typeList[], FSSpec* outFSSpec ) ; @@ -4189,6 +4195,25 @@ CFrontApp::ProcessNextEvent() void CFrontApp::DoOpenURLDialog(void) { +#ifdef BUILD_NSL_SUPPORT + if ( NSLStandardLibraryPresent() ) // if the NSL dialog shared lib is available use it! + { + char* returnedURL = NULL; + Str255 serviceList; + + ::GetIndString( serviceList, kNSLGetURLRequestStringID, 1 ); + p2cstr( serviceList ); + + if ( NSLStandardGetURL( NULL, (char*)serviceList, true, &returnedURL ) ) + { + // ok the user clicked ok and has returned a url. Use it and dispose... + DoGetURL(returnedURL); + ::DisposePtr(returnedURL); + } + } + else // otherwise just do what we used to and make the user type it in + { +#endif StBlockingDialogHandler theHandler(liLoadItemWind, this); LWindow* theDialog = theHandler.GetDialog(); LEditField* theEdit = (LEditField*)theDialog->FindPaneByID('edit'); @@ -4209,6 +4234,9 @@ void CFrontApp::DoOpenURLDialog(void) curl = (unsigned char*)purl; DoGetURL(curl); } +#ifdef BUILD_NSL_SUPPORT + } +#endif } diff --git a/cmd/macfe/rsrc/navigator/BrowserRat.rsrc b/cmd/macfe/rsrc/navigator/BrowserRat.rsrc index b0e4397e8e1262d2820ec6531c29634575f97bac..983421212469b063c7560ebfbb8d58dd843a6553 100644 GIT binary patch delta 493 zcmX@%v%+_Rft;Eb0|Nsm1A|%zkXB$|U<6X~Wef~*K+JY!qMreOoq=y^Ua4bAiC#uQ zPMyKTUS*z5PPNiNbwHr{b>kjUxtQoB7tNaNpBfo3umA-?W-x%%0I@8HjSNJJQxem2 zQY%&SQcH@H6AM!HlJj#Jn2q&}8Tg%w^2>`;i-HnM^ooj$k|EkApOaHzG@krf&fHy# zfl)m?HAx{jwWut$s8}bXq@(~$6kEH61i*#UN(!veeZsym%)~zkXrc`BrODIf)$3Up zPlY5V`7kguv6Uy6Bmrr&0LKtz1_q|I Dv?GB) delta 421 zcmY+;y-UMT5CHH?(h7yrx`>OmDWR=6gcu8UQPJw4w57D6h=Y(mBRt#Yg_mg2LBYXI z=*RBhqKiZ6>L^8=97LRS64bvyoV*Nz9vr{p?l|tMaF=guvE(NJgaA@gs0<(=@p*t4 z=E!xYs6|<$PCYrJ&X`V(akX=%g!}bw822zzqy3w)SWk;51ie>|&oxWh))y?k=^6xZ z>|X