mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
feature: add a menu item to open app data dir
This commit is contained in:
parent
0c6af27b40
commit
ff3d841d12
6 changed files with 14 additions and 0 deletions
|
@ -33,6 +33,7 @@
|
||||||
<NativeMenuItem Header="{DynamicResource Text.SelfUpdate}" Command="{x:Static s:App.CheckForUpdateCommand}"/>
|
<NativeMenuItem Header="{DynamicResource Text.SelfUpdate}" Command="{x:Static s:App.CheckForUpdateCommand}"/>
|
||||||
<NativeMenuItemSeparator/>
|
<NativeMenuItemSeparator/>
|
||||||
<NativeMenuItem Header="{DynamicResource Text.Preference}" Command="{x:Static s:App.OpenPreferenceCommand}" Gesture="⌘+,"/>
|
<NativeMenuItem Header="{DynamicResource Text.Preference}" Command="{x:Static s:App.OpenPreferenceCommand}" Gesture="⌘+,"/>
|
||||||
|
<NativeMenuItem Header="{DynamicResource Text.OpenAppDataDir}" Command="{x:Static s:App.OpenAppDataDirCommand}"/>
|
||||||
<NativeMenuItemSeparator/>
|
<NativeMenuItemSeparator/>
|
||||||
<NativeMenuItem Header="{DynamicResource Text.Quit}" Command="{x:Static s:App.QuitCommand}" Gesture="⌘+Q"/>
|
<NativeMenuItem Header="{DynamicResource Text.Quit}" Command="{x:Static s:App.QuitCommand}" Gesture="⌘+Q"/>
|
||||||
</NativeMenu>
|
</NativeMenu>
|
||||||
|
|
|
@ -109,6 +109,11 @@ namespace SourceGit
|
||||||
dialog.ShowDialog(toplevel);
|
dialog.ShowDialog(toplevel);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
public static readonly SimpleCommand OpenAppDataDirCommand = new SimpleCommand(() =>
|
||||||
|
{
|
||||||
|
Native.OS.OpenInFileManager(Native.OS.DataDir);
|
||||||
|
});
|
||||||
|
|
||||||
public static readonly SimpleCommand OpenAboutCommand = new SimpleCommand(() =>
|
public static readonly SimpleCommand OpenAboutCommand = new SimpleCommand(() =>
|
||||||
{
|
{
|
||||||
var toplevel = GetTopLevel() as Window;
|
var toplevel = GetTopLevel() as Window;
|
||||||
|
|
|
@ -345,6 +345,7 @@
|
||||||
<x:String x:Key="Text.Name" xml:space="preserve">Name:</x:String>
|
<x:String x:Key="Text.Name" xml:space="preserve">Name:</x:String>
|
||||||
<x:String x:Key="Text.NotConfigured" xml:space="preserve">Git has NOT been configured. Please to go [Preference] and configure it first.</x:String>
|
<x:String x:Key="Text.NotConfigured" xml:space="preserve">Git has NOT been configured. Please to go [Preference] and configure it first.</x:String>
|
||||||
<x:String x:Key="Text.Notice" xml:space="preserve">NOTICE</x:String>
|
<x:String x:Key="Text.Notice" xml:space="preserve">NOTICE</x:String>
|
||||||
|
<x:String x:Key="Text.OpenAppDataDir" xml:space="preserve">Open App Data Dir</x:String>
|
||||||
<x:String x:Key="Text.OpenFolder" xml:space="preserve">SELECT FOLDER</x:String>
|
<x:String x:Key="Text.OpenFolder" xml:space="preserve">SELECT FOLDER</x:String>
|
||||||
<x:String x:Key="Text.OpenWith" xml:space="preserve">Open With...</x:String>
|
<x:String x:Key="Text.OpenWith" xml:space="preserve">Open With...</x:String>
|
||||||
<x:String x:Key="Text.Optional" xml:space="preserve">Optional.</x:String>
|
<x:String x:Key="Text.Optional" xml:space="preserve">Optional.</x:String>
|
||||||
|
|
|
@ -348,6 +348,7 @@
|
||||||
<x:String x:Key="Text.Name" xml:space="preserve">名称 :</x:String>
|
<x:String x:Key="Text.Name" xml:space="preserve">名称 :</x:String>
|
||||||
<x:String x:Key="Text.NotConfigured" xml:space="preserve">GIT尚未配置。请打开【偏好设置】配置GIT路径。</x:String>
|
<x:String x:Key="Text.NotConfigured" xml:space="preserve">GIT尚未配置。请打开【偏好设置】配置GIT路径。</x:String>
|
||||||
<x:String x:Key="Text.Notice" xml:space="preserve">系统提示</x:String>
|
<x:String x:Key="Text.Notice" xml:space="preserve">系统提示</x:String>
|
||||||
|
<x:String x:Key="Text.OpenAppDataDir" xml:space="preserve">浏览应用数据目录</x:String>
|
||||||
<x:String x:Key="Text.OpenFolder" xml:space="preserve">选择文件夹</x:String>
|
<x:String x:Key="Text.OpenFolder" xml:space="preserve">选择文件夹</x:String>
|
||||||
<x:String x:Key="Text.OpenWith" xml:space="preserve">打开文件...</x:String>
|
<x:String x:Key="Text.OpenWith" xml:space="preserve">打开文件...</x:String>
|
||||||
<x:String x:Key="Text.Optional" xml:space="preserve">选填。</x:String>
|
<x:String x:Key="Text.Optional" xml:space="preserve">选填。</x:String>
|
||||||
|
|
|
@ -348,6 +348,7 @@
|
||||||
<x:String x:Key="Text.Name" xml:space="preserve">名稱 :</x:String>
|
<x:String x:Key="Text.Name" xml:space="preserve">名稱 :</x:String>
|
||||||
<x:String x:Key="Text.NotConfigured" xml:space="preserve">GIT尚未配置。請開啟【偏好設定】配置GIT路徑。</x:String>
|
<x:String x:Key="Text.NotConfigured" xml:space="preserve">GIT尚未配置。請開啟【偏好設定】配置GIT路徑。</x:String>
|
||||||
<x:String x:Key="Text.Notice" xml:space="preserve">系統提示</x:String>
|
<x:String x:Key="Text.Notice" xml:space="preserve">系統提示</x:String>
|
||||||
|
<x:String x:Key="Text.OpenAppDataDir" xml:space="preserve">瀏覽程式資料目錄</x:String>
|
||||||
<x:String x:Key="Text.OpenFolder" xml:space="preserve">選擇資料夾</x:String>
|
<x:String x:Key="Text.OpenFolder" xml:space="preserve">選擇資料夾</x:String>
|
||||||
<x:String x:Key="Text.OpenWith" xml:space="preserve">開啟檔案...</x:String>
|
<x:String x:Key="Text.OpenWith" xml:space="preserve">開啟檔案...</x:String>
|
||||||
<x:String x:Key="Text.Optional" xml:space="preserve">選填。</x:String>
|
<x:String x:Key="Text.Optional" xml:space="preserve">選填。</x:String>
|
||||||
|
|
|
@ -41,6 +41,11 @@
|
||||||
<Path Width="14" Height="14" Data="{StaticResource Icons.Settings}"/>
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Settings}"/>
|
||||||
</MenuItem.Icon>
|
</MenuItem.Icon>
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
|
<MenuItem Header="{DynamicResource Text.OpenAppDataDir}" Command="{x:Static s:App.OpenAppDataDirCommand}">
|
||||||
|
<MenuItem.Icon>
|
||||||
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Explore}"/>
|
||||||
|
</MenuItem.Icon>
|
||||||
|
</MenuItem>
|
||||||
<MenuItem Header="{DynamicResource Text.Hotkeys}" Command="{x:Static s:App.OpenHotkeysCommand}">
|
<MenuItem Header="{DynamicResource Text.Hotkeys}" Command="{x:Static s:App.OpenHotkeysCommand}">
|
||||||
<MenuItem.Icon>
|
<MenuItem.Icon>
|
||||||
<Path Width="14" Height="14" Data="{StaticResource Icons.Hotkeys}"/>
|
<Path Width="14" Height="14" Data="{StaticResource Icons.Hotkeys}"/>
|
||||||
|
|
Loading…
Reference in a new issue