mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
style<Dashboard>: remove refresh button from toolbar, use F5 to reload repository's data instead
This commit is contained in:
parent
4b9923b84c
commit
6311fa081e
3 changed files with 11 additions and 17 deletions
|
@ -134,7 +134,7 @@ namespace SourceGit.Views {
|
||||||
|
|
||||||
if (Keyboard.IsKeyDown(Key.F5)) {
|
if (Keyboard.IsKeyDown(Key.F5)) {
|
||||||
var dashboard = container.Get(tabs.Current) as Widgets.Dashboard;
|
var dashboard = container.Get(tabs.Current) as Widgets.Dashboard;
|
||||||
if (dashboard != null) dashboard.Refresh(null, null);
|
if (dashboard != null) dashboard.Refresh();
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,13 +81,7 @@
|
||||||
<Button Click="OpenConfigure" Margin="6,0" BorderThickness="0" ToolTip="{StaticResource Text.Dashboard.Configure.Tip}">
|
<Button Click="OpenConfigure" Margin="6,0" BorderThickness="0" ToolTip="{StaticResource Text.Dashboard.Configure.Tip}">
|
||||||
<StackPanel Orientation="Horizontal">
|
<StackPanel Orientation="Horizontal">
|
||||||
<Path Width="14" Height="14" Data="{StaticResource Icon.Setting}"/>
|
<Path Width="14" Height="14" Data="{StaticResource Icon.Setting}"/>
|
||||||
<TextBlock Margin="4,0,0,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{StaticResource Text.Configure}"/>
|
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{StaticResource Text.Configure}"/>
|
||||||
</StackPanel>
|
|
||||||
</Button>
|
|
||||||
<Button Click="Refresh" Margin="6,0" BorderThickness="0" ToolTip="{StaticResource Text.Dashboard.Refresh.Tip}">
|
|
||||||
<StackPanel Orientation="Horizontal">
|
|
||||||
<Path Width="13" Height="13" Data="{StaticResource Icon.Loading}"/>
|
|
||||||
<TextBlock Margin="4,0" FontFamily="Consolas,Microsoft YaHei UI" FontWeight="Bold" Text="{StaticResource Text.Dashboard.Refresh}"/>
|
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
|
@ -96,6 +96,15 @@ namespace SourceGit.Views.Widgets {
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region DATA
|
#region DATA
|
||||||
|
public void Refresh() {
|
||||||
|
UpdateBraches();
|
||||||
|
UpdateWorkingCopy();
|
||||||
|
UpdateStashes();
|
||||||
|
UpdateTags();
|
||||||
|
UpdateSubmodules();
|
||||||
|
UpdateSubTrees();
|
||||||
|
}
|
||||||
|
|
||||||
private void NavigateTo(string commitId) {
|
private void NavigateTo(string commitId) {
|
||||||
workspace.SelectedIndex = 0;
|
workspace.SelectedIndex = 0;
|
||||||
(pages.Get("histories") as Histories).NavigateTo(commitId);
|
(pages.Get("histories") as Histories).NavigateTo(commitId);
|
||||||
|
@ -289,15 +298,6 @@ namespace SourceGit.Views.Widgets {
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Refresh(object sender, RoutedEventArgs e) {
|
|
||||||
UpdateBraches();
|
|
||||||
UpdateWorkingCopy();
|
|
||||||
UpdateStashes();
|
|
||||||
UpdateTags();
|
|
||||||
UpdateSubmodules();
|
|
||||||
UpdateSubTrees();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void OpenFetch(object sender, RoutedEventArgs e) {
|
private void OpenFetch(object sender, RoutedEventArgs e) {
|
||||||
if (repo.Remotes.Count == 0) {
|
if (repo.Remotes.Count == 0) {
|
||||||
Models.Exception.Raise("No remotes added to this repository!!!");
|
Models.Exception.Raise("No remotes added to this repository!!!");
|
||||||
|
|
Loading…
Reference in a new issue