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 $
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 <stdexcept>
#include "LiveSupport/Core/TimeConversion.h"
#include "LiveSupport/Widgets/WidgetFactory.h"
#include "SchedulePlaylistWindow.h"
@ -65,19 +66,24 @@ SchedulePlaylistWindow :: SchedulePlaylistWindow (
Ptr<ResourceBundle>::Ref bundle,
Ptr<Playlist>::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<WidgetFactory>::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());

View file

@ -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;
* +-------------------------------------------------+
* </pre></code>
*
* @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.