[pitivi] medialibrary: Handle only the removal of UriClipAssets
- From: Alexandru Băluț <alexbalut src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pitivi] medialibrary: Handle only the removal of UriClipAssets
- Date: Sun, 23 Oct 2016 16:11:57 +0000 (UTC)
commit 4c964325336cd8442e1b155b4e46e512269d2a02
Author: Alexandru Băluț <alexandru balut gmail com>
Date: Tue Oct 11 13:45:42 2016 +0200
medialibrary: Handle only the removal of UriClipAssets
As far as the media library is concerned, the other types of assets can
now all be removed.
Reviewed-by: Thibault Saunier <tsaunier gnome org>
Differential Revision: https://phabricator.freedesktop.org/D1378
pitivi/medialibrary.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/pitivi/medialibrary.py b/pitivi/medialibrary.py
index fa0865e..8972261 100644
--- a/pitivi/medialibrary.py
+++ b/pitivi/medialibrary.py
@@ -864,10 +864,11 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
self._addAsset(asset)
def _assetRemovedCb(self, unused_project, asset):
- self.debug("%s Disconnecting %s - %s", self, asset, asset.props.id)
- asset.disconnect_by_func(self.__assetProxiedCb)
- asset.disconnect_by_func(self.__assetProxyingCb)
- self.__removeAsset(asset)
+ if isinstance(asset, GES.UriClipAsset):
+ self.debug("Disconnecting %s - %s", asset, asset.props.id)
+ asset.disconnect_by_func(self.__assetProxiedCb)
+ asset.disconnect_by_func(self.__assetProxyingCb)
+ self.__removeAsset(asset)
def __removeAsset(self, asset):
"""Removes the specified asset."""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]