From 7a5ed1220d18b3fe2db1be455fa86fa28d1dbc04 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 27 Dec 2010 05:50:40 +0100 Subject: [PATCH 01/10] Replace relative #include paths with absolute paths. --- src/gui/dialogs/name-chooser.cpp | 2 +- src/gui/dialogs/name-chooser.hpp | 2 +- src/gui/dialogs/preferences-dialog.cpp | 2 +- src/gui/dialogs/preferences-dialog.hpp | 2 +- src/gui/dialogs/render.cpp | 2 +- src/gui/dialogs/render.hpp | 2 +- src/gui/model/track.hpp | 2 +- src/gui/output/displayer.cpp | 2 +- src/gui/output/gdkdisplayer.cpp | 2 +- src/gui/output/xvdisplayer.cpp | 2 +- src/gui/panels/assets-panel.cpp | 2 +- src/gui/panels/panel.cpp | 10 ++++++---- src/gui/panels/panel.hpp | 4 ++-- src/gui/panels/timeline-panel.cpp | 10 +++++----- src/gui/panels/timeline-panel.hpp | 4 ++-- src/gui/panels/viewer-panel.cpp | 12 ++++++------ src/gui/panels/viewer-panel.hpp | 2 +- src/gui/util/rectangle.hpp | 2 +- src/gui/widgets/panel-bar.cpp | 8 ++++---- src/gui/widgets/timecode-widget.cpp | 2 +- src/gui/widgets/timeline-widget.hpp | 2 +- src/gui/widgets/timeline/timeline-body.cpp | 6 +++--- src/gui/widgets/timeline/timeline-body.hpp | 2 +- src/gui/widgets/timeline/timeline-clip-track.hpp | 2 +- src/gui/widgets/timeline/timeline-clip.hpp | 4 ++-- src/gui/widgets/timeline/timeline-group-track.cpp | 2 +- src/gui/widgets/timeline/timeline-group-track.hpp | 2 +- .../widgets/timeline/timeline-header-container.cpp | 4 ++-- .../widgets/timeline/timeline-header-container.hpp | 2 +- src/gui/widgets/timeline/timeline-header-widget.cpp | 4 ++-- src/gui/widgets/timeline/timeline-header-widget.hpp | 2 +- src/gui/widgets/timeline/timeline-ibeam-tool.cpp | 2 +- src/gui/widgets/timeline/timeline-layout-helper.cpp | 6 +++--- src/gui/widgets/timeline/timeline-layout-helper.hpp | 4 ++-- src/gui/widgets/timeline/timeline-ruler.cpp | 8 ++++---- src/gui/widgets/timeline/timeline-ruler.hpp | 2 +- src/gui/widgets/timeline/timeline-tool.cpp | 2 +- src/gui/widgets/timeline/timeline-tool.hpp | 2 +- src/gui/widgets/timeline/timeline-track.cpp | 6 +++--- src/gui/widgets/timeline/timeline-track.hpp | 10 +++++----- src/gui/widgets/timeline/timeline-view-window.cpp | 2 +- src/gui/widgets/timeline/timeline-view-window.hpp | 2 +- src/gui/widgets/video-display-widget.cpp | 7 +++---- src/gui/widgets/video-display-widget.hpp | 2 +- src/gui/workspace/actions.cpp | 10 +++++----- src/gui/workspace/actions.hpp | 2 +- src/gui/workspace/panel-manager.cpp | 6 +++--- src/gui/workspace/panel-manager.hpp | 2 +- src/gui/workspace/workspace-window.cpp | 2 +- src/gui/workspace/workspace-window.hpp | 6 +++--- 50 files changed, 96 insertions(+), 95 deletions(-) diff --git a/src/gui/dialogs/name-chooser.cpp b/src/gui/dialogs/name-chooser.cpp index c61527be8..634f2bd07 100644 --- a/src/gui/dialogs/name-chooser.cpp +++ b/src/gui/dialogs/name-chooser.cpp @@ -20,7 +20,7 @@ * *****************************************************/ -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "name-chooser.hpp" #include "dialog.hpp" diff --git a/src/gui/dialogs/name-chooser.hpp b/src/gui/dialogs/name-chooser.hpp index 0794e6427..52a156c03 100644 --- a/src/gui/dialogs/name-chooser.hpp +++ b/src/gui/dialogs/name-chooser.hpp @@ -27,7 +27,7 @@ #ifndef NAME_CHOOSER_H #define NAME_CHOOSER_H -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace dialogs { diff --git a/src/gui/dialogs/preferences-dialog.cpp b/src/gui/dialogs/preferences-dialog.cpp index 4db367360..183b4858d 100644 --- a/src/gui/dialogs/preferences-dialog.cpp +++ b/src/gui/dialogs/preferences-dialog.cpp @@ -20,7 +20,7 @@ * *****************************************************/ -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "preferences-dialog.hpp" #include "dialog.hpp" diff --git a/src/gui/dialogs/preferences-dialog.hpp b/src/gui/dialogs/preferences-dialog.hpp index 62a37ed07..1ba7d7f27 100644 --- a/src/gui/dialogs/preferences-dialog.hpp +++ b/src/gui/dialogs/preferences-dialog.hpp @@ -27,7 +27,7 @@ #ifndef PREFERENCES_DIALOG_HPP #define PREFERENCES_DIALOG_HPP -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace dialogs { diff --git a/src/gui/dialogs/render.cpp b/src/gui/dialogs/render.cpp index 6178c014c..e4a9b774b 100644 --- a/src/gui/dialogs/render.cpp +++ b/src/gui/dialogs/render.cpp @@ -20,7 +20,7 @@ * *****************************************************/ -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "render.hpp" #include "dialog.hpp" diff --git a/src/gui/dialogs/render.hpp b/src/gui/dialogs/render.hpp index 8d586c398..470cc5ae8 100644 --- a/src/gui/dialogs/render.hpp +++ b/src/gui/dialogs/render.hpp @@ -27,7 +27,7 @@ #ifndef RENDER_HPP #define RENDER_HPP -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace dialogs { diff --git a/src/gui/model/track.hpp b/src/gui/model/track.hpp index 6dc5d2b71..7517219a7 100644 --- a/src/gui/model/track.hpp +++ b/src/gui/model/track.hpp @@ -24,7 +24,7 @@ ** represents a track, and wraps proc layer data */ -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #ifndef TRACK_HPP #define TRACK_HPP diff --git a/src/gui/output/displayer.cpp b/src/gui/output/displayer.cpp index 251279a9a..fc82ebb3e 100644 --- a/src/gui/output/displayer.cpp +++ b/src/gui/output/displayer.cpp @@ -22,7 +22,7 @@ * *****************************************************/ -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "displayer.hpp" #include "xvdisplayer.hpp" #include "gdkdisplayer.hpp" diff --git a/src/gui/output/gdkdisplayer.cpp b/src/gui/output/gdkdisplayer.cpp index 1d6f96214..e07f4717b 100644 --- a/src/gui/output/gdkdisplayer.cpp +++ b/src/gui/output/gdkdisplayer.cpp @@ -22,7 +22,7 @@ * *****************************************************/ -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include #include diff --git a/src/gui/output/xvdisplayer.cpp b/src/gui/output/xvdisplayer.cpp index 4c0780101..f9aa71553 100644 --- a/src/gui/output/xvdisplayer.cpp +++ b/src/gui/output/xvdisplayer.cpp @@ -22,7 +22,7 @@ * *****************************************************/ -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include diff --git a/src/gui/panels/assets-panel.cpp b/src/gui/panels/assets-panel.cpp index 45d4887ee..12010d31c 100644 --- a/src/gui/panels/assets-panel.cpp +++ b/src/gui/panels/assets-panel.cpp @@ -20,7 +20,7 @@ * *****************************************************/ -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "assets-panel.hpp" namespace gui { diff --git a/src/gui/panels/panel.cpp b/src/gui/panels/panel.cpp index 4db7a2ff2..4a72e82ff 100644 --- a/src/gui/panels/panel.cpp +++ b/src/gui/panels/panel.cpp @@ -20,12 +20,14 @@ * *****************************************************/ -#include "panel.hpp" -#include "../gtk-lumiera.hpp" -#include "../workspace/panel-manager.hpp" -#include "../workspace/workspace-window.hpp" #include +#include "gui/gtk-lumiera.hpp" +#include "gui/workspace/panel-manager.hpp" +#include "gui/workspace/workspace-window.hpp" + +#include "panel.hpp" + using namespace Gtk; namespace gui { diff --git a/src/gui/panels/panel.hpp b/src/gui/panels/panel.hpp index 5b0ed2afe..0dd39e1e5 100644 --- a/src/gui/panels/panel.hpp +++ b/src/gui/panels/panel.hpp @@ -27,10 +27,10 @@ #ifndef PANEL_HPP #define PANEL_HPP -#include "../gtk-lumiera.hpp" #include -#include "../widgets/panel-bar.hpp" +#include "gui/gtk-lumiera.hpp" +#include "gui/widgets/panel-bar.hpp" namespace gui { diff --git a/src/gui/panels/timeline-panel.cpp b/src/gui/panels/timeline-panel.cpp index 5f564dd90..5c79bbe44 100644 --- a/src/gui/panels/timeline-panel.cpp +++ b/src/gui/panels/timeline-panel.cpp @@ -22,15 +22,15 @@ #include -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "timeline-panel.hpp" -#include "../workspace/workspace-window.hpp" -#include "../model/project.hpp" -#include "../controller/controller.hpp" +#include "gui/workspace/workspace-window.hpp" +#include "gui/model/project.hpp" +#include "gui/controller/controller.hpp" extern "C" { -#include "../../lib/time.h" +#include "lib/time.h" } using namespace Gtk; diff --git a/src/gui/panels/timeline-panel.hpp b/src/gui/panels/timeline-panel.hpp index 75df50cd5..afd3b9faa 100644 --- a/src/gui/panels/timeline-panel.hpp +++ b/src/gui/panels/timeline-panel.hpp @@ -27,8 +27,8 @@ #define TIMELINE_PANEL_HPP #include "panel.hpp" -#include "../widgets/timecode-widget.hpp" -#include "../widgets/timeline-widget.hpp" +#include "gui/widgets/timecode-widget.hpp" +#include "gui/widgets/timeline-widget.hpp" using namespace gui::widgets; diff --git a/src/gui/panels/viewer-panel.cpp b/src/gui/panels/viewer-panel.cpp index 01a94934f..692f82308 100644 --- a/src/gui/panels/viewer-panel.cpp +++ b/src/gui/panels/viewer-panel.cpp @@ -20,14 +20,14 @@ * *****************************************************/ -#include "../gtk-lumiera.hpp" -#include "viewer-panel.hpp" - -#include "../workspace/workspace-window.hpp" -#include "../controller/controller.hpp" -#include "../controller/playback-controller.hpp" +#include "gui/gtk-lumiera.hpp" +#include "gui/controller/controller.hpp" +#include "gui/controller/playback-controller.hpp" #include "gui/display-service.hpp" +#include "gui/workspace/workspace-window.hpp" + +#include "viewer-panel.hpp" using namespace Gtk; using namespace gui::widgets; diff --git a/src/gui/panels/viewer-panel.hpp b/src/gui/panels/viewer-panel.hpp index fd234a823..3a8e23b28 100644 --- a/src/gui/panels/viewer-panel.hpp +++ b/src/gui/panels/viewer-panel.hpp @@ -29,7 +29,7 @@ #include #include "panel.hpp" -#include "../widgets/video-display-widget.hpp" +#include "gui/widgets/video-display-widget.hpp" namespace gui { namespace panels { diff --git a/src/gui/util/rectangle.hpp b/src/gui/util/rectangle.hpp index ae77d2305..eb4110e83 100644 --- a/src/gui/util/rectangle.hpp +++ b/src/gui/util/rectangle.hpp @@ -27,7 +27,7 @@ #ifndef RECTANGLE_HPP #define RECTANGLE_HPP -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace util { diff --git a/src/gui/widgets/panel-bar.cpp b/src/gui/widgets/panel-bar.cpp index 7b41a4d32..94464e70d 100644 --- a/src/gui/widgets/panel-bar.cpp +++ b/src/gui/widgets/panel-bar.cpp @@ -21,10 +21,10 @@ * *****************************************************/ #include "panel-bar.hpp" -#include "../workspace/workspace-window.hpp" -#include "../workspace/panel-manager.hpp" -#include "../panels/panel.hpp" -#include "../util/rectangle.hpp" +#include "gui/workspace/workspace-window.hpp" +#include "gui/workspace/panel-manager.hpp" +#include "gui/panels/panel.hpp" +#include "gui/util/rectangle.hpp" #include #include diff --git a/src/gui/widgets/timecode-widget.cpp b/src/gui/widgets/timecode-widget.cpp index b43c9087f..fbf9c1eee 100644 --- a/src/gui/widgets/timecode-widget.cpp +++ b/src/gui/widgets/timecode-widget.cpp @@ -31,7 +31,7 @@ #include #include "timecode-widget.hpp" -#include "../util/convert.hpp" +#include "gui/util/convert.hpp" using namespace sigc; using namespace Gtk; diff --git a/src/gui/widgets/timeline-widget.hpp b/src/gui/widgets/timeline-widget.hpp index 2278f5ca9..ee9cd184a 100644 --- a/src/gui/widgets/timeline-widget.hpp +++ b/src/gui/widgets/timeline-widget.hpp @@ -37,7 +37,7 @@ #include "timeline/timeline-clip-track.hpp" #include "timeline/timeline-layout-helper.hpp" -#include "../model/sequence.hpp" +#include "gui/model/sequence.hpp" namespace gui { namespace widgets { diff --git a/src/gui/widgets/timeline/timeline-body.cpp b/src/gui/widgets/timeline/timeline-body.cpp index 0143ea627..35a58f011 100644 --- a/src/gui/widgets/timeline/timeline-body.cpp +++ b/src/gui/widgets/timeline/timeline-body.cpp @@ -24,9 +24,9 @@ #include #include "timeline-body.hpp" -#include "../timeline-widget.hpp" -#include "../../window-manager.hpp" -#include "../../util/cairo-util.hpp" +#include "gui/widgets/timeline-widget.hpp" +#include "gui/window-manager.hpp" +#include "gui/util/cairo-util.hpp" #include "timeline-arrow-tool.hpp" #include "timeline-ibeam-tool.hpp" diff --git a/src/gui/widgets/timeline/timeline-body.hpp b/src/gui/widgets/timeline/timeline-body.hpp index 71e22520b..f9adee189 100644 --- a/src/gui/widgets/timeline/timeline-body.hpp +++ b/src/gui/widgets/timeline/timeline-body.hpp @@ -26,7 +26,7 @@ #ifndef TIMELINE_BODY_HPP #define TIMELINE_BODY_HPP -#include "../../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "timeline-tool.hpp" namespace gui { diff --git a/src/gui/widgets/timeline/timeline-clip-track.hpp b/src/gui/widgets/timeline/timeline-clip-track.hpp index 90f63fc7d..a0c630018 100644 --- a/src/gui/widgets/timeline/timeline-clip-track.hpp +++ b/src/gui/widgets/timeline/timeline-clip-track.hpp @@ -31,7 +31,7 @@ #include #include "timeline-track.hpp" -#include "../../model/clip-track.hpp" +#include "gui/model/clip-track.hpp" namespace gui { namespace widgets { diff --git a/src/gui/widgets/timeline/timeline-clip.hpp b/src/gui/widgets/timeline/timeline-clip.hpp index c08d87c66..fbc128166 100644 --- a/src/gui/widgets/timeline/timeline-clip.hpp +++ b/src/gui/widgets/timeline/timeline-clip.hpp @@ -24,8 +24,8 @@ */ -#include "../../gtk-lumiera.hpp" -#include "../../model/clip.hpp" +#include "gui/gtk-lumiera.hpp" +#include "gui/model/clip.hpp" #include "timeline-view-window.hpp" #include "include/logging.h" diff --git a/src/gui/widgets/timeline/timeline-group-track.cpp b/src/gui/widgets/timeline/timeline-group-track.cpp index 6ecc20005..9407a41da 100644 --- a/src/gui/widgets/timeline/timeline-group-track.cpp +++ b/src/gui/widgets/timeline/timeline-group-track.cpp @@ -21,7 +21,7 @@ * *****************************************************/ #include "timeline-group-track.hpp" -#include "../timeline-widget.hpp" +#include "gui/widgets/timeline-widget.hpp" using namespace Gtk; using namespace boost; diff --git a/src/gui/widgets/timeline/timeline-group-track.hpp b/src/gui/widgets/timeline/timeline-group-track.hpp index 62e4d8d53..3cf079b47 100644 --- a/src/gui/widgets/timeline/timeline-group-track.hpp +++ b/src/gui/widgets/timeline/timeline-group-track.hpp @@ -27,7 +27,7 @@ #define TIMELINE_GROUP_TRACK_HPP #include "timeline-track.hpp" -#include "../../model/group-track.hpp" +#include "gui/model/group-track.hpp" namespace gui { namespace widgets { diff --git a/src/gui/widgets/timeline/timeline-header-container.cpp b/src/gui/widgets/timeline/timeline-header-container.cpp index 93f2e6aee..66732d383 100644 --- a/src/gui/widgets/timeline/timeline-header-container.cpp +++ b/src/gui/widgets/timeline/timeline-header-container.cpp @@ -25,8 +25,8 @@ #include "timeline-header-container.hpp" #include "timeline-track.hpp" -#include "../timeline-widget.hpp" -#include "../../util/rectangle.hpp" +#include "gui/widgets/timeline-widget.hpp" +#include "gui/util/rectangle.hpp" using namespace Gtk; using namespace std; diff --git a/src/gui/widgets/timeline/timeline-header-container.hpp b/src/gui/widgets/timeline/timeline-header-container.hpp index 921394eff..4bf03a1e9 100644 --- a/src/gui/widgets/timeline/timeline-header-container.hpp +++ b/src/gui/widgets/timeline/timeline-header-container.hpp @@ -28,7 +28,7 @@ #ifndef HEADER_CONTAINER_HPP #define HEADER_CONTAINER_HPP -#include "../../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "timeline-layout-helper.hpp" namespace gui { diff --git a/src/gui/widgets/timeline/timeline-header-widget.cpp b/src/gui/widgets/timeline/timeline-header-widget.cpp index ae5e85a98..5c9bf81bd 100644 --- a/src/gui/widgets/timeline/timeline-header-widget.cpp +++ b/src/gui/widgets/timeline/timeline-header-widget.cpp @@ -23,8 +23,8 @@ #include -#include "../timeline-widget.hpp" -#include "../../util/rectangle.hpp" +#include "gui/widgets/timeline-widget.hpp" +#include "gui/util/rectangle.hpp" using namespace Gtk; using namespace std; diff --git a/src/gui/widgets/timeline/timeline-header-widget.hpp b/src/gui/widgets/timeline/timeline-header-widget.hpp index 18dcfb78c..b9c6b9bf3 100644 --- a/src/gui/widgets/timeline/timeline-header-widget.hpp +++ b/src/gui/widgets/timeline/timeline-header-widget.hpp @@ -27,7 +27,7 @@ #ifndef HEADER_WIDGET_HPP #define HEADER_WIDGET_HPP -#include "../../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace widgets { diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp index 5e37d4b4d..99e263ed7 100644 --- a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp @@ -21,7 +21,7 @@ * *****************************************************/ #include "timeline-ibeam-tool.hpp" -#include "../timeline-widget.hpp" +#include "gui/widgets/timeline-widget.hpp" using namespace boost; using namespace gui::widgets; diff --git a/src/gui/widgets/timeline/timeline-layout-helper.cpp b/src/gui/widgets/timeline/timeline-layout-helper.cpp index c9ff0ed03..372220ff9 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.cpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.cpp @@ -24,9 +24,9 @@ #include #include "timeline-layout-helper.hpp" -#include "../timeline-widget.hpp" -#include "../../model/sequence.hpp" -#include "../../util/rectangle.hpp" +#include "gui/widgets/timeline-widget.hpp" +#include "gui/model/sequence.hpp" +#include "gui/util/rectangle.hpp" using namespace Gtk; using namespace std; diff --git a/src/gui/widgets/timeline/timeline-layout-helper.hpp b/src/gui/widgets/timeline/timeline-layout-helper.hpp index f8ac3f7bd..b488f8ced 100644 --- a/src/gui/widgets/timeline/timeline-layout-helper.hpp +++ b/src/gui/widgets/timeline/timeline-layout-helper.hpp @@ -27,8 +27,8 @@ #ifndef TIMELINE_LAYOUT_HELPER_HPP #define TIMELINE_LAYOUT_HELPER_HPP -#include "../../gtk-lumiera.hpp" -#include "../../../lib/tree.hpp" +#include "gui/gtk-lumiera.hpp" +#include "lib/tree.hpp" namespace gui { diff --git a/src/gui/widgets/timeline/timeline-ruler.cpp b/src/gui/widgets/timeline/timeline-ruler.cpp index f67f929bc..63d6ecc7a 100644 --- a/src/gui/widgets/timeline/timeline-ruler.cpp +++ b/src/gui/widgets/timeline/timeline-ruler.cpp @@ -23,12 +23,12 @@ #include #include "timeline-ruler.hpp" -#include "../timeline-widget.hpp" -#include "../../window-manager.hpp" -#include "../../util/cairo-util.hpp" +#include "gui/widgets/timeline-widget.hpp" +#include "gui/window-manager.hpp" +#include "gui/util/cairo-util.hpp" extern "C" { -#include "../../../lib/time.h" +#include "lib/time.h" } using namespace Gtk; diff --git a/src/gui/widgets/timeline/timeline-ruler.hpp b/src/gui/widgets/timeline/timeline-ruler.hpp index bdeb08f63..bad7625ca 100644 --- a/src/gui/widgets/timeline/timeline-ruler.hpp +++ b/src/gui/widgets/timeline/timeline-ruler.hpp @@ -27,7 +27,7 @@ #ifndef TIMELINE_RULER_HPP #define TIMELINE_RULER_HPP -#include "../../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace widgets { diff --git a/src/gui/widgets/timeline/timeline-tool.cpp b/src/gui/widgets/timeline/timeline-tool.cpp index bc1092e53..0e8a95542 100644 --- a/src/gui/widgets/timeline/timeline-tool.cpp +++ b/src/gui/widgets/timeline/timeline-tool.cpp @@ -21,7 +21,7 @@ * *****************************************************/ #include "timeline-tool.hpp" -#include "../timeline-widget.hpp" +#include "gui/widgets/timeline-widget.hpp" using namespace Gdk; using namespace boost; diff --git a/src/gui/widgets/timeline/timeline-tool.hpp b/src/gui/widgets/timeline/timeline-tool.hpp index af9e61146..25d3e3263 100644 --- a/src/gui/widgets/timeline/timeline-tool.hpp +++ b/src/gui/widgets/timeline/timeline-tool.hpp @@ -27,7 +27,7 @@ #ifndef TIMELINE_TOOL_HPP #define TIMELINE_TOOL_HPP -#include "../../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace widgets { diff --git a/src/gui/widgets/timeline/timeline-track.cpp b/src/gui/widgets/timeline/timeline-track.cpp index 240a62a2b..ea76eb1ea 100644 --- a/src/gui/widgets/timeline/timeline-track.cpp +++ b/src/gui/widgets/timeline/timeline-track.cpp @@ -21,9 +21,9 @@ * *****************************************************/ #include "timeline-track.hpp" -#include "../timeline-widget.hpp" -#include "../../window-manager.hpp" -#include "../../dialogs/name-chooser.hpp" +#include "gui/widgets/timeline-widget.hpp" +#include "gui/window-manager.hpp" +#include "gui/dialogs/name-chooser.hpp" #include "include/logging.h" using namespace boost; diff --git a/src/gui/widgets/timeline/timeline-track.hpp b/src/gui/widgets/timeline/timeline-track.hpp index f550b2c80..474b74e41 100644 --- a/src/gui/widgets/timeline/timeline-track.hpp +++ b/src/gui/widgets/timeline/timeline-track.hpp @@ -23,11 +23,11 @@ ** This file contains the definition of timeline track object */ -#include "../../gtk-lumiera.hpp" -#include "../../model/track.hpp" -#include "../menu-button.hpp" -#include "../mini-button.hpp" -#include "../button-bar.hpp" +#include "gui/gtk-lumiera.hpp" +#include "gui/model/track.hpp" +#include "gui/widgets/menu-button.hpp" +#include "gui/widgets/mini-button.hpp" +#include "gui/widgets/button-bar.hpp" #include "timeline-header-container.hpp" #include "timeline-header-widget.hpp" diff --git a/src/gui/widgets/timeline/timeline-view-window.cpp b/src/gui/widgets/timeline/timeline-view-window.cpp index dcaf8845c..2a62fcc90 100644 --- a/src/gui/widgets/timeline/timeline-view-window.cpp +++ b/src/gui/widgets/timeline/timeline-view-window.cpp @@ -21,7 +21,7 @@ * *****************************************************/ #include "timeline-view-window.hpp" -#include "../timeline-widget.hpp" +#include "gui/widgets/timeline-widget.hpp" using namespace Gtk; using namespace gui::widgets; diff --git a/src/gui/widgets/timeline/timeline-view-window.hpp b/src/gui/widgets/timeline/timeline-view-window.hpp index 972f30edb..e0513bd15 100644 --- a/src/gui/widgets/timeline/timeline-view-window.hpp +++ b/src/gui/widgets/timeline/timeline-view-window.hpp @@ -27,7 +27,7 @@ #ifndef TIMELINE_VIEW_WINDOW_HPP #define TIMELINE_VIEW_WINDOW_HPP -#include "../../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace widgets { diff --git a/src/gui/widgets/video-display-widget.cpp b/src/gui/widgets/video-display-widget.cpp index 5b6d59b1f..0be796233 100644 --- a/src/gui/widgets/video-display-widget.cpp +++ b/src/gui/widgets/video-display-widget.cpp @@ -24,10 +24,9 @@ #include #include -#include "../gtk-lumiera.hpp" - -#include "../output/xvdisplayer.hpp" -#include "../output/gdkdisplayer.hpp" +#include "gui/gtk-lumiera.hpp" +#include "gui/output/xvdisplayer.hpp" +#include "gui/output/gdkdisplayer.hpp" #include "video-display-widget.hpp" diff --git a/src/gui/widgets/video-display-widget.hpp b/src/gui/widgets/video-display-widget.hpp index 9eea972f2..8e6e9a5e4 100644 --- a/src/gui/widgets/video-display-widget.hpp +++ b/src/gui/widgets/video-display-widget.hpp @@ -28,7 +28,7 @@ #include -#include "../output/displayer.hpp" +#include "gui/output/displayer.hpp" using namespace gui::output; diff --git a/src/gui/workspace/actions.cpp b/src/gui/workspace/actions.cpp index 2c8e205da..4260b40ad 100644 --- a/src/gui/workspace/actions.cpp +++ b/src/gui/workspace/actions.cpp @@ -23,13 +23,13 @@ #include "actions.hpp" #include "workspace-window.hpp" -#include "../window-manager.hpp" +#include "gui/window-manager.hpp" -#include "../dialogs/render.hpp" -#include "../dialogs/preferences-dialog.hpp" -#include "../dialogs/name-chooser.hpp" +#include "gui/dialogs/render.hpp" +#include "gui/dialogs/preferences-dialog.hpp" +#include "gui/dialogs/name-chooser.hpp" -#include "../model/project.hpp" +#include "gui/model/project.hpp" #include "include/logging.h" diff --git a/src/gui/workspace/actions.hpp b/src/gui/workspace/actions.hpp index e60557b3f..3076fedcb 100644 --- a/src/gui/workspace/actions.hpp +++ b/src/gui/workspace/actions.hpp @@ -29,7 +29,7 @@ #ifndef ACTIONS_HPP #define ACTIONS_HPP -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" namespace gui { namespace workspace { diff --git a/src/gui/workspace/panel-manager.cpp b/src/gui/workspace/panel-manager.cpp index 4df663ba2..dca33505b 100644 --- a/src/gui/workspace/panel-manager.cpp +++ b/src/gui/workspace/panel-manager.cpp @@ -22,9 +22,9 @@ #include "panel-manager.hpp" -#include "../panels/assets-panel.hpp" -#include "../panels/viewer-panel.hpp" -#include "../panels/timeline-panel.hpp" +#include "gui/panels/assets-panel.hpp" +#include "gui/panels/viewer-panel.hpp" +#include "gui/panels/timeline-panel.hpp" #include "include/logging.h" diff --git a/src/gui/workspace/panel-manager.hpp b/src/gui/workspace/panel-manager.hpp index 9362b66aa..9e3687513 100644 --- a/src/gui/workspace/panel-manager.hpp +++ b/src/gui/workspace/panel-manager.hpp @@ -31,7 +31,7 @@ #include #include -#include "../panels/panel.hpp" +#include "gui/panels/panel.hpp" using namespace gui::panels; diff --git a/src/gui/workspace/workspace-window.cpp b/src/gui/workspace/workspace-window.cpp index c84ca228c..b8ef1ea56 100644 --- a/src/gui/workspace/workspace-window.cpp +++ b/src/gui/workspace/workspace-window.cpp @@ -32,7 +32,7 @@ #include #include -#include "../gtk-lumiera.hpp" +#include "gui/gtk-lumiera.hpp" #include "workspace-window.hpp" #include "include/logging.h" diff --git a/src/gui/workspace/workspace-window.hpp b/src/gui/workspace/workspace-window.hpp index 38ddab9f9..d68d1d3fd 100644 --- a/src/gui/workspace/workspace-window.hpp +++ b/src/gui/workspace/workspace-window.hpp @@ -34,9 +34,9 @@ #include "actions.hpp" #include "panel-manager.hpp" -#include "../panels/assets-panel.hpp" -#include "../panels/viewer-panel.hpp" -#include "../panels/timeline-panel.hpp" +#include "gui/panels/assets-panel.hpp" +#include "gui/panels/viewer-panel.hpp" +#include "gui/panels/timeline-panel.hpp" using namespace gui::panels; From 09d400d5bc96c6943e0a5c5a5fc09dc99f137863 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 27 Dec 2010 02:04:34 +0100 Subject: [PATCH 02/10] put asside the existing "lumitime" to build a new hierarchy from scratch existing code will still use lumitime.hpp for now while we're about to reorganise time handling altogether --- src/lib/time/quantiser.hpp | 2 ++ src/lib/time/timecode.hpp | 2 ++ src/lib/time/timevalue.hpp | 40 +++++++++++------------ tests/lib/time/time-formats-test.cpp | 8 ++--- tests/lib/time/time-quantisation-test.cpp | 8 ++--- tests/lib/time/time-value-test.cpp | 6 ++-- 6 files changed, 32 insertions(+), 34 deletions(-) diff --git a/src/lib/time/quantiser.hpp b/src/lib/time/quantiser.hpp index b511ed53f..9db7d88c2 100644 --- a/src/lib/time/quantiser.hpp +++ b/src/lib/time/quantiser.hpp @@ -24,6 +24,8 @@ #ifndef LIB_TIME_QUANTISER_H #define LIB_TIME_QUANTISER_H +#include "lib/time/timevalue.hpp" + //#include #include diff --git a/src/lib/time/timecode.hpp b/src/lib/time/timecode.hpp index 2a8ef6750..d4aebf8c1 100644 --- a/src/lib/time/timecode.hpp +++ b/src/lib/time/timecode.hpp @@ -24,6 +24,8 @@ #ifndef LIB_TIME_TIMECODE_H #define LIB_TIME_TIMECODE_H +#include "lib/time/timevalue.hpp" + //#include #include diff --git a/src/lib/time/timevalue.hpp b/src/lib/time/timevalue.hpp index 58095f85e..9388e5842 100644 --- a/src/lib/time/timevalue.hpp +++ b/src/lib/time/timevalue.hpp @@ -36,8 +36,6 @@ extern "C" { namespace lib { namespace time { - using lumiera::Time; - /** * fixed format time specification. @@ -45,15 +43,15 @@ namespace time { * @todo WIP-WIP-WIP */ class TimeValue - : boost::totally_ordered > + : boost::totally_ordered > { protected: gavl_time_t t_; public: - static const Time MAX ; - static const Time MIN ; + static const TimeValue MAX ; + static const TimeValue MIN ; explicit TimeValue (gavl_time_t val=0) @@ -100,21 +98,21 @@ namespace time { /** * Lumiera's internal time value datatype */ -//class Time -// : public TimeValue -// { -// public: -// explicit -// Time (TimeValue val=0) -// : TimeValue(val) -// { } -// -// Time ( long millis -// , uint secs -// , uint mins =0 -// , uint hours=0 -// ); -// }; + class Time + : public TimeValue + { + public: + explicit + Time (TimeValue val= TimeValue(0)) + : TimeValue(val) + { } + + Time ( long millis + , uint secs + , uint mins =0 + , uint hours=0 + ); + }; class Offset diff --git a/tests/lib/time/time-formats-test.cpp b/tests/lib/time/time-formats-test.cpp index ac9a52c5d..d11e5c3c2 100644 --- a/tests/lib/time/time-formats-test.cpp +++ b/tests/lib/time/time-formats-test.cpp @@ -40,8 +40,6 @@ namespace lib { namespace time{ namespace test{ - using lumiera::Time; - /******************************************************** * @test verify handling of grid aligned timecode values. @@ -56,7 +54,7 @@ namespace test{ { long refval= isnil(arg)? 1 : lexical_cast (arg[1]); - Time ref (refval); + TimeValue ref (refval); checkBasics (ref); checkComparisons (ref); @@ -65,13 +63,13 @@ namespace test{ void - checkBasics (Time const& ref) + checkBasics (TimeValue ref) { } void - checkComparisons (Time const& ref) + checkComparisons (TimeValue ref) { } diff --git a/tests/lib/time/time-quantisation-test.cpp b/tests/lib/time/time-quantisation-test.cpp index ac3dd9393..e490661dd 100644 --- a/tests/lib/time/time-quantisation-test.cpp +++ b/tests/lib/time/time-quantisation-test.cpp @@ -40,8 +40,6 @@ namespace lib { namespace time{ namespace test{ - using lumiera::Time; - /******************************************************** * @test verify handling of time values, time intervals. @@ -56,7 +54,7 @@ namespace test{ { long refval= isnil(arg)? 1 : lexical_cast (arg[1]); - Time ref (refval); + TimeValue ref (refval); checkBasics (ref); checkComparisons (ref); @@ -65,13 +63,13 @@ namespace test{ void - checkBasics (Time const& ref) + checkBasics (TimeValue ref) { } void - checkComparisons (Time const& ref) + checkComparisons (TimeValue ref) { } diff --git a/tests/lib/time/time-value-test.cpp b/tests/lib/time/time-value-test.cpp index e9e602d17..645f49b26 100644 --- a/tests/lib/time/time-value-test.cpp +++ b/tests/lib/time/time-value-test.cpp @@ -54,7 +54,7 @@ namespace test{ { long refval= isnil(arg)? 1 : lexical_cast (arg[1]); - Time ref (refval); + TimeValue ref (refval); checkBasics (ref); checkComparisons (ref); @@ -63,13 +63,13 @@ namespace test{ void - checkBasics (Time const& ref) + checkBasics (TimeValue ref) { } void - checkComparisons (Time const& ref) + checkComparisons (TimeValue ref) { } From 9d918690980031617ed66bdc22314d07f3d05cda Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 27 Dec 2010 04:24:59 +0100 Subject: [PATCH 03/10] move Variant to lib namespace, a bit of cleanup and clarifying the code --- src/lib/variant.hpp | 48 ++++++++++++++++++++++++++++-------------- src/lib/wrapperptr.hpp | 2 +- 2 files changed, 33 insertions(+), 17 deletions(-) diff --git a/src/lib/variant.hpp b/src/lib/variant.hpp index 7a964c5db..b4eef9b76 100644 --- a/src/lib/variant.hpp +++ b/src/lib/variant.hpp @@ -27,18 +27,22 @@ ** doesn't deal with alignment issues and is not threadsafe. ** ** Values can be stored using \c operator= . In order to access the value - ** stored in lumiera::Variant, you additionally need to define a "functor" - **
  • with a typedef "Ret" for the return type
  • - **
  • providing a static Ret access(ELM&) function - ** for each of the types used in the Variant
  • - **
