Skip to content

Commit cd43bfc

Browse files
author
RandomEngy
committed
Add tooltip for when preview source button is unavailable. Fix stack overflow
with radiobuttons in options dialog. Update version numbers.
1 parent 234db96 commit cd43bfc

7 files changed

Lines changed: 47 additions & 15 deletions

File tree

Installer/VidCoder-x64.iss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
[Setup]
55
AppName=VidCoder
6-
AppVerName=VidCoder 1.3.2 (x64)
7-
AppVersion=1.3.2
6+
AppVerName=VidCoder 1.3.3 (x64)
7+
AppVersion=1.3.3
88
AppPublisher=RandomEngy
99
AppPublisherURL=http://vidcoder.codeplex.com/
1010

@@ -16,7 +16,7 @@ Compression=lzma
1616
SolidCompression=yes
1717

1818
OutputDir=BuiltInstallers
19-
OutputBaseFilename=VidCoder-1.3.2-x64
19+
OutputBaseFilename=VidCoder-1.3.3-x64
2020

2121
AppId=VidCoder-x64
2222
UsePreviousAppDir=yes

Installer/VidCoder-x86.iss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
[Setup]
55
AppName=VidCoder
6-
AppVerName=VidCoder 1.3.2 (x86)
7-
AppVersion=1.3.2
6+
AppVerName=VidCoder 1.3.3 (x86)
7+
AppVersion=1.3.3
88
AppPublisher=RandomEngy
99
AppPublisherURL=http://vidcoder.codeplex.com/
1010

@@ -16,7 +16,7 @@ Compression=lzma
1616
SolidCompression=yes
1717

1818
OutputDir=BuiltInstallers
19-
OutputBaseFilename=VidCoder-1.3.2-x86
19+
OutputBaseFilename=VidCoder-1.3.3-x86
2020

2121
AppId=VidCoder
2222
UsePreviousAppDir=yes

Installer/latest.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<UpdateInfo>
22
<Release>
3-
<Latest>1.3.2</Latest>
4-
<DownloadLocation>http://engy.us/VidCoder/VidCoder-1.3.2-x86.exe</DownloadLocation>
3+
<Latest>1.3.3</Latest>
4+
<DownloadLocation>http://engy.us/VidCoder/VidCoder-1.3.3-x86.exe</DownloadLocation>
55
<ChangelogLocation>http://vidcoder.codeplex.com/releases/view/85311</ChangelogLocation>
66
</Release>
77
<Release-x64>
8-
<Latest>1.3.2</Latest>
9-
<DownloadLocation>http://engy.us/VidCoder/VidCoder-1.3.2-x64.exe</DownloadLocation>
8+
<Latest>1.3.3</Latest>
9+
<DownloadLocation>http://engy.us/VidCoder/VidCoder-1.3.3-x64.exe</DownloadLocation>
1010
<ChangelogLocation>http://vidcoder.codeplex.com/releases/view/85311</ChangelogLocation>
1111
</Release-x64>
1212
</UpdateInfo>

VidCoder/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,5 @@
5151
// You can specify all the values or you can default the Build and Revision Numbers
5252
// by using the '*' as shown below:
5353
// [assembly: AssemblyVersion("1.0.*")]
54-
[assembly: AssemblyVersion("1.3.2.0")]
55-
[assembly: AssemblyFileVersion("1.3.2.0")]
54+
[assembly: AssemblyVersion("1.3.3.0")]
55+
[assembly: AssemblyFileVersion("1.3.3.0")]

VidCoder/View/OptionsDialog.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
<RadioButton
1818
Content="Minimize to task bar" Height="16" HorizontalAlignment="Left" Margin="10,14,0,0" Name="radioButton1" VerticalAlignment="Top"
1919
IsChecked="{Binding MinimizeToTray, Converter={StaticResource InverseBoolConverter}}"
20-
GroupName="minimize"/>
20+
GroupName="minimize1"/>
2121
<RadioButton
2222
Content="Minimize to system tray" Height="16" HorizontalAlignment="Left" Margin="10,36,0,0" Name="radioButton2" VerticalAlignment="Top"
2323
IsChecked="{Binding MinimizeToTray}"
24-
GroupName="minimize"/>
24+
GroupName="minimize2"/>
2525

2626
<CheckBox
2727
Height="16" Margin="10,69,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" Width="230"

VidCoder/View/PreviewWindow.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
Visibility="{Binding GeneratingPreview, Converter={StaticResource VisibilityConverter}, ConverterParameter=True}">
7373
<Button
7474
Height="23"
75-
Command="{Binding PlaySourceCommand}" ToolTip="Plays the source video."
75+
Command="{Binding PlaySourceCommand}" ToolTip="{Binding PlaySourceToolTip}" ToolTipService.ShowOnDisabled="True"
7676
Margin="0,0,0,0">
7777
<StackPanel Orientation="Horizontal" Margin="4,0">
7878
<Image Source="/Icons/blue_play_80.png" VerticalAlignment="Center" Height="15" />

VidCoder/ViewModel/PreviewViewModel.cs

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ public bool HasPreview
203203
this.hasPreview = value;
204204
this.GeneratePreviewCommand.RaiseCanExecuteChanged();
205205
this.PlaySourceCommand.RaiseCanExecuteChanged();
206+
this.RaisePropertyChanged(() => this.PlaySourceToolTip);
206207
this.RaisePropertyChanged(() => this.SeekBarEnabled);
207208
this.RaisePropertyChanged(() => this.HasPreview);
208209
this.RaisePropertyChanged(() => this.PlayAvailable);
@@ -266,6 +267,37 @@ public int PreviewCount
266267
}
267268
}
268269

270+
public string PlaySourceToolTip
271+
{
272+
get
273+
{
274+
if (!this.HasPreview || this.mainViewModel.SourcePath == null)
275+
{
276+
return null;
277+
}
278+
279+
string sourcePath = this.mainViewModel.SourcePath;
280+
var fileAttributes = File.GetAttributes(sourcePath);
281+
if ((fileAttributes & FileAttributes.Directory) == FileAttributes.Directory)
282+
{
283+
// Path is a directory. Can only preview when it's a DVD and we have a supported player installed.
284+
bool isDvd = Utilities.IsDvdFolder(this.mainViewModel.SourcePath);
285+
if (!isDvd)
286+
{
287+
return "Source preview for Blu-ray not supported yet.";
288+
}
289+
290+
bool playerInstalled = Players.Installed.Count > 0;
291+
if (!playerInstalled)
292+
{
293+
return "A supported DVD player could not be found. Install VLC or MPC-HC to use this feature.";
294+
}
295+
}
296+
297+
return "Plays the source video.";
298+
}
299+
}
300+
269301
public bool PlayAvailable
270302
{
271303
get

0 commit comments

Comments
 (0)