mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 13:56:29 +00:00
Fix bug 298629: clear search results when switching between history and bookmarks. Also fix the action menu when history is visible to use the dynamically created context menu.
This commit is contained in:
parent
c682260f76
commit
f50615aecb
@ -68,6 +68,7 @@
|
||||
openHistoryItem = id;
|
||||
openHistoryItemInNewTab = id;
|
||||
openHistoryItemInNewWindow = id;
|
||||
openHistoryItemsInTabsInNewWindow = id;
|
||||
setNoGrouping = id;
|
||||
sortAscending = id;
|
||||
sortBy = id;
|
||||
@ -79,7 +80,6 @@
|
||||
mBookmarksViewController = BookmarkViewController;
|
||||
mHistoryOutlineView = ExtendedOutlineView;
|
||||
mHistorySortMenu = NSMenu;
|
||||
mOutlinerContextMenu = NSMenu;
|
||||
};
|
||||
SUPERCLASS = NSObject;
|
||||
},
|
||||
|
@ -15,11 +15,11 @@
|
||||
<key>169</key>
|
||||
<string>167 413 116 163 0 0 1600 1002 </string>
|
||||
<key>18</key>
|
||||
<string>314 325 606 458 0 0 1280 832 </string>
|
||||
<string>476 439 606 458 0 0 1600 1002 </string>
|
||||
<key>253</key>
|
||||
<string>555 448 454 439 0 0 1600 1002 </string>
|
||||
<key>261</key>
|
||||
<string>554 476 457 383 0 0 1600 1002 </string>
|
||||
<string>551 476 457 383 0 0 1600 1002 </string>
|
||||
<key>302</key>
|
||||
<string>17 392 130 49 0 0 1600 1002 </string>
|
||||
<key>64</key>
|
||||
@ -30,12 +30,8 @@
|
||||
<string>206 320 138 68 0 0 1600 1002 </string>
|
||||
</dict>
|
||||
<key>IBFramework Version</key>
|
||||
<string>439.0</string>
|
||||
<key>IBOpenObjects</key>
|
||||
<array>
|
||||
<integer>18</integer>
|
||||
</array>
|
||||
<string>364.0</string>
|
||||
<key>IBSystem Version</key>
|
||||
<string>8B15</string>
|
||||
<string>7W98</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
Binary file not shown.
@ -1054,17 +1054,21 @@ static const int kDisabledQuicksearchPopupItemTag = 9999;
|
||||
- (void)selectContainer:(int)inRowIndex
|
||||
{
|
||||
[mContainersTableView selectRow:inRowIndex byExtendingSelection:NO];
|
||||
|
||||
|
||||
// reset the search
|
||||
[self resetSearchField];
|
||||
|
||||
if (inRowIndex == kHistoryContainerIndex)
|
||||
{
|
||||
[self setActiveOutlineView:mHistoryOutlineView];
|
||||
|
||||
[mHistoryOutlineViewDelegate clearSearchResults];
|
||||
[mHistoryOutlineViewDelegate historyViewMadeVisible:YES];
|
||||
|
||||
[mActionButton setMenu:mActionMenuHistory];
|
||||
[mSortButton setMenu:mSortMenuHistory];
|
||||
[mSearchField setPopupMenu:mQuickSearchMenuHistory];
|
||||
[self resetSearchField];
|
||||
[mSearchField setPopupMenu:mQuickSearchMenuHistory];
|
||||
[mSearchField selectPopupMenuItem:[[mSearchField popupMenu] itemWithTag:1]]; // select the "all" item
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1074,6 +1078,7 @@ static const int kDisabledQuicksearchPopupItemTag = 9999;
|
||||
|
||||
BookmarkFolder *activeCollection = [mRootBookmarks objectAtIndex:inRowIndex];
|
||||
[self setActiveCollection:activeCollection];
|
||||
[self clearSearchResults];
|
||||
[self restoreFolderExpandedStates];
|
||||
|
||||
if ([activeCollection isSmartFolder])
|
||||
@ -1089,8 +1094,8 @@ static const int kDisabledQuicksearchPopupItemTag = 9999;
|
||||
|
||||
[mActionButton setMenu:mActionMenuBookmarks];
|
||||
[mSortButton setMenu:mSortMenuBookmarks];
|
||||
[mSearchField setPopupMenu:mQuickSearchMenuBookmarks];
|
||||
[self resetSearchField];
|
||||
[mSearchField setPopupMenu:mQuickSearchMenuBookmarks];
|
||||
[mSearchField selectPopupMenuItem:[[mSearchField popupMenu] itemWithTag:1]]; // select the "all" item
|
||||
|
||||
// this reload ensures that we display the newly selected activeCollection
|
||||
[mBookmarksOutlineView reloadData];
|
||||
@ -1680,7 +1685,11 @@ static const int kDisabledQuicksearchPopupItemTag = 9999;
|
||||
NSMenu* actionMenu = nil;
|
||||
if ([self activeOutlineView] == mHistoryOutlineView)
|
||||
{
|
||||
actionMenu = mActionMenuHistory;
|
||||
NSArray* selectedItems = [mHistoryOutlineView selectedItems];
|
||||
if ([selectedItems count] > 0)
|
||||
actionMenu = [mHistoryOutlineViewDelegate outlineView:mHistoryOutlineView contextMenuForItems:selectedItems];
|
||||
else
|
||||
actionMenu = mActionMenuHistory;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user