From df6df8e58720b7cc4ef41b73a09abd1577556407 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 18 Oct 2010 14:43:06 +0200 Subject: [PATCH] Make the gui use Application::hide_gui rather then hide_me Now that Application::hide_me actually does what the name suggests (hide the entire client, ie all client windows), the gui using it to not show the gui layer leads to the entire client disappearing when one presses close in the GUI or dismisses a GUI dialog. This patch makes the GUI code call hide_gui instead of hide_me, fixing this. --- client/application.cpp | 2 -- client/application.h | 2 +- client/gui/gui.cpp | 4 ++-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/client/application.cpp b/client/application.cpp index 15916f74..212b20ef 100644 --- a/client/application.cpp +++ b/client/application.cpp @@ -1786,8 +1786,6 @@ void Application::show_me(bool full_screen) void Application::hide_me() { -// hide_gui(); -// FIXME: this instead? if (_full_screen) { exit_full_screen(); } diff --git a/client/application.h b/client/application.h index 2cff2d59..c01e08bc 100644 --- a/client/application.h +++ b/client/application.h @@ -254,6 +254,7 @@ public: #ifdef USE_GUI bool is_disconnect_allowed(); + void hide_gui(); #endif const std::string& get_host(); @@ -318,7 +319,6 @@ private: void attach_gui_barriers(); void detach_gui_barriers(); void show_gui(); - void hide_gui(); void create_gui_barrier(RedScreen& screen, int id); void destroyed_gui_barrier(int id); void destroyed_gui_barriers(); diff --git a/client/gui/gui.cpp b/client/gui/gui.cpp index 9152ff1f..f1ca13d8 100644 --- a/client/gui/gui.cpp +++ b/client/gui/gui.cpp @@ -420,7 +420,7 @@ void GUI::Dialog::handle_message_click(int id) } if (_close_on_message_click) { - application().hide_me(); + application().hide_gui(); } } @@ -840,7 +840,7 @@ public: bool SettingsDialog::handle_close(const CEGUI::EventArgs& e) { DBG(0, ""); - application().hide_me(); + application().hide_gui(); return true; }