diff options
-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(); |