From df98cd0e84febe6080cf9a94cbefe1456aa7be6c Mon Sep 17 00:00:00 2001 From: Dana Jansens Date: Mon, 9 Dec 2002 07:50:22 +0000 Subject: [PATCH] work when strftime is not found --- CHANGELOG | 4 ++++ src/Screen.cc | 8 ++++---- src/Toolbar.cc | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 4b10847b..8066337d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,9 @@ Changelog for Openbox: +2.2.3: + * Fix compile errors when the strftime funtion is not (Ben Jansens) + found on the system. + 2.2.2: * Add an option to disable the window raise on (Scott Moynes) mouse clicks with the modifierMask. diff --git a/src/Screen.cc b/src/Screen.cc index 6e0c06cf..1f2c6152 100644 --- a/src/Screen.cc +++ b/src/Screen.cc @@ -563,7 +563,7 @@ void BScreen::saveStrftimeFormat(const std::string& format) { void BScreen::saveDateFormat(int f) { resource.date_format = f; config->setValue(screenstr + "dateFormat", - resource.date_format == B_EuropeanDate ? + resource.date_format == Blackbox::B_EuropeanDate ? "European" : "American"); } @@ -681,7 +681,7 @@ void BScreen::save_rc(void) { saveStrftimeFormat(resource.strftime_format); #else // !HAVE_STRFTIME saveDateFormat(resource.date_format); - savwClock24Hour(resource.clock24hour); + saveClock24Hour(resource.clock24hour); #endif // HAVE_STRFTIME savePlaceIgnoreShaded(resource.ignore_shaded); savePlaceIgnoreMaximized(resource.ignore_maximized); @@ -838,9 +838,9 @@ void BScreen::load_rc(void) { long l; if (config->getValue(screenstr + "dateFormat", s) && s == "European") - resource.date_format = B_EuropeanDate; + resource.date_format = Blackbox::B_EuropeanDate; else - resource.date_format = B_AmericanDate; + resource.date_format = Blackbox::B_AmericanDate; if (! config->getValue(screenstr + "clockFormat", l)) l = 12; diff --git a/src/Toolbar.cc b/src/Toolbar.cc index 587d3fd4..14d347ef 100644 --- a/src/Toolbar.cc +++ b/src/Toolbar.cc @@ -552,7 +552,7 @@ void Toolbar::checkClock(bool redraw, bool date) { if (date) { // format the date... with special consideration for y2k ;) if (screen->getDateFormat() == Blackbox::B_EuropeanDate) - sprintf(t, 18n(ToolbarSet, ToolbarNoStrftimeDateFormatEu, + sprintf(t, i18n(ToolbarSet, ToolbarNoStrftimeDateFormatEu, "%02d.%02d.%02d"), tt->tm_mday, tt->tm_mon + 1, (tt->tm_year >= 100) ? tt->tm_year - 100 : tt->tm_year); -- 2.34.1