Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 131203 Details for
Bug 219218
Show attachment preview right after choosing attachment source
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
fix as applied
showpreview.txt (text/plain), 4.03 KB, created by
Robert Elves
on 2009-04-08 00:43:21 EDT
(
hide
)
Description:
fix as applied
Filename:
MIME Type:
Creator:
Robert Elves
Created:
2009-04-08 00:43:21 EDT
Size:
4.03 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.core >Index: src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.core/src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java,v >retrieving revision 1.5 >diff -u -r1.5 TaskAttachmentModel.java >--- src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java 13 Jan 2009 07:05:11 -0000 1.5 >+++ src/org/eclipse/mylyn/tasks/core/data/TaskAttachmentModel.java 8 Apr 2009 04:41:05 -0000 >@@ -77,7 +77,7 @@ > } > > public String getContentType() { >- if (contentType == null) { >+ if (contentType == null && getSource() != null) { > return getSource().getContentType(); > } > return contentType; >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java,v >retrieving revision 1.20 >diff -u -r1.20 TaskAttachmentPage.java >--- src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java 12 Dec 2008 23:25:58 -0000 1.20 >+++ src/org/eclipse/mylyn/tasks/ui/wizards/TaskAttachmentPage.java 8 Apr 2009 04:41:06 -0000 >@@ -135,9 +135,13 @@ > contentTypeList.setLayoutData(new GridData(SWT.DEFAULT, SWT.DEFAULT, false, false, 2, 1)); > Iterator<String> iter = contentTypes.iterator(); > int i = 0; >+ int selection = 0; > while (iter.hasNext()) { > String next = iter.next(); > contentTypeList.add(next); >+ if (next.equalsIgnoreCase(model.getContentType())) { >+ selection = i; >+ } > i++; > } > >@@ -152,8 +156,8 @@ > validate(); > } > }); >- contentTypeList.select(0); >- taskAttachment.setContentType(contentTypeList.getItem(0)); >+ contentTypeList.select(selection); >+ taskAttachment.setContentType(contentTypeList.getItem(selection)); > > // TODO: is there a better way to pad? > new Label(composite, SWT.NONE); >@@ -185,8 +189,6 @@ > } > }); > >- fileNameText.setText(taskAttachment.getFileName() == null ? "" : taskAttachment.getFileName()); //$NON-NLS-1$ >- > /* Listener for isPatch */ > isPatchButton.addSelectionListener(new SelectionAdapter() { > private int lastSelected; >@@ -292,6 +294,7 @@ > @Override > public void setVisible(boolean visible) { > if (visible) { >+ fileNameText.setText(taskAttachment.getFileName() == null ? "" : taskAttachment.getFileName()); //$NON-NLS-1$ > if (fileNameText.getText().length() == 0) { > setFilePath(getModel().getSource().getName()); > setContentType(getModel().getSource().getContentType()); >Index: src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java,v >retrieving revision 1.24 >diff -u -r1.24 TaskAttachmentWizard.java >--- src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java 4 Dec 2008 05:31:47 -0000 1.24 >+++ src/org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard.java 8 Apr 2009 04:41:06 -0000 >@@ -288,19 +288,23 @@ > if (model.getSource() == null) { > if (mode == Mode.SCREENSHOT) { > ScreenshotCreationPage page = new ScreenshotCreationPage(); >- model.setSource(new ImageSource(page)); >+ ImageSource source = new ImageSource(page); >+ model.setSource(source); >+ model.setContentType(source.getContentType()); > addPage(page); > } else { > addPage(new AttachmentSourcePage(model)); > } > } >+ >+ previewPage = new AttachmentPreviewPage(model); >+ addPage(previewPage); >+ > AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(model.getTaskRepository() > .getConnectorKind()); > editPage = connectorUi.getTaskAttachmentPage(model); > addPage(editPage); > >- previewPage = new AttachmentPreviewPage(model); >- addPage(previewPage); > } > > public Mode getMode() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 219218
: 131203 |
131204