added "- LiveSupport" to the window titles (part of #1751)

This commit is contained in:
fgerlits 2006-08-18 14:10:34 +00:00
parent 5b73729be2
commit 8d8b3b9d64
3 changed files with 41 additions and 1 deletions

View File

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

View File

@ -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 */

View File

@ -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<ResourceBundle>::Ref bundle)
}
try {
set_title(*getResourceUstring(windowName.c_str(), "windowTitle"));
Ptr<Glib::ustring>::Ref title = getResourceUstring(
windowName.c_str(),
"windowTitle");
title->append(applicationTitleSuffix);
set_title(*title);
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();