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 113405 Details for
Bug 169916
make strikethrough font optional and consider supporting on non-win32 platforms
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]
complete Implementation
patch169916.txt (text/plain), 12.28 KB, created by
Frank Becker
on 2008-09-24 15:07:46 EDT
(
hide
)
Description:
complete Implementation
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2008-09-24 15:07:46 EDT
Size:
12.28 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.tasks.ui >Index: src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java,v >retrieving revision 1.30 >diff -u -r1.30 TasksUiPreferencePage.java >--- src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java 12 Sep 2008 04:19:27 -0000 1.30 >+++ src/org/eclipse/mylyn/internal/tasks/ui/preferences/TasksUiPreferencePage.java 24 Sep 2008 19:02:43 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >-* Copyright (c) 2004, 2008 Tasktop Technologies and others. >+ * Copyright (c) 2004, 2008 Tasktop Technologies and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -101,6 +101,8 @@ > > private Button useRichEditor; > >+ private Button useStrikethrough; >+ > private Button useWebBrowser; > > private Text synchScheduleTime = null; >@@ -147,6 +149,7 @@ > createTaskRefreshScheduleGroup(container); > createSchedulingGroup(container); > createOpenWith(container); >+ createTaskListOption(container); > Composite advanced = createAdvancedSection(container); > createTaskActivityGroup(advanced); > createTaskDataControl(advanced); >@@ -211,7 +214,8 @@ > //getPreferenceStore().setValue(TasksUiPreferenceConstants.BACKUP_SCHEDULE, backupScheduleTimeText.getText()); > > getPreferenceStore().setValue(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, useRichEditor.getSelection()); >- >+ getPreferenceStore().setValue(ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED, >+ useStrikethrough.getSelection()); > getPreferenceStore().setValue(ITasksUiPreferenceConstants.REPOSITORY_SYNCH_SCHEDULE_ENABLED, > enableBackgroundSynch.getSelection()); > long miliseconds = 60000 * Long.parseLong(synchScheduleTime.getText()); >@@ -272,6 +276,9 @@ > //backupFolderText.setText(TasksUiPlugin.getDefault().getBackupFolderPath()); > > useRichEditor.setSelection(getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH)); >+ useStrikethrough.setSelection(getPreferenceStore().getBoolean( >+ ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED)); >+ > // synchQueries.setSelection(getPreferenceStore().getBoolean( > // TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP)); > enableBackgroundSynch.setSelection(getPreferenceStore().getBoolean( >@@ -312,6 +319,8 @@ > //backupScheduleTimeText.setText(getPreferenceStore().getDefaultString(TasksUiPreferenceConstants.BACKUP_SCHEDULE)); > > useRichEditor.setSelection(getPreferenceStore().getDefaultBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH)); >+ useStrikethrough.setSelection(getPreferenceStore().getDefaultBoolean( >+ ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED)); > > // synchQueries.setSelection(getPreferenceStore().getDefaultBoolean( > // TaskListPreferenceConstants.REPOSITORY_SYNCH_ON_STARTUP)); >@@ -392,6 +401,19 @@ > useWebBrowser.setSelection(!getPreferenceStore().getBoolean(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH)); > } > >+ private void createTaskListOption(Composite parent) { >+ Group container = new Group(parent, SWT.SHADOW_ETCHED_IN); >+ container.setLayout(new GridLayout(3, false)); >+ container.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ >+ container.setText("Task List"); >+ useStrikethrough = new Button(container, SWT.CHECK); >+ useStrikethrough.setText("strikethrough for completed Task (Recommended)"); >+ useStrikethrough.setSelection(getPreferenceStore().getBoolean( >+ ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED)); >+ >+ } >+ > private void createTaskDataControl(Composite parent) { > > Group taskDataGroup = new Group(parent, SWT.SHADOW_ETCHED_IN); >Index: src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java,v >retrieving revision 1.91 >diff -u -r1.91 TasksUiPlugin.java >--- src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java 14 Sep 2008 02:20:53 -0000 1.91 >+++ src/org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin.java 24 Sep 2008 19:02:39 -0000 >@@ -881,6 +881,8 @@ > store.setDefault(ITasksUiPreferenceConstants.NOTIFICATIONS_ENABLED, true); > store.setDefault(ITasksUiPreferenceConstants.FILTER_PRIORITY, PriorityLevel.P5.toString()); > store.setDefault(ITasksUiPreferenceConstants.EDITOR_TASKS_RICH, true); >+ store.setDefault(ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED, true); >+ > store.setDefault(ITasksUiPreferenceConstants.ACTIVATE_WHEN_OPENED, false); > store.setDefault(ITasksUiPreferenceConstants.SHOW_TRIM, false); > store.setDefault(ITasksUiPreferenceConstants.LOCAL_SUB_TASKS_ENABLED, false); >Index: src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java,v >retrieving revision 1.4 >diff -u -r1.4 ITasksUiPreferenceConstants.java >--- src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java 21 Sep 2008 03:36:29 -0000 1.4 >+++ src/org/eclipse/mylyn/internal/tasks/ui/ITasksUiPreferenceConstants.java 24 Sep 2008 19:02:34 -0000 >@@ -58,6 +58,8 @@ > > public static final String EDITOR_TASKS_RICH = "org.eclipse.mylyn.tasks.ui.reporting.open.editor"; > >+ public static final String USE_STRIKETHROUGH_FOR_COMPLETED = "org.eclipse.mylyn.tasks.ui.strikethrough.for.completed"; >+ > public static final String REPOSITORY_SYNCH_SCHEDULE_ENABLED = "org.eclipse.mylyn.tasks.ui.repositories.synch.schedule"; > > public static final String REPOSITORY_SYNCH_SCHEDULE_MILISECONDS = "org.eclipse.mylyn.tasks.ui.repositories.synch.schedule.miliseconds"; >Index: src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java,v >retrieving revision 1.65 >diff -u -r1.65 CustomTaskListDecorationDrawer.java >--- src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java 12 Sep 2008 04:19:26 -0000 1.65 >+++ src/org/eclipse/mylyn/internal/tasks/ui/views/CustomTaskListDecorationDrawer.java 24 Sep 2008 19:02:44 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >-* Copyright (c) 2004, 2008 Tasktop Technologies and others. >+ * Copyright (c) 2004, 2008 Tasktop Technologies and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -28,6 +28,7 @@ > import org.eclipse.mylyn.tasks.ui.TasksUiImages; > import org.eclipse.swt.SWT; > import org.eclipse.swt.graphics.Image; >+import org.eclipse.swt.graphics.Point; > import org.eclipse.swt.graphics.Rectangle; > import org.eclipse.swt.widgets.Event; > import org.eclipse.swt.widgets.Listener; >@@ -55,12 +56,29 @@ > > private final boolean tweakClipping; > >+ private boolean useStrikethroughForCompleted; >+ >+ private final org.eclipse.jface.util.IPropertyChangeListener PROPERTY_LISTENER = new org.eclipse.jface.util.IPropertyChangeListener() { >+ >+ public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event) { >+ if (event.getProperty().equals(ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED)) { >+ if (event.getNewValue() instanceof Boolean) { >+ useStrikethroughForCompleted = (Boolean) event.getNewValue(); >+ taskListView.refresh(); >+ } >+ } >+ } >+ }; >+ > CustomTaskListDecorationDrawer(TaskListView taskListView, int activationImageOffset) { > this.taskListView = taskListView; > this.activationImageOffset = activationImageOffset; > this.taskListView.synchronizationOverlaid = TasksUiPlugin.getDefault().getPluginPreferences().getBoolean( > ITasksUiPreferenceConstants.OVERLAYS_INCOMING_TIGHT); > >+ useStrikethroughForCompleted = TasksUiPlugin.getDefault().getPluginPreferences().getBoolean( >+ ITasksUiPreferenceConstants.USE_STRIKETHROUGH_FOR_COMPLETED); >+ TasksUiPlugin.getDefault().getPreferenceStore().addPropertyChangeListener(PROPERTY_LISTENER); > if (SWT.getPlatform().equals("gtk")) { > this.platformSpecificSquish = 8; > this.tweakClipping = true; >@@ -91,6 +109,16 @@ > activationImage = taskInactive; > } > } >+ if (data instanceof AbstractTask & useStrikethroughForCompleted) { >+ AbstractTask task = (AbstractTask) data; >+ if (task.isCompleted()) { >+ Rectangle bounds = ((TreeItem) event.item).getBounds(); >+ int lineY = bounds.y + (bounds.height / 2); >+ String itemText = ((TreeItem) event.item).getText(); >+ Point extent = event.gc.textExtent(itemText); >+ event.gc.drawLine(bounds.x, lineY, bounds.x + extent.x, lineY); >+ } >+ } > if (data instanceof ITaskContainer) { > switch (event.type) { > case SWT.EraseItem: { >@@ -274,4 +302,9 @@ > // HACK: need a proper blank image > return CommonImages.OVERLAY_CLEAR; > } >+ >+ public void dispose() { >+ TasksUiPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(PROPERTY_LISTENER); >+ } >+ > } >\ No newline at end of file >Index: src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java,v >retrieving revision 1.291 >diff -u -r1.291 TaskListView.java >--- src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java 21 Sep 2008 06:15:04 -0000 1.291 >+++ src/org/eclipse/mylyn/internal/tasks/ui/views/TaskListView.java 24 Sep 2008 19:02:49 -0000 >@@ -424,6 +424,8 @@ > > private Color categoryGradientEnd; > >+ private CustomTaskListDecorationDrawer customDrawer; >+ > private final IPageListener PAGE_LISTENER = new IPageListener() { > public void pageActivated(IWorkbenchPage page) { > filteredTree.indicateActiveTaskWorkingSet(); >@@ -705,6 +707,7 @@ > themeManager.removePropertyChangeListener(THEME_CHANGE_LISTENER); > } > >+ customDrawer.dispose(); > categoryGradientStart.dispose(); > categoryGradientEnd.dispose(); > } >@@ -904,7 +907,7 @@ > getViewer().setInput(getViewSite()); > > final int activationImageOffset = 20; >- CustomTaskListDecorationDrawer customDrawer = new CustomTaskListDecorationDrawer(this, activationImageOffset); >+ customDrawer = new CustomTaskListDecorationDrawer(this, activationImageOffset); > getViewer().getTree().addListener(SWT.EraseItem, customDrawer); > getViewer().getTree().addListener(SWT.PaintItem, customDrawer); > >Index: src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java,v >retrieving revision 1.11 >diff -u -r1.11 TaskElementLabelProvider.java >--- src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java 12 Sep 2008 04:19:27 -0000 1.11 >+++ src/org/eclipse/mylyn/tasks/ui/TaskElementLabelProvider.java 24 Sep 2008 19:02:50 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >-* Copyright (c) 2004, 2008 Tasktop Technologies and others. >+ * Copyright (c) 2004, 2008 Tasktop Technologies and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -268,7 +268,7 @@ > if (((AbstractTask) element).isActive()) { > return CommonFonts.BOLD; > } else if (((AbstractTask) element).isCompleted()) { >- return CommonFonts.STRIKETHROUGH; >+ return null; > } > for (ITask child : ((ITaskContainer) element).getChildren()) { > if (child.isActive() || (child instanceof ITaskContainer && showHasActiveChild((ITaskContainer) child))) {
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 169916
:
57277
|
58076
|
86499
|
86513
|
86521
|
86522
|
86526
|
90020
|
90529
|
90530
|
113215
|
113219
|
113220
| 113405 |
113406