mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 19:01:15 +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
ba0d01b2fb
commit
90452c9b89
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>
|
||||
|
||||
* Source/NSPopUpButtonCell.m (-_popUpItemAction:): Inform bindings
|
||||
|
|
|
@ -60,64 +60,42 @@ int main(int argc, char **argv)
|
|||
[NSApplication sharedApplication];
|
||||
|
||||
sp=p=[NSSavePanel savePanel];
|
||||
[p setShowsHiddenFiles: YES];
|
||||
[p setShowsHiddenFiles: NO];
|
||||
[p setDirectory: [[[[[NSBundle mainBundle] bundlePath]
|
||||
stringByDeletingLastPathComponent] stringByDeletingLastPathComponent]
|
||||
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;
|
||||
m=[b matrixInColumn: [b lastColumn]];
|
||||
pass([m numberOfRows] == 2
|
||||
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @".svn"],
|
||||
"browser is reloaded after -setDelegate:");
|
||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @"B"],
|
||||
"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
|
||||
documented as doing the wrong thing. */
|
||||
[p setDelegate: nil];
|
||||
b=((NSSavePanel_ivars *)p)->_browser;
|
||||
m=[b matrixInColumn: [b lastColumn]];
|
||||
pass([m numberOfRows] == 3
|
||||
pass([m numberOfRows] == 2
|
||||
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @"B"]
|
||||
&& [[[m cellAtRow: 2 column: 0] stringValue] isEqual: @".svn"],
|
||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @"B"],
|
||||
"browser contains all files after resetting delegate");
|
||||
|
||||
[b scrollColumnsLeftBy: [b lastColumn]];
|
||||
[p setDelegate: [Delegate self]];
|
||||
b=((NSSavePanel_ivars *)p)->_browser;
|
||||
m=[b matrixInColumn: [b lastColumn]];
|
||||
pass([m numberOfRows] == 2
|
||||
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"]
|
||||
&& [[[m cellAtRow: 1 column: 0] stringValue] isEqual: @".svn"],
|
||||
pass([m numberOfRows] == 1
|
||||
&& [[[m cellAtRow: 0 column: 0] stringValue] isEqual: @"A"],
|
||||
"browser is reloaded after -setDelegate: (2)");
|
||||
#endif
|
||||
|
||||
// [p validateVisibleColumns];
|
||||
|
||||
[arp release];
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue