diff options
| -rw-r--r-- | AndroidManifest.xml | 2 | ||||
| -rw-r--r-- | res/layout/dia_resize.xml | 6 | ||||
| -rw-r--r-- | src/org/connectbot/ConsoleActivity.java | 15 | 
3 files changed, 18 insertions, 5 deletions
diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 390d5b6..7bff07b 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2,7 +2,7 @@  <manifest xmlns:android="http://schemas.android.com/apk/res/android"  	package="org.connectbot"  	android:versionName="1.6-dev" -	android:versionCode="195"> +	android:versionCode="196">  	<application  		android:icon="@drawable/icon" diff --git a/res/layout/dia_resize.xml b/res/layout/dia_resize.xml index 49a7958..53011c6 100644 --- a/res/layout/dia_resize.xml +++ b/res/layout/dia_resize.xml @@ -30,7 +30,8 @@  		android:layout_width="100dip"  		android:layout_height="wrap_content"  		android:singleLine="true" -		android:numeric="integer" android:text="80"/> +		android:numeric="integer" +		android:text="80"/>  	<TextView  		android:layout_width="wrap_content" @@ -48,5 +49,6 @@  		android:layout_width="100dip"  		android:layout_height="wrap_content"  		android:singleLine="true" -		android:numeric="integer" android:text="25"/> +		android:numeric="integer" +		android:text="25"/>  </LinearLayout> diff --git a/src/org/connectbot/ConsoleActivity.java b/src/org/connectbot/ConsoleActivity.java index 9223a18..803b84b 100644 --- a/src/org/connectbot/ConsoleActivity.java +++ b/src/org/connectbot/ConsoleActivity.java @@ -764,8 +764,19 @@ public class ConsoleActivity extends Activity {  					.setView(resizeView)  					.setPositiveButton(R.string.button_resize, new DialogInterface.OnClickListener() {  						public void onClick(DialogInterface dialog, int which) { -							int width = Integer.parseInt(((EditText)resizeView.findViewById(R.id.width)).getText().toString()); -							int height = Integer.parseInt(((EditText)resizeView.findViewById(R.id.height)).getText().toString()); +							int width, height; +							try { +								width = Integer.parseInt(((EditText) resizeView +										.findViewById(R.id.width)) +										.getText().toString()); +								height = Integer.parseInt(((EditText) resizeView +										.findViewById(R.id.height)) +										.getText().toString()); +							} catch (NumberFormatException nfe) { +								// TODO change this to a real dialog where we can +								// make the input boxes turn red to indicate an error. +								return; +							}  							terminalView.forceSize(width, height);  						}  | 
