зеркало из https://github.com/mozilla/pjs.git
Fix bug 159461: make the progress window remember its position, and (bug 159460) have it appear in the Windows menu, with a useful name.
This commit is contained in:
Родитель
9dc0906657
Коммит
b244a25789
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>94 26 404 250 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
Двоичный файл не отображается.
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>94 26 404 250 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
Двоичный файл не отображается.
|
@ -73,6 +73,8 @@ class nsDownloadListener;
|
|||
NSTimer *mDownloadTimer;
|
||||
}
|
||||
|
||||
-(void)autosaveWindowFrame;
|
||||
|
||||
-(void) setupDownloadTimer;
|
||||
-(void) killDownloadTimer;
|
||||
-(void) setDownloadProgress:(NSTimer *)aTimer;
|
||||
|
|
|
@ -57,6 +57,7 @@ static NSString *ShowFileToolbarItemIdentifier = @"Show File Toolbar Item";
|
|||
static NSString *OpenFileToolbarItemIdentifier = @"Open File Toolbar Item";
|
||||
static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar Item";
|
||||
|
||||
static NSString *ProgressWindowFrameSaveName = @"ProgressWindow";
|
||||
|
||||
@implementation ChimeraDownloadControllerFactory : DownloadControllerFactory
|
||||
|
||||
|
@ -85,8 +86,17 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
NSLog(@"awakeFromNib");
|
||||
//[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
//[[self window] setFrameAutosaveName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (void)windowDidLoad
|
||||
{
|
||||
[super windowDidLoad];
|
||||
|
||||
mDownloadIsPaused = NO;
|
||||
mDownloadIsComplete = NO;
|
||||
|
||||
|
@ -100,6 +110,8 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
[self setupToolbar];
|
||||
[mProgressBar setUsesThreadedAnimation:YES];
|
||||
[mProgressBar startAnimation:self]; // move to onStateChange
|
||||
|
||||
//[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (void)setupToolbar
|
||||
|
@ -152,6 +164,11 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
return YES; // turn it on otherwise.
|
||||
}
|
||||
|
||||
-(void)autosaveWindowFrame
|
||||
{
|
||||
[[self window] saveFrameUsingName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (NSToolbarItem *) toolbar:(NSToolbar *)toolbar
|
||||
itemForItemIdentifier:(NSString *)itemIdent
|
||||
willBeInsertedIntoToolbar:(BOOL)willBeInserted
|
||||
|
@ -308,6 +325,7 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
|
||||
- (void)windowWillClose:(NSNotification *)notification
|
||||
{
|
||||
[self autosaveWindowFrame];
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
|
@ -467,6 +485,10 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
- (void)onStartDownload:(BOOL)isFileSave;
|
||||
{
|
||||
mIsFileSave = isFileSave;
|
||||
|
||||
[self window]; // make the window
|
||||
[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
|
||||
[self showWindow: self];
|
||||
[self setupDownloadTimer];
|
||||
}
|
||||
|
@ -514,6 +536,13 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
{
|
||||
[mToField setStringValue: [aDestPath stringByAbbreviatingWithTildeInPath]];
|
||||
[mToField display]; // force an immmeditate update
|
||||
|
||||
// also set the window title
|
||||
NSString* downloadFileName = [aDestPath lastPathComponent];
|
||||
if ([downloadFileName length] == 0)
|
||||
downloadFileName = aDestPath;
|
||||
|
||||
[[self window] setTitle:[NSString stringWithFormat:NSLocalizedString(@"DownloadingTitle", @""), downloadFileName]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
<string>94 26 404 250 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
|
|
Двоичные данные
camino/resources/localized/English.lproj/ProgressDialog.nib/objects.nib
сгенерированный
Двоичные данные
camino/resources/localized/English.lproj/ProgressDialog.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -73,6 +73,8 @@ class nsDownloadListener;
|
|||
NSTimer *mDownloadTimer;
|
||||
}
|
||||
|
||||
-(void)autosaveWindowFrame;
|
||||
|
||||
-(void) setupDownloadTimer;
|
||||
-(void) killDownloadTimer;
|
||||
-(void) setDownloadProgress:(NSTimer *)aTimer;
|
||||
|
|
|
@ -57,6 +57,7 @@ static NSString *ShowFileToolbarItemIdentifier = @"Show File Toolbar Item";
|
|||
static NSString *OpenFileToolbarItemIdentifier = @"Open File Toolbar Item";
|
||||
static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar Item";
|
||||
|
||||
static NSString *ProgressWindowFrameSaveName = @"ProgressWindow";
|
||||
|
||||
@implementation ChimeraDownloadControllerFactory : DownloadControllerFactory
|
||||
|
||||
|
@ -85,8 +86,17 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
NSLog(@"awakeFromNib");
|
||||
//[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
//[[self window] setFrameAutosaveName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (void)windowDidLoad
|
||||
{
|
||||
[super windowDidLoad];
|
||||
|
||||
mDownloadIsPaused = NO;
|
||||
mDownloadIsComplete = NO;
|
||||
|
||||
|
@ -100,6 +110,8 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
[self setupToolbar];
|
||||
[mProgressBar setUsesThreadedAnimation:YES];
|
||||
[mProgressBar startAnimation:self]; // move to onStateChange
|
||||
|
||||
//[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (void)setupToolbar
|
||||
|
@ -152,6 +164,11 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
return YES; // turn it on otherwise.
|
||||
}
|
||||
|
||||
-(void)autosaveWindowFrame
|
||||
{
|
||||
[[self window] saveFrameUsingName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (NSToolbarItem *) toolbar:(NSToolbar *)toolbar
|
||||
itemForItemIdentifier:(NSString *)itemIdent
|
||||
willBeInsertedIntoToolbar:(BOOL)willBeInserted
|
||||
|
@ -308,6 +325,7 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
|
||||
- (void)windowWillClose:(NSNotification *)notification
|
||||
{
|
||||
[self autosaveWindowFrame];
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
|
@ -467,6 +485,10 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
- (void)onStartDownload:(BOOL)isFileSave;
|
||||
{
|
||||
mIsFileSave = isFileSave;
|
||||
|
||||
[self window]; // make the window
|
||||
[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
|
||||
[self showWindow: self];
|
||||
[self setupDownloadTimer];
|
||||
}
|
||||
|
@ -514,6 +536,13 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
{
|
||||
[mToField setStringValue: [aDestPath stringByAbbreviatingWithTildeInPath]];
|
||||
[mToField display]; // force an immmeditate update
|
||||
|
||||
// also set the window title
|
||||
NSString* downloadFileName = [aDestPath lastPathComponent];
|
||||
if ([downloadFileName length] == 0)
|
||||
downloadFileName = aDestPath;
|
||||
|
||||
[[self window] setTitle:[NSString stringWithFormat:NSLocalizedString(@"DownloadingTitle", @""), downloadFileName]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>94 26 404 250 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
Двоичный файл не отображается.
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
|
||||
<plist version="0.9">
|
||||
<dict>
|
||||
<key>IBDocumentLocation</key>
|
||||
<string>94 26 404 250 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
</plist>
|
Двоичный файл не отображается.
|
@ -73,6 +73,8 @@ class nsDownloadListener;
|
|||
NSTimer *mDownloadTimer;
|
||||
}
|
||||
|
||||
-(void)autosaveWindowFrame;
|
||||
|
||||
-(void) setupDownloadTimer;
|
||||
-(void) killDownloadTimer;
|
||||
-(void) setDownloadProgress:(NSTimer *)aTimer;
|
||||
|
|
|
@ -57,6 +57,7 @@ static NSString *ShowFileToolbarItemIdentifier = @"Show File Toolbar Item";
|
|||
static NSString *OpenFileToolbarItemIdentifier = @"Open File Toolbar Item";
|
||||
static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar Item";
|
||||
|
||||
static NSString *ProgressWindowFrameSaveName = @"ProgressWindow";
|
||||
|
||||
@implementation ChimeraDownloadControllerFactory : DownloadControllerFactory
|
||||
|
||||
|
@ -85,8 +86,17 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
NSLog(@"awakeFromNib");
|
||||
//[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
//[[self window] setFrameAutosaveName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (void)windowDidLoad
|
||||
{
|
||||
[super windowDidLoad];
|
||||
|
||||
mDownloadIsPaused = NO;
|
||||
mDownloadIsComplete = NO;
|
||||
|
||||
|
@ -100,6 +110,8 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
[self setupToolbar];
|
||||
[mProgressBar setUsesThreadedAnimation:YES];
|
||||
[mProgressBar startAnimation:self]; // move to onStateChange
|
||||
|
||||
//[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (void)setupToolbar
|
||||
|
@ -152,6 +164,11 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
return YES; // turn it on otherwise.
|
||||
}
|
||||
|
||||
-(void)autosaveWindowFrame
|
||||
{
|
||||
[[self window] saveFrameUsingName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (NSToolbarItem *) toolbar:(NSToolbar *)toolbar
|
||||
itemForItemIdentifier:(NSString *)itemIdent
|
||||
willBeInsertedIntoToolbar:(BOOL)willBeInserted
|
||||
|
@ -308,6 +325,7 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
|
||||
- (void)windowWillClose:(NSNotification *)notification
|
||||
{
|
||||
[self autosaveWindowFrame];
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
|
@ -467,6 +485,10 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
- (void)onStartDownload:(BOOL)isFileSave;
|
||||
{
|
||||
mIsFileSave = isFileSave;
|
||||
|
||||
[self window]; // make the window
|
||||
[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
|
||||
[self showWindow: self];
|
||||
[self setupDownloadTimer];
|
||||
}
|
||||
|
@ -514,6 +536,13 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
{
|
||||
[mToField setStringValue: [aDestPath stringByAbbreviatingWithTildeInPath]];
|
||||
[mToField display]; // force an immmeditate update
|
||||
|
||||
// also set the window title
|
||||
NSString* downloadFileName = [aDestPath lastPathComponent];
|
||||
if ([downloadFileName length] == 0)
|
||||
downloadFileName = aDestPath;
|
||||
|
||||
[[self window] setTitle:[NSString stringWithFormat:NSLocalizedString(@"DownloadingTitle", @""), downloadFileName]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -6,10 +6,6 @@
|
|||
<string>94 26 404 250 0 0 1152 746 </string>
|
||||
<key>IBFramework Version</key>
|
||||
<string>248.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>5</integer>
|
||||
</array>
|
||||
<key>IBSystem Version</key>
|
||||
<string>5S66</string>
|
||||
</dict>
|
||||
|
|
Двоичные данные
chimera/resources/localized/English.lproj/ProgressDialog.nib/objects.nib
сгенерированный
Двоичные данные
chimera/resources/localized/English.lproj/ProgressDialog.nib/objects.nib
сгенерированный
Двоичный файл не отображается.
|
@ -73,6 +73,8 @@ class nsDownloadListener;
|
|||
NSTimer *mDownloadTimer;
|
||||
}
|
||||
|
||||
-(void)autosaveWindowFrame;
|
||||
|
||||
-(void) setupDownloadTimer;
|
||||
-(void) killDownloadTimer;
|
||||
-(void) setDownloadProgress:(NSTimer *)aTimer;
|
||||
|
|
|
@ -57,6 +57,7 @@ static NSString *ShowFileToolbarItemIdentifier = @"Show File Toolbar Item";
|
|||
static NSString *OpenFileToolbarItemIdentifier = @"Open File Toolbar Item";
|
||||
static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar Item";
|
||||
|
||||
static NSString *ProgressWindowFrameSaveName = @"ProgressWindow";
|
||||
|
||||
@implementation ChimeraDownloadControllerFactory : DownloadControllerFactory
|
||||
|
||||
|
@ -85,8 +86,17 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (void)awakeFromNib
|
||||
{
|
||||
NSLog(@"awakeFromNib");
|
||||
//[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
//[[self window] setFrameAutosaveName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (void)windowDidLoad
|
||||
{
|
||||
[super windowDidLoad];
|
||||
|
||||
mDownloadIsPaused = NO;
|
||||
mDownloadIsComplete = NO;
|
||||
|
||||
|
@ -100,6 +110,8 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
[self setupToolbar];
|
||||
[mProgressBar setUsesThreadedAnimation:YES];
|
||||
[mProgressBar startAnimation:self]; // move to onStateChange
|
||||
|
||||
//[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (void)setupToolbar
|
||||
|
@ -152,6 +164,11 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
return YES; // turn it on otherwise.
|
||||
}
|
||||
|
||||
-(void)autosaveWindowFrame
|
||||
{
|
||||
[[self window] saveFrameUsingName: ProgressWindowFrameSaveName];
|
||||
}
|
||||
|
||||
- (NSToolbarItem *) toolbar:(NSToolbar *)toolbar
|
||||
itemForItemIdentifier:(NSString *)itemIdent
|
||||
willBeInsertedIntoToolbar:(BOOL)willBeInserted
|
||||
|
@ -308,6 +325,7 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
|
||||
- (void)windowWillClose:(NSNotification *)notification
|
||||
{
|
||||
[self autosaveWindowFrame];
|
||||
[self autorelease];
|
||||
}
|
||||
|
||||
|
@ -467,6 +485,10 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
- (void)onStartDownload:(BOOL)isFileSave;
|
||||
{
|
||||
mIsFileSave = isFileSave;
|
||||
|
||||
[self window]; // make the window
|
||||
[[self window] setFrameUsingName: ProgressWindowFrameSaveName];
|
||||
|
||||
[self showWindow: self];
|
||||
[self setupDownloadTimer];
|
||||
}
|
||||
|
@ -514,6 +536,13 @@ static NSString *LeaveOpenToolbarItemIdentifier = @"Leave Open Toggle Toolbar
|
|||
{
|
||||
[mToField setStringValue: [aDestPath stringByAbbreviatingWithTildeInPath]];
|
||||
[mToField display]; // force an immmeditate update
|
||||
|
||||
// also set the window title
|
||||
NSString* downloadFileName = [aDestPath lastPathComponent];
|
||||
if ([downloadFileName length] == 0)
|
||||
downloadFileName = aDestPath;
|
||||
|
||||
[[self window] setTitle:[NSString stringWithFormat:NSLocalizedString(@"DownloadingTitle", @""), downloadFileName]];
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Загрузка…
Ссылка в новой задаче