summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewermacosx.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-08-28 23:57:41 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-08-28 23:57:41 +0000
commit4a6bacea0f8dcff959028f285bc533852da608b5 (patch)
tree7f49b429051e550f70917ccbcdd1c27bf86f5bdf /indra/newview/llappviewermacosx.cpp
parentac4766d4354ee1945f1569a94d755e3e7c0cd566 (diff)
merge viewer/viewer_1-21 94170-94770 -> release
merge viewer/viewer_1-21-0 94830-95157 -> release Includes: QAR-786 Sandbox buildme for viewer + server Release Notes on the wiki! QAR-797 teleport failures (DEV-6198 / SVC-972) mergeme
Diffstat (limited to 'indra/newview/llappviewermacosx.cpp')
-rw-r--r--indra/newview/llappviewermacosx.cpp115
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.