diff options
author | daneren2005 <daneren2005@gmail.com> | 2014-06-12 17:03:58 -0700 |
---|---|---|
committer | daneren2005 <daneren2005@gmail.com> | 2014-06-12 17:03:58 -0700 |
commit | 77001c332c4f1a903c3efcd48e397469366ce79f (patch) | |
tree | d02f709a41dbf6905e2f0e5fb66058b01721f5f7 /src/github | |
parent | 06bd6db036a85071a1dd8c2b2942eb601350f5ce (diff) | |
download | dsub-77001c332c4f1a903c3efcd48e397469366ce79f.tar.gz dsub-77001c332c4f1a903c3efcd48e397469366ce79f.tar.bz2 dsub-77001c332c4f1a903c3efcd48e397469366ce79f.zip |
Use better descriptions for user settings
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/view/SettingView.java | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/src/github/daneren2005/dsub/view/SettingView.java b/src/github/daneren2005/dsub/view/SettingView.java index f2669551..8f265f0f 100644 --- a/src/github/daneren2005/dsub/view/SettingView.java +++ b/src/github/daneren2005/dsub/view/SettingView.java @@ -38,15 +38,44 @@ public class SettingView extends UpdateView { protected void setObjectImpl(Object obj, Object editable) {
this.setting = (Setting) obj;
- String display = setting.getName();
// Can't edit non-role parts
- if(display.indexOf("Role") == -1) {
+ String name = setting.getName();
+ if(name.indexOf("Role") == -1) {
editable = false;
}
- display = display.replace("Role", "");
- display = Character.toUpperCase(display.charAt(0)) + display.substring(1);
+
+ int res = -1;
+ if(User.SCROBBLING.equals(name)) {
+ res = R.string.scrobblingEnabled;
+ } else if(User.ADMIN.equals(name)) {
+ res = R.string.admin_role_admin;
+ } else if(User.SETTINGS.equals(name)) {
+ res = R.string.admin_role_settings;
+ } else if(User.DOWNLOAD.equals(name)) {
+ res = R.string.admin_role_download;
+ } else if(User.UPLOAD.equals(name)) {
+ res = R.string.admin_role_upload;
+ } else if(User.COVERART.equals(name)) {
+ res = R.string.admin_role_coverArt;
+ } else if(User.COMMENT.equals(name)) {
+ res = R.string.admin_role_comment;
+ } else if(User.PODCAST.equals(name)) {
+ res = R.string.admin_role_podcast;
+ } else if(User.STREAM.equals(name)) {
+ res = R.string.admin_role_stream;
+ } else if(User.JUKEBOX.equals(name)) {
+ res = R.string.admin_role_jukebox;
+ } else if(User.SHARE.equals(name)) {
+ res = R.string.admin_role_share;
+ } else {
+ // Last resort to display the raw value
+ view.setText(name;
+ }
+
+ if(res != -1) {
+ view.setText(res);
+ }
- view.setText(display);
if(setting.getValue()) {
view.setChecked(setting.getValue());
} else {
|