bug 539056 - Better Tab sync UI and discoverability, r=Mardak

--HG--
extra : rebase_source : d0c98d78b889ed74f5b130077a6ee1806bd81282
This commit is contained in:
Mike Connor 2010-03-12 16:14:09 -08:00
parent ba60f514a6
commit 23d76a73c9
5 changed files with 37 additions and 2 deletions

23
services/sync/Weave.js Normal file → Executable file
View File

@ -71,7 +71,28 @@ WeaveService.prototype = {
} }
}; };
function AboutWeaveTabs() {}
AboutWeaveTabs.prototype = {
classDescription: "about:weave-tabs",
contractID: "@mozilla.org/network/protocol/about;1?what=weave-tabs",
classID: Components.ID("{ecb6987d-9d71-475d-a44d-a5ff2099b08c}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule,
Ci.nsISupportsWeakReference]),
getURIFlags: function(aURI) {
return (Ci.nsIAboutModule.ALLOW_SCRIPT);
},
newChannel: function(aURI) {
let ios = Cc["@mozilla.org/network/io-service;1"]
.getService(Ci.nsIIOService);
let ch = ios.newChannel("chrome://weave/content/fx-tabs.xul", null, null);
ch.originalURI = aURI;
return ch;
}
};
function NSGetModule(compMgr, fileSpec) { function NSGetModule(compMgr, fileSpec) {
return XPCOMUtils.generateModule([WeaveService]); return XPCOMUtils.generateModule([WeaveService, AboutWeaveTabs]);
} }

View File

@ -0,0 +1,9 @@
<!ENTITY tabs.otherComputers.label "Tabs from Other Computers">
<!ENTITY tabs.searchText.label "Type here to find tabs…">
<!ENTITY tabs.context.openTab.label "Open This Tab">
<!ENTITY tabs.context.openMultipleTabs.label "Open Selected Tabs">
<!ENTITY tabs.context.bookmarkSingleTab.label "Bookmark This Tab…">
<!ENTITY tabs.context.bookmarkMultipleTabs.label "Bookmark Selected Tabs…">
<!ENTITY tabs.context.refreshList.label "Refresh List">

View File

@ -14,4 +14,3 @@
<!ENTITY syncNow.label "Sync Now"> <!ENTITY syncNow.label "Sync Now">
<!ENTITY syncTabsMenu.label "Tabs From Other Computers"> <!ENTITY syncTabsMenu.label "Tabs From Other Computers">
<!ENTITY syncNoTabsMenuItem.label "No Tabs Available">

View File

@ -37,3 +37,5 @@ error.sync.needUpdate.label = Update Weave
error.sync.needUpdate.accesskey = U error.sync.needUpdate.accesskey = U
error.sync.tryAgainButton.label = Sync Now error.sync.tryAgainButton.label = Sync Now
error.sync.tryAgainButton.accesskey = S error.sync.tryAgainButton.accesskey = S
tabs.fromOtherComputers.label = Tabs From Other Computers

View File

@ -162,6 +162,10 @@ ClientEngine.prototype = {
}, },
set localType(value) Svc.Prefs.set("client.type", value), set localType(value) Svc.Prefs.set("client.type", value),
isMobile: function isMobile(id) {
return this._store._remoteClients[id].type == "mobile";
},
// Always process incoming items because they might have commands // Always process incoming items because they might have commands
_reconcile: function _reconcile() { _reconcile: function _reconcile() {
return true; return true;