summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorniko <niko>2012-06-05 21:13:40 (GMT)
committerniko <niko>2012-06-05 21:13:40 (GMT)
commitf7a6076bef646fd22af59697db67364d0bed9ee8 (patch)
treef3eb1608b56cc4a5225b32fa8b9297dbeb30bddd /src
parentbc9c310ae3eb17ec245ccdceec6609244ac75007 (diff)
downloadsynckolab-f7a6076bef646fd22af59697db67364d0bed9ee8.tar.gz
hide recurring and make sure close-window checkbox works correctly
Diffstat (limited to 'src')
-rw-r--r--src/chrome/content/synckolab/config.js6
-rw-r--r--src/chrome/content/synckolab/progressWindow.xul2
-rw-r--r--src/chrome/content/synckolab/synckolab.js3
-rw-r--r--src/chrome/content/synckolab/wndConfig.js12
-rw-r--r--src/chrome/content/synckolab/wndConfig.xul34
5 files changed, 30 insertions, 27 deletions
diff --git a/src/chrome/content/synckolab/config.js b/src/chrome/content/synckolab/config.js
index 9ec4521..4595dcc 100644
--- a/src/chrome/content/synckolab/config.js
+++ b/src/chrome/content/synckolab/config.js
@@ -63,7 +63,7 @@ com.synckolab.config = {
// save changes to imap (vs. read only)
saveToImap: {type: com.synckolab.tools.CONFIG_TYPE_BOOL, def: true },
// automatically sync every X minutes (0 = disable)
- syncInterval: {type: com.synckolab.tools.CONFIG_TYPE_INT, def: 0 },
+ //@deprecated syncInterval: {type: com.synckolab.tools.CONFIG_TYPE_INT, def: 0 },
// format to use: xml|vcard
format: {type: com.synckolab.tools.CONFIG_TYPE_CHAR, def: "xml" },
// timeframe to sync in (don't sync entries with an older start-date)
@@ -117,8 +117,8 @@ com.synckolab.config.loadConfiguration = function(pref) {
debugLevel: com.synckolab.tools.getConfigValue(pref, "debugLevel", com.synckolab.tools.CONFIG_TYPE_INT, com.synckolab.global.LOG_WARNING),
// hide folder
hideFolder: com.synckolab.tools.getConfigValue(pref, "hideFolder", com.synckolab.tools.CONFIG_TYPE_BOOL, false),
- // hide the window while sync
- hiddenWindow: com.synckolab.tools.getConfigValue(pref, "hiddenWindow", com.synckolab.tools.CONFIG_TYPE_BOOL, false),
+ // close window when done
+ closeWindow: com.synckolab.tools.getConfigValue(pref, "closeWindow", com.synckolab.tools.CONFIG_TYPE_BOOL, false),
// sync automatically once on start
syncOnStart: com.synckolab.tools.getConfigValue(pref, "syncOnStart", com.synckolab.tools.CONFIG_TYPE_BOOL, false),
accounts: []
diff --git a/src/chrome/content/synckolab/progressWindow.xul b/src/chrome/content/synckolab/progressWindow.xul
index 3970c1c..97a0bb3 100644
--- a/src/chrome/content/synckolab/progressWindow.xul
+++ b/src/chrome/content/synckolab/progressWindow.xul
@@ -5,6 +5,7 @@
<window
id="progress-window"
title="Synchronizing with Imap Folders "
+ onload="load()"
orient="horizontal"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="synckolab.js"/>
@@ -37,6 +38,7 @@ function load() {
try {
gCloseWindow = pref.getBoolPref("SyncKolab.closeWindow");
} catch (ex) {}
+ alert("close window: " + gCloseWindow)
document.getElementById("closeWnd").checked = gCloseWindow;
}
diff --git a/src/chrome/content/synckolab/synckolab.js b/src/chrome/content/synckolab/synckolab.js
index 9fc1fb9..413bfa3 100644
--- a/src/chrome/content/synckolab/synckolab.js
+++ b/src/chrome/content/synckolab/synckolab.js
@@ -58,7 +58,7 @@ com.synckolab.main = {
* runs periodically and checks if there is anything to do
*/
com.synckolab.main.syncKolabTimer = function () {
-
+/*@deprecated: listener works better
com.synckolab.tools.logMessage("sync timer: check configuration", com.synckolab.global.LOG_DEBUG);
var i;
@@ -106,6 +106,7 @@ com.synckolab.main.syncKolabTimer = function () {
// wait a minute
com.synckolab.tools.logMessage("sync timer: sleep for one minute", com.synckolab.global.LOG_DEBUG);
com.synckolab.main.timer.initWithCallback({notify:function (){com.synckolab.main.syncKolabTimer();}}, 60000, 0);
+*/
};
com.synckolab.main.initGroupwareActions = function() {
diff --git a/src/chrome/content/synckolab/wndConfig.js b/src/chrome/content/synckolab/wndConfig.js
index 9b56bf1..10112ad 100644
--- a/src/chrome/content/synckolab/wndConfig.js
+++ b/src/chrome/content/synckolab/wndConfig.js
@@ -76,7 +76,7 @@ com.synckolab.settings.writeConfiguration = function(config) {
com.synckolab.tools.setConfigValue(pref, "configVersion", com.synckolab.tools.CONFIG_TYPE_INT, config.version + 1);
com.synckolab.tools.setConfigValue(pref, "debugLevel", com.synckolab.tools.CONFIG_TYPE_INT, config.debugLevel);
com.synckolab.tools.setConfigValue(pref, "hideFolder", com.synckolab.tools.CONFIG_TYPE_BOOL, config.hideFolder);
- com.synckolab.tools.setConfigValue(pref, "hiddenWindow", com.synckolab.tools.CONFIG_TYPE_BOOL, config.hiddenWindow);
+ com.synckolab.tools.setConfigValue(pref, "closeWindow", com.synckolab.tools.CONFIG_TYPE_BOOL, config.closeWindow);
com.synckolab.tools.setConfigValue(pref, "syncOnStart", com.synckolab.tools.CONFIG_TYPE_BOOL, config.syncOnStart);
// check if an account has been removed
@@ -435,7 +435,7 @@ com.synckolab.settings.checkOldConfig = function() {
// hide folder
hideFolder: com.synckolab.tools.getConfigValue(pref, "hideFolder", com.synckolab.tools.CONFIG_TYPE_BOOL, false),
// hide the window while sync
- hiddenWindow: com.synckolab.tools.getConfigValue(pref, "hiddenWindow", com.synckolab.tools.CONFIG_TYPE_BOOL, false),
+ closeWindow: com.synckolab.tools.getConfigValue(pref, "closeWindow", com.synckolab.tools.CONFIG_TYPE_BOOL, false),
// sync automatically once on start
syncOnStart: com.synckolab.tools.getConfigValue(pref, "syncOnStart", com.synckolab.tools.CONFIG_TYPE_BOOL, false),
accounts: []
@@ -876,7 +876,7 @@ com.synckolab.settings.fillBaseInfo = function() {
var conf = com.synckolab.settings.config;
document.getElementById("hideFolder").checked = conf.hideFolder;
- document.getElementById("hiddenWnd").checked = conf.hiddenWindow;
+ document.getElementById("closeWindow").checked = conf.closeWindow;
document.getElementById("syncOnStart").checked = conf.syncOnStart;
if (conf.debugLevel) {
@@ -967,7 +967,7 @@ com.synckolab.settings.getBaseInfo = function() {
var conf = com.synckolab.settings.config;
conf.hideFolder = document.getElementById("hideFolder").checked;
conf.debugLevel = document.getElementById("debugLevel").value;
- conf.hiddenWindow = document.getElementById("hiddenWnd").checked;
+ conf.closeWindow = document.getElementById("closeWindow").checked;
conf.syncOnStart = document.getElementById("syncOnStart").checked;
};
@@ -1030,7 +1030,7 @@ com.synckolab.settings.getInfo = function() {
// save changes to imap (vs. read only)
config.saveToImap = document.getElementById(prefix + "SaveToImap").checked;
// automatically sync every X minutes (0 = disable)
- config.syncInterval = document.getElementById(prefix + "SyncInterval").value;
+ //@deprecated config.syncInterval = document.getElementById(prefix + "SyncInterval").value;
// format to use: xml|vcard
config.format = document.getElementById(prefix + "Format").value;
if(prefix !== "contact") {
@@ -1116,7 +1116,7 @@ com.synckolab.settings.fillInfo = function(type, acctName, confName) {
// save changes to imap (vs. read only)
document.getElementById(prefix + "SaveToImap").checked = config.saveToImap;
// automatically sync every X minutes (0 = disable)
- document.getElementById(prefix + "SyncInterval").value = config.syncInterval;
+ //@deprecated document.getElementById(prefix + "SyncInterval").value = config.syncInterval;
// format to use: xml|vcard
actList = document.getElementById(prefix + "Format");
cur = actList.firstChild.firstChild;
diff --git a/src/chrome/content/synckolab/wndConfig.xul b/src/chrome/content/synckolab/wndConfig.xul
index f4ce6da..107c9c1 100644
--- a/src/chrome/content/synckolab/wndConfig.xul
+++ b/src/chrome/content/synckolab/wndConfig.xul
@@ -4,7 +4,7 @@
<!DOCTYPE loc SYSTEM "chrome://synckolab/locale/synckolab.dtd">
-<dialog id="syncKolabConfigDlg" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="com.synckolab.settings.init();" buttons="accept,cancel" ondialogaccept="return com.synckolab.settings.savePrefs();" persist="screenX screenY" width="0" title="SyncKolab 2.0.0">
+<dialog id="syncKolabConfigDlg" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="com.synckolab.settings.init();" buttons="accept,cancel" ondialogaccept="return com.synckolab.settings.savePrefs();" persist="screenX screenY" width="0" title="SyncKolab 2.0.2">
<script type="application/x-javascript" src="chrome://synckolab/content/calendarTools.js" />
<script type="application/x-javascript" src="chrome://synckolab/content/addressbookTools.js"/>
@@ -84,7 +84,7 @@
<checkbox id="syncOnStart" label="&synckolab.settings.SyncOnStart;" tooltiptext="&synckolab.settings.SyncOnStart;" />
<checkbox id="hideFolder" style="width: 300px" label="&synckolab.settings.hideFolder;"/>
- <checkbox id="hiddenWnd" label="&synckolab.settings.HiddenWindow;" />
+ <checkbox id="closeWindow" style="width: 300px" label="&synckolab.settings.CloseWindow;" />
<button label="&synckolab.settings.saveAll;" oncommand="com.synckolab.settings.saveAllConfig();" />
</vbox>
@@ -140,11 +140,11 @@
</menupopup>
</menulist>
</hbox>
- <hbox>
- <label value="&synckolab.settings.SyncInterval;" />
- <textbox id="contactSyncInterval" maxlength="5" style="width: 50px" />
- <label value="&synckolab.settings.SyncIntervalMinutes;" />
- </hbox>
+<!-- <hbox> -->
+<!-- <label value="&synckolab.settings.SyncInterval;" /> -->
+<!-- <textbox id="contactSyncInterval" maxlength="5" style="width: 50px" /> -->
+<!-- <label value="&synckolab.settings.SyncIntervalMinutes;" /> -->
+<!-- </hbox> -->
<button label="&synckolab.settings.saveSingle;" oncommand="com.synckolab.settings.saveSingleConfig();" />
</vbox>
@@ -195,11 +195,11 @@
</menupopup>
</menulist>
</hbox>
- <hbox>
- <label value="&synckolab.settings.SyncInterval;" />
- <textbox id="calendarSyncInterval" maxlength="5" style="width: 50px" />
- <label value="&synckolab.settings.SyncIntervalMinutes;" />
- </hbox>
+<!-- <hbox> -->
+<!-- <label value="&synckolab.settings.SyncInterval;" /> -->
+<!-- <textbox id="calendarSyncInterval" maxlength="5" style="width: 50px" /> -->
+<!-- <label value="&synckolab.settings.SyncIntervalMinutes;" /> -->
+<!-- </hbox> -->
</vbox>
</tabpanel>
@@ -248,11 +248,11 @@
</menupopup>
</menulist>
</hbox>
- <hbox>
- <label value="&synckolab.settings.SyncInterval;" />
- <textbox id="taskSyncInterval" maxlength="5" style="width: 50px" />
- <label value="&synckolab.settings.SyncIntervalMinutes;" />
- </hbox>
+<!-- <hbox> -->
+<!-- <label value="&synckolab.settings.SyncInterval;" /> -->
+<!-- <textbox id="taskSyncInterval" maxlength="5" style="width: 50px" /> -->
+<!-- <label value="&synckolab.settings.SyncIntervalMinutes;" /> -->
+<!-- </hbox> -->
</vbox>
</tabpanel>