From 2edf76702586c1cc693e88bbdfe43aed37da1993 Mon Sep 17 00:00:00 2001 From: Asaf Romano Date: Wed, 9 Oct 2013 16:33:58 +0200 Subject: [PATCH] Bug 912855 - Can't remove check-mark on "Load this bookmark in the sidebar". r=mak --- .../components/places/content/bookmarkProperties.js | 5 +---- .../components/places/content/editBookmarkOverlay.js | 12 ++++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/browser/components/places/content/bookmarkProperties.js b/browser/components/places/content/bookmarkProperties.js index f44d819c66b..0b2d25ae375 100644 --- a/browser/components/places/content/bookmarkProperties.js +++ b/browser/components/places/content/bookmarkProperties.js @@ -557,10 +557,7 @@ var BookmarkPropertiesPanel = { if (this._loadInSidebar) { let annoObj = { name : PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO, - type : Ci.nsIAnnotationService.TYPE_INT32, - flags : 0, - value : this._loadInSidebar, - expires: Ci.nsIAnnotationService.EXPIRE_NEVER }; + value : true }; let setLoadTxn = new PlacesSetItemAnnotationTransaction(-1, annoObj); childTransactions.push(setLoadTxn); } diff --git a/browser/components/places/content/editBookmarkOverlay.js b/browser/components/places/content/editBookmarkOverlay.js index 5eab31c9a16..03f71ac5fa1 100644 --- a/browser/components/places/content/editBookmarkOverlay.js +++ b/browser/components/places/content/editBookmarkOverlay.js @@ -589,14 +589,10 @@ var gEditItemOverlay = { onLoadInSidebarCheckboxCommand: function EIO_onLoadInSidebarCheckboxCommand() { - var loadInSidebarChecked = this._element("loadInSidebarCheckbox").checked; - var annoObj = { name : PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO, - type : Ci.nsIAnnotationService.TYPE_INT32, - flags : 0, - value : loadInSidebarChecked, - expires: Ci.nsIAnnotationService.EXPIRE_NEVER }; - var txn = new PlacesSetItemAnnotationTransaction(this._itemId, - annoObj); + let annoObj = { name : PlacesUIUtils.LOAD_IN_SIDEBAR_ANNO }; + if (this._element("loadInSidebarCheckbox").checked) + annoObj.value = true; + let txn = new PlacesSetItemAnnotationTransaction(this._itemId, annoObj); PlacesUtils.transactionManager.doTransaction(txn); },