Skip to content

Commit

Permalink
See changelog
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.getfiregpg.org/firegpg@526 1e1cc2a3-b62a-0410-bc93-fb3b3b0a0737
  • Loading branch information
theglu committed Feb 1, 2009
1 parent 6f1d519 commit 731d9d4
Show file tree
Hide file tree
Showing 8 changed files with 219 additions and 145 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
@@ -1,4 +1,12 @@
2009-02-01 Maximilien Cuony
* FS#225
* FS#224
* FS#219
* FS#226
* FS#221

2009-01-31 Maximilien Cuony
* FS#228
* Splitting mime functions
* FS#222
* Keyring -> inline (FireGPGInline)
Expand Down
4 changes: 2 additions & 2 deletions content/Core/cgpgaccess.js
Expand Up @@ -203,7 +203,7 @@ var GPGAccess = {
if (arguement == '')
return "";

arguement = arguement.replace(/\{\$FXFolder\}/, FGPGFireFoxCurrentFolder);
arguement = arguement.replace(/\{\$FXFolder\}/gi, FGPGFireFoxCurrentFolder);

//We remove double-spaces
var reg=new RegExp(" ", "gi");
Expand Down Expand Up @@ -291,7 +291,7 @@ var GPGAccess = {
*/
getGPGCommand: function () {

return this.GpgCommand.replace(/\{\$FXFolder\}/, FGPGFireFoxCurrentFolder);
return this.GpgCommand.replace(/\{\$FXFolder\}/gi, FGPGFireFoxCurrentFolder);
},

/*
Expand Down
21 changes: 14 additions & 7 deletions content/Core/firefoxOverlay.xul
Expand Up @@ -130,22 +130,29 @@
</toolbarpalette>-->


<!-- <window id="main-window">
<!-- <vbox id="browser-bottombox">
<box id="firegpg-infos">
<box id="firegpg-popup" insertbefore="status-bar">
<vbox >
<label id="firegpg-bonjour" value="&firegpgPopInfo.labelBonjour;" />
<label id="firegpg-access-ok" value="&firegpgPopInfo.labelAccessOk;"/>
<label id="firegpg-access-err" value="&firegpgPopInfo.labelAccessErr;" />
<label id="firegpg-key-ok" value="&firegpgPopInfo.labelKeyOk;"/>
<label id="firegpg-key-err" value="&firegpgPopInfo.labelKeyErr;"/>
<label class="link" onclick="firegpg.options();" value="&firegpgPopInfo.options;" />&nbsp;
<label id="firegpg-access-err" value="&firegpgPopInfo.labelAccessErr;" />
<label id="firegpg-key-ok" value="&firegpgPopInfo.labelKeyOk;"/>
<label id="firegpg-key-err" value="&firegpgPopInfo.labelKeyErr;"/>
<label class="link" onclick="firegpg.closepopup();" value="&firegpgPopInfo.close;" />
</vbox>
</box>
</window> -->
</vbox>-->

<statusbar id="status-bar">
<statusbarpanel id="firegpg-statusbar-update" onclick="firegpg.onMenuItemCommand(null,'UPDATE');" style="display: none;">
<img src="chrome://firegpg/skin/firegpg.png" class="statusbarpanel-iconic"/>
<label value="An update of FireGPG is available" />
</statusbarpanel>
</statusbar>


</overlay>

Expand Down
84 changes: 56 additions & 28 deletions content/Core/misc.js
Expand Up @@ -112,6 +112,8 @@ var savedPassword = null; /* the private key password */
*/
var oldKeyID = '';

var updateAvailable = false;

/*
Function: fireGPGDebug
Expand Down Expand Up @@ -811,51 +813,77 @@ function testIfSomethingsIsNew() {

if (!noUpdates)
{
var Stamp = new Date();
var nbMs = Stamp.getTime();

var lastUpdate = 0;
if (updateAvailable) {
if (document.getElementById('firegpg-statusbar-update'))
document.getElementById('firegpg-statusbar-update').style.display = '';

try {
lastUpdate = parseInt(prefs.getCharPref("lastUpdateCheck"));
} catch (e) { }
} else {
var Stamp = new Date();
var nbMs = Stamp.getTime();

//Not A Number
if (isNaN(lastUpdate))
lastUpdate = 0;
//One day
if (lastUpdate < (nbMs - (24 * 60 * 60 * 1000)))
{
var lastUpdate = 0;

prefs.setCharPref("lastUpdateCheck",nbMs);
try {
lastUpdate = parseInt(prefs.getCharPref("lastUpdateCheck"));
} catch (e) { }

//Get the last version
var updateData = getContent("http://getfiregpg.org/stable/update.rdf");
//Not A Number
if (isNaN(lastUpdate))
lastUpdate = 0;
//One day
if (lastUpdate < (nbMs - (24 * 60 * 60 * 1000)))
{

var toDetect = "NS1:version=\"" + versionAct + "\"";
prefs.setCharPref("lastUpdateCheck",nbMs);

if (updateData.indexOf('ec8030f7-c20a-464f-9b0e-13a3a9e97384') != -1 && updateData.indexOf(toDetect) == -1 )
{
//Get the last version
var updateData = getContent("http://getfiregpg.org/stable/update.rdf");

var newVersion = "A new version of FireGPG is available, would you like to update now?";
try {
var toDetect = "NS1:version=\"" + versionAct + "\"";

newVersion = i18n.getString('newVersionAlert');
} catch (e) { }
if (updateData.indexOf('ec8030f7-c20a-464f-9b0e-13a3a9e97384') != -1 && updateData.indexOf(toDetect) == -1 )
{
if (document.getElementById('firegpg-statusbar-update') != null) {
document.getElementById('firegpg-statusbar-update').style.display = '';
updateAvailable = true;
} else {
showUpdateDialog();
}

if (confirm(newVersion))
{
openUILink("http://getfiregpg.org/stable/firegpg.xpi");
}
}
}
}
}
}

}
//*/
}
}

