Fixed stuff.
authorJimmy Christensen <dusted@dusted.dk>
Mon, 15 Sep 2014 03:00:10 +0000 (06:00 +0300)
committerJimmy Christensen <dusted@dusted.dk>
Mon, 15 Sep 2014 03:00:10 +0000 (06:00 +0300)
Added search feature.
Aligned all widgets.
Fixed tablist order.
Added systray icons / disconnect icons.
Fixed wording.
Added settings tab:
 - Added option to disable auto update check
 - Added option to show account id in list.
 - Added option to disable "N accounts ready" popup.

* Todo: Danish translation.

src/fkgui/FkManager.java
src/fkgui/MainWin.java
src/fkgui/Messages.java
src/fkgui/NewAccountDialog.java
src/fkgui/TriggerDialog.java
src/fkgui/gfx/systray-color-blink.png
src/fkgui/gfx/systray-color.png
src/fkgui/gfx/systray-offline.png
src/fkgui/messages.properties

index cda22a7..ca86d2a 100644 (file)
@@ -25,17 +25,27 @@ public class FkManager implements ActionListener {
        {
                public String name;
                public String num;
        {
                public String name;
                public String num;
-               
+               private Boolean showNumInName;
                public Account( String acNum, String acName )
                {
                        name = acName;
                        num = acNum;
                }
                public Account( String acNum, String acName )
                {
                        name = acName;
                        num = acNum;
                }
-               
+
+               //Used by the ListView
                public String toString()
                {
                public String toString()
                {
+                       if( showNumInName )
+                       {
+                               return( "["+num+"] "+name);
+                       }
                        return(name);
                }
                        return(name);
                }
+
+               public Account showNumInName(Boolean showAccountId) {
+                       showNumInName=showAccountId;
+                       return this;
+               }
        }
                
        private Vector<Account> list;
        }
                
        private Vector<Account> list;
@@ -249,11 +259,28 @@ public class FkManager implements ActionListener {
                list.clear();
        }
        
                list.clear();
        }
        
+       //Return the full list
        public Vector<Account> getList()
        {
                return(list);
        }
        
        public Vector<Account> getList()
        {
                return(list);
        }
        
+       //Return a vector of accounts matching the keyword
+       public Vector<Account> getList(String key)
+       {
+               Vector<Account> res = new Vector<Account>();
+               String k = key.toLowerCase();
+               for( Account a : list )
+               {
+                       if( a.name.toLowerCase().contains( k ) ) 
+                       {
+                               res.add(a);
+                       }
+               }
+               
+               return(res);
+       }
+       
        public void getCurrentLayout()
        {
                
        public void getCurrentLayout()
        {
                
index 6ea0865..3846489 100644 (file)
@@ -2,6 +2,7 @@ package fkgui;
 
 
 import java.util.Map;
 
 
 import java.util.Map;
+import java.util.Vector;
 import  java.util.prefs.*;
 import java.awt.*;
 import java.awt.event.ActionEvent;
 import  java.util.prefs.*;
 import java.awt.*;
 import java.awt.event.ActionEvent;
@@ -21,6 +22,8 @@ import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swt.widgets.Button;
 import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.FocusEvent;
+import org.eclipse.swt.events.FocusListener;
 import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.SelectionAdapter;
 import org.eclipse.swt.events.KeyEvent;
 import org.eclipse.swt.events.KeyListener;
 import org.eclipse.swt.events.SelectionAdapter;
@@ -28,6 +31,8 @@ import org.eclipse.swt.events.SelectionEvent;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.events.ShellEvent;
 import org.eclipse.swt.events.ShellListener;
 import org.eclipse.swt.events.SelectionListener;
 import org.eclipse.swt.events.ShellEvent;
 import org.eclipse.swt.events.ShellListener;
+import org.eclipse.swt.graphics.Color;
+import org.eclipse.swt.graphics.Device;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.swt.widgets.Label;
 import org.eclipse.swt.widgets.Control;
@@ -58,7 +63,6 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
 
        public Text txtLog;
        public Button btnConnect;
 
        public Text txtLog;
        public Button btnConnect;
-       public Button chkAutoHide;
        public Label lblPort;
        public Label lblPassword;
        
        public Label lblPort;
        public Label lblPassword;
        
@@ -74,25 +78,44 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
        SerialWorker fkSerial;
        private boolean sysTrayIconVisible;
        
        SerialWorker fkSerial;
        private boolean sysTrayIconVisible;
        
-       Button btnActivateAccount;
-
+       Button btnOpenAccount;
+       private Color blackColor;
+       private Color grayColor;
+       private Color defaultBgColor;
+       private Color greenColor;
+       private Color redColor;
        
        
-       static final String PREF_PORT ="lastUsedPortPref"; //$NON-NLS-1$
-       static final String PREF_DEFAULT_DEVICE = "/dev/FinalKey"; //$NON-NLS-1$
-       static final String PREF_AUTOHIDE = "hideMainWinAfterConnect"; //$NON-NLS-1$
+       private static final String PREF_PORT ="lastUsedPortPref"; //$NON-NLS-1$
+       private static final String PREF_DEFAULT_DEVICE = "/dev/FinalKey"; //$NON-NLS-1$
+       private static final String PREF_AUTOHIDE = "hideMainWinAfterConnect"; //$NON-NLS-1$
        private static final String PREF_SORT_BY_ID_KEY = "sortAccountListById"; //$NON-NLS-1$
        private static final String PREF_SORT_BY_ID_KEY = "sortAccountListById"; //$NON-NLS-1$
+       private static final String PREF_SHOW_ACCOUNT_ID_IN_NAME_KEY = "showAccountIdInName"; //$NON-NLS-1$
+       private static final String PREF_ALLOW_UPDATE_CHECK = "allowUpdateCheck"; //$NON-NLS-1$
+       private static final String PREF_SHOW_ACCOUNTS_READY_NOTICE = "showAccountsReadyNotice"; //$NON-NLS-1$
+
        public Composite cmpConnect;
        private Composite cmpAccounts;
        ListViewer lstAccounts;
        public Composite cmpConnect;
        private Composite cmpAccounts;
        ListViewer lstAccounts;
+       private List lstAccountsControl;
        Label lblNumFree;
        Label lblNumFree;
-       Button btnNewAccoount;
+       Button btnNewAccount;
+       Button chkCheckForUpdates;
        Boolean hiddenAtStart=false;
        Boolean hiddenAtStart=false;
+       Button btnShowaccountsReady;
  
        //Icons
        private org.eclipse.swt.graphics.Image iconProgramOnline  = SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey.png");  //$NON-NLS-1$
        private org.eclipse.swt.graphics.Image iconProgramOffline  = SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey-big-offline.png");  //$NON-NLS-1$
        private Image iconSystrayOnline = Toolkit.getDefaultToolkit().createImage(getClass().getResource("gfx/systray-color.png"));  //$NON-NLS-1$
        private Image iconSystrayOffline= Toolkit.getDefaultToolkit().createImage(getClass().getResource("gfx/systray-offline.png"));  //$NON-NLS-1$
  
        //Icons
        private org.eclipse.swt.graphics.Image iconProgramOnline  = SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey.png");  //$NON-NLS-1$
        private org.eclipse.swt.graphics.Image iconProgramOffline  = SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey-big-offline.png");  //$NON-NLS-1$
        private Image iconSystrayOnline = Toolkit.getDefaultToolkit().createImage(getClass().getResource("gfx/systray-color.png"));  //$NON-NLS-1$
        private Image iconSystrayOffline= Toolkit.getDefaultToolkit().createImage(getClass().getResource("gfx/systray-offline.png"));  //$NON-NLS-1$
+       private TabItem tbtmSettings;
+       private Composite cmpSettings;
+       private Button chkAutoHide;
+       private Button chkSortByAccountId;
+       private Button chkShowAccountId;
+       private Thread updateCheckThread;
+       private Text txtFilter;
+       
        
        /**
         * Launch the application.
        
        /**
         * Launch the application.
@@ -125,10 +148,13 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                Display display = Display.getDefault();
                createContents();
                addAccountsTab();
                Display display = Display.getDefault();
                createContents();
                addAccountsTab();
+               addSettingsTab();
                createSysTrayIcon();
 
                serialEvent(SerialState.Disconnected);
                createSysTrayIcon();
 
                serialEvent(SerialState.Disconnected);
-               new Thread(new UpdateChecker(this)).start();
+
+
+               checkForUpdates();
 
                if( hiddenAtStart )
                {
 
                if( hiddenAtStart )
                {
@@ -145,6 +171,21 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                }
        }
        
                }
        }
        
+       private void checkForUpdates() {
+               if( prefs.getBoolean(PREF_ALLOW_UPDATE_CHECK, true) )
+               {
+                       if( updateCheckThread == null )
+                       {
+                               updateCheckThread = new Thread(new UpdateChecker(this));
+                               updateCheckThread.start();
+                       } else {
+                               System.out.println(Messages.MainWin_0);
+                       }
+               } else {
+                       System.out.println(Messages.MainWin_3);
+               }
+       }
+
        public void log( String str )
        {
                txtLog.append(str+"\n"); //$NON-NLS-1$
        public void log( String str )
        {
                txtLog.append(str+"\n"); //$NON-NLS-1$
@@ -163,34 +204,33 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
        private void createSysTrayIcon()
        {
                sysTrayIconVisible=true;
        private void createSysTrayIcon()
        {
                sysTrayIconVisible=true;
-        //Check the SystemTray is supported
-        if (!SystemTray.isSupported()) {
-            log("SystemTray is not supported, app is useless"); //$NON-NLS-1$
-            return;
-        }
-        
-        try {
+               //Check the SystemTray is supported
+               if (!SystemTray.isSupported()) {
+                       log("SystemTray is not supported, app is useless"); //$NON-NLS-1$
+                       return;
+               }
+
+               try {
                        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                } catch (Exception e1) {
                        e1.printStackTrace();
                } 
 
                        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
                } catch (Exception e1) {
                        e1.printStackTrace();
                } 
 
-        popup = new PopupMenu();
-        trayIcon =
-                new TrayIcon( iconSystrayOffline ); //$NON-NLS-1$
-        trayIcon.setToolTip("The Final Key - Hardware password manager"); //$NON-NLS-1$
-        trayIcon.setImageAutoSize(true);
-        final SystemTray tray = SystemTray.getSystemTray();
-       
-        // Create a pop-up menu components
-        showMain = new MenuItem(Messages.MainWin_7);
-        hideMain = new MenuItem(Messages.MainWin_8);
-
-        showMain.addActionListener(new ActionListener() {
+               popup = new PopupMenu();
+               trayIcon = new TrayIcon( iconSystrayOffline ); //$NON-NLS-1$
+               trayIcon.setToolTip("The Final Key - Hardware password manager"); //$NON-NLS-1$
+               trayIcon.setImageAutoSize(true);
+               final SystemTray tray = SystemTray.getSystemTray();
+
+               // Create a pop-up menu components
+               showMain = new MenuItem(Messages.MainWin_7);
+               hideMain = new MenuItem(Messages.MainWin_8);
+
+               showMain.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                Display.getDefault().syncExec( new Runnable(){
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                Display.getDefault().syncExec( new Runnable(){
-                                       
+
                                        public void run()
                                        {
                                                showFromTray();
                                        public void run()
                                        {
                                                showFromTray();
@@ -199,41 +239,41 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                        }
 
                });
                        }
 
                });
-        
-        hideMain.addActionListener(new ActionListener() {
+
+               hideMain.addActionListener(new ActionListener() {
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                Display.getDefault().syncExec( new Runnable(){
                        @Override
                        public void actionPerformed(ActionEvent e) {
                                Display.getDefault().syncExec( new Runnable(){
-                                       
+
                                        public void run()
                                        {
                                                hideToTray();
                                        }
                                } );
                        }
                                        public void run()
                                        {
                                                hideToTray();
                                        }
                                } );
                        }
-                               
+
                });
 
                });
 
-        clearSystray();
+               clearSystray();
+
 
 
+               trayIcon.setPopupMenu(popup);
+
+               try {
+                       tray.add(trayIcon);
+               } catch (AWTException e) {
+                       log("TrayIcon could not be added."); //$NON-NLS-1$
+               }
 
 
-        trayIcon.setPopupMenu(popup);
-       
-        try {
-            tray.add(trayIcon);
-        } catch (AWTException e) {
-               log("TrayIcon could not be added."); //$NON-NLS-1$
-        }      
-        
        }
        }
-       
+
        private void hideToTray()
        {
                popup.remove(0);
                popup.insert(showMain, 0);
                shell.setVisible(false);
        }
        private void hideToTray()
        {
                popup.remove(0);
                popup.insert(showMain, 0);
                shell.setVisible(false);
        }
-       
+
        private void showFromTray()
        {
                popup.remove(0);
        private void showFromTray()
        {
                popup.remove(0);
@@ -241,23 +281,23 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                shell.setVisible(true);
                shell.forceActive();
        }
                shell.setVisible(true);
                shell.forceActive();
        }
-       
+
        private void destroySysTrayIcon()
        {
                sysTrayIconVisible=false;
                SystemTray.getSystemTray().remove(trayIcon);
        }
        private void destroySysTrayIcon()
        {
                sysTrayIconVisible=false;
                SystemTray.getSystemTray().remove(trayIcon);
        }
-       
+
        private void clearSystray() {
                        popup.removeAll();
        private void clearSystray() {
                        popup.removeAll();
-               //Add components to pop-up menu
+                       //Add components to pop-up menu
                        if(shell.isVisible()==true)
                        {
                                popup.add(hideMain);
                        } else {
                                popup.add(showMain);
                        }
                        if(shell.isVisible()==true)
                        {
                                popup.add(hideMain);
                        } else {
                                popup.add(showMain);
                        }
-               popup.addSeparator();
+                       popup.addSeparator();
        }
 
        public void shutDownApp()
        }
 
        public void shutDownApp()
@@ -272,13 +312,13 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                }
                System.exit(0);
        }
                }
                System.exit(0);
        }
-       
+
        /**
         * Create contents of the window.
         */
        protected void createContents() {
        /**
         * Create contents of the window.
         */
        protected void createContents() {
-               
-               
+
+
                shell = new Shell();
                shell.setImage( iconProgramOffline ); //$NON-NLS-1$
                shell.setSize(711, 655);
                shell = new Shell();
                shell.setImage( iconProgramOffline ); //$NON-NLS-1$
                shell.setSize(711, 655);
@@ -286,7 +326,7 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
 
                prefs = Preferences.userNodeForPackage(this.getClass());
 
 
                prefs = Preferences.userNodeForPackage(this.getClass());
 
-               FkManager.getInstance().sortById( prefs.getBoolean(PREF_SORT_BY_ID_KEY, false) );               
+               FkManager.getInstance().sortById( prefs.getBoolean(PREF_SORT_BY_ID_KEY, false) );
 
                mySelf = this;
                shell.setLayout(new FillLayout(SWT.HORIZONTAL));
 
                mySelf = this;
                shell.setLayout(new FillLayout(SWT.HORIZONTAL));
@@ -300,48 +340,39 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                cmpConnect = new Composite(tabFolder, SWT.BORDER);
                tbtmConnection.setControl(cmpConnect);
                cmpConnect.setLayout(new FormLayout());
                cmpConnect = new Composite(tabFolder, SWT.BORDER);
                tbtmConnection.setControl(cmpConnect);
                cmpConnect.setLayout(new FormLayout());
-               
 
                btnConnect = new Button(cmpConnect, SWT.CENTER);
                btnConnect.setImage( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightning.png") ); //$NON-NLS-1$
                FormData fd_btnConnect = new FormData();
 
                btnConnect = new Button(cmpConnect, SWT.CENTER);
                btnConnect.setImage( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightning.png") ); //$NON-NLS-1$
                FormData fd_btnConnect = new FormData();
+               fd_btnConnect.top = new FormAttachment(0, 8);
                fd_btnConnect.left = new FormAttachment(100, -125);
                fd_btnConnect.right = new FormAttachment(100, -10);
                fd_btnConnect.left = new FormAttachment(100, -125);
                fd_btnConnect.right = new FormAttachment(100, -10);
+               
                btnConnect.setLayoutData(fd_btnConnect);
 
                btnConnect.addSelectionListener(new SelectionAdapter() {
                        public void widgetSelected(SelectionEvent e) {
                btnConnect.setLayoutData(fd_btnConnect);
 
                btnConnect.addSelectionListener(new SelectionAdapter() {
                        public void widgetSelected(SelectionEvent e) {
-                               
-                               
+
                                if( fkSerial!=null && fkSerial.state == SerialState.Connected )
                                {
                                        fkSerial.disconnect();
                                } else {
                                if( fkSerial!=null && fkSerial.state == SerialState.Connected )
                                {
                                        fkSerial.disconnect();
                                } else {
-                                       
                                        connect();
                                }
                        }
 
                });
                btnConnect.setText(Messages.MainWin_15);
                                        connect();
                                }
                        }
 
                });
                btnConnect.setText(Messages.MainWin_15);
-               
                txtPsw = new Text(cmpConnect, SWT.BORDER | SWT.PASSWORD);
                txtPsw = new Text(cmpConnect, SWT.BORDER | SWT.PASSWORD);
-               fd_btnConnect.bottom = new FormAttachment(txtPsw, 0, SWT.BOTTOM);
                FormData fd_txtPsw = new FormData();
                FormData fd_txtPsw = new FormData();
-               fd_txtPsw.bottom = new FormAttachment(0, 52);
-               fd_txtPsw.right = new FormAttachment(0, 501);
-               fd_txtPsw.top = new FormAttachment(0, 29);
+               
                fd_txtPsw.left = new FormAttachment(0, 102);
                txtPsw.setLayoutData(fd_txtPsw);
                txtPsw.setFocus();
                txtPsw.addKeyListener( new KeyListener() {
                fd_txtPsw.left = new FormAttachment(0, 102);
                txtPsw.setLayoutData(fd_txtPsw);
                txtPsw.setFocus();
                txtPsw.addKeyListener( new KeyListener() {
-                       
                        @Override
                        @Override
-                       public void keyReleased(KeyEvent arg0) {
+                       public void keyReleased(KeyEvent arg0) { }
 
 
-                               
-                       }
-                       
                        @Override
                        public void keyPressed(KeyEvent arg0) {
                                if( arg0.character==(char)13 )
                        @Override
                        public void keyPressed(KeyEvent arg0) {
                                if( arg0.character==(char)13 )
@@ -350,35 +381,34 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                                }
                        }
                });
                                }
                        }
                });
-               
+
                txtLog = new Text(cmpConnect, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI | SWT.WRAP);
                txtLog = new Text(cmpConnect, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI | SWT.WRAP);
+               fd_btnConnect.bottom = new FormAttachment(txtPsw, 0, SWT.BOTTOM);
                FormData fd_txtLog = new FormData();
                FormData fd_txtLog = new FormData();
-               fd_txtLog.top = new FormAttachment(btnConnect, 6);
-               fd_txtLog.left = new FormAttachment(0, 10);
-               fd_txtLog.right = new FormAttachment(100, -10);
-               fd_txtLog.bottom = new FormAttachment(100, -10);
+               fd_txtLog.bottom = new FormAttachment(100, -8);
+               fd_txtLog.top = new FormAttachment(btnConnect, 8, SWT.BOTTOM);
+               fd_txtLog.left = new FormAttachment(0, 8);
+               fd_txtLog.right = new FormAttachment(btnConnect,0, SWT.RIGHT);
                txtLog.setLayoutData(fd_txtLog);
                txtLog.setEditable(false);
                txtLog.setLayoutData(fd_txtLog);
                txtLog.setEditable(false);
-               
-               
+
                lblPort = new Label(cmpConnect, SWT.NONE);
                lblPort.setAlignment(SWT.RIGHT);
                lblPort = new Label(cmpConnect, SWT.NONE);
                lblPort.setAlignment(SWT.RIGHT);
-               fd_btnConnect.top = new FormAttachment(lblPort, 0, SWT.TOP);
                FormData fd_lblPort = new FormData();
                FormData fd_lblPort = new FormData();
-               fd_lblPort.right = new FormAttachment(0, 86);
-               fd_lblPort.top = new FormAttachment(0);
                fd_lblPort.left = new FormAttachment(0, 10);
                lblPort.setLayoutData(fd_lblPort);
                fd_lblPort.left = new FormAttachment(0, 10);
                lblPort.setLayoutData(fd_lblPort);
-               lblPort.setText("Port"); //$NON-NLS-1$
-               
+               lblPort.setText(Messages.MainWin_4);
+
                txtDev = new Text(cmpConnect, SWT.BORDER);
                txtDev = new Text(cmpConnect, SWT.BORDER);
+               fd_txtPsw.top = new FormAttachment(txtDev,4, SWT.BOTTOM);
+               fd_lblPort.top = new FormAttachment(txtDev,0,SWT.CENTER);
+               fd_lblPort.right = new FormAttachment(txtDev, -7);
                FormData fd_txtDev = new FormData();
                FormData fd_txtDev = new FormData();
-               fd_txtDev.bottom = new FormAttachment(0, 23);
-               fd_txtDev.right = new FormAttachment(0, 256);
-               fd_txtDev.top = new FormAttachment(0);
+               //fd_txtDev.bottom = new FormAttachment(txtPsw, -6);
+               fd_txtDev.top = new FormAttachment(btnConnect,0,SWT.TOP);
                fd_txtDev.left = new FormAttachment(0, 102);
                txtDev.setLayoutData(fd_txtDev);
                fd_txtDev.left = new FormAttachment(0, 102);
                txtDev.setLayoutData(fd_txtDev);
-               txtDev.setFont(SWTResourceManager.getFont("Cantarell", 9, SWT.NORMAL)); //$NON-NLS-1$
+//             txtDev.setFont(SWTResourceManager.getFont("Cantarell", 9, SWT.NORMAL)); //$NON-NLS-1$
                txtDev.setText( prefs.get(PREF_PORT, PREF_DEFAULT_DEVICE));
                lblPassword = new Label(cmpConnect, SWT.NONE);
                lblPassword.setAlignment(SWT.RIGHT);
                txtDev.setText( prefs.get(PREF_PORT, PREF_DEFAULT_DEVICE));
                lblPassword = new Label(cmpConnect, SWT.NONE);
                lblPassword.setAlignment(SWT.RIGHT);
@@ -389,27 +419,19 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                lblPassword.setLayoutData(fd_lblPassword);
                lblPassword.setText(Messages.MainWin_18);
 
                lblPassword.setLayoutData(fd_lblPassword);
                lblPassword.setText(Messages.MainWin_18);
 
-               chkAutoHide = new Button(cmpConnect, SWT.CHECK);
-               FormData fd_chkAutoHide = new FormData();
-               fd_chkAutoHide.top = new FormAttachment(btnConnect, 0, SWT.TOP);
-               fd_chkAutoHide.left = new FormAttachment(txtDev, 6);
-               fd_chkAutoHide.right = new FormAttachment(0, 501);
-               chkAutoHide.setLayoutData(fd_chkAutoHide);
-               chkAutoHide.setText(Messages.MainWin_19);
-
-               chkAutoHide.setSelection( prefs.getBoolean(PREF_AUTOHIDE, false)) ;
-
                animation = new Animation(cmpConnect, SWT.NONE, 4);
                animation = new Animation(cmpConnect, SWT.NONE, 4);
-
+               fd_txtDev.right = new FormAttachment(animation,-16, SWT.LEFT );
+               fd_txtPsw.right = new FormAttachment(animation,-16, SWT.LEFT );
+               
                FormData fd_animation = new FormData();
                FormData fd_animation = new FormData();
-               fd_animation.top = new FormAttachment(btnConnect, 0, SWT.CENTER);
-               fd_animation.right = new FormAttachment(btnConnect,-16);
+               fd_animation.right = new FormAttachment(btnConnect, -16);
+               fd_animation.top = new FormAttachment(0, 10);
 
                animation.setLayoutData(fd_animation);
 
                animation.setVisible(false);
                animation.setPlaying(false);
 
                animation.setLayoutData(fd_animation);
 
                animation.setVisible(false);
                animation.setPlaying(false);
-               cmpConnect.setTabList(new Control[]{txtPsw, btnConnect, txtDev, chkAutoHide});
+               cmpConnect.setTabList(new Control[]{txtPsw, btnConnect, txtDev});
 
                log(Messages.MainWin_22);
 
 
                log(Messages.MainWin_22);
 
@@ -451,12 +473,18 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                                log("Warning: Enviroment variable SWT_GTK3 is not set to 0, if FinalKey GUI looks weird or crashes after connecting, try export GTK_SWT3=0 before running."); //$NON-NLS-1$
                        }
                }
                                log("Warning: Enviroment variable SWT_GTK3 is not set to 0, if FinalKey GUI looks weird or crashes after connecting, try export GTK_SWT3=0 before running."); //$NON-NLS-1$
                        }
                }
-
+               
+               Device display = Display.getCurrent();
+                blackColor = display.getSystemColor(SWT.COLOR_BLACK );
+                 grayColor = display.getSystemColor(SWT.COLOR_GRAY );
+                 defaultBgColor = display.getSystemColor(SWT.COLOR_LIST_BACKGROUND );
+                 greenColor = display.getSystemColor(SWT.COLOR_DARK_GREEN );
+                 redColor = display.getSystemColor(SWT.COLOR_RED );            
+               
        }
 
        
        private void connect() {
        }
 
        
        private void connect() {
-               prefs.putBoolean(PREF_AUTOHIDE, chkAutoHide.getSelection() );
                fkSerial = new SerialWorker(mySelf);
                prefs.put(PREF_PORT, txtDev.getText() );
                fkSerial.connect(txtDev.getText(),txtPsw.getText());
                fkSerial = new SerialWorker(mySelf);
                prefs.put(PREF_PORT, txtDev.getText() );
                fkSerial.connect(txtDev.getText(),txtPsw.getText());
@@ -471,12 +499,14 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                clearSystray();
                lstAccounts.getList().removeAll();
 
                clearSystray();
                lstAccounts.getList().removeAll();
 
+               Boolean showAccountId = prefs.getBoolean( PREF_SHOW_ACCOUNT_ID_IN_NAME_KEY, false);
+               
                for( FkManager.Account a : FkManager.getInstance().getList() )
                {
                        free--;
                for( FkManager.Account a : FkManager.getInstance().getList() )
                {
                        free--;
-                       lstAccounts.add( a );
+                       lstAccounts.add( a.showNumInName( showAccountId ) );
 
 
-                       Menu menu = new Menu(a.name+" ["+a.num+"]"); //$NON-NLS-1$ //$NON-NLS-1$ //$NON-NLS-2$
+                       Menu menu = new Menu(a.toString());
                        MenuItem both = new MenuItem(Messages.MainWin_25);
                        MenuItem usr = new MenuItem(Messages.MainWin_26);
                        MenuItem psw = new MenuItem(Messages.MainWin_27);
                        MenuItem both = new MenuItem(Messages.MainWin_25);
                        MenuItem usr = new MenuItem(Messages.MainWin_26);
                        MenuItem psw = new MenuItem(Messages.MainWin_27);
@@ -499,14 +529,14 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
 
                        popup.add(menu);
                }
 
                        popup.add(menu);
                }
-               
+
                lblNumFree.setText(" "+free+Messages.MainWin_32); //$NON-NLS-1$
                lblNumFree.pack();
                if( free == 0 )
                {
                lblNumFree.setText(" "+free+Messages.MainWin_32); //$NON-NLS-1$
                lblNumFree.pack();
                if( free == 0 )
                {
-                       btnNewAccoount.setVisible(false);
+                       btnNewAccount.setVisible(false);
                } else {
                } else {
-                       btnNewAccoount.setVisible(true);
+                       btnNewAccount.setVisible(true);
                }
                
        }
                }
                
        }
@@ -541,7 +571,7 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                        trayIcon.setImage( iconSystrayOnline );
 
                        int numAccounts=FkManager.getInstance().getList().size();
                        trayIcon.setImage( iconSystrayOnline );
 
                        int numAccounts=FkManager.getInstance().getList().size();
-                       if( numAccounts>0 )
+                       if( numAccounts>0 && prefs.getBoolean( PREF_SHOW_ACCOUNTS_READY_NOTICE, true) )
                        {
                                trayIcon.displayMessage("FinalKey", numAccounts +" "+ (( numAccounts >1)?Messages.MainWin_1:Messages.MainWin_2), //$NON-NLS-1$ //$NON-NLS-2$
                                                TrayIcon.MessageType.INFO);
                        {
                                trayIcon.displayMessage("FinalKey", numAccounts +" "+ (( numAccounts >1)?Messages.MainWin_1:Messages.MainWin_2), //$NON-NLS-1$ //$NON-NLS-2$
                                                TrayIcon.MessageType.INFO);
@@ -560,7 +590,6 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
 
                        lblPort.setEnabled(false);
                        lblPassword.setEnabled(false);
 
                        lblPort.setEnabled(false);
                        lblPassword.setEnabled(false);
-                       chkAutoHide.setEnabled(false);
                        break;
                case Disconnected:
                        fkSerial=null;
                        break;
                case Disconnected:
                        fkSerial=null;
@@ -578,7 +607,6 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
 
                        lblPort.setEnabled(true);
                        lblPassword.setEnabled(true);
 
                        lblPort.setEnabled(true);
                        lblPassword.setEnabled(true);
-                       chkAutoHide.setEnabled(true);
                        txtPsw.setEnabled(true);
                        txtDev.setEnabled(true);
 
                        txtPsw.setEnabled(true);
                        txtDev.setEnabled(true);
 
@@ -595,12 +623,12 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                                log(Messages.MainWin_44);
                        }
                        break;
                                log(Messages.MainWin_44);
                        }
                        break;
-               
+
                case Working:
                        animation.setPlaying(false);
                        animation.setVisible(false);
                        break;
                case Working:
                        animation.setPlaying(false);
                        animation.setVisible(false);
                        break;
-                       
+
                default:
                        break;
                }
                default:
                        break;
                }
@@ -613,20 +641,33 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                {
                        tabFolder.getItem(1).dispose();
                }
                {
                        tabFolder.getItem(1).dispose();
                }
+
+       }
+       
+       void updateFilteredList(Vector<Account> source)
+       {
+               lstAccounts.getList().removeAll();
+
+               Boolean showAccountId = prefs.getBoolean( PREF_SHOW_ACCOUNT_ID_IN_NAME_KEY, false);
                
                
+               for( FkManager.Account a : source )
+               {
+                       lstAccounts.add( a.showNumInName( showAccountId ) );
+               }
        }
 
        private void addAccountsTab() {
        }
 
        private void addAccountsTab() {
-               TabItem tbtmAccounts = new TabItem(tabFolder, SWT.NONE);
+
+               TabItem tbtmAccounts = new TabItem(tabFolder, SWT.NONE, 1);//TabItem(tabFolder, SWT.NONE);
                tbtmAccounts.setText(Messages.MainWin_45);
                tbtmAccounts.setText(Messages.MainWin_45);
-               
+
                cmpAccounts = new Composite(tabFolder, SWT.BORDER);
                tbtmAccounts.setControl(cmpAccounts);
                cmpAccounts.setLayout(new FormLayout());
                cmpAccounts = new Composite(tabFolder, SWT.BORDER);
                tbtmAccounts.setControl(cmpAccounts);
                cmpAccounts.setLayout(new FormLayout());
-               
-               btnNewAccoount = new Button(cmpAccounts, SWT.NONE);
-               btnNewAccoount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/new.png")); //$NON-NLS-1$
-               btnNewAccoount.addSelectionListener(new SelectionAdapter() {
+
+               btnNewAccount = new Button(cmpAccounts, SWT.NONE);
+               btnNewAccount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/new.png")); //$NON-NLS-1$
+               btnNewAccount.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                NewAccountDialog dialog = new NewAccountDialog(shell, shell.getStyle() );
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                NewAccountDialog dialog = new NewAccountDialog(shell, shell.getStyle() );
@@ -638,64 +679,118 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                });
                FormData fd_btnNewAccoount = new FormData();
                fd_btnNewAccoount.right = new FormAttachment(100, -10);
                });
                FormData fd_btnNewAccoount = new FormData();
                fd_btnNewAccoount.right = new FormAttachment(100, -10);
-               fd_btnNewAccoount.top = new FormAttachment(0, 549);
+               fd_btnNewAccoount.top = new FormAttachment(100, -40);
                fd_btnNewAccoount.bottom = new FormAttachment(100, -6);
                fd_btnNewAccoount.bottom = new FormAttachment(100, -6);
-               btnNewAccoount.setLayoutData(fd_btnNewAccoount);
-               btnNewAccoount.setText(Messages.MainWin_47);
-               
+               fd_btnNewAccoount.left = new FormAttachment(100, -200);
+
+               btnNewAccount.setLayoutData(fd_btnNewAccoount);
+               btnNewAccount.setText(Messages.MainWin_47);
+
+               lstAccounts = new ListViewer(cmpAccounts, SWT.BORDER | SWT.V_SCROLL);
+               lstAccountsControl = lstAccounts.getList();
+               lstAccountsControl.setLayoutData(new FormData());
+
                lblNumFree = new Label(cmpAccounts, SWT.NONE);
                lblNumFree.setText("Hello World!"); //$NON-NLS-1$
                lblNumFree = new Label(cmpAccounts, SWT.NONE);
                lblNumFree.setText("Hello World!"); //$NON-NLS-1$
-               
                FormData fd_lblNumFree = new FormData();
                FormData fd_lblNumFree = new FormData();
-               fd_lblNumFree.bottom = new FormAttachment(100, -10);
+               fd_lblNumFree.left = new FormAttachment(lstAccountsControl,0,SWT.LEFT);
+               fd_lblNumFree.bottom = new FormAttachment(btnNewAccount, 0, SWT.CENTER);
                lblNumFree.setLayoutData(fd_lblNumFree);
                lblNumFree.setLayoutData(fd_lblNumFree);
-               
-               
-               lstAccounts = new ListViewer(cmpAccounts, SWT.BORDER | SWT.V_SCROLL);
-               List list = lstAccounts.getList();
-               fd_lblNumFree.left = new FormAttachment(list, 0, SWT.LEFT);
-               list.setLayoutData(new FormData());
+
+               btnOpenAccount = new Button(cmpAccounts, SWT.NONE);
+               fd_lblNumFree.right = new FormAttachment(btnOpenAccount, -224);
+               btnOpenAccount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightbulb.png")); //$NON-NLS-1$
+               FormData fd_btnOpenAccount = new FormData();
+               fd_btnOpenAccount.top = new FormAttachment(btnNewAccount, 0, SWT.TOP);
+               fd_btnOpenAccount.bottom = new FormAttachment(btnNewAccount, 0, SWT.BOTTOM);
+               fd_btnOpenAccount.right = new FormAttachment(btnNewAccount, -8, SWT.LEFT );
+               btnOpenAccount.setLayoutData(fd_btnOpenAccount);
+               btnOpenAccount.setText(Messages.MainWin_5);
+               btnOpenAccount.getShell().layout();
+               btnOpenAccount.setEnabled(false);
+
+
                FormData fd_lstAccounts = new FormData();
                FormData fd_lstAccounts = new FormData();
-               fd_lstAccounts.bottom = new FormAttachment(btnNewAccoount, -6);
-               
-               btnActivateAccount = new Button(cmpAccounts, SWT.NONE);
-               fd_btnNewAccoount.left = new FormAttachment(btnActivateAccount, 6);
-               btnActivateAccount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightbulb.png")); //$NON-NLS-1$
-               FormData fd_btnActivateAccount = new FormData();
-               fd_btnActivateAccount.right = new FormAttachment(100, -169);
-               fd_btnActivateAccount.bottom = new FormAttachment(btnNewAccoount, 0, SWT.BOTTOM);
-               fd_btnActivateAccount.top = new FormAttachment(btnNewAccoount, 0, SWT.TOP);
-               btnActivateAccount.setLayoutData(fd_btnActivateAccount);
                fd_lstAccounts.top = new FormAttachment(0, 10);
                fd_lstAccounts.top = new FormAttachment(0, 10);
-               fd_lstAccounts.left = new FormAttachment(0, 10);
-               fd_lstAccounts.right = new FormAttachment(100, -10);
-               btnActivateAccount.setVisible(false);
+               fd_lstAccounts.bottom = new FormAttachment(btnNewAccount, -6);
                
                
-               Button btnByAccountId = new Button(cmpAccounts, SWT.CHECK);
-               fd_btnActivateAccount.left = new FormAttachment(btnByAccountId, 6);
-               fd_lblNumFree.right = new FormAttachment(btnByAccountId, -6);
-               btnByAccountId.addSelectionListener(new SelectionAdapter() {
+               txtFilter = new Text(cmpAccounts, SWT.BORDER);
+               txtFilter.setText(Messages.MainWin_10);
+               FormData fd_txtFilter = new FormData();
+               fd_txtFilter.left = new FormAttachment(lblNumFree, 8, SWT.RIGHT);
+               fd_txtFilter.bottom = new FormAttachment(btnOpenAccount,0, SWT.CENTER);
+               fd_txtFilter.right = new FormAttachment(btnOpenAccount, -8, SWT.LEFT);
+               txtFilter.setLayoutData(fd_txtFilter);
+               txtFilter.setForeground( grayColor );
+               txtFilter.addFocusListener( new FocusListener() {
                        @Override
                        @Override
-                       public void widgetSelected(SelectionEvent e) {
-                               Button btnAccId = (Button)e.getSource();
-                               FkManager.getInstance().sortById( btnAccId.getSelection() );
-                               prefs.putBoolean( PREF_SORT_BY_ID_KEY, btnAccId.getSelection() );
-                               updateAccountList();
+                       public void focusLost(FocusEvent arg0) {
+                               txtFilter.setText(Messages.MainWin_10);
+                               txtFilter.setForeground( grayColor );
+                               txtFilter.setBackground( defaultBgColor );
+                               btnOpenAccount.setEnabled(false);
+                       }
+                       
+                       @Override
+                       public void focusGained(FocusEvent arg0) {
+                               btnOpenAccount.setEnabled(false);
+                               updateFilteredList( FkManager.getInstance().getList() );
+                               txtFilter.setForeground( blackColor );
+                               txtFilter.setText(""); //$NON-NLS-1$
+                               
                        }
                });
                        }
                });
-               FormData fd_btnByAccountId = new FormData();
-               fd_btnByAccountId.left = new FormAttachment(0, 139);
-               fd_btnByAccountId.right = new FormAttachment(100, -398);
-               fd_btnByAccountId.bottom = new FormAttachment(btnNewAccoount, 0, SWT.BOTTOM);
-               btnByAccountId.setLayoutData(fd_btnByAccountId);
-               btnByAccountId.setText(Messages.MainWin_btnByAccountId_text);
-               btnByAccountId.setSelection( prefs.getBoolean( PREF_SORT_BY_ID_KEY, false));
                
                
+               txtFilter.addKeyListener( new KeyListener() {
+                       
+
+                       
+                       @Override
+                       public void keyReleased(KeyEvent arg0) {
+                               btnOpenAccount.setEnabled(false);
+                               
+                               if( txtFilter.getText().length() == 0 )
+                               {
+                                       updateFilteredList( FkManager.getInstance().getList() );
+                                       txtFilter.setBackground( defaultBgColor );
+                               } else {
+                                       
+                                       Vector<Account> res = FkManager.getInstance().getList(txtFilter.getText());
+                                       
+                                       if( res.size() < 1 )
+                                       {
+                                               txtFilter.setBackground( redColor );
+       
+                                       } else if( res.size() == 1 )
+                                       {
+                                               txtFilter.setBackground( greenColor );
+                                               btnOpenAccount.setEnabled(true);
+                                               if( arg0.character==(char)13 )
+                                               {
+                                                       showTrigDialog(res.get(0));
+                                               }
+                                               
+                                       } else {
+                                               txtFilter.setBackground( defaultBgColor );
+                                       }
+                                       
+                                       updateFilteredList( res );
+                                       
+                               }
+                       }
+                       
+                       @Override
+                       public void keyPressed(KeyEvent arg0) {
+
+                       }
+               });
                
                
-               //lstAccounts.setLayoutData(fd_lstAccounts);
+               fd_lstAccounts.left = new FormAttachment(0, 10);
+               fd_lstAccounts.right = new FormAttachment(100, -10);
+
                lstAccounts.getControl().setLayoutData(fd_lstAccounts);
                lstAccounts.addDoubleClickListener( new IDoubleClickListener() {
                lstAccounts.getControl().setLayoutData(fd_lstAccounts);
                lstAccounts.addDoubleClickListener( new IDoubleClickListener() {
-                       
+
                        @Override
                        public void doubleClick(DoubleClickEvent arg0) {
                                // TODO Auto-generated method stub
                        @Override
                        public void doubleClick(DoubleClickEvent arg0) {
                                // TODO Auto-generated method stub
@@ -704,58 +799,135 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                                {
                                        Account acc = (Account)selection.getFirstElement();
                                        showTrigDialog(acc);
                                {
                                        Account acc = (Account)selection.getFirstElement();
                                        showTrigDialog(acc);
-                               } else {
-                                       System.out.println("Selected nothing."); //$NON-NLS-1$
                                }
                                }
-                               
-                               
                        }
 
 
                });
                        }
 
 
                });
-               
+
                lstAccounts.addSelectionChangedListener( new ISelectionChangedListener() {
                lstAccounts.addSelectionChangedListener( new ISelectionChangedListener() {
-                       
+
                        @Override
                        public void selectionChanged(SelectionChangedEvent arg0) {
                                StructuredSelection selection = (StructuredSelection) arg0.getSelection();
                                if( !selection.isEmpty() )
                                {
                        @Override
                        public void selectionChanged(SelectionChangedEvent arg0) {
                                StructuredSelection selection = (StructuredSelection) arg0.getSelection();
                                if( !selection.isEmpty() )
                                {
-                                       Account acc = (Account)selection.getFirstElement();
-                                       btnActivateAccount.setVisible(true);
-                                       btnActivateAccount.setText(acc.name);
-                                       
+                                       btnOpenAccount.setEnabled(true);
+
                                        //Remove any listeners
                                        //Remove any listeners
-                                       for( Listener s :btnActivateAccount.getListeners(SWT.Selection) )
+                                       for( Listener s :btnOpenAccount.getListeners(SWT.Selection) )
                                        {
                                        {
-                                               btnActivateAccount.removeListener(SWT.Selection, s);
+                                               btnOpenAccount.removeListener(SWT.Selection, s);
                                        }
                                        }
-                                       
-                                       btnActivateAccount.addSelectionListener( new SelectionListener() {
-                                               
+
+                                       btnOpenAccount.addSelectionListener( new SelectionListener() {
+
                                                @Override
                                                public void widgetSelected(SelectionEvent arg0) {
                                                @Override
                                                public void widgetSelected(SelectionEvent arg0) {
-                                                       
                                                        StructuredSelection selection = (StructuredSelection) lstAccounts.getSelection();
                                                        Account acc = (Account)selection.getFirstElement();
                                                        showTrigDialog(acc);
                                                }
                                                        StructuredSelection selection = (StructuredSelection) lstAccounts.getSelection();
                                                        Account acc = (Account)selection.getFirstElement();
                                                        showTrigDialog(acc);
                                                }
-                                               
+
                                                @Override
                                                public void widgetDefaultSelected(SelectionEvent arg0) {
                                                        // TODO Auto-generated method stub
                                                @Override
                                                public void widgetDefaultSelected(SelectionEvent arg0) {
                                                        // TODO Auto-generated method stub
-                                                       
                                                }
                                        });
                                                }
                                        });
-                                       
                                }
                        }
                });
                                }
                        }
                });
+
+               cmpAccounts.setTabList(new Control[]{lstAccountsControl, txtFilter, btnOpenAccount, btnNewAccount});
+       }
+
+       private void addSettingsTab()
+       {
+               tbtmSettings = new TabItem(tabFolder, SWT.NONE);
+               tbtmSettings.setText(Messages.MainWin_tbtmSettings_text);
+
+               cmpSettings = new Composite(tabFolder, SWT.BORDER);
+               tbtmSettings.setControl(cmpSettings);
+               cmpSettings.setLayout(new FormLayout());
+
+               chkAutoHide = new Button(cmpSettings, SWT.CHECK);
+               chkAutoHide.setText(Messages.MainWin_6);
+               chkAutoHide.setSelection( prefs.getBoolean( PREF_AUTOHIDE, false ) );
+               FormData fd_chkAutoHide = new FormData();
+               fd_chkAutoHide.top = new FormAttachment(0, 10);
+               fd_chkAutoHide.left = new FormAttachment(0, 10);
+               chkAutoHide.setLayoutData(fd_chkAutoHide);
+               chkAutoHide.addSelectionListener( new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent e) {
+                               prefs.putBoolean(PREF_AUTOHIDE, chkAutoHide.getSelection() );
+                       }
+               });
+
+               chkSortByAccountId = new Button(cmpSettings, SWT.CHECK);
+               chkSortByAccountId.setText(Messages.MainWin_9);
+               chkSortByAccountId.setSelection( prefs.getBoolean( PREF_SORT_BY_ID_KEY, false) );
+               FormData fd_btnSortByAccountId = new FormData();
+               fd_btnSortByAccountId.top = new FormAttachment(chkAutoHide, 6);
+               fd_btnSortByAccountId.left = new FormAttachment(chkAutoHide, 0, SWT.LEFT);
+               chkSortByAccountId.setLayoutData(fd_btnSortByAccountId);
+               chkSortByAccountId.addSelectionListener( new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent e) {
+                               prefs.putBoolean( PREF_SORT_BY_ID_KEY, chkSortByAccountId.getSelection() );
+                               FkManager.getInstance().sortById( chkSortByAccountId.getSelection() );
+                               updateAccountList();
+                       }
+               });
+
                
                
-                               
+               chkShowAccountId = new Button(cmpSettings, SWT.CHECK);
+               FormData fd_chkShowAccountId = new FormData();
+               fd_chkShowAccountId.top = new FormAttachment(chkSortByAccountId, 6);
+               fd_chkShowAccountId.left = new FormAttachment(chkAutoHide, 0, SWT.LEFT);
+               chkShowAccountId.setLayoutData(fd_chkShowAccountId);
+               chkShowAccountId.setText(Messages.MainWin_btnShowAccountId_text);
+               chkShowAccountId.setSelection( prefs.getBoolean(PREF_SHOW_ACCOUNT_ID_IN_NAME_KEY, false) );
+               chkShowAccountId.addSelectionListener( new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent e) {
+                               prefs.putBoolean( PREF_SHOW_ACCOUNT_ID_IN_NAME_KEY, chkShowAccountId.getSelection() );
+                               updateAccountList();
+                       }
+               });
+               
+               chkCheckForUpdates = new Button(cmpSettings, SWT.CHECK);
+               FormData fd_chkCheckForUpdates = new FormData();
+               fd_chkCheckForUpdates.left = new FormAttachment(chkAutoHide, 0, SWT.LEFT);
+               chkCheckForUpdates.setLayoutData(fd_chkCheckForUpdates);
+               chkCheckForUpdates.setText(Messages.MainWin_btnCheckForUpdates_text);
+               chkCheckForUpdates.setSelection( prefs.getBoolean( PREF_ALLOW_UPDATE_CHECK, true) );
+               chkCheckForUpdates.addSelectionListener( new SelectionAdapter() {
+                       public void widgetSelected(SelectionEvent e) {
+                               prefs.putBoolean( PREF_ALLOW_UPDATE_CHECK, chkCheckForUpdates.getSelection() );
+                               checkForUpdates();
+                       }
+               });
+               fd_chkCheckForUpdates.top = new FormAttachment(chkShowAccountId, 6);
+               
+               btnShowaccountsReady = new Button(cmpSettings, SWT.CHECK);
+               btnShowaccountsReady.setSelection( prefs.getBoolean( PREF_SHOW_ACCOUNTS_READY_NOTICE, true) );
+               FormData fd_btnShowaccountsReady = new FormData();
+               fd_btnShowaccountsReady.top = new FormAttachment(chkCheckForUpdates, 6);
+               fd_btnShowaccountsReady.left = new FormAttachment(chkAutoHide, 0, SWT.LEFT);
+               btnShowaccountsReady.setLayoutData(fd_btnShowaccountsReady);
+
+               btnShowaccountsReady.setText(Messages.MainWin_btnShowaccountsReady_text);
+               btnShowaccountsReady.addSelectionListener( new SelectionAdapter() {
+               public void widgetSelected(SelectionEvent e) {
+                       prefs.putBoolean( PREF_SHOW_ACCOUNTS_READY_NOTICE, btnShowaccountsReady.getSelection() );
+                       checkForUpdates();
+               }
+       });
+               
+
+
        }
 
        private void showTrigDialog(Account acc) {
        }
 
        private void showTrigDialog(Account acc) {
+               Account selectedAccount = acc;
                TriggerDialog diag = new TriggerDialog(shell, shell.getStyle(), acc, mySelf );
 
                //shell.setMinimized(true);
                TriggerDialog diag = new TriggerDialog(shell, shell.getStyle(), acc, mySelf );
 
                //shell.setMinimized(true);
@@ -764,13 +936,31 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                {
                        //shell.setMinimized(false);
                }
                {
                        //shell.setMinimized(false);
                }
-               
+
+               //Check if the account still exists
+               Boolean deleted=true;
+               for( Account a : FkManager.getInstance().getList() )
+               {
+                       if( a.equals(selectedAccount) )
+                       {
+                               deleted=false;
+                               break;
+                       }
+               }
+
+               if(deleted)
+               {
+                       btnOpenAccount.setEnabled(false);
+               }
+
+               txtFilter.setFocus();
                shell.setEnabled(true);
                shell.setEnabled(true);
-               
+
        }
 
        @Override
        public void updateCheckFinished(UpdateResultEvent event) {
        }
 
        @Override
        public void updateCheckFinished(UpdateResultEvent event) {
+               updateCheckThread=null;
                switch(event.result)
                {
                case CHECK_FAILED:
                switch(event.result)
                {
                case CHECK_FAILED:
@@ -786,6 +976,6 @@ public class MainWin implements ConsoleMsg, UpdateCheckResultListener {
                        dialog.open();  
                        break;
                }
                        dialog.open();  
                        break;
                }
-               
+
        }
 }
        }
 }
index 4b9ca46..0af7ccb 100644 (file)
@@ -4,8 +4,10 @@ import org.eclipse.osgi.util.NLS;
 
 public class Messages extends NLS {
        private static final String BUNDLE_NAME = "fkgui.messages"; //$NON-NLS-1$
 
 public class Messages extends NLS {
        private static final String BUNDLE_NAME = "fkgui.messages"; //$NON-NLS-1$
+       public static String MainWin_0;
        public static String MainWin_2;
        public static String MainWin_1;
        public static String MainWin_2;
        public static String MainWin_1;
+       public static String MainWin_10;
        public static String MainWin_12;
        public static String MainWin_15;
        public static String MainWin_18;
        public static String MainWin_12;
        public static String MainWin_15;
        public static String MainWin_18;
@@ -14,10 +16,12 @@ public class Messages extends NLS {
        public static String MainWin_25;
        public static String MainWin_26;
        public static String MainWin_27;
        public static String MainWin_25;
        public static String MainWin_26;
        public static String MainWin_27;
+       public static String MainWin_3;
        public static String MainWin_32;
        public static String MainWin_33;
        public static String MainWin_34;
        public static String MainWin_39;
        public static String MainWin_32;
        public static String MainWin_33;
        public static String MainWin_34;
        public static String MainWin_39;
+       public static String MainWin_4;
        public static String MainWin_40;
        public static String MainWin_41;
        public static String MainWin_42;
        public static String MainWin_40;
        public static String MainWin_41;
        public static String MainWin_42;
@@ -25,11 +29,14 @@ public class Messages extends NLS {
        public static String MainWin_44;
        public static String MainWin_45;
        public static String MainWin_47;
        public static String MainWin_44;
        public static String MainWin_45;
        public static String MainWin_47;
+       public static String MainWin_5;
        public static String MainWin_52;
        public static String MainWin_53;
        public static String MainWin_54;
        public static String MainWin_52;
        public static String MainWin_53;
        public static String MainWin_54;
+       public static String MainWin_6;
        public static String MainWin_7;
        public static String MainWin_8;
        public static String MainWin_7;
        public static String MainWin_8;
+       public static String MainWin_9;
        public static String NewAccountDialog_0;
        public static String NewAccountDialog_1;
        public static String NewAccountDialog_10;
        public static String NewAccountDialog_0;
        public static String NewAccountDialog_1;
        public static String NewAccountDialog_10;
@@ -69,6 +76,7 @@ public class Messages extends NLS {
        public static String NewAccountDialog_42;
        public static String NewAccountDialog_43;
        public static String NewAccountDialog_44;
        public static String NewAccountDialog_42;
        public static String NewAccountDialog_43;
        public static String NewAccountDialog_44;
+       public static String NewAccountDialog_45;
        public static String NewAccountDialog_47;
        public static String NewAccountDialog_48;
        public static String NewAccountDialog_49;
        public static String NewAccountDialog_47;
        public static String NewAccountDialog_48;
        public static String NewAccountDialog_49;
@@ -141,6 +149,11 @@ public class Messages extends NLS {
        public static String TriggerDialog_8;
        public static String TriggerDialog_9;
        public static String MainWin_btnByAccountId_text;
        public static String TriggerDialog_8;
        public static String TriggerDialog_9;
        public static String MainWin_btnByAccountId_text;
+       public static String MainWin_tbtmSettings_text;
+       public static String MainWin_btnCheckForUpdates_text;
+       public static String MainWin_btnShowAccountId_text;
+       public static String MainWin_btnShowaccountsReady_text;
+       public static String NewAccountDialog_btnNoSpecialSymbols_text;
        static {
                // initialize resource bundle
                NLS.initializeMessages(BUNDLE_NAME, Messages.class);
        static {
                // initialize resource bundle
                NLS.initializeMessages(BUNDLE_NAME, Messages.class);
index a304b28..cfc70a7 100644 (file)
@@ -32,15 +32,17 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        private Text txtSpecials;
        
        private enum FkNewAccStep { NAMES, PASSTYPE, PASS_MAN, PASS_AUT, SEPERATOR, REVIEW, CLICKBTN, SAVING };
        private Text txtSpecials;
        
        private enum FkNewAccStep { NAMES, PASSTYPE, PASS_MAN, PASS_AUT, SEPERATOR, REVIEW, CLICKBTN, SAVING };
+       private enum FkNewAccAutoSpecials { ALL, SELECTED, NONE };
        
        private String strAccountName = ""; //$NON-NLS-1$
        private String strUserName = ""; //$NON-NLS-1$
        private String strPassword = ""; //$NON-NLS-1$
        private String autoPassSpecials = "!@#,.-_()"; //$NON-NLS-1$
        
        private String strAccountName = ""; //$NON-NLS-1$
        private String strUserName = ""; //$NON-NLS-1$
        private String strPassword = ""; //$NON-NLS-1$
        private String autoPassSpecials = "!@#,.-_()"; //$NON-NLS-1$
+       private FkNewAccAutoSpecials allowedAutoSpecials = FkNewAccAutoSpecials.ALL;
        private Boolean autoPassword = true;
        private Boolean autoPassword = true;
-       private Boolean autoPassAllSpecials = true;
        private int autoPassLen = 16;
        private Boolean seperatorTab=true;
        private int autoPassLen = 16;
        private Boolean seperatorTab=true;
+       private Button btnManPassBack;
 
        //NamePage
        Button btnNext0;
 
        //NamePage
        Button btnNext0;
@@ -58,6 +60,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        
        //Autopass
        Button radAllSymbols;
        
        //Autopass
        Button radAllSymbols;
+       Button radOnlySelected;
        Spinner spnLen;
        
        //Seperator
        Spinner spnLen;
        
        //Seperator
@@ -219,7 +222,8 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                txtAccountName.setText( strAccountName );
 
         Control[] controls = new Control[] { txtAccountName, txtUserName, btnNext0, btnCancel };
                txtAccountName.setText( strAccountName );
 
         Control[] controls = new Control[] { txtAccountName, txtUserName, btnNext0, btnCancel };
-        composite.setTabList(controls);                
+        composite.setTabList(controls);
+        txtAccountName.setFocus();
                
        }
        
                
        }
        
@@ -314,7 +318,15 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        
        void autoPassPageSaveValues()
        {
        
        void autoPassPageSaveValues()
        {
-               autoPassAllSpecials = radAllSymbols.getSelection();
+               if( radAllSymbols.getSelection() )
+               {
+                       allowedAutoSpecials = FkNewAccAutoSpecials.ALL;
+               } else if( radOnlySelected.getSelection() )
+               {
+                       allowedAutoSpecials = FkNewAccAutoSpecials.SELECTED;
+               } else {
+                       allowedAutoSpecials = FkNewAccAutoSpecials.NONE;
+               }
                autoPassSpecials = txtSpecials.getText();
                autoPassLen = spnLen.getSelection();            
        }
                autoPassSpecials = txtSpecials.getText();
                autoPassLen = spnLen.getSelection();            
        }
@@ -362,27 +374,29 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                fd_radAllSymbols.top = new FormAttachment(lblASafePassword, 6);
                fd_radAllSymbols.left = new FormAttachment(0, 10);
                radAllSymbols.setLayoutData(fd_radAllSymbols);
                fd_radAllSymbols.top = new FormAttachment(lblASafePassword, 6);
                fd_radAllSymbols.left = new FormAttachment(0, 10);
                radAllSymbols.setLayoutData(fd_radAllSymbols);
-               if( autoPassAllSpecials )
+               if( allowedAutoSpecials == FkNewAccAutoSpecials.ALL )
                {
                        radAllSymbols.setSelection(true);
                }
                radAllSymbols.setText(Messages.NewAccountDialog_18);
                radAllSymbols.pack();
                
                {
                        radAllSymbols.setSelection(true);
                }
                radAllSymbols.setText(Messages.NewAccountDialog_18);
                radAllSymbols.pack();
                
-               Button radOnlySelected = new Button(composite, SWT.RADIO);
+               radOnlySelected = new Button(composite, SWT.RADIO);
                FormData fd_radOnlySelected = new FormData();
                FormData fd_radOnlySelected = new FormData();
-               fd_radOnlySelected.bottom = new FormAttachment(radAllSymbols, 0, SWT.BOTTOM);
-               fd_radOnlySelected.right = new FormAttachment(spnLen, 0, SWT.RIGHT);
+               fd_radOnlySelected.top = new FormAttachment(lblASafePassword, 6);
+               fd_radOnlySelected.left = new FormAttachment(lblPasswordLength, 0, SWT.LEFT);
                radOnlySelected.setLayoutData(fd_radOnlySelected);
                radOnlySelected.setLayoutData(fd_radOnlySelected);
-               if( !autoPassAllSpecials )
+               if( allowedAutoSpecials == FkNewAccAutoSpecials.SELECTED )
                {
                        radOnlySelected.setSelection(true);
                }
                radOnlySelected.setText(Messages.NewAccountDialog_19);
                
                {
                        radOnlySelected.setSelection(true);
                }
                radOnlySelected.setText(Messages.NewAccountDialog_19);
                
+               
+               
                txtSpecials = new Text(composite, SWT.BORDER);
                FormData fd_txtSpecials = new FormData();
                txtSpecials = new Text(composite, SWT.BORDER);
                FormData fd_txtSpecials = new FormData();
-               fd_txtSpecials.top = new FormAttachment(lblASafePassword, 6);
+               fd_txtSpecials.bottom = new FormAttachment(radAllSymbols, 0, SWT.BOTTOM);
                fd_txtSpecials.left = new FormAttachment(radOnlySelected, 6);
                txtSpecials.setLayoutData(fd_txtSpecials);
                txtSpecials.setText(autoPassSpecials);
                fd_txtSpecials.left = new FormAttachment(radOnlySelected, 6);
                txtSpecials.setLayoutData(fd_txtSpecials);
                txtSpecials.setText(autoPassSpecials);
@@ -431,10 +445,24 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                });
                
                
                });
                
                
-        Control[] controls = new Control[] { spnLen, radAllSymbols, radOnlySelected, button_6, button_5 };
+        
+        Button radNoSpecialSymbols = new Button(composite, SWT.RADIO);
+        FormData fd_radNoSpecialSymbols = new FormData();
+        fd_radNoSpecialSymbols.top = new FormAttachment(lblASafePassword, 6);
+        fd_radNoSpecialSymbols.left = new FormAttachment(txtSpecials, 57);
+        radNoSpecialSymbols.setLayoutData(fd_radNoSpecialSymbols);
+        radNoSpecialSymbols.setText(Messages.NewAccountDialog_btnNoSpecialSymbols_text);
+               if( allowedAutoSpecials == FkNewAccAutoSpecials.NONE )
+               {
+                       radNoSpecialSymbols.setSelection(true);
+               }        
+        
+
+               Control[] controls = new Control[] { spnLen, radAllSymbols, radOnlySelected, radNoSpecialSymbols, button_6, button_5 };
         composite.setTabList(controls);                        
                spnLen.setFocus();
 
         composite.setTabList(controls);                        
                spnLen.setFocus();
 
+               
        }
        
        
        }
        
        
@@ -462,40 +490,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                        }
                });
                
                        }
                });
                
-               chkShowPsw = new Button(composite, SWT.CHECK);
-               FormData fd_chkShowPsw = new FormData();
-               fd_chkShowPsw.right = new FormAttachment(0, 613);
-               fd_chkShowPsw.top = new FormAttachment(0, 103);
-               fd_chkShowPsw.left = new FormAttachment(0, 92);
-               chkShowPsw.setLayoutData(fd_chkShowPsw);
-               chkShowPsw.setText(Messages.NewAccountDialog_22);
-               chkShowPsw.setSelection(showPsw);
-               
-               chkShowPsw.addSelectionListener( new SelectionListener() {
-
-                       @Override
-                       public void widgetSelected(SelectionEvent arg0) {
-                               Button btnChk = (Button)arg0.getSource();
 
 
-                               txtManPSW.dispose();
-                               
-                               
-                               if( btnChk.getSelection() )
-                               {
-                                       chkShowPsw.dispose();
-                                       makePswField(true);
-                               } else {
-                                       chkShowPsw.dispose();
-                                       makePswField(false);
-                               }
-                               
-                               
-                       }
-                       
-                       @Override
-                       public void widgetDefaultSelected(SelectionEvent arg0) {
-                       }
-               });             
                composite.layout();
        }
        
                composite.layout();
        }
        
@@ -505,13 +500,13 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
        {
                composite = new Composite(shlNewAccount, SWT.NONE);
                composite.setLayout(new FormLayout());
        {
                composite = new Composite(shlNewAccount, SWT.NONE);
                composite.setLayout(new FormLayout());
-               
-               Button BtnBack1 = new Button(composite, SWT.NONE);
+
+               btnManPassBack = new Button(composite, SWT.NONE);
                FormData fd_BtnBack1 = new FormData();
                fd_BtnBack1.bottom = new FormAttachment(100, -10);
                FormData fd_BtnBack1 = new FormData();
                fd_BtnBack1.bottom = new FormAttachment(100, -10);
-               BtnBack1.setLayoutData(fd_BtnBack1);
-               BtnBack1.setText(Messages.NewAccountDialog_23);
-               BtnBack1.addSelectionListener( new SelectionListener() {
+               btnManPassBack.setLayoutData(fd_BtnBack1);
+               btnManPassBack.setText(Messages.NewAccountDialog_23);
+               btnManPassBack.addSelectionListener( new SelectionListener() {
                        
                        @Override
                        public void widgetSelected(SelectionEvent arg0) {
                        
                        @Override
                        public void widgetSelected(SelectionEvent arg0) {
@@ -526,11 +521,11 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                
                btnManPassPageNext = new Button(composite, SWT.NONE);
                FormData fd_btnManPassPageNext = new FormData();
                
                btnManPassPageNext = new Button(composite, SWT.NONE);
                FormData fd_btnManPassPageNext = new FormData();
-               fd_btnManPassPageNext.top = new FormAttachment(BtnBack1, 0, SWT.TOP);
+               fd_btnManPassPageNext.top = new FormAttachment(btnManPassBack, 0, SWT.TOP);
                fd_btnManPassPageNext.right = new FormAttachment(100, -10);
                btnManPassPageNext.setLayoutData(fd_btnManPassPageNext);
                btnManPassPageNext.setText(Messages.NewAccountDialog_24);
                fd_btnManPassPageNext.right = new FormAttachment(100, -10);
                btnManPassPageNext.setLayoutData(fd_btnManPassPageNext);
                btnManPassPageNext.setText(Messages.NewAccountDialog_24);
-               btnManPassPageNext.setVisible(false);
+               
                btnManPassPageNext.addSelectionListener( new SelectionListener() {
                        
                        @Override
                btnManPassPageNext.addSelectionListener( new SelectionListener() {
                        
                        @Override
@@ -554,17 +549,44 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                
                lblPassword = new Label(composite, SWT.NONE);
                FormData fd_lblPassword = new FormData();
                
                lblPassword = new Label(composite, SWT.NONE);
                FormData fd_lblPassword = new FormData();
-               fd_lblPassword.top = new FormAttachment(0, 74);
+               fd_lblPassword.top = new FormAttachment(0, 62);
                fd_lblPassword.left = new FormAttachment(0, 10);
                lblPassword.setLayoutData(fd_lblPassword);
                lblPassword.setText(Messages.NewAccountDialog_26);
                
                makePswField(false);
                fd_lblPassword.left = new FormAttachment(0, 10);
                lblPassword.setLayoutData(fd_lblPassword);
                lblPassword.setText(Messages.NewAccountDialog_26);
                
                makePswField(false);
+
+               chkShowPsw = new Button(composite, SWT.CHECK);
+               FormData fd_chkShowPsw = new FormData();
+               fd_chkShowPsw.right = new FormAttachment(0, 613);
+               fd_chkShowPsw.top = new FormAttachment(0, 103);
+               fd_chkShowPsw.left = new FormAttachment(0, 92);
+               chkShowPsw.setLayoutData(fd_chkShowPsw);
+               chkShowPsw.setText(Messages.NewAccountDialog_22);
+               chkShowPsw.setSelection(false);
                
                
+               chkShowPsw.addSelectionListener( new SelectionListener() {
+
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               Button btnChk = (Button)arg0.getSource();
+
+                               txtManPSW.dispose();
+                               
+                               makePswField(btnChk.getSelection());
+                       Control[] controls = new Control[] { txtManPSW, chkShowPsw, btnManPassPageNext, btnManPassBack };
+                       composite.setTabList(controls);                                 
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {
+                       }
+               });             
                
                
-        Control[] controls = new Control[] { txtManPSW, btnManPassPageNext, BtnBack1 };
+        Control[] controls = new Control[] { txtManPSW, chkShowPsw, btnManPassPageNext, btnManPassBack };
         composite.setTabList(controls);        
         txtManPSW.setFocus();
         composite.setTabList(controls);        
         txtManPSW.setFocus();
+        btnManPassPageNext.setVisible( (txtManPSW.getText().length() > 0) );
                
        }
        
                
        }
        
@@ -748,7 +770,16 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                                dialog.setText(Messages.NewAccountDialog_40);
                                dialog.setMessage(Messages.NewAccountDialog_41);
                                dialog.open();
                                dialog.setText(Messages.NewAccountDialog_40);
                                dialog.setMessage(Messages.NewAccountDialog_41);
                                dialog.open();
-                               FkManager.getInstance().createAccount( strAccountName, strUserName, autoPassword, autoPassLen, autoPassAllSpecials, autoPassSpecials, strPassword, seperatorTab, mySelf );
+                               
+                               //In case of automatic password the
+                               //FkManager takes a boolean after AutoPassLen telling if it should use all specials (true) or only those from the string in the next argument (autoPassSpecials) (false) 
+                               //If then the no-specials radiobutton is selected, remove content of that string such that no specials are selected
+                               if( allowedAutoSpecials == FkNewAccAutoSpecials.NONE)
+                               {
+                                       autoPassSpecials = ""; //$NON-NLS-1$
+                               }
+                               
+                               FkManager.getInstance().createAccount( strAccountName, strUserName, autoPassword, autoPassLen, (allowedAutoSpecials == FkNewAccAutoSpecials.ALL), autoPassSpecials, strPassword, seperatorTab, mySelf );
                                updatePage(FkNewAccStep.SAVING);
                        }
                        
                                updatePage(FkNewAccStep.SAVING);
                        }
                        
@@ -786,11 +817,14 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                if( autoPassword )
                {
                        passInfo = Messages.NewAccountDialog_42 + autoPassLen + Messages.NewAccountDialog_43;
                if( autoPassword )
                {
                        passInfo = Messages.NewAccountDialog_42 + autoPassLen + Messages.NewAccountDialog_43;
-                       if( autoPassAllSpecials )
+                       if( allowedAutoSpecials == FkNewAccAutoSpecials.ALL )
                        {
                                passInfo += Messages.NewAccountDialog_44;
                        {
                                passInfo += Messages.NewAccountDialog_44;
-                       } else {
+                       } else if( allowedAutoSpecials == FkNewAccAutoSpecials.SELECTED )
+                       {
                                passInfo += "{"+autoPassSpecials+ "}"; //$NON-NLS-1$ //$NON-NLS-2$
                                passInfo += "{"+autoPassSpecials+ "}"; //$NON-NLS-1$ //$NON-NLS-2$
+                       } else {
+                               passInfo += Messages.NewAccountDialog_45;
                        }
                        
                } else {
                        }
                        
                } else {
@@ -817,7 +851,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                lblSeperatorInfo.setText(sepInfo);
                
         Control[] controls = new Control[] { btnSave, button_9 };
                lblSeperatorInfo.setText(sepInfo);
                
         Control[] controls = new Control[] { btnSave, button_9 };
-        composite.setTabList(controls);                                
+        composite.setTabList(controls);        
 
        }
        
 
        }
        
@@ -895,12 +929,7 @@ public class NewAccountDialog extends Dialog implements FkActionEventListener {
                shlNewAccount.setSize(625, 394);
                shlNewAccount.setText(Messages.NewAccountDialog_54);
                shlNewAccount.setLayout(new FillLayout(SWT.HORIZONTAL));
                shlNewAccount.setSize(625, 394);
                shlNewAccount.setText(Messages.NewAccountDialog_54);
                shlNewAccount.setLayout(new FillLayout(SWT.HORIZONTAL));
-               
-       //      TabFolder tabFolder = new TabFolder(shell, SWT.NONE);
-               
-               //TabItem tbtmStepUsername = new TabItem(tabFolder, SWT.NONE);
-               //tbtmStepUsername.setText("Name");
-               
+                               
                updatePage(FkNewAccStep.NAMES);
 
        }
                updatePage(FkNewAccStep.NAMES);
 
        }
index acffe9b..3d08a9e 100644 (file)
@@ -1,6 +1,7 @@
 package fkgui;
 
 import org.eclipse.swt.graphics.Point;
 package fkgui;
 
 import org.eclipse.swt.graphics.Point;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Dialog;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.MessageBox;
 import org.eclipse.swt.widgets.Dialog;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.MessageBox;
@@ -24,7 +25,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
        private Account account;
        public TriggerDialog mySelf;
        private FormData fd_grpChange;
        private Account account;
        public TriggerDialog mySelf;
        private FormData fd_grpChange;
-       private Group grpMakeFinalKey;
+       private Group grpUseAccount;
        private Group grpChange;
        ConsoleMsg delegate;
        PermitCountDownDialog permitCountdownDialog = null;
        private Group grpChange;
        ConsoleMsg delegate;
        PermitCountDownDialog permitCountdownDialog = null;
@@ -37,7 +38,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                super(parent, style);
                account = a;
                delegate = d;
                super(parent, style);
                account = a;
                delegate = d;
-               setText(Messages.TriggerDialog_0+ account.name);
+               setText(account.name);
        }
 
        /**
        }
 
        /**
@@ -80,17 +81,17 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                shell.setText(getText());
                shell.setLayout(new FormLayout());
                mySelf = this;
                shell.setText(getText());
                shell.setLayout(new FormLayout());
                mySelf = this;
-               grpMakeFinalKey = new Group(shell, SWT.NONE);
-               grpMakeFinalKey.setLayout(new FormLayout());
+               grpUseAccount = new Group(shell, SWT.NONE);
+               grpUseAccount.setLayout(new FormLayout());
                FormData fd_grpMakeFinalKey = new FormData();
                fd_grpMakeFinalKey.top = new FormAttachment(0, 10);
                fd_grpMakeFinalKey.bottom = new FormAttachment(0, 88);
                fd_grpMakeFinalKey.left = new FormAttachment(0, 10);
                fd_grpMakeFinalKey.right = new FormAttachment(100, -10);
                FormData fd_grpMakeFinalKey = new FormData();
                fd_grpMakeFinalKey.top = new FormAttachment(0, 10);
                fd_grpMakeFinalKey.bottom = new FormAttachment(0, 88);
                fd_grpMakeFinalKey.left = new FormAttachment(0, 10);
                fd_grpMakeFinalKey.right = new FormAttachment(100, -10);
-               grpMakeFinalKey.setLayoutData(fd_grpMakeFinalKey);
-               grpMakeFinalKey.setText(Messages.TriggerDialog_2 + account.name);
+               grpUseAccount.setLayoutData(fd_grpMakeFinalKey);
+               grpUseAccount.setText(Messages.TriggerDialog_2);
                
                
-               Button btnUsernamePassword = new Button(grpMakeFinalKey, SWT.NONE);
+               Button btnUsernamePassword = new Button(grpUseAccount, SWT.NONE);
                btnUsernamePassword.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                btnUsernamePassword.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
@@ -111,33 +112,39 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
 
                btnUsernamePassword.setText(Messages.TriggerDialog_6);
                
 
                btnUsernamePassword.setText(Messages.TriggerDialog_6);
                
-               Button btnUsernameOnly = new Button(grpMakeFinalKey, SWT.NONE);
+               Button btnUsernameOnly = new Button(grpUseAccount, SWT.CENTER);
                btnUsernameOnly.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                FkManager.getInstance().trig(account, 'u', mySelf);
                                permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_7, Messages.TriggerDialog_8, 30000);
                btnUsernameOnly.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                FkManager.getInstance().trig(account, 'u', mySelf);
                                permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_7, Messages.TriggerDialog_8, 30000);
-                               //shell.setMinimized(true);
-                               shell.setEnabled(false); //Fisk
+                               shell.setEnabled(false);
                                permitCountdownDialog.open();
                        }
                });
                btnUsernameOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/user.png")); //$NON-NLS-1$
                FormData fd_btnUsernameOnly = new FormData();
                                permitCountdownDialog.open();
                        }
                });
                btnUsernameOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/user.png")); //$NON-NLS-1$
                FormData fd_btnUsernameOnly = new FormData();
-               fd_btnUsernameOnly.bottom = new FormAttachment(100, -15);
-               fd_btnUsernameOnly.top = new FormAttachment(0, 10);
-               fd_btnUsernameOnly.left = new FormAttachment(btnUsernamePassword);
+               fd_btnUsernameOnly.left = new FormAttachment(btnUsernamePassword, 6);
+               fd_btnUsernameOnly.bottom = new FormAttachment(btnUsernamePassword, 0, SWT.BOTTOM);
+               fd_btnUsernameOnly.top = new FormAttachment(btnUsernamePassword, 0, SWT.TOP);
                btnUsernameOnly.setLayoutData(fd_btnUsernameOnly);
                btnUsernameOnly.setLayoutData(fd_btnUsernameOnly);
-
                btnUsernameOnly.setText(Messages.TriggerDialog_10);
                btnUsernameOnly.setText(Messages.TriggerDialog_10);
+
                
                
-               Button btnPasswordOnly = new Button(grpMakeFinalKey, SWT.NONE);
-               fd_btnUsernameOnly.right = new FormAttachment(btnPasswordOnly, -29);
+               Button btnPasswordOnly = new Button(grpUseAccount, SWT.NONE);
+               fd_btnUsernameOnly.right = new FormAttachment(btnPasswordOnly, -6);
+               btnPasswordOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/key-icon.png")); //$NON-NLS-1$
+               FormData fd_btnPasswordOnly = new FormData();
+               fd_btnPasswordOnly.top = new FormAttachment(btnUsernamePassword, 0, SWT.TOP);
+               fd_btnPasswordOnly.right = new FormAttachment(100, -10);
+               fd_btnPasswordOnly.left = new FormAttachment(100, -243);
+               fd_btnPasswordOnly.bottom = new FormAttachment( btnUsernameOnly,0, SWT.BOTTOM);
+               btnPasswordOnly.setLayoutData(fd_btnPasswordOnly);
                btnPasswordOnly.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                FkManager.getInstance().trig(account, 'p', mySelf);
                btnPasswordOnly.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
                                FkManager.getInstance().trig(account, 'p', mySelf);
-                               
+
                                permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_11, Messages.TriggerDialog_12, 30000);
 
                                //shell.setMinimized(true);
                                permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + Messages.TriggerDialog_11, Messages.TriggerDialog_12, 30000);
 
                                //shell.setMinimized(true);
@@ -145,25 +152,20 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                permitCountdownDialog.open();
                        }
                });
                                permitCountdownDialog.open();
                        }
                });
-               btnPasswordOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/key-icon.png")); //$NON-NLS-1$
-               FormData fd_btnPasswordOnly = new FormData();
-               fd_btnPasswordOnly.bottom = new FormAttachment(100, -15);
-               fd_btnPasswordOnly.top = new FormAttachment(0, 10);
-               fd_btnPasswordOnly.left = new FormAttachment(0, 431);
-               fd_btnPasswordOnly.right = new FormAttachment(100, -21);
-               btnPasswordOnly.setLayoutData(fd_btnPasswordOnly);
+               
 
                btnPasswordOnly.setText(Messages.TriggerDialog_14);
 
                btnPasswordOnly.setText(Messages.TriggerDialog_14);
-                               
+               //btnPasswordOnly.getShell().layout();
+               
                                grpChange = new Group(shell, SWT.NONE);
                                grpChange = new Group(shell, SWT.NONE);
-                               grpChange.setText(Messages.TriggerDialog_15+account.name);
+                               grpChange.setText(Messages.TriggerDialog_15);
                                grpChange.setLayout(new FormLayout());
                                fd_grpChange = new FormData();
                                grpChange.setLayout(new FormLayout());
                                fd_grpChange = new FormData();
-                               fd_grpChange.left = new FormAttachment(grpMakeFinalKey, 353, SWT.LEFT);
-                               fd_grpChange.right = new FormAttachment(grpMakeFinalKey, 0, SWT.RIGHT);
-                               fd_grpChange.top = new FormAttachment(grpMakeFinalKey, 6);
+                               fd_grpChange.left = new FormAttachment(grpUseAccount, 353, SWT.LEFT);
+                               fd_grpChange.right = new FormAttachment(grpUseAccount, 0, SWT.RIGHT);
+                               fd_grpChange.top = new FormAttachment(grpUseAccount, 6);
                                grpChange.setLayoutData(fd_grpChange);
                                grpChange.setLayoutData(fd_grpChange);
-                               
+
                                Button btnEdit = new Button(grpChange, SWT.NONE);
                                btnEdit.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/gtk_edit.png")); //$NON-NLS-1$
                                FormData fd_btnEdit = new FormData();
                                Button btnEdit = new Button(grpChange, SWT.NONE);
                                btnEdit.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/gtk_edit.png")); //$NON-NLS-1$
                                FormData fd_btnEdit = new FormData();
@@ -190,16 +192,13 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                                        FkManager.getInstance().trig(account, 'd', mySelf);
                                                        shell.setEnabled(false); //Fisk
                                                        permitCountdownDialog.open();
                                                        FkManager.getInstance().trig(account, 'd', mySelf);
                                                        shell.setEnabled(false); //Fisk
                                                        permitCountdownDialog.open();
-                                                       
-                                                       
-
                                                }
                                        }
                                });
                                btnDelete.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/trashdelete.gif")); //$NON-NLS-1$
                                FormData fd_btnDelete = new FormData();
                                                }
                                        }
                                });
                                btnDelete.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/trashdelete.gif")); //$NON-NLS-1$
                                FormData fd_btnDelete = new FormData();
-                               fd_btnDelete.bottom = new FormAttachment(100, -20);
-                               fd_btnDelete.top = new FormAttachment(0, 10);
+                               fd_btnDelete.bottom = new FormAttachment(btnEdit, 0, SWT.BOTTOM);
+                               fd_btnDelete.top = new FormAttachment(btnEdit, 0, SWT.TOP);
                                fd_btnDelete.right = new FormAttachment(100, -16);
                                fd_btnDelete.left = new FormAttachment(btnEdit, 10);
                                btnDelete.setLayoutData(fd_btnDelete);
                                fd_btnDelete.right = new FormAttachment(100, -16);
                                fd_btnDelete.left = new FormAttachment(btnEdit, 10);
                                btnDelete.setLayoutData(fd_btnDelete);
@@ -209,9 +208,9 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                fd_grpChange.bottom = new FormAttachment(btnCancel, -6);
                                btnCancel.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/Delete.png")); //$NON-NLS-1$
                                FormData fd_btnCancel = new FormData();
                                fd_grpChange.bottom = new FormAttachment(btnCancel, -6);
                                btnCancel.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/Delete.png")); //$NON-NLS-1$
                                FormData fd_btnCancel = new FormData();
-                               fd_btnCancel.left = new FormAttachment(grpMakeFinalKey, 0, SWT.LEFT);
+                               fd_btnCancel.left = new FormAttachment(grpUseAccount, 0, SWT.LEFT);
                                fd_btnCancel.bottom = new FormAttachment(100, -10);
                                fd_btnCancel.bottom = new FormAttachment(100, -10);
-                               fd_btnCancel.right = new FormAttachment(grpMakeFinalKey, 2, SWT.RIGHT);
+                               fd_btnCancel.right = new FormAttachment(grpUseAccount, 0, SWT.RIGHT);
                                btnCancel.setLayoutData(fd_btnCancel);
                                
                                btnCancel.setText(Messages.TriggerDialog_28);
                                btnCancel.setLayoutData(fd_btnCancel);
                                
                                btnCancel.setText(Messages.TriggerDialog_28);
@@ -222,12 +221,12 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                        }
                                });                             
                                Group grpShow = new Group(shell, SWT.NONE);
                                        }
                                });                             
                                Group grpShow = new Group(shell, SWT.NONE);
-                               grpShow.setText(Messages.TriggerDialog_29+account.name);
+                               grpShow.setText(Messages.TriggerDialog_29);
                                FormData fd_grpShow = new FormData();
                                fd_grpShow.bottom = new FormAttachment(grpChange, 0, SWT.BOTTOM);
                                fd_grpShow.right = new FormAttachment(grpChange, -6);
                                FormData fd_grpShow = new FormData();
                                fd_grpShow.bottom = new FormAttachment(grpChange, 0, SWT.BOTTOM);
                                fd_grpShow.right = new FormAttachment(grpChange, -6);
-                               fd_grpShow.left = new FormAttachment(grpMakeFinalKey, 0, SWT.LEFT);
-                               fd_grpShow.top = new FormAttachment(grpMakeFinalKey, 6);
+                               fd_grpShow.left = new FormAttachment(grpUseAccount, 0, SWT.LEFT);
+                               fd_grpShow.top = new FormAttachment(grpUseAccount, 6);
                                grpShow.setLayoutData(fd_grpShow);
                                
                                Button btnShowUsername = new Button(grpShow, SWT.NONE);
                                grpShow.setLayoutData(fd_grpShow);
                                
                                Button btnShowUsername = new Button(grpShow, SWT.NONE);
@@ -247,6 +246,9 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                btnShowUsername.setText(Messages.TriggerDialog_33);                             
                                
 
                                btnShowUsername.setText(Messages.TriggerDialog_33);                             
                                
 
+                       Control[] controls = new Control[] { grpUseAccount, grpShow , btnCancel, grpChange  };
+                       shell.setTabList(controls);     
+                               
        }
 
        @SuppressWarnings("incomplete-switch")
        }
 
        @SuppressWarnings("incomplete-switch")
index e3f21df..9f281f8 100644 (file)
Binary files a/src/fkgui/gfx/systray-color-blink.png and b/src/fkgui/gfx/systray-color-blink.png differ
index 64b15e4..e6d4752 100644 (file)
Binary files a/src/fkgui/gfx/systray-color.png and b/src/fkgui/gfx/systray-color.png differ
index ae62afb..2aa3508 100644 (file)
Binary files a/src/fkgui/gfx/systray-offline.png and b/src/fkgui/gfx/systray-offline.png differ
index 5814a33..46362b4 100644 (file)
@@ -1,17 +1,23 @@
+#Eclipse modern messages class
+#Mon Sep 15 04:51:55 EEST 2014
+MainWin_0=Already checking for updates...
 MainWin_1=accounts ready.
 MainWin_1=accounts ready.
-MainWin_2=account ready.
+MainWin_10=Search...
 MainWin_12=Connection
 MainWin_15=Connect
 MainWin_18=Password
 MainWin_19=Hide after connection
 MainWin_12=Connection
 MainWin_15=Connect
 MainWin_18=Password
 MainWin_19=Hide after connection
+MainWin_2=account ready.
 MainWin_22=Type your password and press connect.\n----------\n
 MainWin_25=User + Pass
 MainWin_26=User
 MainWin_27=Pass
 MainWin_22=Type your password and press connect.\n----------\n
 MainWin_25=User + Pass
 MainWin_26=User
 MainWin_27=Pass
+MainWin_3=Checking for updates is disabled.
 MainWin_32=\ of 256 free.
 MainWin_33=Final Key (Connected)
 MainWin_34=Disconnect
 MainWin_39=\ ready.
 MainWin_32=\ of 256 free.
 MainWin_33=Final Key (Connected)
 MainWin_34=Disconnect
 MainWin_39=\ ready.
+MainWin_4=Port
 MainWin_40=* Connected *
 MainWin_41=Final Key (Connecting...)
 MainWin_42=Final Key (Not connected)
 MainWin_40=* Connected *
 MainWin_41=Final Key (Connecting...)
 MainWin_42=Final Key (Not connected)
@@ -19,12 +25,19 @@ MainWin_43=Connect
 MainWin_44=* Disconnected *
 MainWin_45=Accounts
 MainWin_47=New Account
 MainWin_44=* Disconnected *
 MainWin_45=Accounts
 MainWin_47=New Account
+MainWin_5=Open Account
 MainWin_52=FinalKey GUI Version 
 MainWin_53=\ available.
 MainWin_54=There's a new version of FinalKey GUI available.\nGo to http\://cyberstalker.dk/finalkey/gui/ to download.\n\nNews\:\n
 MainWin_52=FinalKey GUI Version 
 MainWin_53=\ available.
 MainWin_54=There's a new version of FinalKey GUI available.\nGo to http\://cyberstalker.dk/finalkey/gui/ to download.\n\nNews\:\n
+MainWin_6=Hide after connection
 MainWin_7=Show FinalKey
 MainWin_8=Hide FinalKey
 MainWin_7=Show FinalKey
 MainWin_8=Hide FinalKey
+MainWin_9=Sort by account id
 MainWin_btnByAccountId_text=Sort by account id
 MainWin_btnByAccountId_text=Sort by account id
+MainWin_btnCheckForUpdates_text=Check for updates on start
+MainWin_btnShowAccountId_text=Show account id
+MainWin_btnShowaccountsReady_text=Show "Accounts Ready" status popup after connection
+MainWin_tbtmSettings_text=Settings
 NewAccountDialog_0=ERROR\: FinalKey not ready.
 NewAccountDialog_1=Account not created.
 NewAccountDialog_10=Next up\: Setting a safe password\!\nYou have two options\: Manually enter a password or to\nhave The Final Key generate a strong and random password,\nit is strongly recommended to let The Final Key generate a\nrandom password, select the longest that is allowed by the service.
 NewAccountDialog_0=ERROR\: FinalKey not ready.
 NewAccountDialog_1=Account not created.
 NewAccountDialog_10=Next up\: Setting a safe password\!\nYou have two options\: Manually enter a password or to\nhave The Final Key generate a strong and random password,\nit is strongly recommended to let The Final Key generate a\nrandom password, select the longest that is allowed by the service.
@@ -64,6 +77,7 @@ NewAccountDialog_41=When you press OK, The Final Key will start blinking, you th
 NewAccountDialog_42=Automatic, 
 NewAccountDialog_43=\ long, 
 NewAccountDialog_44=all specials
 NewAccountDialog_42=Automatic, 
 NewAccountDialog_43=\ long, 
 NewAccountDialog_44=all specials
+NewAccountDialog_45=no specials
 NewAccountDialog_47=Manual, 
 NewAccountDialog_48=\ long
 NewAccountDialog_49=Tab Key
 NewAccountDialog_47=Manual, 
 NewAccountDialog_48=\ long
 NewAccountDialog_49=Tab Key
@@ -86,6 +100,7 @@ NewAccountDialog_65=Saving...
 NewAccountDialog_7=Username\:
 NewAccountDialog_8=Cancel
 NewAccountDialog_9=Next
 NewAccountDialog_7=Username\:
 NewAccountDialog_8=Cancel
 NewAccountDialog_9=Next
+NewAccountDialog_btnNoSpecialSymbols_text=No special symbols
 PermitCountDownDialog_0=\ seconds left.
 SerialWorker_0=Trying to connect to 
 SerialWorker_1=Port opened\: 
 PermitCountDownDialog_0=\ seconds left.
 SerialWorker_0=Trying to connect to 
 SerialWorker_1=Port opened\: 
@@ -106,11 +121,11 @@ TriggerDialog_10=Username
 TriggerDialog_11=\: Ready with password
 TriggerDialog_12=Focus password field and press FinalKey Switch.\nPress and hold to cancel.
 TriggerDialog_14=Password
 TriggerDialog_11=\: Ready with password
 TriggerDialog_12=Focus password field and press FinalKey Switch.\nPress and hold to cancel.
 TriggerDialog_14=Password
-TriggerDialog_15=Change 
+TriggerDialog_15=Change account
 TriggerDialog_17=Edit
 TriggerDialog_18=WARNING\! Confirm delete 
 TriggerDialog_19=Are you sure you want to delete account 
 TriggerDialog_17=Edit
 TriggerDialog_18=WARNING\! Confirm delete 
 TriggerDialog_19=Are you sure you want to delete account 
-TriggerDialog_2=Use 
+TriggerDialog_2=Make FinalKey type account
 TriggerDialog_20=\ ?\nAccount id\: 
 TriggerDialog_21=\nIf you remove the account, it can not be recovered\!
 TriggerDialog_22=\: Confirm deletion
 TriggerDialog_20=\ ?\nAccount id\: 
 TriggerDialog_21=\nIf you remove the account, it can not be recovered\!
 TriggerDialog_22=\: Confirm deletion
@@ -118,7 +133,7 @@ TriggerDialog_23=Press button to delete
 TriggerDialog_24=.\nPress and hold to cancel.
 TriggerDialog_26=Delete
 TriggerDialog_28=Do nothing
 TriggerDialog_24=.\nPress and hold to cancel.
 TriggerDialog_26=Delete
 TriggerDialog_28=Do nothing
-TriggerDialog_29=Show 
+TriggerDialog_29=Show account 
 TriggerDialog_3=\: Ready with username and password
 TriggerDialog_30=\: Ready for display
 TriggerDialog_31=Press FinalKey Switch to show username and password.\nPress and hold to cancel.
 TriggerDialog_3=\: Ready with username and password
 TriggerDialog_30=\: Ready for display
 TriggerDialog_31=Press FinalKey Switch to show username and password.\nPress and hold to cancel.
@@ -129,9 +144,9 @@ TriggerDialog_36=An error ocurred.
 TriggerDialog_39=Account information
 TriggerDialog_4=Focus username field and press FinalKey Switch.\nPress and hold to cancel.
 TriggerDialog_40=Account deleted
 TriggerDialog_39=Account information
 TriggerDialog_4=Focus username field and press FinalKey Switch.\nPress and hold to cancel.
 TriggerDialog_40=Account deleted
-TriggerDialog_41=\ has been erased.
+TriggerDialog_41=\ has been deleted.
 TriggerDialog_5=State error.
 TriggerDialog_6=Username + Password
 TriggerDialog_7=\: Ready with username
 TriggerDialog_8=Focus username field and press FinalKey Switch.\nPress and hold to cancel.
 TriggerDialog_5=State error.
 TriggerDialog_6=Username + Password
 TriggerDialog_7=\: Ready with username
 TriggerDialog_8=Focus username field and press FinalKey Switch.\nPress and hold to cancel.
-TriggerDialog_9=FinalKey is not ready for this action, press and hold FinalKey switch until it stops blinking, then try again.
\ No newline at end of file
+TriggerDialog_9=FinalKey is not ready for this action, press and hold FinalKey switch until it stops blinking, then try again.