mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-03 07:10:43 +00:00
* Tests/gui/NSSavePanel/setDelegate_reload.m: Switch the save panel to
not show hidden files and remove ".svn" from the expected results. This file was never present in an exported directory and will no longer exist with SVN 1.7. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34100 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
a635ae7ec9
commit
f70becfe6e
2 changed files with 20 additions and 35 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2011-10-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
|
* Tests/gui/NSSavePanel/setDelegate_reload.m: Switch the save panel to
|
||||||
|
not show hidden files and remove ".svn" from the expected
|
||||||
|
results. This file was never present in an exported directory and
|
||||||
|
will no longer exist with SVN 1.7.
|
||||||
|
|
||||||
2011-10-31 Fred Kiefer <FredKiefer@gmx.de>
|
2011-10-31 Fred Kiefer <FredKiefer@gmx.de>
|
||||||
|
|
||||||
* Source/NSPopUpButtonCell.m (-_popUpItemAction:): Inform bindings
|
* Source/NSPopUpButtonCell.m (-_popUpItemAction:): Inform bindings
|
||||||
|
|
|
@ -60,64 +60,42 @@ int main(int argc, char **argv)
|
||||||
[NSApplication sharedApplication];
|
[NSApplication sharedApplication];
|
||||||
|
|
||||||
sp=p=[NSSavePanel savePanel];
|
sp=p=[NSSavePanel savePanel];
|
||||||
[p setShowsHiddenFiles: YES];
|
[p setShowsHiddenFiles: NO];
|
||||||
[p setDirectory: [[[[[NSBundle mainBundle] bundlePath]
|
[p setDirectory: [[[[[NSBundle mainBundle] bundlePath]
|
||||||
stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]
|
stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]
|
||||||
stringByAppendingPathComponent: @"dummy"]];
|
stringByAppendingPathComponent: @"dummy"]];
|
||||||
#if 0
|
|
||||||
[p makeKeyAndOrderFront: nil];
|
|
||||||
[p setDelegate: [Delegate self]];
|
|
||||||
{
|
|
||||||
NSButton *b=[[NSButton alloc] initWithFrame: NSMakeRect(0,0,50,50)];
|
|
||||||
[b setTitle: @"Click me"];
|
|
||||||
[b setTarget: [Delegate self]];
|
|
||||||
[b setAction: @selector(foo)];
|
|
||||||
[p setAccessoryView: b];
|
|
||||||
}
|
|
||||||
// [p validateVisibleColumns];
|
|
||||||
[p runModal];
|
|
||||||
#else
|
|
||||||
|
|
||||||
b=((NSSavePanel_ivars *)p)->_browser;
|
|
||||||
m=[b matrixInColumn: [b lastColumn]];
|
|
||||||
pass([m numberOfRows] == 3
|
|
||||||
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
|
||||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @"B"]
|
|
||||||
&& [[[m cellAtRow: 2 column: 0] stringValue] isEqual: @".svn"],
|
|
||||||
"browser initially contains all files");
|
|
||||||
|
|
||||||
[p setDelegate: [Delegate self]];
|
|
||||||
|
|
||||||
b=((NSSavePanel_ivars *)p)->_browser;
|
b=((NSSavePanel_ivars *)p)->_browser;
|
||||||
m=[b matrixInColumn: [b lastColumn]];
|
m=[b matrixInColumn: [b lastColumn]];
|
||||||
pass([m numberOfRows] == 2
|
pass([m numberOfRows] == 2
|
||||||
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
||||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @".svn"],
|
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @"B"],
|
||||||
"browser is reloaded after -setDelegate:");
|
"browser initially contains all files");
|
||||||
|
|
||||||
|
[p setDelegate: [Delegate self]];
|
||||||
|
b=((NSSavePanel_ivars *)p)->_browser;
|
||||||
|
m=[b matrixInColumn: [b lastColumn]];
|
||||||
|
pass([m numberOfRows] == 1
|
||||||
|
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"],
|
||||||
|
"browser is reloaded after -setDelegate:");
|
||||||
|
|
||||||
/* Not really a -setDelegate: issue, but the other methods involved are
|
/* Not really a -setDelegate: issue, but the other methods involved are
|
||||||
documented as doing the wrong thing. */
|
documented as doing the wrong thing. */
|
||||||
[p setDelegate: nil];
|
[p setDelegate: nil];
|
||||||
b=((NSSavePanel_ivars *)p)->_browser;
|
b=((NSSavePanel_ivars *)p)->_browser;
|
||||||
m=[b matrixInColumn: [b lastColumn]];
|
m=[b matrixInColumn: [b lastColumn]];
|
||||||
pass([m numberOfRows] == 3
|
pass([m numberOfRows] == 2
|
||||||
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
||||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @"B"]
|
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @"B"],
|
||||||
&& [[[m cellAtRow: 2 column: 0] stringValue] isEqual: @".svn"],
|
|
||||||
"browser contains all files after resetting delegate");
|
"browser contains all files after resetting delegate");
|
||||||
|
|
||||||
[b scrollColumnsLeftBy: [b lastColumn]];
|
[b scrollColumnsLeftBy: [b lastColumn]];
|
||||||
[p setDelegate: [Delegate self]];
|
[p setDelegate: [Delegate self]];
|
||||||
b=((NSSavePanel_ivars *)p)->_browser;
|
b=((NSSavePanel_ivars *)p)->_browser;
|
||||||
m=[b matrixInColumn: [b lastColumn]];
|
m=[b matrixInColumn: [b lastColumn]];
|
||||||
pass([m numberOfRows] == 2
|
pass([m numberOfRows] == 1
|
||||||
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"],
|
||||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @".svn"],
|
|
||||||
"browser is reloaded after -setDelegate: (2)");
|
"browser is reloaded after -setDelegate: (2)");
|
||||||
#endif
|
|
||||||
|
|
||||||
// [p validateVisibleColumns];
|
|
||||||
|
|
||||||
[arp release];
|
[arp release];
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue