summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Toolbar.cc38
1 files changed, 3 insertions, 35 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index aa8796f..32f1bcd 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Toolbar.cc,v 1.32 2002/09/14 10:58:25 rathnor Exp $ 25// $Id: Toolbar.cc,v 1.33 2002/10/13 21:51:12 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -41,8 +41,8 @@
41#define _GNU_SOURCE 41#define _GNU_SOURCE
42#endif // _GNU_SOURCE 42#endif // _GNU_SOURCE
43 43
44#ifdef HAVE_CONFIG_H 44#ifdef HAVE_CONFIG_H
45# include "../config.h" 45#include "config.h"
46#endif // HAVE_CONFIG_H 46#endif // HAVE_CONFIG_H
47 47
48#include <X11/Xutil.h> 48#include <X11/Xutil.h>
@@ -346,18 +346,10 @@ void Toolbar::reconfigure() {
346 frame.clock_w = 346 frame.clock_w =
347 XTextWidth(screen->getToolbarStyle()->font.fontstruct, 347 XTextWidth(screen->getToolbarStyle()->font.fontstruct,
348 i18n->getMessage( 348 i18n->getMessage(
349 #ifdef NLS
350 ToolbarSet, ToolbarNoStrftimeLength, 349 ToolbarSet, ToolbarNoStrftimeLength,
351 #else // !NLS
352 0, 0,
353 #endif // NLS
354 "00:00000"), 350 "00:00000"),
355 strlen(i18n->getMessage( 351 strlen(i18n->getMessage(
356 #ifdef NLS
357 ToolbarSet, ToolbarNoStrftimeLength, 352 ToolbarSet, ToolbarNoStrftimeLength,
358 #else // !NLS
359 0, 0,
360 #endif // NLS
361 "00:00000"))) + (frame.bevel_w * 4); 353 "00:00000"))) + (frame.bevel_w * 4);
362 354
363 #endif // HAVE_STRFTIME 355 #endif // HAVE_STRFTIME
@@ -597,22 +589,14 @@ void Toolbar::checkClock(bool redraw, bool date) {
597 if (screen->getDateFormat() == Blackbox::B_EuropeanDate) { 589 if (screen->getDateFormat() == Blackbox::B_EuropeanDate) {
598 sprintf(t, 590 sprintf(t,
599 i18n->getMessage( 591 i18n->getMessage(
600 #ifdef NLS
601 ToolbarSet, ToolbarNoStrftimeDateFormatEu, 592 ToolbarSet, ToolbarNoStrftimeDateFormatEu,
602 #else // !NLS
603 0, 0,
604 #endif // NLS
605 "%02d.%02d.%02d"), 593 "%02d.%02d.%02d"),
606 tt->tm_mday, tt->tm_mon + 1, 594 tt->tm_mday, tt->tm_mon + 1,
607 (tt->tm_year >= 100) ? tt->tm_year - 100 : tt->tm_year); 595 (tt->tm_year >= 100) ? tt->tm_year - 100 : tt->tm_year);
608 } else { 596 } else {
609 sprintf(t, 597 sprintf(t,
610 i18n->getMessage( 598 i18n->getMessage(
611 #ifdef NLS
612 ToolbarSet, ToolbarNoStrftimeDateFormat, 599 ToolbarSet, ToolbarNoStrftimeDateFormat,
613 #else // !NLS
614 0, 0,
615 #endif // NLS
616 "%02d/%02d/%02d"), 600 "%02d/%02d/%02d"),
617 tt->tm_mon + 1, tt->tm_mday, 601 tt->tm_mon + 1, tt->tm_mday,
618 (tt->tm_year >= 100) ? tt->tm_year - 100 : tt->tm_year); 602 (tt->tm_year >= 100) ? tt->tm_year - 100 : tt->tm_year);
@@ -621,38 +605,22 @@ void Toolbar::checkClock(bool redraw, bool date) {
621 if (screen->isClock24Hour()) 605 if (screen->isClock24Hour())
622 sprintf(t, 606 sprintf(t,
623 i18n->getMessage( 607 i18n->getMessage(
624#ifdef NLS
625 ToolbarSet, ToolbarNoStrftimeTimeFormat24, 608 ToolbarSet, ToolbarNoStrftimeTimeFormat24,
626#else // !NLS
627 0, 0,
628#endif // NLS
629 " %02d:%02d "), 609 " %02d:%02d "),
630 frame.hour, frame.minute); 610 frame.hour, frame.minute);
631 else 611 else
632 sprintf(t, 612 sprintf(t,
633 i18n->getMessage( 613 i18n->getMessage(
634 #ifdef NLS
635 ToolbarSet, ToolbarNoStrftimeTimeFormat12, 614 ToolbarSet, ToolbarNoStrftimeTimeFormat12,
636 #else // !NLS
637 0, 0,
638 #endif // NLS
639 "%02d:%02d %sm"), 615 "%02d:%02d %sm"),
640 ((frame.hour > 12) ? frame.hour - 12 : 616 ((frame.hour > 12) ? frame.hour - 12 :
641 ((frame.hour == 0) ? 12 : frame.hour)), frame.minute, 617 ((frame.hour == 0) ? 12 : frame.hour)), frame.minute,
642 ((frame.hour >= 12) ? 618 ((frame.hour >= 12) ?
643 i18n->getMessage( 619 i18n->getMessage(
644 #ifdef NLS
645 ToolbarSet, ToolbarNoStrftimeTimeFormatP, 620 ToolbarSet, ToolbarNoStrftimeTimeFormatP,
646 #else // !NLS
647 0, 0,
648 #endif // NLS
649 "p") : 621 "p") :
650 i18n->getMessage( 622 i18n->getMessage(
651 #ifdef NLS
652 ToolbarSet, ToolbarNoStrftimeTimeFormatA, 623 ToolbarSet, ToolbarNoStrftimeTimeFormatA,
653 #else // !NLS
654 0, 0,
655 #endif // NLS
656 "a"))); 624 "a")));
657 } 625 }
658 #endif // HAVE_STRFTIME 626 #endif // HAVE_STRFTIME