added fade in and fade out columns to playlist editor window
This commit is contained in:
parent
4d1574ca0b
commit
2b368af7ad
3 changed files with 53 additions and 16 deletions
|
@ -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 <iostream>
|
||||
#include <stdexcept>
|
||||
|
||||
#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<FadeInfo>::Ref fadeInfo = playlistElem->getFadeInfo();
|
||||
Ptr<time_duration>::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)
|
||||
: "-";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
|||
* </code></pre>
|
||||
*
|
||||
* @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<Glib::ustring> titleColumn;
|
||||
|
||||
/**
|
||||
* The column for the fade in of the playlist entry.
|
||||
*/
|
||||
Gtk::TreeModelColumn<Glib::ustring> fadeInColumn;
|
||||
|
||||
/**
|
||||
* The column for the length of the playlist entry.
|
||||
*/
|
||||
Gtk::TreeModelColumn<Glib::ustring> lengthColumn;
|
||||
|
||||
/**
|
||||
* The column for the fade out of the playlist entry.
|
||||
*/
|
||||
Gtk::TreeModelColumn<Glib::ustring> fadeOutColumn;
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*/
|
||||
|
@ -133,7 +143,9 @@ class SimplePlaylistManagementWindow : public WhiteWindow,
|
|||
add(idColumn);
|
||||
add(startColumn);
|
||||
add(titleColumn);
|
||||
add(fadeInColumn);
|
||||
add(lengthColumn);
|
||||
add(fadeOutColumn);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -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." }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue