From 961d882b8a4ca818aad1c5c9dddabb1630f543dd Mon Sep 17 00:00:00 2001 From: "smfr%smfr.org" Date: Wed, 27 Jul 2005 04:45:17 +0000 Subject: [PATCH] Avoid redrawing the strings in the download view if they haven't changed (since we redraw them every second); helps with bug 293995. --- camino/src/download/ProgressViewController.mm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/camino/src/download/ProgressViewController.mm b/camino/src/download/ProgressViewController.mm index 3a00bac1c0a4..a5f3bf7b3931 100644 --- a/camino/src/download/ProgressViewController.mm +++ b/camino/src/download/ProgressViewController.mm @@ -300,7 +300,8 @@ enum { id iconLabel = [curView viewWithTag:kLabelTagIcon]; id filenameLabel = [curView viewWithTag:kLabelTagFilename]; - [filenameLabel setStringValue:filename]; + if (![[filenameLabel stringValue] isEqualToString:filename]) + [filenameLabel setStringValue:filename]; if (iconLabel) { // update the icon image NSImage *iconImage = [[NSWorkspace sharedWorkspace] iconForFile:mDestPath]; @@ -326,7 +327,8 @@ enum { [[self class] formatTime:(int)mDownloadTime], [[self class] formatBytes:mDownloadSize]]; } - [statusLabel setStringValue:statusString]; + if (![[statusLabel stringValue] isEqualToString:statusString]) + [statusLabel setStringValue:statusString]; } } else {