mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-24 16:48:50 -05:00
Patch ImapFolders.r389.patch submitted in Comment 3 of Issue 214 by
dumbfile on Feb 28, 2009. One change of my own, putting the actual folders name outside the parentheses, and the functional/special name inside the parentheses.
This commit is contained in:
parent
3e90811a20
commit
49c2708f4c
@ -94,6 +94,30 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="fill_parent" />
|
||||
</LinearLayout>
|
||||
<LinearLayout android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content" android:id="@+id/imap_folder_setup_section"
|
||||
android:orientation="vertical">
|
||||
<TextView android:layout_height="wrap_content"
|
||||
android:text="@string/account_setup_incoming_imap_folder_drafts"
|
||||
android:layout_width="fill_parent"></TextView>
|
||||
<EditText android:layout_height="wrap_content"
|
||||
android:id="@+id/account_imap_folder_drafts" android:layout_width="fill_parent"></EditText>
|
||||
<TextView android:layout_height="wrap_content"
|
||||
android:text="@string/account_setup_incoming_imap_folder_sent"
|
||||
android:layout_width="fill_parent"></TextView>
|
||||
<EditText android:layout_height="wrap_content"
|
||||
android:id="@+id/account_imap_folder_sent" android:layout_width="fill_parent"></EditText>
|
||||
<TextView android:layout_height="wrap_content"
|
||||
android:text="@string/account_setup_incoming_imap_folder_trash"
|
||||
android:layout_width="fill_parent"></TextView>
|
||||
<EditText android:layout_height="wrap_content"
|
||||
android:id="@+id/account_imap_folder_trash" android:layout_width="fill_parent"></EditText>
|
||||
<TextView android:layout_height="wrap_content"
|
||||
android:text="@string/account_setup_incoming_imap_folder_outbox"
|
||||
android:layout_width="fill_parent"></TextView>
|
||||
<EditText android:layout_height="wrap_content"
|
||||
android:id="@+id/account_imap_folder_outbox" android:layout_width="fill_parent"></EditText>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:id="@+id/webdav_path_prefix_section"
|
||||
android:layout_width="fill_parent"
|
||||
|
@ -48,6 +48,10 @@
|
||||
<string name="account_setup_incoming_delete_policy_never_label">Nie</string>
|
||||
<string name="account_setup_incoming_imap_path_prefix_hint">Optional</string>
|
||||
<string name="account_setup_incoming_imap_path_prefix_label">Präfix für IMAP-Verzeichnis</string>
|
||||
<string name="account_setup_incoming_imap_folder_drafts">Ordner für Entwürfe</string>
|
||||
<string name="account_setup_incoming_imap_folder_sent">Ordner für Gesendete</string>
|
||||
<string name="account_setup_incoming_imap_folder_trash">Ordner für Papierkorb</string>
|
||||
<string name="account_setup_incoming_imap_folder_outbox">Ordner für Postausgang</string>
|
||||
<string name="account_setup_incoming_imap_server_label">IMAP-Server</string>
|
||||
<string name="account_setup_incoming_password_label">Kennwort</string>
|
||||
<string name="account_setup_incoming_pop_server_label">POP3-Server</string>
|
||||
@ -185,6 +189,12 @@
|
||||
<string name="special_mailbox_name_outbox">Postausgang</string>
|
||||
<string name="special_mailbox_name_sent">Gesendet</string>
|
||||
<string name="special_mailbox_name_trash">Papierkorb</string>
|
||||
|
||||
<string name="special_mailbox_name_drafts_fmt"><xliff:g id="folder">%s</xliff:g> (Entwürfe)</string>
|
||||
<string name="special_mailbox_name_outbox_fmt"><xliff:g id="folder">%s</xliff:g> (Postausgang)</string>
|
||||
<string name="special_mailbox_name_sent_fmt"><xliff:g id="folder">%s</xliff:g> (Gesendet)</string>
|
||||
<string name="special_mailbox_name_trash_fmt"><xliff:g id="folder">%s</xliff:g> (Papierkorb)</string>
|
||||
|
||||
<string name="status_error">Fehler</string>
|
||||
<string name="status_loading">Laden\u2026</string>
|
||||
<string name="status_loading_more">Laden von Nachrichten\u2026</string>
|
||||
|
@ -116,6 +116,12 @@
|
||||
<string name="special_mailbox_name_drafts">Drafts</string>
|
||||
<string name="special_mailbox_name_trash">Trash</string>
|
||||
<string name="special_mailbox_name_sent">Sent</string>
|
||||
<!-- Mailbox names displayed to user -->
|
||||
|
||||
<string name="special_mailbox_name_outbox_fmt"><xliff:g id="folder">%s</xliff:g> (Outbox)</string>
|
||||
<string name="special_mailbox_name_drafts_fmt"><xliff:g id="folder">%s</xliff:g> (Drafts)</string>
|
||||
<string name="special_mailbox_name_trash_fmt"><xliff:g id="folder">%s</xliff:g> (Trash)</string>
|
||||
<string name="special_mailbox_name_sent_fmt"><xliff:g id="folder">%s</xliff:g> (Sent)</string>
|
||||
|
||||
<string name="end_of_folder">No more messages</string>
|
||||
|
||||
@ -245,6 +251,12 @@ Welcome to K-9 Mail setup. K-9 is an open source email client for Android based
|
||||
|
||||
<string name="account_setup_incoming_imap_path_prefix_label">IMAP path prefix</string>
|
||||
<string name="account_setup_incoming_imap_path_prefix_hint">Optional</string>
|
||||
|
||||
<string name="account_setup_incoming_imap_folder_drafts">Drafts folder name</string>
|
||||
<string name="account_setup_incoming_imap_folder_sent">Sent folder name</string>
|
||||
<string name="account_setup_incoming_imap_folder_trash">Trash folder name</string>
|
||||
<string name="account_setup_incoming_imap_folder_outbox">Outbox folder name</string>
|
||||
|
||||
<string name="account_setup_incoming_webdav_path_prefix_label">WebDav(Exchange) path</string>
|
||||
<string name="account_setup_incoming_webdav_path_prefix_hint">Optional</string>
|
||||
|
||||
|
@ -1477,8 +1477,29 @@ public class FolderMessageList extends ExpandableListActivity
|
||||
}
|
||||
if (holder.name.equals(mAccount.getOutboxFolderName()))
|
||||
{
|
||||
holder.displayName = String.format(
|
||||
getString(R.string.special_mailbox_name_outbox_fmt),
|
||||
holder.name);
|
||||
holder.outbox = true;
|
||||
}
|
||||
if (holder.name.equals(mAccount.getDraftsFolderName()))
|
||||
{
|
||||
holder.displayName = String.format(
|
||||
getString(R.string.special_mailbox_name_drafts_fmt),
|
||||
holder.name);
|
||||
}
|
||||
if (holder.name.equals(mAccount.getTrashFolderName()))
|
||||
{
|
||||
holder.displayName = String.format(
|
||||
getString(R.string.special_mailbox_name_trash_fmt),
|
||||
holder.name);
|
||||
}
|
||||
if (holder.name.equals(mAccount.getSentFolderName()))
|
||||
{
|
||||
holder.displayName = String.format(
|
||||
getString(R.string.special_mailbox_name_sent_fmt),
|
||||
holder.name);
|
||||
}
|
||||
if (holder.messages == null)
|
||||
{
|
||||
holder.messages = new ArrayList<MessageInfoHolder>();
|
||||
|
@ -60,6 +60,10 @@ public class AccountSetupIncoming extends Activity implements OnClickListener {
|
||||
private Spinner mSecurityTypeView;
|
||||
private Spinner mDeletePolicyView;
|
||||
private EditText mImapPathPrefixView;
|
||||
private EditText mImapFolderDrafts;
|
||||
private EditText mImapFolderSent;
|
||||
private EditText mImapFolderTrash;
|
||||
private EditText mImapFolderOutbox;
|
||||
private EditText mWebdavPathPrefixView;
|
||||
private EditText mWebdavAuthPathView;
|
||||
private EditText mWebdavMailboxPathView;
|
||||
@ -94,6 +98,10 @@ public class AccountSetupIncoming extends Activity implements OnClickListener {
|
||||
mSecurityTypeView = (Spinner)findViewById(R.id.account_security_type);
|
||||
mDeletePolicyView = (Spinner)findViewById(R.id.account_delete_policy);
|
||||
mImapPathPrefixView = (EditText)findViewById(R.id.imap_path_prefix);
|
||||
mImapFolderDrafts = (EditText)findViewById(R.id.account_imap_folder_drafts);
|
||||
mImapFolderSent = (EditText)findViewById(R.id.account_imap_folder_sent);
|
||||
mImapFolderTrash = (EditText)findViewById(R.id.account_imap_folder_trash);
|
||||
mImapFolderOutbox = (EditText)findViewById(R.id.account_imap_folder_outbox);
|
||||
mWebdavPathPrefixView = (EditText)findViewById(R.id.webdav_path_prefix);
|
||||
mWebdavAuthPathView = (EditText)findViewById(R.id.webdav_auth_path);
|
||||
mWebdavMailboxPathView = (EditText)findViewById(R.id.webdav_mailbox_path);
|
||||
@ -209,6 +217,7 @@ public class AccountSetupIncoming extends Activity implements OnClickListener {
|
||||
mAccountSchemes = popSchemes;
|
||||
|
||||
findViewById(R.id.imap_path_prefix_section).setVisibility(View.GONE);
|
||||
findViewById(R.id.imap_folder_setup_section).setVisibility(View.GONE);
|
||||
findViewById(R.id.webdav_path_prefix_section).setVisibility(View.GONE);
|
||||
findViewById(R.id.webdav_path_debug_section).setVisibility(View.GONE);
|
||||
} else if (uri.getScheme().startsWith("imap")) {
|
||||
@ -221,6 +230,11 @@ public class AccountSetupIncoming extends Activity implements OnClickListener {
|
||||
}
|
||||
findViewById(R.id.webdav_path_prefix_section).setVisibility(View.GONE);
|
||||
findViewById(R.id.webdav_path_debug_section).setVisibility(View.GONE);
|
||||
|
||||
mImapFolderDrafts.setText(mAccount.getDraftsFolderName());
|
||||
mImapFolderSent.setText(mAccount.getSentFolderName());
|
||||
mImapFolderTrash.setText(mAccount.getTrashFolderName());
|
||||
mImapFolderOutbox.setText(mAccount.getOutboxFolderName());
|
||||
} else if (uri.getScheme().startsWith("webdav")) {
|
||||
serverLabelView.setText(R.string.account_setup_incoming_webdav_server_label);
|
||||
mAccountPorts = webdavPorts;
|
||||
@ -228,6 +242,7 @@ public class AccountSetupIncoming extends Activity implements OnClickListener {
|
||||
|
||||
/** Hide the unnecessary fields */
|
||||
findViewById(R.id.imap_path_prefix_section).setVisibility(View.GONE);
|
||||
findViewById(R.id.imap_folder_setup_section).setVisibility(View.GONE);
|
||||
if (uri.getPath() != null && uri.getPath().length() > 0) {
|
||||
String[] pathParts = uri.getPath().split("\\|");
|
||||
|
||||
@ -368,6 +383,10 @@ public class AccountSetupIncoming extends Activity implements OnClickListener {
|
||||
|
||||
int deleteSpinnerVal = (Integer)((SpinnerOption)mDeletePolicyView.getSelectedItem()).value;
|
||||
|
||||
mAccount.setDraftsFolderName(mImapFolderDrafts.getText().toString());
|
||||
mAccount.setSentFolderName(mImapFolderSent.getText().toString());
|
||||
mAccount.setTrashFolderName(mImapFolderTrash.getText().toString());
|
||||
mAccount.setOutboxFolderName(mImapFolderOutbox.getText().toString());
|
||||
mAccount.setDeletePolicy(deleteSpinnerVal);
|
||||
AccountSetupCheckSettings.actionCheckSettings(this, mAccount, true, false);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user