[chronojump] Better check if multimedia device is ok for capturing
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Better check if multimedia device is ok for capturing
- Date: Wed, 18 Jul 2018 12:36:42 +0000 (UTC)
commit d067bb5c6ae699c83b5397cd224e8674e0a4224a
Author: Xavier de Blas <xaviblas gmail com>
Date: Wed Jul 18 14:35:56 2018 +0200
Better check if multimedia device is ok for capturing
src/gui/chronojump.cs | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index af5efa26..04576930 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3839,8 +3839,17 @@ public partial class ChronoJumpWindow
image_video_no.Visible = ! myVideo;
}
- private void on_checkbutton_video_clicked(object o, EventArgs args) {
- if(checkbutton_video.Active) {
+ private void on_checkbutton_video_clicked(object o, EventArgs args)
+ {
+ if(checkbutton_video.Active)
+ {
+ if(preferences.videoDevice == "" || preferences.videoDevice == "0")
+ {
+ new DialogMessage(Constants.MessageTypes.WARNING, "Video device is not
configured. Check Preferences / Multimedia.");
+ checkbutton_video.Active = false;
+ return;
+ }
+
preferences.videoOn = true;
SqlitePreferences.Update("videoOn", "True", false);
} else {
@@ -3857,8 +3866,17 @@ public partial class ChronoJumpWindow
videoCapturePrepare(true); //if error, show message
}
- private void on_checkbutton_video_encoder_clicked(object o, EventArgs args) {
- if(checkbutton_video_encoder.Active) {
+ private void on_checkbutton_video_encoder_clicked(object o, EventArgs args)
+ {
+ if(checkbutton_video_encoder.Active)
+ {
+ if(preferences.videoDevice == "" || preferences.videoDevice == "0")
+ {
+ new DialogMessage(Constants.MessageTypes.WARNING, "Video device is not
configured. Check Preferences / Multimedia.");
+ checkbutton_video_encoder.Active = false;
+ return;
+ }
+
preferences.videoOn = true;
SqlitePreferences.Update("videoOn", "True", false);
} else {
@@ -4215,7 +4233,7 @@ public partial class ChronoJumpWindow
{
if(preferences.videoDevice == "" || preferences.videoDevice == "0")
{
- new DialogMessage(Constants.MessageTypes.WARNING, "Video device is not configured.
Check preferences / Multimedia.");
+ new DialogMessage(Constants.MessageTypes.WARNING, "Video device is not configured.
Check Preferences / Multimedia.");
return;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]