summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2008-10-16 22:27:20 +0200
committerjcid <devnull@localhost>2008-10-16 22:27:20 +0200
commit36e48830d7f7bf8685d21d3ce754424097e169ed (patch)
treec5b1cb821a06c09c9a81820df63ed1625da7d86a
parent82df84b16d1bb7d69bf72cf07d000c689488f50d (diff)
- Unused code cleanup.
-rw-r--r--ChangeLog10
-rw-r--r--dw/fltkviewbase.cc32
-rw-r--r--dw/fltkviewbase.hh7
3 files changed, 13 insertions, 36 deletions
diff --git a/ChangeLog b/ChangeLog
index 9a09373c..9c0f946d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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,