mirror of
https://github.com/moparisthebest/Yaaic
synced 2025-01-08 12:18:07 -05:00
ServersActivity: Remove "Exit" from menu and replace by "Disconnect all".
This commit is contained in:
parent
8ecb697f28
commit
309c730b33
@ -35,7 +35,7 @@ along with Yaaic. If not, see <http://www.gnu.org/licenses/>.
|
||||
android:title="@string/about_menu"
|
||||
android:icon="@android:drawable/ic_menu_help" />
|
||||
<item
|
||||
android:id="@+id/exit"
|
||||
android:title="@string/exit_menu"
|
||||
android:id="@+id/disconnect_all"
|
||||
android:title="@string/disconnect_menu"
|
||||
android:icon="@android:drawable/ic_menu_close_clear_cancel" />
|
||||
</menu>
|
@ -5,7 +5,7 @@
|
||||
|
||||
<string name="settings_menu">Settings</string>
|
||||
<string name="about_menu">About</string>
|
||||
<string name="exit_menu">Exit</string>
|
||||
<string name="disconnect_menu">Disconnect all</string>
|
||||
|
||||
<string name="about_label">About</string>
|
||||
<string name="settings_label">Settings</string>
|
||||
|
@ -289,7 +289,7 @@ public class ServersActivity extends SherlockActivity implements ServiceConnecti
|
||||
case R.id.settings:
|
||||
startActivity(new Intent(this, SettingsActivity.class));
|
||||
break;
|
||||
case R.id.exit:
|
||||
case R.id.disconnect_all:
|
||||
ArrayList<Server> mServers = Yaaic.getInstance().getServersAsArrayList();
|
||||
for (Server server : mServers) {
|
||||
if (binder.getService().hasConnection(server.getId())) {
|
||||
@ -300,7 +300,6 @@ public class ServersActivity extends SherlockActivity implements ServiceConnecti
|
||||
}
|
||||
// ugly
|
||||
binder.getService().stopForegroundCompat(R.string.app_name);
|
||||
finish();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user