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
Родитель 6c104ff79a
Коммит 71f982d974
5 изменённых файлов: 37 добавлений и 2 удалений

23
services/sync/Weave.js Normal file → Executable 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) {
return XPCOMUtils.generateModule([WeaveService]);
return XPCOMUtils.generateModule([WeaveService, AboutWeaveTabs]);
}

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

@ -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">

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

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

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

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

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

@ -162,6 +162,10 @@ ClientEngine.prototype = {
},
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
_reconcile: function _reconcile() {
return true;