Fix bug 307499: bad drawing in the certificate view, caused by missing return value.

This commit is contained in:
smfr%smfr.org 2005-09-08 16:17:08 +00:00
parent 2f700ce9e5
commit cbb887f552
4 changed files with 7 additions and 13 deletions

View File

@ -741,13 +741,11 @@ SecurityDialogs::ChooseCertificate(nsIInterfaceRequestor *ctx, const PRUnichar *
if (!thisCertNick) continue;
NSString* nickWithSerialNumber = [NSString stringWithPRUnichars:thisCertNick];
NSLog(@"cert string: %@", nickWithSerialNumber);
// look for " [" from the end of the string to find the start of the serial#
NSRange serialStartRange = [nickWithSerialNumber rangeOfString:@" [" options:NSBackwardsSearch];
if (serialStartRange.location != NSNotFound && serialStartRange.location > 0)
{
NSString* nickname = [nickWithSerialNumber substringToIndex:serialStartRange.location];
NSLog(@"cert nickname: %@", nickname);
nsAutoString nicknameString;
[nickname assignTo_nsAString:nicknameString];
@ -800,7 +798,7 @@ SecurityDialogs::ChooseCertificate(nsIInterfaceRequestor *ctx, const PRUnichar *
NS_IMETHODIMP
SecurityDialogs::ChooseToken(nsIInterfaceRequestor *ctx, const PRUnichar **tokenNameList, PRUint32 count, PRUnichar **tokenName, PRBool *canceled)
{
NSLog(@"ChooseToken");
NSLog(@"ChooseToken not implemented");
return NS_ERROR_NOT_IMPLEMENTED;
}
@ -850,6 +848,8 @@ GenKeyPairCompletionObserver::Observe(nsISupports *aSubject, const char *aTopic,
{
if (strcmp(aTopic, "keygen-finished") == 0)
[mDialogController keyPairGenerationComplete];
return NS_OK;
}
// nsIGeneratingKeypairInfoDialogs

View File

@ -140,7 +140,6 @@ static BrowserSecurityUIProvider* gBrowserSecurityUIProvider;
- (void)dealloc
{
NSLog(@"dealloc %@", self);
[super dealloc];
}
@ -183,7 +182,6 @@ static BrowserSecurityUIProvider* gBrowserSecurityUIProvider;
- (void)dealloc
{
NSLog(@"dealloc %@", self);
[super dealloc];
}
@ -449,7 +447,6 @@ static BrowserSecurityUIProvider* gBrowserSecurityUIProvider;
- (void)dealloc
{
NSLog(@"dealloc %@", self);
[mCurPasswordContainer release];
[super dealloc];
}

View File

@ -387,7 +387,7 @@ const float kGapUnderLine = 5.0f;
float rightPos = NSWidth([self frame]) - leftPos - kLabelLeftOffset - kHexViewExpandyLeftGap - kHexViewExpandySize - kHexViewExpandyRightGap;
float textWidth = rightPos - leftPos;
NSRect dataRect = NSMakeRect(leftPos, *ioOffset, rightPos, 56.0f);
NSRect dataRect = NSMakeRect(leftPos, *ioOffset, textWidth, 56.0f);
NSScrollView* dataScrollView = [[[NSScrollView alloc] initWithFrame:dataRect] autorelease];
NSTextView* scrolledTextView = [[[NSTextView alloc] initWithFrame:dataRect] autorelease];
@ -667,7 +667,9 @@ const float kGapUnderLine = 5.0f;
[statusField setAttributedStringValue:[mCertItem attributedLongValidityString]];
[statusField sizeToFit];
[self addSubview:statusField];
headerFieldYOffset += NSHeight([statusField frame]) + kCertHeaderFieldVerticalGap;
return headerFieldYOffset;
}
- (void)rebuildCertContent

View File

@ -243,8 +243,6 @@ CertificateListData::GetCertificateAt(PRUint32 inIndex, nsIX509Cert** outCert)
- (void)dealloc
{
NSLog(@"dealloc %@", self);
[mCertsArray release];
[mOrganizationsArray release];
@ -410,6 +408,7 @@ static CertificatesWindowController* gCertificatesWindowController;
// this -init ref is balanced by the -autorelease in -windowWillClose
gCertificatesWindowController = [[CertificatesWindowController alloc] initWithWindowNibName:@"CertificatesWindow"];
}
return gCertificatesWindowController;
}
- (void)dealloc
@ -419,8 +418,6 @@ static CertificatesWindowController* gCertificatesWindowController;
[[NSNotificationCenter defaultCenter] removeObserver:self];
NSLog(@"%@ dealloc", self);
[mCertificatesData release];
[mDetailsColumnKey release];
delete mDataOwner;
@ -591,8 +588,6 @@ static CertificatesWindowController* gCertificatesWindowController;
- (void)reloadCertData
{
NSLog(@"reloadCertData");
int curSelectedRow = [mCategoriesTable selectedRow];
if (curSelectedRow == -1)
curSelectedRow = 0;