function showUpdateDialog() {

var i18n = document.getElementById("firegpg-strings");

var newVersion = "A new version of FireGPG is available, would you like to update now?";

try {

newVersion = i18n.getString('newVersionAlert');
} catch (e) { }

if (confirm(newVersion))
{
openUILink("http://getfiregpg.org/stable/firegpg.xpi");

}

updateAvailable = false;

if (document.getElementById('firegpg-statusbar-update') != null)
document.getElementById('firegpg-statusbar-update').style.display = 'none';


}
/*
Function: htmlEncode
Encode special chars (&, <, > et ") to they html values.
Expand Down
3 changes: 3 additions & 0 deletions content/Core/overlay.js
Expand Up @@ -63,6 +63,7 @@ const ACTION_EDITEUR = 'EDITEUR';
const ACTION_MANAGER = 'MANAGER';
const ACTION_OPTS = 'OPTS';
const ACTION_ERASE = 'ERASE';
const ACTION_UPDATE = 'UPDATE';

/*
* Class: firegpg
Expand Down Expand Up @@ -129,6 +130,8 @@ var firegpg = {
window.openDialog("chrome://firegpg/content/Dialogs/options.xul", "optionsFiregpg", "chrome, centerscreen, toolbar").focus();
else if (action == ACTION_ERASE)
eraseSavedPassword();
else if(action == ACTION_UPDATE)
showUpdateDialog();
},

/*
Expand Down
148 changes: 78 additions & 70 deletions content/Dialogs/options.xul
Expand Up @@ -226,99 +226,107 @@
label="&gmail-no-no-sign-checkbox;"/>

<groupbox flex="1">
<caption label="&gmail-new-interface;" />
<caption>
<button label="&gmail-new-interface;" onclick="e = document.getElementById('gmailNewInterface'); if (e.style.display=='none') {e.style.display=''; } else { e.style.display='none';} sizeToContent();"/>
</caption>

<checkbox id="gmail-disable-sign-detection-checkbox" preference="gmail-disable-sign-detection"
label="&gmail-disable-sign-detection;"/>
<vbox id="gmailNewInterface">

<checkbox id="gmail-disable-auto-decryption-checkbox" preference="gmail-disable-auto-decryption"
label="&gmail-disable-auto-decryption;"/>
<checkbox id="gmail-disable-sign-detection-checkbox" preference="gmail-disable-sign-detection"
label="&gmail-disable-sign-detection;"/>

<checkbox id="gmail-decrypt-when-reply-checkbox" preference="gmail-decrypt-when-reply"
label="&decrypt-when-reply;"/>
<checkbox id="gmail-disable-auto-decryption-checkbox" preference="gmail-disable-auto-decryption"
label="&gmail-disable-auto-decryption;"/>

<checkbox id="gmail-decrypt-when-reply-checkbox" preference="gmail-decrypt-when-reply"
label="&decrypt-when-reply;"/>

<label id="gmail-sbuttons-label" value="&gmail-select-by-default-label;"/>

<checkbox id="gmail-select-by-default-sign-checkbox" preference="gmail-select-by-default-sign"
label="&gmail-buton-sign-checkbox;"/>
<label id="gmail-sbuttons-label" value="&gmail-select-by-default-label;"/>

<checkbox id="gmail-select-by-default-encrypt-checkbox" preference="gmail-select-by-default-encrypt"
label="&gmail-buton-crypt-checkbox;"/>
<checkbox id="gmail-select-by-default-sign-checkbox" preference="gmail-select-by-default-sign"
label="&gmail-buton-sign-checkbox;"/>

<checkbox id="gmail-select-by-default-encrypt-checkbox" preference="gmail-select-by-default-encrypt"
label="&gmail-buton-crypt-checkbox;"/>

<checkbox id="gmail-select-by-default-inline-checkbox" preference="gmail-select-by-default-inline"
label="&gmail-buton-inline-checkbox;"/>

<checkbox id="gmail-select-by-default-inline-checkbox" preference="gmail-select-by-default-inline"
label="&gmail-buton-inline-checkbox;"/>

<label id="gmail-smtp-options-label" value="&gmail-smtp-options-label;"/>

<label id="gmail-smtp-host-label" value="&gmail-smtp-host;"/>
<textbox id="gmail-smtp-host-textbox" preference="gmail-smtp-host"/>
<label id="gmail-smtp-options-label" value="&gmail-smtp-options-label;" style="text-decoration: underline;"/>

<label id="gmail-smtp-port-label" value="&gmail-smtp-port;"/>
<textbox id="gmail-smtp-port-textbox" preference="gmail-smtp-port"/>
<label id="gmail-smtp-host-label" value="&gmail-smtp-host;"/>
<textbox id="gmail-smtp-host-textbox" preference="gmail-smtp-host"/>

<label id="gmail-smtp-username-label" value="&gmail-smtp-username;"/>
<textbox id="gmail-smtp-username-textbox" preference="gmail-smtp-username"/>
<label id="gmail-smtp-port-label" value="&gmail-smtp-port;"/>
<textbox id="gmail-smtp-port-textbox" preference="gmail-smtp-port"/>

<label id=" gmail-force-from-label" value="&gmail-force-from;"/>
<textbox id="gmail-force-from-textbox" preference="gmail-force-from"/>
<label id="gmail-smtp-username-label" value="&gmail-smtp-username;"/>
<textbox id="gmail-smtp-username-textbox" preference="gmail-smtp-username"/>

<label id=" gmail-force-from-label" value="&gmail-force-from;"/>
<textbox id="gmail-force-from-textbox" preference="gmail-force-from"/>

<checkbox id="gmail-smtp-use-ssl-checkbox" preference="gmail-smtp-use-ssl"
label="&gmail-smtp-use-ssl-checkbox;"/>

<checkbox id="gmail-smtp-google-com-checkbox" preference="gmail-smtp-google-com"
label="&gmail-smtp-google-com;"/>
<checkbox id="gmail-smtp-use-ssl-checkbox" preference="gmail-smtp-use-ssl"
label="&gmail-smtp-use-ssl-checkbox;"/>

<checkbox id="gmail-smtp-google-com-checkbox" preference="gmail-smtp-google-com"
label="&gmail-smtp-google-com;"/>

</groupbox>
</vbox>

</groupbox>

<groupbox flex="1">
<caption label="&gmail-old-interface;" />


<label id="gmail-buttons-label" value="&gmail-buttons-label;"/>


<grid flex="1">
<columns>
<column flex="1"/>
<column flex="1"/>
</columns>

<rows>
<row>
<checkbox id="gmail-buton-sign-checkbox" preference="gmail-buton-sign"
label="&gmail-buton-csign-checkbox;"/>
<checkbox id="gmail-no-no-signsend-checkbox" preference="gmail-buton-signsend"
label="&gmail-buton-csignsend-checkbox;"/>
</row>
<row>
<checkbox id="gmail-buton-psign-checkbox" preference="gmail-buton-psign"
label="&gmail-buton-sign-checkbox;"/>
<checkbox id="gmail-no-no-psignsend-checkbox" preference="gmail-buton-psignsend"
label="&gmail-buton-signsend-checkbox;"/>
</row>
<row>
<checkbox id="gmail-buton-crypt-checkbox" preference="gmail-buton-crypt"
label="&gmail-buton-crypt-checkbox;"/>
<checkbox id="gmail-no-no-cryptsend-checkbox" preference="gmail-buton-cryptsend"
label="&gmail-buton-cryptsend-checkbox;"/>
</row>
<row>
<checkbox id="gmail-buton-signcrypt-checkbox" preference="gmail-buton-signcrypt"
label="&gmail-buton-signcrypt-checkbox;"/>
<checkbox id="gmail-no-no-signcryptsend-checkbox" preference="gmail-buton-signcryptsend"
label="&gmail-buton-signcryptsend-checkbox;"/>
</row>
</rows>
</grid>

<checkbox id="gmail-buton-use-select-checkbox" preference="gmail-buton-use-select"
label="&gmail-buton-use-select-checkbox;"/>
<caption>
<button label="&gmail-old-interface;" onclick="e = document.getElementById('gmailOldInterface'); if (e.style.display=='none') {e.style.display=''; } else { e.style.display='none';} sizeToContent();"/>
</caption>

<vbox id="gmailOldInterface" style="display: none;">

<label id="gmail-buttons-label" value="&gmail-buttons-label;"/>

<grid flex="1">
<columns>
<column flex="1"/>
<column flex="1"/>
</columns>

<rows>
<row>
<checkbox id="gmail-buton-sign-checkbox" preference="gmail-buton-sign"
label="&gmail-buton-csign-checkbox;"/>
<checkbox id="gmail-no-no-signsend-checkbox" preference="gmail-buton-signsend"
label="&gmail-buton-csignsend-checkbox;"/>
</row>
<row>
<checkbox id="gmail-buton-psign-checkbox" preference="gmail-buton-psign"
label="&gmail-buton-sign-checkbox;"/>
<checkbox id="gmail-no-no-psignsend-checkbox" preference="gmail-buton-psignsend"
label="&gmail-buton-signsend-checkbox;"/>
</row>
<row>
<checkbox id="gmail-buton-crypt-checkbox" preference="gmail-buton-crypt"
label="&gmail-buton-crypt-checkbox;"/>
<checkbox id="gmail-no-no-cryptsend-checkbox" preference="gmail-buton-cryptsend"
label="&gmail-buton-cryptsend-checkbox;"/>
</row>
<row>
<checkbox id="gmail-buton-signcrypt-checkbox" preference="gmail-buton-signcrypt"
label="&gmail-buton-signcrypt-checkbox;"/>
<checkbox id="gmail-no-no-signcryptsend-checkbox" preference="gmail-buton-signcryptsend"
label="&gmail-buton-signcryptsend-checkbox;"/>
</row>
</rows>
</grid>

<checkbox id="gmail-buton-use-select-checkbox" preference="gmail-buton-use-select"
label="&gmail-buton-use-select-checkbox;"/>

</vbox>

</groupbox>
</prefpane>
Expand Down

0 comments on commit 731d9d4

Please sign in to comment.