diff options
author | jcid <devnull@localhost> | 2008-09-03 14:34:41 +0200 |
---|---|---|
committer | jcid <devnull@localhost> | 2008-09-03 14:34:41 +0200 |
commit | eaab00ed0b648190ac1eef7fc166cb19dc98b880 (patch) | |
tree | ad1e93756da05cf7db6bea6a16a8dba2e217de20 /src | |
parent | 3e6aed4bf51baf13ff9d3ea2478291ad570ce3d0 (diff) |
- Added the findbar destructor.
Diffstat (limited to 'src')
-rw-r--r-- | src/findbar.cc | 9 | ||||
-rw-r--r-- | src/findbar.hh | 3 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/findbar.cc b/src/findbar.cc index 4635caf7..4d95c431 100644 --- a/src/findbar.cc +++ b/src/findbar.cc @@ -9,7 +9,6 @@ * (at your option) any later version. */ -#include <fltk/xpmImage.h> #include <fltk/events.h> #include "findbar.hh" @@ -99,7 +98,8 @@ Findbar::Findbar(int width, int height, UI *ui) : begin(); hidebutton = new HighlightButton(x, border, 16, height, 0); - hidebutton->image(new xpmImage(new_s_xpm)); + hideImg = new xpmImage(new_s_xpm); + hidebutton->image(hideImg); hidebutton->tooltip("Hide"); x += 16 + gap; hidebutton->callback(hide_cb, this); @@ -125,6 +125,11 @@ Findbar::Findbar(int width, int height, UI *ui) : end(); } +Findbar::~Findbar() +{ + delete hideImg; +} + /* * Handle events. Used to catch EscapeKey events. */ diff --git a/src/findbar.hh b/src/findbar.hh index 29890ef3..db803140 100644 --- a/src/findbar.hh +++ b/src/findbar.hh @@ -1,6 +1,7 @@ #ifndef __FINDBAR_HH__ #define __FINDBAR_HH__ +#include <fltk/xpmImage.h> #include <fltk/Widget.h> #include <fltk/HighlightButton.h> #include <fltk/Button.h> @@ -20,6 +21,7 @@ class Findbar : public Group { HighlightButton *findb; Button *clrb; HighlightButton *hidebutton; + xpmImage *hideImg; UI *ui; Input *i; CheckButton *cb; @@ -30,6 +32,7 @@ class Findbar : public Group { public: Findbar(int width, int height, UI *ui); + ~Findbar(); int handle(int event); void show(); void hide(); |