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.

git-svn-id: svn://10.0.0.236/trunk@13348 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
sdagley%netscape.com
1998-10-23 00:03:43 +00:00
parent d89b691fba
commit b5b273d3ef
2 changed files with 28 additions and 0 deletions

View File

@@ -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
}