diff options
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r-- | indra/newview/llappviewermacosx.cpp | 115 |
1 files changed, 0 insertions, 115 deletions
diff --git a/indra/newview/llappviewermacosx.cpp b/indra/newview/llappviewermacosx.cpp index 4d0b96ba73..bad4746870 100644 --- a/indra/newview/llappviewermacosx.cpp +++ b/indra/newview/llappviewermacosx.cpp @@ -309,121 +309,6 @@ OSStatus simpleDialogHandler(EventHandlerCallRef handler, EventRef event, void * return(result); } -OSStatus DisplayReleaseNotes(void) -{ - OSStatus err; - IBNibRef nib = NULL; - WindowRef window = NULL; - - err = CreateNibReference(CFSTR("SecondLife"), &nib); - - if(err == noErr) - { - CreateWindowFromNib(nib, CFSTR("Release Notes"), &window); - } - - if(err == noErr) - { - // Get the text view control - HIViewRef textView; - ControlID id; - - id.signature = 'text'; - id.id = 0; - - std::string releaseNotesText; - - _read_file_into_string(releaseNotesText, "releasenotes.txt"); // Flawfinder: ignore - - err = HIViewFindByID(HIViewGetRoot(window), id, &textView); - - if(err == noErr) - { - // Convert from the encoding used in the release notes. - CFStringRef str = CFStringCreateWithBytes( - NULL, - (const UInt8*)releaseNotesText.c_str(), - releaseNotesText.size(), - kCFStringEncodingWindowsLatin1, // This matches the way the Windows version displays the release notes. - FALSE); - - if(str != NULL) - { - int size = CFStringGetLength(str); - - if(size > 0) - { - UniChar *chars = new UniChar[size + 1]; - CFStringGetCharacters(str, CFRangeMake(0, size), chars); - - err = TXNSetData(HITextViewGetTXNObject(textView), kTXNUnicodeTextData, chars, size * sizeof(UniChar), kTXNStartOffset, kTXNStartOffset); - - delete[] chars; - } - - CFRelease(str); - } - else - { - // Creating the string failed. Probably an encoding problem. Display SOMETHING... - err = TXNSetData(HITextViewGetTXNObject(textView), kTXNTextData, releaseNotesText.c_str(), releaseNotesText.size(), kTXNStartOffset, kTXNStartOffset); - } - } - - // Set the selection to the beginning of the text and scroll it into view. - if(err == noErr) - { - err = TXNSetSelection(HITextViewGetTXNObject(textView), kTXNStartOffset, kTXNStartOffset); - } - - if(err == noErr) - { - // This function returns void. - TXNShowSelection(HITextViewGetTXNObject(textView), false); - } - } - - if(err == noErr) - { - ShowWindow(window); - } - - if(err == noErr) - { - // Set up an event handler for the window. - EventHandlerRef handler = NULL; - EventTypeSpec handlerEvents[] = - { - { kEventClassCommand, kEventCommandProcess } - }; - - InstallWindowEventHandler( - window, - NewEventHandlerUPP(simpleDialogHandler), - GetEventTypeCount (handlerEvents), - handlerEvents, - (void*)window, - &handler); - } - - if(err == noErr) - { - RunAppModalLoopForWindow(window); - } - - if(window != NULL) - { - DisposeWindow(window); - } - - if(nib != NULL) - { - DisposeNibReference(nib); - } - - return(err); -} - void init_apple_menu(const char* product) { // Load up a proper menu bar. |