diff --git a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx index f682bcbf0..71503f01e 100644 --- a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx +++ b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.17 $ + Version : $Revision: 1.18 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -36,6 +36,8 @@ #include #include +#include "LiveSupport/Core/TimeConversion.h" + #include "SimplePlaylistManagementWindow.h" @@ -98,11 +100,15 @@ SimplePlaylistManagementWindow :: SimplePlaylistManagementWindow ( // Add the TreeView's view columns: try { entriesView->appendColumn(*getResourceUstring("startColumnLabel"), - modelColumns.startColumn, 120); + modelColumns.startColumn, 80); entriesView->appendColumn(*getResourceUstring("titleColumnLabel"), modelColumns.titleColumn, 200); + entriesView->appendColumn(*getResourceUstring("fadeInColumnLabel"), + modelColumns.fadeInColumn, 80); entriesView->appendColumn(*getResourceUstring("lengthColumnLabel"), - modelColumns.lengthColumn, 120); + modelColumns.lengthColumn, 80); + entriesView->appendColumn(*getResourceUstring("fadeOutColumnLabel"), + modelColumns.fadeOutColumn, 80); statusBar = Gtk::manage(new Gtk::Label("")); } catch (std::invalid_argument &e) { @@ -289,11 +295,28 @@ SimplePlaylistManagementWindow :: showContents(void) throw () row[modelColumns.idColumn] = playable->getId(); row[modelColumns.startColumn] - = to_simple_string(*playlistElem->getRelativeOffset()); + = *TimeConversion::timeDurationToHhMmSsString( + playlistElem->getRelativeOffset()); row[modelColumns.titleColumn] = Glib::Markup::escape_text(*playable->getTitle()); row[modelColumns.lengthColumn] - = to_simple_string(*playable->getPlaylength()); + = *TimeConversion::timeDurationToHhMmSsString( + playable->getPlaylength()); + + Ptr::Ref fadeInfo = playlistElem->getFadeInfo(); + Ptr::Ref fadeIn, fadeOut; + if (fadeInfo) { + fadeIn = fadeInfo->getFadeIn(); + fadeOut = fadeInfo->getFadeOut(); + } + row[modelColumns.fadeInColumn] + = (fadeIn && fadeIn->total_microseconds() != 0) + ? *TimeConversion::timeDurationToHhMmSsString(fadeIn) + : "-"; + row[modelColumns.fadeOutColumn] + = (fadeOut && fadeOut->total_microseconds() != 0) + ? *TimeConversion::timeDurationToHhMmSsString(fadeOut) + : "-"; } } } diff --git a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h index 775f4e689..faf792d35 100644 --- a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h +++ b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.7 $ + Version : $Revision: 1.8 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -87,7 +87,7 @@ using namespace LiveSupport::Widgets; * * * @author $Author: fgerlits $ - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ */ class SimplePlaylistManagementWindow : public WhiteWindow, public LocalizedObject @@ -100,7 +100,7 @@ class SimplePlaylistManagementWindow : public WhiteWindow, * Lists one playlist entry per row. * * @author $Author: fgerlits $ - * @version $Revision: 1.7 $ + * @version $Revision: 1.8 $ */ class ModelColumns : public ZebraTreeModelColumnRecord { @@ -120,11 +120,21 @@ class SimplePlaylistManagementWindow : public WhiteWindow, */ Gtk::TreeModelColumn titleColumn; + /** + * The column for the fade in of the playlist entry. + */ + Gtk::TreeModelColumn fadeInColumn; + /** * The column for the length of the playlist entry. */ Gtk::TreeModelColumn lengthColumn; + /** + * The column for the fade out of the playlist entry. + */ + Gtk::TreeModelColumn fadeOutColumn; + /** * Constructor. */ @@ -133,7 +143,9 @@ class SimplePlaylistManagementWindow : public WhiteWindow, add(idColumn); add(startColumn); add(titleColumn); + add(fadeInColumn); add(lengthColumn); + add(fadeOutColumn); } }; diff --git a/livesupport/products/gLiveSupport/var/root.txt b/livesupport/products/gLiveSupport/var/root.txt index 918d0a70a..6ec65eeea 100644 --- a/livesupport/products/gLiveSupport/var/root.txt +++ b/livesupport/products/gLiveSupport/var/root.txt @@ -108,15 +108,17 @@ root:table { windowTitle:string { "LiveSupport Simple Playlist Management Window" } - startColumnLabel:string { "start" } - titleColumnLabel:string { "title" } - lengthColumnLabel:string { "length" } - nameLabel:string { "name" } - saveButtonLabel:string { "save" } - closeButtonLabel:string { "close" } + startColumnLabel:string { "Start" } + titleColumnLabel:string { "Title" } + lengthColumnLabel:string { "Length" } + fadeInColumnLabel:string { "Fade in" } + fadeOutColumnLabel:string { "Fade out" } + nameLabel:string { "Name" } + saveButtonLabel:string { "Save" } + closeButtonLabel:string { "Close" } statusBar:string { "status bar" } - playlistSavedMsg:string { "saved playlist {0}" } - savePlaylistDialogMsg:string { "Would you like to save the playlist?" } + playlistSavedMsg:string { "Saved playlist ''{0}''." } + savePlaylistDialogMsg:string { "Do you want to save the playlist?" } emptyTitleErrorMsg:string { "Please enter a title." } }