Skip to content

Commit

Permalink
(#110, #111) Changed local source name and made it default on open.
Browse files Browse the repository at this point in the history
  • Loading branch information
RichiCoder1 authored and gep13 committed Sep 16, 2014
1 parent cd623a9 commit cd89ec4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Chocolatey.Gui/ViewModels/Controls/SourcesPageViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ public SourcesControlViewModel(Func<string, Uri, Type, SourceViewModel> sourceVm

Sources = new ObservableCollection<SourceViewModel>
{
sourceVmFactory("Local", null, typeof(LocalSourceControl))
sourceVmFactory("This PC", null, typeof(LocalSourceControl))
};

var sources = Settings.Default.sources;
foreach (var parts in from string source in sources select source.Split('|'))
{
Sources.Add(sourceVmFactory(parts[0], new Uri(parts[1]), typeof (RemoteSourceControl)));
}

SelectedSource = Sources[0];
}
}
}

0 comments on commit cd89ec4

Please sign in to comment.