Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions src/GitHub.Exports/Settings/generated/IPackageSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"type": "bool",
"default": "false"
},
{
"name": "ForkButton",
"type": "bool",
"default": "false"
},
{
"name": "UIState",
"type": "object",
Expand Down Expand Up @@ -46,7 +41,6 @@ public interface IPackageSettings : INotifyPropertyChanged
void Save();
bool CollectMetrics { get; set; }
bool EditorComments { get; set; }
bool ForkButton { get; set; }
UIState UIState { get; set; }
bool HideTeamExplorerWelcomeMessage { get; set; }
bool EnableTraceLogging { get; set; }
Expand Down
9 changes: 0 additions & 9 deletions src/GitHub.Resources/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions src/GitHub.Resources/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -674,9 +674,6 @@ https://git-scm.com/download/win</value>
<data name="BlendDialogText" xml:space="preserve">
<value>The GitHub extension is not available inside Blend</value>
</data>
<data name="Options_ForkButtonLabel" xml:space="preserve">
<value>Show Fork button in Team Explorer</value>
</data>
<data name="UpdateComment" xml:space="preserve">
<value>Update comment</value>
</data>
Expand Down
37 changes: 17 additions & 20 deletions src/GitHub.Resources/Resources.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -60,45 +60,45 @@
: and then encoded with base64 encoding.
-->
<xsd:schema xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace"/>
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string"/>
<xsd:attribute name="type" type="xsd:string"/>
<xsd:attribute name="mimetype" type="xsd:string"/>
<xsd:attribute ref="xml:space"/>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string"/>
<xsd:attribute name="name" type="xsd:string"/>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/>
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/>
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/>
<xsd:attribute ref="xml:space"/>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
Expand Down Expand Up @@ -673,9 +673,6 @@
<data name="BlendDialogText" xml:space="preserve">
<value>GitHub括在在Blend内部无效</value>
</data>
<data name="Options_ForkButtonLabel" xml:space="preserve">
<value>在团队资源管理器中显示分叉按钮</value>
</data>
<data name="UpdateComment" xml:space="preserve">
<value>更新注释</value>
</data>
Expand Down Expand Up @@ -835,4 +832,4 @@
<data name="YouHaveAlreadyClonedToThisLocation" xml:space="preserve">
<value>您已经克隆到此位置。单击 "打开" 打开本地存储库。</value>
</data>
</root>
</root>
13 changes: 1 addition & 12 deletions src/GitHub.TeamFoundation.14/Home/ForkNavigationItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public class ForkNavigationItem : TeamExplorerNavigationItemBase
public const string ForkNavigationItemId = "5245767A-B657-4F8E-BFEE-F04159F1DDA6";

readonly IDialogService dialogService;
readonly IPackageSettings packageSettings;
readonly IUsageTracker usageTracker;

IConnectionManager connectionManager;
Expand All @@ -37,25 +36,15 @@ public ForkNavigationItem(IGitHubServiceProvider serviceProvider,
ISimpleApiClientFactory apiFactory,
ITeamExplorerServiceHolder holder,
IDialogService dialogService,
IPackageSettings packageSettings,
IUsageTracker usageTracker)
: base(serviceProvider, apiFactory, holder, Octicon.repo_forked)
{
this.dialogService = dialogService;
this.packageSettings = packageSettings;
this.usageTracker = usageTracker;

Text = Resources.ForkNavigationItemText;
ArgbColor = Colors.PurpleNavigationItem.ToInt32();
ConnectionManager.Connections.CollectionChanged += ConnectionsChanged;

packageSettings.PropertyChanged += (sender, args) =>
{
if (args.PropertyName == nameof(packageSettings.ForkButton))
{
IsVisible = packageSettings.ForkButton;
}
};
}

IConnectionManager ConnectionManager
Expand Down Expand Up @@ -97,7 +86,7 @@ public override async void Invalidate()
{
IsVisible = false;

if ((packageSettings?.ForkButton ?? false) && await IsAGitHubDotComRepo())
if (await IsAGitHubDotComRepo())
{
var connection = await ConnectionManager.GetConnection(ActiveRepo);
IsVisible = connection?.IsLoggedIn ?? false;
Expand Down
2 changes: 0 additions & 2 deletions src/GitHub.VisualStudio/Settings/OptionsPage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,13 @@ void LoadSettings()
{
child.CollectMetrics = packageSettings.CollectMetrics;
child.EditorComments = packageSettings.EditorComments;
child.ForkButton = packageSettings.ForkButton;
child.EnableTraceLogging = packageSettings.EnableTraceLogging;
}

void SaveSettings()
{
packageSettings.CollectMetrics = child.CollectMetrics;
packageSettings.EditorComments = child.EditorComments;
packageSettings.ForkButton = child.ForkButton;
packageSettings.EnableTraceLogging = child.EnableTraceLogging;
packageSettings.Save();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@
"type": "bool",
"default": "false"
},
{
"name": "ForkButton",
"type": "bool",
"default": "false"
},
{
"name": "UIState",
"type": "object",
Expand Down Expand Up @@ -93,7 +88,6 @@ void LoadSettings()
{
CollectMetrics = (bool)settingsStore.Read("CollectMetrics", true);
EditorComments = (bool)settingsStore.Read("EditorComments", false);
ForkButton = (bool)settingsStore.Read("ForkButton", false);
UIState = SimpleJson.DeserializeObject<UIState>((string)settingsStore.Read("UIState", "{}"));
HideTeamExplorerWelcomeMessage = (bool)settingsStore.Read("HideTeamExplorerWelcomeMessage", false);
EnableTraceLogging = (bool)settingsStore.Read("EnableTraceLogging", false);
Expand All @@ -103,7 +97,6 @@ void SaveSettings()
{
settingsStore.Write("CollectMetrics", CollectMetrics);
settingsStore.Write("EditorComments", EditorComments);
settingsStore.Write("ForkButton", ForkButton);
settingsStore.Write("UIState", SimpleJson.SerializeObject(UIState));
settingsStore.Write("HideTeamExplorerWelcomeMessage", HideTeamExplorerWelcomeMessage);
settingsStore.Write("EnableTraceLogging", EnableTraceLogging);
Expand Down
3 changes: 0 additions & 3 deletions src/GitHub.VisualStudio/UI/Settings/OptionsControl.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@
<WrapPanel DockPanel.Dock="Top">
<CheckBox x:Name="chkEditorComments" VerticalAlignment="Center" Content="{x:Static ghfvs:Resources.Options_EditorCommentsLabel}" />
</WrapPanel>
<WrapPanel DockPanel.Dock="Top">
<CheckBox x:Name="chkForkButton" VerticalAlignment="Center" Content="{x:Static ghfvs:Resources.Options_ForkButtonLabel}" />
</WrapPanel>
<TextBlock DockPanel.Dock="Bottom" TextWrapping="Wrap">
<LineBreak />
<Italic>
Expand Down
6 changes: 0 additions & 6 deletions src/GitHub.VisualStudio/UI/Settings/OptionsControl.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ public bool EditorComments
set { chkEditorComments.IsChecked = value; }
}

public bool ForkButton
{
get { return chkForkButton.IsChecked ?? false; }
set { chkForkButton.IsChecked = value; }
}

private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
{
var browser = VisualStudio.Services.DefaultExportProvider.GetExportedValue<IVisualStudioBrowser>();
Expand Down
5 changes: 0 additions & 5 deletions src/common/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,6 @@
"type": "bool",
"default": "false"
},
{
"name": "ForkButton",
"type": "bool",
"default": "false"
},
{
"name": "UIState",
"type": "object",
Expand Down