Commit Graph

235 Commits

Author SHA1 Message Date
Andrew Chen 3e03120a73 Merge branch 'master' of https://github.com/mnb20/k-9 into pull111
* 'master' of https://github.com/mnb20/k-9:
  High DPI version of archive button icon
  Fixed whitespace
  Remove TODO
  Replaced archive icon. Still a bit crap, but better than my previous attempt.
  Added batch buttons for Archive and Move. Made batch buttons configurable.
2012-04-06 13:47:55 -07:00
cketti d584492a6d Changed internal representation of the selected theme in the database 2012-03-29 06:33:01 +02:00
cketti 1d28eb003d Added a setting to disable marking messages as read on viewing 2012-03-19 04:44:41 +01:00
cketti ee34344d30 Upgrade to SDK 15 2012-03-07 21:52:47 +01:00
Srinath Warrier ff6e1f6c85 Create default sort setting by preference 2012-03-04 16:20:37 +05:30
cketti 9f42ff61d3 Removed settings for scrolling buttons 2012-02-21 15:16:36 +01:00
cketti be2aac52a8 Reload accounts after writing imported account settings to storage
This makes sure that when the next account is imported it will see the
account just imported. That's necessary e.g. when going though all
accounts to find the next free account number, or when avoiding account
name conflicts.
2012-01-21 03:10:40 +01:00
cketti 8e627834c1 Changed font size unit from DIP to SP
"Scale-independent Pixels - this is like the dp unit, but it is also
scaled by the user's font size preference. It is recommend you use this
unit when specifying font sizes, so they will be adjusted for both the
screen density and the user's preference." - Android Developer Docs
2012-01-12 02:18:41 +01:00
cketti edf0361aab Added font size setting for text input fields in MessageCompose 2012-01-12 01:05:01 +01:00
cketti a191415860 Avoid using TreeMap methods introduced with API 9 2012-01-08 04:04:25 +01:00
cketti 7e8aede93d Updated settings description with new default values (import/export) 2012-01-06 01:36:32 +01:00
Mark Baker af1b9f83f2 Added batch buttons for Archive and Move. Made batch buttons configurable. 2011-12-24 18:17:12 +00:00
cketti 61ca1a2ae2 Use internal representation for settings during the upgrade process
This avoids constant conversion between the string representation used
in preference storage and the internal representation.
2011-12-11 06:02:31 +01:00
cketti 345f4c2939 Code cleanup; no functional changes 2011-12-11 05:16:22 +01:00
cketti 18a58e2872 Added code to upgrade settings on import
This allows us to import files with an outdated content version, then
upgrade the settings to the current content version.
2011-12-11 05:16:22 +01:00
cketti d57e684296 Extended *Settings classes to handle multiple versions 2011-12-11 05:16:22 +01:00
Andrew Gaul 368bac851b Prefer Boolean constants over Boolean.valueOf 2011-11-27 15:10:58 -08:00
ashley willis 18ad12eda7 incremented Settings.VERSION 2011-11-19 18:15:20 -06:00
ashley willis c49d1ecc8e removed code from previous commit disabling of syncing drafts to be encrypted. 2011-11-19 13:34:26 -06:00
ashley willis 51c662f0d0 pgp issues 2152, 2900, and 3673. also option to disable not-yet-encrypted drafts related to issue 1424. 2011-11-19 00:49:04 -06:00
ashley willis 6a02552b23 incremented preferences/Settings.VERSION for new settings 2011-11-15 13:01:30 -06:00
ashley willis 3ffb5021e1 Option to have confirmation on deleting starred messages. 2011-11-15 00:28:41 -06:00
ashley willis 37f480c969 Merge ashleywillis' changes in https://github.com/k9mail/k-9/pull/97.
Option to strip signature from quoted text in replies.
Strips signature from quoted text in replies (line of /^-- $/ or html
equivalent, and everything below). Per account.
2011-11-14 14:00:15 -08:00
cketti d6c03de6f5 Fixed logic bug that prevented imported accounts from being recognized
We have to add new account UUIDs to "accountUuids" for them to show up
in the account list.
2011-11-07 01:45:52 +01:00
cketti 88a2dd6289 Merge branch 'issue549'
Conflicts:
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/mail/store/WebDavStore.java
2011-11-05 18:47:55 +01:00
Andrew Gaul 39aa577651 Introduce and use Utility.closeQuietly(Cursor)
This helper is in the same spirit as IOUtils.closeQuietly.
2011-11-04 09:58:55 -07:00
cketti ae465789b7 Export default value for keys not found in preference storage 2011-10-26 05:13:22 +02:00
cketti 9fa802afe2 Validate file format version and content version of settings file 2011-10-18 01:30:41 +02:00
cketti e7ad0e296e Validate account UUID on import 2011-10-17 23:33:32 +02:00
cketti 75dc38a1c4 Added new settings to GlobalSettings 2011-10-17 04:52:33 +02:00
cketti f08b1ef739 Added new settings to AccountSettings 2011-10-17 04:34:26 +02:00
cketti 52a92d93a1 Add dialog to ask for server passwords after import 2011-10-17 04:34:26 +02:00
cketti 849a4e37a0 Mark accounts as disabled on import
If the settings file doesn't contain passwords for the incoming and
outgoing servers we disable those accounts.
2011-10-16 19:24:31 +02:00
cketti fc8d2e9979 Merge branch 'master' into issue549
Conflicts:
	res/menu/accounts_context.xml
	res/menu/accounts_option.xml
	res/values/strings.xml
	src/com/fsck/k9/Account.java
	src/com/fsck/k9/activity/Accounts.java
	src/com/fsck/k9/activity/AsyncUIProcessor.java
	src/com/fsck/k9/activity/FolderList.java
	src/com/fsck/k9/activity/ImportListener.java
	src/com/fsck/k9/activity/K9Activity.java
	src/com/fsck/k9/activity/K9ListActivity.java
	src/com/fsck/k9/activity/MessageView.java
	src/com/fsck/k9/mail/store/ImapStore.java
	src/com/fsck/k9/mail/store/Pop3Store.java
	src/com/fsck/k9/mail/store/WebDavStore.java
	src/com/fsck/k9/mail/transport/SmtpTransport.java
2011-10-14 20:33:25 +02:00
cketti f5e684310e Renamed StorageImportExportException to SettingsImportExportException 2011-10-14 06:00:10 +02:00
cketti c835bb757a Renamed StorageImporter to SettingsImporter 2011-10-14 05:58:55 +02:00
cketti cf8bdef0a8 Renamed StorageExporter to SettingsExporter 2011-10-14 05:58:15 +02:00
cketti 0ae176bab3 Code/documentation cleanup. No functional changes. 2011-10-14 05:54:23 +02:00
cketti 470ba8bb03 Removed everything related to settings file encryption
The plan is to (re)add this feature later. With a proven method to
encrypt files; maybe OpenPGP.
2011-10-14 05:38:27 +02:00
cketti 7a9c747db9 Don't export incoming/outgoing server passwords 2011-10-11 03:12:18 +02:00
cketti 1de28150e2 Require accounts to at least have one identity when importing 2011-10-09 01:23:45 +02:00
cketti 13b74d0d9e Added error logging 2011-10-09 01:14:59 +02:00
cketti d791770154 Code cleanup 2011-10-09 00:31:33 +02:00
cketti 6714a7ec5a Improved logging in StorageImporter 2011-10-09 00:04:00 +02:00
cketti 1ab7dbae54 Added input validation for folder settings 2011-10-08 21:30:45 +02:00
cketti f21e14afc7 Added input validation for identity settings 2011-10-08 17:58:57 +02:00
cketti 060d21db3e Make collections immutable 2011-10-07 21:20:12 +02:00
cketti 0920b0c14d Changed the way SettingsDescription is used
Added ability to rewrite the string representation used internally to
something "pretty" on export.
Now only settings that have entries is GlobalSettings and
AccountSettings are exported. This prevents export of newer settings
that are left in the preference storage when downgrading.
2011-10-07 20:29:03 +02:00
cketti 83ee4253d5 Whitelist settings for export instead of blacklisting keys
Use GlobalSettings.SETTINGS an AccountSettings.SETTINGS to decide
which settings to export.
2011-10-04 05:13:17 +02:00
cketti 644571cfe5 Make sure the InputStream of the import file is always closed 2011-10-04 00:48:43 +02:00
cketti f2a3752930 Added constants for (export) file format version and "settings version" 2011-10-04 00:09:38 +02:00
cketti 33ae5ff7d0 Added code to skip some account settings on export 2011-10-03 20:16:02 +02:00
cketti 6e1bf2965d Fixed DateFormatValidator to handle placeholders SHORT and MEDIUM 2011-09-30 16:54:01 +02:00
cketti cd72e197ec Added code to skip certain settings on export 2011-09-30 16:47:59 +02:00
cketti c76bec971b Fixed compiler warning
Use new variable instead of overwriting an argument.
2011-09-30 14:58:13 +02:00
cketti ded489daab Add support for incoming-server and outgoing-server elements on import 2011-06-09 05:50:43 +02:00
cketti 8d97287ffd Write outgoing-server element instead of transportUri to export file 2011-06-07 23:09:40 +02:00
cketti bccf0b5546 Renamed class StoreSettings to ServerSettings 2011-06-07 16:09:15 +02:00
cketti f4bcb4d923 Extracted inner class Store.StoreSettings 2011-06-07 15:59:23 +02:00
cketti 6abb5b5850 Write incoming-server element instead of storeUri key to export file 2011-06-07 04:25:17 +02:00
cketti 9a3ce9e03e Added file format version attribute to export file 2011-06-06 19:54:54 +02:00
cketti a57e605496 Added first version of input validation for account settings 2011-06-06 19:44:01 +02:00
Jesse Vincent 3d583da450 ant astyle 2011-06-01 16:03:56 -04:00
cketti 42987cee51 Use current values for missing or malformed global settings in the import file 2011-05-02 04:06:22 +02:00
cketti 7e24377bb8 Return detailed information on imported accounts 2011-04-29 04:29:16 +02:00
cketti 71f423d029 Added first version of import file validation 2011-04-20 21:37:48 +02:00
Bernhard Redl 120a39d5d6 * Fix Bug https://code.google.com/p/k9mail/issues/detail?id=3224
12/24 timesetting is no based on the android system settings
2011-04-20 10:12:59 +08:00
cketti 237302cc2b Changed import code to set "defaultAccountUuid" if necessary 2011-04-19 23:04:43 +02:00
mwolschon 7f5c18bd2b updated comments 2011-04-14 10:07:33 +02:00
mwolschon 9bdfb0d023 BUGFIX: time changes are still honored even if the user choose the
[abort] button of the DialogPreference.
2011-04-13 12:18:07 +02:00
cketti 8240d7ff10 Always reload all accounts after importing one or more accounts 2011-04-13 03:44:43 +02:00
cketti 12d87854ac First version of the import code that reads the new file format 2011-04-13 03:37:44 +02:00
cketti d5197fdc56 Put all import code in StorageImporter
Get rid of StorageImporterEncryptedXml and IStorageImporter. Also
AsyncUIProcessor is now obsolete.
2011-03-30 21:00:34 +02:00
cketti 45afa3a747 Make XML element/attribute names for export public 2011-03-30 20:56:26 +02:00
cketti 49e30b1be4 Export settings sorted by key 2011-03-30 06:44:16 +02:00
cketti 70f9a7b852 Granted some account/identity keys their own XML element (export) 2011-03-30 06:37:10 +02:00
cketti 8850915987 Add method to export an encrypted settings file 2011-03-30 05:31:48 +02:00
cketti 6258118ed6 Write identity elements in correct order (export) 2011-03-30 05:08:49 +02:00
cketti 29c42eb1a3 More structure for the XML export (folder settings) 2011-03-30 04:57:05 +02:00
cketti 83b2972a13 Rename "settings" tag to "global" for global settings (export) 2011-03-30 04:23:54 +02:00
cketti 24785bab66 More structure for the XML export (identity) 2011-03-30 03:55:14 +02:00
cketti 77f7303aa2 Use constants for element names and attributes in XML export code 2011-03-30 00:21:15 +02:00
cketti fbe1b26f24 Reflect some of the settings structure in exported XML 2011-03-29 07:08:29 +02:00
cketti 0ac406d3cd Removed per key/value encryption on export 2011-03-29 06:15:58 +02:00
cketti c36182f586 Use XmlSerializer instead of writing XML tags manually 2011-03-29 05:27:18 +02:00
cketti 9a78145e22 Merge StorageExporterEncryptedXml into StorageExporter 2011-03-29 04:27:41 +02:00
cketti 6510919eee Moved export to file code from Accounts activity into StorageExporter 2011-03-28 08:04:43 +02:00
cketti f5c153b405 Get rid of StorageFormat 2011-03-28 07:25:07 +02:00
cketti 97f493c881 Get rid of ExportListener 2011-03-28 07:18:47 +02:00
cketti 1d146278b0 Moved password input dialog for export to Accounts activity. 2011-03-28 01:55:46 +02:00
danapple ad4c7f7071 UUIDs could have been generated by different generators within the
same instance due to local upgrades of K-9 Mail.
2011-03-27 15:27:14 -05:00
danapple 90e88c251e Explanation of the reasons for mapping imported UUIDs into new local
UUIDs.
2011-03-27 13:14:36 -05:00
danapple e5ef068c15 Move the generation of the XML envelope to a common place since it
would be used in all storageFormats.  StorageImporter uses the header
to figure out which specific import implementation to use.
2011-03-27 11:37:43 -05:00
Jesse Vincent b3b8302c52 Remove some vestiges of HashSet 2011-03-27 12:40:00 +08:00
Jesse Vincent 9deeaf9c11 No longer export global settings when exporting one account 2011-03-27 12:03:23 +08:00
Jesse Vincent 52825f409f As suggested by cketti, HashSet -> Set in our method signature
definition
2011-03-27 11:37:37 +08:00
cketti 087feb478b First step at replacing the term "version" with "storageFormat" 2011-03-26 07:19:20 +01:00
cketti 4bdc20c127 Rename StorageVersioning to StorageFormat 2011-03-26 07:00:53 +01:00
cketti 18cefedf32 Get rid of the STORAGE_VERSION enum in StorageVersioning 2011-03-26 06:59:45 +01:00
cketti 26258d7666 Removed unused imports 2011-03-26 06:43:39 +01:00
Jesse Vincent fd38dc3519 Further wordings cleanups 2011-03-25 17:15:46 +11:00
Jesse Vincent b4a43893a3 Lift the choice of which accounts to export all the way up to
Accounts.java in advance of adding a dialog
2011-03-25 16:28:14 +11:00
danapple 8e5c50a8ef astyle 2011-03-20 15:21:24 -05:00
danapple 2e7a785209 Clarify logic for when an importer needs a password prompt. 2011-03-20 12:01:29 -05:00
danapple 89bdbdce94 Build a structure to allow for more easily creating new versions of
preferences Storage importers/exporters.  Password/encryption key
prompting is now down in centralized place.  On import, the password
prompt is given if the file to be imported uses an importer
implementation that requires a password and no password is provided.
On export, the password prompt is given if the chosen version is for
an exporter that requires a password and no password was provided.

