added start and length columns to playlist edit window

This commit is contained in:
maroy 2005-01-11 06:46:00 +00:00
parent dc08d6c938
commit 03488154d8
4 changed files with 28 additions and 4 deletions

View File

@ -22,7 +22,7 @@
Author : $Author: maroy $
Version : $Revision: 1.4 $
Version : $Revision: 1.5 $
Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $
------------------------------------------------------------------------------*/
@ -92,8 +92,12 @@ SimplePlaylistManagementWindow :: SimplePlaylistManagementWindow (
// Add the TreeView's view columns:
try {
entriesView->append_column(*getResourceUstring("startColumnLabel"),
modelColumns.startColumn);
entriesView->append_column(*getResourceUstring("titleColumnLabel"),
modelColumns.titleColumn);
entriesView->append_column(*getResourceUstring("lengthColumnLabel"),
modelColumns.lengthColumn);
} catch (std::invalid_argument &e) {
std::cerr << e.what() << std::endl;
}
@ -198,7 +202,11 @@ SimplePlaylistManagementWindow :: showContents(void) throw ()
Gtk::TreeModel::Row row = *(entriesModel->append());
row[modelColumns.idColumn] = playable->getId();
row[modelColumns.startColumn] =
to_simple_string(*playlistElem->getRelativeOffset());
row[modelColumns.titleColumn] = *playable->getTitle();
row[modelColumns.lengthColumn] =
to_simple_string(*playable->getPlaylength());
it++;
}

View File

@ -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/SimplePlaylistManagementWindow.h,v $
------------------------------------------------------------------------------*/
@ -83,7 +83,7 @@ using namespace LiveSupport::Core;
* </code></pre>
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
* @version $Revision: 1.2 $
*/
class SimplePlaylistManagementWindow : public Gtk::Window,
public LocalizedObject
@ -96,7 +96,7 @@ class SimplePlaylistManagementWindow : public Gtk::Window,
* Lists one playlist entry per row.
*
* @author $Author: maroy $
* @version $Revision: 1.1 $
* @version $Revision: 1.2 $
*/
class ModelColumns : public Gtk::TreeModel::ColumnRecord
{
@ -106,18 +106,30 @@ class SimplePlaylistManagementWindow : public Gtk::Window,
*/
Gtk::TreeModelColumn<Ptr<const UniqueId>::Ref> idColumn;
/**
* The column for the start of the playlist entry.
*/
Gtk::TreeModelColumn<Glib::ustring> startColumn;
/**
* The column for the title of the audio clip or playlist.
*/
Gtk::TreeModelColumn<Glib::ustring> titleColumn;
/**
* The column for the length of the playlist entry.
*/
Gtk::TreeModelColumn<Glib::ustring> lengthColumn;
/**
* Constructor.
*/
ModelColumns(void) throw ()
{
add(idColumn);
add(startColumn);
add(titleColumn);
add(lengthColumn);
}
};

View File

@ -79,7 +79,9 @@ hu:table
{
windowTitle:string { "LiveSupport Egyszerű Playlist Szerkesztő Ablak" }
startColumnLabel:string { "kezdet" }
titleColumnLabel:string { "cím" }
lengthColumnLabel:string { "hossz" }
nameLabel:string { "név" }
saveButtonLabel:string { "elment" }
closeButtonLabel:string { "bezár" }

View File

@ -79,7 +79,9 @@ 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" }