diff --git a/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx b/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx index 77b17c995..536eab00a 100644 --- a/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: maroy $ - Version : $Revision: 1.1 $ + Version : $Revision: 1.2 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SchedulerWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -177,6 +177,8 @@ SchedulerWindow :: showContents(void) throw () dateLabel->set_text(to_simple_string(*selectedDate)); + Ptr::Ref storage; + Ptr::Ref sessionId; Ptr::Ref> >::Ref entries; std::vector::Ref>::iterator it; std::vector::Ref>::iterator end; @@ -184,6 +186,9 @@ SchedulerWindow :: showContents(void) throw () Ptr::Ref to; Ptr::Ref midnight; + storage = gLiveSupport->getStorage(); + sessionId = gLiveSupport->getSessionId(); + // we're interested from midnight, selectedDate, to midnight, the next day midnight.reset(new posix_time::time_duration(0, 0, 0, 0)); from.reset(new posix_time::ptime(*selectedDate, *midnight)); @@ -195,14 +200,24 @@ SchedulerWindow :: showContents(void) throw () end = entries->end(); entriesModel->clear(); while (it != end) { - Ptr::Ref entry = *it; + Ptr::Ref playlist; + Ptr::Ref entry = *it; + Ptr::Ref playlistId(new UniqueId( + entry->getPlaylistId()->getId())); + + if (!storage->existsPlaylist(sessionId, playlistId)) { + ++it; + continue; + } + + playlist = storage->getPlaylist(sessionId, playlistId); + Gtk::TreeModel::Row row = *(entriesModel->append()); row[entryColumns->idColumn] = entry->getId(); row[entryColumns->startColumn] = to_simple_string(*entry->getStartTime()); - // TODO: get the title - row[entryColumns->titleColumn] = "title here"; + row[entryColumns->titleColumn] = *playlist->getTitle(); row[entryColumns->endColumn] = to_simple_string(*entry->getEndTime()); ++it;