summaryrefslogtreecommitdiffstats
path: root/application/basilisk
diff options
context:
space:
mode:
authorMatt A. Tobin <email@mattatobin.com>2019-04-16 14:51:15 -0400
committerMatt A. Tobin <email@mattatobin.com>2019-04-16 14:51:15 -0400
commit868c9b8d7f6771b7540ace735229f02f8cc46aaf (patch)
tree2f581ed2b5b4db8a535ba0c9d306751f531cf4f2 /application/basilisk
parent519d0cf5523b3e83d647ebbf0fd132dea7826d95 (diff)
downloadUXP-868c9b8d7f6771b7540ace735229f02f8cc46aaf.tar
UXP-868c9b8d7f6771b7540ace735229f02f8cc46aaf.tar.gz
UXP-868c9b8d7f6771b7540ace735229f02f8cc46aaf.tar.lz
UXP-868c9b8d7f6771b7540ace735229f02f8cc46aaf.tar.xz
UXP-868c9b8d7f6771b7540ace735229f02f8cc46aaf.zip
[BASILISK] Port PM Sync Client - Part 5: Port the original sync toolbar button and create a synced tabs toolbar button
Diffstat (limited to 'application/basilisk')
-rw-r--r--application/basilisk/base/content/browser.js5
-rw-r--r--application/basilisk/base/content/browser.xul12
-rw-r--r--application/basilisk/locales/en-US/chrome/browser/browser.dtd1
-rw-r--r--application/basilisk/themes/linux/sync-menuPanel.pngbin1774 -> 0 bytes
-rw-r--r--application/basilisk/themes/linux/sync-menuPanel@2x.pngbin3877 -> 0 bytes
-rw-r--r--application/basilisk/themes/osx/sync-menuPanel.pngbin1562 -> 0 bytes
-rw-r--r--application/basilisk/themes/osx/sync-menuPanel@2x.pngbin3365 -> 0 bytes
-rw-r--r--application/basilisk/themes/shared/browser.inc2
-rw-r--r--application/basilisk/themes/shared/menupanel.inc.css21
-rw-r--r--application/basilisk/themes/shared/toolbarbuttons.inc.css50
-rw-r--r--application/basilisk/themes/windows/sync-menuPanel.pngbin1821 -> 0 bytes
-rw-r--r--application/basilisk/themes/windows/sync-menuPanel@2x.pngbin3944 -> 0 bytes
12 files changed, 89 insertions, 2 deletions
diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js
index 49ee14848..a752f4cd9 100644
--- a/application/basilisk/base/content/browser.js
+++ b/application/basilisk/base/content/browser.js
@@ -6254,7 +6254,10 @@ function checkEmptyPageOrigin(browser = gBrowser.selectedBrowser,
#ifdef MOZ_SERVICES_SYNC
function BrowserOpenSyncTabs() {
- switchToTabHavingURI("about:sync-tabs", true);
+ if (gSyncUI._needsSetup())
+ gSyncUI.openSetup();
+ else
+ switchToTabHavingURI("about:sync-tabs", true);
}
#endif
diff --git a/application/basilisk/base/content/browser.xul b/application/basilisk/base/content/browser.xul
index d50a5c773..d99ac9bc8 100644
--- a/application/basilisk/base/content/browser.xul
+++ b/application/basilisk/base/content/browser.xul
@@ -911,6 +911,18 @@
type="checkbox"
label="&fullScreenCmd.label;"
tooltip="dynamic-shortcut-tooltip"/>
+
+#ifdef MOZ_SERVICES_SYNC
+ <toolbarbutton id="sync-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&syncToolbarButton.label;"
+ oncommand="gSyncUI.handleToolbarButton();"/>>
+
+ <toolbarbutton id="sync-tabs-button"
+ class="toolbarbutton-1 chromeclass-toolbar-additional"
+ label="&syncTabsToolbarButton.label;"
+ oncommand="BrowserOpenSyncTabs();"/>
+#endif
</toolbarpalette>
</toolbox>
diff --git a/application/basilisk/locales/en-US/chrome/browser/browser.dtd b/application/basilisk/locales/en-US/chrome/browser/browser.dtd
index 9632602d5..87f4a7807 100644
--- a/application/basilisk/locales/en-US/chrome/browser/browser.dtd
+++ b/application/basilisk/locales/en-US/chrome/browser/browser.dtd
@@ -734,6 +734,7 @@ you can use these alternative items. Otherwise, their values should be empty. -
<!ENTITY syncSyncNowItem.label "Sync Now">
<!ENTITY syncSyncNowItem.accesskey "S">
<!ENTITY syncToolbarButton.label "Sync">
+<!ENTITY syncTabsToolbarButton.label "Synced Tabs">
#endif
<!ENTITY customizeMode.menuAndToolbars.header2 "Additional Tools and Features">
diff --git a/application/basilisk/themes/linux/sync-menuPanel.png b/application/basilisk/themes/linux/sync-menuPanel.png
deleted file mode 100644
index 1ed5472c1..000000000
--- a/application/basilisk/themes/linux/sync-menuPanel.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/themes/linux/sync-menuPanel@2x.png b/application/basilisk/themes/linux/sync-menuPanel@2x.png
deleted file mode 100644
index b40ab1fbc..000000000
--- a/application/basilisk/themes/linux/sync-menuPanel@2x.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/themes/osx/sync-menuPanel.png b/application/basilisk/themes/osx/sync-menuPanel.png
deleted file mode 100644
index f7403a327..000000000
--- a/application/basilisk/themes/osx/sync-menuPanel.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/themes/osx/sync-menuPanel@2x.png b/application/basilisk/themes/osx/sync-menuPanel@2x.png
deleted file mode 100644
index 9f9926370..000000000
--- a/application/basilisk/themes/osx/sync-menuPanel@2x.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/themes/shared/browser.inc b/application/basilisk/themes/shared/browser.inc
index 81caf94d6..6989f064a 100644
--- a/application/basilisk/themes/shared/browser.inc
+++ b/application/basilisk/themes/shared/browser.inc
@@ -2,7 +2,7 @@
% Note that zoom-reset-button is a bit different since it doesn't use an image and thus has the image with display: none.
%define nestedButtons #zoom-out-button, #zoom-reset-button, #zoom-in-button, #cut-button, #copy-button, #paste-button
-%define primaryToolbarButtons #back-button, #forward-button, #home-button, #print-button, #downloads-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #fullscreen-button, #sync-button, #feed-button, #open-file-button, #find-button, #developer-button, #preferences-button, #privatebrowsing-button, #save-page-button, #add-ons-button, #history-panelmenu, #nav-bar-overflow-button, #PanelUI-menu-button, #characterencoding-button, #email-link-button, #sidebar-button, @nestedButtons@, #e10s-button, #panic-button, #webide-button, #containers-panelmenu
+%define primaryToolbarButtons #back-button, #forward-button, #home-button, #print-button, #downloads-button, #bookmarks-menu-button, #new-tab-button, #new-window-button, #fullscreen-button, #sync-button, #sync-tabs-button, #feed-button, #open-file-button, #find-button, #developer-button, #preferences-button, #privatebrowsing-button, #save-page-button, #add-ons-button, #history-panelmenu, #nav-bar-overflow-button, #PanelUI-menu-button, #characterencoding-button, #email-link-button, #sidebar-button, @nestedButtons@, #e10s-button, #panic-button, #webide-button, #containers-panelmenu
%ifdef XP_MACOSX
% Prior to 10.7 there wasn't a native fullscreen button so we use #restore-button to exit fullscreen
diff --git a/application/basilisk/themes/shared/menupanel.inc.css b/application/basilisk/themes/shared/menupanel.inc.css
index 266e1c83e..2feb941a2 100644
--- a/application/basilisk/themes/shared/menupanel.inc.css
+++ b/application/basilisk/themes/shared/menupanel.inc.css
@@ -48,11 +48,32 @@ toolbarpaletteitem[place="palette"] > #save-page-button {
-moz-image-region: rect(0px, 352px, 32px, 320px);
}
+/* Start Sync Buttons */
+
#sync-button[cui-areatype="menu-panel"],
toolbarpaletteitem[place="palette"] > #sync-button {
+ -moz-image-region: rect(0px, 384px, 32px, 352px)
+}
+
+#sync-button[cui-areatype="menu-panel"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-menuPanel.png");
+ -moz-image-region: rect(0, 32px, 32px, 0);
+}
+
+@media (min-resolution: 1.1dppx) {
+ #sync-button[cui-areatype="menu-panel"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-menuPanel@2x.png");
+ -moz-image-region: rect(0, 64px, 64px, 0);
+ }
+}
+
+#sync-tabs-button[cui-areatype="menu-panel"],
+toolbarpaletteitem[place="palette"] > #sync-tabs-button {
-moz-image-region: rect(0px, 1024px, 32px, 992px);
}
+/* End Sync Buttons */
+
#containers-panelmenu[cui-areatype="menu-panel"],
toolbarpaletteitem[place="palette"] > #containers-panelmenu {
-moz-image-region: rect(0px, 1056px, 32px, 1024px);
diff --git a/application/basilisk/themes/shared/toolbarbuttons.inc.css b/application/basilisk/themes/shared/toolbarbuttons.inc.css
index c043b8192..2f74b8361 100644
--- a/application/basilisk/themes/shared/toolbarbuttons.inc.css
+++ b/application/basilisk/themes/shared/toolbarbuttons.inc.css
@@ -52,10 +52,35 @@ toolbar[brighttext] #bookmarks-menu-button > .toolbarbutton-menubutton-dropmarke
-moz-image-region: rect(0, 252px, 18px, 234px);
}
+/* Start Sync Buttons */
+
#sync-button[cui-areatype="toolbar"] {
+ -moz-image-region: rect(0, 270px, 18px, 252px);
+}
+
+#sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar.png");
+ -moz-image-region: rect(0, 18px, 18px, 0);
+}
+
+@media (-moz-os-version: windows-win7) {
+ #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar-win7.png");
+ -moz-image-region: rect(0, 18px, 18px, 0);
+ }
+}
+
+toolbar[brighttext] #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar-inverted.png");
+ -moz-image-region: rect(0, 18px, 18px, 0);
+}
+
+#sync-tabs-button[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 792px, 18px, 774px);
}
+/* End Sync Buttons */
+
#containers-panelmenu[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 810px, 18px, 792px);
}
@@ -226,10 +251,35 @@ toolbar[brighttext] #bookmarks-menu-button > .toolbarbutton-menubutton-dropmarke
-moz-image-region: rect(0, 504px, 36px, 468px);
}
+ /* Start Sync Buttons */
+
#sync-button[cui-areatype="toolbar"] {
+ -moz-image-region: rect(0, 540px, 36px, 504px);
+ }
+
+ #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar@2x.png");
+ -moz-image-region: rect(0, 36px, 36px, 0);
+ }
+
+ @media (-moz-os-version: windows-win7) {
+ #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar-win7@2x.png");
+ -moz-image-region: rect(0, 36px, 36px, 0);
+ }
+ }
+
+ toolbar[brighttext] #sync-button[cui-areatype="toolbar"][status="active"] {
+ list-style-image: url("chrome://browser/skin/syncProgress-toolbar-inverted@2x.png");
+ -moz-image-region: rect(0, 36px, 36px, 0);
+ }
+
+ #sync-tabs-button[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 1584px, 36px, 1548px);
}
+ /* End Sync Buttons */
+
#containers-panelmenu[cui-areatype="toolbar"] {
-moz-image-region: rect(0, 1620px, 36px, 1584px);
}
diff --git a/application/basilisk/themes/windows/sync-menuPanel.png b/application/basilisk/themes/windows/sync-menuPanel.png
deleted file mode 100644
index 3ab040944..000000000
--- a/application/basilisk/themes/windows/sync-menuPanel.png
+++ /dev/null
Binary files differ
diff --git a/application/basilisk/themes/windows/sync-menuPanel@2x.png b/application/basilisk/themes/windows/sync-menuPanel@2x.png
deleted file mode 100644
index 9358d3d22..000000000
--- a/application/basilisk/themes/windows/sync-menuPanel@2x.png
+++ /dev/null
Binary files differ