Changeset View
Changeset View
Standalone View
Standalone View
intern/ghost/intern/GHOST_SystemCocoa.mm
| Show First 20 Lines • Show All 1,356 Lines • ▼ Show 20 Lines | bool GHOST_SystemCocoa::handleOpenDocumentRequest(void *filepathStr) | ||||
| /* Discard event if we are in cursor grab sequence, | /* Discard event if we are in cursor grab sequence, | ||||
| * it'll lead to "stuck cursor" situation if the alert panel is raised */ | * it'll lead to "stuck cursor" situation if the alert panel is raised */ | ||||
| if (window && window->getCursorGrabModeIsWarp()) | if (window && window->getCursorGrabModeIsWarp()) | ||||
| return NO; | return NO; | ||||
| // Check open windows if some changes are not saved | // Check open windows if some changes are not saved | ||||
| if (m_windowManager->getAnyModifiedState()) { | if (m_windowManager->getAnyModifiedState()) { | ||||
| @autoreleasepool { | @autoreleasepool | ||||
| { | |||||
| NSAlert *alert = [[NSAlert alloc] init]; | NSAlert *alert = [[NSAlert alloc] init]; | ||||
| NSString *title = [NSString stringWithFormat:@"Opening %@", [filepath lastPathComponent]]; | NSString *title = [NSString stringWithFormat:@"Opening %@", [filepath lastPathComponent]]; | ||||
| NSString *text = @"Current document has not been saved.\nDo you really want to proceed?"; | NSString *text = @"Current document has not been saved.\nDo you really want to proceed?"; | ||||
| [alert addButtonWithTitle:@"Open"]; | [alert addButtonWithTitle:@"Open"]; | ||||
| [alert addButtonWithTitle:@"Cancel"]; | [alert addButtonWithTitle:@"Cancel"]; | ||||
| [alert setMessageText:title]; | [alert setMessageText:title]; | ||||
| [alert setInformativeText:text]; | [alert setInformativeText:text]; | ||||
| [alert setAlertStyle:NSAlertStyleInformational]; | [alert setAlertStyle:NSAlertStyleInformational]; | ||||
| ▲ Show 20 Lines • Show All 589 Lines • Show Last 20 Lines | |||||