diff --git a/res/values/strings.xml b/res/values/strings.xml
index 36a224a5a..ebc0a1d02 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -1041,6 +1041,7 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
Importing settings...
Scanning file...
Saved exported settings to %s
+ Imported global settings from %s
Imported %s from %s
- 1 account
diff --git a/src/com/fsck/k9/activity/Accounts.java b/src/com/fsck/k9/activity/Accounts.java
index f3262ad3c..50cf27e8a 100644
--- a/src/com/fsck/k9/activity/Accounts.java
+++ b/src/com/fsck/k9/activity/Accounts.java
@@ -1410,13 +1410,22 @@ public class Accounts extends K9ListActivity implements OnItemClickListener, OnC
removeProgressDialog();
String filename = mUri.getLastPathSegment();
- if (success) {
- int imported = mImportResults.importedAccounts.size();
+ boolean globalSettings = mImportResults.globalSettings;
+ int imported = mImportResults.importedAccounts.size();
+ if (success && (globalSettings || imported > 0)) {
//TODO: display names of imported accounts (name from file *and* possibly new name)
- activity.showSimpleDialog(R.string.settings_import_success_header,
- R.string.settings_import_success, imported, filename);
+ if (imported == 0) {
+ activity.showSimpleDialog(R.string.settings_import_success_header,
+ R.string.settings_import_global_settings_success, filename);
+ } else {
+ String importedAccounts = activity.getResources().getQuantityString(
+ R.plurals.settings_import_success, imported);
+ activity.showSimpleDialog(R.string.settings_import_success_header,
+ R.string.settings_import_success, importedAccounts, filename);
+ }
+
activity.refresh();
} else {
//TODO: better error messages