GUI2: removed CVideo argument from tdialog::post_build

Like with pre_show, any uses of this parameter could be replaced by twindow::video().
This commit is contained in:
Charles Dang 2016-03-15 02:24:15 +11:00
parent 11b941ab58
commit 3f582310c9
8 changed files with 12 additions and 12 deletions

View file

@ -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);
@ -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 */
}

View file

@ -361,7 +361,7 @@ private:
* 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.

View file

@ -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_

View file

@ -355,7 +355,7 @@ private:
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);

View file

@ -43,7 +43,7 @@ void tpopup::show(CVideo& video,
window_ = build_window(video);
post_build(video, *window_);
post_build(*window_);
pre_show(*window_);
@ -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 */
}

View file

@ -106,7 +106,7 @@ private:
* 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.

View file

@ -155,7 +155,7 @@ 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(
@ -163,7 +163,7 @@ void ttitle_screen::post_build(CVideo& video, twindow& window)
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,

View file

@ -86,7 +86,7 @@ private:
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);