aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-03-19 00:12:36 (GMT)
committerfluxgen <fluxgen>2002-03-19 00:12:36 (GMT)
commitc52f13c5f2150e314db0723ba02f447be672e296 (patch)
tree944663482d7bdf88061d951cf655ee87d507fa3b /src/Toolbar.cc
parent9291eb0911bcb029cb0d3b527f45ffbb95b5d402 (diff)
downloadfluxbox-c52f13c5f2150e314db0723ba02f447be672e296.zip
fluxbox-c52f13c5f2150e314db0723ba02f447be672e296.tar.bz2
fixed pointer
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index e85f20d..9cf2752 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: Toolbar.cc,v 1.12 2002/02/20 23:13:32 fluxgen Exp $ 22// $Id: Toolbar.cc,v 1.13 2002/03/19 00:12:36 fluxgen Exp $
23 23
24// stupid macros needed to access some functions in version 2 of the GNU C 24// stupid macros needed to access some functions in version 2 of the GNU C
25// library 25// library
@@ -71,20 +71,20 @@ using namespace std;
71Toolbar::Toolbar(BScreen *scrn): 71Toolbar::Toolbar(BScreen *scrn):
72screen(scrn), 72screen(scrn),
73image_ctrl(screen->getImageControl()), 73image_ctrl(screen->getImageControl()),
74clock_timer(this), // get the clock updating every minute
74iconbar(0) 75iconbar(0)
75{ 76{
76 77
77 fluxbox = Fluxbox::instance(); 78 fluxbox = Fluxbox::instance();
78 79
79 // get the clock updating every minute 80
80 clock_timer = new BTimer(fluxbox, this);
81 timeval now; 81 timeval now;
82 gettimeofday(&now, 0); 82 gettimeofday(&now, 0);
83 clock_timer->setTimeout((60 - (now.tv_sec % 60)) * 1000); 83 clock_timer.setTimeout((60 - (now.tv_sec % 60)) * 1000);
84 clock_timer->start(); 84 clock_timer.start();
85 85
86 hide_handler.toolbar = this; 86 hide_handler.toolbar = this;
87 hide_timer = new BTimer(fluxbox, &hide_handler); 87 hide_timer = new BTimer(&hide_handler);
88 hide_timer->setTimeout(fluxbox->getAutoRaiseDelay()); 88 hide_timer->setTimeout(fluxbox->getAutoRaiseDelay());
89 hide_timer->fireOnce(True); 89 hide_timer->fireOnce(True);
90 90
@@ -199,7 +199,6 @@ Toolbar::~Toolbar(void) {
199 XDestroyWindow(display, frame.window); 199 XDestroyWindow(display, frame.window);
200 200
201 delete hide_timer; 201 delete hide_timer;
202 delete clock_timer;
203 delete toolbarmenu; 202 delete toolbarmenu;
204 if (iconbar) 203 if (iconbar)
205 delete iconbar; 204 delete iconbar;
@@ -1198,7 +1197,7 @@ void Toolbar::timeout(void) {
1198 1197
1199 timeval now; 1198 timeval now;
1200 gettimeofday(&now, 0); 1199 gettimeofday(&now, 0);
1201 clock_timer->setTimeout((60 - (now.tv_sec % 60)) * 1000); 1200 clock_timer.setTimeout((60 - (now.tv_sec % 60)) * 1000);
1202} 1201}
1203 1202
1204 1203