From: Colin Law Date: Fri, 30 Jan 2009 21:22:25 +0000 (+0000) Subject: Provide sensible default column widths for log. Defaults for when there is nothing... X-Git-Url: http://git.sourceforge.jp/view?p=tortoisegit%2FTortoiseGitJp.git;a=commitdiff_plain;h=acf407448af65f8520d08e2b9ae37370c378fc3d Provide sensible default column widths for log. Defaults for when there is nothing saved in reg. --- diff --git a/src/TortoiseProc/GitLogListBase.cpp b/src/TortoiseProc/GitLogListBase.cpp index 9c9d86d..c9cf2dd 100644 --- a/src/TortoiseProc/GitLogListBase.cpp +++ b/src/TortoiseProc/GitLogListBase.cpp @@ -236,6 +236,18 @@ void CGitLogListBase::ResizeAllListCtrlCols() regentry.Format( _T("Software\\TortoiseGit\\log\\ColWidth%d"), col); CRegDWORD regwidth(regentry, 0); int cx = regwidth; + if ( cx == 0 ) + { + // no saved value, setup sensible defaults + if (col == this->LOGLIST_MESSAGE) + { + cx = LOGLIST_MESSAGE_MIN; + } + else + { + cx = ICONITEMBORDER+16*4; + } + } if (cx < nMinimumWidth) { cx = nMinimumWidth;