mirror of
https://github.com/jamessanford/kegs.git
synced 2024-06-08 06:29:29 +00:00
Power Off action.
This commit is contained in:
parent
991fdba07a
commit
95155b2f04
|
@ -17,13 +17,17 @@
|
|||
android:showAsAction="ifRoom"
|
||||
android:title="@string/emulation_speed" />
|
||||
|
||||
<item android:id="@+id/action_more_keys"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/more_keys" />
|
||||
|
||||
<item android:id="@+id/action_diskimage"
|
||||
android:icon="@drawable/ic_menu_save"
|
||||
android:showAsAction="ifRoom"
|
||||
android:title="@string/diskimage" />
|
||||
|
||||
<item android:id="@+id/action_more_keys"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/more_keys" />
|
||||
|
||||
<item android:id="@+id/action_power_off"
|
||||
android:showAsAction="never"
|
||||
android:title="@string/power_off" />
|
||||
|
||||
</menu>
|
||||
|
|
|
@ -334,7 +334,6 @@ public class KegsMain extends Activity implements KegsKeyboard.StickyReset, Asse
|
|||
return true;
|
||||
}
|
||||
|
||||
// TODO: FIXME: Seriously in progress.
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
// Action bar was clicked.
|
||||
|
@ -361,6 +360,9 @@ public class KegsMain extends Activity implements KegsKeyboard.StickyReset, Asse
|
|||
findViewById(R.id.b2).setVisibility(vis);
|
||||
findViewById(R.id.b3).setVisibility(vis);
|
||||
return true;
|
||||
} else if (item_id == R.id.action_power_off) {
|
||||
getThread().doPowerOff();
|
||||
finish();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user