aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSopot Cela2012-07-25 09:31:35 (EDT)
committerPaul Webster2012-07-25 09:31:35 (EDT)
commit74e3b65cd3a828d76b8d86fa4fcdfeb4b3e0479e (patch)
tree53f26520d85b4ac9c711f07facc0d6204f06091b
parent7fdc044ba420c088509ee62cc3bbd3cea6caef25 (diff)
downloadeclipse.platform.ui-74e3b65cd3a828d76b8d86fa4fcdfeb4b3e0479e.zip
eclipse.platform.ui-74e3b65cd3a828d76b8d86fa4fcdfeb4b3e0479e.tar.gz
eclipse.platform.ui-74e3b65cd3a828d76b8d86fa4fcdfeb4b3e0479e.tar.bz2
Bug 362522 - Theme switching should warn the user that a restart isv20120725-133135
required Open a dialog on OK or Apply
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java4
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java6
-rw-r--r--bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties3
3 files changed, 11 insertions, 2 deletions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java
index 60029ee..31c0a02 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchMessages.java
@@ -23,6 +23,10 @@ public class WorkbenchMessages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.ui.internal.messages";//$NON-NLS-1$
+ public static String ThemeChangeWarningText;
+
+ public static String ThemeChangeWarningTitle;
+
public static String BundleSigningTray_Cant_Find_Service;
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java
index 462761c..67f8821 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/dialogs/ViewsPreferencePage.java
@@ -16,6 +16,7 @@ import org.eclipse.e4.ui.css.swt.theme.ITheme;
import org.eclipse.e4.ui.css.swt.theme.IThemeEngine;
import org.eclipse.e4.ui.internal.workbench.swt.E4Application;
import org.eclipse.e4.ui.model.application.MApplication;
+import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferencePage;
import org.eclipse.jface.viewers.ArrayContentProvider;
@@ -51,7 +52,6 @@ public class ViewsPreferencePage extends PreferencePage implements
private ComboViewer themeIdCombo;
private ITheme currentTheme;
private String defaultTheme;
-
private Button enableAnimations;
private Button useColoredLabels;
@@ -139,6 +139,10 @@ public class ViewsPreferencePage extends PreferencePage implements
*/
@Override
public boolean performOk() {
+ if (!getSelection().equals(currentTheme)) {
+ MessageDialog.openWarning(getShell(), WorkbenchMessages.ThemeChangeWarningTitle,
+ WorkbenchMessages.ThemeChangeWarningText);
+ }
engine.setTheme(getSelection(), true);
IPreferenceStore apiStore = PrefUtil.getAPIPreferenceStore();
apiStore.setValue(IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS,
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties
index 8e9f204..ae8346d 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/messages.properties
@@ -491,7 +491,8 @@ OpenPerspectiveDialogAction_tooltip=Open Perspective
#---- General Preferences----
PreferencePage_noDescription = (No description available)
PreferencePageParameterValues_pageLabelSeparator = \ >\
-
+ThemeChangeWarningText = A restart is required for the theme change to take full effect.
+ThemeChangeWarningTitle = Theme change
# --- Workbench -----
WorkbenchPreference_openMode=Open mode
WorkbenchPreference_doubleClick=D&ouble click