For instance, for automatic backups, a password could be stored in
preferences and provided to the exporter, so no password prompt would
be given.
2011-03-20 11:52:13 -05:00
danapple 4f59a04fd5 Make importer usable by other things handling InputStreams, like a
facility to use the Android-wide Backup Service.
2011-03-03 10:14:19 -06:00
danapple 9224876768 Make exporter usable by other things handling OutputStreams, like a
facility to use the Android-wide Backup Service.
2011-03-03 10:00:58 -06:00
danapple 32b5afc702 astyle 2011-03-02 07:34:54 -06:00
danapple d9cb84047b Delete obsolete import 2011-03-01 21:43:43 -06:00
danapple 8a3e1336e0 Although I believe SimplyCrypto was made available without
restriction, with no license, K9Krypto is a completely new, completely
taint-free implementation of encryption for K-9 Mail settings files.

Also, K9Krypto reuses the cryptography infrastructure
between strings, so should be more efficient.
2011-02-28 21:27:58 -06:00
cketti 203dab5c64 Revert changes for issue 549 (import/export settings).
The feature will be polished in branch "issue549".
2011-02-28 22:55:34 +01:00
danapple 7b82061535 Add provenance explanation. 2011-02-27 22:22:09 -06:00
danapple a756f70eb6 Turn off some logging 2011-02-27 13:36:36 -06:00
danapple f0a8d2edee Update date formatter on when importing preferences. 2011-02-26 19:28:47 -06:00
danapple ad3dd07a7a astyle-d 2011-02-26 18:39:06 -06:00
danapple 6dc94fb78e First mostly working copy of export/import. Committing while I sort
out how to use git.
2011-02-26 11:31:56 -06:00
cketti d2561f19af Removed unused imports
git-svn-id: https://k9mail.googlecode.com/svn/k9mail/trunk@3270 9a7fa126-a48b-11dd-a887-7ffe1a420f8d
2011-02-04 23:19:07 -05:00
Dan Applebaum 40bdf99925 Fixes Issue 2934 Fixes Issue 2935
Provides for storing Folder Settings in the central Preferences
Storage as a back-up to the settings stored on each folder.  In this
way, even if the LocalStore DB is recreated or otherwise lost, Folder
Settings can be recovered.

1) Does not change the methodology used to read settings while
running, nor the changes in r3107 & r3116 which tremendously improve
Accounts list loading time.

2) Loads Folder Settings from Preferences and stores on the folder
only when creating a new LocalFolder

3) Saves Folder Settings to Preferences and the DB row every time the
Folder Settings are changed.

4) When upgrading from DB version 41 to 42 or later, copies all
settings for existing folders from the DB storage to the Preferences
Storage.

5) Transactional bulk folder creation and single pass local folder
existence check during "Refresh folders" operation drastically reduces
time spent when refreshing folders from the remote store.

6) Uses prepared statement during Editor commit to reduce Preference
storing time.

Probably needs a reversion of r3239, but I'm unfamiliar with
translations, so am leaving that to others' discretion.
2011-02-04 23:19:06 -05:00
cketti 22834d6998 Removed unnecessary null pointer checks 2011-01-19 01:30:13 +00:00
Jesse Vincent 9878b74379 astyle 2010-12-24 18:55:05 +00:00
Jesse Vincent 0b3dc2840b Bump us up to android-9 so we can have strict mode for development 2010-12-24 18:54:56 +00:00
Jesse Vincent f5eb6e03af astyle 2010-12-01 06:32:29 +00:00
Jesse Vincent c79ea226a5 Remove "throws" declarations that didn't actually get thrown. Remove a
couple of try blocks that only caught throws we didn't throw. IntelliJ
optimization.
2010-12-01 03:02:13 +00:00
Jesse Vincent 4f376e8332 astyle 2010-11-28 20:28:37 +00:00
Jesse Vincent a75098013a add a new quiet time preference 2010-11-28 20:28:32 +00:00
Jesse Vincent d3c86a39dd initial import of a timepicker preference widget 2010-11-28 20:28:19 +00:00
Jesse Vincent 6061c42ea9 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs 2010-10-05 06:04:28 +00:00
Fiouz 9347409e14 Changed case of CheckboxListPreference class to match the Android framework naming pattern 2010-10-03 09:26:30 +00:00
Fiouz 9b285ae3fc Fixes issue 939
Heavily inspired from Gmail implementation. Currently implemented only for MessageView delete operation.
2010-09-01 20:59:09 +00:00
Jesse Vincent 4f0bce1569 Simplify many, many boolean conditions with help from IntelliJ 2010-08-29 23:39:26 +00:00
Jesse Vincent 7464a1527a Convert for loops to "enhanced" syntax per SDK performance guidelines
(Automatic with Eclipse)
2010-07-19 01:52:18 +00:00
cketti 58b8479612 Code refactoring:
- Created "controller" and "mail.filter" package
- Moved a lot of classes to new/other packages
- Removed unused classes: NoSuchProviderException, MessageDateComparator
2010-05-19 18:17:06 +00:00
Jesse Vincent 8af7f4a7b6 find src/com/fsck/ -name \*.java|xargs astyle --style=ansi --mode=java --indent-switches --indent=spaces=4 --convert-tabs --unpad=paren 2010-04-29 04:59:14 +00:00
Jesse Vincent a58095aae1 URLEncode username and password for accounts, so as to not fall apart on
nice simple characters like ':' in passwords.

Patch by cketti

Fixes Issue 1155.
2010-02-02 02:06:29 +00:00
Jesse Vincent f31b2702a4 Massive rename to K9, step 1.
Conflicts:

	src/com/android/email/Email.java
2009-12-15 02:50:53 +00:00