Closed
Bug 411197
Opened 18 years ago
Closed 18 years ago
Share more code in the Privacy preference pane
Categories
(Camino Graveyard :: Preferences, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Camino1.6
People
(Reporter: stuart.morgan+bugzilla, Assigned: stuart.morgan+bugzilla)
Details
(Keywords: fixed1.8.1.12)
Attachments
(2 files)
|
48.40 KB,
patch
|
mark
:
superreview+
|
Details | Diff | Splinter Review |
|
21.58 KB,
application/octet-stream
|
Details |
Now that everything in the Privacy pane is all Cocoa-y, there's a lot of opportunity to share code among the three very similar sheets.
| Assignee | ||
Comment 1•18 years ago
|
||
This shares more of the initialization, filter, and sort logic. The actual filter and sort implementations wouldn't have really benefited from merging, so I left them alone.
Since I was already moving a fair amount of stuff around, it seemed like a good opportunity to do a much-need organization/grouping of methods, so I did that as well--and some style cleanup for good measure, since by then I was touching pretty much everything anyway.
Attachment #295876 -
Flags: superreview?(mark)
| Assignee | ||
Comment 2•18 years ago
|
||
Corresponding nib, since I needed to change the filter field actions.
I'm not addicted to revving this nib. I can quit anytime I want!
Comment 3•18 years ago
|
||
Comment on attachment 295876 [details] [diff] [review]
sharing and cleanup
Cleanup diffs are so gnarly, but this looks good.
>+- (IBAction)launchKeychainAccess:(id)sender
>+ FSRef fsRef;
>+ CFURLRef urlRef;
>+ OSErr err = ::LSGetApplicationForInfo('APPL', 'kcmr', NULL, kLSRolesAll, &fsRef, &urlRef);
We don't need fsRef, you can pass NULL there. Maybe wrap this line while you're changing it.
>+ CFRelease(fileSystemURL);
Should probably follow the ::pattern used for other calls in this function.
This function leaks, but it's not obvious. urlRef is actually owned by the callee and needs to be released.
>+ CookieDateFormatter* cookieDateFormatter =
>+ [[CookieDateFormatter alloc] initWithDateFormat:@"%b %d, %Y"
>+ allowNaturalLanguage:NO];
One of us is going to step on the other of us (411516). I'll let you go first, mine's easier to merge in after your change than the other way around.
>+ // This is an artifact of something weird in the nib; if the table is
>+ // rebuilt (or the nib is otherwise fixed) this can be removed).
Specifically what?
>++ (int)indexForPolicy:(int)policy
policyForIndex uses switch, why doesn't this?
Attachment #295876 -
Flags: superreview?(mark) → superreview+
| Assignee | ||
Comment 4•18 years ago
|
||
Landed on trunk and MOZILLA_1_8_BRANCH, with all the changes suggested (except for the switch, which the compiler won't let me do). I also added a note that the weird table issue may have been 10.2-only, and that we should re-test sometime.
Status: NEW → RESOLVED
Closed: 18 years ago
Keywords: fixed1.8.1.12
Resolution: --- → FIXED
Target Milestone: --- → Camino1.6
You need to log in
before you can comment on or make changes to this bug.
Description
•