Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

show if file is a link in file browser #431

Merged
merged 1 commit into from
Apr 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ users:
- Project list window: F5 on the filter box will refresh the list.
- Project list window: Auto refresh on window activate when data is older than 60 seconds
- New actions: Copy (Control+c) and Paste (Control +v) will allow to copy the selection to and from the clipboard.
- File browser thumbnail: Writes if the file is a link

developers:
- Plugin.inDevelMode(): returns true is plugin installed in devel mode.
Expand Down
4 changes: 4 additions & 0 deletions pyworkflow/gui/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,13 @@ def _itemClicked(self, obj):
if img is None:
img = self.noImage
self.label.config(image=img)

# Update text preview
self.text.setReadOnly(False)
self.text.clear()

if self._lastSelected.isLink():
desc = "Is a link" if desc is None else desc + "\nIs a link."
if desc is not None:
self.text.addText(desc)
self.text.setReadOnly(True)
Expand Down
5 changes: 2 additions & 3 deletions pyworkflow/gui/project/viewprotocols.py
Original file line number Diff line number Diff line change
Expand Up @@ -1954,6 +1954,8 @@ def _runActionClicked(self, action, event=None):
self.drawRunsGraph(reorganize=True)
elif action == ACTION_REFRESH:
self.refreshRuns(checkPids=True)
elif action == ACTION_PASTE:
self._pasteProtocolsFromClipboard()

elif action == ACTION_SWITCH_VIEW:
self.switchRunsView()
Expand All @@ -1971,9 +1973,6 @@ def _runActionClicked(self, action, event=None):
self._copyProtocols()
elif action == ACTION_COPY:
self._copyProtocolsToClipboard()
elif action == ACTION_PASTE:
self._pasteProtocolsFromClipboard()

elif action == ACTION_DELETE:
self._deleteProtocol()
elif action == ACTION_STEPS:
Expand Down
Binary file modified pyworkflow/resources/file_md.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pyworkflow/resources/file_md_link.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.