diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 08de716..0000000 --- a/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -/CVS/ -CVS -/deployed/ -/build/ -/cmd.bat \ No newline at end of file diff --git a/GooglME-1.iws b/GooglME-1.iws index 7dc7bfa..3550995 100755 --- a/GooglME-1.iws +++ b/GooglME-1.iws @@ -115,7 +115,7 @@ - + @@ -124,7 +124,7 @@ - + @@ -133,28 +133,28 @@ - + - + - + - + @@ -163,7 +163,7 @@ - + @@ -179,25 +179,25 @@ - - + + - - - - - + + + + + @@ -231,19 +231,12 @@ - - - - @@ -330,21 +330,21 @@ - + - + - - + + - + @@ -444,16 +444,9 @@ - - - - - - - - + @@ -462,7 +455,7 @@ - + @@ -471,28 +464,28 @@ - + - + - + - + @@ -501,7 +494,7 @@ - + diff --git a/GooglME-2.iws b/GooglME-2.iws index eac11b6..97e7baf 100755 --- a/GooglME-2.iws +++ b/GooglME-2.iws @@ -112,10 +112,10 @@ - + - + @@ -143,14 +143,14 @@ - + - + @@ -180,7 +180,7 @@ - + @@ -201,30 +201,30 @@ - - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + @@ -357,13 +357,13 @@ - + - + @@ -467,20 +467,6 @@ - - - - - - - - - - - - - - @@ -490,14 +476,14 @@ - + - + @@ -527,14 +513,28 @@ - + - + + + + + + + + + + + + + + + diff --git a/GooglME-2.jad b/GooglME-2.jad index 968d158..8bb4723 100755 --- a/GooglME-2.jad +++ b/GooglME-2.jad @@ -1,7 +1,7 @@ MIDlet-1: GooglME,/googlme.png,net.thauvin.j2me.googlme.GooglME MIDlet-Jar-URL: GooglME-2.jar MIDlet-Icon: /googlme.png -MIDlet-Version: 0.4.2 +MIDlet-Version: 0.4.1 MIDlet-Description: GooglME MIDlet-Name: GooglME MIDlet-Vendor: Erik C. Thauvin diff --git a/GooglME.jad b/GooglME.jad index cf7964e..0cab898 100755 --- a/GooglME.jad +++ b/GooglME.jad @@ -1,7 +1,7 @@ MIDlet-1: GooglME,/googlme.png,net.thauvin.j2me.googlme.GooglME MIDlet-Jar-URL: GooglME.jar MIDlet-Icon: /googlme.png -MIDlet-Version: 0.4.2 +MIDlet-Version: 0.4.1 MIDlet-Description: GooglME MIDlet-Name: GooglME MIDlet-Vendor: Erik C. Thauvin diff --git a/googlme.gif b/googlme.gif index 3f1852a..3f42cfd 100755 Binary files a/googlme.gif and b/googlme.gif differ diff --git a/googlme.wml b/googlme.wml index 837758b..d0277aa 100755 --- a/googlme.wml +++ b/googlme.wml @@ -8,7 +8,7 @@

- GoogleME 0.4.2 (~13Kb)
+ GoogleME 0.4.1 (~13Kb)

