diff options
3 files changed, 20 insertions, 31 deletions
diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java index 6545f2a39..8e678d6d0 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationPopup.java @@ -19,7 +19,6 @@ import org.eclipse.mylar.internal.tasks.ui.views.TaskListView; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.layout.GridLayout; -import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Display; @@ -91,7 +90,7 @@ public class TaskListNotificationPopup extends PopupDialog { if (count < NUM_NOTIFICATIONS_TO_DISPLAY) { Label notificationLabelIcon = toolkit.createLabel(sectionClient, ""); notificationLabelIcon.setImage(notification.getOverlayIcon()); - ImageHyperlink link = toolkit.createImageHyperlink(sectionClient, SWT.BEGINNING | SWT.WRAP); + ImageHyperlink link = toolkit.createImageHyperlink(sectionClient, SWT.BEGINNING | SWT.WRAP); link.setText(notification.getLabel()); link.setImage(notification.getNotificationIcon()); link.addHyperlinkListener(new HyperlinkAdapter() { @@ -122,7 +121,8 @@ public class TaskListNotificationPopup extends PopupDialog { } } else { int numNotificationsRemain = notifications.size() - count; - Hyperlink remainingHyperlink = toolkit.createHyperlink(sectionClient, numNotificationsRemain+NOTIFICATIONS_HIDDEN, SWT.NONE); + Hyperlink remainingHyperlink = toolkit.createHyperlink(sectionClient, numNotificationsRemain + + NOTIFICATIONS_HIDDEN, SWT.NONE); GridDataFactory.fillDefaults().span(2, SWT.DEFAULT).applyTo(remainingHyperlink); remainingHyperlink.addHyperlinkListener(new HyperlinkAdapter() { @@ -137,7 +137,8 @@ public class TaskListNotificationPopup extends PopupDialog { windowShell.open(); } } - }}); + } + }); break; } count++; @@ -145,21 +146,18 @@ public class TaskListNotificationPopup extends PopupDialog { section.setClient(sectionClient); - Composite buttonsComposite = toolkit.createComposite(section); - section.setTextClient(buttonsComposite); - buttonsComposite.setLayout(new RowLayout()); - buttonsComposite.setBackground(section.getTitleBarBackground()); - final ImageHyperlink closeHyperlink = new ImageHyperlink(buttonsComposite, SWT.NONE); - toolkit.adapt(closeHyperlink, true, true); - closeHyperlink.setBackground(null); - closeHyperlink.setImage(TaskListImages.getImage(TaskListImages.NOTIFICATION_CLOSE)); - closeHyperlink.addHyperlinkListener(new HyperlinkAdapter() { - @Override + ImageHyperlink hyperlink = new ImageHyperlink(section, SWT.NONE); + toolkit.adapt(hyperlink, true, true); + hyperlink.setBackground(null); + hyperlink.setImage(TaskListImages.getImage(TaskListImages.NOTIFICATION_CLOSE)); + hyperlink.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent e) { close(); } }); + section.setTextClient(hyperlink); + form.pack(); return parent; } @@ -175,9 +173,10 @@ public class TaskListNotificationPopup extends PopupDialog { private Rectangle restoreBounds() { bounds = form.getBounds(); Rectangle maxBounds = null; -// IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); -// if (window != null) { -// maxBounds = window.getShell().getBounds(); + // IWorkbenchWindow window = + // PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + // if (window != null) { + // maxBounds = window.getShell().getBounds(); if (getShell() != null && !getShell().isDisposed()) { maxBounds = getShell().getDisplay().getClientArea(); } else { @@ -189,7 +188,7 @@ public class TaskListNotificationPopup extends PopupDialog { maxBounds = display.getBounds(); } - if (bounds.width > -1 && bounds.height > -1) { + if (bounds.width > -1 && bounds.height > -1) { if (maxBounds != null) { bounds.width = Math.min(bounds.width, maxBounds.width); bounds.height = Math.min(bounds.height, maxBounds.height); diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java index 5eb348918..a7097193b 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/RepositorySynchronizationManager.java @@ -289,11 +289,11 @@ public class RepositorySynchronizationManager { // only most recent incoming will be displayed if two // sequential incoming's /conflicts happen TasksUiPlugin.getDefault().getTaskDataManager().replace(repositoryTask.getHandleIdentifier(), newTaskData); - repositoryTask.setNotified(false); break; case SYNCHRONIZED: if (checkHasIncoming(repositoryTask, newTaskData)) { status = RepositoryTaskSyncState.INCOMING; + repositoryTask.setNotified(false); } TasksUiPlugin.getDefault().getTaskDataManager().push(repositoryTask.getHandleIdentifier(), newTaskData); break; diff --git a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java index 610c85905..a0082bc86 100644 --- a/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java +++ b/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/editors/AbstractNewRepositoryTaskEditor.java @@ -190,11 +190,8 @@ public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepository createPlanningLayout(comp); } - protected void createPlanningLayout(Composite comp) { - FormToolkit toolkit = this.getManagedForm().getToolkit(); - - Section section = toolkit.createSection(comp, ExpandableComposite.TITLE_BAR | Section.TWISTIE); - section.setText("Personal Planning"); + protected void createPlanningLayout(Composite comp) { + Section section = createSection(comp,"Personal Planning"); section.setLayout(new GridLayout()); section.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); section.setExpanded(true); @@ -255,13 +252,6 @@ public abstract class AbstractNewRepositoryTaskEditor extends AbstractRepository toolkit.createLabel(sectionClient, "hours "); // label.setForeground(toolkit.getColors().getColor(FormColors.TITLE)); - // 1 Blank column - Label blankLabel2 = toolkit.createLabel(sectionClient, ""); - GridData blankLabl2Layout = new GridData(GridData.HORIZONTAL_ALIGN_CENTER); - blankLabl2Layout.horizontalSpan = 1; - blankLabl2Layout.widthHint = 25; - blankLabel2.setLayoutData(blankLabl2Layout); - toolkit.paintBordersFor(sectionClient); } |