WhiteWindow-ized SchedulePlaylistWindow, fixing bug #1170

This commit is contained in:
fgerlits 2005-07-07 15:56:36 +00:00
parent a46ef4879b
commit bcbd03cc28
2 changed files with 27 additions and 18 deletions

View file

@ -22,7 +22,7 @@
Author : $Author: fgerlits $ 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 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.cxx,v $
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
@ -37,6 +37,7 @@
#include <stdexcept> #include <stdexcept>
#include "LiveSupport/Core/TimeConversion.h" #include "LiveSupport/Core/TimeConversion.h"
#include "LiveSupport/Widgets/WidgetFactory.h"
#include "SchedulePlaylistWindow.h" #include "SchedulePlaylistWindow.h"
@ -65,19 +66,24 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow (
Ptr<ResourceBundle>::Ref bundle, Ptr<ResourceBundle>::Ref bundle,
Ptr<Playlist>::Ref playlist) Ptr<Playlist>::Ref playlist)
throw () throw ()
: LocalizedObject(bundle) : WhiteWindow(WidgetFactory::schedulerWindowTitleImage,
Colors::White,
WidgetFactory::getInstance()->getWhiteWindowCorners()),
LocalizedObject(bundle),
gLiveSupport(gLiveSupport),
playlist(playlist)
{ {
this->gLiveSupport = gLiveSupport; Ptr<WidgetFactory>::Ref wf = WidgetFactory::getInstance();
this->playlist = playlist;
try { try {
set_title(*getResourceUstring("windowTitle")); set_title(*getResourceUstring("windowTitle"));
hourLabel = Gtk::manage(new Gtk::Label(*getResourceUstring( hourLabel = Gtk::manage(new Gtk::Label(*getResourceUstring(
"hourLabel"))); "hourLabel")));
minuteLabel = Gtk::manage(new Gtk::Label(*getResourceUstring( minuteLabel = Gtk::manage(new Gtk::Label(*getResourceUstring(
"minuteLabel"))); "minuteLabel")));
scheduleButton = Gtk::manage(new Gtk::Button( scheduleButton = Gtk::manage(wf->createButton(
*getResourceUstring("scheduleButtonLabel"))); *getResourceUstring("scheduleButtonLabel")));
closeButton = Gtk::manage(new Gtk::Button( closeButton = Gtk::manage(wf->createButton(
*getResourceUstring("closeButtonLabel"))); *getResourceUstring("closeButtonLabel")));
} catch (std::invalid_argument &e) { } catch (std::invalid_argument &e) {
std::cerr << e.what() << std::endl; std::cerr << e.what() << std::endl;
@ -86,9 +92,8 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow (
playlistLabel = Gtk::manage(new Gtk::Label(*playlist->getTitle())); playlistLabel = Gtk::manage(new Gtk::Label(*playlist->getTitle()));
calendar = Gtk::manage(new Gtk::Calendar()); calendar = Gtk::manage(new Gtk::Calendar());
hourEntry = Gtk::manage(new Gtk::Entry()); hourEntry = Gtk::manage(wf->createEntryBin());
minuteEntry = Gtk::manage(new Gtk::Entry()); minuteEntry = Gtk::manage(wf->createEntryBin());
layout = Gtk::manage(new Gtk::Table()); layout = Gtk::manage(new Gtk::Table());

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.2 $ Version : $Revision: 1.3 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulePlaylistWindow.h,v $ 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/Ptr.h"
#include "LiveSupport/Core/LocalizedObject.h" #include "LiveSupport/Core/LocalizedObject.h"
#include "LiveSupport/Widgets/WhiteWindow.h"
#include "LiveSupport/Widgets/EntryBin.h"
#include "LiveSupport/Widgets/Button.h"
#include "GLiveSupport.h" #include "GLiveSupport.h"
namespace LiveSupport { namespace LiveSupport {
@ -83,10 +86,11 @@ using namespace LiveSupport::Core;
* +-------------------------------------------------+ * +-------------------------------------------------+
* </pre></code> * </pre></code>
* *
* @author $Author: maroy $ * @author $Author: fgerlits $
* @version $Revision: 1.2 $ * @version $Revision: 1.3 $
*/ */
class SchedulePlaylistWindow : public Gtk::Window, public LocalizedObject class SchedulePlaylistWindow : public WhiteWindow,
public LocalizedObject
{ {
protected: protected:
@ -124,7 +128,7 @@ class SchedulePlaylistWindow : public Gtk::Window, public LocalizedObject
/** /**
* The entry field for hour. * The entry field for hour.
*/ */
Gtk::Entry * hourEntry; EntryBin * hourEntry;
/** /**
* The minute label. * The minute label.
@ -134,17 +138,17 @@ class SchedulePlaylistWindow : public Gtk::Window, public LocalizedObject
/** /**
* The minute entry field. * The minute entry field.
*/ */
Gtk::Entry * minuteEntry; EntryBin * minuteEntry;
/** /**
* The schedule button. * The schedule button.
*/ */
Gtk::Button * scheduleButton; Button * scheduleButton;
/** /**
* The close button. * The close button.
*/ */
Gtk::Button * closeButton; Button * closeButton;
/** /**
* Signal handler for the schedule button clicked. * Signal handler for the schedule button clicked.