Project

General

Profile

« Previous | Next » 

Revision 25a3ce1e

Added by Katja Luther over 4 years ago

ref #8385: fixes for preferences

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/DistributionStatusAndNamedAreaVocabularies.java
19 19

  
20 20
import org.eclipse.e4.core.di.annotations.Optional;
21 21
import org.eclipse.e4.ui.di.UIEventTopic;
22
import org.eclipse.jface.util.IPropertyChangeListener;
23
import org.eclipse.jface.util.PropertyChangeEvent;
22 24
import org.eclipse.swt.SWT;
23 25
import org.eclipse.swt.custom.CLabel;
24 26
import org.eclipse.swt.custom.TableEditor;
......
51 53
 * @since 02.07.2019
52 54
 *
53 55
 */
54
public class DistributionStatusAndNamedAreaVocabularies extends CdmPreferencePage {
56
public class DistributionStatusAndNamedAreaVocabularies extends CdmPreferencePage implements IPropertyChangeListener{
55 57

  
56 58
    protected String commandHandlerString;
57 59
    protected String commandHandlerStringStatus;
......
325 327
        }
326 328
    }
327 329

  
330
    @Override
331
    public void propertyChange(PropertyChangeEvent event) {
332

  
333
        if (event != null
334
                && PreferencesUtil.PREFERRED_TERMS_CHANGE.equals(event
335
                        .getProperty())) {
336
            refresh();
337
        }
338
    }
339

  
328 340
    /**
329 341
     *
330 342
     */
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/GeneralPreferencePage.java
74 74

  
75 75
        showIOMenuButton.addSelectionListener(this);
76 76

  
77
        if (isShowIOMenu == null || !isOverrideShowIOMenu){
77
        if (isShowIOMenu == null || (!isOverrideShowIOMenu && !isAdminPreference)){
78 78
            showIOMenuButton.select(0);
79 79
        }else if (isShowIOMenu){
80 80
            showIOMenuButton.select(1);
......
99 99
                isAdminPreference);
100 100

  
101 101
        showChecklistPerspectiveButton.addSelectionListener(this);
102
        if (isShowCheckListPerspective == null || !isOverrideShowCheckListPerspective){
102
        if (isShowCheckListPerspective == null || (!isOverrideShowIOMenu && !isAdminPreference)){
103 103
            showChecklistPerspectiveButton.select(0);
104 104
        }else if (isShowCheckListPerspective){
105 105
            showChecklistPerspectiveButton.select(1);
......
124 124

  
125 125

  
126 126
        showTaxonNodeWizardButton.setText(Messages.DatabasePreferncesPage_Show_TaxonNodeWizard);
127
        if (isShowTaxonNodeWizard){
128
            showTaxonNodeWizardButton.select(0);
129
        }else{
130
            showTaxonNodeWizardButton.select(1);
131
        }
132
        if (isShowTaxonNodeWizard == null || !isOverrideShowTaxonNodeWizard){
127

  
128
        if (isShowTaxonNodeWizard == null || (!isOverrideShowIOMenu && !isAdminPreference)){
133 129
            showTaxonNodeWizardButton.select(0);
134 130
        }else if (isShowTaxonNodeWizard){
135 131
            showTaxonNodeWizardButton.select(1);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/NameDetailsViewConfiguration.java
495 495
        isSecEnabled = nameDetailsConfig.isSecEnabled();
496 496
        isShowTypeDesignation = nameDetailsConfig.isTypeDesignationSectionActivated();
497 497
        isShowHybrid = nameDetailsConfig.isHybridActivated();
498
        isSimpleDetailsViewActivated = false;
498 499
        this.setButtonSelections();
499 500
        super.performDefaults();
500 501
    }
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/PreferencesUtil.java
841 841
                null, clazz);
842 842
    }
843 843

  
844

  
844 845
    public static String createPreferenceString(String property){
845 846
       return prefKey(property);
846 847

  
......
1709 1710

  
1710 1711
        //ABCD Configurator
1711 1712

  
1712
        updateAbcdImportConfigurationPreference();
1713
        //updateAbcdImportConfigurationPreference();
1713 1714

  
1714 1715
        //Name Details
1715 1716
        NameDetailsConfigurator config = getPreferredNameDetailsConfiguration(false);
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/preference/wizard/AvailableDistributionPerAreaStatusWizard.java
19 19
import eu.etaxonomy.cdm.model.metadata.CdmPreference;
20 20
import eu.etaxonomy.cdm.model.metadata.PreferencePredicate;
21 21
import eu.etaxonomy.cdm.persistence.hibernate.CdmDataChangeMap;
22
import eu.etaxonomy.taxeditor.event.EventUtility;
23
import eu.etaxonomy.taxeditor.event.WorkbenchEventConstants;
24 22
import eu.etaxonomy.taxeditor.l10n.Messages;
25 23
import eu.etaxonomy.taxeditor.preference.CdmPreferenceCache;
26 24
import eu.etaxonomy.taxeditor.preference.PreferencesUtil;
......
97 95

  
98 96
       // PreferencesUtil.setBooleanValue(PreferencesUtil.createOverridePreferenceString(PreferencePredicate.AvailableDistributionStatus.getKey()), aPage.override);
99 97
        PreferencesUtil.firePreferencesChanged(this.getClass());
100
        EventUtility.postEvent(WorkbenchEventConstants.REFRESH_DISTRIBUTION_PREFERENCES, true);
98
        //EventUtility.postEvent(WorkbenchEventConstants.REFRESH_DISTRIBUTION_PREFERENCES, true);
101 99
        return true;
102 100
    }
103 101

  

Also available in: Unified diff