mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-29 21:57:39 +00:00
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:
parent
bc81c42dab
commit
7dda819713
2 changed files with 17 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue