From 6944f45c860629d8024dc16f78e098727ef49c08 Mon Sep 17 00:00:00 2001 From: HomeWorld Date: Sun, 16 Jan 2011 21:16:08 +0200 Subject: [PATCH] Added the year to fit item creation date, also use GetPartialText for fitLocalDate (so we don't have overlapping texts) --- gui/shipBrowser.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gui/shipBrowser.py b/gui/shipBrowser.py index 0ecd695f9..e44244ae7 100644 --- a/gui/shipBrowser.py +++ b/gui/shipBrowser.py @@ -1467,9 +1467,10 @@ class FitItem(SFItem.SFBrowserItem): mdc.SetFont(self.fontNormal) fitDate = time.localtime(self.timestamp) - fitLocalDate = "%02d/%02d %02d:%02d" % (fitDate[1], fitDate[2], fitDate[3], fitDate[4]) + fitLocalDate = "%d/%02d/%02d %02d:%02d" % ( fitDate[0], fitDate[1], fitDate[2], fitDate[3], fitDate[4]) + pfdate = drawUtils.GetPartialText(mdc, fitLocalDate, self.toolbarx - self.textStartx - self.padding * 2 - self.thoverw) - mdc.DrawText(fitLocalDate, self.textStartx, self.timestampy) + mdc.DrawText(pfdate, self.textStartx, self.timestampy) mdc.SetFont(self.fontSmall) mdc.DrawText(self.toolbar.hoverLabel, self.thoverx, self.thovery)