progress towards #1648
This commit is contained in:
parent
255cb4ba06
commit
c4a4053d17
8 changed files with 142 additions and 25 deletions
|
@ -125,16 +125,15 @@ ExportPlaylistWindow :: ExportPlaylistWindow (
|
|||
Gtk::Label * statusBar = Gtk::manage(new Gtk::Label(""));
|
||||
|
||||
Gtk::Box * layout = Gtk::manage(new Gtk::VBox);
|
||||
layout->pack_start(*extraSpace, Gtk::PACK_SHRINK, 5);
|
||||
layout->pack_start(*extraSpace, Gtk::PACK_SHRINK, 5);
|
||||
layout->pack_start(*playlistTitleBox, Gtk::PACK_SHRINK, 5);
|
||||
layout->pack_start(*formatBox, Gtk::PACK_SHRINK, 5);
|
||||
layout->pack_start(*buttonBox, Gtk::PACK_SHRINK, 5);
|
||||
layout->pack_start(*statusBar, Gtk::PACK_SHRINK, 5);
|
||||
layout->pack_start(*formatBox, Gtk::PACK_SHRINK, 0);
|
||||
layout->pack_start(*statusBar, Gtk::PACK_SHRINK, 10);
|
||||
layout->pack_start(*buttonBox, Gtk::PACK_SHRINK, 0);
|
||||
|
||||
add(*layout);
|
||||
|
||||
set_name(windowName);
|
||||
set_default_size(200, 200);
|
||||
show_all();
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@
|
|||
#include "LiveSupport/Core/TimeConversion.h"
|
||||
#include "LiveSupport/Widgets/WidgetFactory.h"
|
||||
#include "SchedulePlaylistWindow.h"
|
||||
#include "ExportPlaylistWindow.h"
|
||||
|
||||
#include "LiveModeWindow.h"
|
||||
|
||||
|
||||
|
@ -182,6 +184,10 @@ LiveModeWindow :: LiveModeWindow (Ptr<GLiveSupport>::Ref gLiveSupport,
|
|||
*getResourceUstring("playMenuItem"),
|
||||
sigc::mem_fun(*this,
|
||||
&LiveModeWindow::onOutputPlay)));
|
||||
contextMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||
*getResourceUstring("exportPlaylistMenuItem"),
|
||||
sigc::mem_fun(*this,
|
||||
&LiveModeWindow::onExportPlaylist)));
|
||||
} catch (std::invalid_argument &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
std::exit(1);
|
||||
|
@ -368,3 +374,27 @@ LiveModeWindow :: onKeyPressed(GdkEventKey * event) throw ()
|
|||
return false;
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Signal handler for "export playlist" in the context menu.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
LiveModeWindow :: onExportPlaylist(void) throw ()
|
||||
{
|
||||
Glib::RefPtr<Gtk::TreeView::Selection>
|
||||
refSelection = treeView->get_selection();
|
||||
Gtk::TreeModel::iterator iter = refSelection->get_selected();
|
||||
|
||||
if (iter) {
|
||||
Ptr<Playable>::Ref playable = (*iter)[modelColumns.playableColumn];
|
||||
Ptr<Playlist>::Ref playlist = playable->getPlaylist();
|
||||
if (playlist) {
|
||||
Ptr<ExportPlaylistWindow>::Ref dialog(new ExportPlaylistWindow(
|
||||
gLiveSupport,
|
||||
gLiveSupport->getBundle("exportPlaylistWindow"),
|
||||
playlist));
|
||||
Gtk::Main::run(*dialog);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -186,6 +186,13 @@ class LiveModeWindow : public GuiWindow
|
|||
bool
|
||||
onKeyPressed(GdkEventKey * event) throw ();
|
||||
|
||||
/**
|
||||
* Signal handler for the "export playlist" menu item selected from
|
||||
* the entry context menu.
|
||||
*/
|
||||
virtual void
|
||||
onExportPlaylist(void) throw ();
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
|
|
|
@ -39,6 +39,8 @@
|
|||
#include "LiveSupport/Widgets/WidgetFactory.h"
|
||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||
#include "SchedulePlaylistWindow.h"
|
||||
#include "ExportPlaylistWindow.h"
|
||||
|
||||
#include "ScratchpadWindow.h"
|
||||
|
||||
|
||||
|
@ -241,6 +243,10 @@ ScratchpadWindow :: ScratchpadWindow (
|
|||
*getResourceUstring("addToLiveModeMenuItem"),
|
||||
sigc::mem_fun(*this,
|
||||
&ScratchpadWindow::onAddToLiveMode)));
|
||||
playlistMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||
*getResourceUstring("exportPlaylistMenuItem"),
|
||||
sigc::mem_fun(*this,
|
||||
&ScratchpadWindow::onExportPlaylist)));
|
||||
} catch (std::invalid_argument &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
std::exit(1);
|
||||
|
@ -483,6 +489,25 @@ ScratchpadWindow :: onAddToLiveMode(void) throw ()
|
|||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Signal handler for "export playlist" in the context menu.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
ScratchpadWindow :: onExportPlaylist(void) throw ()
|
||||
{
|
||||
Ptr<Playable>::Ref playable = currentRow[modelColumns.playableColumn];
|
||||
Ptr<Playlist>::Ref playlist = playable->getPlaylist();
|
||||
|
||||
if (playlist) {
|
||||
Ptr<ExportPlaylistWindow>::Ref dialog(new ExportPlaylistWindow(
|
||||
gLiveSupport,
|
||||
gLiveSupport->getBundle("exportPlaylistWindow"),
|
||||
playlist));
|
||||
Gtk::Main::run(*dialog);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Signal handler for the user double-clicking or pressing Enter.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -307,6 +307,13 @@ class ScratchpadWindow : public GuiWindow,
|
|||
virtual void
|
||||
onAddToLiveMode(void) throw ();
|
||||
|
||||
/**
|
||||
* Signal handler for the "export playlist" menu item selected from
|
||||
* the entry context menu.
|
||||
*/
|
||||
virtual void
|
||||
onExportPlaylist(void) throw ();
|
||||
|
||||
|
||||
public:
|
||||
/**
|
||||
|
|
|
@ -42,6 +42,8 @@
|
|||
#include "LiveSupport/Widgets/ScrolledNotebook.h"
|
||||
#include "LiveSupport/Widgets/Button.h"
|
||||
#include "LiveSupport/Widgets/ZebraTreeView.h"
|
||||
#include "ExportPlaylistWindow.h"
|
||||
|
||||
#include "SearchWindow.h"
|
||||
|
||||
|
||||
|
@ -273,6 +275,10 @@ SearchWindow :: constructSearchResultsView(void) throw ()
|
|||
*getResourceUstring("addToLiveModeMenuItem"),
|
||||
sigc::mem_fun(*this,
|
||||
&SearchWindow::onAddToLiveMode)));
|
||||
contextMenuList.push_back(Gtk::Menu_Helpers::MenuElem(
|
||||
*getResourceUstring("exportPlaylistMenuItem"),
|
||||
sigc::mem_fun(*this,
|
||||
&SearchWindow::onExportPlaylist)));
|
||||
} catch (std::invalid_argument &e) {
|
||||
std::cerr << e.what() << std::endl;
|
||||
std::exit(1);
|
||||
|
@ -478,6 +484,30 @@ SearchWindow :: onAddToLiveMode(void) throw ()
|
|||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Signal handler for "export playlist" in the context menu.
|
||||
*----------------------------------------------------------------------------*/
|
||||
void
|
||||
SearchWindow :: onExportPlaylist(void) throw ()
|
||||
{
|
||||
Glib::RefPtr<Gtk::TreeView::Selection>
|
||||
refSelection = searchResults->get_selection();
|
||||
Gtk::TreeModel::iterator iter = refSelection->get_selected();
|
||||
|
||||
if (iter) {
|
||||
Ptr<Playable>::Ref playable = (*iter)[modelColumns.playableColumn];
|
||||
Ptr<Playlist>::Ref playlist = playable->getPlaylist();
|
||||
if (playlist) {
|
||||
Ptr<ExportPlaylistWindow>::Ref dialog(new ExportPlaylistWindow(
|
||||
gLiveSupport,
|
||||
gLiveSupport->getBundle("exportPlaylistWindow"),
|
||||
playlist));
|
||||
Gtk::Main::run(*dialog);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* Signal handler for the user double-clicking or pressing Enter.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
|
|
@ -187,6 +187,13 @@ class SearchWindow : public GuiWindow
|
|||
void
|
||||
onAddToLiveMode(void) throw ();
|
||||
|
||||
/**
|
||||
* Signal handler for the "export playlist" menu item selected from
|
||||
* the entry context menu.
|
||||
*/
|
||||
virtual void
|
||||
onExportPlaylist(void) throw ();
|
||||
|
||||
/**
|
||||
* The columns model needed by Gtk::TreeView.
|
||||
* Lists one clip per row.
|
||||
|
|
|
@ -67,17 +67,15 @@ root:table
|
|||
clearListButtonLabel:string { "Clear list" }
|
||||
removeButtonLabel:string { "Remove item(s)" }
|
||||
|
||||
upMenuItem:string { "Move _Up" }
|
||||
downMenuItem:string { "Move D_own" }
|
||||
removeMenuItem:string { "_Remove" }
|
||||
editPlaylistMenuItem:string { "_Edit" }
|
||||
addToPlaylistMenuItem:string
|
||||
{ "_Add To Playlist" }
|
||||
schedulePlaylistMenuItem:string
|
||||
{ "_Schedule" }
|
||||
cueMenuItem:string { "Pre_view" }
|
||||
addToLiveModeMenuItem:string
|
||||
{ "Add To _Live Mode" }
|
||||
upMenuItem:string { "Move _Up" }
|
||||
downMenuItem:string { "Move D_own" }
|
||||
removeMenuItem:string { "_Remove" }
|
||||
editPlaylistMenuItem:string { "_Edit" }
|
||||
addToPlaylistMenuItem:string { "_Add To Playlist" }
|
||||
schedulePlaylistMenuItem:string { "_Schedule" }
|
||||
cueMenuItem:string { "Pre_view" }
|
||||
addToLiveModeMenuItem:string { "Add To _Live Mode" }
|
||||
exportPlaylistMenuItem:string { "E_xport Playlist" }
|
||||
|
||||
cannotEditPlaylistMsg:string
|
||||
{ "Could not open playlist for editing." }
|
||||
|
@ -192,10 +190,9 @@ root:table
|
|||
|
||||
allStringForBrowse { "--- all ---" }
|
||||
|
||||
addToScratchpadMenuItem:string
|
||||
{ "_Add To Scratchpad" }
|
||||
addToLiveModeMenuItem:string
|
||||
{ "Add To _Live Mode" }
|
||||
addToScratchpadMenuItem:string { "_Add To Scratchpad" }
|
||||
addToLiveModeMenuItem:string { "Add To _Live Mode" }
|
||||
exportPlaylistMenuItem:string { "E_xport Playlist" }
|
||||
}
|
||||
|
||||
advancedSearchEntry:table {
|
||||
|
@ -219,11 +216,12 @@ root:table
|
|||
{
|
||||
windowTitle:string { "Live Mode" }
|
||||
|
||||
cueMenuItem:string { "Pre_view" }
|
||||
upMenuItem:string { "Move _Up" }
|
||||
downMenuItem:string { "Move D_own" }
|
||||
removeMenuItem:string { "_Remove" }
|
||||
playMenuItem:string { "_Play" }
|
||||
cueMenuItem:string { "Pre_view" }
|
||||
upMenuItem:string { "Move _Up" }
|
||||
downMenuItem:string { "Move D_own" }
|
||||
removeMenuItem:string { "_Remove" }
|
||||
playMenuItem:string { "_Play" }
|
||||
exportPlaylistMenuItem:string { "E_xport Playlist" }
|
||||
|
||||
cuePlayerLabel:string { "Preview" }
|
||||
}
|
||||
|
@ -306,6 +304,20 @@ root:table
|
|||
minuteLabel:string { "minute:" }
|
||||
}
|
||||
|
||||
exportPlaylistWindow:table
|
||||
{
|
||||
windowTitle:string { "Export Playlist" }
|
||||
|
||||
playlistTitleLabel:string { "Title:" }
|
||||
formatLabel:string { "Export as:" }
|
||||
|
||||
cancelButtonLabel:string { "Cancel" }
|
||||
saveButtonLabel:string { "Save" }
|
||||
|
||||
internalFormatName:string { "LiveSupport archive" }
|
||||
smilFormatName:string { "tar containing a SMIL" }
|
||||
}
|
||||
|
||||
metadataTypes:table
|
||||
{
|
||||
title:string { "Title" }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue