re-added window titles for windows with image titles (this title is displayed on the taskbar)

This commit is contained in:
fgerlits 2005-06-02 18:47:22 +00:00
parent 7885cd91da
commit 7147940370
7 changed files with 27 additions and 14 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.12 $ Version : $Revision: 1.13 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WhiteWindow.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WhiteWindow.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -94,7 +94,7 @@ using namespace LiveSupport::Core;
* </code></pre> * </code></pre>
* *
* @author $Author: fgerlits $ * @author $Author: fgerlits $
* @version $Revision: 1.12 $ * @version $Revision: 1.13 $
* @see WidgetFactory * @see WidgetFactory
* @see WidgetFactory#getWhiteWindowCorners * @see WidgetFactory#getWhiteWindowCorners
*/ */
@ -142,6 +142,11 @@ class WhiteWindow : public Gtk::Window
*/ */
Gtk::Alignment * cornerButtonAlignment; Gtk::Alignment * cornerButtonAlignment;
/**
* True if the window has been minimized.
*/
bool isMaximized;
/** /**
* The close button. * The close button.
*/ */
@ -186,11 +191,6 @@ class WhiteWindow : public Gtk::Window
bool bool
onTitleClicked(GdkEventButton * event) throw (); onTitleClicked(GdkEventButton * event) throw ();
/**
* True if the window has been minimized.
*/
bool isMaximized;
/** /**
* Signal handler for the minimize button clicked. * Signal handler for the minimize button clicked.
*/ */

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.15 $ Version : $Revision: 1.16 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WhiteWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WhiteWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -64,6 +64,7 @@ WhiteWindow :: WhiteWindow(WidgetFactory::ImageType title,
isMaximized(false) isMaximized(false)
{ {
// do the image title-specific stuff // do the image title-specific stuff
titleLabel = 0;
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance(); Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
Gtk::Image* titleImage = Gtk::manage(wf->createImage(title)); Gtk::Image* titleImage = Gtk::manage(wf->createImage(title));
titleEventBox = Gtk::manage(new Gtk::EventBox()); titleEventBox = Gtk::manage(new Gtk::EventBox());
@ -85,9 +86,10 @@ WhiteWindow :: WhiteWindow(Glib::ustring title,
isMaximized(false) isMaximized(false)
{ {
// do the text title-specific stuff // do the text title-specific stuff
titleLabel = Gtk::manage(new Gtk::Label(title)); titleLabel = Gtk::manage(new Gtk::Label);
titleLabel->modify_font(Pango::FontDescription( titleLabel->modify_font(Pango::FontDescription(
"Bitstream Vera Sans 10")); "Bitstream Vera Sans 10"));
set_title(title);
titleEventBox = Gtk::manage(new Gtk::EventBox()); titleEventBox = Gtk::manage(new Gtk::EventBox());
titleEventBox->add(*titleLabel); titleEventBox->add(*titleLabel);

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.16 $ Version : $Revision: 1.17 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/LiveModeWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/LiveModeWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -71,6 +71,13 @@ LiveModeWindow :: LiveModeWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
LocalizedObject(bundle), LocalizedObject(bundle),
gLiveSupport(gLiveSupport) gLiveSupport(gLiveSupport)
{ {
try {
set_title(*getResourceUstring("windowTitle"));
} catch (std::invalid_argument &e) {
std::cerr << e.what() << std::endl;
std::exit(1);
}
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance(); Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
// Create the tree model: // Create the tree model:

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.8 $ Version : $Revision: 1.9 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -70,6 +70,7 @@ SchedulerWindow :: SchedulerWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
gLiveSupport(gLiveSupport) gLiveSupport(gLiveSupport)
{ {
try { try {
set_title(*getResourceUstring("windowTitle"));
closeButton = Gtk::manage(new Gtk::Button( closeButton = Gtk::manage(new Gtk::Button(
*getResourceUstring("closeButtonLabel"))); *getResourceUstring("closeButtonLabel")));
} catch (std::invalid_argument &e) { } catch (std::invalid_argument &e) {

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.21 $ Version : $Revision: 1.22 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -74,6 +74,7 @@ ScratchpadWindow :: ScratchpadWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<WidgetFactory>::Ref widgetFactory = WidgetFactory::getInstance(); Ptr<WidgetFactory>::Ref widgetFactory = WidgetFactory::getInstance();
try { try {
set_title(*getResourceUstring("windowTitle"));
addToPlaylistButton = Gtk::manage(widgetFactory->createButton( addToPlaylistButton = Gtk::manage(widgetFactory->createButton(
*getResourceUstring("addToPlaylistButtonLabel"))); *getResourceUstring("addToPlaylistButtonLabel")));
clearListButton = Gtk::manage(widgetFactory->createButton( clearListButton = Gtk::manage(widgetFactory->createButton(

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.17 $ Version : $Revision: 1.18 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SearchWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -80,6 +80,7 @@ SearchWindow :: SearchWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
Notebook * views = Gtk::manage(new Notebook); Notebook * views = Gtk::manage(new Notebook);
try { try {
set_title(*getResourceUstring("windowTitle"));
views->appendPage(*simpleSearchView, *getResourceUstring( views->appendPage(*simpleSearchView, *getResourceUstring(
"simpleSearchTab")); "simpleSearchTab"));
views->appendPage(*advancedSearchView, *getResourceUstring( views->appendPage(*advancedSearchView, *getResourceUstring(

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.11 $ Version : $Revision: 1.12 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -72,6 +72,7 @@ SimplePlaylistManagementWindow :: SimplePlaylistManagementWindow (
Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance(); Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
try { try {
set_title(*getResourceUstring("windowTitle"));
nameLabel = Gtk::manage(new Gtk::Label( nameLabel = Gtk::manage(new Gtk::Label(
*getResourceUstring("nameLabel"))); *getResourceUstring("nameLabel")));
saveButton = Gtk::manage(wf->createButton( saveButton = Gtk::manage(wf->createButton(