Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #84 from drub0y/master

Full support for MKD extension
  • Loading branch information...
commit 3127454b21a0f6080cb15747430ae8f174182a7c 2 parents b152870 + c8a3b6b
Ian Randall authored
View
9 src/MarkPad/Settings/SettingsView.xaml
@@ -6,7 +6,7 @@
MouseLeftButtonDown="DragMoveWindow"
ShowInTaskbar="False"
SnapsToDevicePixels="True"
- WindowStartupLocation="CenterOwner" Width="300" Height="320" ResizeMode="NoResize">
+ WindowStartupLocation="CenterOwner" Width="300" Height="365" ResizeMode="NoResize">
<i:Interaction.Behaviors>
<Behaviours:BorderlessWindowBehavior ResizeWithGrip="False" />
</i:Interaction.Behaviors>
@@ -34,8 +34,8 @@
<Grid Margin="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
- <RowDefinition Height="Auto" />
- <RowDefinition Height="*" />
+ <RowDefinition Height="93" />
+ <RowDefinition Height="107*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock TextWrapping="Wrap" VerticalAlignment="Top" FontFamily="Segoe UI" FontWeight="Light" FontSize="29.333" Text="settings" />
@@ -50,7 +50,8 @@
<CheckBox x:Name="FileMDBinding" Content=".md" />
<CheckBox x:Name="FileMDownBinding" Content=".mdown" />
<CheckBox x:Name="FileMarkdownBinding" Content=".markdown" />
- </StackPanel>
+ <CheckBox x:Name="FileMKDBinding" Content=".mkd" />
+ </StackPanel>
<StackPanel Grid.Row="2" Margin="0 10 0 0">
<TextBlock Text="Blog Sites" />
<StackPanel Orientation="Horizontal">
View
7 src/MarkPad/Settings/SettingsViewModel.cs
@@ -35,6 +35,9 @@ public SettingsViewModel(ISettingsService settingsService, IWindowManager window
FileMDownBinding = key.GetSubKeyNames().Contains(Constants.DefaultExtensions[2]) &&
!string.IsNullOrEmpty(key.OpenSubKey(Constants.DefaultExtensions[2]).GetValue("").ToString());
+
+ FileMKDBinding = key.GetSubKeyNames().Contains(Constants.DefaultExtensions[3]) &&
+ !string.IsNullOrEmpty(key.OpenSubKey(Constants.DefaultExtensions[3]).GetValue("").ToString());
}
var blogs = settingsService.Get<List<BlogSetting>>("Blogs") ?? new List<BlogSetting>();
@@ -45,6 +48,7 @@ public SettingsViewModel(ISettingsService settingsService, IWindowManager window
public bool FileMDBinding { get; set; }
public bool FileMarkdownBinding { get; set; }
public bool FileMDownBinding { get; set; }
+ public bool FileMKDBinding { get; set; }
public BlogSetting CurrentBlog { get; set; }
public ObservableCollection<BlogSetting> Blogs { get; set; }
@@ -129,7 +133,8 @@ private void UpdateExtensionRegistryKeys()
{
if ((i == 0 && FileMDBinding) ||
(i == 1 && FileMarkdownBinding) ||
- (i == 2 && FileMDownBinding))
+ (i == 2 && FileMDownBinding) ||
+ (i == 3 && FileMKDBinding))
extensionKey.SetValue("", markpadKeyName);
else
extensionKey.SetValue("", "");
Please sign in to comment.
Something went wrong with that request. Please try again.