[Pkg-mozext-commits] [gcontactsync] 10/17: Issue #51: Create a hidden preference to not refresh the AbView after drag and drop
David Prévot
taffit at moszumanska.debian.org
Sat Nov 1 23:37:02 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository gcontactsync.
commit 93ba463e34c13fd6ce0094ab35be1654f44e79ee
Author: Josh Geenen <joshgeenen at gmail.com>
Date: Sun Oct 26 13:13:24 2014 -0500
Issue #51: Create a hidden preference to not refresh the AbView after drag and drop
---
src/content/Preferences.js | 3 ++-
src/content/onDrop.js | 15 ++++++++++-----
src/defaults/preferences/gContactSync.js | 3 +++
3 files changed, 15 insertions(+), 6 deletions(-)
diff --git a/src/content/Preferences.js b/src/content/Preferences.js
index 01e9705..86f60e8 100644
--- a/src/content/Preferences.js
+++ b/src/content/Preferences.js
@@ -211,7 +211,8 @@ com.gContactSync.Preferences = {
httpRequestTimeout: new com.gContactSync.Pref("httpRequestTimeout", "int", 0),
httpRequestDelay: new com.gContactSync.Pref("httpRequestDelay", "int", 120),
numRelations: new com.gContactSync.Pref("numRelations", "int", 6),
- numLogsInRotation: new com.gContactSync.Pref("numLogsInRotation", "int", 3)
+ numLogsInRotation: new com.gContactSync.Pref("numLogsInRotation", "int", 3),
+ selectFirstCardAfterDrop: new com.gContactSync.Pref("selectFirstCardAfterDrop", "bool", true)
},
/**
* Gets a preference given its branch, name, and type
diff --git a/src/content/onDrop.js b/src/content/onDrop.js
index 977912c..11ac266 100644
--- a/src/content/onDrop.js
+++ b/src/content/onDrop.js
@@ -229,11 +229,16 @@ com.gContactSync.myOnDrop = function gCS_myOnDrop(row, orientation) {
[numrows]);
}
}
- // update the address book view so it doesn't show the card twice
- SetAbView(GetSelectedDirectory(), false);
- // select the first card, if any
- if (gAbView && gAbView.getCardFromRow(0))
- SelectFirstCard();
+
+ if (com.gContactSync.Preferences.mSyncPrefs.selectFirstCardAfterDrop.value) {
+ // update the address book view so it doesn't show the card twice
+ SetAbView(GetSelectedDirectory(), false);
+ // select the first card, if any
+ if (gAbView && gAbView.getCardFromRow(0)) {
+ SelectFirstCard();
+ }
+ }
+
// set the status text
document.getElementById("statusText").label = cardsTransferredText;
}
diff --git a/src/defaults/preferences/gContactSync.js b/src/defaults/preferences/gContactSync.js
index 162f50e..9cf6216 100644
--- a/src/defaults/preferences/gContactSync.js
+++ b/src/defaults/preferences/gContactSync.js
@@ -94,6 +94,9 @@ pref("extensions.gContactSync.httpRequestDelay", 120);
pref("extensions.gContactSync.numRelations", 6);
// Number of log files to store. Must be >= 1.
pref("extensions.gContactSync.numLogsInRotation", 3);
+// Select the first card after a drag and drop event.
+// This works around a Thunderbird bug.
+pref("extensions.gContactSync.selectFirstCardAfterDrop", true);
// extended properties to sync
pref("extensions.gContactSync.extended1", "Custom1");
pref("extensions.gContactSync.extended2", "Custom2");
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/gcontactsync.git
More information about the Pkg-mozext-commits
mailing list