From 94cd88a92a788cdc106a9d1d3e04d5a379acd605 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sat, 16 Aug 2008 12:17:28 +0100 Subject: [PATCH] Tidied up IBeam tool code --- src/gui/widgets/timeline/timeline-ibeam-tool.cpp | 10 ++++++++-- src/gui/widgets/timeline/timeline-ibeam-tool.hpp | 5 +++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp index fd3b8b87c..0e6e39597 100644 --- a/src/gui/widgets/timeline/timeline-ibeam-tool.cpp +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.cpp @@ -27,8 +27,13 @@ namespace lumiera { namespace gui { namespace widgets { namespace timeline { - + +// ===== Constants ===== // + const int IBeamTool::ScrollSlideRateDivisor = 16; +const int IBeamTool::ScrollSlideEventInterval = 40; + +// ===== Implementation ===== // IBeamTool::IBeamTool(TimelineBody *timeline_body) : dragStartTime(0), @@ -133,7 +138,8 @@ IBeamTool::begin_scroll_slide(int scroll_slide_rate) scrollSlideRate = scroll_slide_rate; if(!scrollSlideEvent.connected()) scrollSlideEvent = Glib::signal_timeout().connect( - sigc::mem_fun(this, &IBeamTool::on_scroll_slide_timer), 40); + sigc::mem_fun(this, &IBeamTool::on_scroll_slide_timer), + ScrollSlideEventInterval); } void diff --git a/src/gui/widgets/timeline/timeline-ibeam-tool.hpp b/src/gui/widgets/timeline/timeline-ibeam-tool.hpp index 1d0255913..9be7d17de 100644 --- a/src/gui/widgets/timeline/timeline-ibeam-tool.hpp +++ b/src/gui/widgets/timeline/timeline-ibeam-tool.hpp @@ -62,13 +62,14 @@ private: void end_scroll_slide(); private: - //----- Internals -----// + // ==== Internals ===== // gavl_time_t dragStartTime; sigc::connection scrollSlideEvent; int scrollSlideRate; - //----- Constants -----// + // ===== Constants ===== // static const int ScrollSlideRateDivisor; + static const int ScrollSlideEventInterval; }; } // namespace timeline