mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 10:51:56 +00:00
Adjust browser columns size to match window
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@16537 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ec2a39cf4a
commit
188be4b3e1
3 changed files with 22 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2003-04-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSSavePanel.m: Track window resizing and adjust browser
|
||||||
|
columns to match. Use larger minimum width.
|
||||||
|
|
||||||
2003-04-21 Serg Stoyan <stoyan@hologr.com>
|
2003-04-21 Serg Stoyan <stoyan@hologr.com>
|
||||||
|
|
||||||
* Source/NSMenuView.m:
|
* Source/NSMenuView.m:
|
||||||
|
|
|
@ -77,6 +77,7 @@ static BOOL _gs_display_reading_progress = NO;
|
||||||
- (void) _selectCellName: (NSString *)title;
|
- (void) _selectCellName: (NSString *)title;
|
||||||
- (void) _setupForDirectory: (NSString *)path file: (NSString *)name;
|
- (void) _setupForDirectory: (NSString *)path file: (NSString *)name;
|
||||||
- (BOOL) _shouldShowExtension: (NSString *)extension isDir: (BOOL *)isDir;
|
- (BOOL) _shouldShowExtension: (NSString *)extension isDir: (BOOL *)isDir;
|
||||||
|
- (void) _windowResized: (NSNotification*)n;
|
||||||
@end /* NSSavePanel (PrivateMethods) */
|
@end /* NSSavePanel (PrivateMethods) */
|
||||||
|
|
||||||
@implementation NSSavePanel (_PrivateMethods)
|
@implementation NSSavePanel (_PrivateMethods)
|
||||||
|
@ -88,6 +89,12 @@ static BOOL _gs_display_reading_progress = NO;
|
||||||
NSRect r;
|
NSRect r;
|
||||||
id lastKeyView;
|
id lastKeyView;
|
||||||
|
|
||||||
|
// Track window resizing so we can change number of browser columns.
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver: self
|
||||||
|
selector: @selector(_windowResized:)
|
||||||
|
name: NSWindowDidResizeNotification
|
||||||
|
object: self];
|
||||||
|
|
||||||
//
|
//
|
||||||
// WARNING: We create the panel sized (308, 317), which is the
|
// WARNING: We create the panel sized (308, 317), which is the
|
||||||
// minimum size we want it to have. Then, we resize it at the
|
// minimum size we want it to have. Then, we resize it at the
|
||||||
|
@ -125,6 +132,7 @@ static BOOL _gs_display_reading_progress = NO;
|
||||||
[_browser setTag: NSFileHandlingPanelBrowser];
|
[_browser setTag: NSFileHandlingPanelBrowser];
|
||||||
[_browser setAction:@selector(_selectText:)];
|
[_browser setAction:@selector(_selectText:)];
|
||||||
[_browser setTarget:self];
|
[_browser setTarget:self];
|
||||||
|
[_browser setMinColumnWidth: 140];
|
||||||
[_topView addSubview: _browser];
|
[_topView addSubview: _browser];
|
||||||
[_browser release];
|
[_browser release];
|
||||||
|
|
||||||
|
@ -475,6 +483,11 @@ selectCellWithString: (NSString*)title
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) _windowResized: (NSNotification*)n
|
||||||
|
{
|
||||||
|
[_browser setMaxVisibleColumns: [_browser frame].size.width / 140];
|
||||||
|
}
|
||||||
|
|
||||||
@end /* NSSavePanel (PrivateMethods) */
|
@end /* NSSavePanel (PrivateMethods) */
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -530,8 +543,9 @@ selectCellWithString: (NSString*)title
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
|
|
||||||
-(void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||||
TEST_RELEASE (_fullFileName);
|
TEST_RELEASE (_fullFileName);
|
||||||
TEST_RELEASE (_directory);
|
TEST_RELEASE (_directory);
|
||||||
TEST_RELEASE (_requiredFileType);
|
TEST_RELEASE (_requiredFileType);
|
||||||
|
|
|
@ -3047,7 +3047,8 @@ Code shared with [NSPanel -sendEvent:], remember to update both places.
|
||||||
if (_f.is_miniaturized)
|
if (_f.is_miniaturized)
|
||||||
{
|
{
|
||||||
/* Window Manager just deminiaturized us */
|
/* Window Manager just deminiaturized us */
|
||||||
[self _didDeminiaturize: self];
|
[self deminiaturize: self];
|
||||||
|
//[self _didDeminiaturize: self];
|
||||||
}
|
}
|
||||||
if ([NSApp isHidden])
|
if ([NSApp isHidden])
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue