зеркало из https://github.com/mozilla/gecko-dev.git
Fix bug # 125801: find rdf service. r=bryner sr=ben
This commit is contained in:
Родитель
07ffca456b
Коммит
8c214026b7
|
@ -36,6 +36,9 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
const BMARKS_CONTRACTID = "@mozilla.org/browser/bookmarks-service;1";
|
||||
const nsIBookmarksService = Components.interfaces.nsIBookmarksService;
|
||||
|
||||
var gOKButton;
|
||||
var gSearchField;
|
||||
function Startup()
|
||||
|
@ -65,6 +68,16 @@ function find()
|
|||
bmWindow.document.getElementById("bookmarks-view").outliner.setAttribute("ref", searchURI);
|
||||
|
||||
bmWindow.focus();
|
||||
|
||||
if (document.getElementById("saveQuery").checked == true)
|
||||
{
|
||||
var bundle = document.getElementById("bookmarksBundle");
|
||||
var findTitle = bundle.stringBundle.formatStringFromName(
|
||||
"ShortFindTitle", [gSearchField.value], 1);
|
||||
var bmks = Components.classes[BMARKS_CONTRACTID].getService(nsIBookmarksService);
|
||||
bmks.AddBookmark(searchURI, findTitle, bmks.BOOKMARK_FIND_TYPE, null);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -64,5 +64,6 @@
|
|||
</menulist>
|
||||
<textbox id="searchField" flex="1" oninput="doEnabling();"/>
|
||||
</hbox>
|
||||
<checkbox id="saveQuery" label="&save.query.label;" />
|
||||
</dialog>
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@ pleaseSelectANotification = Please enter at least one notification method.
|
|||
|
||||
SortMenuItem = Sorted by %NAME%
|
||||
|
||||
ShortFindTitle = Find: '%S'
|
||||
FindTitle = Find: %S %S '%S' in %S
|
||||
|
||||
ImportedIEFavorites = Imported IE Favorites
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<!ENTITY search.isnot.label "is not">
|
||||
<!ENTITY search.contains.label "contains">
|
||||
<!ENTITY search.doesntcontain.label "doesn't contain">
|
||||
<!ENTITY save.query.label "Save query in bookmarks">
|
||||
<!ENTITY search.for.label "Find Bookmarks whose">
|
||||
<!ENTITY findBookmark.title "Find Bookmarks">
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче