mirror of
https://github.com/moparisthebest/k-9
synced 2024-11-27 19:52:17 -05:00
Merge branch 'wrap_folder_name_2' into folder_search
Conflicts: src/com/fsck/k9/activity/FolderList.java
This commit is contained in:
commit
512d67a10e
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="fill_parent"
|
android:layout_height="wrap_content"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
@ -33,8 +33,6 @@
|
|||||||
android:id="@+id/folder_name"
|
android:id="@+id/folder_name"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:singleLine="true"
|
|
||||||
android:ellipsize="start"
|
|
||||||
android:textColor="?android:attr/textColorPrimary"
|
android:textColor="?android:attr/textColorPrimary"
|
||||||
android:textAppearance="?android:attr/textAppearanceLarge" />
|
android:textAppearance="?android:attr/textAppearanceLarge" />
|
||||||
|
|
||||||
|
@ -322,6 +322,8 @@ Please submit bug reports, contribute new features and ask questions at
|
|||||||
<string name="global_settings_registered_name_color_label">Colorize contacts</string>
|
<string name="global_settings_registered_name_color_label">Colorize contacts</string>
|
||||||
<string name="global_settings_registered_name_color_default">Don\'t colorize names in your contact list</string>
|
<string name="global_settings_registered_name_color_default">Don\'t colorize names in your contact list</string>
|
||||||
<string name="global_settings_registered_name_color_changed">Colorize names in your contact list</string>
|
<string name="global_settings_registered_name_color_changed">Colorize names in your contact list</string>
|
||||||
|
<string name="global_settings_folderlist_wrap_folder_names_label">Wrap folder names</string>
|
||||||
|
<string name="global_settings_folderlist_wrap_folder_names_summary">Show complete folder name wrapped on multiple lines rather than a partial name on a single line</string>
|
||||||
|
|
||||||
<string name="global_settings_messageview_fixedwidth_label">Fixed-width fonts</string>
|
<string name="global_settings_messageview_fixedwidth_label">Fixed-width fonts</string>
|
||||||
<string name="global_settings_messageview_fixedwidth_summary">Use a fixed-width font when showing plain-text messages</string>
|
<string name="global_settings_messageview_fixedwidth_summary">Use a fixed-width font when showing plain-text messages</string>
|
||||||
@ -812,6 +814,7 @@ Please submit bug reports, contribute new features and ask questions at
|
|||||||
<string name="accountlist_preferences">Account list</string>
|
<string name="accountlist_preferences">Account list</string>
|
||||||
<string name="messagelist_preferences">Message lists</string>
|
<string name="messagelist_preferences">Message lists</string>
|
||||||
<string name="messageview_preferences">Messages</string>
|
<string name="messageview_preferences">Messages</string>
|
||||||
|
<string name="folderlist_preferences">Folder lists</string>
|
||||||
<string name="settings_theme_label">Theme</string>
|
<string name="settings_theme_label">Theme</string>
|
||||||
<string name="settings_language_label">Language</string>
|
<string name="settings_language_label">Language</string>
|
||||||
|
|
||||||
|
@ -176,6 +176,18 @@
|
|||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
<PreferenceCategory
|
||||||
|
android:key="folderlist_preferences"
|
||||||
|
android:title="@string/folderlist_preferences">
|
||||||
|
|
||||||
|
<CheckBoxPreference
|
||||||
|
android:persistent="false"
|
||||||
|
android:key="folderlist_wrap_folder_name"
|
||||||
|
android:title="@string/global_settings_folderlist_wrap_folder_names_label"
|
||||||
|
android:summary="@string/global_settings_folderlist_wrap_folder_names_summary" />
|
||||||
|
|
||||||
|
</PreferenceCategory>
|
||||||
|
|
||||||
</PreferenceScreen>
|
</PreferenceScreen>
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
|
@ -136,7 +136,7 @@ public class FontSizes {
|
|||||||
accountName = MEDIUM;
|
accountName = MEDIUM;
|
||||||
accountDescription = SMALL;
|
accountDescription = SMALL;
|
||||||
|
|
||||||
folderName = LARGE;
|
folderName = FONT_16SP;
|
||||||
folderStatus = SMALL;
|
folderStatus = SMALL;
|
||||||
|
|
||||||
messageListSubject = FONT_16SP;
|
messageListSubject = FONT_16SP;
|
||||||
|
@ -234,6 +234,7 @@ public class K9 extends Application {
|
|||||||
private static String mQuietTimeStarts = null;
|
private static String mQuietTimeStarts = null;
|
||||||
private static String mQuietTimeEnds = null;
|
private static String mQuietTimeEnds = null;
|
||||||
private static String mAttachmentDefaultPath = "";
|
private static String mAttachmentDefaultPath = "";
|
||||||
|
private static boolean mWrapFolderNames = false;
|
||||||
|
|
||||||
private static boolean mBatchButtonsMarkRead = true;
|
private static boolean mBatchButtonsMarkRead = true;
|
||||||
private static boolean mBatchButtonsDelete = true;
|
private static boolean mBatchButtonsDelete = true;
|
||||||
@ -499,6 +500,7 @@ public class K9 extends Application {
|
|||||||
editor.putBoolean("messageViewFixedWidthFont", mMessageViewFixedWidthFont);
|
editor.putBoolean("messageViewFixedWidthFont", mMessageViewFixedWidthFont);
|
||||||
editor.putBoolean("messageViewReturnToList", mMessageViewReturnToList);
|
editor.putBoolean("messageViewReturnToList", mMessageViewReturnToList);
|
||||||
editor.putBoolean("messageViewShowNext", mMessageViewShowNext);
|
editor.putBoolean("messageViewShowNext", mMessageViewShowNext);
|
||||||
|
editor.putBoolean("wrapFolderNames", mWrapFolderNames);
|
||||||
|
|
||||||
editor.putBoolean("batchButtonsMarkRead", mBatchButtonsMarkRead);
|
editor.putBoolean("batchButtonsMarkRead", mBatchButtonsMarkRead);
|
||||||
editor.putBoolean("batchButtonsDelete", mBatchButtonsDelete);
|
editor.putBoolean("batchButtonsDelete", mBatchButtonsDelete);
|
||||||
@ -692,6 +694,7 @@ public class K9 extends Application {
|
|||||||
mMessageViewFixedWidthFont = sprefs.getBoolean("messageViewFixedWidthFont", false);
|
mMessageViewFixedWidthFont = sprefs.getBoolean("messageViewFixedWidthFont", false);
|
||||||
mMessageViewReturnToList = sprefs.getBoolean("messageViewReturnToList", false);
|
mMessageViewReturnToList = sprefs.getBoolean("messageViewReturnToList", false);
|
||||||
mMessageViewShowNext = sprefs.getBoolean("messageViewShowNext", false);
|
mMessageViewShowNext = sprefs.getBoolean("messageViewShowNext", false);
|
||||||
|
mWrapFolderNames = sprefs.getBoolean("wrapFolderNames", false);
|
||||||
|
|
||||||
mBatchButtonsMarkRead = sprefs.getBoolean("batchButtonsMarkRead", true);
|
mBatchButtonsMarkRead = sprefs.getBoolean("batchButtonsMarkRead", true);
|
||||||
mBatchButtonsDelete = sprefs.getBoolean("batchButtonsDelete", true);
|
mBatchButtonsDelete = sprefs.getBoolean("batchButtonsDelete", true);
|
||||||
@ -1212,6 +1215,13 @@ public class K9 extends Application {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean wrapFolderNames() {
|
||||||
|
return mWrapFolderNames;
|
||||||
|
}
|
||||||
|
public static void setWrapFolderNames(final boolean state) {
|
||||||
|
mWrapFolderNames = state;
|
||||||
|
}
|
||||||
|
|
||||||
public static String getAttachmentDefaultPath() {
|
public static String getAttachmentDefaultPath() {
|
||||||
return mAttachmentDefaultPath;
|
return mAttachmentDefaultPath;
|
||||||
}
|
}
|
||||||
|
@ -12,6 +12,7 @@ import android.net.Uri;
|
|||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.PowerManager;
|
import android.os.PowerManager;
|
||||||
|
import android.text.TextUtils.TruncateAt;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.util.TypedValue;
|
import android.util.TypedValue;
|
||||||
import android.view.ContextMenu;
|
import android.view.ContextMenu;
|
||||||
@ -1084,6 +1085,14 @@ public class FolderList extends K9ListActivity implements OnNavigationListener {
|
|||||||
holder.chip.setBackgroundDrawable(mAccount.generateColorChip((folder.unreadMessageCount == 0 ? true : false ), false, false, false,false).drawable());
|
holder.chip.setBackgroundDrawable(mAccount.generateColorChip((folder.unreadMessageCount == 0 ? true : false ), false, false, false,false).drawable());
|
||||||
|
|
||||||
holder.folderName.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getFolderName());
|
holder.folderName.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getFolderName());
|
||||||
|
if (K9.wrapFolderNames()) {
|
||||||
|
holder.folderName.setEllipsize(null);
|
||||||
|
holder.folderName.setSingleLine(false);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
holder.folderName.setEllipsize(TruncateAt.START);
|
||||||
|
holder.folderName.setSingleLine(true);
|
||||||
|
}
|
||||||
holder.folderStatus.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getFolderStatus());
|
holder.folderStatus.setTextSize(TypedValue.COMPLEX_UNIT_SP, mFontSizes.getFolderStatus());
|
||||||
|
|
||||||
|
|
||||||
|
@ -92,6 +92,7 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
private static final String PREFERENCE_ATTACHMENT_DEF_PATH = "attachment_default_path";
|
private static final String PREFERENCE_ATTACHMENT_DEF_PATH = "attachment_default_path";
|
||||||
private static final String PREFERENCE_BACKGROUND_AS_UNREAD_INDICATOR = "messagelist_background_as_unread_indicator";
|
private static final String PREFERENCE_BACKGROUND_AS_UNREAD_INDICATOR = "messagelist_background_as_unread_indicator";
|
||||||
private static final String PREFERENCE_THREADED_VIEW = "threaded_view";
|
private static final String PREFERENCE_THREADED_VIEW = "threaded_view";
|
||||||
|
private static final String PREFERENCE_FOLDERLIST_WRAP_NAME = "folderlist_wrap_folder_name";
|
||||||
|
|
||||||
private static final int ACTIVITY_CHOOSE_FOLDER = 1;
|
private static final int ACTIVITY_CHOOSE_FOLDER = 1;
|
||||||
|
|
||||||
@ -122,6 +123,7 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
private CheckBoxPreference mUseGalleryBugWorkaround;
|
private CheckBoxPreference mUseGalleryBugWorkaround;
|
||||||
private CheckBoxPreference mDebugLogging;
|
private CheckBoxPreference mDebugLogging;
|
||||||
private CheckBoxPreference mSensitiveLogging;
|
private CheckBoxPreference mSensitiveLogging;
|
||||||
|
private CheckBoxPreference mWrapFolderNames;
|
||||||
|
|
||||||
private CheckBoxPreference mQuietTimeEnabled;
|
private CheckBoxPreference mQuietTimeEnabled;
|
||||||
private com.fsck.k9.preferences.TimePickerPreference mQuietTimeStarts;
|
private com.fsck.k9.preferences.TimePickerPreference mQuietTimeStarts;
|
||||||
@ -395,6 +397,9 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mWrapFolderNames = (CheckBoxPreference)findPreference(PREFERENCE_FOLDERLIST_WRAP_NAME);
|
||||||
|
mWrapFolderNames.setChecked(K9.wrapFolderNames());
|
||||||
|
|
||||||
mBatchButtonsMarkRead = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_MARK_READ);
|
mBatchButtonsMarkRead = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_MARK_READ);
|
||||||
mBatchButtonsDelete = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_DELETE);
|
mBatchButtonsDelete = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_DELETE);
|
||||||
mBatchButtonsArchive = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_ARCHIVE);
|
mBatchButtonsArchive = (CheckBoxPreference)findPreference(PREFERENCE_BATCH_BUTTONS_ARCHIVE);
|
||||||
@ -468,6 +473,7 @@ public class Prefs extends K9PreferenceActivity {
|
|||||||
|
|
||||||
K9.setQuietTimeStarts(mQuietTimeStarts.getTime());
|
K9.setQuietTimeStarts(mQuietTimeStarts.getTime());
|
||||||
K9.setQuietTimeEnds(mQuietTimeEnds.getTime());
|
K9.setQuietTimeEnds(mQuietTimeEnds.getTime());
|
||||||
|
K9.setWrapFolderNames(mWrapFolderNames.isChecked());
|
||||||
|
|
||||||
if (mNotificationQuickDelete != null) {
|
if (mNotificationQuickDelete != null) {
|
||||||
K9.setNotificationQuickDeleteBehaviour(
|
K9.setNotificationQuickDeleteBehaviour(
|
||||||
|
@ -197,6 +197,9 @@ public class GlobalSettings {
|
|||||||
s.put("useVolumeKeysForNavigation", Settings.versions(
|
s.put("useVolumeKeysForNavigation", Settings.versions(
|
||||||
new V(1, new BooleanSetting(false))
|
new V(1, new BooleanSetting(false))
|
||||||
));
|
));
|
||||||
|
s.put("wrapFolderNames", Settings.versions(
|
||||||
|
new V(22, new BooleanSetting(false))
|
||||||
|
));
|
||||||
s.put("batchButtonsMarkRead", Settings.versions(
|
s.put("batchButtonsMarkRead", Settings.versions(
|
||||||
new V(8, new BooleanSetting(true))
|
new V(8, new BooleanSetting(true))
|
||||||
));
|
));
|
||||||
|
@ -35,7 +35,7 @@ public class Settings {
|
|||||||
*
|
*
|
||||||
* @see SettingsExporter
|
* @see SettingsExporter
|
||||||
*/
|
*/
|
||||||
public static final int VERSION = 21;
|
public static final int VERSION = 22;
|
||||||
|
|
||||||
public static Map<String, Object> validate(int version, Map<String,
|
public static Map<String, Object> validate(int version, Map<String,
|
||||||
TreeMap<Integer, SettingsDescription>> settings,
|
TreeMap<Integer, SettingsDescription>> settings,
|
||||||
|
Loading…
Reference in New Issue
Block a user