From 8d8b3b9d640dc8b7e80e9ac97e57379df8739dbe Mon Sep 17 00:00:00 2001 From: fgerlits Date: Fri, 18 Aug 2006 14:10:34 +0000 Subject: [PATCH] added "- LiveSupport" to the window titles (part of #1751) --- .../products/gLiveSupport/src/GuiWindow.cxx | 19 +++++++++++++++++++ .../src/products/gLiveSupport/src/GuiWindow.h | 12 ++++++++++++ .../gLiveSupport/src/MasterPanelWindow.cxx | 11 ++++++++++- 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/livesupport/src/products/gLiveSupport/src/GuiWindow.cxx b/livesupport/src/products/gLiveSupport/src/GuiWindow.cxx index 68324602a..d967b412f 100644 --- a/livesupport/src/products/gLiveSupport/src/GuiWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/GuiWindow.cxx @@ -48,6 +48,14 @@ using namespace LiveSupport::GLiveSupport; /* ================================================ local constants & macros */ +namespace { + +/** + * The name of the application, shown on the task bar. + */ +const Glib::ustring applicationTitleSuffix = " - LiveSupport"; + +} /* =============================================== local function prototypes */ @@ -161,3 +169,14 @@ GuiWindow :: on_hide (void) throw () WhiteWindow::on_hide(); } + +/*------------------------------------------------------------------------------ + * Set the title of the window. + *----------------------------------------------------------------------------*/ +void +GuiWindow :: set_title (const Glib::ustring & title) throw () +{ + Glib::ustring completeTitle = title + applicationTitleSuffix; + WhiteWindow::set_title(completeTitle); +} + diff --git a/livesupport/src/products/gLiveSupport/src/GuiWindow.h b/livesupport/src/products/gLiveSupport/src/GuiWindow.h index 5b0d032e7..547d740f1 100644 --- a/livesupport/src/products/gLiveSupport/src/GuiWindow.h +++ b/livesupport/src/products/gLiveSupport/src/GuiWindow.h @@ -184,6 +184,18 @@ class GuiWindow : public WhiteWindow, ~GuiWindow(void) throw () { } + + /** + * Set the title of the window. + * + * Overrides WhiteWindow::set_title() (inherited from Gtk::Window). + * Adds " - LiveSupport" to the title of the window shown on the + * task bar. + * + * @param title the title of the window. + */ + virtual void + set_title(const Glib::ustring & title) throw (); }; /* ================================================= external data structures */ diff --git a/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx index af245673d..45ea3dbb9 100644 --- a/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -60,6 +60,11 @@ namespace { */ const Glib::ustring windowName = "masterPanelWindow"; +/** + * The name of the application, shown on the task bar. + */ +const Glib::ustring applicationTitleSuffix = " - LiveSupport"; + /** * Number of times per second that onUpdateTime() is called. * It's a good idea to make this a divisor of 1000. @@ -261,7 +266,11 @@ MasterPanelWindow :: changeLanguage(Ptr::Ref bundle) } try { - set_title(*getResourceUstring(windowName.c_str(), "windowTitle")); + Ptr::Ref title = getResourceUstring( + windowName.c_str(), + "windowTitle"); + title->append(applicationTitleSuffix); + set_title(*title); Ptr::Ref wf = WidgetFactory::getInstance();