Commit 3222cf3c authored by Umang Jain's avatar Umang Jain Committed by Alexandru Băluț

medialibrary: Add 'Open containing folder' feature

Fixes Alexandru Băluț's avatarAlex Băluț <>
Differential Revision:
parent 7e1db5d7
......@@ -1144,6 +1144,13 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
def __open_containing_folder_cb(self, unused_action, unused_parameter):
assets = self.getSelectedAssets()
if len(assets) != 1:
parent_path = os.path.dirname(path_from_uri(assets[0].get_id()))
Gio.AppInfo.launch_default_for_uri(Gst.filename_to_uri(parent_path), None)
def __createMenuModel(self):
return None, None
......@@ -1155,6 +1162,13 @@ class MediaLibraryWidget(Gtk.Box, Loggable):
action_group = Gio.SimpleActionGroup()
menu_model = Gio.Menu()
if len(assets) == 1:
action ="open-folder", None)
action.connect("activate", self.__open_containing_folder_cb)
text = _("Open containing folder")
menu_model.append(text, "assets.%s" % action.get_name().replace(" ", "."))
proxies = [asset.get_proxy_target() for asset in assets
if asset.get_proxy_target()]
in_progress = [asset.creation_progress for asset in assets
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment