[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] Color all added files as added in FileDiffDlg

From: Kazutoshi Satoda <k_satoda_at_f2.dion.ne.jp>
Date: 2006-11-01 19:12:01 CET

Hi.

In 1.4.0 FileDiffDlg, an entry which is added with properties is shown
in "modified" color. This makes some operation (such as "Select all
added") difficult. The attached patch will reduce this difficulty.

New (1.5.0?) sortable column will clear this difficulty completely. But
I want this to be fixed in the upcoming 1.4.1.

Proposed log message:
[[[
Color all added files as "added" in FileDiffDlg. Before this, an entry
which was added with properties was shown in "modified" color.
]]]

As before, I can't build tsvn by myself. Please tweak as needed. Sorry.

--
k_satoda

Index: src/TortoiseProc/FileDiffDlg.cpp
===================================================================
--- src/TortoiseProc/FileDiffDlg.cpp (revision 7900)
+++ src/TortoiseProc/FileDiffDlg.cpp (working copy)
@@ -453,12 +453,23 @@
                 if (m_arFileList.size() > (INT_PTR)pLVCD->nmcd.dwItemSpec)
                 {
                         FileDiff fd = m_arFileList[pLVCD->nmcd.dwItemSpec];
- if (fd.kind == svn_client_diff_summarize_kind_added)
+ switch (fd.kind)
+ {
+ case svn_client_diff_summarize_kind_added:
                                 crText = m_colors.GetColor(CColors::Added);
- if (fd.kind == svn_client_diff_summarize_kind_deleted)
+ break;
+ case svn_client_diff_summarize_kind_deleted:
                                 crText = m_colors.GetColor(CColors::Deleted);
- if (fd.propchanged)
- crText = m_colors.GetColor(CColors::PropertyChanged);
+ break;
+ case svn_client_diff_summarize_kind_modified:
+ crText = m_colors.GetColor(CColors::Modified);
+ break;
+ case svn_client_diff_summarize_kind_normal:
+ default:
+ if (fd.propchanged)
+ crText = m_colors.GetColor(CColors::PropertyChanged);
+ break;
+ }
                 }
                 // Store the color back in the NMLVCUSTOMDRAW struct.
                 pLVCD->clrText = crText;

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Nov 1 19:12:09 2006

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.