• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision7246 (tree)
Zeit2006-08-10 03:07:01
Autorstefankueng

Log Message

Merge revisions 7242-7245 from trunk:
* Don't show switched files in the commit/revert/... dialog but only in the check-for-modifications dialog unconditionally.
* Ctrl+Shift+Wheel changes the alpha value in overlapped mode.
* Fix debug build: Use ResText from the debug build and not from the release build. Otherwise the debug build fails if there wasn't a release build previously.
* Always use UI-friendly file/foldernames in view titles.
* new method GetUIFileOrDirectoryName() in CTSVNPath
* use of the new method wherever we need an UI friendly name

Ändern Zusammenfassung

Diff

--- branches/1.4.x/STATUS.txt (revision 7245)
+++ branches/1.4.x/STATUS.txt (revision 7246)
@@ -24,3 +24,7 @@
2424 7233 : graph not stacked by default.
2525 7238 : reverting switched files
2626 7240 : fonts with non-ascii names
27+7242 : switched files only in cfm dialog
28+7243 : Ctrl+Shift+Wheel and alpha value in TortoiseIDiff
29+7244 : fix debug build
30+7245 : UI friendly file titles
--- branches/1.4.x/src/Changelog.txt (revision 7245)
+++ branches/1.4.x/src/Changelog.txt (revision 7246)
@@ -1,3 +1,8 @@
1+- NEW: Allow changing the alpha value in overlapped mode in TortoiseIDiff
2+ to be changed with Ctrl+Shift+Wheel. (Stefan)
3+- CHG: Switched files are only shown in the check-for-modifications
4+ dialog and not in e.g. the commit/revert/add dialog if they're
5+ not modified. (Stefan)
16 - BUG: The header in TortoiseBlame was shown in the wrong font in translated
27 versions. (Kazutoshi Satoda)
38 - BUG: The state of the "Floppy drives" checkbox was not set correctly
@@ -11,6 +16,7 @@
1116 was switched. (Ivan Gerasimov)
1217 - BUG: Selecting fonts with non-ascii names didn't work in the
1318 scintilla edit control. (Kazutoshi Satoda)
19+- BUG: The file titles were not always un-escaped. (Stefan)
1420
1521 Version 1.4.0RC1
1622 - NEW: Command line param /bugid to prefill the bug ID
--- branches/1.4.x/src/SVN/SVNDiff.cpp (revision 7245)
+++ branches/1.4.x/src/SVN/SVNDiff.cpp (revision 7246)
@@ -98,7 +98,7 @@
9898 SetFileAttributes(remotePath.GetWinPath(), FILE_ATTRIBUTE_READONLY);
9999 }
100100
101- CString name = filePath.GetFileOrDirectoryName();
101+ CString name = filePath.GetUIFileOrDirectoryName();
102102 CString n1, n2, n3;
103103 n1.Format(IDS_DIFF_WCNAME, name);
104104 n2.Format(IDS_DIFF_BASENAME, name);
@@ -476,8 +476,8 @@
476476 CString revname1, revname2;
477477 if (url1.IsEquivalentTo(url2))
478478 {
479- revname1.Format(_T("%s Revision %s"), (LPCTSTR)url1.GetFileOrDirectoryName(), rev1.ToString());
480- revname2.Format(_T("%s Revision %s"), (LPCTSTR)url2.GetFileOrDirectoryName(), rev2.ToString());
479+ revname1.Format(_T("%s Revision %s"), (LPCTSTR)url1.GetUIFileOrDirectoryName(), rev1.ToString());
480+ revname2.Format(_T("%s Revision %s"), (LPCTSTR)url2.GetUIFileOrDirectoryName(), rev2.ToString());
481481 }
482482 else
483483 {
--- branches/1.4.x/src/SVN/TSVNPath.cpp (revision 7245)
+++ branches/1.4.x/src/SVN/TSVNPath.cpp (revision 7246)
@@ -406,6 +406,12 @@
406406 return m_sBackslashPath.Mid(m_sBackslashPath.ReverseFind('\\')+1);
407407 }
408408
409+CString CTSVNPath::GetUIFileOrDirectoryName() const
410+{
411+ GetUIPathString();
412+ return m_sUIPath.Mid(m_sUIPath.ReverseFind('\\')+1);
413+}
414+
409415 CString CTSVNPath::GetFileExtension() const
410416 {
411417 if(!IsDirectory())
--- branches/1.4.x/src/SVN/TSVNPath.h (revision 7245)
+++ branches/1.4.x/src/SVN/TSVNPath.h (revision 7246)
@@ -112,6 +112,10 @@
112112 */
113113 CString GetFileOrDirectoryName() const;
114114 /**
115+ * Returns the item's name without the full path, unescaped if necessary.
116+ */
117+ CString GetUIFileOrDirectoryName() const;
118+ /**
115119 * Returns the file extension, including the dot.
116120 * \remark Returns an empty string for directories
117121 */
--- branches/1.4.x/src/TortoiseIDiff/MainWindow.cpp (revision 7245)
+++ branches/1.4.x/src/TortoiseIDiff/MainWindow.cpp (revision 7246)
@@ -126,6 +126,7 @@
126126 // create a slider control
127127 hTrackbar = CreateTrackbar(*this, 0, 255);
128128 ShowWindow(hTrackbar, SW_HIDE);
129+ picWindow1.SetAlphaSlider(hTrackbar);
129130 CreateToolbar();
130131 }
131132 break;
--- branches/1.4.x/src/TortoiseIDiff/PicWindow.cpp (revision 7245)
+++ branches/1.4.x/src/TortoiseIDiff/PicWindow.cpp (revision 7246)
@@ -443,8 +443,22 @@
443443 width = max(width, long(double(pSecondPic->m_Width)*picscale));
444444 height = max(height, long(double(pSecondPic->m_Height)*picscale));
445445 }
446- if (fwKeys & MK_SHIFT)
446+ if ((fwKeys & MK_SHIFT)&&(fwKeys & MK_CONTROL)&&(pSecondPic))
447447 {
448+ // ctrl+shift+wheel: change the alpha channel
449+ int overflow = alpha; // use an int to detect overflows
450+ alpha -= (zDelta / 12);
451+ overflow -= (zDelta / 12);
452+ if (overflow > 255)
453+ alpha = 255;
454+ if (overflow < 0)
455+ alpha = 0;
456+ if (hwndAlphaSlider)
457+ SendMessage(hwndAlphaSlider, TBM_SETPOS, 1, alpha);
458+ InvalidateRect(*this, NULL, FALSE);
459+ }
460+ else if (fwKeys & MK_SHIFT)
461+ {
448462 // shift means scrolling sideways
449463 nHScrollPos -= zDelta;
450464 if (nHScrollPos > width-rect.right+rect.left)
--- branches/1.4.x/src/TortoiseIDiff/PicWindow.h (revision 7245)
+++ branches/1.4.x/src/TortoiseIDiff/PicWindow.h (revision 7246)
@@ -55,6 +55,7 @@
5555 , bPlaying(false)
5656 , pTheOtherPic(NULL)
5757 , bLinked(false)
58+ , hwndAlphaSlider(NULL)
5859 {
5960 SetWindowTitle(_T("Picture Window"));
6061 };
@@ -84,6 +85,7 @@
8485 alpha = a;
8586 InvalidateRect(*this, NULL, FALSE);
8687 }
88+ void SetAlphaSlider(HWND hWnd) {hwndAlphaSlider = hWnd;}
8789 /// Resizes the image to fit into the window. Small images are not enlarged.
8890 void FitImageInWindow();
8991 /// Sets the zoom factor of the image
@@ -155,6 +157,7 @@
155157 HWND hwndLeftBtn;
156158 HWND hwndRightBtn;
157159 HWND hwndPlayBtn;
160+ HWND hwndAlphaSlider;
158161 HICON hLeft;
159162 HICON hRight;
160163 HICON hPlay;
--- branches/1.4.x/src/TortoiseProc/AppUtils.cpp (revision 7245)
+++ branches/1.4.x/src/TortoiseProc/AppUtils.cpp (revision 7246)
@@ -112,7 +112,7 @@
112112 }
113113 else
114114 {
115- com.Replace(_T("%bname"), _T("\"") + basefile.GetFileOrDirectoryName() + _T("\""));
115+ com.Replace(_T("%bname"), _T("\"") + basefile.GetUIFileOrDirectoryName() + _T("\""));
116116 }
117117 }
118118 else
@@ -126,7 +126,7 @@
126126 }
127127 else
128128 {
129- com.Replace(_T("%tname"), _T("\"") + theirfile.GetFileOrDirectoryName() + _T("\""));
129+ com.Replace(_T("%tname"), _T("\"") + theirfile.GetUIFileOrDirectoryName() + _T("\""));
130130 }
131131 }
132132 else
@@ -140,7 +140,7 @@
140140 }
141141 else
142142 {
143- com.Replace(_T("%yname"), _T("\"") + yourfile.GetFileOrDirectoryName() + _T("\""));
143+ com.Replace(_T("%yname"), _T("\"") + yourfile.GetUIFileOrDirectoryName() + _T("\""));
144144 }
145145 }
146146 else
@@ -154,7 +154,7 @@
154154 }
155155 else
156156 {
157- com.Replace(_T("%mname"), _T("\"") + mergedfile.GetFileOrDirectoryName() + _T("\""));
157+ com.Replace(_T("%mname"), _T("\"") + mergedfile.GetUIFileOrDirectoryName() + _T("\""));
158158 }
159159 }
160160 else
@@ -256,12 +256,12 @@
256256 }
257257
258258 if (sName1.IsEmpty())
259- viewer.Replace(_T("%bname"), _T("\"") + file1.GetFileOrDirectoryName() + _T("\""));
259+ viewer.Replace(_T("%bname"), _T("\"") + file1.GetUIFileOrDirectoryName() + _T("\""));
260260 else
261261 viewer.Replace(_T("%bname"), _T("\"") + sName1 + _T("\""));
262262
263263 if (sName2.IsEmpty())
264- viewer.Replace(_T("%yname"), _T("\"") + file2.GetFileOrDirectoryName() + _T("\""));
264+ viewer.Replace(_T("%yname"), _T("\"") + file2.GetUIFileOrDirectoryName() + _T("\""));
265265 else
266266 viewer.Replace(_T("%yname"), _T("\"") + sName2 + _T("\""));
267267
--- branches/1.4.x/src/TortoiseProc/SVNProgressDlg.cpp (revision 7245)
+++ branches/1.4.x/src/TortoiseProc/SVNProgressDlg.cpp (revision 7246)
@@ -647,7 +647,7 @@
647647 CTSVNPath checkoutdir = m_targetPathList[0];
648648 for (int i=0; i<urls.GetCount(); ++i)
649649 {
650- sWindowTitle = urls[i].GetFileOrDirectoryName()+_T(" - ")+sWindowTitle;
650+ sWindowTitle = urls[i].GetUIFileOrDirectoryName()+_T(" - ")+sWindowTitle;
651651 SetWindowText(sWindowTitle);
652652 checkoutdir = m_targetPathList[0];
653653 if (urls.GetCount() > 1)
@@ -671,7 +671,7 @@
671671 case Import: //no tempfile!
672672 ASSERT(m_targetPathList.GetCount() == 1);
673673 sWindowTitle.LoadString(IDS_PROGRS_TITLE_IMPORT);
674- sWindowTitle = m_targetPathList[0].GetFileOrDirectoryName()+_T(" - ")+sWindowTitle;
674+ sWindowTitle = m_targetPathList[0].GetUIFileOrDirectoryName()+_T(" - ")+sWindowTitle;
675675 SetWindowText(sWindowTitle);
676676 if (!m_pSvn->Import(m_targetPathList[0], m_url, m_sMessage, true, m_options & ProgOptIncludeIgnored ? true : false))
677677 {
@@ -788,7 +788,7 @@
788788 }
789789 if (m_targetPathList.GetCount()==1)
790790 {
791- sWindowTitle = m_targetPathList[0].GetFileOrDirectoryName()+_T(" - ")+sWindowTitle;
791+ sWindowTitle = m_targetPathList[0].GetUIFileOrDirectoryName()+_T(" - ")+sWindowTitle;
792792 SetWindowText(sWindowTitle);
793793 }
794794 BOOL isTag = FALSE;
@@ -929,7 +929,7 @@
929929 case Export:
930930 ASSERT(m_targetPathList.GetCount() == 1);
931931 sWindowTitle.LoadString(IDS_PROGRS_TITLE_EXPORT);
932- sWindowTitle = m_url.GetFileOrDirectoryName()+_T(" - ")+sWindowTitle;
932+ sWindowTitle = m_url.GetUIFileOrDirectoryName()+_T(" - ")+sWindowTitle;
933933 SetWindowText(sWindowTitle);
934934 if (!m_pSvn->Export(m_url, m_targetPathList[0], m_Revision, m_Revision, TRUE, m_options & ProgOptIgnoreExternals))
935935 {
@@ -1571,9 +1571,9 @@
15711571 SetFileAttributes(newfile.GetWinPath(), FILE_ATTRIBUTE_READONLY);
15721572 SetFileAttributes(basefile.GetWinPath(), FILE_ATTRIBUTE_READONLY);
15731573 CString revname, wcname, basename;
1574- revname.Format(_T("%s Revision %ld"), (LPCTSTR)data->path.GetFileOrDirectoryName(), rev);
1575- wcname.Format(IDS_DIFF_WCNAME, (LPCTSTR)data->path.GetFileOrDirectoryName());
1576- basename.Format(IDS_DIFF_BASENAME, (LPCTSTR)data->path.GetFileOrDirectoryName());
1574+ revname.Format(_T("%s Revision %ld"), (LPCTSTR)data->path.GetUIFileOrDirectoryName(), rev);
1575+ wcname.Format(IDS_DIFF_WCNAME, (LPCTSTR)data->path.GetUIFileOrDirectoryName());
1576+ basename.Format(IDS_DIFF_BASENAME, (LPCTSTR)data->path.GetUIFileOrDirectoryName());
15771577 CAppUtils::StartExtMerge(basefile, newfile, data->path, data->path, basename, revname, wcname, CString(), true);
15781578 }
15791579 else
@@ -1590,8 +1590,8 @@
15901590 {
15911591 SetFileAttributes(tempfile.GetWinPath(), FILE_ATTRIBUTE_READONLY);
15921592 CString revname, wcname;
1593- revname.Format(_T("%s Revision %ld"), (LPCTSTR)data->path.GetFileOrDirectoryName(), rev);
1594- wcname.Format(IDS_DIFF_WCNAME, (LPCTSTR)data->path.GetFileOrDirectoryName());
1593+ revname.Format(_T("%s Revision %ld"), (LPCTSTR)data->path.GetUIFileOrDirectoryName(), rev);
1594+ wcname.Format(IDS_DIFF_WCNAME, (LPCTSTR)data->path.GetUIFileOrDirectoryName());
15951595 CAppUtils::StartExtDiff(tempfile, data->path, revname, wcname);
15961596 }
15971597 }
--- branches/1.4.x/src/TortoiseProc/TortoiseProc.cpp (revision 7245)
+++ branches/1.4.x/src/TortoiseProc/TortoiseProc.cpp (revision 7246)
@@ -1540,7 +1540,7 @@
15401540 // Offer a rename
15411541 progress.Stop();
15421542 CRenameDlg dlg;
1543- dlg.m_windowtitle.Format(IDS_PROC_NEWNAMECOPY, (LPCTSTR)sourcePath.GetFileOrDirectoryName());
1543+ dlg.m_windowtitle.Format(IDS_PROC_NEWNAMECOPY, (LPCTSTR)sourcePath.GetUIFileOrDirectoryName());
15441544 if (dlg.DoModal() != IDOK)
15451545 {
15461546 return FALSE;
Show on old repository browser