diff options
author | nebkat <nebkat@gmail.com> | 2011-12-24 09:35:05 +0000 |
---|---|---|
committer | Ricardo Cerqueira <cyanogenmod@cerqueira.org> | 2012-08-06 18:07:14 +0100 |
commit | a5e0b87b47e403268ae71add4963938aeae5c023 (patch) | |
tree | 1ba2ff855e6757c22a17c446bc69ca6e80856c03 /src | |
parent | b79df3fec52c449a77e74d43b6cfcc1823692b03 (diff) | |
download | packages_apps_trebuchet-a5e0b87b47e403268ae71add4963938aeae5c023.zip packages_apps_trebuchet-a5e0b87b47e403268ae71add4963938aeae5c023.tar.gz packages_apps_trebuchet-a5e0b87b47e403268ae71add4963938aeae5c023.tar.bz2 |
Tweak Menu
- Move "System settings" to the bottom of the menu - Request from Pawit Pornkitprasan
- Change "Preferences" to "Trebuchet settings" - Request from Tanguy Pruvot
- Hide Preferences if using CyanogenMod (with the settings shortcut) - Request from Steve Kondik
Change-Id: I0738fb0feb04d601b93e28088b771283c35b6684
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Launcher.java | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/com/cyanogenmod/trebuchet/Launcher.java b/src/com/cyanogenmod/trebuchet/Launcher.java index c447540..c3b2c20 100644 --- a/src/com/cyanogenmod/trebuchet/Launcher.java +++ b/src/com/cyanogenmod/trebuchet/Launcher.java @@ -128,9 +128,9 @@ public final class Launcher extends Activity private static final int MENU_GROUP_WALLPAPER = 1; private static final int MENU_WALLPAPER_SETTINGS = Menu.FIRST + 1; private static final int MENU_MANAGE_APPS = MENU_WALLPAPER_SETTINGS + 1; - private static final int MENU_SYSTEM_SETTINGS = MENU_MANAGE_APPS + 1; - private static final int MENU_PREFERENCES = MENU_SYSTEM_SETTINGS + 1; - private static final int MENU_HELP = MENU_PREFERENCES + 1; + private static final int MENU_PREFERENCES = MENU_MANAGE_APPS + 1; + private static final int MENU_SYSTEM_SETTINGS = MENU_PREFERENCES + 1; + private static final int MENU_HELP = MENU_SYSTEM_SETTINGS + 1; private static final int REQUEST_CREATE_SHORTCUT = 1; private static final int REQUEST_CREATE_APPWIDGET = 5; @@ -1518,12 +1518,12 @@ public final class Launcher extends Activity Intent manageApps = new Intent(Settings.ACTION_MANAGE_ALL_APPLICATIONS_SETTINGS); manageApps.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); - Intent settings = new Intent(android.provider.Settings.ACTION_SETTINGS); - settings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK - | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); Intent preferences = new Intent().setClass(this, Preferences.class); preferences.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS); + Intent settings = new Intent(android.provider.Settings.ACTION_SETTINGS); + settings.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK + | Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED); String helpUrl = getString(R.string.help_url); Intent help = new Intent(Intent.ACTION_VIEW, Uri.parse(helpUrl)); help.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK @@ -1536,14 +1536,16 @@ public final class Launcher extends Activity .setIcon(android.R.drawable.ic_menu_manage) .setIntent(manageApps) .setAlphabeticShortcut('M'); + if (!getResources().getBoolean(R.bool.config_cyanogenmod)) { + menu.add(0, MENU_PREFERENCES, 0, R.string.menu_preferences) + .setIcon(android.R.drawable.ic_menu_preferences) + .setIntent(preferences) + .setAlphabeticShortcut('O'); + } menu.add(0, MENU_SYSTEM_SETTINGS, 0, R.string.menu_settings) .setIcon(android.R.drawable.ic_menu_preferences) .setIntent(settings) .setAlphabeticShortcut('P'); - menu.add(0, MENU_PREFERENCES, 0, R.string.menu_preferences) - .setIcon(android.R.drawable.ic_menu_preferences) - .setIntent(preferences) - .setAlphabeticShortcut('O'); if (!helpUrl.isEmpty()) { menu.add(0, MENU_HELP, 0, R.string.menu_help) .setIcon(android.R.drawable.ic_menu_help) |