Skip to content

Commit

Permalink
Handling login errors (UI was getting out of synch).
Browse files Browse the repository at this point in the history
Popping up error dialog on error.
  • Loading branch information
Pierre-Luc Paour committed Sep 29, 2002
1 parent b2d5963 commit a0dc041
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions com/gallery/GalleryRemote/GalleryComm.java
Expand Up @@ -91,6 +91,7 @@ public void run() {
mf.setInProgress(true);
if ( ! isLoggedIn ) {
if ( !login() ) {
mf.setInProgress(false);
return;
}

Expand Down Expand Up @@ -146,7 +147,7 @@ private boolean login() {
status("Logged in");
return true;
} else {
status("Login Error: " + response);
error("Login Error: " + response);
return false;
}
}
Expand Down Expand Up @@ -329,7 +330,7 @@ void status(String message) {
}

void error(String message) {
// TODO: use error dialog
JOptionPane.showMessageDialog(mf, message, "Error", JOptionPane.ERROR_MESSAGE);
status(message);
}

Expand Down

0 comments on commit a0dc041

Please sign in to comment.