diff options
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | dw/fltkviewbase.cc | 32 | ||||
-rw-r--r-- | dw/fltkviewbase.hh | 7 |
3 files changed, 13 insertions, 36 deletions
@@ -11,6 +11,13 @@ dillo-2.1 - Tuned input width a bit. Patches: place (AKA corvid) +dw + ++- Unused code cleanup. + Patch: Johannes Hofmann + +----------------------------------------------------------------------------- + dillo-2.0 +- Ported Dillo from GTK1 to FLTK2. @@ -186,9 +193,6 @@ dillo-2.0 - Replaced the findtext dialog with an in-window widget! Patches: Justus Winter - TODO: - - - test no_proxy (set a list in dillorc). ----------------------------------------------------------------------------- dw diff --git a/dw/fltkviewbase.cc b/dw/fltkviewbase.cc index b35b07df..a282efd8 100644 --- a/dw/fltkviewbase.cc +++ b/dw/fltkviewbase.cc @@ -47,8 +47,6 @@ FltkViewBase::FltkViewBase (int x, int y, int w, int h, const char *label): canvasWidth = 1; canvasHeight = 1; bgColor = WHITE; - lastDraw = time(0); - drawDelay = 2; /* in seconds */ mouse_x = mouse_y = 0; if (backBuffer == NULL) { backBuffer = new Image (); @@ -77,7 +75,7 @@ void FltkViewBase::draw () container::typed::Iterator <core::Rectangle> it; for (it = drawRegion.rectangles (); it.hasNext (); ) { - drawRectangle (it.getNext (), true); + draw (it.getNext (), true); } drawRegion.clear (); @@ -96,7 +94,7 @@ void FltkViewBase::draw () w (), h ()); - drawRectangle (&rect, false); + draw (&rect, false); if (! (d & DAMAGE_SCROLL)) { drawRegion.clear (); @@ -104,8 +102,8 @@ void FltkViewBase::draw () } } -void FltkViewBase::drawRectangle (const core::Rectangle *rect, - bool doubleBuffer) +void FltkViewBase::draw (const core::Rectangle *rect, + bool doubleBuffer) { int offsetX = 0, offsetY = 0; @@ -333,33 +331,13 @@ void FltkViewBase::queueDraw (core::Rectangle *area) redraw (DAMAGE_VALUE); } -static void drawTotalTimeout (void *data) -{ - FltkViewBase *view = (FltkViewBase*) data; - if (time(0) >= view->lastDraw + view->drawDelay) { - view->drawTotal (); - } else { - ::fltk::add_timeout (0.2f, drawTotalTimeout, data); - } -} - -void FltkViewBase::drawTotal () -{ - //static int calls = 0; - //printf(" FltkViewBase::drawTotal calls = %d\n", ++calls); - redraw (DAMAGE_EXPOSE); - lastDraw = time (0); - cancelQueueDraw (); -} - void FltkViewBase::queueDrawTotal () { - drawTotal (); + redraw (DAMAGE_EXPOSE); } void FltkViewBase::cancelQueueDraw () { - ::fltk::remove_timeout (drawTotalTimeout, this); } void FltkViewBase::drawPoint (core::style::Color *color, diff --git a/dw/fltkviewbase.hh b/dw/fltkviewbase.hh index fcc2b43d..4c1f98d8 100644 --- a/dw/fltkviewbase.hh +++ b/dw/fltkviewbase.hh @@ -21,13 +21,9 @@ private: static ::fltk::Image *backBuffer; static bool backBufferInUse; - void drawRectangle (const core::Rectangle *rect, bool doubleBuffer); + void draw (const core::Rectangle *rect, bool doubleBuffer); void drawChildWidgets (); -public: - time_t lastDraw; - time_t drawDelay; - protected: core::Layout *theLayout; int canvasWidth, canvasHeight; @@ -54,7 +50,6 @@ public: void finishDrawing (core::Rectangle *area); void queueDraw (core::Rectangle *area); void queueDrawTotal (); - void drawTotal (); void cancelQueueDraw (); void drawPoint (core::style::Color *color, core::style::Color::Shading shading, |