1
0
mirror of https://github.com/moparisthebest/k-9 synced 2025-01-30 14:50:14 -05:00

merged archive-move-spam-buttons into trunk

This commit is contained in:
Thialfihar 2010-07-05 13:41:52 +00:00
parent 5478ded371
commit 8752347b5f
13 changed files with 995 additions and 418 deletions

View File

@ -22,60 +22,116 @@
<include layout="@layout/message_view_header" /> <include layout="@layout/message_view_header" />
<View <View
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="0dip" android:layout_height="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<LinearLayout <LinearLayout
android:id="@+id/scrolling_buttons" android:id="@+id/scrolling_move_buttons"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="57dip" android:layout_height="wrap_content"
android:background="@drawable/ic_email_thread_open_bottom_default" android:gravity="center_vertical">
android:gravity="center_vertical"> <Button
<Button android:id="@+id/archive_scrolling"
android:id="@+id/previous_scrolling" android:text="@string/message_view_archive_action"
android:text="@string/message_view_prev_action" android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move_scrolling"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam_scrolling"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/scrolling_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="57dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/previous_scrolling"
android:text="@string/message_view_prev_action"
android:textSize="35dip" android:textSize="35dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:padding="0dip" android:padding="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <Button
android:id="@+id/reply_scrolling" android:id="@+id/reply_scrolling"
android:text="@string/reply_action" android:text="@string/reply_action"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <Button
android:id="@+id/delete_scrolling" android:id="@+id/delete_scrolling"
android:text="@string/delete_action" android:text="@string/delete_action"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <Button
android:id="@+id/forward_scrolling" android:id="@+id/forward_scrolling"
android:text="@string/forward_action" android:text="@string/forward_action"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <Button
android:id="@+id/next_scrolling" android:id="@+id/next_scrolling"
android:text="@string/message_view_next_action" android:text="@string/message_view_next_action"
android:textSize="35dip" android:textSize="35dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:padding="0dip" android:padding="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
<LinearLayout <LinearLayout
android:id="@+id/bottom_buttons" android:id="@+id/move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="6dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/archive"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_buttons"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="57dip" android:layout_height="57dip"
android:background="@drawable/ic_email_thread_open_bottom_default" android:background="@android:color/transparent"
android:gravity="center_vertical"> android:gravity="center_vertical">
<Button <Button
android:id="@+id/previous" android:id="@+id/previous"

View File

@ -22,68 +22,124 @@
android:layout_weight="1"> android:layout_weight="1">
<include layout="@layout/message_view_header" /> <include layout="@layout/message_view_header" />
<View <View
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="0dip" android:layout_height="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<LinearLayout <LinearLayout
android:id="@+id/extra_buttons" android:id="@+id/extra_buttons"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical"> android:gravity="center_vertical">
<Button <Button
android:id="@+id/reply" android:id="@+id/reply"
android:text="@string/reply_action" android:text="@string/reply_action"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <Button
android:id="@+id/reply_all" android:id="@+id/reply_all"
android:text="@string/reply_all_action" android:text="@string/reply_all_action"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <Button
android:id="@+id/forward" android:id="@+id/forward"
android:text="@string/forward_action" android:text="@string/forward_action"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
<LinearLayout <LinearLayout
android:id="@+id/scrolling_buttons" android:id="@+id/scrolling_move_buttons"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_vertical"> android:gravity="center_vertical">
<Button <Button
android:id="@+id/previous_scrolling" android:id="@+id/archive_scrolling"
android:text="@string/message_view_prev_action" android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move_scrolling"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam_scrolling"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/scrolling_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center_vertical">
<Button
android:id="@+id/previous_scrolling"
android:text="@string/message_view_prev_action"
android:textSize="35dip" android:textSize="35dip"
android:padding="0dip" android:padding="0dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<ImageButton <ImageButton
android:id="@+id/delete_scrolling" android:id="@+id/delete_scrolling"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:src="@drawable/ic_button_delete" android:src="@drawable/ic_button_delete"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<Button <Button
android:id="@+id/next_scrolling" android:id="@+id/next_scrolling"
android:padding="0dip" android:padding="0dip"
android:text="@string/message_view_next_action" android:text="@string/message_view_next_action"
android:textSize="35dip" android:textSize="35dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>
</ScrollView> </ScrollView>
<LinearLayout <LinearLayout
android:id="@+id/bottom_buttons" android:id="@+id/move_buttons"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:paddingRight="6dip"
android:background="@android:color/transparent"
android:gravity="center_vertical">
<Button
android:id="@+id/archive"
android:text="@string/message_view_archive_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/move"
android:text="@string/message_view_move_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
<Button
android:id="@+id/spam"
android:text="@string/message_view_spam_action"
android:layout_height="wrap_content"
android:layout_width="0dip"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/bottom_buttons"
android:orientation="horizontal" android:orientation="horizontal"
android:layout_width="fill_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -98,7 +154,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
<ImageButton <ImageButton
android:id="@+id/delete" android:id="@+id/delete"
android:layout_height="wrap_content" android:layout_height="wrap_content"
@ -113,6 +169,6 @@
android:padding="0dip" android:padding="0dip"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_width="0dip" android:layout_width="0dip"
android:layout_weight="1" /> android:layout_weight="1" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>

View File

@ -10,45 +10,53 @@
/> />
<item <item
android:id="@+id/deselect" android:id="@+id/deselect"
android:visible="false" android:visible="false"
android:title="@string/deselect_action" android:title="@string/deselect_action"
/> />
<item <item
android:id="@+id/delete" android:id="@+id/delete"
android:title="@string/delete_action" android:title="@string/delete_action"
/> />
<item <item
android:id="@+id/forward" android:id="@+id/forward"
android:title="@string/forward_action" android:title="@string/forward_action"
/> />
<item <item
android:id="@+id/reply_all" android:id="@+id/reply_all"
android:title="@string/reply_all_action" android:title="@string/reply_all_action"
/> />
<item <item
android:id="@+id/reply" android:id="@+id/reply"
android:title="@string/reply_action" android:title="@string/reply_action"
/> />
<item <item
android:id="@+id/mark_as_read" android:id="@+id/mark_as_read"
android:title="@string/mark_as_read_action" android:title="@string/mark_as_read_action"
/> />
<item <item
android:id="@+id/flag" android:id="@+id/flag"
android:title="@string/flag_action" android:title="@string/flag_action"
/> />
<item <item
android:id="@+id/move" android:id="@+id/archive"
android:title="@string/move_action" android:title="@string/archive_action"
/> />
<item <item
android:id="@+id/copy" android:id="@+id/spam"
android:title="@string/copy_action" android:title="@string/spam_action"
/>
<item
android:id="@+id/move"
android:title="@string/move_action"
/>
<item
android:id="@+id/copy"
android:title="@string/copy_action"
/>
<item
android:id="@+id/send_alternate"
android:title="@string/send_alternate_action"
/> />
<item
android:id="@+id/send_alternate"
android:title="@string/send_alternate_action"
/>
<item <item
android:id="@+id/same_sender" android:id="@+id/same_sender"
android:title="@string/from_same_sender" android:title="@string/from_same_sender"

View File

@ -1,127 +1,135 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"> <menu xmlns:android="http://schemas.android.com/apk/res/android">
<item <item
android:id="@+id/compose" android:id="@+id/compose"
android:alphabeticShortcut="c" android:alphabeticShortcut="c"
android:title="@string/compose_action" android:title="@string/compose_action"
android:icon="@drawable/ic_menu_compose" android:icon="@drawable/ic_menu_compose"
/> />
<item <item
android:id="@+id/set_sort" android:id="@+id/set_sort"
android:title="@string/sort_by" android:title="@string/sort_by"
android:icon="@drawable/ic_menu_set_sort"> android:icon="@drawable/ic_menu_set_sort">
<menu> <menu>
<item <item
android:id="@+id/set_sort_date" android:id="@+id/set_sort_date"
android:title="@string/sort_by_date" android:title="@string/sort_by_date"
/> />
<item <item
android:id="@+id/set_sort_subject" android:id="@+id/set_sort_subject"
android:title="@string/sort_by_subject" android:title="@string/sort_by_subject"
/> />
<item <item
android:id="@+id/set_sort_sender" android:id="@+id/set_sort_sender"
android:title="@string/sort_by_sender" android:title="@string/sort_by_sender"
/> />
<item <item
android:id="@+id/set_sort_flag" android:id="@+id/set_sort_flag"
android:title="@string/sort_by_flag" android:title="@string/sort_by_flag"
/> />
<item <item
android:id="@+id/set_sort_unread" android:id="@+id/set_sort_unread"
android:title="@string/sort_by_unread" android:title="@string/sort_by_unread"
/> />
<item <item
android:id="@+id/set_sort_attach" android:id="@+id/set_sort_attach"
android:title="@string/sort_by_attach" android:title="@string/sort_by_attach"
/> />
</menu> </menu>
</item> </item>
<item <item
android:id="@+id/select_all" android:id="@+id/select_all"
android:title="@string/batch_select_all" android:title="@string/batch_select_all"
android:icon="@drawable/ic_menu_select_all"/> android:icon="@drawable/ic_menu_select_all"/>
<item <item
android:id="@+id/batch_ops" android:id="@+id/batch_ops"
android:title="@string/batch_ops" android:title="@string/batch_ops"
android:icon="@drawable/ic_menu_batch"> android:icon="@drawable/ic_menu_batch">
<menu> <menu>
<item <item
android:id="@+id/batch_flag_mode" android:id="@+id/batch_flag_mode"
android:title="@string/batch_flag_mode" android:title="@string/batch_flag_mode"
android:visible="false" android:visible="false"
/> />
<item <item
android:id="@+id/batch_plain_mode" android:id="@+id/batch_plain_mode"
android:title="@string/batch_plain_mode" android:title="@string/batch_plain_mode"
android:visible="false" android:visible="false"
/> />
<item <item
android:id="@+id/batch_delete_op" android:id="@+id/batch_delete_op"
android:title="@string/batch_delete_op" android:title="@string/batch_delete_op"
/> />
<item <item
android:id="@+id/batch_mark_read_op" android:id="@+id/batch_mark_read_op"
android:title="@string/batch_mark_read_op" android:title="@string/batch_mark_read_op"
/> />
<item <item
android:id="@+id/batch_flag_op" android:id="@+id/batch_flag_op"
android:title="@string/batch_flag_op" android:title="@string/batch_flag_op"
/> />
<item <item
android:id="@+id/batch_mark_unread_op" android:id="@+id/batch_mark_unread_op"
android:title="@string/batch_mark_unread_op" android:title="@string/batch_mark_unread_op"
/> />
<item <item
android:id="@+id/batch_unflag_op" android:id="@+id/batch_unflag_op"
android:title="@string/batch_unflag_op" android:title="@string/batch_unflag_op"
/> />
<item <item
android:id="@+id/batch_move_op" android:id="@+id/batch_archive_op"
android:title="@string/batch_move_op" android:title="@string/batch_archive_op"
/> />
<item <item
android:id="@+id/batch_copy_op" android:id="@+id/batch_spam_op"
android:title="@string/batch_copy_op" android:title="@string/batch_spam_op"
/> />
<item <item
android:id="@+id/batch_select_all" android:id="@+id/batch_move_op"
android:title="@string/batch_select_all" android:title="@string/batch_move_op"
/> />
<item <item
android:id="@+id/batch_deselect_all" android:id="@+id/batch_copy_op"
android:title="@string/batch_deselect_all" android:title="@string/batch_copy_op"
/> />
</menu> <item
</item> android:id="@+id/batch_select_all"
android:title="@string/batch_select_all"
/>
<item
android:id="@+id/batch_deselect_all"
android:title="@string/batch_deselect_all"
/>
</menu>
</item>
<item <item
android:id="@+id/list_folders" android:id="@+id/list_folders"
android:alphabeticShortcut="f" android:alphabeticShortcut="f"
android:title="@string/list_folders_action" android:title="@string/list_folders_action"
android:icon="@drawable/ic_menu_navigate" android:icon="@drawable/ic_menu_navigate"
/> />
<item <item
android:id="@+id/send_messages" android:id="@+id/send_messages"
android:alphabeticShortcut="r" android:alphabeticShortcut="r"
android:title="@string/send_messages_action" android:title="@string/send_messages_action"
android:icon="@drawable/ic_menu_refresh" android:icon="@drawable/ic_menu_refresh"
/> />
<item <item
android:id="@+id/check_mail" android:id="@+id/check_mail"
android:alphabeticShortcut="r" android:alphabeticShortcut="r"
android:title="@string/check_mail_action" android:title="@string/check_mail_action"
android:icon="@drawable/ic_menu_refresh" android:icon="@drawable/ic_menu_refresh"
/> />
<item <item
android:id="@+id/accounts" android:id="@+id/accounts"
android:title="@string/accounts_action" android:title="@string/accounts_action"
android:icon="@drawable/ic_menu_account_list" android:icon="@drawable/ic_menu_account_list"
/> />
<item <item
android:id="@+id/mark_all_as_read" android:id="@+id/mark_all_as_read"
android:title="@string/mark_all_as_read_action" android:title="@string/mark_all_as_read_action"
android:icon="@drawable/ic_menu_inbox" android:icon="@drawable/ic_menu_inbox"
/> />
<item <item
android:id="@+id/settings" android:id="@+id/settings"
android:title="@string/preferences_action" android:title="@string/preferences_action"
@ -129,22 +137,22 @@
<menu> <menu>
<item <item
android:id="@+id/folder_settings" android:id="@+id/folder_settings"
android:title="@string/folder_settings_action" android:title="@string/folder_settings_action"
android:icon="@drawable/ic_menu_preferences" android:icon="@drawable/ic_menu_preferences"
/> />
<item <item
android:id="@+id/account_settings" android:id="@+id/account_settings"
android:title="@string/account_settings_action" android:title="@string/account_settings_action"
android:icon="@android:drawable/ic_menu_preferences" android:icon="@android:drawable/ic_menu_preferences"
/> />
<item android:id="@+id/app_settings" <item android:id="@+id/app_settings"
android:title="@string/preferences_action" android:title="@string/preferences_action"
android:icon="@android:drawable/ic_menu_preferences" android:icon="@android:drawable/ic_menu_preferences"
/> />
</menu> </menu>
</item> </item>
<item <item
android:id="@+id/expunge" android:id="@+id/expunge"
android:title="@string/expunge_action" android:title="@string/expunge_action"
/> />

View File

@ -31,9 +31,9 @@
android:icon="@drawable/ic_menu_delete" android:icon="@drawable/ic_menu_delete"
/> />
<item <item
android:id="@+id/show_full_header" android:id="@+id/show_full_header"
android:title="@string/show_full_header_action" android:title="@string/show_full_header_action"
/> />
<item <item
android:id="@+id/flag" android:id="@+id/flag"
android:alphabeticShortcut="s" android:alphabeticShortcut="s"
@ -46,11 +46,19 @@
android:icon="@drawable/ic_menu_forward_mail" android:icon="@drawable/ic_menu_forward_mail"
/> />
<item <item
android:id="@+id/move" android:id="@+id/archive"
android:title="@string/move_action" android:title="@string/archive_action"
/> />
<item <item
android:id="@+id/copy" android:id="@+id/spam"
android:title="@string/copy_action" android:title="@string/spam_action"
/> />
<item
android:id="@+id/move"
android:title="@string/move_action"
/>
<item
android:id="@+id/copy"
android:title="@string/copy_action"
/>
</menu> </menu>

View File

@ -451,6 +451,10 @@ Willkommen zum \"K-9 Mail\"-Setup. K-9 ist eine quelloffene E-Mail-Anwendung fü
<string name="account_settings_hide_buttons_keyboard_avail">Nur wenn Tastatur aktiv</string> <string name="account_settings_hide_buttons_keyboard_avail">Nur wenn Tastatur aktiv</string>
<string name="account_settings_hide_buttons_always">Immer</string> <string name="account_settings_hide_buttons_always">Immer</string>
<string name="account_settings_enable_move_buttons_label">Verschiebungsbuttons</string>
<string name="account_settings_enable_move_buttons_summary">Zeige Sichern, Verschieben und Spam Buttons.</string>
<string name="account_settings_hide_move_buttons_label">Verschiebungs-Scrollbuttons</string>
<string name="account_settings_composition">Nachricht verfassen</string> <string name="account_settings_composition">Nachricht verfassen</string>
<string name="account_settings_sync">Ordner synchronisieren</string> <string name="account_settings_sync">Ordner synchronisieren</string>
<string name="account_settings_folders">Ordner</string> <string name="account_settings_folders">Ordner</string>
@ -667,6 +671,8 @@ Willkommen zum \"K-9 Mail\"-Setup. K-9 ist eine quelloffene E-Mail-Anwendung fü
<string name="batch_mark_unread_op">Ausgewählte als ungelesen markieren</string> <string name="batch_mark_unread_op">Ausgewählte als ungelesen markieren</string>
<string name="batch_flag_op">Ausgewählte als wichtig markieren</string> <string name="batch_flag_op">Ausgewählte als wichtig markieren</string>
<string name="batch_unflag_op">Markierung bei Ausgewählten entfernen</string> <string name="batch_unflag_op">Markierung bei Ausgewählten entfernen</string>
<string name="batch_archive_op">Ausgewählte sichern</string>
<string name="batch_spam_op">Ausgewählte als Spam markieren</string>
<string name="batch_move_op">Ausgewählte verschieben</string> <string name="batch_move_op">Ausgewählte verschieben</string>
<string name="batch_copy_op">Ausgewählte kopieren</string> <string name="batch_copy_op">Ausgewählte kopieren</string>
<string name="batch_flag_mode">Stern-Modus</string> <string name="batch_flag_mode">Stern-Modus</string>

View File

@ -4,9 +4,9 @@
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -38,14 +38,14 @@
<item>10</item> <item>10</item>
<item>15</item> <item>15</item>
<item>30</item> <item>30</item>
<item>60</item> <item>60</item>
<item>120</item> <item>120</item>
<item>180</item> <item>180</item>
<item>360</item> <item>360</item>
<item>720</item> <item>720</item>
<item>1440</item> <item>1440</item>
</string-array> </string-array>
<string-array name="account_settings_display_count_entries"> <string-array name="account_settings_display_count_entries">
<item>@string/account_setup_options_mail_display_count_10</item> <item>@string/account_setup_options_mail_display_count_10</item>
<item>@string/account_setup_options_mail_display_count_25</item> <item>@string/account_setup_options_mail_display_count_25</item>
@ -65,7 +65,7 @@
<item>500</item> <item>500</item>
<item>1000</item> <item>1000</item>
</string-array> </string-array>
<string-array name="account_settings_message_age_entries"> <string-array name="account_settings_message_age_entries">
<item>@string/account_settings_message_age_any</item> <item>@string/account_settings_message_age_any</item>
<item>@string/account_settings_message_age_0</item> <item>@string/account_settings_message_age_0</item>
@ -95,7 +95,7 @@
<item>168</item> <item>168</item>
<item>365</item> <item>365</item>
</string-array> </string-array>
<string-array name="account_settings_folder_display_mode_entries"> <string-array name="account_settings_folder_display_mode_entries">
<item>@string/account_settings_folder_display_mode_all</item> <item>@string/account_settings_folder_display_mode_all</item>
<item>@string/account_settings_folder_display_mode_first_class</item> <item>@string/account_settings_folder_display_mode_first_class</item>
@ -107,9 +107,9 @@
<item>ALL</item> <item>ALL</item>
<item>FIRST_CLASS</item> <item>FIRST_CLASS</item>
<item>FIRST_AND_SECOND_CLASS</item> <item>FIRST_AND_SECOND_CLASS</item>
<item>NOT_SECOND_CLASS</item> <item>NOT_SECOND_CLASS</item>
</string-array> </string-array>
<string-array name="account_settings_hide_buttons_entries"> <string-array name="account_settings_hide_buttons_entries">
<item>@string/account_settings_hide_buttons_never</item> <item>@string/account_settings_hide_buttons_never</item>
<item>@string/account_settings_hide_buttons_keyboard_avail</item> <item>@string/account_settings_hide_buttons_keyboard_avail</item>
@ -121,7 +121,19 @@
<item>KEYBOARD_AVAILABLE</item> <item>KEYBOARD_AVAILABLE</item>
<item>ALWAYS</item> <item>ALWAYS</item>
</string-array> </string-array>
<string-array name="account_settings_hide_move_buttons_entries">
<item>@string/account_settings_hide_buttons_never</item>
<item>@string/account_settings_hide_buttons_keyboard_avail</item>
<item>@string/account_settings_hide_buttons_always</item>
</string-array>
<string-array name="account_settings_hide_move_buttons_values">
<item>NEVER</item>
<item>KEYBOARD_AVAILABLE</item>
<item>ALWAYS</item>
</string-array>
<string-array name="account_settings_searchable_entries"> <string-array name="account_settings_searchable_entries">
<item>@string/account_settings_searchable_all</item> <item>@string/account_settings_searchable_all</item>
<item>@string/account_settings_searchable_displayable</item> <item>@string/account_settings_searchable_displayable</item>
@ -133,7 +145,7 @@
<item>DISPLAYABLE</item> <item>DISPLAYABLE</item>
<item>NONE</item> <item>NONE</item>
</string-array> </string-array>
<string-array name="account_settings_folder_sync_mode_entries"> <string-array name="account_settings_folder_sync_mode_entries">
<item>@string/account_settings_folder_sync_mode_all</item> <item>@string/account_settings_folder_sync_mode_all</item>
<item>@string/account_settings_folder_sync_mode_first_class</item> <item>@string/account_settings_folder_sync_mode_first_class</item>
@ -146,10 +158,10 @@
<item>ALL</item> <item>ALL</item>
<item>FIRST_CLASS</item> <item>FIRST_CLASS</item>
<item>FIRST_AND_SECOND_CLASS</item> <item>FIRST_AND_SECOND_CLASS</item>
<item>NOT_SECOND_CLASS</item> <item>NOT_SECOND_CLASS</item>
<item>NONE</item> <item>NONE</item>
</string-array> </string-array>
<string-array name="account_settings_folder_push_mode_entries"> <string-array name="account_settings_folder_push_mode_entries">
<item>@string/account_settings_folder_push_mode_all</item> <item>@string/account_settings_folder_push_mode_all</item>
<item>@string/account_settings_folder_push_mode_first_class</item> <item>@string/account_settings_folder_push_mode_first_class</item>
@ -162,10 +174,10 @@
<item>ALL</item> <item>ALL</item>
<item>FIRST_CLASS</item> <item>FIRST_CLASS</item>
<item>FIRST_AND_SECOND_CLASS</item> <item>FIRST_AND_SECOND_CLASS</item>
<item>NOT_SECOND_CLASS</item> <item>NOT_SECOND_CLASS</item>
<item>NONE</item> <item>NONE</item>
</string-array> </string-array>
<string-array name="account_settings_push_limit_entries"> <string-array name="account_settings_push_limit_entries">
<item>@string/account_setup_push_limit_10</item> <item>@string/account_setup_push_limit_10</item>
<item>@string/account_setup_push_limit_25</item> <item>@string/account_setup_push_limit_25</item>
@ -175,7 +187,7 @@
<item>@string/account_setup_push_limit_500</item> <item>@string/account_setup_push_limit_500</item>
<item>@string/account_setup_push_limit_1000</item> <item>@string/account_setup_push_limit_1000</item>
</string-array> </string-array>
<string-array name="account_settings_push_limit_values"> <string-array name="account_settings_push_limit_values">
<item>10</item> <item>10</item>
<item>25</item> <item>25</item>
@ -185,7 +197,7 @@
<item>500</item> <item>500</item>
<item>1000</item> <item>1000</item>
</string-array> </string-array>
<string-array name="account_settings_folder_target_mode_entries"> <string-array name="account_settings_folder_target_mode_entries">
<item>@string/account_settings_folder_target_mode_all</item> <item>@string/account_settings_folder_target_mode_all</item>
<item>@string/account_settings_folder_target_mode_first_class</item> <item>@string/account_settings_folder_target_mode_first_class</item>
@ -197,9 +209,9 @@
<item>ALL</item> <item>ALL</item>
<item>FIRST_CLASS</item> <item>FIRST_CLASS</item>
<item>FIRST_AND_SECOND_CLASS</item> <item>FIRST_AND_SECOND_CLASS</item>
<item>NOT_SECOND_CLASS</item> <item>NOT_SECOND_CLASS</item>
</string-array> </string-array>
<string-array name="folder_settings_folder_display_mode_entries"> <string-array name="folder_settings_folder_display_mode_entries">
<item>@string/folder_settings_folder_display_mode_normal</item> <item>@string/folder_settings_folder_display_mode_normal</item>
<item>@string/folder_settings_folder_display_mode_first_class</item> <item>@string/folder_settings_folder_display_mode_first_class</item>
@ -209,85 +221,85 @@
<string-array name="folder_settings_folder_display_mode_values"> <string-array name="folder_settings_folder_display_mode_values">
<item>NO_CLASS</item> <item>NO_CLASS</item>
<item>FIRST_CLASS</item> <item>FIRST_CLASS</item>
<item>SECOND_CLASS</item> <item>SECOND_CLASS</item>
</string-array> </string-array>
<string-array name="folder_settings_folder_sync_mode_entries"> <string-array name="folder_settings_folder_sync_mode_entries">
<item>@string/folder_settings_folder_sync_mode_normal</item> <item>@string/folder_settings_folder_sync_mode_normal</item>
<item>@string/folder_settings_folder_sync_mode_first_class</item> <item>@string/folder_settings_folder_sync_mode_first_class</item>
<item>@string/folder_settings_folder_sync_mode_second_class</item> <item>@string/folder_settings_folder_sync_mode_second_class</item>
<item>@string/folder_settings_folder_sync_mode_inherited</item> <item>@string/folder_settings_folder_sync_mode_inherited</item>
</string-array> </string-array>
<string-array name="folder_settings_folder_sync_mode_values"> <string-array name="folder_settings_folder_sync_mode_values">
<item>NO_CLASS</item> <item>NO_CLASS</item>
<item>FIRST_CLASS</item> <item>FIRST_CLASS</item>
<item>SECOND_CLASS</item> <item>SECOND_CLASS</item>
<item>INHERITED</item> <item>INHERITED</item>
</string-array> </string-array>
<string-array name="folder_settings_folder_push_mode_entries"> <string-array name="folder_settings_folder_push_mode_entries">
<item>@string/folder_settings_folder_push_mode_normal</item> <item>@string/folder_settings_folder_push_mode_normal</item>
<item>@string/folder_settings_folder_push_mode_first_class</item> <item>@string/folder_settings_folder_push_mode_first_class</item>
<item>@string/folder_settings_folder_push_mode_second_class</item> <item>@string/folder_settings_folder_push_mode_second_class</item>
<item>@string/folder_settings_folder_push_mode_inherited</item> <item>@string/folder_settings_folder_push_mode_inherited</item>
</string-array> </string-array>
<string-array name="folder_settings_folder_push_mode_values"> <string-array name="folder_settings_folder_push_mode_values">
<item>NO_CLASS</item> <item>NO_CLASS</item>
<item>FIRST_CLASS</item> <item>FIRST_CLASS</item>
<item>SECOND_CLASS</item> <item>SECOND_CLASS</item>
<item>INHERITED</item> <item>INHERITED</item>
</string-array> </string-array>
<string-array name="account_setup_delete_policy_entries"> <string-array name="account_setup_delete_policy_entries">
<item>@string/account_setup_incoming_delete_policy_never_label</item> <item>@string/account_setup_incoming_delete_policy_never_label</item>
<item>@string/account_setup_incoming_delete_policy_delete_label</item> <item>@string/account_setup_incoming_delete_policy_delete_label</item>
<item>@string/account_setup_incoming_delete_policy_markread_label</item> <item>@string/account_setup_incoming_delete_policy_markread_label</item>
</string-array> </string-array>
<string-array name="account_setup_delete_policy_values"> <string-array name="account_setup_delete_policy_values">
<item>0</item> <item>0</item>
<item>2</item> <item>2</item>
<item>3</item> <item>3</item>
</string-array> </string-array>
<string-array name="account_setup_expunge_policy_entries"> <string-array name="account_setup_expunge_policy_entries">
<item>@string/account_setup_expunge_policy_immediately</item> <item>@string/account_setup_expunge_policy_immediately</item>
<item>@string/account_setup_expunge_policy_on_poll</item> <item>@string/account_setup_expunge_policy_on_poll</item>
<item>@string/account_setup_expunge_policy_manual</item> <item>@string/account_setup_expunge_policy_manual</item>
</string-array> </string-array>
<string-array name="account_setup_expunge_policy_values"> <string-array name="account_setup_expunge_policy_values">
<item>EXPUNGE_IMMEDIATELY</item> <item>EXPUNGE_IMMEDIATELY</item>
<item>EXPUNGE_ON_POLL</item> <item>EXPUNGE_ON_POLL</item>
<item>EXPUNGE_MANUALLY</item> <item>EXPUNGE_MANUALLY</item>
</string-array> </string-array>
<string-array name="settings_theme_entries"> <string-array name="settings_theme_entries">
<item>@string/setting_theme_light</item> <item>@string/setting_theme_light</item>
<item>@string/setting_theme_dark</item> <item>@string/setting_theme_dark</item>
</string-array> </string-array>
<string-array name="settings_theme_values"> <string-array name="settings_theme_values">
<item>light</item> <item>light</item>
<item>dark</item> <item>dark</item>
</string-array> </string-array>
<string-array name="background_ops_entries"> <string-array name="background_ops_entries">
<item>@string/background_ops_enabled</item> <item>@string/background_ops_enabled</item>
<item>@string/background_ops_auto_sync</item> <item>@string/background_ops_auto_sync</item>
<item>@string/background_ops_always</item> <item>@string/background_ops_always</item>
<item>@string/background_ops_never</item> <item>@string/background_ops_never</item>
</string-array> </string-array>
<string-array name="background_ops_values"> <string-array name="background_ops_values">
<item>WHEN_CHECKED</item> <item>WHEN_CHECKED</item>
<item>WHEN_CHECKED_AUTO_SYNC</item> <item>WHEN_CHECKED_AUTO_SYNC</item>
<item>ALWAYS</item> <item>ALWAYS</item>
<item>NEVER</item> <item>NEVER</item>
</string-array> </string-array>
<string-array name="date_formats"> <string-array name="date_formats">
<item>@string/date_format_short</item> <item>@string/date_format_short</item>
<item>@string/date_format_medium</item> <item>@string/date_format_medium</item>
@ -297,45 +309,45 @@
<string-array name="font_entries"> <string-array name="font_entries">
<item>@string/font_size_tiniest</item> <item>@string/font_size_tiniest</item>
<item>@string/font_size_tiny</item> <item>@string/font_size_tiny</item>
<item>@string/font_size_smaller</item> <item>@string/font_size_smaller</item>
<item>@string/font_size_small</item> <item>@string/font_size_small</item>
<item>@string/font_size_medium</item> <item>@string/font_size_medium</item>
<item>@string/font_size_large</item> <item>@string/font_size_large</item>
<item>@string/font_size_larger</item> <item>@string/font_size_larger</item>
</string-array> </string-array>
<string-array name="font_values"> <string-array name="font_values">
<item>10</item> <item>10</item>
<item>12</item> <item>12</item>
<item>14</item> <item>14</item>
<item>16</item> <item>16</item>
<item>18</item> <item>18</item>
<item>20</item> <item>20</item>
<item>22</item> <item>22</item>
</string-array> </string-array>
<string-array name="font_entries_webview"> <string-array name="font_entries_webview">
<item>@string/font_size_webview_smaller</item> <item>@string/font_size_webview_smaller</item>
<item>@string/font_size_webview_small</item> <item>@string/font_size_webview_small</item>
<item>@string/font_size_webview_normal</item> <item>@string/font_size_webview_normal</item>
<item>@string/font_size_webview_large</item> <item>@string/font_size_webview_large</item>
<item>@string/font_size_webview_larger</item> <item>@string/font_size_webview_larger</item>
</string-array> </string-array>
<!-- <!--
Be sure to also change FontSizes.getMessageViewContentAsInt() and Be sure to also change FontSizes.getMessageViewContentAsInt() and
FontSizes.setMessageViewContent() if you change this. FontSizes.setMessageViewContent() if you change this.
--> -->
<string-array name="font_values_webview"> <string-array name="font_values_webview">
<item>1</item> <item>1</item>
<item>2</item> <item>2</item>
<item>3</item> <item>3</item>
<item>4</item> <item>4</item>
<item>5</item> <item>5</item>
</string-array> </string-array>
<string-array name="idle_refresh_period_entries"> <string-array name="idle_refresh_period_entries">
<item>@string/idle_refresh_period_1min</item> <item>@string/idle_refresh_period_1min</item>
<item>@string/idle_refresh_period_2min</item> <item>@string/idle_refresh_period_2min</item>
@ -355,9 +367,9 @@
<item>6</item> <item>6</item>
<item>12</item> <item>12</item>
<item>24</item> <item>24</item>
<item>36</item> <item>36</item>
<item>48</item> <item>48</item>
<item>60</item> <item>60</item>
</string-array> </string-array>
<string-array name="account_settings_vibrate_pattern_entries"> <string-array name="account_settings_vibrate_pattern_entries">

View File

@ -45,6 +45,7 @@
<string name="reply_all_action">Reply all</string> <string name="reply_all_action">Reply all</string>
<string name="delete_action">Delete</string> <string name="delete_action">Delete</string>
<string name="archive_action">Archive</string> <string name="archive_action">Archive</string>
<string name="spam_action">Spam</string>
<string name="delete_all_action">Clear folder</string> <string name="delete_all_action">Clear folder</string>
<string name="forward_action">Forward</string> <string name="forward_action">Forward</string>
<string name="move_action">Move</string> <string name="move_action">Move</string>
@ -259,6 +260,9 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
<string name="message_view_attachment_download_action">Save</string> <string name="message_view_attachment_download_action">Save</string>
<string name="message_view_prev_action">\u25BC</string> <string name="message_view_prev_action">\u25BC</string>
<string name="message_view_next_action">\u25B2</string> <string name="message_view_next_action">\u25B2</string>
<string name="message_view_archive_action">Archive</string>
<string name="message_view_move_action">Move</string>
<string name="message_view_spam_action">Spam</string>
<string name="message_view_datetime_fmt">MMM dd yyyy hh:mm a</string> <string name="message_view_datetime_fmt">MMM dd yyyy hh:mm a</string>
<string name="message_view_status_attachment_saved">Attachment saved to SD card as <xliff:g id="filename">%s</xliff:g>.</string> <string name="message_view_status_attachment_saved">Attachment saved to SD card as <xliff:g id="filename">%s</xliff:g>.</string>
<string name="message_view_status_attachment_not_saved">Unable to save attachment to SD card.</string> <string name="message_view_status_attachment_not_saved">Unable to save attachment to SD card.</string>
@ -491,6 +495,10 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
<string name="account_settings_hide_buttons_keyboard_avail">When keyboard is available</string> <string name="account_settings_hide_buttons_keyboard_avail">When keyboard is available</string>
<string name="account_settings_hide_buttons_always">Always</string> <string name="account_settings_hide_buttons_always">Always</string>
<string name="account_settings_enable_move_buttons_label">Enable move buttons</string>
<string name="account_settings_enable_move_buttons_summary">Show the Archive, Move, and Spam button.</string>
<string name="account_settings_hide_move_buttons_label">Scroll move buttons</string>
<string name="account_settings_composition">Writing messages</string> <string name="account_settings_composition">Writing messages</string>
<string name="account_settings_sync">Syncing folders</string> <string name="account_settings_sync">Syncing folders</string>
<string name="account_settings_folders">Folders</string> <string name="account_settings_folders">Folders</string>
@ -748,6 +756,8 @@ Welcome to K-9 Mail setup. K-9 is an open source mail client for Android origin
<string name="batch_mark_unread_op">Mark selected unread</string> <string name="batch_mark_unread_op">Mark selected unread</string>
<string name="batch_flag_op">Add star to selected</string> <string name="batch_flag_op">Add star to selected</string>
<string name="batch_unflag_op">Remove star from selected</string> <string name="batch_unflag_op">Remove star from selected</string>
<string name="batch_archive_op">Move selected to Archive</string>
<string name="batch_spam_op">Move selected to Spam</string>
<string name="batch_move_op">Move selected</string> <string name="batch_move_op">Move selected</string>
<string name="batch_copy_op">Copy selected</string> <string name="batch_copy_op">Copy selected</string>
<string name="batch_flag_mode">Star mode</string> <string name="batch_flag_mode">Star mode</string>

View File

@ -30,17 +30,17 @@
android:key="account_default" android:key="account_default"
android:title="@string/account_settings_default_label" android:title="@string/account_settings_default_label"
android:summary="@string/account_settings_default_summary" /> android:summary="@string/account_settings_default_summary" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/account_settings_message_lists"> <PreferenceCategory android:title="@string/account_settings_message_lists">
<ListPreference <ListPreference
android:key="account_display_count" android:key="account_display_count"
android:title="@string/account_settings_mail_display_count_label" android:title="@string/account_settings_mail_display_count_label"
android:entries="@array/account_settings_display_count_entries" android:entries="@array/account_settings_display_count_entries"
android:entryValues="@array/account_settings_display_count_values" android:entryValues="@array/account_settings_display_count_values"
android:dialogTitle="@string/account_settings_mail_display_count_label" /> android:dialogTitle="@string/account_settings_mail_display_count_label" />
<Preference <Preference
android:key="chip_color" android:key="chip_color"
android:singleLine="true" android:singleLine="true"
@ -64,6 +64,20 @@
android:entryValues="@array/account_settings_hide_buttons_values" android:entryValues="@array/account_settings_hide_buttons_values"
android:dialogTitle="@string/account_settings_hide_buttons_label" /> android:dialogTitle="@string/account_settings_hide_buttons_label" />
<CheckBoxPreference
android:key="enable_move_buttons"
android:title="@string/account_settings_enable_move_buttons_label"
android:defaultValue="true"
android:summary="@string/account_settings_enable_move_buttons_summary" />
<ListPreference
android:key="hide_move_buttons_enum"
android:dependency="enable_move_buttons"
android:title="@string/account_settings_hide_move_buttons_label"
android:entries="@array/account_settings_hide_move_buttons_entries"
android:entryValues="@array/account_settings_hide_move_buttons_values"
android:dialogTitle="@string/account_settings_hide_move_buttons_label" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/account_settings_sync"> <PreferenceCategory android:title="@string/account_settings_sync">
@ -80,35 +94,35 @@
android:entries="@array/account_settings_message_age_entries" android:entries="@array/account_settings_message_age_entries"
android:entryValues="@array/account_settings_message_age_values" android:entryValues="@array/account_settings_message_age_values"
android:dialogTitle="@string/account_settings_message_age_label" /> android:dialogTitle="@string/account_settings_message_age_label" />
<ListPreference <ListPreference
android:key="folder_sync_mode" android:key="folder_sync_mode"
android:title="@string/account_settings_folder_sync_mode_label" android:title="@string/account_settings_folder_sync_mode_label"
android:entries="@array/account_settings_folder_sync_mode_entries" android:entries="@array/account_settings_folder_sync_mode_entries"
android:entryValues="@array/account_settings_folder_sync_mode_values" android:entryValues="@array/account_settings_folder_sync_mode_values"
android:dialogTitle="@string/account_settings_folder_sync_mode_label" /> android:dialogTitle="@string/account_settings_folder_sync_mode_label" />
<ListPreference <ListPreference
android:key="folder_push_mode" android:key="folder_push_mode"
android:title="@string/account_settings_folder_push_mode_label" android:title="@string/account_settings_folder_push_mode_label"
android:entries="@array/account_settings_folder_push_mode_entries" android:entries="@array/account_settings_folder_push_mode_entries"
android:entryValues="@array/account_settings_folder_push_mode_values" android:entryValues="@array/account_settings_folder_push_mode_values"
android:dialogTitle="@string/account_settings_folder_push_mode_label" /> android:dialogTitle="@string/account_settings_folder_push_mode_label" />
<ListPreference <ListPreference
android:key="delete_policy" android:key="delete_policy"
android:title="@string/account_setup_incoming_delete_policy_label" android:title="@string/account_setup_incoming_delete_policy_label"
android:entries="@array/account_setup_delete_policy_entries" android:entries="@array/account_setup_delete_policy_entries"
android:entryValues="@array/account_setup_delete_policy_values" android:entryValues="@array/account_setup_delete_policy_values"
android:dialogTitle="@string/account_setup_incoming_delete_policy_label" /> android:dialogTitle="@string/account_setup_incoming_delete_policy_label" />
<ListPreference <ListPreference
android:key="expunge_policy" android:key="expunge_policy"
android:title="@string/account_setup_expunge_policy_label" android:title="@string/account_setup_expunge_policy_label"
android:entries="@array/account_setup_expunge_policy_entries" android:entries="@array/account_setup_expunge_policy_entries"
android:entryValues="@array/account_setup_expunge_policy_values" android:entryValues="@array/account_setup_expunge_policy_values"
android:dialogTitle="@string/account_setup_expunge_policy_label" /> android:dialogTitle="@string/account_setup_expunge_policy_label" />
<CheckBoxPreference <CheckBoxPreference
android:key="account_sync_remote_deletetions" android:key="account_sync_remote_deletetions"
android:title="@string/account_settings_sync_remote_deletetions_label" android:title="@string/account_settings_sync_remote_deletetions_label"
@ -117,15 +131,15 @@
<PreferenceScreen <PreferenceScreen
android:key="incoming" android:key="incoming"
android:title="@string/account_settings_incoming_label" android:title="@string/account_settings_incoming_label"
android:summary="@string/account_settings_incoming_summary" android:summary="@string/account_settings_incoming_summary"
/> />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/account_settings_folders">
<Preference <PreferenceCategory android:title="@string/account_settings_folders">
<Preference
android:key="account_setup_auto_expand_folder" android:key="account_setup_auto_expand_folder"
android:singleLine="true" android:singleLine="true"
android:title="@string/account_setup_auto_expand_folder" android:title="@string/account_setup_auto_expand_folder"
@ -137,45 +151,45 @@
android:entries="@array/account_settings_folder_display_mode_entries" android:entries="@array/account_settings_folder_display_mode_entries"
android:entryValues="@array/account_settings_folder_display_mode_values" android:entryValues="@array/account_settings_folder_display_mode_values"
android:dialogTitle="@string/account_settings_folder_display_mode_label" /> android:dialogTitle="@string/account_settings_folder_display_mode_label" />
<ListPreference <ListPreference
android:key="folder_target_mode" android:key="folder_target_mode"
android:title="@string/account_settings_folder_target_mode_label" android:title="@string/account_settings_folder_target_mode_label"
android:entries="@array/account_settings_folder_target_mode_entries" android:entries="@array/account_settings_folder_target_mode_entries"
android:entryValues="@array/account_settings_folder_target_mode_values" android:entryValues="@array/account_settings_folder_target_mode_values"
android:dialogTitle="@string/account_settings_folder_target_mode_label" /> android:dialogTitle="@string/account_settings_folder_target_mode_label" />
<ListPreference <ListPreference
android:key="searchable_folders" android:key="searchable_folders"
android:title="@string/account_settings_searchable_label" android:title="@string/account_settings_searchable_label"
android:entries="@array/account_settings_searchable_entries" android:entries="@array/account_settings_searchable_entries"
android:entryValues="@array/account_settings_searchable_values" android:entryValues="@array/account_settings_searchable_values"
android:dialogTitle="@string/account_settings_searchable_label" /> android:dialogTitle="@string/account_settings_searchable_label" />
</PreferenceCategory> </PreferenceCategory>
<PreferenceCategory android:title="@string/account_settings_composition"> <PreferenceCategory android:title="@string/account_settings_composition">
<PreferenceScreen <PreferenceScreen
android:key="composition" android:key="composition"
android:summary="@string/account_settings_composition_summary" android:summary="@string/account_settings_composition_summary"
android:title="@string/account_settings_composition_label" android:title="@string/account_settings_composition_label"
/> />
<PreferenceScreen <PreferenceScreen
android:key="manage_identities" android:key="manage_identities"
android:title="@string/account_settings_identities_label" android:title="@string/account_settings_identities_label"
android:summary="@string/account_settings_identities_summary" android:summary="@string/account_settings_identities_summary"
/> />
<PreferenceScreen <PreferenceScreen
android:key="outgoing" android:key="outgoing"
android:title="@string/account_settings_outgoing_label" android:title="@string/account_settings_outgoing_label"
android:summary="@string/account_settings_outgoing_summary" android:summary="@string/account_settings_outgoing_summary"
/> />
<EditTextPreference <EditTextPreference
android:key="account_quote_prefix" android:key="account_quote_prefix"
@ -193,14 +207,14 @@
android:title="@string/account_settings_notify_label" android:title="@string/account_settings_notify_label"
android:defaultValue="true" android:defaultValue="true"
android:summary="@string/account_settings_notify_summary" /> android:summary="@string/account_settings_notify_summary" />
<CheckBoxPreference <CheckBoxPreference
android:key="account_notify_self" android:key="account_notify_self"
android:dependency="account_notify" android:dependency="account_notify"
android:title="@string/account_settings_notify_self_label" android:title="@string/account_settings_notify_self_label"
android:defaultValue="true" android:defaultValue="true"
android:summary="@string/account_settings_notify_self_summary" /> android:summary="@string/account_settings_notify_self_summary" />
<RingtonePreference <RingtonePreference
android:layout="?android:attr/preferenceLayoutChild" android:layout="?android:attr/preferenceLayoutChild"
android:dependency="account_notify" android:dependency="account_notify"

View File

@ -90,6 +90,8 @@ public class Account implements BaseAccount
private String mRingtoneUri; private String mRingtoneUri;
private boolean mNotifySync; private boolean mNotifySync;
private HideButtons mHideMessageViewButtons; private HideButtons mHideMessageViewButtons;
private HideButtons mHideMessageViewMoveButtons;
private boolean mEnableMoveButtons;
private boolean mIsSignatureBeforeQuotedText; private boolean mIsSignatureBeforeQuotedText;
private String mExpungePolicy = EXPUNGE_IMMEDIATELY; private String mExpungePolicy = EXPUNGE_IMMEDIATELY;
private int mMaxPushFolders; private int mMaxPushFolders;
@ -153,6 +155,8 @@ public class Account implements BaseAccount
mFolderPushMode = FolderMode.FIRST_CLASS; mFolderPushMode = FolderMode.FIRST_CLASS;
mFolderTargetMode = FolderMode.NOT_SECOND_CLASS; mFolderTargetMode = FolderMode.NOT_SECOND_CLASS;
mHideMessageViewButtons = HideButtons.NEVER; mHideMessageViewButtons = HideButtons.NEVER;
mHideMessageViewMoveButtons = HideButtons.NEVER;
mEnableMoveButtons = false;
mRingtoneUri = "content://settings/system/notification_sound"; mRingtoneUri = "content://settings/system/notification_sound";
mIsSignatureBeforeQuotedText = false; mIsSignatureBeforeQuotedText = false;
mExpungePolicy = EXPUNGE_IMMEDIATELY; mExpungePolicy = EXPUNGE_IMMEDIATELY;
@ -279,6 +283,18 @@ public class Account implements BaseAccount
mHideMessageViewButtons = HideButtons.NEVER; mHideMessageViewButtons = HideButtons.NEVER;
} }
try
{
mHideMessageViewMoveButtons = HideButtons.valueOf(preferences.getPreferences().getString(mUuid + ".hideMoveButtonsEnum",
HideButtons.NEVER.name()));
}
catch (Exception e)
{
mHideMessageViewMoveButtons = HideButtons.NEVER;
}
mEnableMoveButtons = preferences.getPreferences().getBoolean(mUuid + ".enableMoveButtons", false);
mRingtoneUri = preferences.getPreferences().getString(mUuid + ".ringtone", mRingtoneUri = preferences.getPreferences().getString(mUuid + ".ringtone",
"content://settings/system/notification_sound"); "content://settings/system/notification_sound");
try try
@ -475,6 +491,8 @@ public class Account implements BaseAccount
editor.putInt(mUuid + ".vibrateTimes", mVibrateTimes); editor.putInt(mUuid + ".vibrateTimes", mVibrateTimes);
editor.putBoolean(mUuid + ".ring", mRing); editor.putBoolean(mUuid + ".ring", mRing);
editor.putString(mUuid + ".hideButtonsEnum", mHideMessageViewButtons.name()); editor.putString(mUuid + ".hideButtonsEnum", mHideMessageViewButtons.name());
editor.putString(mUuid + ".hideMoveButtonsEnum", mHideMessageViewMoveButtons.name());
editor.putBoolean(mUuid + ".enableMoveButtons", mEnableMoveButtons);
editor.putString(mUuid + ".ringtone", mRingtoneUri); editor.putString(mUuid + ".ringtone", mRingtoneUri);
editor.putString(mUuid + ".folderDisplayMode", mFolderDisplayMode.name()); editor.putString(mUuid + ".folderDisplayMode", mFolderDisplayMode.name());
editor.putString(mUuid + ".folderSyncMode", mFolderSyncMode.name()); editor.putString(mUuid + ".folderSyncMode", mFolderSyncMode.name());
@ -963,6 +981,16 @@ public class Account implements BaseAccount
mHideMessageViewButtons = hideMessageViewButtons; mHideMessageViewButtons = hideMessageViewButtons;
} }
public synchronized HideButtons getHideMessageViewMoveButtons()
{
return mHideMessageViewMoveButtons;
}
public synchronized void setHideMessageViewMoveButtons(HideButtons hideMessageViewButtons)
{
mHideMessageViewMoveButtons = hideMessageViewButtons;
}
public synchronized FolderMode getFolderTargetMode() public synchronized FolderMode getFolderTargetMode()
{ {
return mFolderTargetMode; return mFolderTargetMode;
@ -1354,6 +1382,16 @@ public class Account implements BaseAccount
mQuotePrefix = quotePrefix; mQuotePrefix = quotePrefix;
} }
public boolean getEnableMoveButtons()
{
return mEnableMoveButtons;
}
public void setEnableMoveButtons(boolean enableMoveButtons)
{
mEnableMoveButtons = enableMoveButtons;
}
public synchronized boolean syncRemoteDeletions() public synchronized boolean syncRemoteDeletions()
{ {
return mSyncRemoteDeletions; return mSyncRemoteDeletions;

View File

@ -23,6 +23,7 @@ import android.widget.*;
import android.widget.AdapterView.AdapterContextMenuInfo; import android.widget.AdapterView.AdapterContextMenuInfo;
import android.widget.CompoundButton.OnCheckedChangeListener; import android.widget.CompoundButton.OnCheckedChangeListener;
import com.fsck.k9.*; import com.fsck.k9.*;
import com.fsck.k9.activity.setup.AccountSetupIncoming;
import com.fsck.k9.activity.setup.Prefs; import com.fsck.k9.activity.setup.Prefs;
import com.fsck.k9.activity.setup.AccountSettings; import com.fsck.k9.activity.setup.AccountSettings;
import com.fsck.k9.activity.setup.FolderSettings; import com.fsck.k9.activity.setup.FolderSettings;
@ -58,9 +59,7 @@ public class MessageList
private static final int DIALOG_MARK_ALL_AS_READ = 1; private static final int DIALOG_MARK_ALL_AS_READ = 1;
private static final int ACTIVITY_CHOOSE_FOLDER_MOVE = 1; private static final int ACTIVITY_CHOOSE_FOLDER_MOVE = 1;
private static final int ACTIVITY_CHOOSE_FOLDER_COPY = 2; private static final int ACTIVITY_CHOOSE_FOLDER_COPY = 2;
private static final int ACTIVITY_CHOOSE_FOLDER_MOVE_BATCH = 3; private static final int ACTIVITY_CHOOSE_FOLDER_MOVE_BATCH = 3;
private static final int ACTIVITY_CHOOSE_FOLDER_COPY_BATCH = 4; private static final int ACTIVITY_CHOOSE_FOLDER_COPY_BATCH = 4;
@ -542,10 +541,8 @@ public class MessageList
mListView.setScrollingCacheEnabled(true); mListView.setScrollingCacheEnabled(true);
mListView.setOnItemClickListener(this); mListView.setOnItemClickListener(this);
registerForContextMenu(mListView); registerForContextMenu(mListView);
mBatchButtonArea = findViewById(R.id.batch_button_area); mBatchButtonArea = findViewById(R.id.batch_button_area);
mBatchReadButton = (ImageButton) findViewById(R.id.batch_read_button); mBatchReadButton = (ImageButton) findViewById(R.id.batch_read_button);
mBatchReadButton.setOnClickListener(this); mBatchReadButton.setOnClickListener(this);
@ -932,6 +929,40 @@ public class MessageList
startActivityForResult(intent, ACTIVITY_CHOOSE_FOLDER_MOVE); startActivityForResult(intent, ACTIVITY_CHOOSE_FOLDER_MOVE);
} }
private void onArchive(MessageInfoHolder holder)
{
if (mController.isMoveCapable(holder.message.getFolder().getAccount()) == false)
{
return;
}
if (mController.isMoveCapable(holder.message) == false)
{
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show();
return;
}
onMoveChosen(holder, holder.message.getFolder().getAccount().getArchiveFolderName());
}
private void onSpam(MessageInfoHolder holder)
{
if (mController.isMoveCapable(holder.message.getFolder().getAccount()) == false)
{
return;
}
if (mController.isMoveCapable(holder.message) == false)
{
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show();
return;
}
onMoveChosen(holder, holder.message.getFolder().getAccount().getSpamFolderName());
}
private void onCopy(MessageInfoHolder holder) private void onCopy(MessageInfoHolder holder)
{ {
if (mController.isCopyCapable(holder.message.getFolder().getAccount()) == false) if (mController.isCopyCapable(holder.message.getFolder().getAccount()) == false)
@ -1021,6 +1052,9 @@ public class MessageList
{ {
if (mController.isMoveCapable(holder.message.getFolder().getAccount()) == true && folderName != null) if (mController.isMoveCapable(holder.message.getFolder().getAccount()) == true && folderName != null)
{ {
if (K9.FOLDER_NONE.equalsIgnoreCase(folderName)) {
return;
}
mAdapter.removeMessage(holder); mAdapter.removeMessage(holder);
mController.moveMessage(holder.message.getFolder().getAccount(), holder.message.getFolder().getName(), holder.message, folderName, null); mController.moveMessage(holder.message.getFolder().getAccount(), holder.message.getFolder().getName(), holder.message, folderName, null);
} }
@ -1293,11 +1327,18 @@ public class MessageList
onCopyBatch(); onCopyBatch();
return true; return true;
case R.id.batch_archive_op:
onArchiveBatch();
return true;
case R.id.batch_spam_op:
onSpamBatch();
return true;
case R.id.batch_move_op: case R.id.batch_move_op:
onMoveBatch(); onMoveBatch();
return true; return true;
case R.id.expunge: case R.id.expunge:
if (mCurrentFolder != null) if (mCurrentFolder != null)
{ {
@ -1311,7 +1352,8 @@ public class MessageList
} }
private final int[] batch_ops = { R.id.batch_copy_op, R.id.batch_delete_op, R.id.batch_flag_op, private final int[] batch_ops = { R.id.batch_copy_op, R.id.batch_delete_op, R.id.batch_flag_op,
R.id.batch_unflag_op, R.id.batch_mark_read_op, R.id.batch_mark_unread_op, R.id.batch_move_op , R.id.batch_unflag_op, R.id.batch_mark_read_op, R.id.batch_mark_unread_op,
R.id.batch_archive_op, R.id.batch_spam_op, R.id.batch_move_op,
R.id.batch_select_all, R.id.batch_deselect_all R.id.batch_select_all, R.id.batch_deselect_all
}; };
@ -1343,6 +1385,8 @@ public class MessageList
menu.findItem(R.id.account_settings).setVisible(false); menu.findItem(R.id.account_settings).setVisible(false);
menu.findItem(R.id.list_folders).setVisible(false); menu.findItem(R.id.list_folders).setVisible(false);
menu.findItem(R.id.expunge).setVisible(false); menu.findItem(R.id.expunge).setVisible(false);
menu.findItem(R.id.batch_archive_op).setVisible(false);
menu.findItem(R.id.batch_spam_op).setVisible(false);
menu.findItem(R.id.batch_move_op).setVisible(false); menu.findItem(R.id.batch_move_op).setVisible(false);
menu.findItem(R.id.batch_copy_op).setVisible(false); menu.findItem(R.id.batch_copy_op).setVisible(false);
menu.findItem(R.id.check_mail).setVisible(false); menu.findItem(R.id.check_mail).setVisible(false);
@ -1383,15 +1427,13 @@ public class MessageList
super.onCreateOptionsMenu(menu); super.onCreateOptionsMenu(menu);
getMenuInflater().inflate(R.menu.message_list_option, menu); getMenuInflater().inflate(R.menu.message_list_option, menu);
return true; return true;
} }
@Override @Override
public boolean onContextItemSelected(MenuItem item) public boolean onContextItemSelected(MenuItem item)
{ {
AdapterContextMenuInfo info = (AdapterContextMenuInfo) item .getMenuInfo(); AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();
MessageInfoHolder holder = (MessageInfoHolder) mAdapter.getItem(info.position); MessageInfoHolder holder = (MessageInfoHolder) mAdapter.getItem(info.position);
switch (item.getItemId()) switch (item.getItemId())
@ -1436,6 +1478,16 @@ public class MessageList
break; break;
case R.id.archive:
onArchive(holder);
break;
case R.id.spam:
onSpam(holder);
break;
case R.id.move: case R.id.move:
onMove(holder); onMove(holder);
@ -1556,15 +1608,28 @@ public class MessageList
menu.findItem(R.id.flag).setTitle(R.string.unflag_action); menu.findItem(R.id.flag).setTitle(R.string.unflag_action);
} }
if (mController.isCopyCapable(message.message.getFolder().getAccount()) == false) Account account = message.message.getFolder().getAccount();
if (mController.isCopyCapable(account) == false)
{ {
menu.findItem(R.id.copy).setVisible(false); menu.findItem(R.id.copy).setVisible(false);
} }
if (mController.isMoveCapable(message.message.getFolder().getAccount()) == false) if (mController.isMoveCapable(account) == false)
{ {
menu.findItem(R.id.move).setVisible(false); menu.findItem(R.id.move).setVisible(false);
menu.findItem(R.id.archive).setVisible(false);
menu.findItem(R.id.spam).setVisible(false);
} }
if (K9.FOLDER_NONE.equalsIgnoreCase(account.getArchiveFolderName()))
{
menu.findItem(R.id.archive).setVisible(false);
}
if (K9.FOLDER_NONE.equalsIgnoreCase(account.getSpamFolderName()))
{
menu.findItem(R.id.spam).setVisible(false);
}
if (message.selected) if (message.selected)
{ {
menu.findItem(R.id.select).setVisible(false); menu.findItem(R.id.select).setVisible(false);
@ -2885,6 +2950,7 @@ public class MessageList
intent.putExtra(ChooseFolder.EXTRA_SEL_FOLDER, folder.getAccount().getLastSelectedFolderName()); intent.putExtra(ChooseFolder.EXTRA_SEL_FOLDER, folder.getAccount().getLastSelectedFolderName());
startActivityForResult(intent, ACTIVITY_CHOOSE_FOLDER_MOVE_BATCH); startActivityForResult(intent, ACTIVITY_CHOOSE_FOLDER_MOVE_BATCH);
} }
private void onMoveChosenBatch(String folderName) private void onMoveChosenBatch(String folderName)
{ {
if (mController.isMoveCapable(mAccount) == false) if (mController.isMoveCapable(mAccount) == false)
@ -2915,6 +2981,65 @@ public class MessageList
mSelectedCount = 0; mSelectedCount = 0;
toggleBatchButtons(); toggleBatchButtons();
} }
private void onArchiveBatch()
{
if (mController.isMoveCapable(mAccount) == false)
{
return;
}
Account account = null;
for (MessageInfoHolder holder : mAdapter.messages)
{
if (holder.selected)
{
Message message = holder.message;
if (mController.isMoveCapable(message) == false)
{
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show();
return;
}
}
}
String folderName = mAccount.getArchiveFolderName();
if (K9.FOLDER_NONE.equalsIgnoreCase(folderName))
{
return;
}
onMoveChosenBatch(folderName);
}
private void onSpamBatch()
{
if (mController.isMoveCapable(mAccount) == false)
{
return;
}
Account account = null;
for (MessageInfoHolder holder : mAdapter.messages)
{
if (holder.selected)
{
Message message = holder.message;
if (mController.isMoveCapable(message) == false)
{
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show();
return;
}
}
}
String folderName = mAccount.getSpamFolderName();
if (K9.FOLDER_NONE.equalsIgnoreCase(folderName))
{
return;
}
onMoveChosenBatch(folderName);
}
private void onCopyBatch() private void onCopyBatch()
{ {
if (mController.isCopyCapable(mAccount) == false) if (mController.isCopyCapable(mAccount) == false)
@ -2942,6 +3067,7 @@ public class MessageList
intent.putExtra(ChooseFolder.EXTRA_SEL_FOLDER, folder.getAccount().getLastSelectedFolderName()); intent.putExtra(ChooseFolder.EXTRA_SEL_FOLDER, folder.getAccount().getLastSelectedFolderName());
startActivityForResult(intent, ACTIVITY_CHOOSE_FOLDER_COPY_BATCH); startActivityForResult(intent, ACTIVITY_CHOOSE_FOLDER_COPY_BATCH);
} }
private void onCopyChosenBatch(String folderName) private void onCopyChosenBatch(String folderName)
{ {
if (mController.isCopyCapable(mAccount) == false) if (mController.isCopyCapable(mAccount) == false)

View File

@ -1,5 +1,19 @@
package com.fsck.k9.activity; package com.fsck.k9.activity;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import org.apache.commons.io.IOUtils;
import android.content.Context; import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.content.res.Configuration; import android.content.res.Configuration;
@ -21,30 +35,46 @@ import android.text.style.StyleSpan;
import android.util.Config; import android.util.Config;
import android.util.Log; import android.util.Log;
import android.util.TypedValue; import android.util.TypedValue;
import android.view.*; import android.view.Gravity;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.Window;
import android.view.animation.AccelerateInterpolator; import android.view.animation.AccelerateInterpolator;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.TranslateAnimation; import android.view.animation.TranslateAnimation;
import android.webkit.*; import android.webkit.WebSettings;
import android.widget.*; import android.webkit.WebView;
import com.fsck.k9.*; import android.widget.Button;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ScrollView;
import android.widget.TextView;
import android.widget.Toast;
import com.fsck.k9.Account;
import com.fsck.k9.FontSizes;
import com.fsck.k9.K9;
import com.fsck.k9.Preferences;
import com.fsck.k9.R;
import com.fsck.k9.controller.MessagingController; import com.fsck.k9.controller.MessagingController;
import com.fsck.k9.controller.MessagingListener; import com.fsck.k9.controller.MessagingListener;
import com.fsck.k9.mail.*; import com.fsck.k9.mail.Address;
import com.fsck.k9.mail.Flag;
import com.fsck.k9.mail.Message;
import com.fsck.k9.mail.Message.RecipientType; import com.fsck.k9.mail.Message.RecipientType;
import com.fsck.k9.mail.MessagingException;
import com.fsck.k9.mail.Multipart;
import com.fsck.k9.mail.Part;
import com.fsck.k9.mail.internet.MimeUtility; import com.fsck.k9.mail.internet.MimeUtility;
import com.fsck.k9.mail.store.LocalStore.LocalAttachmentBodyPart; import com.fsck.k9.mail.store.LocalStore.LocalAttachmentBodyPart;
import com.fsck.k9.mail.store.LocalStore.LocalMessage; import com.fsck.k9.mail.store.LocalStore.LocalMessage;
import com.fsck.k9.mail.store.LocalStore.LocalTextBody; import com.fsck.k9.mail.store.LocalStore.LocalTextBody;
import com.fsck.k9.provider.AttachmentProvider; import com.fsck.k9.provider.AttachmentProvider;
import org.apache.commons.io.IOUtils;
import java.io.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
public class MessageView extends K9Activity implements OnClickListener public class MessageView extends K9Activity implements OnClickListener
{ {
@ -53,7 +83,6 @@ public class MessageView extends K9Activity implements OnClickListener
private static final String EXTRA_NEXT = "com.fsck.k9.MessageView_next"; private static final String EXTRA_NEXT = "com.fsck.k9.MessageView_next";
private static final int ACTIVITY_CHOOSE_FOLDER_MOVE = 1; private static final int ACTIVITY_CHOOSE_FOLDER_MOVE = 1;
private static final int ACTIVITY_CHOOSE_FOLDER_COPY = 2; private static final int ACTIVITY_CHOOSE_FOLDER_COPY = 2;
private TextView mFromView; private TextView mFromView;
@ -76,6 +105,12 @@ public class MessageView extends K9Activity implements OnClickListener
View next_scrolling; View next_scrolling;
View previous; View previous;
View previous_scrolling; View previous_scrolling;
private View mArchive;
private View mMove;
private View mSpam;
private View mArchiveScrolling;
private View mMoveScrolling;
private View mSpamScrolling;
private Account mAccount; private Account mAccount;
private MessageReference mMessageReference; private MessageReference mMessageReference;
@ -174,6 +209,16 @@ public class MessageView extends K9Activity implements OnClickListener
onMove(); onMove();
return true; return true;
} }
case KeyEvent.KEYCODE_S:
{
onSpam();
return true;
}
case KeyEvent.KEYCODE_V:
{
onArchive();
return true;
}
case KeyEvent.KEYCODE_Y: case KeyEvent.KEYCODE_Y:
{ {
onCopy(); onCopy();
@ -650,6 +695,9 @@ public class MessageView extends K9Activity implements OnClickListener
setOnClickListener(R.id.forward); setOnClickListener(R.id.forward);
setOnClickListener(R.id.next); setOnClickListener(R.id.next);
setOnClickListener(R.id.previous); setOnClickListener(R.id.previous);
setOnClickListener(R.id.archive);
setOnClickListener(R.id.move);
setOnClickListener(R.id.spam);
// To show full header // To show full header
setOnClickListener(R.id.header_container); setOnClickListener(R.id.header_container);
@ -660,10 +708,12 @@ public class MessageView extends K9Activity implements OnClickListener
setOnClickListener(R.id.forward_scrolling); setOnClickListener(R.id.forward_scrolling);
setOnClickListener(R.id.next_scrolling); setOnClickListener(R.id.next_scrolling);
setOnClickListener(R.id.previous_scrolling); setOnClickListener(R.id.previous_scrolling);
setOnClickListener(R.id.archive_scrolling);
setOnClickListener(R.id.move_scrolling);
setOnClickListener(R.id.spam_scrolling);
setOnClickListener(R.id.show_pictures); setOnClickListener(R.id.show_pictures);
setTitle(""); setTitle("");
Intent intent = getIntent(); Intent intent = getIntent();
@ -726,12 +776,16 @@ public class MessageView extends K9Activity implements OnClickListener
next = findViewById(R.id.next); next = findViewById(R.id.next);
previous = findViewById(R.id.previous); previous = findViewById(R.id.previous);
setOnClickListener(R.id.next);
setOnClickListener(R.id.previous);
next_scrolling = findViewById(R.id.next_scrolling); next_scrolling = findViewById(R.id.next_scrolling);
previous_scrolling = findViewById(R.id.previous_scrolling); previous_scrolling = findViewById(R.id.previous_scrolling);
mArchive = findViewById(R.id.archive);
mMove = findViewById(R.id.move);
mSpam = findViewById(R.id.spam);
mArchiveScrolling = findViewById(R.id.archive_scrolling);
mMoveScrolling = findViewById(R.id.move_scrolling);
mSpamScrolling = findViewById(R.id.spam_scrolling);
boolean goNext = intent.getBooleanExtra(EXTRA_NEXT, false); boolean goNext = intent.getBooleanExtra(EXTRA_NEXT, false);
if (goNext) if (goNext)
@ -763,6 +817,43 @@ public class MessageView extends K9Activity implements OnClickListener
showButtons(); showButtons();
} }
} }
Account.HideButtons hideMoveButtons = mAccount.getHideMessageViewMoveButtons();
if (Account.HideButtons.ALWAYS == hideMoveButtons)
{
hideMoveButtons();
}
else if (Account.HideButtons.NEVER == hideMoveButtons)
{
showMoveButtons();
}
else // Account.HideButtons.KEYBOARD_AVAIL
{
final Configuration config = this.getResources().getConfiguration();
if (config.hardKeyboardHidden == Configuration.HARDKEYBOARDHIDDEN_NO)
{
hideMoveButtons();
}
else
{
showMoveButtons();
}
}
if (!mAccount.getEnableMoveButtons())
{
View buttons = findViewById(R.id.move_buttons);
if (buttons != null)
{
buttons.setVisibility(View.GONE);
}
buttons = findViewById(R.id.scrolling_move_buttons);
if (buttons != null)
{
buttons.setVisibility(View.GONE);
}
}
displayMessage(mMessageReference); displayMessage(mMessageReference);
} }
@ -787,7 +878,6 @@ public class MessageView extends K9Activity implements OnClickListener
mAttachments.removeAllViews(); mAttachments.removeAllViews();
findSurroundingMessagesUid(); findSurroundingMessagesUid();
boolean enableNext = (mNextMessage != null); boolean enableNext = (mNextMessage != null);
boolean enablePrev = (mPreviousMessage != null); boolean enablePrev = (mPreviousMessage != null);
@ -801,6 +891,33 @@ public class MessageView extends K9Activity implements OnClickListener
if (previous_scrolling != null && (previous_scrolling.isEnabled() != enablePrev)) if (previous_scrolling != null && (previous_scrolling.isEnabled() != enablePrev))
previous_scrolling.setEnabled(enablePrev); previous_scrolling.setEnabled(enablePrev);
// If moving isn't support at all, then all of them must be disabled anyway.
if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false)
{
mArchive.setEnabled(false);
mMove.setEnabled(false);
mSpam.setEnabled(false);
mArchiveScrolling.setEnabled(false);
mMoveScrolling.setEnabled(false);
mSpamScrolling.setEnabled(false);
}
else
{
// Only enable the button if the Archive folder is not the current folder and not NONE.
boolean enableArchive = !mMessageReference.folderName.equals(mAccount.getArchiveFolderName()) &&
!K9.FOLDER_NONE.equalsIgnoreCase(mAccount.getArchiveFolderName());
boolean enableMove = true;
// Only enable the button if the Spam folder is not the current folder and not NONE.
boolean enableSpam = !mMessageReference.folderName.equals(mAccount.getSpamFolderName()) &&
!K9.FOLDER_NONE.equalsIgnoreCase(mAccount.getSpamFolderName());
mArchive.setEnabled(enableArchive);
mMove.setEnabled(enableMove);
mSpam.setEnabled(enableSpam);
mArchiveScrolling.setEnabled(enableArchive);
mMoveScrolling.setEnabled(enableMove);
mSpamScrolling.setEnabled(enableSpam);
}
MessagingController.getInstance(getApplication()).loadMessageForView( MessagingController.getInstance(getApplication()).loadMessageForView(
mAccount, mAccount,
mMessageReference.folderName, mMessageReference.folderName,
@ -830,6 +947,24 @@ public class MessageView extends K9Activity implements OnClickListener
} }
} }
private void showMoveButtons()
{
View buttons = findViewById(R.id.scrolling_move_buttons);
if (buttons != null)
{
buttons.setVisibility(View.GONE);
}
}
private void hideMoveButtons()
{
View buttons = findViewById(R.id.move_buttons);
if (buttons != null)
{
buttons.setVisibility(View.GONE);
}
}
private void setOnClickListener(int viewCode) private void setOnClickListener(int viewCode)
{ {
View thisView = findViewById(viewCode); View thisView = findViewById(viewCode);
@ -878,6 +1013,54 @@ public class MessageView extends K9Activity implements OnClickListener
} }
} }
private void onArchive()
{
if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false)
{
return;
}
if (MessagingController.getInstance(getApplication()).isMoveCapable(mMessage) == false)
{
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show();
return;
}
String srcFolder = mMessageReference.folderName;
String dstFolder = mAccount.getArchiveFolderName();
Message messageToMove = mMessage;
if (K9.FOLDER_NONE.equalsIgnoreCase(dstFolder)) {
return;
}
showNextMessage();
MessagingController.getInstance(getApplication())
.moveMessage(mAccount, srcFolder, messageToMove, dstFolder, null);
}
private void onSpam()
{
if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false)
{
return;
}
if (MessagingController.getInstance(getApplication()).isMoveCapable(mMessage) == false)
{
Toast toast = Toast.makeText(this, R.string.move_copy_cannot_copy_unsynced_message, Toast.LENGTH_LONG);
toast.show();
return;
}
String srcFolder = mMessageReference.folderName;
String dstFolder = mAccount.getSpamFolderName();
Message messageToMove = mMessage;
if (K9.FOLDER_NONE.equalsIgnoreCase(dstFolder)) {
return;
}
showNextMessage();
MessagingController.getInstance(getApplication())
.moveMessage(mAccount, srcFolder, messageToMove, dstFolder, null);
}
private void showNextMessage() private void showNextMessage()
{ {
findSurroundingMessagesUid(); findSurroundingMessagesUid();
@ -904,7 +1087,7 @@ public class MessageView extends K9Activity implements OnClickListener
finish(); finish();
} }
} }
private void onClickSender() private void onClickSender()
{ {
if (mMessage != null) if (mMessage != null)
@ -1275,6 +1458,18 @@ public class MessageView extends K9Activity implements OnClickListener
case R.id.forward_scrolling: case R.id.forward_scrolling:
onForward(); onForward();
break; break;
case R.id.archive:
case R.id.archive_scrolling:
onArchive();
break;
case R.id.spam:
case R.id.spam_scrolling:
onSpam();
break;
case R.id.move:
case R.id.move_scrolling:
onMove();
break;
case R.id.next: case R.id.next:
case R.id.next_scrolling: case R.id.next_scrolling:
onNext(K9.isAnimations()); onNext(K9.isAnimations());
@ -1324,6 +1519,12 @@ public class MessageView extends K9Activity implements OnClickListener
case R.id.flag: case R.id.flag:
onFlag(); onFlag();
break; break;
case R.id.archive:
onArchive();
break;
case R.id.spam:
onSpam();
break;
case R.id.move: case R.id.move:
onMove(); onMove();
break; break;
@ -1353,6 +1554,16 @@ public class MessageView extends K9Activity implements OnClickListener
if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false) if (MessagingController.getInstance(getApplication()).isMoveCapable(mAccount) == false)
{ {
menu.findItem(R.id.move).setVisible(false); menu.findItem(R.id.move).setVisible(false);
menu.findItem(R.id.archive).setVisible(false);
menu.findItem(R.id.spam).setVisible(false);
}
if (K9.FOLDER_NONE.equalsIgnoreCase(mAccount.getArchiveFolderName()))
{
menu.findItem(R.id.archive).setVisible(false);
}
if (K9.FOLDER_NONE.equalsIgnoreCase(mAccount.getSpamFolderName()))
{
menu.findItem(R.id.spam).setVisible(false);
} }
return true; return true;
} }

View File

@ -34,6 +34,8 @@ public class AccountSettings extends K9PreferenceActivity
private static final String PREFERENCE_DISPLAY_COUNT = "account_display_count"; private static final String PREFERENCE_DISPLAY_COUNT = "account_display_count";
private static final String PREFERENCE_DEFAULT = "account_default"; private static final String PREFERENCE_DEFAULT = "account_default";
private static final String PREFERENCE_HIDE_BUTTONS = "hide_buttons_enum"; private static final String PREFERENCE_HIDE_BUTTONS = "hide_buttons_enum";
private static final String PREFERENCE_HIDE_MOVE_BUTTONS = "hide_move_buttons_enum";
private static final String PREFERENCE_ENABLE_MOVE_BUTTONS = "enable_move_buttons";
private static final String PREFERENCE_NOTIFY = "account_notify"; private static final String PREFERENCE_NOTIFY = "account_notify";
private static final String PREFERENCE_NOTIFY_SELF = "account_notify_self"; private static final String PREFERENCE_NOTIFY_SELF = "account_notify_self";
private static final String PREFERENCE_NOTIFY_SYNC = "account_notify_sync"; private static final String PREFERENCE_NOTIFY_SYNC = "account_notify_sync";
@ -69,6 +71,8 @@ public class AccountSettings extends K9PreferenceActivity
private CheckBoxPreference mAccountNotify; private CheckBoxPreference mAccountNotify;
private CheckBoxPreference mAccountNotifySelf; private CheckBoxPreference mAccountNotifySelf;
private ListPreference mAccountHideButtons; private ListPreference mAccountHideButtons;
private ListPreference mAccountHideMoveButtons;
private CheckBoxPreference mAccountEnableMoveButtons;
private CheckBoxPreference mAccountNotifySync; private CheckBoxPreference mAccountNotifySync;
private CheckBoxPreference mAccountVibrate; private CheckBoxPreference mAccountVibrate;
private ListPreference mAccountVibratePattern; private ListPreference mAccountVibratePattern;
@ -293,7 +297,7 @@ public class AccountSettings extends K9PreferenceActivity
return false; return false;
} }
}); });
mMessageAge = (ListPreference) findPreference(PREFERENCE_MESSAGE_AGE); mMessageAge = (ListPreference) findPreference(PREFERENCE_MESSAGE_AGE);
mMessageAge.setValue(String.valueOf(mAccount.getMaximumPolledMessageAge())); mMessageAge.setValue(String.valueOf(mAccount.getMaximumPolledMessageAge()));
mMessageAge.setSummary(mMessageAge.getEntry()); mMessageAge.setSummary(mMessageAge.getEntry());
@ -329,6 +333,24 @@ public class AccountSettings extends K9PreferenceActivity
} }
}); });
mAccountEnableMoveButtons = (CheckBoxPreference) findPreference(PREFERENCE_ENABLE_MOVE_BUTTONS);
mAccountEnableMoveButtons.setChecked(mAccount.getEnableMoveButtons());
mAccountHideMoveButtons = (ListPreference) findPreference(PREFERENCE_HIDE_MOVE_BUTTONS);
mAccountHideMoveButtons.setValue("" + mAccount.getHideMessageViewMoveButtons());
mAccountHideMoveButtons.setSummary(mAccountHideMoveButtons.getEntry());
mAccountHideMoveButtons.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener()
{
public boolean onPreferenceChange(Preference preference, Object newValue)
{
final String summary = newValue.toString();
int index = mAccountHideMoveButtons.findIndexOfValue(summary);
mAccountHideMoveButtons.setSummary(mAccountHideMoveButtons.getEntries()[index]);
mAccountHideMoveButtons.setValue(summary);
return false;
}
});
mAccountNotify = (CheckBoxPreference) findPreference(PREFERENCE_NOTIFY); mAccountNotify = (CheckBoxPreference) findPreference(PREFERENCE_NOTIFY);
mAccountNotify.setChecked(mAccount.isNotifyNewMail()); mAccountNotify.setChecked(mAccount.isNotifyNewMail());
@ -528,6 +550,8 @@ public class AccountSettings extends K9PreferenceActivity
} }
mAccount.setHideMessageViewButtons(Account.HideButtons.valueOf(mAccountHideButtons.getValue())); mAccount.setHideMessageViewButtons(Account.HideButtons.valueOf(mAccountHideButtons.getValue()));
mAccount.setHideMessageViewMoveButtons(Account.HideButtons.valueOf(mAccountHideMoveButtons.getValue()));
mAccount.setEnableMoveButtons(mAccountEnableMoveButtons.isChecked());
mAccount.setAutoExpandFolderName(reverseTranslateFolder(mAutoExpandFolder.getSummary().toString())); mAccount.setAutoExpandFolderName(reverseTranslateFolder(mAutoExpandFolder.getSummary().toString()));
mAccount.save(Preferences.getPreferences(this)); mAccount.save(Preferences.getPreferences(this));
if (needsRefresh && needsPushRestart) if (needsRefresh && needsPushRestart)