mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-02 11:31:00 +00:00
Dummy implementation for [hideOtherApplications:] and
[unhideAllApplications:]. Simple implementation for [runModalForWindow:relativeToWindow:], [endSheet:] and [beginSheet:...]. Removed various uneeded [update] and [sizeToFit] calls for menu operations. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@10922 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2cea0d9789
commit
db29aba37c
1 changed files with 53 additions and 15 deletions
|
@ -814,6 +814,16 @@ static NSCell* tileCell = nil;
|
||||||
return _app_is_active;
|
return _app_is_active;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) hideOtherApplications: (id)sender
|
||||||
|
{
|
||||||
|
// FIXME Currently does nothing
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) unhideAllApplications: (id)sender
|
||||||
|
{
|
||||||
|
// FIXME Currently does nothing
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Running the main event loop
|
* Running the main event loop
|
||||||
*/
|
*/
|
||||||
|
@ -1148,6 +1158,46 @@ static NSCell* tileCell = nil;
|
||||||
_session->runState = returnCode;
|
_session->runState = returnCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (int) runModalForWindow: (NSWindow *)theWindow
|
||||||
|
relativeToWindow: (NSWindow *)docWindow
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
return [self runModalForWindow: theWindow];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) beginSheet: (NSWindow *)sheet
|
||||||
|
modalForWindow: (NSWindow *)docWindow
|
||||||
|
modalDelegate: (id)modalDelegate
|
||||||
|
didEndSelector: (SEL)didEndSelector
|
||||||
|
contextInfo: (void *)contextInfo
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = [self runModalForWindow: sheet
|
||||||
|
relativeToWindow: docWindow];
|
||||||
|
|
||||||
|
if ([modalDelegate respondsToSelector: didEndSelector])
|
||||||
|
// FIXME Those this work on all platforms???
|
||||||
|
[modalDelegate performSelector: didEndSelector
|
||||||
|
withObject: (NSObject*)ret
|
||||||
|
withObject: contextInfo];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) endSheet: (NSWindow *)sheet
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
[self stopModal];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) endSheet: (NSWindow *)sheet
|
||||||
|
returnCode: (int)returnCode
|
||||||
|
{
|
||||||
|
// FIXME
|
||||||
|
[self stopModalWithCode: returnCode];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Getting, removing, and posting events
|
* Getting, removing, and posting events
|
||||||
*/
|
*/
|
||||||
|
@ -1866,8 +1916,6 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
atIndex: i];
|
atIndex: i];
|
||||||
[item setTarget: aWindow];
|
[item setTarget: aWindow];
|
||||||
// TODO: When changing for a window with a file, we should also set the image.
|
// TODO: When changing for a window with a file, we should also set the image.
|
||||||
[menu sizeToFit];
|
|
||||||
[menu update];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) removeWindowsItem: (NSWindow*)aWindow
|
- (void) removeWindowsItem: (NSWindow*)aWindow
|
||||||
|
@ -1879,25 +1927,19 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
{
|
{
|
||||||
NSArray *itemArray;
|
NSArray *itemArray;
|
||||||
unsigned count;
|
unsigned count;
|
||||||
BOOL found = NO;
|
|
||||||
|
|
||||||
itemArray = [menu itemArray];
|
itemArray = [menu itemArray];
|
||||||
count = [itemArray count];
|
count = [itemArray count];
|
||||||
while (count-- > 0)
|
while (count-- > 0)
|
||||||
{
|
{
|
||||||
id item = [itemArray objectAtIndex: count];
|
id item = [itemArray objectAtIndex: count];
|
||||||
|
|
||||||
if ([item target] == aWindow)
|
if ([item target] == aWindow)
|
||||||
{
|
{
|
||||||
[menu removeItem: item];
|
[menu removeItemAtIndex: count];
|
||||||
found = YES;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found == YES)
|
|
||||||
{
|
|
||||||
[menu sizeToFit];
|
|
||||||
[menu update];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1929,8 +1971,6 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
action: 0
|
action: 0
|
||||||
keyEquivalent: @""
|
keyEquivalent: @""
|
||||||
atIndex: count];
|
atIndex: count];
|
||||||
[_main_menu sizeToFit];
|
|
||||||
[_main_menu update];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1979,8 +2019,6 @@ IF_NO_GC(NSAssert([event retainCount] > 0, NSInternalInconsistencyException));
|
||||||
filename: [t isEqual: f]];
|
filename: [t isEqual: f]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
[aMenu sizeToFit];
|
|
||||||
[aMenu update];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) updateWindowsItem: (NSWindow*)aWindow
|
- (void) updateWindowsItem: (NSWindow*)aWindow
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue