Project

General

Profile

« Previous | Next » 

Revision 67185835

Added by Patrick Plitzner about 6 years ago

fix #4256 Add default credentials to login dialog

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/dialog/RemotingLoginDialog.java
23 23
import org.eclipse.core.runtime.jobs.Job;
24 24
import org.eclipse.core.runtime.preferences.ConfigurationScope;
25 25
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
26
import org.eclipse.jface.layout.GridDataFactory;
26 27
import org.eclipse.swt.SWT;
27 28
import org.eclipse.swt.SWTException;
28 29
import org.eclipse.swt.custom.StyledText;
......
366 367
        GridData gd_btnRememberMe = new GridData(SWT.LEFT, SWT.CENTER, false, false, 2, 1);
367 368
        btnRememberMe.setLayoutData(gd_btnRememberMe);
368 369
        btnRememberMe.setText(Messages.RemotingLoginDialog_LABEL_REMEMBER_ME);
369
        new Label(loginComposite, SWT.NONE);
370
        new Label(loginComposite, SWT.NONE);
371
        new Label(loginComposite, SWT.NONE);
372
        new Label(loginComposite, SWT.NONE);
370

  
371
        Label lblDefaultLogin = new Label(loginComposite, SWT.NONE);
372
        GridDataFactory.fillDefaults().span(4, 1).align(SWT.TRAIL, SWT.CENTER).applyTo(lblDefaultLogin);
373
        lblDefaultLogin.setText("Default: user=admin password=00000");
373 374

  
374 375
        styledTxtMessage = new StyledText(remotingComposite, SWT.NONE);
375 376
        styledTxtMessage.setBackground(SWTResourceManager.getColor(SWT.COLOR_INFO_BACKGROUND));
......
918 919
         credentialsPrefs.put(getPasswordPrefKey(), txtPassword.getText());
919 920
         flushPreferences(credentialsPrefs);
920 921
    }
921
    
922

  
922 923
    private void removePrefCredentials() {
923 924
        IEclipsePreferences preferences = ConfigurationScope.INSTANCE.getNode(STORE_PREFERENCES_NODE);
924 925
        Preferences credentialsPrefs = preferences.node(LOGIN_NODE);
......
940 941
            setMessage(bse.getMessage());
941 942
        }
942 943
    }
943
    
944
    
944

  
945

  
945 946

  
946 947
    private void readPrefCredentials() {
947 948
        String username, password;

Also available in: Unified diff