@@ -92,7 +92,7 @@ public class ScriptEditor extends Activity implements OnClickListener {
92
92
private CheckBox mSearchStart ;
93
93
94
94
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 ;
96
96
public int getId () {
97
97
return ordinal () + Menu .FIRST ;
98
98
}
@@ -185,6 +185,7 @@ public boolean onCreateOptionsMenu(Menu menu) {
185
185
menu .add (0 , MenuId .HELP .getId (), 0 , "Help" ).setIcon (android .R .drawable .ic_menu_help );
186
186
menu .add (0 , MenuId .SHARE .getId (), 0 , "Share" ).setIcon (android .R .drawable .ic_menu_share );
187
187
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 );
188
189
return true ;
189
190
}
190
191
@@ -226,6 +227,8 @@ public boolean onOptionsItemSelected(MenuItem item) {
226
227
startActivity (Intent .createChooser (intent , "Send Script to:" ));
227
228
} else if (item .getItemId () == MenuId .GOTO .getId ()) {
228
229
showDialog (DIALOG_LINE );
230
+ } else if (item .getItemId () == MenuId .SEARCH .getId ()) {
231
+ showDialog (DIALOG_FIND_REPLACE );
229
232
}
230
233
return super .onOptionsItemSelected (item );
231
234
}
0 commit comments