made Scheduler window into a WhiteWindow

This commit is contained in:
fgerlits 2005-05-24 15:54:23 +00:00
parent 0548da379e
commit 783e0092b5
4 changed files with 32 additions and 17 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.20 $ Version : $Revision: 1.21 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/include/LiveSupport/Widgets/WidgetFactory.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -89,7 +89,7 @@ class ZebraTreeView;
* </code></pre> * </code></pre>
* *
* @author $Author: fgerlits $ * @author $Author: fgerlits $
* @version $Revision: 1.20 $ * @version $Revision: 1.21 $
*/ */
class WidgetFactory : class WidgetFactory :
virtual public Configurable virtual public Configurable
@ -117,7 +117,8 @@ class WidgetFactory :
scratchpadWindowTitleImage, scratchpadWindowTitleImage,
searchWindowTitleImage, searchWindowTitleImage,
liveModeWindowTitleImage, liveModeWindowTitleImage,
playlistsWindowTitleImage } playlistsWindowTitleImage,
schedulerWindowTitleImage }
ImageType; ImageType;

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.22 $ Version : $Revision: 1.23 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WidgetFactory.cxx,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/modules/widgets/src/WidgetFactory.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -267,6 +267,12 @@ static const std::string liveModeWindowTitleImageName
static const std::string playlistsWindowTitleImageName static const std::string playlistsWindowTitleImageName
= "titleImages/playlistsWindowTitle.png"; = "titleImages/playlistsWindowTitle.png";
/**
* The name of the image for the title of the scheduler window.
*/
static const std::string schedulerWindowTitleImageName
= "titleImages/schedulerWindowTitle.png";
/* =============================================== local function prototypes */ /* =============================================== local function prototypes */
@ -510,6 +516,10 @@ WidgetFactory :: createImage(ImageType imageName) throw ()
rawImage = loadImage(playlistsWindowTitleImageName); rawImage = loadImage(playlistsWindowTitleImageName);
break; break;
case schedulerWindowTitleImage:
rawImage = loadImage(schedulerWindowTitleImageName);
break;
default: default:
return 0; return 0;
} }

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ Author : $Author: fgerlits $
Version : $Revision: 1.7 $ Version : $Revision: 1.8 $
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 $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -63,12 +63,13 @@ using namespace LiveSupport::GLiveSupport;
SchedulerWindow :: SchedulerWindow (Ptr<GLiveSupport>::Ref gLiveSupport, SchedulerWindow :: SchedulerWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
Ptr<ResourceBundle>::Ref bundle) Ptr<ResourceBundle>::Ref bundle)
throw () throw ()
: LocalizedObject(bundle) : WhiteWindow(WidgetFactory::schedulerWindowTitleImage,
Colors::White,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
LocalizedObject(bundle),
gLiveSupport(gLiveSupport)
{ {
this->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) {
@ -134,7 +135,9 @@ SchedulerWindow :: SchedulerWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
// initialize the selected date for today // initialize the selected date for today
selectedDate.reset(new gregorian::date(TimeConversion::now()->date())); selectedDate.reset(new gregorian::date(TimeConversion::now()->date()));
add(*layout); Gtk::VBox * mainBox = Gtk::manage(new Gtk::VBox);
mainBox->add(*layout);
add(*mainBox);
show_all(); show_all();

View file

@ -21,8 +21,8 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Author : $Author: maroy $ Author : $Author: fgerlits $
Version : $Revision: 1.3 $ Version : $Revision: 1.4 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulerWindow.h,v $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulerWindow.h,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -50,6 +50,7 @@
#include "LiveSupport/Core/Ptr.h" #include "LiveSupport/Core/Ptr.h"
#include "LiveSupport/Core/LocalizedObject.h" #include "LiveSupport/Core/LocalizedObject.h"
#include "LiveSupport/Widgets/WhiteWindow.h"
#include "GLiveSupport.h" #include "GLiveSupport.h"
namespace LiveSupport { namespace LiveSupport {
@ -87,10 +88,10 @@ using namespace LiveSupport::Core;
* +-------------------------------------------------+ * +-------------------------------------------------+
* </pre></code> * </pre></code>
* *
* @author $Author: maroy $ * @author $Author: fgerlits $
* @version $Revision: 1.3 $ * @version $Revision: 1.4 $
*/ */
class SchedulerWindow : public Gtk::Window, public LocalizedObject class SchedulerWindow : public WhiteWindow, public LocalizedObject
{ {
protected: protected:
@ -99,8 +100,8 @@ class SchedulerWindow : public Gtk::Window, public LocalizedObject
* The columns model needed by Gtk::TreeView. * The columns model needed by Gtk::TreeView.
* Lists one scheduled item per row. * Lists one scheduled item per row.
* *
* @author $Author: maroy $ * @author $Author: fgerlits $
* @version $Revision: 1.3 $ * @version $Revision: 1.4 $
*/ */
class ModelColumns : public Gtk::TreeModel::ColumnRecord class ModelColumns : public Gtk::TreeModel::ColumnRecord
{ {