MIDP 2.0
diff --git a/lib/cldcapi10.jar b/lib/cldcapi10.jar index d53b92b..9b4bf49 100755 Binary files a/lib/cldcapi10.jar and b/lib/cldcapi10.jar differ diff --git a/lib/midpapi10.jar b/lib/midpapi10.jar index 58514a9..f7a0634 100755 Binary files a/lib/midpapi10.jar and b/lib/midpapi10.jar differ diff --git a/lib/midpapi20.jar b/lib/midpapi20.jar index 46d9dc0..9969041 100755 Binary files a/lib/midpapi20.jar and b/lib/midpapi20.jar differ diff --git a/res/.gitignore b/res/.gitignore deleted file mode 100644 index 0acd18c..0000000 --- a/res/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Thumbs.db diff --git a/src/net/thauvin/j2me/googlme/.gitignore b/src/net/thauvin/j2me/googlme/.gitignore deleted file mode 100644 index a0fa60b..0000000 --- a/src/net/thauvin/j2me/googlme/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/desktop.ini diff --git a/src/net/thauvin/j2me/googlme/GooglME.java b/src/net/thauvin/j2me/googlme/GooglME.java index 7d90976..cbb0875 100755 --- a/src/net/thauvin/j2me/googlme/GooglME.java +++ b/src/net/thauvin/j2me/googlme/GooglME.java @@ -112,7 +112,7 @@ public class GooglME extends MIDlet implements CommandListener, Runnable /** * The application version. */ - protected static final String APP_VERSION = "0.4.2"; + protected static final String APP_VERSION = "0.4.1"; /** * The Back command. @@ -288,10 +288,10 @@ public class GooglME extends MIDlet implements CommandListener, Runnable { if (isValidString(_address)) { - /* final */ String q = _mainScreen.queryFld.getString(); + _query = _mainScreen.queryFld.getString(); _action = CHOICES[_mainScreen.actionPopup.getSelectedIndex()]; - if (isValidString(q)) + if (isValidString(_query)) { if (((_action.equals(CHOICE_GOOGLE_LOCAL)) || (_action.equals(CHOICE_LOCAL_SHOWTIMES))) && !isValidString(_location)) @@ -305,11 +305,6 @@ public class GooglME extends MIDlet implements CommandListener, Runnable _sendingAlert = new Alert(""); } - _query = buildQuery(q); - - addHistory(_query); - saveHistory(); - alert(_sendingAlert, "Sending SMS", "Sending message to " + _address + "...", d, 2500, false); new Thread(this).start(); @@ -578,8 +573,10 @@ public class GooglME extends MIDlet implements CommandListener, Runnable { _history.removeElementAt(MAX_HISTORY - 1); } - + _history.insertElementAt(query, 0); + + saveHistory(); } // Displays a modal message/error alert dialog. @@ -609,75 +606,6 @@ public class GooglME extends MIDlet implements CommandListener, Runnable _display.setCurrent(alert, d); } - // Builds the full query . - private String buildQuery(String query) - { - /* final */ String text; - - if (_action.equals(CHOICE_GOOGLE_LOCAL)) - { - if (isValidString(_location)) - { - text = query + '.' + _location; - } - else - { - text = query; - } - } - - // Froogle - else if (_action.equals(CHOICE_FROOGLE_PRICES)) - { - text = PREFIX_FROOGLE + query; - } - - // Google - else if (_action.equals(CHOICE_GOOGLE_SEARCH)) - { - text = PREFIX_GOOGLE + query; - } - - // Definition - else if (_action.equals(CHOICE_DEFINITION)) - { - text = PREFIX_DEFINITION + query; - } - - // Showtimes - else if (_action.equals(CHOICE_MOVIE_SHOWTIMES)) - { - text = PREFIX_MOVIE + query; - } - - // Local Showtimes - else if (_action.equals(CHOICE_LOCAL_SHOWTIMES)) - { - if (isValidString(_location)) - { - text = PREFIX_MOVIE + query + ' ' + _location; - } - else - { - text = PREFIX_MOVIE + query; - } - } - - // Weather - else if (_action.equals(CHOICE_WEATHER)) - { - text = PREFIX_WEATHER + query; - } - - // Default - else - { - text = query; - } - - return text; - } - // Exits the application. private void exit() { @@ -746,8 +674,73 @@ public class GooglME extends MIDlet implements CommandListener, Runnable /* final */ TextMessage msg = (TextMessage) conn.newMessage(MessageConnection.TEXT_MESSAGE); msg.setAddress(address); - msg.setPayloadText(_query); + /* final */ String text; + if (_action.equals(CHOICE_GOOGLE_LOCAL)) + { + if (isValidString(_location)) + { + text = _query + '.' + _location; + } + else + { + text = _query; + } + } + + // Froogle + else if (_action.equals(CHOICE_FROOGLE_PRICES)) + { + text = PREFIX_FROOGLE + _query; + } + + // Google + else if (_action.equals(CHOICE_GOOGLE_SEARCH)) + { + text = PREFIX_GOOGLE + _query; + } + + // Definition + else if (_action.equals(CHOICE_DEFINITION)) + { + text = PREFIX_DEFINITION + _query; + } + + // Showtimes + else if (_action.equals(CHOICE_MOVIE_SHOWTIMES)) + { + text = PREFIX_MOVIE + _query; + } + + // Local Showtimes + else if (_action.equals(CHOICE_LOCAL_SHOWTIMES)) + { + if (isValidString(_location)) + { + text = PREFIX_MOVIE + _query + ' ' + _location; + } + else + { + text = PREFIX_MOVIE + _query; + } + } + + // Weather + else if (_action.equals(CHOICE_WEATHER)) + { + text = PREFIX_WEATHER + _query; + } + + // Default + else + { + text = _query; + } + + // NOTE: Must be preformed before sending the SMS on the T616. + addHistory(text); + + msg.setPayloadText(text); conn.send(msg); //alert("SMS Sent", "The text message was sent.", _mainScreen, false);