diff --git a/src/gui/ctrl/playback-controller.cpp b/src/gui/ctrl/playback-controller.cpp
index c78ee2fd4..8bba5ae21 100644
--- a/src/gui/ctrl/playback-controller.cpp
+++ b/src/gui/ctrl/playback-controller.cpp
@@ -28,15 +28,36 @@
namespace gui {
-namespace controller {
+namespace ctrl {
+
+ namespace error = lumiera::error;
PlaybackController::PlaybackController()
: playing_(false)
, viewerHandle_(0)
- { }
+ {
+ instance = this; ////////////////////////////////////////////////////////TICKET #1067 shitty workaround to allow disentangling of top-level
+ }
+ PlaybackController::~PlaybackController()
+ {
+ instance = nullptr; ////////////////////////////////////////////////////////TICKET #1067 shitty workaround to allow disentangling of top-level
+ }
+
+
+ PlaybackController* PlaybackController::instance; ////////////////////////////////////////////////////////TICKET #1067 shitty workaround to allow disentangling of top-level
+
+ PlaybackController&
+ PlaybackController::get() ////////////////////////////////////////////////////////TICKET #1067 shitty workaround to allow disentangling of top-level
+ {
+ if (not instance)
+ throw error::Logic ("GTK UI is not in running state"
+ , error::LUMIERA_ERROR_LIFECYCLE);
+
+ return *instance;
+ }
void
PlaybackController::play()
diff --git a/src/gui/ctrl/playback-controller.hpp b/src/gui/ctrl/playback-controller.hpp
index 844676bee..fea13e498 100644
--- a/src/gui/ctrl/playback-controller.hpp
+++ b/src/gui/ctrl/playback-controller.hpp
@@ -22,7 +22,17 @@
/** @file controller/playback-controller.hpp
- ** This file contains the definition of the playback controller object
+ ** This file contains the definition of the playback controller object.
+ **
+ ** @deprecated this represents an early design of playback and will be reworked
+ ** @remarks what we actually need is a PlaybackController as a shell or proxy
+ ** to maintain a flexible link to ongoing processes in the core. But note,
+ ** this is also related to the Displayer service, which needs to be offered
+ ** by the UI, so we create a mutual dependency here, and there is not much
+ ** that can be done about this.
+ ** @warning as a temporary solution, 1/2017 the playback controller was moved
+ ** into the viewer panel. Of course it can not work that way....
+ ** @todo create a durable PlaybacController design //////////////////////////////////////////////////////TICKET #1072
*/
@@ -37,10 +47,11 @@
namespace gui {
-namespace controller {
+namespace ctrl {
+ /** @deprecated we need a durable design for the playback process */
class PlaybackController
: boost::noncopyable
{
@@ -51,9 +62,14 @@ namespace controller {
LumieraDisplaySlot viewerHandle_;
+ static PlaybackController* instance; ///////////////////////////////////////////////////////////////////TICKET #1067 shitty workaround to allow disentangling of top-level
+
public:
PlaybackController();
+ ~PlaybackController();
+
+ static PlaybackController& get(); ///////////////////////////////////////////////////////////////////TICKET #1067 shitty workaround to allow disentangling of top-level
void play();
void pause();
@@ -70,6 +86,6 @@ namespace controller {
};
-}} // namespace gui::controller
+}} // namespace gui::ctrl
#endif // PLAYBACK_CONTROLLER_HPP
diff --git a/src/gui/gtk-lumiera.cpp b/src/gui/gtk-lumiera.cpp
index 47b1a47d2..e5dbabccc 100644
--- a/src/gui/gtk-lumiera.cpp
+++ b/src/gui/gtk-lumiera.cpp
@@ -109,7 +109,7 @@ namespace gui {
WindowList&
- GtkLumiera::windowManager()
+ GtkLumiera::windowManager() /////////////////////////////////////////TICKET #1048 : last Blocker is Actions::onMenu_window_new_window()
{
if (not windowManagerInstance_)
throw error::Logic ("GTK UI is not in running state"
diff --git a/src/gui/panel/timeline-panel-obsolete.cpp b/src/gui/panel/timeline-panel-obsolete.cpp
index f16cbf1ba..795a73b6d 100644
--- a/src/gui/panel/timeline-panel-obsolete.cpp
+++ b/src/gui/panel/timeline-panel-obsolete.cpp
@@ -24,8 +24,8 @@
#include "gui/gtk-lumiera.hpp"
#include "gui/panel/timeline-panel-obsolete.hpp"
#include "gui/widget/timeline/timeline-zoom-scale.hpp"
-
#include "gui/workspace/workspace-window.hpp"
+#include "gui/ctrl/playback-controller.hpp"
#include "gui/model/project.hpp"
#include "gui/ui-bus.hpp"
@@ -39,6 +39,8 @@ using namespace gui::widget;
using namespace gui::widget::timeline;
using namespace gui::model;
+using gui::controller::Controller;
+using gui::ctrl::PlaybackController;
using std::shared_ptr;
using std::weak_ptr;
using util::contains;
@@ -175,7 +177,7 @@ namespace panel {
void
TimelinePanelObsolete::on_stop()
{
- getController().get_playback_controller().stop();
+ PlaybackController::get().stop();
updatePlaybackButtons();
}
@@ -346,19 +348,19 @@ namespace panel {
void
TimelinePanelObsolete::play()
{
- getController().get_playback_controller().play();
+ PlaybackController::get().play();
}
void
TimelinePanelObsolete::pause()
{
- getController().get_playback_controller().pause();
+ PlaybackController::get().pause();
}
bool
TimelinePanelObsolete::is_playing()
{
- return getController().get_playback_controller().is_playing();
+ return PlaybackController::get().is_playing();
}
void
diff --git a/src/gui/panel/viewer-panel.cpp b/src/gui/panel/viewer-panel.cpp
index 7aa0704e4..16bf01e63 100644
--- a/src/gui/panel/viewer-panel.cpp
+++ b/src/gui/panel/viewer-panel.cpp
@@ -25,7 +25,6 @@
#include "gui/workspace/workspace-window.hpp"
#include "gui/ui-bus.hpp" ///////////////////////////////////TODO why are we forced to include this after workspace-window.hpp ?? Ambiguity between std::ref and boost::reference_wrapper
-#include "gui/ctrl/playback-controller.hpp"
#include "gui/display-service.hpp"
@@ -39,14 +38,13 @@ namespace panel {
ViewerPanel::ViewerPanel (workspace::PanelManager& panelManager
,Gdl::DockItem& dockItem)
: Panel(panelManager, dockItem, getTitle(), getStockID())
+ , playbackController_{}
{
//----- Pack in the Widgets -----//
pack_start(display_, PACK_EXPAND_WIDGET);
- PlaybackController& playback(getController().get_playback_controller());
-
FrameDestination outputDestination (sigc::mem_fun(this, &ViewerPanel::on_frame));
- playback.useDisplay (DisplayService::setUp (outputDestination));
+ playbackController_.useDisplay (DisplayService::setUp (outputDestination));
}
const char*
diff --git a/src/gui/panel/viewer-panel.hpp b/src/gui/panel/viewer-panel.hpp
index 3eed3d0f9..f26b1c5a9 100644
--- a/src/gui/panel/viewer-panel.hpp
+++ b/src/gui/panel/viewer-panel.hpp
@@ -31,6 +31,7 @@
#include "gui/panel/panel.hpp"
#include "gui/widget/video-display-widget.hpp"
+#include "gui/ctrl/playback-controller.hpp"
namespace gui {
namespace panel{
@@ -41,6 +42,8 @@ namespace panel{
class ViewerPanel
: public Panel
{
+ ctrl::PlaybackController playbackController_;
+
public:
ViewerPanel (workspace::PanelManager&, Gdl::DockItem&);
diff --git a/src/gui/ui-bus.cpp b/src/gui/ui-bus.cpp
index 9ffce8449..69ed41f70 100644
--- a/src/gui/ui-bus.cpp
+++ b/src/gui/ui-bus.cpp
@@ -51,7 +51,7 @@ namespace controller {
- PlaybackController& Controller::get_playback_controller()
+ ctrl::PlaybackController& Controller::get_playback_controller()
{
return playback_;
}
diff --git a/src/gui/ui-bus.hpp b/src/gui/ui-bus.hpp
index e1d473c50..68c9a6b0f 100644
--- a/src/gui/ui-bus.hpp
+++ b/src/gui/ui-bus.hpp
@@ -126,12 +126,12 @@ namespace gui {
class Controller
{
model::Project& project_;
- PlaybackController playback_;
+ ctrl::PlaybackController playback_;
public:
Controller (model::Project&);
- PlaybackController& get_playback_controller();
+ ctrl::PlaybackController& get_playback_controller();
};
}// namespace gui::controller
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm
index 18da8a9e4..af7bdd840 100644
--- a/wiki/thinkPad.ichthyo.mm
+++ b/wiki/thinkPad.ichthyo.mm
@@ -1664,6 +1664,14 @@
+
+
+
+
+
+
+
+
@@ -1728,7 +1736,8 @@
-
+
+