Implement -extendPowerOffBy:

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@21789 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-10-09 09:10:56 +00:00
parent bc81c42dab
commit 7dda819713
2 changed files with 17 additions and 3 deletions

View file

@ -6,6 +6,7 @@
the extra copies AppCopy1 AppCoppy2 etc.
* Source/NSWorkspace.m: Use advertised port name for the app name so
that other apps can contact it.
Implement ([-extendPowerOffBy:]) to ask workspace application.
* Tools/gclose.m: Triavial utility ... counterpart for gopen ...
close doen an application.
* Tools/GNUmakefile: build gclose

View file

@ -1395,12 +1395,25 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath
}
/*
* Requesting Additional Time before Power Off or Logout
* Requesting Additional Time before Power Off or Logout<br />
* Returns the amount of time actually granted (which may be less than
* requested).<br />
* Times are measured in milliseconds.
*/
- (int) extendPowerOffBy: (int)requested
{
// FIXME
return 0;
int result = 0;
id app = [self _workspaceApplication];
if (app != nil)
{
NS_DURING
result = [app extendPowerOffBy: requested];
NS_HANDLER
result = 0;
NS_ENDHANDLER
}
return result;
}
@end