mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 20:01:11 +00:00
Fixes for bug #29085
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@29864 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8feeb60a36
commit
8dd7827584
2 changed files with 13 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
2005-03-07 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSAlert.m: Cope gracefully with being called from an non-gui
|
||||
applications (ie where NSApp is not initialized).
|
||||
* Tools/gopen.m: Print same warning as OSX if item to open is not a
|
||||
URL and the named fiel does not exist.
|
||||
|
||||
2005-03-05 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSWorkspace.m: update NSTask header
|
||||
|
|
|
@ -1379,6 +1379,12 @@ NSRunAlertPanel(
|
|||
message = [NSString stringWithFormat: msg arguments: ap];
|
||||
va_end(ap);
|
||||
|
||||
if (NSApp == nil)
|
||||
{
|
||||
// No NSApp ... not running in a gui application so just log.
|
||||
NSLog(@"%@", message);
|
||||
return NSAlertFirstButtonReturn;
|
||||
}
|
||||
if (defaultButton == nil)
|
||||
{
|
||||
defaultButton = @"OK";
|
||||
|
|
Loading…
Reference in a new issue