{\r
m_DateFormat = DATE_LONGDATE;\r
}\r
+ // get relative time display setting from registry\r
+ DWORD regRelativeTimes = CRegDWORD(_T("Software\\TortoiseGit\\RelativeTimes"), FALSE);\r
+ m_bRelativeTimes = regRelativeTimes;\r
}\r
\r
CGitLogListBase::~CGitLogListBase()\r
case this->LOGLIST_DATE: //Date\r
if (pLogEntry)\r
lstrcpyn(pItem->pszText,\r
- CAppUtils::FormatDateAndTime( pLogEntry->m_AuthorDate, m_DateFormat, true, true ), \r
+ CAppUtils::FormatDateAndTime( pLogEntry->m_AuthorDate, m_DateFormat, true, m_bRelativeTimes ), \r
pItem->cchTextMax);\r
break;\r
\r
sLogCopyText.Format(_T("%s: %s\r\n%s: %s\r\n%s: %s\r\n%s:\r\n%s\r\n----\r\n%s\r\n\r\n"),\r
(LPCTSTR)sRev, pLogEntry->m_CommitHash,\r
(LPCTSTR)sAuthor, (LPCTSTR)pLogEntry->m_AuthorName,\r
- (LPCTSTR)sDate, (LPCTSTR)CAppUtils::FormatDateAndTime( pLogEntry->m_AuthorDate, m_DateFormat ),\r
+ (LPCTSTR)sDate, \r
+ (LPCTSTR)CAppUtils::FormatDateAndTime( pLogEntry->m_AuthorDate, m_DateFormat, true, m_bRelativeTimes ),\r
(LPCTSTR)sMessage, pLogEntry->m_Subject+_T("\r\n")+pLogEntry->m_Body,\r
(LPCTSTR)sPaths);\r
sClipdata += sLogCopyText;\r
: ISettingsPropPage(CSetDialogs::IDD)\r
, m_sDefaultLogs(_T(""))\r
, m_bShortDateFormat(FALSE)\r
+ , m_bRelativeTimes(FALSE)\r
, m_dwFontSize(0)\r
, m_sFontName(_T(""))\r
, m_bUseWCURL(FALSE)\r
m_regAutoClose = CRegDWORD(_T("Software\\TortoiseGit\\AutoClose"));\r
m_regDefaultLogs = CRegDWORD(_T("Software\\TortoiseGit\\NumberOfLogs"), 100);\r
m_regShortDateFormat = CRegDWORD(_T("Software\\TortoiseGit\\LogDateFormat"), TRUE);\r
+ m_regRelativeTimes = CRegDWORD(_T("Software\\TortoiseGit\\RelativeTimes"), FALSE);\r
m_regUseSystemLocaleForDates = CRegDWORD(_T("Software\\TortoiseGit\\UseSystemLocaleForDates"), TRUE);\r
m_regFontName = CRegString(_T("Software\\TortoiseGit\\LogFontName"), _T("Courier New"));\r
m_regFontSize = CRegDWORD(_T("Software\\TortoiseGit\\LogFontSize"), 8);\r
DDX_Control(pDX, IDC_FONTNAMES, m_cFontNames);\r
DDX_Text(pDX, IDC_DEFAULTLOG, m_sDefaultLogs);\r
DDX_Check(pDX, IDC_SHORTDATEFORMAT, m_bShortDateFormat);\r
+ DDX_Check(pDX, IDC_RELATIVETIMES, m_bRelativeTimes);\r
DDX_Control(pDX, IDC_AUTOCLOSECOMBO, m_cAutoClose);\r
DDX_Check(pDX, IDC_WCURLFROM, m_bUseWCURL);\r
DDX_Text(pDX, IDC_CHECKOUTPATH, m_sDefaultCheckoutPath);\r
BEGIN_MESSAGE_MAP(CSetDialogs, ISettingsPropPage)\r
ON_EN_CHANGE(IDC_DEFAULTLOG, OnChange)\r
ON_BN_CLICKED(IDC_SHORTDATEFORMAT, OnChange)\r
+ ON_BN_CLICKED(IDC_RELATIVETIMES, OnChange)\r
ON_BN_CLICKED(IDC_SYSTEMLOCALEFORDATES, OnChange)\r
ON_CBN_SELCHANGE(IDC_FONTSIZES, OnChange)\r
ON_CBN_SELCHANGE(IDC_FONTNAMES, OnChange)\r
\r
m_dwAutoClose = m_regAutoClose;\r
m_bShortDateFormat = m_regShortDateFormat;\r
+ m_bRelativeTimes = m_regRelativeTimes;\r
m_bUseSystemLocaleForDates = m_regUseSystemLocaleForDates;\r
m_sFontName = m_regFontName;\r
m_dwFontSize = m_regFontSize;\r
\r
m_tooltips.Create(this);\r
m_tooltips.AddTool(IDC_SHORTDATEFORMAT, IDS_SETTINGS_SHORTDATEFORMAT_TT);\r
+ m_tooltips.AddTool(IDC_RELATIVETIMES, IDS_SETTINGS_RELATIVETIMES_TT);\r
m_tooltips.AddTool(IDC_SYSTEMLOCALEFORDATES, IDS_SETTINGS_USESYSTEMLOCALEFORDATES_TT);\r
m_tooltips.AddTool(IDC_AUTOCLOSECOMBO, IDS_SETTINGS_AUTOCLOSE_TT);\r
m_tooltips.AddTool(IDC_WCURLFROM, IDS_SETTINGS_USEWCURL_TT);\r
\r
Store (m_dwAutoClose, m_regAutoClose);\r
Store (m_bShortDateFormat, m_regShortDateFormat);\r
+ Store (m_bRelativeTimes, m_regRelativeTimes);\r
Store (m_bUseSystemLocaleForDates, m_regUseSystemLocaleForDates);\r
\r
long val = _ttol(m_sDefaultLogs);\r