diff options
author | Frank Becker | 2012-05-23 19:53:52 +0000 |
---|---|---|
committer | Frank Becker | 2012-05-23 19:53:52 +0000 |
commit | ab5fce1345220e7909f4af43de2e22b4b8cfea63 (patch) | |
tree | 90dd352940f7ab2bbf81670bd3eeda3fd7dc2b16 /org.eclipse.mylyn.tasks.ui/src/org | |
parent | 2a7557a83bb679f900ec23a56ffbfed7547ce044 (diff) | |
download | org.eclipse.mylyn.tasks-ab5fce1345220e7909f4af43de2e22b4b8cfea63.tar.gz org.eclipse.mylyn.tasks-ab5fce1345220e7909f4af43de2e22b4b8cfea63.tar.xz org.eclipse.mylyn.tasks-ab5fce1345220e7909f4af43de2e22b4b8cfea63.zip |
ASSIGNED - bug 374766: All attachment sections should also display the
camera icon to select "Attach Screenshot..."
https://bugs.eclipse.org/bugs/show_bug.cgi?id=374766
Diffstat (limited to 'org.eclipse.mylyn.tasks.ui/src/org')
2 files changed, 15 insertions, 0 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java index fcfb31005..8d0cc7d04 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorAttachmentPart.java @@ -361,6 +361,16 @@ public class TaskEditorAttachmentPart extends AbstractTaskEditorPart { attachFileAction.setToolTipText(Messages.TaskEditorAttachmentPart_Attach_); attachFileAction.setImageDescriptor(TasksUiImages.FILE_NEW_SMALL); toolBarManager.add(attachFileAction); + + Action attachScreenshotAction = new Action() { + @Override + public void run() { + EditorUtil.openNewAttachmentWizard(getTaskEditorPage(), Mode.SCREENSHOT, null); + } + }; + attachScreenshotAction.setToolTipText(Messages.TaskEditorAttachmentPart_Attach__Screenshot); + attachScreenshotAction.setImageDescriptor(TasksUiImages.IMAGE_CAPTURE_SMALL); + toolBarManager.add(attachScreenshotAction); } private void updateSectionTitle() { diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java index 2f3204e5b..33d7b3c82 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TasksUiImages.java @@ -220,6 +220,11 @@ public class TasksUiImages { */ public static final ImageDescriptor LOCK_OPEN = create(TOOL_SMALL, "unlock.gif"); //$NON-NLS-1$ + /** + * @since 3.8 + */ + public static final ImageDescriptor IMAGE_CAPTURE_SMALL = create(TOOL_SMALL, "image_capture.png"); //$NON-NLS-1$ + public static Image getImageForPriority(PriorityLevel priorityLevel) { if (priorityLevel == null) { return null; |