Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

Commit

Permalink
Fix ip textbox from resizing when it is empty and you press connect t…
Browse files Browse the repository at this point in the history
…o vita.

also check if there is an ip typed in the ip textbox, so it wont process with an unspecified ip
more checks comming later: checking if its a valid ip
  • Loading branch information
gordon0001 committed Sep 22, 2016
1 parent 8b8790f commit 001757c
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/com/soywiz/vitaorganizer/VitaOrganizer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class VitaOrganizer : JPanel(BorderLayout()), StatusUpdater {

val connectText = Texts.format("CONNECT_TO_PSVITA")
var connected = false
val connectAddress = object : JTextField(VitaOrganizerSettings.lastDeviceIp) {
val connectAddress = object : JTextField(VitaOrganizerSettings.lastDeviceIp, 17) {
init {
font = Font(Font.MONOSPACED, Font.PLAIN, 14)
}
Expand Down Expand Up @@ -441,6 +441,12 @@ class VitaOrganizer : JPanel(BorderLayout()), StatusUpdater {
this@VitaOrganizer.updateStatus(Texts.format("DISCONNECTING"))
disconnect()
} else {
if(VitaOrganizerSettings.lastDeviceIp == "") {
println("No ip given")
JOptionPane.showMessageDialog(frame, "Please type in an ip address!")
return;
}

this@VitaOrganizer.updateStatus(Texts.format("CONNECTING"))
button.button.isEnabled = false

Expand Down

0 comments on commit 001757c

Please sign in to comment.