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:
mozilla.mano%sent.com 2007-02-10 17:23:17 +00:00
Родитель 185280d0d2
Коммит 881b2fc47a
2 изменённых файлов: 11 добавлений и 12 удалений

Просмотреть файл

@ -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);"/>