Closed
Bug 341926
Opened 19 years ago
Closed 19 years ago
Cleanup in MainController.mm -validateMenuItem
Categories
(Camino Graveyard :: General, defect)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: froodian, Assigned: froodian)
References
Details
(Keywords: fixed1.8.1)
Attachments
(1 file, 3 obsolete files)
|
6.17 KB,
patch
|
Details | Diff | Splinter Review |
The validateMenuItem code is inconsistent, and fails to follow the coding style guidelines (spaces vs. tabs, ![foo bar] vs [foo bar] == nil, no else after returns). Also, the viewSource selector has its own if statement, even though it could be placed under one of the group ifs. Patch forthcoming.
| Assignee | ||
Updated•19 years ago
|
Severity: normal → trivial
| Assignee | ||
Comment 1•19 years ago
|
||
This changes no behavior (hopefully) - It just cleans up.
Attachment #226053 -
Flags: review?(stuart.morgan)
Comment 2•19 years ago
|
||
Comment on attachment 226053 [details] [diff] [review]
Patch
One nit,
>+ /* action == @selector(goHome:) || */ // always enabled
>+ /* action == @selector(doSearch:) || */ // always enabled
No need to leave these two lines in, the comment above the if adequately describes what we want to enable/disable, and its pretty clear these should be enabled even when the bookmark manager is visible.
With that fixed r+ = me.
Attachment #226053 -
Flags: review-
| Assignee | ||
Comment 3•19 years ago
|
||
Assignee: nobody → stridey
Attachment #226053 -
Attachment is obsolete: true
Status: UNCONFIRMED → ASSIGNED
Attachment #226187 -
Flags: review?(nick.kreeger)
Attachment #226053 -
Flags: review?(stuart.morgan)
Comment 4•19 years ago
|
||
Comment on attachment 226187 [details] [diff] [review]
r=bruced patch
second-r=me.
Can we get this checked in ASAP, since Ian and I are about to tackle a huge pile of code in this area and we'd prefer this not bitrot?
Requesting sr from pink.
cl
Attachment #226187 -
Flags: superreview?(mikepinkerton)
Attachment #226187 -
Flags: review?(nick.kreeger)
Attachment #226187 -
Flags: review+
| Assignee | ||
Comment 5•19 years ago
|
||
> Can we get this checked in ASAP, since Ian and I are about to tackle a huge
> pile of code in this area and we'd prefer this not bitrot?
Too late. ;) This brings the patch up to date with the current tree. The above comment still applies. :)
Attachment #226187 -
Attachment is obsolete: true
Attachment #226597 -
Flags: superreview?(mikepinkerton)
Attachment #226187 -
Flags: superreview?(mikepinkerton)
Comment 6•19 years ago
|
||
Comment on attachment 226597 [details] [diff] [review]
Unbitrots it
sr=pink
Attachment #226597 -
Flags: superreview?(mikepinkerton) → superreview+
| Assignee | ||
Updated•19 years ago
|
Whiteboard: [needs checkin]
Comment 7•19 years ago
|
||
// check what the state of the personal toolbar should be, but only if there is a browser
// window open. Popup windows that have the personal toolbar removed should always gray
// out this menu.
if (action == @selector(toggleBookmarksToolbar:)) {
if (browserController) {
NSView* bookmarkToolbar = [browserController bookmarkToolbar];
if ( bookmarkToolbar ) {
float height = [bookmarkToolbar frame].size.height;
BOOL toolbarShowing = (height > 0);
if (toolbarShowing)
[mBookmarksToolbarMenuItem setTitle: NSLocalizedString(@"Hide Bookmarks Toolbar",@"")];
else
[mBookmarksToolbarMenuItem setTitle: NSLocalizedString(@"Show Bookmarks Toolbar",@"")];
return YES;
}
- else
- return NO;
- }
- else
return NO;
+ }
+ return NO;
}
Why is there a need for these two return NO calls?
Assignee: stridey → nobody
Status: ASSIGNED → UNCONFIRMED
Comment 8•19 years ago
|
||
// check what the state of the personal toolbar should be, but only if there is a browser
// window open. Popup windows that have the personal toolbar removed should always gray
// out this menu.
if (action == @selector(toggleBookmarksToolbar:)) {
if (browserController) {
NSView* bookmarkToolbar = [browserController bookmarkToolbar];
if ( bookmarkToolbar ) {
float height = [bookmarkToolbar frame].size.height;
BOOL toolbarShowing = (height > 0);
if (toolbarShowing)
[mBookmarksToolbarMenuItem setTitle: NSLocalizedString(@"Hide Bookmarks Toolbar",@"")];
else
[mBookmarksToolbarMenuItem setTitle: NSLocalizedString(@"Show Bookmarks Toolbar",@"")];
return YES;
}
- else
- return NO;
- }
- else
return NO;
+ }
+ return NO;
}
Why is there a need for these two return NO calls?
Updated•19 years ago
|
Assignee: nobody → stridey
Updated•19 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
| Assignee | ||
Comment 9•19 years ago
|
||
Gets rid of the extra Return NO
Attachment #226597 -
Attachment is obsolete: true
Comment 10•19 years ago
|
||
Fixed trunk and branch
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
Whiteboard: [needs checkin]
| Assignee | ||
Updated•19 years ago
|
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•