[pitivi] mediafilespreviewer: Clear the preview when no file is selected
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] mediafilespreviewer: Clear the preview when no file is selected
- Date: Mon, 3 Oct 2016 13:05:20 +0000 (UTC)
commit b2bbe6eef6d1e6d0fa5471d60004c62f936b3146
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Mon Oct 3 12:13:06 2016 +0200
mediafilespreviewer: Clear the preview when no file is selected
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1342
pitivi/mediafilespreviewer.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/pitivi/mediafilespreviewer.py b/pitivi/mediafilespreviewer.py
index 3c38307..6a94433 100644
--- a/pitivi/mediafilespreviewer.py
+++ b/pitivi/mediafilespreviewer.py
@@ -178,7 +178,9 @@ class PreviewWidget(Gtk.Grid, Loggable):
file_chooser (Gtk.FileChooser): The file chooser providing the URI.
"""
uri = file_chooser.get_preview_uri()
- if uri is None or not uri_is_valid(uri):
+ previewable = uri and uri_is_valid(uri)
+ if not previewable:
+ self.clear_preview()
return
self.preview_uri(uri)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]