|
@@ -100,22 +100,29 @@ public class AddonToggle {
|
100
|
100
|
* Applies the changes to the PluginInfo, if any.
|
101
|
101
|
*/
|
102
|
102
|
public void apply() {
|
103
|
|
- if (pi != null && toggled) {
|
104
|
|
- if (pi.isLoaded()) {
|
105
|
|
- pi.unloadPlugin();
|
106
|
|
- } else {
|
107
|
|
- pi.loadPlugin();
|
|
103
|
+ new Thread("Addon-Load-Unload") {
|
|
104
|
+
|
|
105
|
+ /** {@inheritDoc} */
|
|
106
|
+ @Override
|
|
107
|
+ public void run() {
|
|
108
|
+ if (pi != null && toggled) {
|
|
109
|
+ if (pi.isLoaded()) {
|
|
110
|
+ pi.unloadPlugin();
|
|
111
|
+ } else {
|
|
112
|
+ pi.loadPlugin();
|
|
113
|
+ }
|
|
114
|
+ PluginManager.getPluginManager().updateAutoLoad(pi);
|
|
115
|
+ }
|
|
116
|
+ if (theme != null && toggled) {
|
|
117
|
+ if (theme.isEnabled()) {
|
|
118
|
+ theme.applyTheme();
|
|
119
|
+ } else {
|
|
120
|
+ theme.removeTheme();
|
|
121
|
+ }
|
|
122
|
+ ThemeManager.updateAutoLoad(theme);
|
|
123
|
+ }
|
108
|
124
|
}
|
109
|
|
- PluginManager.getPluginManager().updateAutoLoad(pi);
|
110
|
|
- }
|
111
|
|
- if (theme != null && toggled) {
|
112
|
|
- if (theme.isEnabled()) {
|
113
|
|
- theme.applyTheme();
|
114
|
|
- } else {
|
115
|
|
- theme.removeTheme();
|
116
|
|
- }
|
117
|
|
- ThemeManager.updateAutoLoad(theme);
|
118
|
|
- }
|
|
125
|
+ }.start();
|
119
|
126
|
}
|
120
|
127
|
|
121
|
128
|
/**
|