diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-01-23 21:05:05 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2007-01-23 21:05:05 +0000 |
commit | 05bdb92c267e3f041788f2aa41a73c9953249e7c (patch) | |
tree | 356033be4c1c373972b8a32b9e67503b3a6a0abf /src | |
parent | d1395845cdc678db2a71326f2e6f20253ed14cac (diff) | |
download | mana-05bdb92c267e3f041788f2aa41a73c9953249e7c.tar.gz mana-05bdb92c267e3f041788f2aa41a73c9953249e7c.tar.bz2 mana-05bdb92c267e3f041788f2aa41a73c9953249e7c.tar.xz mana-05bdb92c267e3f041788f2aa41a73c9953249e7c.zip |
Merged 0.0 changes from revision 3035 to 3065 to trunk.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/menuwindow.cpp | 3 | ||||
-rw-r--r-- | src/gui/shoplistbox.cpp | 2 | ||||
-rw-r--r-- | src/gui/updatewindow.cpp | 16 | ||||
-rw-r--r-- | src/gui/viewport.cpp | 2 | ||||
-rw-r--r-- | src/gui/viewport.h | 2 | ||||
-rw-r--r-- | src/main.cpp | 4 |
6 files changed, 17 insertions, 12 deletions
diff --git a/src/gui/menuwindow.cpp b/src/gui/menuwindow.cpp index ba4c8e94..a5b5c99e 100644 --- a/src/gui/menuwindow.cpp +++ b/src/gui/menuwindow.cpp @@ -58,7 +58,8 @@ MenuWindow::MenuWindow(): }; int x = 0, y = 3, h = 0; - for (const char **curBtn = buttonNames; *curBtn; curBtn++) { + for (const char **curBtn = buttonNames; *curBtn; curBtn++) + { gcn::Button *btn = new Button(*curBtn, *curBtn, &listener); btn->setPosition(x, y); add(btn); diff --git a/src/gui/shoplistbox.cpp b/src/gui/shoplistbox.cpp index 8cf0b639..946f518b 100644 --- a/src/gui/shoplistbox.cpp +++ b/src/gui/shoplistbox.cpp @@ -112,7 +112,7 @@ void ShopListBox::setSelected(int selected) mSelected = std::min(mListModel->getNumberOfElements() - 1, std::max(-1, selected)); - gcn::BasicContainer *parent = getParent(); + gcn::Widget *parent = getParent(); if (parent) { gcn::Rectangle scroll; diff --git a/src/gui/updatewindow.cpp b/src/gui/updatewindow.cpp index d41dfe13..fe78a27b 100644 --- a/src/gui/updatewindow.cpp +++ b/src/gui/updatewindow.cpp @@ -28,8 +28,6 @@ #include <SDL_thread.h> #include <zlib.h> -#include <curl/curl.h> - #include <guichan/widgets/label.hpp> #include "browserbox.h" @@ -37,6 +35,9 @@ #include "progressbar.h" #include "scrollarea.h" +// Curl should be included after Guichan to avoid Windows redefinitions +#include <curl/curl.h> + #include "../configuration.h" #include "../log.h" #include "../main.h" @@ -137,7 +138,7 @@ void UpdaterWindow::action(const gcn::ActionEvent &event) if (event.getId() == "cancel") { // Register the user cancel - mUserCancel=true; + mUserCancel = true; // Skip the updating process if (mDownloadStatus == UPDATE_COMPLETE) { @@ -262,6 +263,11 @@ int UpdaterWindow::downloadThread(void *ptr) curl_easy_setopt(curl, CURLOPT_WRITEDATA, outfile); } +#ifdef PACKAGE_VERSION + curl_easy_setopt(curl, CURLOPT_USERAGENT, "TMW/" PACKAGE_VERSION); +#else + curl_easy_setopt(curl, CURLOPT_USERAGENT, "TMW"); +#endif curl_easy_setopt(curl, CURLOPT_ERRORBUFFER, uw->mCurlError); curl_easy_setopt(curl, CURLOPT_URL, url.c_str()); curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0); @@ -365,13 +371,13 @@ void UpdaterWindow::logic() case UPDATE_ERROR: if (mThread) { - if(mUserCancel){ + if (mUserCancel) { // Kill the thread, because user has canceled SDL_KillThread(mThread); // Set the flag to false again mUserCancel = false; } - else{ + else { SDL_WaitThread(mThread, NULL); } mThread = NULL; diff --git a/src/gui/viewport.cpp b/src/gui/viewport.cpp index 671ababa..5f316aea 100644 --- a/src/gui/viewport.cpp +++ b/src/gui/viewport.cpp @@ -324,7 +324,7 @@ Viewport::mousePressed(gcn::MouseEvent &event) } void -Viewport::mouseMoved(gcn::MouseEvent &event) +Viewport::mouseDragged(gcn::MouseEvent &event) { if (!mMap || !player_node) return; diff --git a/src/gui/viewport.h b/src/gui/viewport.h index 80475fbf..f1cadd98 100644 --- a/src/gui/viewport.h +++ b/src/gui/viewport.h @@ -92,7 +92,7 @@ class Viewport : public WindowContainer, public gcn::MouseListener, * Handles mouse move on map */ void - mouseMoved(gcn::MouseEvent &event); + mouseDragged(gcn::MouseEvent &event); /** * Handles mouse button release on map. diff --git a/src/main.cpp b/src/main.cpp index 3a448494..dc186c84 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -39,8 +39,6 @@ #if (defined __USE_UNIX98 || defined __FreeBSD__) #include <cerrno> #include <sys/stat.h> -#elif defined WIN32 -#define NOGDI #endif #include "configuration.h" @@ -174,7 +172,7 @@ void initConfiguration(const Options &options) { // Fill configuration with defaults logger->log("Initializing configuration..."); - config.setValue("host", "animesites.de"); + config.setValue("host", "server.themanaworld.org"); config.setValue("port", 9601); config.setValue("hwaccel", 0); #if (defined __APPLE__ || defined WIN32) && defined USE_OPENGL |