Skip to content

Commit

Permalink
GUI2: removed CVideo argument from tdialog::post_build
Browse files Browse the repository at this point in the history
Like with pre_show, any uses of this parameter could be replaced by twindow::video().
  • Loading branch information
Vultraz committed Mar 14, 2016
1 parent 11b941a commit 3f58231
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/gui/dialogs/dialog.cpp
Expand Up @@ -41,7 +41,7 @@ bool tdialog::show(CVideo& video, const unsigned auto_close_time)
std::auto_ptr<twindow> window(build_window(video));
assert(window.get());

post_build(video, *window);
post_build(*window);

window->set_owner(this);

Expand Down Expand Up @@ -174,7 +174,7 @@ twindow* tdialog::build_window(CVideo& video) const
return build(video, window_id());
}

void tdialog::post_build(CVideo& /*video*/, twindow& /*window*/)
void tdialog::post_build(twindow& /*window*/)
{
/* DO NOTHING */
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/dialog.hpp
Expand Up @@ -361,7 +361,7 @@ class tdialog
* upon.
* @param window The window just created.
*/
virtual void post_build(CVideo& video, twindow& window);
virtual void post_build(twindow& window);

/**
* Actions to be taken before showing the window.
Expand Down
4 changes: 2 additions & 2 deletions src/gui/dialogs/lobby_main.cpp
Expand Up @@ -412,11 +412,11 @@ static bool fullscreen(CVideo& video)
return true;
}

void tlobby_main::post_build(CVideo& video, twindow& window)
void tlobby_main::post_build(twindow& window)
{
/** @todo Should become a global hotkey after 1.8, then remove it here. */
window.register_hotkey(hotkey::HOTKEY_FULLSCREEN,
boost::bind(fullscreen, boost::ref(video)));
boost::bind(fullscreen, boost::ref(window.video())));

/*** Local hotkeys. ***/
preferences_wrapper_
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/lobby_main.hpp
Expand Up @@ -355,7 +355,7 @@ class tlobby_main : public tdialog, private events::chat_handler
virtual const std::string& window_id() const;

/** Inherited from tdialog. */
virtual void post_build(CVideo& video, twindow& window);
virtual void post_build(twindow& window);

/** Inherited from tdialog. */
void pre_show(twindow& window);
Expand Down
4 changes: 2 additions & 2 deletions src/gui/dialogs/popup.cpp
Expand Up @@ -43,7 +43,7 @@ void tpopup::show(CVideo& video,

window_ = build_window(video);

post_build(video, *window_);
post_build(*window_);

pre_show(*window_);

Expand All @@ -68,7 +68,7 @@ twindow* tpopup::build_window(CVideo& video) const
return build(video, window_id());
}

void tpopup::post_build(CVideo& /*video*/, twindow& /*window*/)
void tpopup::post_build(twindow& /*window*/)
{
/* DO NOTHING */
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/popup.hpp
Expand Up @@ -106,7 +106,7 @@ class tpopup
* upon.
* @param window The window just created.
*/
virtual void post_build(CVideo& video, twindow& window);
virtual void post_build(twindow& window);

/**
* Actions to be taken before showing the window.
Expand Down
4 changes: 2 additions & 2 deletions src/gui/dialogs/title_screen.cpp
Expand Up @@ -155,15 +155,15 @@ static bool launch_lua_console(twindow & window)
return true;
}

void ttitle_screen::post_build(CVideo& video, twindow& window)
void ttitle_screen::post_build(twindow& window)
{
/** @todo Should become a title screen hotkey. */
window.register_hotkey(
hotkey::TITLE_SCREEN__RELOAD_WML,
boost::bind(&hotkey, boost::ref(window), RELOAD_GAME_DATA));

window.register_hotkey(hotkey::HOTKEY_FULLSCREEN,
boost::bind(fullscreen, boost::ref(video)));
boost::bind(fullscreen, boost::ref(window.video())));

window.register_hotkey(
hotkey::HOTKEY_LANGUAGE,
Expand Down
2 changes: 1 addition & 1 deletion src/gui/dialogs/title_screen.hpp
Expand Up @@ -86,7 +86,7 @@ class ttitle_screen : public tdialog
virtual const std::string& window_id() const;

/** Inherited from tdialog. */
virtual void post_build(CVideo& video, twindow& window);
virtual void post_build(twindow& window);

/** Inherited from tdialog. */
void pre_show(twindow& window);
Expand Down

0 comments on commit 3f58231

Please sign in to comment.