[main_menu
strick**20120316093721
 Ignore-this: 71c3f49fc98356cd5eb4119a6f514a6a
] adddir ./terse-a1/res/menu
addfile ./terse-a1/res/menu/main_menu.xml
hunk ./terse-a1/gen/terse/a1/R.java 16
+    public static final class id {
+        public static final int fail_menu=0x7f080002;
+        public static final int forget_menu=0x7f080003;
+        public static final int help_menu=0x7f080001;
+        public static final int home_menu=0x7f080000;
+    }
hunk ./terse-a1/gen/terse/a1/R.java 26
+    public static final class menu {
+        public static final int main_menu=0x7f070000;
+    }
hunk ./terse-a1/gen/terse/a1/R.java 34
+        public static final int fail=0x7f050004;
+        public static final int forget=0x7f050005;
hunk ./terse-a1/gen/terse/a1/R.java 37
+        public static final int help=0x7f050003;
+        public static final int home=0x7f050002;
hunk ./terse-a1/res/menu/main_menu.xml 1
+<?xml version="1.0" encoding="utf-8"?>
+<menu xmlns:android="http://schemas.android.com/apk/res/android">
+    <item android:id="@+id/home_menu"
+          android:title="@string/home" />
+    <item android:id="@+id/help_menu"
+          android:title="@string/help" />
+    <item android:id="@+id/fail_menu"
+          android:title="@string/fail" />
+    <item android:id="@+id/forget_menu"
+          android:title="@string/forget" />
+</menu>
hunk ./terse-a1/res/values/strings.xml 6
+    <string name="home">HOME</string>
+    <string name="help">HELP</string>
+    <string name="fail">FAIL</string>
+    <string name="forget">FORGET CHANGES</string>
hunk ./terse-a1/src/terse/a1/TerseActivity.java 43
+import android.view.MenuInflater;
+import android.view.MenuItem;
hunk ./terse-a1/src/terse/a1/TerseActivity.java 90
+
hunk ./terse-a1/src/terse/a1/TerseActivity.java 500
-	// From the Note Pad example.
-	/**
-	 * Called when the user clicks the device's Menu button the first time for
-	 * this Activity. Android passes in a Menu object that is populated with
-	 * items.
-	 * 
-	 * Sets up a menu that provides the Insert option plus a list of alternative
-	 * actions for this Activity. Other applications that want to handle notes
-	 * can "register" themselves in Android by providing an intent filter that
-	 * includes the category ALTERNATIVE and the mimeTYpe
-	 * NotePad.Notes.CONTENT_TYPE. If they do this, the code in
-	 * onCreateOptionsMenu() will add the Activity that contains the intent
-	 * filter to its list of options. In effect, the menu will offer the user
-	 * other applications that can handle notes.
-	 * 
-	 * @param menu
-	 *            A Menu object, to which menu items should be added.
-	 * @return True, always. The menu should be displayed.
-	 */
hunk ./terse-a1/src/terse/a1/TerseActivity.java 502
-		// // Inflate menu from XML resource
-		// MenuInflater inflater = getMenuInflater();
-		// inflater.inflate(R.menu.list_options_menu, menu);
-		//
-		// // Generate any additional actions that can be performed on the
-		// // overall list. In a normal install, there are no additional
-		// // actions found here, but this allows other applications to extend
-		// // our menu with their own actions.
-		// Intent intent = new Intent(null, getIntent().getData());
-		// intent.addCategory(Intent.CATEGORY_ALTERNATIVE);
-		// menu.addIntentOptions(Menu.CATEGORY_ALTERNATIVE, 0, 0,
-		// new ComponentName(this, NotesList.class), null, intent, 0, null);
-
-		return super.onCreateOptionsMenu(menu);
+		MenuInflater inflater = getMenuInflater();
+		inflater.inflate(R.menu.main_menu, menu);
+		return true;
hunk ./terse-a1/src/terse/a1/TerseActivity.java 508
-	public boolean onPrepareOptionsMenu(Menu menu) {
-		return super.onPrepareOptionsMenu(menu);
+	public boolean onOptionsItemSelected(MenuItem item) {
+		// Handle item selection
+		switch (item.getItemId()) {
+		case R.id.home_menu:
+			startTerseActivity("/", "");
+			return true;
+		case R.id.help_menu:
+			startTerseActivity("/Help", "");
+			return true;
+		case R.id.fail_menu:
+			"user-requested fail".charAt(666);
+			throw new Error("UserRequestedFailureError");
+		case R.id.forget_menu:
+			try {
+				FileOutputStream fos = terp.openFileWrite("aaa.txt");
+				fos.close();
+			} catch (FileNotFoundException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			} catch (IOException e) {
+				// TODO Auto-generated catch block
+				e.printStackTrace();
+			}
+			resetTerp();
+			startTerseActivity("/", "");
+			return true;
+		default:
+			return super.onOptionsItemSelected(item);
+		}
hunk ./terse-a1/src/terse/a1/TerseActivity.java 539
+	// @Override
+	// public boolean onPrepareOptionsMenu(Menu menu) {
+	// return super.onPrepareOptionsMenu(menu);
+	// }
+