fixed pointer

This commit is contained in:
fluxgen 2002-03-19 00:12:36 +00:00
parent 9291eb0911
commit c52f13c5f2
2 changed files with 11 additions and 12 deletions

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Toolbar.cc,v 1.12 2002/02/20 23:13:32 fluxgen Exp $
// $Id: Toolbar.cc,v 1.13 2002/03/19 00:12:36 fluxgen Exp $
// stupid macros needed to access some functions in version 2 of the GNU C
// library
@ -71,20 +71,20 @@ using namespace std;
Toolbar::Toolbar(BScreen *scrn):
screen(scrn),
image_ctrl(screen->getImageControl()),
clock_timer(this), // get the clock updating every minute
iconbar(0)
{
fluxbox = Fluxbox::instance();
// get the clock updating every minute
clock_timer = new BTimer(fluxbox, this);
fluxbox = Fluxbox::instance();
timeval now;
gettimeofday(&now, 0);
clock_timer->setTimeout((60 - (now.tv_sec % 60)) * 1000);
clock_timer->start();
clock_timer.setTimeout((60 - (now.tv_sec % 60)) * 1000);
clock_timer.start();
hide_handler.toolbar = this;
hide_timer = new BTimer(fluxbox, &hide_handler);
hide_timer = new BTimer(&hide_handler);
hide_timer->setTimeout(fluxbox->getAutoRaiseDelay());
hide_timer->fireOnce(True);
@ -199,7 +199,6 @@ Toolbar::~Toolbar(void) {
XDestroyWindow(display, frame.window);
delete hide_timer;
delete clock_timer;
delete toolbarmenu;
if (iconbar)
delete iconbar;
@ -1198,7 +1197,7 @@ void Toolbar::timeout(void) {
timeval now;
gettimeofday(&now, 0);
clock_timer->setTimeout((60 - (now.tv_sec % 60)) * 1000);
clock_timer.setTimeout((60 - (now.tv_sec % 60)) * 1000);
}

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: Toolbar.hh,v 1.7 2002/02/17 18:49:02 fluxgen Exp $
// $Id: Toolbar.hh,v 1.8 2002/03/19 00:12:36 fluxgen Exp $
#ifndef TOOLBAR_HH
#define TOOLBAR_HH
@ -99,7 +99,7 @@ private:
Fluxbox *fluxbox;
BScreen *screen;
BImageControl *image_ctrl;
BTimer *clock_timer, *hide_timer;
BTimer clock_timer, *hide_timer;
Toolbarmenu *toolbarmenu;
class IconBar *iconbar;