Skip to content

Commit 252d879

Browse files
author
Robbie Matthews
committed
Added Find/Replace to editor Menu... not all devices have physical "Search" buttons... :")
1 parent 6c3c487 commit 252d879

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

android/ScriptingLayerForAndroid/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<manifest
33
xmlns:android="http://schemas.android.com/apk/res/android"
44
package="com.googlecode.android_scripting"
5-
android:installLocation="auto" android:versionCode="404" android:versionName="5x04">
5+
android:installLocation="auto" android:versionCode="405" android:versionName="5x05">
66
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
77
<uses-permission android:name="net.dinglisch.android.tasker.PERMISSION_RUN_TASKS"></uses-permission>
88
<application

android/ScriptingLayerForAndroid/src/com/googlecode/android_scripting/activity/ScriptEditor.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public class ScriptEditor extends Activity implements OnClickListener {
9292
private CheckBox mSearchStart;
9393

9494
private static enum MenuId {
95-
SAVE, SAVE_AND_RUN, PREFERENCES, API_BROWSER, HELP, SHARE, GOTO;
95+
SAVE, SAVE_AND_RUN, PREFERENCES, API_BROWSER, HELP, SHARE, GOTO, SEARCH;
9696
public int getId() {
9797
return ordinal() + Menu.FIRST;
9898
}
@@ -185,6 +185,7 @@ public boolean onCreateOptionsMenu(Menu menu) {
185185
menu.add(0, MenuId.HELP.getId(), 0, "Help").setIcon(android.R.drawable.ic_menu_help);
186186
menu.add(0, MenuId.SHARE.getId(), 0, "Share").setIcon(android.R.drawable.ic_menu_share);
187187
menu.add(0, MenuId.GOTO.getId(), 0, "GoTo").setIcon(android.R.drawable.ic_menu_directions);
188+
menu.add(0, MenuId.SEARCH.getId(), 0, "Find").setIcon(android.R.drawable.ic_menu_search);
188189
return true;
189190
}
190191

@@ -226,6 +227,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
226227
startActivity(Intent.createChooser(intent, "Send Script to:"));
227228
} else if (item.getItemId() == MenuId.GOTO.getId()) {
228229
showDialog(DIALOG_LINE);
230+
} else if (item.getItemId() == MenuId.SEARCH.getId()) {
231+
showDialog(DIALOG_FIND_REPLACE);
229232
}
230233
return super.onOptionsItemSelected(item);
231234
}

0 commit comments

Comments
 (0)