+ ** stored in lib::Variant, you additionally need to define a "functor" + ** - with a typedef "Ret" for the return type + ** - providing a \code static Ret access(ELM&) \endcode function + ** for each of the types used in the Variant ** + ** @todo the instance handling for the accessor seems somewhat + ** misaligned: why do we create another accessor as static var + ** within the access() function?? Why not putting that into the + ** Holder::Storage instance created by the client code? + ** @todo write an unit test ///////////////////////////////////////TICKET #141 ** @see wrapperptr.hpp usage example */ -#ifndef LUMIERA_VARIANT_H -#define LUMIERA_VARIANT_H +#ifndef LIB_VARIANT_H +#define LIB_VARIANT_H #include "lib/meta/typelist-util.hpp" @@ -48,7 +52,7 @@ -namespace lumiera { +namespace lib { namespace variant { @@ -100,13 +104,13 @@ namespace lumiera { put (T const& toStore) { BASE::deleteCurrent(); // remove old content, if any - + // T& storedObj = *new(BASE::buffer_) T (toStore); BASE::which_ = idx; // remember the actual type selected return storedObj; } - using BASE::put; + using BASE::put; // inherited alternate put() for other types T }; typedef InstantiateWithIndex< TYPES @@ -122,9 +126,9 @@ namespace lumiera { struct CaseSelect { typedef typename FUNCTOR::Ret Ret; - typedef Ret (*Func)(Buffer&); + typedef Ret (Func)(Buffer&); - Func table_[TYPECNT]; + Func* table_[TYPECNT]; CaseSelect () { @@ -146,11 +150,16 @@ namespace lumiera { if (TYPECNT <= storage.which_) return FUNCTOR::ifEmpty (); else - return (*table_[storage.which_]) (storage); + { + Func& access = *table_[storage.which_]; + return access (storage); + } } }; + /** initialise the dispatcher (trampoline) + * for the case of accessing type T */ template< class T, class BASE, uint i > struct CasePrepare : BASE @@ -161,7 +170,14 @@ namespace lumiera { } }; - + + /** access the variant's inline buffer, + * using the configured access functor. + * @note the actual accessor instance + * is created on demand (static) + * @todo shouldn't this rather be located within + * the Holder::Storage created by clients?? + */ template static typename FUNCTOR::Ret access (Buffer& buf) @@ -205,7 +221,7 @@ namespace lumiera { - /** + /** * A variant wrapper (typesafe union) capable of holding a value of any * of a bounded collection of types. The value is stored in a local buffer * directly within the object and may be accessed by a typesafe visitation. @@ -273,5 +289,5 @@ namespace lumiera { } }; -} // namespace lumiera +} // namespace lib #endif diff --git a/src/lib/wrapperptr.hpp b/src/lib/wrapperptr.hpp index 1032045b0..16a20a2f2 100644 --- a/src/lib/wrapperptr.hpp +++ b/src/lib/wrapperptr.hpp @@ -55,7 +55,7 @@ namespace lumiera { * error reporting is similar to the behaviour of dynamic_cast: when retrieving * a pointer, NULL is returned in case of mismatch. */ - typedef lumiera::Variant WrapperPtr; + typedef lib::Variant WrapperPtr; From 0c45fc47f3f335809a6d1ad9d35ebc5f824cc7ae Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 27 Dec 2010 05:55:15 +0100 Subject: [PATCH 04/10] defining the first elementary operations for time values --- src/lib/time/lumitime.cpp | 10 ++++++ src/lib/time/timevalue.hpp | 55 ++++++++++++++++++++++++------ tests/lib/time/time-value-test.cpp | 49 ++++++++++++++++++++++---- 3 files changed, 97 insertions(+), 17 deletions(-) diff --git a/src/lib/time/lumitime.cpp b/src/lib/time/lumitime.cpp index 6f1a7ac23..5794b445e 100644 --- a/src/lib/time/lumitime.cpp +++ b/src/lib/time/lumitime.cpp @@ -34,6 +34,16 @@ extern "C" { using std::string; +namespace lib { +namespace time { + + const Time Time::MAX ( TimeValue (+std::numeric_limits::max()) ); + const Time Time::MIN ( TimeValue (-std::numeric_limits::max()) ); + + +}} // namespace lib::Time + +///////////////////////////////////////////////////////////////////////////TODO leftover of the existing/initial lumitime-Implementation namespace lumiera { diff --git a/src/lib/time/timevalue.hpp b/src/lib/time/timevalue.hpp index 9388e5842..bc14d4baa 100644 --- a/src/lib/time/timevalue.hpp +++ b/src/lib/time/timevalue.hpp @@ -47,20 +47,30 @@ namespace time { boost::totally_ordered > { protected: + /** the raw (internal) time value + * used to implement the time types */ gavl_time_t t_; - public: - static const TimeValue MAX ; - static const TimeValue MIN ; + /** Assigning of time values is not allowed, + * but derived classed might allow that */ + TimeValue& + operator= (TimeValue const& o) + { + t_ = o.t_; + return *this; + } + + public: explicit TimeValue (gavl_time_t val=0) : t_(val) { } - // using standard copy operations - - operator gavl_time_t () const { return t_; } + /** copy initialisation allowed */ + TimeValue (TimeValue const& o) + : t_(o.t_) + { } // Supporting totally_ordered friend bool operator< (TimeValue const& t1, TimeValue const& t2) { return t1.t_ < t2.t_; } @@ -71,6 +81,11 @@ namespace time { }; + + /** a mutable time value, + * behaving like a plain number + * and allowing copying and re-accessing + */ class TimeVar : public TimeValue , boost::additive @@ -81,6 +96,21 @@ namespace time { : TimeValue(time) { } + // Allowing copy and assignment + TimeVar (TimeVar const& o) + : TimeValue(o) + { } + + TimeVar& + operator= (TimeValue const& o) + { + t_ = TimeVar(o); + return *this; + } + + + // Supporting mixing with plain long int arithmetics + operator gavl_time_t () const { return t_; } // Supporting additive TimeVar& operator+= (TimeVar const& tx) { t_ += tx.t_; return *this; } @@ -102,6 +132,9 @@ namespace time { : public TimeValue { public: + static const Time MAX ; + static const Time MIN ; + explicit Time (TimeValue val= TimeValue(0)) : TimeValue(val) @@ -121,17 +154,17 @@ namespace time { public: explicit - Offset (TimeValue distance) + Offset (TimeValue const& distance) : TimeValue(distance) { } }; inline Offset - operator- (Time const& end, Time const& start) + operator- (TimeValue const& end, TimeValue const& start) { -// TimeVar distance(end); -// distance -= start; -// return Offset(distance); + TimeVar distance(end); + distance -= start; + return Offset(distance); } typedef const Offset TimeDistance; diff --git a/tests/lib/time/time-value-test.cpp b/tests/lib/time/time-value-test.cpp index 645f49b26..6ea636c4d 100644 --- a/tests/lib/time/time-value-test.cpp +++ b/tests/lib/time/time-value-test.cpp @@ -49,27 +49,64 @@ namespace test{ */ class TimeValue_test : public Test { + gavl_time_t + random_or_get (Arg arg) + { + if (isnil(arg)) + return (rand() % 10000); + else + return lexical_cast (arg[1]); + } + + virtual void run (Arg arg) { - long refval= isnil(arg)? 1 : lexical_cast (arg[1]); + TimeValue ref (random_or_get(arg)); - TimeValue ref (refval); - - checkBasics (ref); + checkBasicTimeValues (ref); checkComparisons (ref); checkComponentAccess(); } + /** @test creating some time values and performing trivial comparisons. + * @note you can't do much beyond that, because TimeValues as such + * are a "dead end": they are opaque and can't be altered. + */ void - checkBasics (TimeValue ref) + checkBasicTimeValues (TimeValue org) { + TimeValue zero; + TimeValue one (1); + TimeValue max (Time::MAX); + TimeValue min (Time::MIN); + + TimeValue val (org); + + CHECK (zero == zero); + CHECK (zero <= zero); + CHECK (zero >= zero); + + CHECK (zero < one); + CHECK (min < max); + CHECK (min < val); + CHECK (val < max); + + // mixed comparisons with raw numeric time + gavl_time_t g2 (-2); + CHECK (zero > g2); + CHECK (one > g2); + CHECK (one >= g2); + CHECK (g2 < max); + + CHECK (!(g2 > max)); + CHECK (!(g2 < min)); } void - checkComparisons (TimeValue ref) + checkComparisons (TimeValue org) { } From 643859f6b8a39ee1a01aafef1713c6780dced0f8 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Mon, 27 Dec 2010 06:58:27 +0100 Subject: [PATCH 05/10] add a mutable time value with full arithmetics --- src/lib/time/timevalue.hpp | 49 +++++++++++++++++++----------- tests/40components.tests | 2 +- tests/lib/time/time-value-test.cpp | 32 +++++++++++++++++++ 3 files changed, 64 insertions(+), 19 deletions(-) diff --git a/src/lib/time/timevalue.hpp b/src/lib/time/timevalue.hpp index bc14d4baa..47ee097e9 100644 --- a/src/lib/time/timevalue.hpp +++ b/src/lib/time/timevalue.hpp @@ -38,9 +38,16 @@ namespace time { /** - * fixed format time specification. - * - * @todo WIP-WIP-WIP + * basic constant internal time value. + * These time values provide the implementation base + * for all further time types. They can be created by + * wrapping up a raw micro tick value (gavl_time_t), + * are totally ordered, but besides that, + * they are opaque and non-mutable. + * @note clients should prefer to use Time instances, + * which explicitly denote an Lumiera internal + * time value and are easier to use. + * @see TimeVar when full arithmetics are required */ class TimeValue : boost::totally_ordered + , boost::additive + > > { - + public: - TimeVar (TimeValue time) + TimeVar (TimeValue time = TimeValue()) : TimeValue(time) { } @@ -117,13 +127,13 @@ namespace time { TimeVar& operator-= (TimeVar const& tx) { t_ -= tx.t_; return *this; } // Supporting multiplication with integral factor - TimeVar& operator*= (int64_t fact) { t_ *= fact; return *this; } + TimeVar& operator*= (int fact) { t_ *= fact; return *this; } // baseclass TimeValue is already totally_ordered }; - class Offset; + class Offset; /** * Lumiera's internal time value datatype @@ -158,14 +168,17 @@ namespace time { : TimeValue(distance) { } }; - - inline Offset - operator- (TimeValue const& end, TimeValue const& start) - { - TimeVar distance(end); - distance -= start; - return Offset(distance); - } + + +//////////////////////////////////////////////////////////////TODO this seems rather like a bad idea, +// because it opens a lot of implicit conversions which we don't want! +//inline Offset +//operator- (TimeValue const& end, TimeValue const& start) +//{ +// TimeVar distance(end); +// distance -= start; +// return Offset(distance); +//} typedef const Offset TimeDistance; diff --git a/tests/40components.tests b/tests/40components.tests index 078556126..b61a98aed 100644 --- a/tests/40components.tests +++ b/tests/40components.tests @@ -633,7 +633,7 @@ return: 0 END -PLANNED "Times and time intervals" TimeValue_test < Time::MIN); + + gavl_time_t raw (var); + CHECK (raw == org); + CHECK (raw > org - two); + } + + void checkComparisons (TimeValue org) { From f2c18e5a9c3b50792915d95fd692e0616f17f311 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Tue, 11 Jan 2011 17:17:27 +0100 Subject: [PATCH 06/10] RfC describing necessary steps for installing and packaging Lumiera --- doc/devel/rfc_pending/ApplicationInstall.txt | 128 +++++++++++++++++++ 1 file changed, 128 insertions(+) create mode 100644 doc/devel/rfc_pending/ApplicationInstall.txt diff --git a/doc/devel/rfc_pending/ApplicationInstall.txt b/doc/devel/rfc_pending/ApplicationInstall.txt new file mode 100644 index 000000000..ee791bea2 --- /dev/null +++ b/doc/devel/rfc_pending/ApplicationInstall.txt @@ -0,0 +1,128 @@ +ApplicationInstall +================== + +// please don't remove the //word: comments + +[grid="all"] +`------------`----------------------- +*State* _Idea_ +*Date* _Di 11 Jan 2011 17:00:55 CET_ +*Proposed by* Ichthyostega +------------------------------------- + +[abstract] +********************************************************************************* +Lumiera should be a _freely relocatable_ application bundle. +Relying only on the relative folder structure within this bundle, the application +will be fully functional at any location, provided that the external library +dependencies are resolvable using the standard mechanisms of the platform. +The setup mechanism must be obvious, self-explanatory and must not rely +on compiled in magic or buildsystem trickery. Yet packaging into a FSH conforming +installation location should be supported by the same mechanisms. +********************************************************************************* + +Description +----------- +//description: add a detailed description: +Lumiera is planned to become a large professional application bundle, relying +on several external resources for proper operation. An installed Lumiera +application will be more like Gimp, Blender, Ardour, OpenOffice or Eclipse, +not like bash, autotools, emcas or [add your favourite hacker tool here]. +This is a question of professionalism. + +Besides that, it can be expected that Lumiera frequently will be used in a +project or studio like setup, where the application isn't installed, but just +unZIPped / unTARed and used as-is. Thus, it should be sufficient to unpack +the application bundle and point it to the session file and maybe the +media storage. + +This RfC can be seen as an commitment to an professional approach and a +clarification: Traditionally, the Unix community hailed a lot of _black magic_ +practices like compiling in installation paths, macro magic, relying on +very specific and un-obvious behaviour of some build script, configuration +via environment variables and the like. These practices turned out to be +not so helpful and are known to lead to maintenance problems. + +The Eclipse platform can serve as a model for the setup of an modern +application: It can be just unpacked, and when looking into the folder +structure, the meaning of the parts is obvious, and the basic bootstrap +is controlled by two short text based INI files. While Lumiera presumably +won't get _that_ heavyweight and is clearly not intended to become a +general business application platform like OSGi -- the underlying +principles can serve as a point of reference for modern +development standards. + +Judging from our current planning and the existing codebase, Lumiera +is on a good way in that direction, yet some cleanup needs to be done, +especially removing some convenience shortcuts from the early days of +development and catching up with the repair of some sloppiness here +and there. + +Tasks +~~~~~ +// List what needs to be done to implement this Proposal: +* identify what impedes such a modern setup procedure ([green]#✔ done#) +* rectify the folder structure created in the build target + directory [,yellow]#WIP# +* build the executables in a way to allow relative resolution of the + internal shared modules [,red]#TODO# +* replace the compiled-in path definitions for plugin loading by a + configurable bootstrap [,red]#TODO# +* add an working library implementation for a config loader [,red]#TODO# +* add a mechanism for establishing the path of the current execubable. + This is _non-portable_ [,red]#TODO# +* wire the prepared API in the GUI to use this working config loader + for resolving GUI resources [,red]#TODO# +* try to extract the path search code from the existing config loader, + or build a new solution based on stanard libraries [,red]#TODO# +* introduce a output root directory into the buildsystem to allow + for building packages [,red]#TODO# +* define a _Debian packaging_ as proof-of-concept [,red]#TODO# + + +Discussion +~~~~~~~~~~ + +Pros +^^^^ +* self-contained +* self-explanatory +* based on _best practices_ +* conforming with FSH and Debian policy + + +Cons +^^^^ +* breaks with some beloved habits of the Unix community +* requires work +* raises the bar on the implementation side +* requires an bootstrap sequence to be explicitly performed + on application startup + + +Alternatives +^^^^^^^^^^^^ +//alternatives: explain alternatives and tell why they are not viable: + + + +Rationale +--------- +//rationale: Give a concise summary why it should be done *this* way: + + + +//Conclusion +//---------- +//conclusion: When approbate (this proposal becomes a Final) +// write some conclusions about its process: + + + + +Comments +-------- +//comments: append below + + +//endof_comments: From ebd93b0f1250ba94b99129d89e2ce78de63c2ae6 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 13 Jan 2011 03:29:19 +0100 Subject: [PATCH 07/10] fix inclue path error pointed out by "esevece" --- src/tool/rsvg-convert.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tool/rsvg-convert.c b/src/tool/rsvg-convert.c index d8216e608..9fcf67b9c 100644 --- a/src/tool/rsvg-convert.c +++ b/src/tool/rsvg-convert.c @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #ifdef CAIRO_HAS_PS_SURFACE #include From b99e8d307ee4029ab43cd515b296a127e1a63f84 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 13 Feb 2011 19:52:54 +0100 Subject: [PATCH 08/10] write up details for the ApplicationInstall RfC --- doc/devel/rfc_pending/ApplicationInstall.txt | 149 +++++++++++++++---- 1 file changed, 117 insertions(+), 32 deletions(-) diff --git a/doc/devel/rfc_pending/ApplicationInstall.txt b/doc/devel/rfc_pending/ApplicationInstall.txt index ee791bea2..7aa617415 100644 --- a/doc/devel/rfc_pending/ApplicationInstall.txt +++ b/doc/devel/rfc_pending/ApplicationInstall.txt @@ -26,9 +26,8 @@ Description //description: add a detailed description: Lumiera is planned to become a large professional application bundle, relying on several external resources for proper operation. An installed Lumiera -application will be more like Gimp, Blender, Ardour, OpenOffice or Eclipse, -not like bash, autotools, emcas or [add your favourite hacker tool here]. -This is a question of professionalism. +application will be more like Gimp, Blender, OpenOffice or Eclipse, +not like bash, autotools or emcas. Besides that, it can be expected that Lumiera frequently will be used in a project or studio like setup, where the application isn't installed, but just @@ -36,48 +35,103 @@ unZIPped / unTARed and used as-is. Thus, it should be sufficient to unpack the application bundle and point it to the session file and maybe the media storage. -This RfC can be seen as an commitment to an professional approach and a -clarification: Traditionally, the Unix community hailed a lot of _black magic_ -practices like compiling in installation paths, macro magic, relying on -very specific and un-obvious behaviour of some build script, configuration -via environment variables and the like. These practices turned out to be -not so helpful and are known to lead to maintenance problems. - The Eclipse platform can serve as a model for the setup of an modern -application: It can be just unpacked, and when looking into the folder -structure, the meaning of the parts is obvious, and the basic bootstrap -is controlled by two short text based INI files. While Lumiera presumably -won't get _that_ heavyweight and is clearly not intended to become a -general business application platform like OSGi -- the underlying -principles can serve as a point of reference for modern +application of that style: It can be just unpacked, and when looking +into the folder structure, the meaning of the parts is obvious, and the +basic bootstrap is controlled by two short text based INI files. +While Lumiera presumably won't get _that_ heavyweight and is clearly +not intended to become a general business application platform like OSGi -- +the underlying principles can serve as a point of reference for modern development standards. +This leads to the following conclusions: + +- we need to define a standard folder layout for the bundle +- the application must not rely on any compiled-in absolute paths +- the executable should fetch the directly accompanying shared modules +- all other lib dependencies should be handled by the system mechanisms +- the bootstrap configuration likewise must not be compiled-in +- this configuration must be human readable and clearly exhibit its purpose +- the same system must be able to adapt to a FSH conforming installation layout + Judging from our current planning and the existing codebase, Lumiera is on a good way in that direction, yet some cleanup needs to be done, -especially removing some convenience shortcuts from the early days of -development and catching up with the repair of some sloppiness here -and there. +especially removing convenience shortcuts from the early days of development +and catching up with the repair of some traits of sloppyness here and there. + +Library resolution +~~~~~~~~~~~~~~~~~~ +In former days, it was common habit to compile-in a hard wired absolute ++RPATH+. This can be considered obsolete practice; for example, the Debian +policy forbids doing so. This is the result from numerous maintainability +problems in the past. On the other hand, the GNU linker and other modern +linkers support a relative resolution of shared modules directly accompanying +an specific executable. The Debian policy allows this, if and only if these +shared modules are installed with the same binary package and only used by +this specific executable(s). Together, this is exactly what we need to +solve our requirement. + +Thus, the build process enables the new-style DT-tags in the Elf binary +and sets the +DT_RUNPATH+ with an value relative to +$ORIGIN+, which resolves +to the path of the currently executing binary. Moreover, it is _sufficient_ +to set this on the initial executable _only,_ because this creates a common +searchpath for all lib resolution events in the scope of that loaded executable. +Besides that, we need to care that our private libraries have a unique +SONAME+, +in this case all starting with the prefix +liblumiera*+. Note moreover that this +new-style +DT_RUNPATH+ indeed _can_ be overridden by an +LD_LIBRARY_PATH+ in the +environment, should there be the need for very special experiments. + +Bootstrap location +~~~~~~~~~~~~~~~~~~ +Thus, a single relative library folder becomes the only hard wired start +configuration. In our case, the folder +$ORIGIN/modules+ was chosen. The +root of the package then holds all the binaries depending on these common +internal libraries, that is the +lumiera+ executable and any accompanying +special tools. As usual with such large application bundles, these get +only _symlinked_ into the +/usr/bin+ folder on installation. + +For sake of clarity, after starting the executable, the _same location_ +is used to load the bootstrap configuration. This configuration in turn +defines all further locations like the extended configuration, project +templates, plugin search path, the GUI module to load, the search path +for icons and GUI resources, project templates and similar basics. + +Relative paths and the location of the executable +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +According to the general requirements outlined above, most paths should +be given in a relative fashion. Unfortunately there is no portable solution +for self-discovering the currently running executable. But at least there +is a solution for all current major platforms. Under Linux, this information +can be retrieved from the kernel through the +/proc+ filesystem. + +Again for sake of clarity, the same token +$ORIGIN+ was chosen to denote +this executable location (note: this is _not_ the current working directory). +Moreover, due to the folder layout detailed above, this coincides with the +root of the application bundle, thus making for a self-explanatory convention. +Besides +$ORIGIN+, these search paths later on likely will contain locations +below the user's home directory, e.g. +~/.lumiera/themes+ + Tasks ~~~~~ // List what needs to be done to implement this Proposal: * identify what impedes such a modern setup procedure ([green]#✔ done#) * rectify the folder structure created in the build target - directory [,yellow]#WIP# + directory ([green]#✔ done#) * build the executables in a way to allow relative resolution of the - internal shared modules [,red]#TODO# + internal shared modules ([green]#✔ done#) * replace the compiled-in path definitions for plugin loading by a - configurable bootstrap [,red]#TODO# -* add an working library implementation for a config loader [,red]#TODO# -* add a mechanism for establishing the path of the current execubable. - This is _non-portable_ [,red]#TODO# + configurable bootstrap ([green]#✔#) +* add an working library implementation for a config loader ([green]#✔ done#) +* add a mechanism for establishing the path of the current execubable. + + This is _non-portable_ ([green]#✔ done#) * wire the prepared API in the GUI to use this working config loader - for resolving GUI resources [,red]#TODO# + for resolving GUI resources ([green]#✔ done#) * try to extract the path search code from the existing config loader, - or build a new solution based on stanard libraries [,red]#TODO# -* introduce a output root directory into the buildsystem to allow - for building packages [,red]#TODO# -* define a _Debian packaging_ as proof-of-concept [,red]#TODO# + or build a new solution based on standard libraries ([green]#✔ done#) +* introduce an output root directory into the buildsystem, allowing + for package builds ([green]#✔#) +* define a _Debian packaging_ as proof-of-concept ([green]#✔ done#) Discussion @@ -93,16 +147,36 @@ Pros Cons ^^^^ -* breaks with some beloved habits of the Unix community * requires work -* raises the bar on the implementation side +* raises the bar at the implementation side * requires an bootstrap sequence to be explicitly performed on application startup +* breaks with some beloved habits of the Unix community Alternatives ^^^^^^^^^^^^ //alternatives: explain alternatives and tell why they are not viable: +I can think of two alternatives + +. dealing with all those problems _later_ +. not making an concept, rather sticking to UNIX habits + +The first alternative is indeed worth considering, because we're settling +some things to be really implemented way later, which bears some dangers. +But, on the other hand, it is a common practice known from extreme programming +to deliver early and regularly, which effectively means to set up the deploy +path of an application really early in the development cycle. The rationale +is that -- according to general experience -- the deployment always turns +up some very specific problems and constraints, which can be a serious +threat when discovered late in the development process. + +The second alternative isn't really applicable IMHO. The original UNIX philosophy +breeds on an academic setup and really excels with small nifty commandline utils +combined by pipes, each specialised to do a single thing very well. These utils +are more like the objects within our implementation. The concept of large +application software bundles and desktop software was always a bit alien within +the classic UNIX environment. @@ -110,6 +184,17 @@ Rationale --------- //rationale: Give a concise summary why it should be done *this* way: +This RfC can be seen as an commitment to an professional approach and as +clarification: Traditionally, the Unix community hailed a lot of _black magic_ +practices like compiled-in installation paths, macro magic, +sed+ and +awk+ +trickery, inline code compiled on-the-fly, relying on very specific and +un-obvious behaviour of some build script, configuration via environment +variables and a lot of similar idioms. These practices might be adequate +in a quickly moving Research & Development setup, but turned out to be +not so helpful when it comes to industrial strength development, +as they are known to lead to maintenance problems. + + //Conclusion From ee97654330c6238a8305f8d21a0d167ab94054ba Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 13 Feb 2011 20:02:54 +0100 Subject: [PATCH 09/10] rfc-shellscript: mark the state transitions more clear in the comments --- admin/rfc.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/rfc.sh b/admin/rfc.sh index 24f720d26..5efbd0d46 100755 --- a/admin/rfc.sh +++ b/admin/rfc.sh @@ -316,7 +316,7 @@ function change_state() local state="$2" local nl=$'\n' - local comment="$state$nl//add reason$nl $(date +%c) $(git config --get user.name) <$(git config --get user.email)>$nl" + local comment=".State -> $state$nl//add reason$nl $(date +%c) $(git config --get user.name) <$(git config --get user.email)>$nl" edit_state "$name" "$state" "$comment" edit "$name" -4 "endof_comments" process "$name" From 43558d0f01647a60aafda66b4c57c9032601c1d9 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Sun, 13 Feb 2011 20:20:12 +0100 Subject: [PATCH 10/10] RfC ApplicationInstall now in draft state --- doc/devel/rfc_pending/ApplicationInstall.txt | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/doc/devel/rfc_pending/ApplicationInstall.txt b/doc/devel/rfc_pending/ApplicationInstall.txt index 7aa617415..44ed4cdea 100644 --- a/doc/devel/rfc_pending/ApplicationInstall.txt +++ b/doc/devel/rfc_pending/ApplicationInstall.txt @@ -5,7 +5,7 @@ ApplicationInstall [grid="all"] `------------`----------------------- -*State* _Idea_ +*State* _Draft_ *Date* _Di 11 Jan 2011 17:00:55 CET_ *Proposed by* Ichthyostega ------------------------------------- @@ -175,8 +175,8 @@ The second alternative isn't really applicable IMHO. The original UNIX philosoph breeds on an academic setup and really excels with small nifty commandline utils combined by pipes, each specialised to do a single thing very well. These utils are more like the objects within our implementation. The concept of large -application software bundles and desktop software was always a bit alien within -the classic UNIX environment. +application software bundles and desktop software was always a bit alien +within the classic UNIX environment. @@ -209,5 +209,17 @@ Comments -------- //comments: append below +.State -> Draft +There is now a complete implementation of this concept on my ``proc'' branch. + +Moreover, I was able to define an initial Debian packaging for Lumiera on top +of that implementation. + +During that work, I had opportunity to visit various areas of the existing codebase, +which reminded me of several small issues, which seem to become unhealthy when lying +around unfixed for such a long time. Probably I'll start a clean-up initiative and +try to bring these points to discussion separately. + + So 13 Feb 2011 20:04:00 CET Ichthyostega + //endof_comments: