OSDN Git Service

Provide sensible default column widths for log. Defaults for when there is nothing...
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / GitLogListBase.cpp
index 9c9d86d..c9cf2dd 100644 (file)
@@ -236,6 +236,18 @@ void CGitLogListBase::ResizeAllListCtrlCols()
                        regentry.Format( _T("Software\\TortoiseGit\\log\\ColWidth%d"), col);\r
                        CRegDWORD regwidth(regentry, 0);\r
                        int cx = regwidth;\r
+                       if ( cx == 0 )\r
+                       {\r
+                               // no saved value, setup sensible defaults\r
+                               if (col == this->LOGLIST_MESSAGE)\r
+                               {\r
+                                       cx = LOGLIST_MESSAGE_MIN;\r
+                               }\r
+                               else\r
+                               {\r
+                                       cx = ICONITEMBORDER+16*4;\r
+                               }\r
+                       }\r
                        if (cx < nMinimumWidth)\r
                        {\r
                                cx = nMinimumWidth;\r