зеркало из https://github.com/mozilla/gecko-dev.git
Bug 596612 - "tabs open on synced computers should be indicated in awesomelist results" [r=mark.finkle]
This commit is contained in:
Родитель
de47d5824c
Коммит
8e7dd9be6b
|
@ -76,7 +76,7 @@
|
|||
</handler>
|
||||
</handlers>
|
||||
<content orient="vertical">
|
||||
<xul:hbox class="autocomplete-item-container" align="top" xbl:inherits="favorite" mousethrough="always">
|
||||
<xul:hbox class="autocomplete-item-container" align="top" xbl:inherits="favorite,remote" mousethrough="always">
|
||||
<xul:image xbl:inherits="src"/>
|
||||
<xul:vbox flex="1">
|
||||
<xul:label class="autocomplete-item-label" crop="center" xbl:inherits="value"/>
|
||||
|
@ -288,6 +288,7 @@
|
|||
if (item._empty || item.getAttribute("url") != url) {
|
||||
item.setAttribute("url", url);
|
||||
item.removeAttribute("badge");
|
||||
item.removeAttribute("remote");
|
||||
}
|
||||
|
||||
let isBookmark = ((type == "bookmark") || (type == "tag"));
|
||||
|
@ -320,6 +321,7 @@
|
|||
noResultsItem.removeAttribute("src");
|
||||
noResultsItem.removeAttribute("tags");
|
||||
noResultsItem.removeAttribute("badge");
|
||||
noResultsItem.removeAttribute("remote");
|
||||
}
|
||||
]]></body>
|
||||
</method>
|
||||
|
@ -386,6 +388,10 @@
|
|||
window.clearTimeout(this._badgesTimeout);
|
||||
|
||||
this._badgesTimeout = window.setTimeout(function(self) {
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
let remoteItems = RemoteTabsList.panel._getRemoteTabs();
|
||||
#endif
|
||||
|
||||
for (let i = 0; i < self._items.childNodes.length; i++) {
|
||||
let item = self._items.childNodes[i];
|
||||
if (!item.hasAttribute("url"))
|
||||
|
@ -413,6 +419,22 @@
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef MOZ_SERVICES_SYNC
|
||||
// once we have check badges, check if the tab is in the remote list
|
||||
if (!Weave.Service.isLoggedIn)
|
||||
return;
|
||||
|
||||
for (let i = 0; i < remoteItems.length; i++) {
|
||||
let remoteURI = remoteItems[i].uri;
|
||||
if (remoteURI) {
|
||||
let itemHost = Services.io.newURI(currentURL, null, null);
|
||||
let remoteHost = Services.io.newURI(remoteURI, null, null);
|
||||
if (itemHost.equals(remoteHost))
|
||||
item.setAttribute("remote", "true");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}, 300, this);
|
||||
]]></body>
|
||||
|
|
|
@ -21,7 +21,7 @@ chrome.jar:
|
|||
* content/browser-ui.js (content/browser-ui.js)
|
||||
content/content.js (content/content.js)
|
||||
content/commandUtil.js (content/commandUtil.js)
|
||||
content/bindings.xml (content/bindings.xml)
|
||||
* content/bindings.xml (content/bindings.xml)
|
||||
content/tabs.xml (content/tabs.xml)
|
||||
content/bindings/checkbox.xml (content/bindings/checkbox.xml)
|
||||
content/bindings/browser.xml (content/bindings/browser.xml)
|
||||
|
|
|
@ -760,10 +760,26 @@ placeitem[src=""] .bookmark-item-container > image {
|
|||
background: url(images/star-24.png) no-repeat 100% 2px;
|
||||
}
|
||||
|
||||
.autocomplete-item-container[remote="true"] {
|
||||
background: url(images/remotetabs-24.png) no-repeat 100% 2px;
|
||||
}
|
||||
|
||||
.autocomplete-item-container[favorite="true"][remote="true"] {
|
||||
background: url(images/remotetabs-24.png) no-repeat 100% 2px, url(images/star-24.png) no-repeat 96% 2px;
|
||||
}
|
||||
|
||||
.autocomplete-item-container[favorite="true"]:-moz-locale-dir(rtl) {
|
||||
background: url(images/star-24.png) no-repeat left 2px;
|
||||
}
|
||||
|
||||
.autocomplete-item-container[remote="true"]:-moz-locale-dir(rtl) {
|
||||
background: url(images/remotetabs-24.png) no-repeat left 2px;
|
||||
}
|
||||
|
||||
.autocomplete-item-container[favorite="true"][remote="true"]:-moz-locale-dir(rtl) {
|
||||
background: url(images/remotetabs-24.png) no-repeat left 2px, url(images/star-24.png) no-repeat 4% 2px;
|
||||
}
|
||||
|
||||
.autocomplete-item-url,
|
||||
.bookmark-item-url {
|
||||
color: blue;
|
||||
|
@ -771,10 +787,15 @@ placeitem[src=""] .bookmark-item-container > image {
|
|||
-moz-margin-end: 24px;
|
||||
}
|
||||
|
||||
.autocomplete-item-container[favorite="true"] .autocomplete-item-label {
|
||||
.autocomplete-item-container[favorite="true"] .autocomplete-item-label,
|
||||
.autocomplete-item-container[remote="true"] .autocomplete-item-label {
|
||||
-moz-padding-end: 30px;
|
||||
}
|
||||
|
||||
.autocomplete-item-container[favorite="true"][remote="true"] {
|
||||
-moz-padding-end: 48px;
|
||||
}
|
||||
|
||||
.autocomplete-item-tags,
|
||||
.bookmark-item-tags {
|
||||
content: attr(tags);
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 399 B |
|
@ -72,6 +72,7 @@ chrome.jar:
|
|||
skin/images/console-active-64.png (images/console-active-64.png)
|
||||
skin/images/newtab-default-64.png (images/newtab-default-64.png)
|
||||
skin/images/newtab-active-64.png (images/newtab-active-64.png)
|
||||
skin/images/remotetabs-24.png (images/remotetabs-24.png)
|
||||
skin/images/remotetabs-32.png (images/remotetabs-32.png)
|
||||
skin/images/remotetabs-48.png (images/remotetabs-48.png)
|
||||
skin/images/tab-32.png (images/tab-32.png)
|
||||
|
|
Загрузка…
Ссылка в новой задаче