diff --git a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx index 058f92eb4..7e0caea52 100644 --- a/livesupport/products/gLiveSupport/src/GLiveSupport.cxx +++ b/livesupport/products/gLiveSupport/src/GLiveSupport.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.56 $ + Version : $Revision: 1.57 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/GLiveSupport.cxx,v $ ------------------------------------------------------------------------------*/ @@ -646,6 +646,8 @@ GLiveSupport :: openPlaylistForEditing(Ptr::Ref playlistId) editedPlaylist = storage->editPlaylist(sessionId, playlistId); editedPlaylist->createSavedCopy(); + masterPanel->updateSimplePlaylistMgmtWindow(); + return editedPlaylist; } diff --git a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx index 7198a017a..a91d4484d 100644 --- a/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx +++ b/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.25 $ + Version : $Revision: 1.26 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -187,6 +187,10 @@ ScratchpadWindow :: ScratchpadWindow (Ptr::Ref gLiveSupport, // register the signal handlers for the popup menu try{ + playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( + *getResourceUstring("editPlaylistMenuItem"), + sigc::mem_fun(*this, + &ScratchpadWindow::onEditPlaylist))); playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem( *getResourceUstring("addToPlaylistMenuItem"), sigc::mem_fun(*this, @@ -283,7 +287,7 @@ ScratchpadWindow :: showContents(void) throw () /*------------------------------------------------------------------------------ - * Event handler for the create playlist button getting clicked. + * Event handler for the add to playlist button getting clicked. *----------------------------------------------------------------------------*/ void ScratchpadWindow :: onAddToPlaylistButtonClicked (void) throw () @@ -495,6 +499,18 @@ ScratchpadWindow :: removeItem(Ptr::Ref id) throw () } +/*------------------------------------------------------------------------------ + * Event handler for the Edit Playlist menu item selected from the + * entry conext menu + *----------------------------------------------------------------------------*/ +void +ScratchpadWindow :: onEditPlaylist(void) throw () +{ + Ptr::Ref playable = currentRow[modelColumns.playableColumn]; + gLiveSupport->openPlaylistForEditing(playable->getId()); +} + + /*------------------------------------------------------------------------------ * Event handler for the Add To Playlist menu item selected from the * entry conext menu diff --git a/livesupport/products/gLiveSupport/src/ScratchpadWindow.h b/livesupport/products/gLiveSupport/src/ScratchpadWindow.h index 96b18fa45..32ed3b24f 100644 --- a/livesupport/products/gLiveSupport/src/ScratchpadWindow.h +++ b/livesupport/products/gLiveSupport/src/ScratchpadWindow.h @@ -22,7 +22,7 @@ Author : $Author: fgerlits $ - Version : $Revision: 1.9 $ + Version : $Revision: 1.10 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/ScratchpadWindow.h,v $ ------------------------------------------------------------------------------*/ @@ -73,7 +73,7 @@ using namespace LiveSupport::Widgets; * playlists. * * @author $Author: fgerlits $ - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ */ class ScratchpadWindow : public WhiteWindow, public LocalizedObject @@ -87,7 +87,7 @@ class ScratchpadWindow : public WhiteWindow, * Lists one clip per row. * * @author $Author: fgerlits $ - * @version $Revision: 1.9 $ + * @version $Revision: 1.10 $ */ class ModelColumns : public PlayableTreeModelColumnRecord { @@ -243,6 +243,13 @@ class ScratchpadWindow : public WhiteWindow, virtual void onDownItem(void) throw (); + /** + * Signal handler for the "edit playlist" menu item selected from + * the entry context menu. + */ + virtual void + onEditPlaylist(void) throw (); + /** * Signal handler for the "add to playlist" menu item selected from * the entry context menu. diff --git a/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx b/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx index 6accf1d98..bfc3ff29f 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.20 $ + Version : $Revision: 1.21 $ Location : $Source: /home/paul/cvs2svn-livesupport/newcvsrepo/livesupport/products/gLiveSupport/src/SimplePlaylistManagementWindow.cxx,v $ ------------------------------------------------------------------------------*/ @@ -294,6 +294,7 @@ SimplePlaylistManagementWindow :: showContents(void) throw () playlist = gLiveSupport->getEditedPlaylist(); if (playlist) { + nameEntry->set_text(*playlist->getTitle()); entriesModel->clear(); rowNumber = 0; for (it = playlist->begin(); it != playlist->end(); ++it) { @@ -380,6 +381,9 @@ SimplePlaylistManagementWindow :: onFadeInfoEdited( return; // should never happen } + Ptr::Ref title(new Glib::ustring(nameEntry->get_text())); + playlist->setTitle(title); // this is stupid; TODO: fix it + showContents(); } diff --git a/livesupport/products/gLiveSupport/var/root.txt b/livesupport/products/gLiveSupport/var/root.txt index 6ec65eeea..470c27870 100644 --- a/livesupport/products/gLiveSupport/var/root.txt +++ b/livesupport/products/gLiveSupport/var/root.txt @@ -60,8 +60,9 @@ root:table upMenuItem:string { "Move _Up" } downMenuItem:string { "Move D_own" } removeMenuItem:string { "_Remove" } + editPlaylistMenuItem:string { "_Edit" } addToPlaylistMenuItem:string { "_Add To Playlist" } - schedulePlaylistMenuItem:string { "_Schedule Playlist" } + schedulePlaylistMenuItem:string { "_Schedule" } cueMenuItem:string { "Pre_view" } addToLiveModeMenuItem:string { "Add To _Live Mode" } }