Skip to content
Browse files

NEW - bug 320141: provide option to turn off resource monitoring

  • Loading branch information...
1 parent 1da8cf0 commit 17f5f35d54ffb7ee7f4c4170305eb9926dbf8c46 spingel committed
View
16 ...age/src/org/eclipse/mylyn/internal/monitor/usage/preferences/UsageDataPreferencePage.java
@@ -18,7 +18,9 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
+import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.mylyn.commons.core.StatusHandler;
@@ -90,8 +92,7 @@ public UsageDataPreferencePage() {
@Override
protected Control createContents(Composite parent) {
Composite container = new Composite(parent, SWT.NULL);
- GridLayout layout = new GridLayout(1, false);
- container.setLayout(layout);
+ GridLayoutFactory.fillDefaults().applyTo(container);
if (studyParameters.getCustomizingPlugin() != null) {
Label label = new Label(parent, SWT.NULL);
@@ -115,6 +116,8 @@ public void linkActivated(HyperlinkEvent e) {
createLogFileSection(container);
createUsageSection(container);
updateEnablement();
+
+ Dialog.applyDialogFont(container);
return container;
}
@@ -150,8 +153,8 @@ private void openMoreInformaionInBrowser() {
"Browser could not be initiated"); //$NON-NLS-1$
} catch (MalformedURLException e) {
MessageDialog.openError(Display.getDefault().getActiveShell(),
- Messages.UsageDataPreferencePage_Url_Not_Found, NLS.bind(
- Messages.UsageDataPreferencePage_Unable_To_Open_X, moreInformationUrl));
+ Messages.UsageDataPreferencePage_Url_Not_Found,
+ NLS.bind(Messages.UsageDataPreferencePage_Unable_To_Open_X, moreInformationUrl));
}
}
@@ -265,8 +268,9 @@ public void widgetDefaultSelected(SelectionEvent e) {
gridData.widthHint = 15;
submissionTime.setLayoutData(gridData);
long submissionFreq = UiUsageMonitorPlugin.DEFAULT_DELAY_BETWEEN_TRANSMITS;
- if (UiUsageMonitorPlugin.getDefault().getPreferenceStore().contains(
- MonitorPreferenceConstants.PREF_MONITORING_SUBMIT_FREQUENCY)) {
+ if (UiUsageMonitorPlugin.getDefault()
+ .getPreferenceStore()
+ .contains(MonitorPreferenceConstants.PREF_MONITORING_SUBMIT_FREQUENCY)) {
submissionFreq = getPreferenceStore().getLong(MonitorPreferenceConstants.PREF_MONITORING_SUBMIT_FREQUENCY);
}
long submissionFreqInDays = submissionFreq / DAYS_IN_MS;

0 comments on commit 17f5f35

Please sign in to comment.
Something went wrong with that request. Please try again.