From e50c565b44f9bce105a4b38e93169234ad27ffe1 Mon Sep 17 00:00:00 2001 From: Arnon Gilboa Date: Sun, 17 Oct 2010 11:45:13 +0200 Subject: spicec: extract RedScreen::update_menu() --- client/screen.cpp | 9 +++++++-- client/screen.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/client/screen.cpp b/client/screen.cpp index 75205719..7c4e1e37 100644 --- a/client/screen.cpp +++ b/client/screen.cpp @@ -113,8 +113,7 @@ RedScreen::RedScreen(Application& owner, int id, const std::wstring& name, int w THROW("create inactive cursor failed"); } _window.set_cursor(_default_cursor); - AutoRef menu(_owner.get_app_menu()); - _window.set_menu(*menu); + update_menu(); AutoRef icon(Platform::load_icon(RED_ICON_RES_ID)); _window.set_icon(*icon); _window.start_key_interception(); @@ -870,6 +869,12 @@ void RedScreen::external_show() _window.external_show(); } +void RedScreen::update_menu() +{ + AutoRef menu(_owner.get_app_menu()); + _window.set_menu(*menu); +} + void RedScreen::on_exposed_rect(const SpiceRect& area) { if (is_out_of_sync()) { diff --git a/client/screen.h b/client/screen.h index 8d9a81c3..dfef9895 100644 --- a/client/screen.h +++ b/client/screen.h @@ -89,6 +89,7 @@ public: void show(); void activate(); void external_show(); + void update_menu(); int get_id() { return _id;} int get_screen_id(); -- cgit