def update_preview_cb(self, file_chooser): """Previews the URI of the specified file chooser. Args: 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): return self.previewUri(uri)
def update_preview_cb(self, file_chooser): """Previews the URI of the specified file chooser. Args: file_chooser (Gtk.FileChooser): The file chooser providing the URI. """ uri = file_chooser.get_preview_uri() previewable = uri and uri_is_valid(uri) if not previewable: self.clear_preview() return self.preview_uri(uri)
def add_preview_request(self, dialogbox): """add a preview request """ uri = dialogbox.get_preview_uri() if uri is None or not uri_is_valid(uri): return self.previewUri(uri)