From d87d0754e0cebe343c48df3ce7f28823cb3771d0 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Thu, 14 Mar 2013 16:53:38 +0100 Subject: [PATCH] CComponentsWindow: add constructors with parameters for caption and icon --- src/gui/components/cc.h | 2 ++ src/gui/components/cc_frm_window.cpp | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/gui/components/cc.h b/src/gui/components/cc.h index 8ba52e366..20dee898b 100644 --- a/src/gui/components/cc.h +++ b/src/gui/components/cc.h @@ -514,6 +514,8 @@ class CComponentsWindow : public CComponentsForm CC_WINDOW_ITEM_HEADER = 0 }; CComponentsWindow(); + CComponentsWindow(const std::string& caption, const char* iconname = NULL); + CComponentsWindow(neutrino_locale_t locale_caption, const char* iconname = NULL); ~CComponentsWindow(); void paint(bool do_save_bg = CC_SAVE_SCREEN_YES); diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index b5db85d0d..dad85cff5 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -42,6 +42,22 @@ CComponentsWindow::CComponentsWindow() initVarWindow(); } +CComponentsWindow::CComponentsWindow(const std::string& caption, const char* iconname) +{ + initVarWindow(); + + ccw_caption = caption; + ccw_icon_name = iconname; +} + +CComponentsWindow::CComponentsWindow(neutrino_locale_t locale_caption, const char* iconname) +{ + initVarWindow(); + + ccw_caption = g_Locale->getText(locale_caption); + ccw_icon_name = iconname; +} + CComponentsWindow::~CComponentsWindow() { #ifdef DEBUG_CC