summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-24 13:05:27 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2007-03-24 13:05:27 +0000
commitb5a95c2e1151ce61a2615cffcbb6821c150f40fd (patch)
treedaca526b12ba0d9f761af3d65d033719ea50c8d3 /src/main.cpp
parentd5e8513e085b6fc8da2ea4bb7151ac8e98be74c8 (diff)
downloadmana-b5a95c2e1151ce61a2615cffcbb6821c150f40fd.tar.gz
mana-b5a95c2e1151ce61a2615cffcbb6821c150f40fd.tar.bz2
mana-b5a95c2e1151ce61a2615cffcbb6821c150f40fd.tar.xz
mana-b5a95c2e1151ce61a2615cffcbb6821c150f40fd.zip
Make sure that when a network error occurs, the error message is available and
shown to the user. Also, only enable Register button when all necessary fields are filled in.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 79275e15..11600b6f 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -633,7 +633,12 @@ int main(int argc, char *argv[])
if (network->getState() == Network::NET_ERROR)
{
state = ERROR_STATE;
- errorMessage = "Got disconnected from server!";
+
+ if (!network->getError().empty()) {
+ errorMessage = network->getError();
+ } else {
+ errorMessage = "Got disconnected from server!";
+ }
}
if (!login_wallpaper)