Fixed onEscapePressed event in addons loading screen.
It actually was unused previously. I'm also not sure why there was assert(false) ?
This commit is contained in:
parent
ad870c37f4
commit
8711955bdc
@ -190,11 +190,12 @@ void AddonsLoading::init()
|
|||||||
} // init
|
} // init
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void AddonsLoading::escapePressed()
|
bool AddonsLoading::onEscapePressed()
|
||||||
{
|
{
|
||||||
stopDownload();
|
stopDownload();
|
||||||
ModalDialog::dismiss();
|
ModalDialog::dismiss();
|
||||||
} // escapePressed
|
return true;
|
||||||
|
} // onEscapePressed
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -335,7 +336,6 @@ void AddonsLoading::stopDownload()
|
|||||||
// order to avoid a memory leak, we let network_http free
|
// order to avoid a memory leak, we let network_http free
|
||||||
// the request.
|
// the request.
|
||||||
//m_download_request->setManageMemory(true);
|
//m_download_request->setManageMemory(true);
|
||||||
assert(false);
|
|
||||||
m_download_request->cancel();
|
m_download_request->cancel();
|
||||||
};
|
};
|
||||||
} // startDownload
|
} // startDownload
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
#include "addons/addons_manager.hpp"
|
#include "addons/addons_manager.hpp"
|
||||||
#include "guiengine/widgets.hpp"
|
#include "guiengine/widgets.hpp"
|
||||||
#include "guiengine/modaldialog.hpp"
|
#include "guiengine/modaldialog.hpp"
|
||||||
|
#include "utils/cpp2011.hpp"
|
||||||
#include "utils/synchronised.hpp"
|
#include "utils/synchronised.hpp"
|
||||||
|
|
||||||
namespace Online { class HTTPRequest; }
|
namespace Online { class HTTPRequest; }
|
||||||
@ -32,7 +33,6 @@ namespace Online { class HTTPRequest; }
|
|||||||
*/
|
*/
|
||||||
class AddonsLoading : public GUIEngine::ModalDialog
|
class AddonsLoading : public GUIEngine::ModalDialog
|
||||||
{
|
{
|
||||||
virtual void escapePressed();
|
|
||||||
private:
|
private:
|
||||||
GUIEngine::LabelWidget *m_state;
|
GUIEngine::LabelWidget *m_state;
|
||||||
GUIEngine::ProgressBarWidget *m_progress;
|
GUIEngine::ProgressBarWidget *m_progress;
|
||||||
@ -70,6 +70,7 @@ public:
|
|||||||
* */
|
* */
|
||||||
void onUpdate(float delta);
|
void onUpdate(float delta);
|
||||||
void voteClicked();
|
void voteClicked();
|
||||||
|
virtual bool onEscapePressed() OVERRIDE;
|
||||||
|
|
||||||
}; // AddonsLoading
|
}; // AddonsLoading
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user