summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2011-11-23 18:12:07 +0100
committerYohann Ferreira <yohann_dot_ferreira_at_orange_dot_efer>2012-01-10 20:32:07 +0100
commitd49929bd9cf54fa4a6aa9d68c1ea6f2852a27fa3 (patch)
tree6c5ecbf5f6761a2fdedc53c3dcc8372d6f3dc9cc
parent8cf8f82d0b933dab43372fb0afdda58687ce6af6 (diff)
downloadmana-client-d49929bd9cf54fa4a6aa9d68c1ea6f2852a27fa3.tar.gz
mana-client-d49929bd9cf54fa4a6aa9d68c1ea6f2852a27fa3.tar.bz2
mana-client-d49929bd9cf54fa4a6aa9d68c1ea6f2852a27fa3.tar.xz
mana-client-d49929bd9cf54fa4a6aa9d68c1ea6f2852a27fa3.zip
Added a separate label for the download description in the server dialog.
+ Fixe requested by Ablu. Reviewed-by: Ablu
-rw-r--r--src/gui/serverdialog.cpp23
-rw-r--r--src/gui/serverdialog.h1
2 files changed, 14 insertions, 10 deletions
diff --git a/src/gui/serverdialog.cpp b/src/gui/serverdialog.cpp
index 0e97dd0d..2bb0e0dc 100644
--- a/src/gui/serverdialog.cpp
+++ b/src/gui/serverdialog.cpp
@@ -204,6 +204,7 @@ ServerDialog::ServerDialog(ServerInfo *serverInfo, const std::string &dir):
usedScroll->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
mDescription = new Label(std::string());
+ mDownloadText = new Label(std::string());
mQuitButton = new Button(_("Quit"), "quit", this);
mConnectButton = new Button(_("Connect"), "connect", this);
@@ -217,11 +218,12 @@ ServerDialog::ServerDialog(ServerInfo *serverInfo, const std::string &dir):
place(0, 0, usedScroll, 6, 5).setPadding(3);
place(0, 5, mDescription, 5);
- place(0, 6, mManualEntryButton);
- place(1, 6, mModifyButton);
- place(2, 6, mDeleteButton);
- place(4, 6, mQuitButton);
- place(5, 6, mConnectButton);
+ place(0, 6, mDownloadText, 5);
+ place(0, 7, mManualEntryButton);
+ place(1, 7, mModifyButton);
+ place(2, 7, mDeleteButton);
+ place(4, 7, mQuitButton);
+ place(5, 7, mConnectButton);
// Make sure the list has enough height
getLayout().setRowHeight(3, 80);
@@ -393,24 +395,25 @@ void ServerDialog::logic()
mDownloadStatus = DOWNLOADING_OVER;
mDescription->setCaption(mServers[0].description);
+ mDownloadText->setCaption(std::string());
}
else if (mDownloadStatus == DOWNLOADING_IN_PROGRESS)
{
- mDescription->setCaption(strprintf(_("Downloading server list..."
+ mDownloadText->setCaption(strprintf(_("Downloading server list..."
"%2.2f%%"),
- mDownloadProgress * 100));
+ mDownloadProgress * 100));
}
else if (mDownloadStatus == DOWNLOADING_IDLE)
{
- mDescription->setCaption(_("Waiting for server..."));
+ mDownloadText->setCaption(_("Waiting for server..."));
}
else if (mDownloadStatus == DOWNLOADING_PREPARING)
{
- mDescription->setCaption(_("Preparing download"));
+ mDownloadText->setCaption(_("Preparing download"));
}
else if (mDownloadStatus == DOWNLOADING_ERROR)
{
- mDescription->setCaption(_("Error retreiving server list!"));
+ mDownloadText->setCaption(_("Error retreiving server list!"));
}
}
diff --git a/src/gui/serverdialog.h b/src/gui/serverdialog.h
index 1d7db0b2..19bacee6 100644
--- a/src/gui/serverdialog.h
+++ b/src/gui/serverdialog.h
@@ -162,6 +162,7 @@ class ServerDialog : public Window,
ServerDialogDownloadStatus mDownloadStatus;
Net::Download *mDownload;
+ Label *mDownloadText;
Mutex mMutex;
float mDownloadProgress;