From 9cd9d92bb1d66db9329bf5cd6e42e8b0096945e6 Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Wed, 17 Apr 2002 08:30:55 +0000 Subject: configuration changes "done"!! on start, the config file is read entirely off the disc, and missing values are assigned defaults. the config file is immediately written back to the disk to populate missing defaults in the file. any time a config option is changed the control, the config file is re-written with the change. choosing reconfig will reload the current config file on the disc. on shutdown, nothing is written to the config file. --- src/Toolbar.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/Toolbar.cc') diff --git a/src/Toolbar.cc b/src/Toolbar.cc index b6469957..f5aa7f90 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -257,6 +257,13 @@ void Toolbar::setPlacement(int p) { config.setValue(s.str(), placement); } +void Toolbar::save() { + setOnTop(m_ontop); + setAutoHide(m_autohide); + setWidthPercent(m_width_percent); + setPlacement(m_placement); +} + void Toolbar::load() { std::ostrstream rscreen, rname, rclass; std::string s; @@ -379,7 +386,7 @@ void Toolbar::reconfigure() { tt = localtime(&ttmp); if (tt) { char t[1025], *time_string = (char *) 0; - int len = strftime(t, 1024, screen.getStrftimeFormat(), tt); + int len = strftime(t, 1024, screen.strftimeFormat(), tt); t[len++-1] = ' '; // add a space to the string for padding t[len] = '\0'; @@ -616,7 +623,7 @@ void Toolbar::checkClock(Bool redraw, Bool date) { if (redraw) { #ifdef HAVE_STRFTIME char t[1024]; - if (! strftime(t, 1024, screen.getStrftimeFormat(), tt)) + if (! strftime(t, 1024, screen.strftimeFormat(), tt)) return; #else // !HAVE_STRFTIME char t[9]; @@ -950,7 +957,7 @@ void Toolbar::edit() { return; XSetInputFocus(display, frame.workspace_label, - ((screen.isSloppyFocus()) ? RevertToPointerRoot : + ((screen.sloppyFocus()) ? RevertToPointerRoot : RevertToParent), CurrentTime); XClearWindow(display, frame.workspace_label); -- cgit v1.2.3