OSDN Git Service

Fixed issue #265: Log dialog: Date picker throws multiple error messages when date...
authorFrank Li <lznuaa@gmail.com>
Tue, 19 Jan 2010 13:44:13 +0000 (21:44 +0800)
committerFrank Li <lznuaa@gmail.com>
Tue, 19 Jan 2010 13:44:13 +0000 (21:44 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/LogDlg.cpp

index 5ba466b..ff82919 100644 (file)
@@ -2256,10 +2256,11 @@ void CLogDlg::OnTimer(UINT_PTR nIDEvent)
 \r
 void CLogDlg::OnDtnDatetimechangeDateto(NMHDR * /*pNMHDR*/, LRESULT *pResult)\r
 {\r
-       CTime _time;\r
-       m_DateTo.GetTime(_time);\r
        try\r
        {\r
+               CTime _time;\r
+               m_DateTo.GetTime(_time);\r
+       \r
                CTime time(_time.GetYear(), _time.GetMonth(), _time.GetDay(), 23, 59, 59);\r
                if (time.GetTime() != m_LogList.m_To.GetTime())\r
                {\r
@@ -2267,8 +2268,9 @@ void CLogDlg::OnDtnDatetimechangeDateto(NMHDR * /*pNMHDR*/, LRESULT *pResult)
                        SetTimer(LOGFILTER_TIMER, 10, NULL);\r
                }\r
        }\r
-       catch (CAtlException)\r
+       catch (...)\r
        {\r
+               CMessageBox::Show(NULL,_T("Invalidate Parameter"),_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
        }\r
        \r
        *pResult = 0;\r
@@ -2276,10 +2278,12 @@ void CLogDlg::OnDtnDatetimechangeDateto(NMHDR * /*pNMHDR*/, LRESULT *pResult)
 \r
 void CLogDlg::OnDtnDatetimechangeDatefrom(NMHDR * /*pNMHDR*/, LRESULT *pResult)\r
 {\r
-       CTime _time;\r
-       m_DateFrom.GetTime(_time);\r
+       \r
        try\r
        {\r
+               CTime _time;\r
+               m_DateFrom.GetTime(_time);\r
+               \r
                CTime time(_time.GetYear(), _time.GetMonth(), _time.GetDay(), 0, 0, 0);\r
                if (time.GetTime() != m_LogList.m_From.GetTime())\r
                {\r
@@ -2287,8 +2291,9 @@ void CLogDlg::OnDtnDatetimechangeDatefrom(NMHDR * /*pNMHDR*/, LRESULT *pResult)
                        SetTimer(LOGFILTER_TIMER, 10, NULL);\r
                }\r
        }\r
-       catch (CAtlException)\r
+       catch (...)\r
        {\r
+               CMessageBox::Show(NULL,_T("Invalidate Parameter"),_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
        }\r
        \r
        *pResult = 0;\r