[Pkg-mozext-commits] [personasplus] 03/76: SeaMonkey Support (#33)

David Prévot taffit at moszumanska.debian.org
Fri Aug 4 21:45:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository personasplus.

commit bd2037dfb3e437ace1e83b800908bfdc1bd7750e
Author: derinb <baris at barisderin.com>
Date:   Wed Jul 13 19:09:32 2016 +0300

    SeaMonkey Support (#33)
    
    * SeaMonkey Support
    
    * SeaMonkey Support
    
    * Typo Fix
    
    * CSS Fix
    
    * CSS Formatting
---
 extension/content/customPersonaEditor.js |   3 +++
 extension/content/personas.css           |  16 +++++++++++++++-
 extension/content/personas_20x20.png     | Bin 0 -> 3889 bytes
 extension/content/personas_30x30.png     | Bin 0 -> 4802 bytes
 extension/install.rdf                    |   8 ++++++++
 extension/modules/personas.js            |  16 ++++++++--------
 extension/modules/service.js             |   1 +
 7 files changed, 35 insertions(+), 9 deletions(-)

diff --git a/extension/content/customPersonaEditor.js b/extension/content/customPersonaEditor.js
index 7d646cb..b915287 100644
--- a/extension/content/customPersonaEditor.js
+++ b/extension/content/customPersonaEditor.js
@@ -263,6 +263,9 @@ var CustomPersonaEditor = {
       case PersonaService.FIREFOX_ID:
  	window.close();
         break;
+      case PersonaService.SEAMONKEY_ID:
+        window.close();
+        break;
       default:
         throw "unknown application ID " + PersonaService.appInfo.ID;
     }
diff --git a/extension/content/personas.css b/extension/content/personas.css
index 2fc65a8..5b87bae 100644
--- a/extension/content/personas.css
+++ b/extension/content/personas.css
@@ -44,7 +44,8 @@
 /* Personas Menu/Toolbarbutton */
 
 #personas-selector-button,
-#personas-toolbar-button {
+#personas-toolbar-button,
+#personas-menu.seamonkey {
   list-style-image: url("chrome://personas/content/personas_16x16.png");
   -moz-image-region: rect(0, 16px, 16px, 0px);
 }
@@ -90,6 +91,19 @@
   font-weight: bold !important;
 }
 
+#personas-toolbar-button.seamonkey,
+#personas-toolbar-button.seamonkey:hover,
+#personas-toolbar-button.seamonkey:hover:active {
+  list-style-image: url("chrome://personas/content/personas_30x30.png");
+  -moz-image-region: rect(0, 30px, 30px, 0px);  
+}
+
+toolbar[iconsize="small"] #personas-toolbar-button.seamonkey,
+toolbar[iconsize="small"] #personas-toolbar-button.seamonkey:hover,
+toolbar[iconsize="small"] #personas-toolbar-button.seamonkey:hover:active {
+  list-style-image: url("chrome://personas/content/personas_20x20.png");
+}
+
 /**
  * Header and footer rules are designed to do four things:
  *
diff --git a/extension/content/personas_20x20.png b/extension/content/personas_20x20.png
new file mode 100755
index 0000000..2820c04
Binary files /dev/null and b/extension/content/personas_20x20.png differ
diff --git a/extension/content/personas_30x30.png b/extension/content/personas_30x30.png
new file mode 100755
index 0000000..8c7874e
Binary files /dev/null and b/extension/content/personas_30x30.png differ
diff --git a/extension/install.rdf b/extension/install.rdf
index ae563b3..eb378a7 100644
--- a/extension/install.rdf
+++ b/extension/install.rdf
@@ -61,6 +61,14 @@
       </Description>
     </em:targetApplication>
 
+    <em:targetApplication> <!-- SeaMonkey -->
+        <Description>
+            <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id>
+            <em:minVersion>2.26</em:minVersion>
+            <em:maxVersion>2.46</em:maxVersion>
+        </Description>
+    </em:targetApplication>
+
     <em:targetApplication> <!-- Thunderbird -->
       <Description>
         <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id>
diff --git a/extension/modules/personas.js b/extension/modules/personas.js
index 648e5fe..063ff4d 100644
--- a/extension/modules/personas.js
+++ b/extension/modules/personas.js
@@ -101,19 +101,19 @@ var PersonaController = {
             new this.StringBundle("chrome://branding/locale/brand.properties");
     },
 
-    get_menu(document) {
+    get_menu: function(document) {
         return document.getElementById("personas-menu");
     },
 
-    get_menuButton(document) {
+    get_menuButton: function(document) {
         return document.getElementById("personas-selector-button");
     },
 
-    get_menuPopup(document) {
+    get_menuPopup: function(document) {
         return document.getElementById("personas-selector-menu");
     },
 
-    get_toolbarButton(document) {
+    get_toolbarButton: function(document) {
         return document.getElementById("personas-toolbar-button");
     },
 
@@ -123,7 +123,7 @@ var PersonaController = {
             .getService(Ci.nsISessionStore);
     },
 
-    get_header(document) {
+    get_header: function(document) {
         switch (PersonaService.appInfo.ID) {
             case PersonaService.THUNDERBIRD_ID:
                 return document.getElementById("messengerWindow");
@@ -134,7 +134,7 @@ var PersonaController = {
         }
     },
 
-    get_footer(document) {
+    get_footer: function(document) {
         switch (PersonaService.appInfo.ID) {
             case PersonaService.THUNDERBIRD_ID:
                 return document.getElementById("status-bar");
@@ -1247,7 +1247,7 @@ var PersonaController = {
         toolbarbutton.setAttribute("label", this.dtd("&personas_app_title;"));
         toolbarbutton.setAttribute("type", "menu");
         toolbarbutton.setAttribute("id", "personas-toolbar-button"); //personas-toolbar-button
-        toolbarbutton.setAttribute("class", (PersonaService.appInfo.ID != PersonaController.SEAMONKEY_ID) ? "toolbarbutton-1" : "toolbarbutton-1 seamonkey");
+        toolbarbutton.setAttribute("class", (PersonaService.appInfo.ID != PersonaService.SEAMONKEY_ID) ? "toolbarbutton-1" : "toolbarbutton-1 seamonkey");
         return toolbarbutton;
     },
     addToolbarButton: function(window) {
@@ -1332,7 +1332,7 @@ var PersonaController = {
         else if (windowtype == "mail:3pane") personasmenu.setAttribute("insertafter", "addonsManager");
         else personasmenu.setAttribute("insertafter", "menu_openAddons");
         personasmenu.setAttribute("label", this.dtd("&personas_app_title;"));
-        personasmenu.setAttribute("class", "menu-iconic");
+        personasmenu.setAttribute("class", (PersonaService.appInfo.ID != PersonaService.SEAMONKEY_ID) ? "menu-iconic" : "menu-iconic seamonkey");
         personasmenu.setAttribute("id", "personas-menu");
 
         var personasselectormenu = document.createElement('menupopup');
diff --git a/extension/modules/service.js b/extension/modules/service.js
index df6196f..835cbe9 100644
--- a/extension/modules/service.js
+++ b/extension/modules/service.js
@@ -74,6 +74,7 @@ function endsWith(str, end) {
 var PersonaService = {
     THUNDERBIRD_ID: "{3550f703-e582-4d05-9a08-453d09bdfdc6}",
     FIREFOX_ID: "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}",
+    SEAMONKEY_ID:"{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}",
 
     // Wraps event listener functions so errors are not lost.
     wrap: function(fn) {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/personasplus.git



More information about the Pkg-mozext-commits mailing list