From bcbd03cc28b206024fcd3c283ab9d6468506d525 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Thu, 7 Jul 2005 15:56:36 +0000 Subject: [PATCH] WhiteWindow-ized SchedulePlaylistWindow, fixing bug #1170 --- .../src/SchedulePlaylistWindow.cxx | 23 +++++++++++-------- .../gLiveSupport/src/SchedulePlaylistWindow.h | 22 ++++++++++-------- 2 files changed, 27 insertions(+), 18 deletions(-) diff --git a/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx b/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx index c53863307..1efac9f81 100644 --- a/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.5 $ + Version : $Revision: 1.6 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -37,6 +37,7 @@ #include #include "LiveSupport/Core/TimeConversion.h" +#include "LiveSupport/Widgets/WidgetFactory.h" #include "SchedulePlaylistWindow.h" @@ -65,19 +66,24 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow ( Ptr::Ref bundle, Ptr::Ref playlist) throw () - : LocalizedObject(bundle) + : WhiteWindow(WidgetFactory::schedulerWindowTitleImage, + Colors::White, + WidgetFactory::getInstance()->getWhiteWindowCorners()), + LocalizedObject(bundle), + gLiveSupport(gLiveSupport), + playlist(playlist) { - this->gLiveSupport = gLiveSupport; - this->playlist = playlist; + Ptr::Ref wf = WidgetFactory::getInstance(); + try { set_title(*getResourceUstring("windowTitle")); hourLabel = Gtk::manage(new Gtk::Label(*getResourceUstring( "hourLabel"))); minuteLabel = Gtk::manage(new Gtk::Label(*getResourceUstring( "minuteLabel"))); - scheduleButton = Gtk::manage(new Gtk::Button( + scheduleButton = Gtk::manage(wf->createButton( *getResourceUstring("scheduleButtonLabel"))); - closeButton = Gtk::manage(new Gtk::Button( + closeButton = Gtk::manage(wf->createButton( *getResourceUstring("closeButtonLabel"))); } catch (std::invalid_argument &e) { std::cerr << e.what() << std::endl; @@ -86,9 +92,8 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow ( playlistLabel = Gtk::manage(new Gtk::Label(*playlist->getTitle())); calendar = Gtk::manage(new Gtk::Calendar()); - hourEntry = Gtk::manage(new Gtk::Entry()); - minuteEntry = Gtk::manage(new Gtk::Entry()); - + hourEntry = Gtk::manage(wf->createEntryBin()); + minuteEntry = Gtk::manage(wf->createEntryBin()); layout = Gtk::manage(new Gtk::Table()); diff --git a/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.h b/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.h index 51509c261..ece1b84ef 100644 --- a/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.h +++ b/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.h @@ -21,8 +21,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Author : $Author: maroy $ - Version : $Revision: 1.2 $ + Author : $Author: fgerlits $ + Version : $Revision: 1.3 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -50,6 +50,9 @@ #include "LiveSupport/Core/Ptr.h" #include "LiveSupport/Core/LocalizedObject.h" +#include "LiveSupport/Widgets/WhiteWindow.h" +#include "LiveSupport/Widgets/EntryBin.h" +#include "LiveSupport/Widgets/Button.h" #include "GLiveSupport.h" namespace LiveSupport { @@ -83,10 +86,11 @@ using namespace LiveSupport::Core; * +-------------------------------------------------+ * * - * @author $Author: maroy $ - * @version $Revision: 1.2 $ + * @author $Author: fgerlits $ + * @version $Revision: 1.3 $ */ -class SchedulePlaylistWindow : public Gtk::Window, public LocalizedObject +class SchedulePlaylistWindow : public WhiteWindow, + public LocalizedObject { protected: @@ -124,7 +128,7 @@ class SchedulePlaylistWindow : public Gtk::Window, public LocalizedObject /** * The entry field for hour. */ - Gtk::Entry * hourEntry; + EntryBin * hourEntry; /** * The minute label. @@ -134,17 +138,17 @@ class SchedulePlaylistWindow : public Gtk::Window, public LocalizedObject /** * The minute entry field. */ - Gtk::Entry * minuteEntry; + EntryBin * minuteEntry; /** * The schedule button. */ - Gtk::Button * scheduleButton; + Button * scheduleButton; /** * The close button. */ - Gtk::Button * closeButton; + Button * closeButton; /** * Signal handler for the schedule button clicked.