зеркало из https://github.com/mozilla/gecko-dev.git
Bug 330807 - Places Organizer desn't show URL in its status bar. r=sspitzer.
This commit is contained in:
Родитель
3bb82d5fd9
Коммит
de398fc100
|
@ -272,6 +272,24 @@ var PlacesOrganizer = {
|
|||
getService(Ci.nsINavBookmarksService);
|
||||
bms.exportBookmarksHTML(fp.file);
|
||||
}
|
||||
},
|
||||
|
||||
updateStatusBarForView: function G_updateStatusBarForView(aView) {
|
||||
var statusText = "";
|
||||
var selectedNode = aView.selectedNode;
|
||||
if (selectedNode) {
|
||||
if (PlacesUtils.nodeIsFolder(selectedNode)) {
|
||||
var strings = document.getElementById("placeBundle");
|
||||
var childsCount =
|
||||
PlacesUtils.getFolderContents(asFolder(selectedNode).folderId)
|
||||
.childCount;
|
||||
statusText = strings.getFormattedString("status_foldercount",
|
||||
[childsCount]);
|
||||
}
|
||||
else if (PlacesUtils.nodeIsBookmark(selectedNode))
|
||||
statusText = selectedNode.uri;
|
||||
}
|
||||
document.getElementById("status").label = statusText;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -296,7 +296,8 @@
|
|||
<tree id="placesList" class="placesTree" type="places"
|
||||
place="place:&folder=1&group=3&excludeItems=1"
|
||||
hidecolumnpicker="true" context="placesContext"
|
||||
onselect="PlacesOrganizer.onPlaceSelected(true);"
|
||||
onselect="PlacesOrganizer.onPlaceSelected(true);
|
||||
PlacesOrganizer.updateStatusBarForView(this);"
|
||||
onclick="PlacesOrganizer.onTreeClick(event);"
|
||||
seltype="single">
|
||||
<treecols>
|
||||
|
@ -338,7 +339,8 @@
|
|||
<tree id="placeContent" class="placesTree" context="placesContext"
|
||||
flex="1" type="places"
|
||||
ondblclick="this.controller.openSelectedNodeWithEvent(event);"
|
||||
onclick="PlacesOrganizer.onTreeClick(event);">
|
||||
onclick="PlacesOrganizer.onTreeClick(event);"
|
||||
onselect="PlacesOrganizer.updateStatusBarForView(this);">
|
||||
<treecols id="placeContentColumns">
|
||||
<treecol label="&col.title.label;" id="title" flex="5" primary="true"
|
||||
persist="width hidden ordinal sortActive sortDirection"/>
|
||||
|
|
|
@ -72,3 +72,5 @@ tabs.openWarningTitle=Confirm open
|
|||
tabs.openWarningMultipleBranded=You are about to open %S tabs. This might slow down %S while the pages are loading. Are you sure you want to continue?
|
||||
tabs.openButtonMultiple=Open tabs
|
||||
tabs.openWarningPromptMeBranded=Warn me when opening multiple tabs might slow down %S
|
||||
|
||||
status_foldercount = %S object(s)
|
||||
|
|
Загрузка…
Ссылка в новой задаче