Changeset 21bab3


Ignore:
Timestamp:
Aug 2, 2014, 5:43:17 PM (5 years ago)
Author:
rene <rene@…>
Branches:
ng_0.9
Children:
a9d1b9
Parents:
35a6b3
Message:

added switch to show/hide status informations

Files:
12 edited

Legend:

Unmodified
Added
Removed
  • content/prefDialog/vI_prefDialog.js

    r35a6b3 r21bab3  
    7474                "VIdent_identity.smart_detectByReceivedHeader",
    7575                "VIdent_identity.smart_reply_for_newsgroups",
     76                "VIdent_identity.show_status",
    7677                "VIdent_identity.show_smtp",
    7778                "VIdent_identity.fcc_show_switch",
  • content/prefDialog/vI_prefDialog.xul

    r35a6b3 r21bab3  
    361361                <groupbox>
    362362                <caption label="&vI_prefDialog.composeDialog.caption2;"/>
     363                    <checkbox id="VIdent_identity.show_status" label="&vI_prefDialog.composeDialog.status.label;"
     364                        tooltiptext="&vI_prefDialog.composeDialog.status.tooltiptext;" prefstring="show_status" />
    363365                    <checkbox id="VIdent_identity.show_smtp" label="&vI_prefDialog.composeDialog.SMTP.label;"
    364366                        tooltiptext="&vI_prefDialog.composeDialog.SMTP.tooltiptext;" prefstring="show_smtp" />
  • content/vI_statusmenu.js

    r35a6b3 r21bab3  
    4444    objFccSwitch : null,
    4545    objStatusText : null,
     46    objStatusLogo : null,
    4647   
    4748    observe: function(self, subject, topic, data) {
    4849//         Log.debug("statusmenu observe " + data);
    4950        switch (data) {
     51            case "show_status":
     52                statusmenu.objStatusMenu.setAttribute("hidden", !vI.vIprefs.get(data));
     53                statusmenu.objStatusLogo.setAttribute("hidden", !vI.vIprefs.get(data));
     54                // no break, continue like with doFcc           
    5055            case "fcc_show_switch":
    5156                statusmenu.objFccSwitch.setAttribute("hidden", !vI.vIprefs.get(data));
     
    99104   
    100105    addObserver: function() {
    101         vI.vIprefs.addObserver("fcc_show_switch", this.observe, this);
     106        vI.vIprefs.addObserver("show_status", this.observe, this);
     107        vI.vIprefs.addObserver("fcc_show_switch", this.observe, this);
    102108        vI.vIprefs.addObserver("doFcc", this.observe, this);
    103109        vI.vIprefs.addObserver("storage", this.observe, this);
     
    112118   
    113119    removeObserver: function() {
     120        vI.vIprefs.removeObserver("show_status", this.observe);
    114121        vI.vIprefs.removeObserver("fcc_show_switch", this.observe);
    115122        vI.vIprefs.removeObserver("doFcc", this.observe);
     
    126133    init : function () {
    127134        statusmenu.objStatusMenu = document.getElementById("virtualIdentityExtension_vIStatusMenu");
     135        statusmenu.objStatusLogo = document.getElementById("virtualIdentityExtension_Logo");
    128136        statusmenu.objSaveBaseIDMenuItem = document.getElementById("virtualIdentityExtension_statusMenu_storage_saveBaseID");
    129137        statusmenu.objSaveSMTPMenuItem = document.getElementById("virtualIdentityExtension_statusMenu_storage_saveSMTP");
     
    139147
    140148        statusmenu.addObserver();
     149        statusmenu.observe(this, null, null, "show_status");
    141150        statusmenu.observe(this, null, null, "fcc_show_switch");
    142151        statusmenu.observe(this, null, null, "storage_show_switch");
     
    152161    __timeout : 5,  // timeout for status messages in seconds
    153162    __addStatusMessage : function(save, smtp) {
    154         var sourceString = "vident.statusText.save." + save;
    155         if (smtp != "off") sourceString = sourceString + ".smtp"
    156         var messageLine1 = statusmenu.stringBundle.GetStringFromName(sourceString + ".line1");
    157         var messageLine2 = statusmenu.stringBundle.GetStringFromName(sourceString + ".line2");
    158         if (!messageLine2) {
    159             statusmenu.objStatusText.setAttribute("label", messageLine1);
    160             statusmenu.objStatusTooltipLine1.setAttribute("value", messageLine1);
    161             statusmenu.objStatusTooltipLine2.setAttribute("hidden", "true");
    162         }   
    163         else {
    164             statusmenu.objStatusText.setAttribute("label", messageLine1 + " " + messageLine2);
    165             statusmenu.objStatusTooltipLine1.setAttribute("value", messageLine1);
    166             statusmenu.objStatusTooltipLine2.setAttribute("value", messageLine2);
    167             statusmenu.objStatusTooltipLine2.removeAttribute("hidden");
    168         }
    169         window.setTimeout(virtualIdentityExtension.statusmenu.__clearStatusMessage, statusmenu.__timeout * 1000);
     163        if (vI.vIprefs.get("show_status")) {
     164            var sourceString = "vident.statusText.save." + save;
     165            if (smtp != "off") sourceString = sourceString + ".smtp"
     166            var messageLine1 = statusmenu.stringBundle.GetStringFromName(sourceString + ".line1");
     167            var messageLine2 = statusmenu.stringBundle.GetStringFromName(sourceString + ".line2");
     168            if (!messageLine2) {
     169                statusmenu.objStatusText.setAttribute("label", messageLine1);
     170                statusmenu.objStatusTooltipLine1.setAttribute("value", messageLine1);
     171                statusmenu.objStatusTooltipLine2.setAttribute("hidden", "true");
     172            }   
     173            else {
     174                statusmenu.objStatusText.setAttribute("label", messageLine1 + " " + messageLine2);
     175                statusmenu.objStatusTooltipLine1.setAttribute("value", messageLine1);
     176                statusmenu.objStatusTooltipLine2.setAttribute("value", messageLine2);
     177                statusmenu.objStatusTooltipLine2.removeAttribute("hidden");
     178            }
     179            window.setTimeout(virtualIdentityExtension.statusmenu.__clearStatusMessage, statusmenu.__timeout * 1000);
     180        }
    170181    },
    171182
  • content/v_identity.xul

    r35a6b3 r21bab3  
    106106              id="virtualIdentityExtension_Logo"
    107107              insertafter="statusText"
    108               align="right">
     108              align="right"
     109              hidden="true">
    109110        <label value="&vident.vidLogo.label; &vident.version;" />
    110111        <observes id="virtualIdentityExtension_msgIdentityClone_observer" element="virtualIdentityExtension_msgIdentityClone" attribute="vid" />
     
    116117              context="virtualIdentityExtension_statusMenu"
    117118              tooltip="virtualIdentityExtension_statusMenuTooltip"
    118               onclick="virtualIdentityExtension.statusmenu.clicked(event.button);" />
     119              onclick="virtualIdentityExtension.statusmenu.clicked(event.button);"
     120              hidden="true"/>
    119121</statusbar>
    120122 
  • defaults/preferences/preferences.js

    r35a6b3 r21bab3  
    1010pref("extensions.virtualIdentity.copyAttachVCardSettings", false);
    1111pref("extensions.virtualIdentity.show_smtp", false);
     12pref("extensions.virtualIdentity.show_status", true);
    1213pref("extensions.virtualIdentity.fcc_show_switch", false);
    1314pref("extensions.virtualIdentity.smart_draft", true);
  • locale/cs-CZ/vI_prefDialog.dtd

    r35a6b3 r21bab3  
    9191<!ENTITY vI_prefDialog.composeDialog.HideOpenPGPSignature.label "při pouÅŸití Virtual Identity vypnout openPGP podpis">
    9292<!ENTITY vI_prefDialog.composeDialog.autoReplyToSelf.label "nastavit Virtual Identity jako adresu pro Reply-To">
     93<!ENTITY vI_prefDialog.composeDialog.status.label "show Status-Bar infos / menu"> <!-- translate -->
     94<!ENTITY vI_prefDialog.composeDialog.status.tooltiptext "show Notifiations in Status-Bar, display Status-Bar Menu"> <!-- translate -->
    9395<!ENTITY vI_prefDialog.composeDialog.SMTP.label "zobrazit nabídku SMTP">
    9496<!ENTITY vI_prefDialog.composeDialog.SMTP.tooltiptext "zobrazit nabídku pro vÃœběr dostupnÃœch SMTP serverů">
  • locale/de-DE/vI_prefDialog.dtd

    r35a6b3 r21bab3  
    9191<!ENTITY vI_prefDialog.composeDialog.HideOpenPGPSignature.label "entferne openPGP Signatur bei Nutzung einer Virtuellen IdentitÀt">
    9292<!ENTITY vI_prefDialog.composeDialog.autoReplyToSelf.label "setze Virtuelle IdentitÀt als Reply-To Adresse">
     93<!ENTITY vI_prefDialog.composeDialog.status.label "zeige Status-Bar Infos / Menu">
     94<!ENTITY vI_prefDialog.composeDialog.status.tooltiptext "zeigt Hinweise im Status-Bar sowie Status-Bar Menu">
    9395<!ENTITY vI_prefDialog.composeDialog.SMTP.label "zeige SMTP Auswahlmenu">
    9496<!ENTITY vI_prefDialog.composeDialog.SMTP.tooltiptext "zeige Menu um zwischen existierenden SMTP-Servern auszuwÀhlen">
  • locale/en-US/vI_prefDialog.dtd

    r35a6b3 r21bab3  
    9191<!ENTITY vI_prefDialog.composeDialog.HideOpenPGPSignature.label "deactivate openPGP signature when using a Virtual Identity">
    9292<!ENTITY vI_prefDialog.composeDialog.autoReplyToSelf.label "set Virtual Identity as Reply-To address">
     93<!ENTITY vI_prefDialog.composeDialog.status.label "show Status-Bar infos / menu">
     94<!ENTITY vI_prefDialog.composeDialog.status.tooltiptext "show Notifiations in Status-Bar, display Status-Bar Menu">
    9395<!ENTITY vI_prefDialog.composeDialog.SMTP.label "show SMTP Menu">
    9496<!ENTITY vI_prefDialog.composeDialog.SMTP.tooltiptext "show Menu to select between available SMTP-servers">
  • locale/es-ES/vI_prefDialog.dtd

    r35a6b3 r21bab3  
    9191<!ENTITY vI_prefDialog.composeDialog.HideOpenPGPSignature.label "desactivar la firma openPGP al usar una identidad virtual">
    9292<!ENTITY vI_prefDialog.composeDialog.autoReplyToSelf.label "establecer la identidad virtual como la dirección a la que responder">
     93<!ENTITY vI_prefDialog.composeDialog.status.label "show Status-Bar infos / menu"> <!-- translate -->
     94<!ENTITY vI_prefDialog.composeDialog.status.tooltiptext "show Notifiations in Status-Bar, display Status-Bar Menu"> <!-- translate -->
    9395<!ENTITY vI_prefDialog.composeDialog.SMTP.label "mostrar menú SMTP">
    9496<!ENTITY vI_prefDialog.composeDialog.SMTP.tooltiptext "mostrar un menú para seleccionar los servidores SMTP disponibles">
  • locale/fr/vI_prefDialog.dtd

    r35a6b3 r21bab3  
    9191<!ENTITY vI_prefDialog.composeDialog.HideOpenPGPSignature.label "désactiver la signature openPGP en cas d'utilisation de Virtual Identity">
    9292<!ENTITY vI_prefDialog.composeDialog.autoReplyToSelf.label "utiliser Virtual Identity pour une adresse de &apos;réponse à&apos;">
     93<!ENTITY vI_prefDialog.composeDialog.status.label "show Status-Bar infos / menu"> <!-- translate -->
     94<!ENTITY vI_prefDialog.composeDialog.status.tooltiptext "show Notifiations in Status-Bar, display Status-Bar Menu"> <!-- translate -->
    9395<!ENTITY vI_prefDialog.composeDialog.SMTP.label "montrer le menu SMTP">
    9496<!ENTITY vI_prefDialog.composeDialog.SMTP.tooltiptext "affiche le menu de sélection entre les serveurs SMTP disponibles">
  • locale/nl/vI_prefDialog.dtd

    r35a6b3 r21bab3  
    9191<!ENTITY vI_prefDialog.composeDialog.HideOpenPGPSignature.label "openPGP-ondertekening deactiveren bij gebruik virtuele identiteit">
    9292<!ENTITY vI_prefDialog.composeDialog.autoReplyToSelf.label "Virtuele identiteit als Reply-To-adres instellen">
     93<!ENTITY vI_prefDialog.composeDialog.status.label "show Status-Bar infos / menu"> <!-- translate -->
     94<!ENTITY vI_prefDialog.composeDialog.status.tooltiptext "show Notifiations in Status-Bar, display Status-Bar Menu"> <!-- translate -->
    9395<!ENTITY vI_prefDialog.composeDialog.SMTP.label "SMTP-menu weergeven">
    9496<!ENTITY vI_prefDialog.composeDialog.SMTP.tooltiptext "Menu weergeven om beschikbare SMTP-servers te selecteren">
  • locale/ru-RU/vI_prefDialog.dtd

    r35a6b3 r21bab3  
    182182">
    183183<!ENTITY vI_prefDialog.composeDialog.autoReplyToSelf.label "УстаМавлОвать вОртуальМые лОчМые ЎаММые в качестве ПбратМПгП аЎреса (Reply-To)">
     184<!ENTITY vI_prefDialog.composeDialog.status.label "show Status-Bar infos / menu"> <!-- translate -->
     185<!ENTITY vI_prefDialog.composeDialog.status.tooltiptext "show Notifiations in Status-Bar, display Status-Bar Menu"> <!-- translate -->
    184186<!ENTITY vI_prefDialog.composeDialog.SMTP.label "ОтПбражать ЌеМю SMTP-серверПв">
    185187<!ENTITY vI_prefDialog.composeDialog.SMTP.tooltiptext "ОтПбражать ЌеМю ЎПступМыÑ
Note: See TracChangeset for help on using the changeset viewer.