• R/O
  • SSH
  • HTTPS

tabtextfinder: Commit


Commit MetaInfo

Revision171 (tree)
Time2019-10-20 22:05:02
Authorneparze

Log Message

refined history item text

Change Summary

Incremental Difference

--- TabTextFinderForm.cs (revision 170)
+++ TabTextFinderForm.cs (revision 171)
@@ -251,25 +251,20 @@
251251 {
252252 for (int n = recent_items.Count - 1; n >= 0; --n) {
253253 RecentItem recent = recent_items[n];
254- string str;
255- str = recent.Root;
256- if (string.IsNullOrEmpty( str ) == false) { str.Trim(); }
257- string text = string.Format( "[ {0}", str );
258- //
259- str = recent.ExcludeRoot;
260- if (string.IsNullOrEmpty( str ) == false) { str.Trim(); }
261- if (string.IsNullOrEmpty( str ) == false) { text += string.Format( " - {0}", str ); }
262- //
254+ string text = "[ ";
255+ if (string.IsNullOrEmpty( recent.ExcludeRoot ) || recent.Recursive == false) {
256+ text += recent.Root;
257+ } else {
258+ text += string.Format( "({0}) - ({1})", recent.Root, recent.ExcludeRoot );
259+ }
263260 text += " ] ";
264261 text += (recent.Recursive) ? "//" : "/";
265- //
266- str = recent.File;
267- if (string.IsNullOrEmpty( str ) == false) { str.Trim(); }
268- text += string.Format( " [ {0}", str );
269- //
270- str = recent.Exclude;
271- if (string.IsNullOrEmpty( str ) == false) { str.Trim(); }
272- if (string.IsNullOrEmpty( str ) == false) { text += string.Format( " - {0}", str ); }
262+ text += " [ ";
263+ if (string.IsNullOrEmpty( recent.Exclude )) {
264+ text += recent.File;
265+ } else {
266+ text += string.Format( "({0}) - ({1})", recent.File, recent.Exclude );
267+ }
273268 text += " ]";
274269 ToolStripItem item = recent_menu.Items.Add( text );
275270 item.Tag = recent;
Show on old repository browser