Skip to content

Commit e1c1b09

Browse files
authored
Merge pull request #2 from IvoKrugers/develop
Allow renaming of file correctly
2 parents f8e0d2e + eac4200 commit e1c1b09

File tree

3 files changed

+5
-17
lines changed

3 files changed

+5
-17
lines changed

VisualStudioMac.OneClickToOpenFile/CommandHandlers/Node/OneClickNodeCommandHandler.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,5 @@ public override void OnItemSelected()
2222
}
2323
}
2424
}
25-
26-
public override void OnRenameStarting(ref string startingText, ref int selectionStart, ref int selectionLength)
27-
{
28-
base.OnRenameStarting(ref startingText, ref selectionStart, ref selectionLength);
29-
}
30-
31-
public override void OnRenameStarting(ref int selectionStart, ref int selectionLength)
32-
{
33-
base.OnRenameStarting(ref selectionStart, ref selectionLength);
34-
}
3525
}
3626
}

VisualStudioMac.OneClickToOpenFile/Constants.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
{
33
public static class Constants
44
{
5-
public const string Version = "17.0";
5+
public const string Version = "17.1";
66
public const string OneClickChar
77
#if DEBUG
8-
= "-->>";
8+
= ">>";
99
#else
10-
= "-->";
10+
= ">";
1111
#endif
1212
internal static string[] ExcludedExtensionsFromOneClick = { ".storyboard", ".xib", ".png", ".ttf" };
1313
}

VisualStudioMac.OneClickToOpenFile/NodeBuilderExtensions/OneClickFileNodeBuilderExt.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System;
22
using System.IO;
3+
using Gtk;
34
using MonoDevelop.Ide.Gui.Components;
45
using MonoDevelop.Projects;
56
using VisualStudioMac.OneClickToOpenFile.CommandHandlers.Node;
@@ -18,10 +19,7 @@ public override void BuildNode(ITreeBuilder treeBuilder, object dataObject, Node
1819
var ext = Path.GetExtension(file.FilePath);
1920
if (Constants.ExcludedExtensionsFromOneClick.FindIndex((s) => s == ext) == -1)
2021
{
21-
if (!nodeInfo.Label.Contains(Constants.OneClickChar))
22-
{
23-
nodeInfo.Label = $"{nodeInfo.Label} {Constants.OneClickChar}";
24-
}
22+
nodeInfo.SecondaryLabel = Constants.OneClickChar;
2523
}
2624
}
2725
}

0 commit comments

Comments
 (0)