• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision28270 (tree)
Time2018-07-07 16:41:02
Authorstefankueng

Log Message

Add a separate button to the project monitor for clearing all errors.

Change Summary

Incremental Difference

Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
--- trunk/src/TortoiseProc/LogDialog/LogDlg.h (revision 28269)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.h (revision 28270)
@@ -223,6 +223,7 @@
223223 afx_msg void OnMonitorRemoveProject();
224224 afx_msg void OnMonitorOptions();
225225 afx_msg void OnMonitorMarkAllAsRead();
226+ afx_msg void OnMonitorClearErrors();
226227 afx_msg void OnMonitorUpdateAll();
227228 afx_msg void OnMonitorThreadFinished();
228229 afx_msg void OnTvnSelchangedProjtree(NMHDR *pNMHDR, LRESULT *pResult);
--- trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28269)
+++ trunk/src/TortoiseProc/LogDialog/LogDlg.cpp (revision 28270)
@@ -371,6 +371,7 @@
371371 ON_COMMAND(ID_LOGDLG_MONITOR_EDIT, &CLogDlg::OnMonitorEditProject)
372372 ON_COMMAND(ID_LOGDLG_MONITOR_REMOVE, &CLogDlg::OnMonitorRemoveProject)
373373 ON_COMMAND(ID_MISC_MARKALLASREAD, &CLogDlg::OnMonitorMarkAllAsRead)
374+ ON_COMMAND(ID_LOGDLG_MONITOR_CLEARERRORS, &CLogDlg::OnMonitorClearErrors)
374375 ON_COMMAND(ID_MISC_UPDATE, &CLogDlg::OnMonitorUpdateAll)
375376 ON_COMMAND(ID_MISC_OPTIONS, &CLogDlg::OnMonitorOptions)
376377 ON_COMMAND(ID_LOGDLG_MONITOR_THREADFINISHED, &CLogDlg::OnMonitorThreadFinished)
@@ -7813,7 +7814,7 @@
78137814
78147815 ::SendMessage(m_hwndToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0);
78157816
7816-#define MONITORMODE_TOOLBARBUTTONCOUNT 10
7817+#define MONITORMODE_TOOLBARBUTTONCOUNT 11
78177818 TBBUTTON tbb[MONITORMODE_TOOLBARBUTTONCOUNT] = { 0 };
78187819 // create an image list containing the icons for the toolbar
78197820 const int iconSizeX = int(24 * CDPIAware::Instance().ScaleFactor());
@@ -7877,6 +7878,14 @@
78777878 tbb[index].dwData = 0;
78787879 tbb[index++].iString = iString++;
78797880
7881+ hIcon = CCommonAppUtils::LoadIconEx(IDI_MONITOR_CLEARERRORS, iconSizeX, iconSizeY, LR_VGACOLOR | LR_LOADTRANSPARENT);
7882+ tbb[index].iBitmap = m_toolbarImages.Add(hIcon);
7883+ tbb[index].idCommand = ID_LOGDLG_MONITOR_CLEARERRORS;
7884+ tbb[index].fsState = TBSTATE_ENABLED | BTNS_SHOWTEXT;
7885+ tbb[index].fsStyle = BTNS_BUTTON;
7886+ tbb[index].dwData = 0;
7887+ tbb[index++].iString = iString++;
7888+
78807889 hIcon = CCommonAppUtils::LoadIconEx(IDI_MONITOR_UPDATE, iconSizeX, iconSizeY, LR_VGACOLOR | LR_LOADTRANSPARENT);
78817890 tbb[index].iBitmap = m_toolbarImages.Add(hIcon);
78827891 tbb[index].idCommand = ID_MISC_UPDATE;
@@ -8333,17 +8342,11 @@
83338342 {
83348343 // mark all entries as unread
83358344 HTREEITEM hItem = m_projTree.GetSelectedItem();
8336- bool bShift = (GetKeyState(VK_SHIFT) & 0x8000) != 0;
83378345 RecurseMonitorTree(TVI_ROOT, [&](HTREEITEM hItem)->bool
83388346 {
83398347 MonitorItem * pItem = (MonitorItem *)m_projTree.GetItemData(hItem);
83408348 pItem->UnreadItems = 0;
83418349 pItem->unreadFirst = 0;
8342- if (bShift)
8343- {
8344- pItem->authfailed = false;
8345- pItem->lastErrorMsg.Empty();
8346- }
83478350 m_projTree.SetItemState(hItem, pItem->UnreadItems ? TVIS_BOLD : 0, TVIS_BOLD);
83488351 m_projTree.SetItemState(hItem, pItem->authfailed ? INDEXTOOVERLAYMASK(OVERLAY_MODIFIED) : 0, TVIS_OVERLAYMASK);
83498352 return false;
@@ -8359,6 +8362,23 @@
83598362 m_projTree.Invalidate();
83608363 }
83618364
8365+void CLogDlg::OnMonitorClearErrors()
8366+{
8367+ // clear all errors
8368+ HTREEITEM hItem = m_projTree.GetSelectedItem();
8369+ RecurseMonitorTree(TVI_ROOT, [&](HTREEITEM hItem)->bool
8370+ {
8371+ MonitorItem * pItem = (MonitorItem *)m_projTree.GetItemData(hItem);
8372+ pItem->authfailed = false;
8373+ pItem->lastErrorMsg.Empty();
8374+ m_projTree.SetItemState(hItem, pItem->authfailed ? INDEXTOOVERLAYMASK(OVERLAY_MODIFIED) : 0, TVIS_OVERLAYMASK);
8375+ return false;
8376+ });
8377+
8378+ SaveMonitorProjects(false);
8379+ m_projTree.Invalidate();
8380+}
8381+
83628382 void CLogDlg::OnMonitorAddProject()
83638383 {
83648384 MonitorEditProject(nullptr);
Show on old repository browser