зеркало из https://github.com/mozilla/pjs.git
Bug 334130 (places-bookmarks UI) - Selecting 'Bookmarks | Organize Bookmarks' when the organizer is already open should not change the selected folder. r=sspitzer.
This commit is contained in:
Родитель
185280d0d2
Коммит
881b2fc47a
|
@ -167,22 +167,25 @@ var PlacesCommandHook = {
|
|||
|
||||
/**
|
||||
* Opens the Places Organizer.
|
||||
* @param place
|
||||
* @param aPlace
|
||||
* The place to select in the organizer window (a place: URI)
|
||||
* @param aForcePlace
|
||||
* If true, aPlace will be set even if the organizer window is
|
||||
* already open
|
||||
*/
|
||||
showPlacesOrganizer: function PCH_showPlacesOrganizer(place) {
|
||||
var wm =
|
||||
Cc["@mozilla.org/appshell/window-mediator;1"].
|
||||
getService(Ci.nsIWindowMediator);
|
||||
showPlacesOrganizer: function PCH_showPlacesOrganizer(aPlace, aForcePlace) {
|
||||
var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
|
||||
getService(Ci.nsIWindowMediator);
|
||||
var organizer = wm.getMostRecentWindow("Places:Organizer");
|
||||
if (!organizer) {
|
||||
// No currently open places window, so open one with the specified mode.
|
||||
openDialog("chrome://browser/content/places/places.xul",
|
||||
"", "chrome,toolbar=yes,dialog=no,resizable", place);
|
||||
"", "chrome,toolbar=yes,dialog=no,resizable", aPlace);
|
||||
}
|
||||
else {
|
||||
// Set the mode on an existing places window.
|
||||
organizer.selectPlaceURI(place);
|
||||
if (aForcePlace)
|
||||
organizer.selectPlaceURI(aPlace);
|
||||
|
||||
organizer.focus();
|
||||
}
|
||||
},
|
||||
|
|
|
@ -174,10 +174,6 @@
|
|||
|
||||
#ifdef MOZ_PLACES
|
||||
<commandset id="placesCommands">
|
||||
<command id="Browser:ShowHistory"
|
||||
oncommand="PlacesCommandHook.showPlacesOrganizer(ORGANIZER_ROOT_HISTORY);"/>
|
||||
<command id="Browser:SearchHistory"
|
||||
oncommand="HistoryMenu.showPlacesSearch();"/>
|
||||
#ifdef MOZ_PLACES_BOOKMARKS
|
||||
<command id="Browser:ShowBookmarks"
|
||||
oncommand="PlacesCommandHook.showPlacesOrganizer(ORGANIZER_ROOT_BOOKMARKS);"/>
|
||||
|
|
Загрузка…
Ссылка в новой задаче