Skip to content

Commit

Permalink
fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
CelticMinstrel committed Feb 23, 2016
1 parent b73cc5e commit f067332
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/gui/dialogs/synced_choice_wait.cpp
Expand Up @@ -99,7 +99,7 @@ void tsynced_choice_wait::handle_generic_event(const std::string& event_name)

void tsynced_choice_wait::on_btn_quit_game(CVideo&)
{
if (quit_confirmation::default_promt()) {
if (quit_confirmation::default_prompt()) {
throw_quit_game_exception();
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/hotkey/command_executor.cpp
Expand Up @@ -698,7 +698,7 @@ void command_executor_default::map_screenshot()
}
void command_executor_default::quit_to_main_menu()
{
if(quit_confirmation::default_promt()) {
if(quit_confirmation::default_prompt()) {
throw_quit_game_exception();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/quit_confirmation.cpp
Expand Up @@ -29,7 +29,7 @@ void quit_confirmation::quit()
open_ = true;
BOOST_REVERSE_FOREACH(quit_confirmation* blocker, blockers_)
{
if(!blocker->promt_()) {
if(!blocker->prompt_()) {
open_ = false;
return;
}
Expand All @@ -39,7 +39,7 @@ void quit_confirmation::quit()
throw CVideo::quit();
}

bool quit_confirmation::default_promt()
bool quit_confirmation::default_prompt()
{
return gui2::show_message(CVideo::get_singleton(), _("Quit"), _("Do you really want to quit?"),
gui2::tmessage::yes_no_buttons) != gui2::twindow::CANCEL;
Expand Down
8 changes: 3 additions & 5 deletions src/quit_confirmation.hpp
Expand Up @@ -31,9 +31,7 @@ class CVideo;
class quit_confirmation
{
public:
quit_confirmation(const boost::function<bool()>& promt = &quit_confirmation::default_promt)
: promt_(promt) { blockers_.push_back(this); }

quit_confirmation(const boost::function<bool()>& prompt = &quit_confirmation::default_prompt) : prompt_(prompt) { blockers_.push_back(this); }
~quit_confirmation() { blockers_.pop_back(); }

/**
Expand All @@ -43,15 +41,15 @@ class quit_confirmation
* displayed.
*/
static void quit();
static bool default_promt();
static bool default_prompt();
private:
//noncopyable
quit_confirmation( const quit_confirmation& );
const quit_confirmation& operator=( const quit_confirmation& );
static std::vector<quit_confirmation*> blockers_;
static bool open_;

boost::function<bool()> promt_;
boost::function<bool()> prompt_;
};

#endif

0 comments on commit f067332

Please sign in to comment.