Likely unstable.
authorJimmy Christensen <dusted@dusted.dk>
Tue, 5 Aug 2014 01:45:46 +0000 (03:45 +0200)
committerJimmy Christensen <dusted@dusted.dk>
Tue, 5 Aug 2014 01:45:46 +0000 (03:45 +0200)
18 files changed:
src/fkgui/ConsoleMsg.java
src/fkgui/FkActionEventListener.java
src/fkgui/FkManager.java
src/fkgui/MainWin.java
src/fkgui/NewAccountDialog.java
src/fkgui/PermitCountDownDialog.java
src/fkgui/TriggerDialog.java
src/fkgui/gfx/Delete.png [new file with mode: 0644]
src/fkgui/gfx/both.png [new file with mode: 0644]
src/fkgui/gfx/finalkey.png [moved from src/fkgui/finalkey.png with 100% similarity]
src/fkgui/gfx/finalkey1.png [new file with mode: 0644]
src/fkgui/gfx/finalkey2.png [new file with mode: 0644]
src/fkgui/gfx/gtk_edit.png [new file with mode: 0644]
src/fkgui/gfx/key-icon.png [new file with mode: 0644]
src/fkgui/gfx/lightning.png [new file with mode: 0644]
src/fkgui/gfx/new.png [new file with mode: 0644]
src/fkgui/gfx/trashdelete.gif [new file with mode: 0644]
src/fkgui/gfx/user.png [new file with mode: 0644]

index b8f1eb8..47bb95d 100644 (file)
@@ -1,10 +1,9 @@
 package fkgui;
 
-import java.awt.PopupMenu;
-
 import fkgui.SerialWorker.SerialState;
 
 public interface ConsoleMsg {
        public void log(String msg);
        public void serialEvent( SerialState state );
+       public void updateAccountList();
 }
index 73a8773..67fca94 100644 (file)
@@ -7,14 +7,17 @@ public interface FkActionEventListener {
        {
                FkActionEventType type;
                public String data;
-               Account acc;
-               public FkActionEvent( FkActionEventType t, String d, Account a )
+               public Account acc;
+               public char action;
+               
+               public FkActionEvent( FkActionEventType t, String d, Account a, char act )
                {
                        data = d;
                        type = t;
                        acc=a;
+                       action=act;
                }
        }
-       public enum FkActionEventType { ACTION_ABORTED, ACTION_OKAY, ACTION_ERROR };
+       public enum FkActionEventType { ACTION_ABORTED, ACTION_OKAY, ACTION_ERROR, ACTION_WAITING, ACTION_WORKING };
        public void fkActionEvent( FkActionEvent event );
 }
index 8268c7f..e33cef5 100644 (file)
@@ -2,7 +2,12 @@ package fkgui;
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
 import java.util.Vector;
+import java.util.concurrent.ExecutionException;
 
 import javax.swing.JFrame;
 import javax.swing.JTextField;
@@ -60,6 +65,25 @@ public class FkManager implements ActionListener {
                com = sw;
        }
        
+
+       private class FkActionEventMsg implements Runnable  {
+               private FkActionEventListener delegate;
+               private FkActionEvent event;
+
+               private FkActionEventMsg(FkActionEventListener d, FkActionEventType t, String data, Account acc, char act )
+               {
+                       delegate=d;
+                       event=new FkActionEvent(t, data, acc,act) ;
+               }
+               @Override
+               public void run() {
+                       if( delegate != null )
+                       {
+                               delegate.fkActionEvent(event);
+                       }
+               }
+       }
+       
        private class TrigTask implements Runnable
        {
                private Account acc;
@@ -71,31 +95,21 @@ public class FkManager implements ActionListener {
                        action=act;
                        delegate=d;
                }
-
-               private class FkActionEventMsg implements Runnable  {
-                       private FkActionEventListener delegate;
-                       private FkActionEvent event;
-
-                       private FkActionEventMsg(FkActionEventListener d, FkActionEventType t, String data, Account acc )
-                       {
-                               delegate=d;
-                               event=new FkActionEvent(t, data, acc) ;
-                       }
-                       @Override
-                       public void run() {
-                               if( delegate != null )
-                               {
-                                       delegate.fkActionEvent(event);
-                               }
-                       }
-               }
                
                @Override
                public void run() {
+                       
+                       flushSerial();
+                       
                        if(action != '%' )
                        {
                                try
                                {
+                                       
+                                       if( action == 'd' || action == 'o' )
+                                       {
+                                               com.serialPort.writeByte((byte)'x');
+                                       }
                                        com.serialPort.writeByte((byte)action);
                                } catch( Exception ex )
                                {
@@ -106,8 +120,13 @@ public class FkManager implements ActionListener {
                        try {
                                com.serialPort.writeBytes(acc.num.toLowerCase().getBytes());
                
+                               if( action == 'd' || action == 'o' )
+                               {
+                                       com.serialPort.writeByte((byte)'y');
+                               }                               
+                               
                                try {
-                                       Thread.sleep(400);
+                                       Thread.sleep(200);
                                } catch (InterruptedException e1) {
                                        // TODO Auto-generated catch block
                                        e1.printStackTrace();
@@ -129,27 +148,29 @@ public class FkManager implements ActionListener {
                                        {
                                                msg += com.serialPort.readString();
                                                //System.out.println( msg );
-                                               if( msg.contains("[done]") )
+                                               if( msg.contains("[done]") || msg.contains("[deleted]") )
                                                {
-                                                       //System.out.println("FkManager: Action OK");;
-                                                       Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_OKAY, msg, acc) );
+                                                       if( action == 'd' )
+                                                       {
+                                                               list.remove( acc );
+                                                       }
+                                                       Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_OKAY, msg, acc, action) );
                                                        return;
                                                } else if( msg.contains("[abort]") )
                                                {
                                                        //System.out.println("FkManager: Action Abort");;
-                                                       Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, msg,acc) );
-                                                       
+                                                       Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, msg,acc,action) );
                                                        return;
                                                }
                                        }
                                }
-                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ERROR, msg,acc) );
+                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ERROR, msg,acc,action) );
 
                        } catch (Exception e1) {
                                // TODO Auto-generated catch block
                                System.out.println("TrigTask Exception:");
                                e1.printStackTrace();
-                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ERROR, "EXCEPTION",acc) );
+                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ERROR, "EXCEPTION",acc,action) );
                        }
                        
                }
@@ -166,6 +187,14 @@ public class FkManager implements ActionListener {
        public void listAddAcc(String num, String name)
        {
                list.addElement( new Account(num,name) );
+               list.sort( new Comparator<Account>() {
+
+                       @Override
+                       public int compare(Account o1, Account o2) {
+                               
+                               return o1.name.compareTo(o2.name);
+                       }
+               } );
        }
        
        public void listClear()
@@ -215,6 +244,195 @@ public class FkManager implements ActionListener {
                System.out.println("FkManager: Got current layout:" + str );
                
        }
+       
+       private class NewAccountTask implements Runnable
+       {
+               private String seq;
+               private Account acc;
+               FkActionEventListener delegate;
+               public NewAccountTask(String sequence, FkActionEventListener d, String accountName)
+               {
+                       seq=sequence;
+                       delegate=d;
+                       acc = new Account( "00", accountName );
+                       System.out.println("NewAccountTask ctor");
+               }
+               @Override
+               public void run() {
+                       System.out.println("NewAccountTask run");
+
+                       flushSerial();
+                       String data="";
+                       int timeOut;
+                       try {                   
+                       //First type x a and wait for account title
+                               
+                               com.serialPort.writeByte((byte)'x');
+                               com.serialPort.writeByte((byte)'a');
+                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_WAITING, "WAITING",acc,'A') );
+
+                               timeOut = 6000;
+                               while(timeOut > 0)
+                               {
+                                       if( com.serialPort.getInputBufferBytesCount() > 0 )
+                                       {
+                                               String in = com.serialPort.readString(); 
+                                               data += in;
+                                               System.out.println("Datain:" +in);
+                                               if( data.contains("Account Title, (0-31):") )
+                                               {
+                                                       System.out.println("Found");
+                                                       break;
+                                               }
+                                       } else {
+                                               timeOut -= 50;
+                                               Thread.sleep(50);
+                                       }
+                               }
+                               
+                               if(timeOut > 0 )
+                               {
+                                       Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_WORKING, "WORKING",acc,'A') );
+
+                                       for(int p=0; p < seq.length();p++)
+                                       {
+                                               
+                                               if( com.serialPort.getOutputBufferBytesCount() > 1 )
+                                               {
+                                                       Thread.sleep(50);
+                                               } else {
+                                                       com.serialPort.writeByte( (byte)seq.charAt(p) );
+                                                       Thread.sleep(5);
+                                                       
+                                               }
+                                               System.out.println( "Type:" + seq.charAt(p));
+                                               while( com.serialPort.getInputBufferBytesCount() > 0 )
+                                               {
+                                                       String in = com.serialPort.readString();
+                                                       data += in;
+                                                       System.out.println("Read:" + in);
+                                               }
+                                       }
+                                       System.out.println("All chars typed, waiting for [done]");
+                                       
+                                       timeOut = 30000;
+                                       while( timeOut > 0 )
+                                       {
+                                               timeOut -= 50;
+                                               Thread.sleep(50);
+                                               if( com.serialPort.getInputBufferBytesCount() > 0 )
+                                               {
+                                                       String in = com.serialPort.readString();
+                                                       System.out.println("Read>"+in);
+                                                       data += in;
+                                                       if( data.contains("[done]") )
+                                                       {
+                                                               int begin = data.lastIndexOf("[save entry ")+12;
+                                                               String subStr = data.substring(begin);
+                                                               int end = subStr.indexOf("]");
+                                                               subStr = subStr.substring(0,end);
+                                                               if( subStr.length()==1)
+                                                               {
+                                                                       subStr = "0"+subStr;
+                                                               }
+                                                               acc.num = subStr;
+                                                               listAddAcc( acc.num, acc.name);
+                                                               System.out.println("Account: "+acc.num+" " + acc.name);
+                                                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_OKAY, "DONE:"+data,acc,'A') );
+                                                               break;
+                                                       } else if( data.contains("[abort]") )
+                                                       {
+                                                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, "ERROR:"+data,null,'A') );
+                                                               break;
+                                                       }
+                                               }
+                                       }
+                                       if(timeOut < 1)
+                                       {
+                                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, "TIMEOUT1:"+data,null,'A') );
+                                       }
+                               } else {
+                                       Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ABORTED, "TIMEOUT2:"+data,null,'A') );
+                               }
+                               
+                               
+                       } catch (Exception e) {
+                               Display.getDefault().asyncExec( new FkActionEventMsg(delegate, FkActionEventListener.FkActionEventType.ACTION_ERROR, "EXCEPTION",null,'A') );
+                       }
+                       
+               }
+
+               
+       }
+
+       private void flushSerial() {
+               try {
+               Thread.sleep(10);
+               
+               while( com.serialPort.getInputBufferBytesCount()!=0 )
+               {
+                       System.out.println("Flushed "+com.serialPort.getInputBufferBytesCount()+" bytes >>>" + com.serialPort.readString() + "<<<");
+               }
+               } catch(Exception e)
+               {
+                       
+               }
+               
+       }       
+       
+       public void createAccount(String strAccountName, String strUserName,
+                       Boolean autoPassword, int autoPassLen, Boolean autoPassAllSpecials,
+                       String autoPassSpecials, String strPassword, Boolean seperatorTab,
+                       FkActionEventListener delegate) {
+                       
+                       String seq = new String();
+                       
+                       seq += strAccountName;
+                       seq += (char)13;
+                       seq     += strUserName;
+                       seq += (char)13;
+                       
+                       if( autoPassword )
+                       {
+                               seq += '2';
+                               seq += autoPassLen;
+                               seq += (char)13;
+                               if( autoPassAllSpecials )
+                               {
+                                       seq += '1';
+                               } else {
+                                       if( autoPassSpecials.length() > 0 )
+                                       {
+                                               seq += '2';
+                                               seq += autoPassSpecials;
+                                               seq += (char)13;
+                                       } else {
+                                               seq += '3';
+                                       }
+                               }
+                       } else {
+                               //Manual entered password
+                               seq += '1';
+                               seq += strPassword;
+                               seq += (char)13;
+                       }
+                       
+                       //Tab/Enter sep
+                       if( seperatorTab )
+                       {
+                               seq += '1';
+                       } else {
+                               seq += '2';
+                       }
+                       
+                       System.out.println("Seq ["+seq+"]");
+                       
+                       NewAccountTask newTask = new NewAccountTask(seq, delegate, strAccountName);
+                       new Thread(newTask).start();                    
+               
+       }
+
+
 
        
        
index 5578876..f0ac6e1 100644 (file)
@@ -9,6 +9,8 @@ import java.awt.event.ActionListener;
 import javax.swing.UIManager;
 import javax.swing.UnsupportedLookAndFeelException;
 
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.ListViewer;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -37,6 +39,7 @@ import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.layout.FormLayout;
 import org.eclipse.swt.layout.FormData;
 import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.layout.FillLayout;
 
 
 public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
@@ -73,6 +76,8 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
        public Composite cmpConnect;
        private Composite cmpAccounts;
        ListViewer lstAccounts;
+       Label lblNumFree;
+       Button btnNewAccoount;
  
        
        /**
@@ -135,23 +140,13 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
         
         try {
                        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
-               } catch (ClassNotFoundException e1) {
-                       // TODO Auto-generated catch block
+               } catch (Exception e1) {
                        e1.printStackTrace();
-               } catch (InstantiationException e1) {
-                       // TODO Auto-generated catch block
-                       e1.printStackTrace();
-               } catch (IllegalAccessException e1) {
-                       // TODO Auto-generated catch block
-                       e1.printStackTrace();
-               } catch (UnsupportedLookAndFeelException e1) {
-                       // TODO Auto-generated catch block
-                       e1.printStackTrace();
-               }
+               } 
 
         popup = new PopupMenu();
         trayIcon =
-                new TrayIcon(Toolkit.getDefaultToolkit().createImage(getClass().getResource("finalkey.png")));
+                new TrayIcon(Toolkit.getDefaultToolkit().createImage(getClass().getResource("gfx/finalkey.png")));
         trayIcon.setToolTip("The Final Key - Hardware password manager");
         trayIcon.setImageAutoSize(true);
         final SystemTray tray = SystemTray.getSystemTray();
@@ -252,7 +247,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
         */
        protected void createContents() {
                shell = new Shell();
-               shell.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/finalkey.png"));
+               shell.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey.png"));
                shell.setSize(711, 655);
                shell.setText("Final Key (Not connected)");
 
@@ -261,15 +256,9 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                
 
                mySelf = this;
-               shell.setLayout(new FormLayout());
+               shell.setLayout(new FillLayout(SWT.HORIZONTAL));
                
                tabFolder = new TabFolder(shell, SWT.NONE);
-               FormData fd_tabFolder = new FormData();
-               fd_tabFolder.bottom = new FormAttachment(0, 627);
-               fd_tabFolder.right = new FormAttachment(0, 709);
-               fd_tabFolder.top = new FormAttachment(0);
-               fd_tabFolder.left = new FormAttachment(0);
-               tabFolder.setLayoutData(fd_tabFolder);
                tabFolder.setBackground(SWTResourceManager.getColor(SWT.COLOR_WIDGET_LIGHT_SHADOW));
                
                TabItem tbtmConnection = new TabItem(tabFolder, SWT.NONE);
@@ -281,7 +270,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                
 
                btnConnect = new Button(cmpConnect, SWT.CENTER);
-               btnConnect.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/lightning.png"));
+               btnConnect.setImage( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/lightning.png") );
                FormData fd_btnConnect = new FormData();
                fd_btnConnect.left = new FormAttachment(100, -125);
                fd_btnConnect.right = new FormAttachment(100, -10);
@@ -290,6 +279,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                btnConnect.addSelectionListener(new SelectionAdapter() {
                        public void widgetSelected(SelectionEvent e) {
                                
+                               
                                if( fkSerial!=null && fkSerial.state == SerialState.Connected )
                                {
                                        fkSerial.disconnect();
@@ -314,6 +304,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                fd_txtPsw.top = new FormAttachment(0, 29);
                fd_txtPsw.left = new FormAttachment(0, 102);
                txtPsw.setLayoutData(fd_txtPsw);
+               txtPsw.setFocus();
                
                txtLog = new Text(cmpConnect, SWT.BORDER | SWT.V_SCROLL | SWT.MULTI);
                FormData fd_txtLog = new FormData();
@@ -371,12 +362,9 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
 
 
                
-               
-
-               
                animation.setVisible(false);
-               animation.addFrame( SWTResourceManager.getImage("/home/dusted/Downloads/finalkey1.png") );
-               animation.addFrame( SWTResourceManager.getImage("/home/dusted/Downloads/finalkey2.png") );
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") );
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") );
                animation.setPlaying(false);
                cmpConnect.setTabList(new Control[]{txtPsw, btnConnect});
                
@@ -388,6 +376,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                shell.addShellListener( new ShellListener() {
                        
                        public void shellIconified(ShellEvent e) {
+                               // TODO Auto-generated method stub
 
                        }
 
@@ -398,7 +387,6 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                        
                        public void shellDeactivated(ShellEvent e) {
                                // TODO Auto-generated method stub
-                               
                        }
                        
                        public void shellClosed(ShellEvent e) {
@@ -415,6 +403,51 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
 
        }
 
+       @Override
+       public void updateAccountList()
+       {
+               int free=256;
+               clearSystray();
+               lstAccounts.getList().removeAll();
+               
+               for( FkManager.Account a : FkManager.getInstance().getList() )
+               {
+                       free--;
+                       lstAccounts.add( a );
+                                                       
+                       Menu menu = new Menu(a.name+" ["+a.num+"]");
+                       MenuItem both = new MenuItem("User + Pass");
+                       MenuItem usr = new MenuItem("User");
+                       MenuItem psw = new MenuItem("Pass");
+                       menu.add(both);
+                       menu.add(usr);
+                       menu.add(psw);
+
+
+                       both.addActionListener(FkManager.getInstance());
+                       both.setActionCommand( "%"+a.num );
+
+
+
+                       psw.addActionListener(FkManager.getInstance()); 
+                       psw.setActionCommand( "p"+a.num);
+
+
+                       usr.addActionListener(FkManager.getInstance()); 
+                       usr.setActionCommand( "u"+a.num );
+
+                       popup.add(menu);
+               }
+               
+               lblNumFree.setText(" "+free+" of 256 free.");
+               if( free == 0 )
+               {
+                       btnNewAccoount.setVisible(false);
+               } else {
+                       btnNewAccoount.setVisible(true);
+               }
+               
+       }
 
        @Override
        public void serialEvent(SerialState state) {
@@ -441,35 +474,7 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                        
                        tabFolder.setSelection(1);
                        
-                       for( FkManager.Account a : FkManager.getInstance().getList() )
-                       {
-                               lstAccounts.add( a );
-                                                               
-                               Menu menu = new Menu(a.name+" ["+a.num+"]");
-                               MenuItem both = new MenuItem("User + Pass");
-                               MenuItem usr = new MenuItem("User");
-                               MenuItem psw = new MenuItem("Pass");
-                               menu.add(both);
-                               menu.add(usr);
-                               menu.add(psw);
-
-
-                               both.addActionListener(FkManager.getInstance());
-                               both.setActionCommand( "%"+a.num );
-
-
-
-                               psw.addActionListener(FkManager.getInstance()); 
-                               psw.setActionCommand( "p"+a.num);
-
-
-                               usr.addActionListener(FkManager.getInstance()); 
-                               usr.setActionCommand( "u"+a.num );
-
-                               popup.add(menu);
-                               
-                               
-                       }
+                       updateAccountList();
                        
                        
                        int numAccounts=FkManager.getInstance().getList().size();
@@ -546,11 +551,17 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                tbtmAccounts.setControl(cmpAccounts);
                cmpAccounts.setLayout(new FormLayout());
                
-               Button btnNewAccoount = new Button(cmpAccounts, SWT.NONE);
-               btnNewAccoount.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/Button New-01.png"));
+               btnNewAccoount = new Button(cmpAccounts, SWT.NONE);
+               btnNewAccoount.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/new.png"));
                btnNewAccoount.addSelectionListener(new SelectionAdapter() {
                        @Override
                        public void widgetSelected(SelectionEvent e) {
+                               NewAccountDialog dialog = new NewAccountDialog(shell, shell.getStyle() );
+                               shell.setEnabled(false);
+                               dialog.open();
+                               shell.setEnabled(true);
+                               updateAccountList();
+                               
                        }
                });
                FormData fd_btnNewAccoount = new FormData();
@@ -560,6 +571,15 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                btnNewAccoount.setLayoutData(fd_btnNewAccoount);
                btnNewAccoount.setText("New Account");
                
+               lblNumFree = new Label(cmpAccounts, SWT.NONE);
+               lblNumFree.setText("Hello World!");
+               
+               FormData fd_lblNumFree = new FormData();
+               fd_lblNumFree.left = new FormAttachment(0,0);
+               fd_lblNumFree.bottom = new FormAttachment(100,-10);
+               lblNumFree.setLayoutData(fd_lblNumFree);
+               
+               
                lstAccounts = new ListViewer(cmpAccounts, SWT.BORDER | SWT.V_SCROLL);
                FormData fd_lstAccounts = new FormData();
                fd_lstAccounts.bottom = new FormAttachment(btnNewAccoount, -6);
@@ -570,17 +590,16 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
 
                //lstAccounts.setLayoutData(fd_lstAccounts);
                lstAccounts.getControl().setLayoutData(fd_lstAccounts);
-               
-               lstAccounts.addSelectionChangedListener(new ISelectionChangedListener() {
+               lstAccounts.addDoubleClickListener( new IDoubleClickListener() {
                        
                        @Override
-                       public void selectionChanged(SelectionChangedEvent arg0) {
-
+                       public void doubleClick(DoubleClickEvent arg0) {
+                               // TODO Auto-generated method stub
                                StructuredSelection selection = (StructuredSelection) arg0.getSelection();
                                if( !selection.isEmpty() )
                                {
                                        Account acc = (Account)selection.getFirstElement();
-                                       TriggerDialog diag = new TriggerDialog(shell, shell.getStyle(), acc );
+                                       TriggerDialog diag = new TriggerDialog(shell, shell.getStyle(), acc, mySelf );
 
                                        shell.setMinimized(true);
                                        shell.setEnabled(false);
@@ -592,12 +611,13 @@ public class MainWin implements ConsoleMsg, AutoUpdaterResultListener {
                                        shell.setEnabled(true);
                                } else {
                                        System.out.println("Selected nothing.");
-                               }                               
-                               
+                               }
                                
                                
                        }
                });
+               
+               
                                
        }
 
index 67d1c41..567ef2e 100644 (file)
@@ -3,12 +3,79 @@ package fkgui;
 import org.eclipse.swt.widgets.Dialog;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.layout.FormLayout;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.widgets.TabFolder;
+import org.eclipse.swt.widgets.TabItem;
+import org.eclipse.swt.layout.FormData;
+import org.eclipse.swt.layout.FormAttachment;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.MessageBox;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.widgets.Spinner;
+import org.eclipse.wb.swt.SWTResourceManager;
 
-public class NewAccountDialog extends Dialog {
+public class NewAccountDialog extends Dialog implements FkActionEventListener {
 
        protected Object result;
-       protected Shell shell;
+       protected Shell shlNewAccount;
+       private Text txtAccountName;
+       private Text txtUserName;
+       private Text txtManPSW;
+       private Text txtSpecials;
+       
+       private enum FkNewAccStep { NAMES, PASSTYPE, PASS_MAN, PASS_AUT, SEPERATOR, REVIEW, CLICKBTN, SAVING };
+       
+       private String strAccountName = "";
+       private String strUserName = "";
+       private String strPassword = "";
+       private String autoPassSpecials = "!@#,.-_()";
+       private Boolean autoPassword = true;
+       private Boolean autoPassAllSpecials = true;
+       private int autoPassLen = 16;
+       private Boolean seperatorTab=true;
 
+       //NamePage
+       Button btnNext0;
+
+       
+       //PassType
+       Button radAutPSW;
+       Button radManPSW;
+       
+       //ManPass
+       Label lblTypeThePassword;
+       FormData fd_lblTypeThePassword; 
+       Label lblPassword;
+       FormData fd_lblPassword;
+       Button chkShowPsw;
+       Button btnManPassPageNext;
+       
+       //Autopass
+       Button radAllSymbols;
+       Spinner spnLen;
+       
+       //Seperator
+       Button radTabSep;
+       
+       //Saving
+       Label txtBUSYMSG;
+       Animation animation;
+       
+       NewAccountDialog mySelf;
+
+       
+       
+       Composite composite;
        /**
         * Create the dialog.
         * @param parent
@@ -16,7 +83,7 @@ public class NewAccountDialog extends Dialog {
         */
        public NewAccountDialog(Shell parent, int style) {
                super(parent, style);
-               setText("SWT Dialog");
+               
        }
 
        /**
@@ -25,25 +92,802 @@ public class NewAccountDialog extends Dialog {
         */
        public Object open() {
                createContents();
-               shell.open();
-               shell.layout();
+               shlNewAccount.open();
+               shlNewAccount.layout();
                Display display = getParent().getDisplay();
-               while (!shell.isDisposed()) {
+               mySelf = this;
+               while (!shlNewAccount.isDisposed()) {
                        if (!display.readAndDispatch()) {
                                display.sleep();
                        }
                }
                return result;
        }
+       
+       private void checkNamePage()
+       {
+               if( txtAccountName.getText().length() > 0 && txtUserName.getText().length() > 0 )
+               {
+                       btnNext0.setVisible(true);
+               } else {
+                       btnNext0.setVisible(false);
+               }
+       }
+
+       private void createNamePage()
+       {
+               composite = new Composite(shlNewAccount, SWT.NONE);
+       //      tbtmStepUsername.setControl(composite);
+               composite.setLayout(new FormLayout());
+               
+               
+               
+               Label lblEnterNewName = new Label(composite, SWT.NONE);
+               FormData fd_lblEnterNewName = new FormData();
+               fd_lblEnterNewName.bottom = new FormAttachment(0, 112);
+               fd_lblEnterNewName.right = new FormAttachment(0, 603);
+               fd_lblEnterNewName.top = new FormAttachment(0, 10);
+               fd_lblEnterNewName.left = new FormAttachment(0, 10);
+               lblEnterNewName.setLayoutData(fd_lblEnterNewName);
+               lblEnterNewName.setText("This creates a new account on your FinalKey.\nTo begin, choose a name for your account, for example the\nname of the website or service you want to login to.\nThis is the name that will be visible in the list of accounts.");
+               Label lblUsername = new Label(composite, SWT.NONE);
+               FormData fd_lblUsername = new FormData();
+               lblUsername.setLayoutData(fd_lblUsername);
+               lblUsername.setText("Account Name:");
+               
+               txtAccountName = new Text(composite, SWT.BORDER);
+               fd_lblUsername.bottom = new FormAttachment(txtAccountName, 0, SWT.BOTTOM);
+               fd_lblUsername.right = new FormAttachment(txtAccountName, -6);
+               FormData fd_txtAccountName = new FormData();
+               fd_txtAccountName.top = new FormAttachment(lblEnterNewName, 6);
+               fd_txtAccountName.right = new FormAttachment(100, -274);
+               fd_txtAccountName.left = new FormAttachment(0, 180);
+               txtAccountName.setLayoutData(fd_txtAccountName);
+               txtAccountName.addModifyListener( new ModifyListener() {
+                       @Override
+                       public void modifyText(ModifyEvent arg0) {
+                               checkNamePage();
+
+                       }
+               });
+               
+               Label lblNewLabel = new Label(composite, SWT.NONE);
+               FormData fd_lblNewLabel = new FormData();
+               fd_lblNewLabel.left = new FormAttachment(0, 10);
+               fd_lblNewLabel.right = new FormAttachment(100);
+               fd_lblNewLabel.top = new FormAttachment(lblUsername, 20);
+               lblNewLabel.setLayoutData(fd_lblNewLabel);
+               lblNewLabel.setText("The username is the name that The Final Key will\ntype into the service when logging in, it is typically an E-Mail address.");
+               
+               Label lblUsername_1 = new Label(composite, SWT.NONE);
+               FormData fd_lblUsername_1 = new FormData();
+               fd_lblUsername_1.top = new FormAttachment(lblNewLabel, 6);
+               fd_lblUsername_1.right = new FormAttachment(lblUsername, 0, SWT.RIGHT);
+               lblUsername_1.setLayoutData(fd_lblUsername_1);
+               lblUsername_1.setText("Username:");
+               
+               txtUserName = new Text(composite, SWT.BORDER);
+               FormData fd_txtUserName = new FormData();
+               fd_txtUserName.left = new FormAttachment(txtAccountName, 0, SWT.LEFT);
+               fd_txtUserName.right = new FormAttachment(txtAccountName, 0, SWT.RIGHT);
+               fd_txtUserName.top = new FormAttachment(lblNewLabel, 6);
+               txtUserName.setLayoutData(fd_txtUserName);
+               txtUserName.addModifyListener( new ModifyListener() {
+                       @Override
+                       public void modifyText(ModifyEvent arg0) {
+                               checkNamePage();
+                       }
+               });
+               
+               Button btnCancel = new Button(composite, SWT.NONE);
+               btnCancel.addSelectionListener(new SelectionAdapter() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               shlNewAccount.close();
+                       }
+               });
+               FormData fd_btnCancel = new FormData();
+               fd_btnCancel.bottom = new FormAttachment(100, -10);
+               fd_btnCancel.left = new FormAttachment(0, 10);
+               btnCancel.setLayoutData(fd_btnCancel);
+               btnCancel.setText("Cancel");
+               
+               btnNext0 = new Button(composite, SWT.NONE);
+               btnNext0.addSelectionListener(new SelectionAdapter() {
+                       @Override
+                       public void widgetSelected(SelectionEvent e) {
+                               strAccountName = txtAccountName.getText();
+                               strUserName = txtUserName.getText();
+                               updatePage(FkNewAccStep.PASSTYPE);
+                       }
+               });
+               btnNext0.setText("Next");
+               FormData fd_btnNext0 = new FormData();
+               fd_btnNext0.bottom = new FormAttachment(btnCancel, 0, SWT.BOTTOM);
+               fd_btnNext0.right = new FormAttachment(lblEnterNewName, 0, SWT.RIGHT);
+               btnNext0.setLayoutData(fd_btnNext0);
+               btnNext0.setVisible(false);
+               
+               txtUserName.setText( strUserName );
+               txtAccountName.setText( strAccountName );
+
+        Control[] controls = new Control[] { txtAccountName, txtUserName, btnNext0, btnCancel };
+        composite.setTabList(controls);                
+               
+       }
+       
+       
+       private void createPassTypePage()
+       {
+               composite = new Composite(shlNewAccount, SWT.NONE);
+               composite.setLayout(new FormLayout());
+               
+               Label lblNextUpSetting = new Label(composite, SWT.NONE);
+               FormData fd_lblNextUpSetting = new FormData();
+               fd_lblNextUpSetting.right = new FormAttachment(0, 603);
+               fd_lblNextUpSetting.top = new FormAttachment(0, 10);
+               fd_lblNextUpSetting.left = new FormAttachment(0, 10);
+               lblNextUpSetting.setLayoutData(fd_lblNextUpSetting);
+               lblNextUpSetting.setText("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.");
+               
+               radAutPSW = new Button(composite, SWT.RADIO);
+               if( autoPassword )
+               {
+                       radAutPSW.setSelection(true);
+               }
+               FormData fd_radAutPSW = new FormData();
+               fd_radAutPSW.top = new FormAttachment(lblNextUpSetting, 37);
+               fd_radAutPSW.left = new FormAttachment(0, 213);
+               radAutPSW.setLayoutData(fd_radAutPSW);
+               radAutPSW.setText("Automatic");
+               
+               radManPSW = new Button(composite, SWT.RADIO);
+               if( !autoPassword )
+               {
+                       radManPSW.setSelection(true);
+               }               
+               FormData fd_radManPSW = new FormData();
+               fd_radManPSW.top = new FormAttachment(radAutPSW, 6);
+               fd_radManPSW.left = new FormAttachment(radAutPSW, 0, SWT.LEFT);
+               radManPSW.setLayoutData(fd_radManPSW);
+               radManPSW.setText("Manual Entry");
+               
+               Button btnNext1 = new Button(composite, SWT.NONE);
+               btnNext1.setText("Next");
+               FormData fd_btnNext1 = new FormData();
+               fd_btnNext1.bottom = new FormAttachment(100, -10);
+               fd_btnNext1.right = new FormAttachment(100, -10);
+               btnNext1.setLayoutData(fd_btnNext1);
+               btnNext1.addSelectionListener(new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               if( radAutPSW.getSelection() )
+                               {
+                                       updatePage(FkNewAccStep.PASS_AUT);
+                                       autoPassword = true;
+                               } else {
+                                       updatePage(FkNewAccStep.PASS_MAN);
+                                       autoPassword = false;
+                               }
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {
+                               // TODO Auto-generated method stub
+                               
+                       }
+               });
+               
+               Button btnBack0 = new Button(composite, SWT.NONE);
+               btnBack0.setText("Back");
+               FormData fd_btnBack0 = new FormData();
+               fd_btnBack0.bottom = new FormAttachment(btnNext1, 0, SWT.BOTTOM);
+               fd_btnBack0.left = new FormAttachment(lblNextUpSetting, 0, SWT.LEFT);
+               btnBack0.setLayoutData(fd_btnBack0);
+               btnBack0.addSelectionListener( new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               updatePage( FkNewAccStep.NAMES );
+                               
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {
+                               // TODO Auto-generated method stub
+                               
+                       }
+               });
+               
+        Control[] controls = new Control[] { radAutPSW, radManPSW, btnNext1, btnBack0 };
+        composite.setTabList(controls);
+        radAutPSW.setFocus();
+}
+       
+       void autoPassPageSaveValues()
+       {
+               autoPassAllSpecials = radAllSymbols.getSelection();
+               autoPassSpecials = txtSpecials.getText();
+               autoPassLen = spnLen.getSelection();            
+       }
+       void createPassAutPage()
+       {
+               composite = new Composite(shlNewAccount, SWT.NONE);
+               
+               Label lblBeforeCreatingA = new Label(composite, SWT.NONE);
+               lblBeforeCreatingA.setBounds(10, 10, 593, 104);
+               lblBeforeCreatingA.setText("Before creating a password, please select how long it should be.\nA longer password is safer, but the maximum allowed length varies,\ndepending on where you're using it. For example many websites do not\nallow passwords longer than 16 characters.");
+               
+               Label lblPasswordLength = new Label(composite, SWT.NONE);
+               lblPasswordLength.setBounds(32, 132, 127, 23);
+               lblPasswordLength.setText("Password length:");
+               
+               spnLen = new Spinner(composite, SWT.BORDER);
+               spnLen.setMaximum(128);
+               spnLen.setSelection(autoPassLen);
+               spnLen.setBounds(165, 120, 62, 35);
+               
+               Label lblASafePassword = new Label(composite, SWT.NONE);
+               lblASafePassword.setBounds(10, 161, 593, 76);
+               lblASafePassword.setText("A strong password contains not only uppercase and lowercase\nletters and numbers, but also other symbols.\nIt differs which symbols are allowed, some allow all ASCII symbols.");
+               
+               radAllSymbols = new Button(composite, SWT.RADIO);
+               if( autoPassAllSpecials )
+               {
+                       radAllSymbols.setSelection(true);
+               }
+               radAllSymbols.setBounds(10, 251, 120, 27);
+               radAllSymbols.setText("All symbols");
+               
+               Button radOnlySelected = new Button(composite, SWT.RADIO);
+               if( !autoPassAllSpecials )
+               {
+                       radOnlySelected.setSelection(true);
+               }
+               radOnlySelected.setBounds(165, 251, 120, 27);
+               radOnlySelected.setText("Only these:");
+               
+               txtSpecials = new Text(composite, SWT.BORDER);
+               txtSpecials.setText(autoPassSpecials);
+               txtSpecials.setBounds(291, 243, 312, 35);
+               
+               Button button_5 = new Button(composite, SWT.NONE);
+               button_5.setText("Back");
+               button_5.setBounds(10, 288, 48, 35);
+               button_5.addSelectionListener(new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               autoPassPageSaveValues();
+                               updatePage( FkNewAccStep.PASSTYPE );
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {                                
+                       }
+               });
+               
+               Button button_6 = new Button(composite, SWT.NONE);
+               button_6.setText("Next");
+               button_6.setBounds(555, 288, 48, 35);
+               button_6.addSelectionListener(new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               autoPassPageSaveValues();
+                               updatePage( FkNewAccStep.SEPERATOR );
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {                                
+                       }
+               });
+               
+        Control[] controls = new Control[] { spnLen, radAllSymbols, radOnlySelected, button_6, button_5 };
+        composite.setTabList(controls);                        
+               spnLen.setFocus();
 
+       }
+       
+       
+       void makePswField(Boolean showPsw)
+       {
+               txtManPSW = new Text(composite, SWT.BORDER | ((showPsw)?0:SWT.PASSWORD) );
+               fd_lblPassword.bottom = new FormAttachment(txtManPSW, 0, SWT.BOTTOM);
+               FormData fd_txtManPSW = new FormData();
+               fd_txtManPSW.right = new FormAttachment(100, -10);
+               fd_txtManPSW.left = new FormAttachment(lblPassword, 6);
+               fd_txtManPSW.top = new FormAttachment(lblTypeThePassword, 6);
+               txtManPSW.setLayoutData(fd_txtManPSW);
+               txtManPSW.setText(strPassword);
+               txtManPSW.addModifyListener( new ModifyListener() {
+                       
+                       @Override
+                       public void modifyText(ModifyEvent arg0) {
+                               strPassword = txtManPSW.getText();
+                               if( txtManPSW.getText().length() > 0 )
+                               {
+                                       btnManPassPageNext.setVisible(true);
+                               } else {
+                                       btnManPassPageNext.setVisible(false);
+                               }
+                               
+                       }
+               });
+               
+               chkShowPsw = new Button(composite, SWT.CHECK);
+               FormData fd_chkShowPsw = new FormData();
+               fd_chkShowPsw.top = new FormAttachment(txtManPSW, 6);
+               fd_chkShowPsw.left = new FormAttachment(txtManPSW, 0, SWT.LEFT);
+               chkShowPsw.setLayoutData(fd_chkShowPsw);
+               chkShowPsw.setText("Show Password");
+               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();
+       }
+       
+
+       
+       void createPassManPage()
+       {
+               composite = new Composite(shlNewAccount, SWT.NONE);
+               composite.setLayout(new FormLayout());
+               
+               Button BtnBack1 = new Button(composite, SWT.NONE);
+               FormData fd_BtnBack1 = new FormData();
+               fd_BtnBack1.top = new FormAttachment(0, 288);
+               fd_BtnBack1.left = new FormAttachment(0, 10);
+               BtnBack1.setLayoutData(fd_BtnBack1);
+               BtnBack1.setText("Back");
+               BtnBack1.addSelectionListener( new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               updatePage(FkNewAccStep.PASSTYPE);
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {
+                               
+                       }
+               });
+               
+               btnManPassPageNext = new Button(composite, SWT.NONE);
+               FormData fd_button_4 = new FormData();
+               fd_button_4.top = new FormAttachment(0, 288);
+               fd_button_4.left = new FormAttachment(0, 555);
+               btnManPassPageNext.setLayoutData(fd_button_4);
+               btnManPassPageNext.setText("Next");
+               btnManPassPageNext.setVisible(false);
+               btnManPassPageNext.addSelectionListener( new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               updatePage(FkNewAccStep.SEPERATOR);
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {                                
+                       }
+               });
+               
+               lblTypeThePassword = new Label(composite, SWT.NONE);
+               fd_lblTypeThePassword = new FormData();
+               fd_lblTypeThePassword.top = new FormAttachment(0, 10);
+               fd_lblTypeThePassword.left = new FormAttachment(0, 10);
+               lblTypeThePassword.setLayoutData(fd_lblTypeThePassword);
+               lblTypeThePassword.setText("Type the password your wish to use for ACCOUNT\nIn the box below.");
+               
+               lblPassword = new Label(composite, SWT.NONE);
+               fd_lblPassword = new FormData();
+               fd_lblPassword.left = new FormAttachment(BtnBack1, 0, SWT.LEFT);
+               lblPassword.setLayoutData(fd_lblPassword);
+               lblPassword.setText("Password:");
+               
+               makePswField(false);
+               
+               
+        Control[] controls = new Control[] { txtManPSW, btnManPassPageNext, BtnBack1 };
+        composite.setTabList(controls);        
+        txtManPSW.setFocus();
+               
+       }
+       
+
+       void createSeperatorPage()
+       {
+               composite = new Composite(shlNewAccount, SWT.NONE);
+               composite.setLayout(new FormLayout());
+               
+               Label lblToMakeFinalkey = new Label(composite, SWT.NONE);
+               FormData fd_lblToMakeFinalkey = new FormData();
+               fd_lblToMakeFinalkey.top = new FormAttachment(0, 10);
+               fd_lblToMakeFinalkey.left = new FormAttachment(0, 10);
+               lblToMakeFinalkey.setLayoutData(fd_lblToMakeFinalkey);
+               lblToMakeFinalkey.setText("When you trigger the Final Key to type an account (Username + Password), it\nwill also type a \"seperation\" key, to jump from the Username input to the\nPassword input. On most websites, the \"tab\" key is used for this.\nHowever, in some applications, the \"enter\" key is used.\nHere you can select which key can be used between the username and password\nfor this account.");
+               
+               radTabSep = new Button(composite, SWT.RADIO);
+               if( seperatorTab )
+               {
+                       radTabSep.setSelection(true);
+               }
+               FormData fd_radTabSep = new FormData();
+               fd_radTabSep.top = new FormAttachment(lblToMakeFinalkey, 24);
+               fd_radTabSep.left = new FormAttachment(0, 231);
+               radTabSep.setLayoutData(fd_radTabSep);
+               radTabSep.setText("Tab");
+               
+               Button radEnterSep = new Button(composite, SWT.RADIO);
+               if( !seperatorTab )
+               {
+                       radEnterSep.setSelection(true);
+               }
+               FormData fd_radEnterSep = new FormData();
+               fd_radEnterSep.top = new FormAttachment(radTabSep, 6);
+               fd_radEnterSep.left = new FormAttachment(radTabSep, 0, SWT.LEFT);
+               radEnterSep.setLayoutData(fd_radEnterSep);
+               radEnterSep.setText("Enter");
+               
+               Button button_7 = new Button(composite, SWT.NONE);
+               button_7.setText("Back");
+               FormData fd_button_7 = new FormData();
+               fd_button_7.bottom = new FormAttachment(100, -10);
+               fd_button_7.left = new FormAttachment(0, 10);
+               button_7.setLayoutData(fd_button_7);
+               button_7.addSelectionListener(new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               seperatorTab = radTabSep.getSelection();
+                               if( autoPassword )
+                               {
+                                       updatePage(FkNewAccStep.PASS_AUT);
+                               } else {
+                                       updatePage(FkNewAccStep.PASS_MAN);
+                               }
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {
+                       }
+               });
+               
+               Button button_8 = new Button(composite, SWT.NONE);
+               button_8.setText("Next");
+               FormData fd_button_8 = new FormData();
+               fd_button_8.bottom = new FormAttachment(button_7, 0, SWT.BOTTOM);
+               fd_button_8.right = new FormAttachment(lblToMakeFinalkey, 0, SWT.RIGHT);
+               button_8.setLayoutData(fd_button_8);
+               button_8.addSelectionListener(new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               seperatorTab = radTabSep.getSelection();
+                               updatePage(FkNewAccStep.REVIEW);
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {
+                       }
+               });
+               
+
+        Control[] controls = new Control[] { radTabSep, radEnterSep, button_8, button_7 };
+        composite.setTabList(controls);                
+        radTabSep.setFocus();
+               
+       }
+       
+
+       void createReviewPage()
+       {
+               composite = new Composite(shlNewAccount, SWT.NONE);
+               composite.setLayout(new FormLayout());
+               
+               Label lblHeresAnOverview = new Label(composite, SWT.NONE);
+               FormData fd_lblHeresAnOverview = new FormData();
+               fd_lblHeresAnOverview.right = new FormAttachment(0, 603);
+               fd_lblHeresAnOverview.top = new FormAttachment(0, 10);
+               fd_lblHeresAnOverview.left = new FormAttachment(0, 10);
+               lblHeresAnOverview.setLayoutData(fd_lblHeresAnOverview);
+               lblHeresAnOverview.setText("Here's an overview of the account information");
+               
+               Label lblAccountName = new Label(composite, SWT.NONE);
+               FormData fd_lblAccountName = new FormData();
+               fd_lblAccountName.left = new FormAttachment(0, 120);
+               fd_lblAccountName.top = new FormAttachment(lblHeresAnOverview, 18);
+               lblAccountName.setLayoutData(fd_lblAccountName);
+               lblAccountName.setText("Account Name:");
+               
+               Label lblPasswordType = new Label(composite, SWT.NONE);
+               FormData fd_lblPasswordType = new FormData();
+               fd_lblPasswordType.right = new FormAttachment(lblAccountName, 0, SWT.RIGHT);
+               lblPasswordType.setLayoutData(fd_lblPasswordType);
+               lblPasswordType.setText("Password:");
+               
+               Label lblUserName = new Label(composite, SWT.NONE);
+               fd_lblPasswordType.top = new FormAttachment(lblUserName, 6);
+               FormData fd_lblUserName = new FormData();
+               fd_lblUserName.top = new FormAttachment(lblAccountName, 6);
+               fd_lblUserName.right = new FormAttachment(lblAccountName, 0, SWT.RIGHT);
+               lblUserName.setLayoutData(fd_lblUserName);
+               lblUserName.setText("User Name:");
+               
+               Label lblIfEverythingLooks = new Label(composite, SWT.NONE);
+               FormData fd_lblIfEverythingLooks = new FormData();
+               fd_lblIfEverythingLooks.top = new FormAttachment(lblPasswordType, 49);
+               fd_lblIfEverythingLooks.left = new FormAttachment(lblHeresAnOverview, 0, SWT.LEFT);
+               lblIfEverythingLooks.setLayoutData(fd_lblIfEverythingLooks);
+               lblIfEverythingLooks.setText("If everything looks okay, press save and wait until the Final Key blinks,\nwhen it blinks, press the button to allow the account to be saved.");
+               
+               Label lblSeperator = new Label(composite, SWT.NONE);
+               FormData fd_lblSeperator = new FormData();
+               fd_lblSeperator.top = new FormAttachment(lblPasswordType, 6);
+               fd_lblSeperator.right = new FormAttachment(lblAccountName, 0, SWT.RIGHT);
+               lblSeperator.setLayoutData(fd_lblSeperator);
+               lblSeperator.setText("Seperator:");
+               
+               Button button_9 = new Button(composite, SWT.NONE);
+               button_9.setText("Back");
+               FormData fd_button_9 = new FormData();
+               fd_button_9.bottom = new FormAttachment(100, -10);
+               fd_button_9.left = new FormAttachment(lblHeresAnOverview, 0, SWT.LEFT);
+               button_9.setLayoutData(fd_button_9);
+               button_9.addSelectionListener( new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               updatePage(FkNewAccStep.SEPERATOR);
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {                
+                       }
+               });
+               
+               Button btnSave = new Button(composite, SWT.NONE);
+               FormData fd_btnSave = new FormData();
+               fd_btnSave.bottom = new FormAttachment(button_9, 0, SWT.BOTTOM);
+               fd_btnSave.right = new FormAttachment(lblHeresAnOverview, 0, SWT.RIGHT);
+               btnSave.setLayoutData(fd_btnSave);
+               btnSave.setText("Save");
+               btnSave.setFocus();
+               
+               btnSave.addSelectionListener( new SelectionListener() {
+                       
+                       @Override
+                       public void widgetSelected(SelectionEvent arg0) {
+                               MessageBox dialog = new MessageBox(shlNewAccount, SWT.ICON_INFORMATION | SWT.OK );
+                               dialog.setText("Get ready");
+                               dialog.setMessage("When you press OK, The Final Key will start blinking, you then have 5 seconds to press the button to save the account.");
+                               dialog.open();
+                               FkManager.getInstance().createAccount( strAccountName, strUserName, autoPassword, autoPassLen, autoPassAllSpecials, autoPassSpecials, strPassword, seperatorTab, mySelf );
+                               updatePage(FkNewAccStep.SAVING);
+                       }
+                       
+                       @Override
+                       public void widgetDefaultSelected(SelectionEvent arg0) {
+                               
+                       }
+               });
+               
+               Label lblAccName = new Label(composite, SWT.NONE);
+               FormData fd_lblAccName = new FormData();
+               fd_lblAccName.right = new FormAttachment(lblHeresAnOverview, 0, SWT.RIGHT);
+               fd_lblAccName.top = new FormAttachment(lblHeresAnOverview, 18);
+               fd_lblAccName.left = new FormAttachment(lblAccountName, 6);
+               lblAccName.setLayoutData(fd_lblAccName);
+               lblAccName.setText(strAccountName);
+               
+               Label lblUsrName = new Label(composite, SWT.NONE);
+               FormData fd_lblUsrName = new FormData();
+               fd_lblUsrName.top = new FormAttachment(lblAccName, 6);
+               fd_lblUsrName.left = new FormAttachment(lblUserName, 6);
+               fd_lblUsrName.right = new FormAttachment(100, -10);
+               lblUsrName.setLayoutData(fd_lblUsrName);
+               lblUsrName.setText(strUserName);
+               
+               Label lblPasswordInfo = new Label(composite, SWT.NONE);
+               
+               String passInfo;
+               if( autoPassword )
+               {
+                       passInfo = "Automatic, " + autoPassLen + " long, ";
+                       if( autoPassAllSpecials )
+                       {
+                               passInfo += "all specials";
+                       } else {
+                               passInfo += "{"+autoPassSpecials+ "}";
+                       }
+                       
+               } else {
+                       passInfo ="Manual, " + strPassword.length() +" long";
+               }
+               
+               lblPasswordInfo.setText(passInfo);
+               FormData fd_lblPasswordInfo = new FormData();
+               fd_lblPasswordInfo.right = new FormAttachment(lblPasswordType, 373, SWT.RIGHT);
+               fd_lblPasswordInfo.top = new FormAttachment(lblUsrName, 6);
+               fd_lblPasswordInfo.left = new FormAttachment(lblPasswordType, 6);
+               lblPasswordInfo.setLayoutData(fd_lblPasswordInfo);
+               
+               Label lblSeperatorInfo = new Label(composite, SWT.NONE);
+               
+               String sepInfo;
+               if( seperatorTab )
+               {
+                       sepInfo = "Tab Key";
+               } else {
+                       sepInfo = "Enter Key";
+               }
+               
+               lblSeperatorInfo.setText(sepInfo);
+               FormData fd_lblSeperatorInfo = new FormData();
+               fd_lblSeperatorInfo.right = new FormAttachment(lblSeperator, 373, SWT.RIGHT);
+               fd_lblSeperatorInfo.top = new FormAttachment(lblPasswordInfo, 6);
+               fd_lblSeperatorInfo.left = new FormAttachment(lblSeperator, 6);
+               lblSeperatorInfo.setLayoutData(fd_lblSeperatorInfo);
+               
+        Control[] controls = new Control[] { btnSave, button_9 };
+        composite.setTabList(controls);                                
+
+       }
+       
+       void createSavingPage()
+       {
+               composite = new Composite(shlNewAccount, SWT.NONE);
+               composite.setLayout(new FormLayout());
+               
+               txtBUSYMSG = new Label(composite, SWT.NONE);
+               FormData fd_lblSaving = new FormData();
+               fd_lblSaving.right = new FormAttachment(0, 603);
+               fd_lblSaving.top = new FormAttachment(0, 10);
+               fd_lblSaving.left = new FormAttachment(0, 10);
+               txtBUSYMSG.setLayoutData(fd_lblSaving);
+               txtBUSYMSG.setText("Working...");
+               
+               animation = new Animation(shlNewAccount, SWT.NONE, 4);
+               animation.setBounds(10, 32, 32, 32);
+               animation.setVisible(true);
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") );
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") );
+               animation.setPlaying(true);
+               FormData fdAni = new FormData();
+               fdAni.top = new FormAttachment(txtBUSYMSG);
+               
+
+               
+       }
+       
+       
+       private void updatePage(FkNewAccStep curPage)
+       {
+               if(composite != null && !composite.isDisposed() )
+               {
+                       composite.dispose();
+               }
+               System.out.println(curPage);
+               
+               switch(curPage)
+               {
+               case CLICKBTN:
+                       break;
+               case NAMES:
+                       createNamePage();
+                       break;
+               case PASSTYPE:
+                       createPassTypePage();
+                       break;
+               case PASS_AUT:
+                       createPassAutPage();
+                       break;
+               case PASS_MAN:
+                       createPassManPage();
+                       break;
+               case REVIEW:
+                       createReviewPage();
+                       break;
+               case SEPERATOR:
+                       createSeperatorPage();
+                       break;
+               case SAVING:
+                       createSavingPage();
+                       break;
+
+                       
+               }
+               
+               shlNewAccount.layout();
+       }
        /**
         * Create contents of the dialog.
         */
        private void createContents() {
-               shell = new Shell(getParent(), getStyle());
-               shell.setSize(450, 300);
-               shell.setText(getText());
+               shlNewAccount = new Shell(getParent(), getStyle());
+               shlNewAccount.setSize(625, 394);
+               shlNewAccount.setText("Create New Account");
+               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);
 
        }
 
+       @Override
+       public void fkActionEvent(FkActionEvent event) {
+               //System.out.println( "Event data:"+ event.data );
+               MessageBox dialog;
+               Boolean closeSelf=false;
+               
+               switch(event.type)
+               {
+               case ACTION_ABORTED:
+                       txtBUSYMSG.setText("Error.");
+                       dialog = new MessageBox(shlNewAccount, SWT.ICON_WARNING);
+                       dialog.setText("Account not created");
+                       dialog.setMessage("The account was not created.\nMaybe you were not quick enough to press FinalKey button?\nPlease try again.");
+                       dialog.open();
+                       updatePage(FkNewAccStep.REVIEW);                        
+                       break;
+               case ACTION_ERROR:
+                       txtBUSYMSG.setText("Error.");
+
+                       dialog = new MessageBox(shlNewAccount, SWT.ICON_ERROR);
+                       dialog.setText("Error");
+                       dialog.setMessage("There was an error creating the acccount, please reconnect to FinalKey and try again.");
+                       dialog.open();
+                       closeSelf=true;
+                       break;
+               case ACTION_OKAY:
+                       txtBUSYMSG.setText("Account saved.");
+                       dialog = new MessageBox(shlNewAccount, SWT.ICON_INFORMATION);
+                       dialog.setText("Account created");
+                       dialog.setMessage("The account was created.");
+                       dialog.open();
+                       closeSelf=true;
+                       break;
+               case ACTION_WAITING:
+                       txtBUSYMSG.setText("Waiting for buttonpress...");
+                       break;
+               case ACTION_WORKING:
+                       txtBUSYMSG.setText("Saving...");
+                       animation.setVisible(false);
+                       break;
+               }
+               
+               if( !shlNewAccount.isDisposed() && closeSelf )
+               {
+                       shlNewAccount.close();
+               }
+       }
 }
index 9cd3959..0f204cf 100644 (file)
@@ -63,8 +63,8 @@ public class PermitCountDownDialog extends Dialog {
                Animation animation = new Animation(shell, SWT.NONE, 4);
                animation.setBounds(10, 32, 32, 32);
                animation.setVisible(true);
-               animation.addFrame( SWTResourceManager.getImage("/home/dusted/Downloads/finalkey1.png") );
-               animation.addFrame( SWTResourceManager.getImage("/home/dusted/Downloads/finalkey2.png") );
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey1.png") );
+               animation.addFrame( SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/finalkey2.png") );
                animation.setPlaying(true);
                
                
index e2df667..0d7eba1 100644 (file)
@@ -33,16 +33,17 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
        private FormData fd_grpChange;
        private Group grpMakeFinalKey;
        private Group grpChange;
-       private Boolean askPermitShow = false;
+       ConsoleMsg delegate;
        PermitCountDownDialog permitCountdownDialog = null;
        /**
         * Create the dialog.
         * @param parent
         * @param style
         */
-       public TriggerDialog(Shell parent, int style, Account a) {
+       public TriggerDialog(Shell parent, int style, Account a, ConsoleMsg d) {
                super(parent, style);
                account = a;
+               delegate = d;
                setText("Use "+ account.name);
        }
 
@@ -106,7 +107,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                permitCountdownDialog.open();
                        }
                });
-               btnUsernamePassword.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/both.png"));
+               btnUsernamePassword.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/both.png"));
                FormData fd_btnUsernamePassword = new FormData();
                fd_btnUsernamePassword.top = new FormAttachment(0, 10);
                fd_btnUsernamePassword.left = new FormAttachment(0, 10);
@@ -125,7 +126,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                permitCountdownDialog.open();
                        }
                });
-               btnUsernameOnly.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/Deep_User.png"));
+               btnUsernameOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/user.png"));
                FormData fd_btnUsernameOnly = new FormData();
                fd_btnUsernameOnly.top = new FormAttachment(btnUsernamePassword, -35);
                fd_btnUsernameOnly.bottom = new FormAttachment(btnUsernamePassword, 0, SWT.BOTTOM);
@@ -147,7 +148,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                permitCountdownDialog.open();
                        }
                });
-               btnPasswordOnly.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/key-icon.png"));
+               btnPasswordOnly.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/key-icon.png"));
                FormData fd_btnPasswordOnly = new FormData();
                fd_btnPasswordOnly.left = new FormAttachment(btnUsernameOnly, 29);
                fd_btnPasswordOnly.top = new FormAttachment(btnUsernamePassword, 0, SWT.TOP);
@@ -167,7 +168,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                grpChange.setLayoutData(fd_grpChange);
                                
                                Button btnEdit = new Button(grpChange, SWT.NONE);
-                               btnEdit.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/gtk_edit.png"));
+                               btnEdit.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/gtk_edit.png"));
                                FormData fd_btnEdit = new FormData();
                                fd_btnEdit.top = new FormAttachment(0, 10);
                                fd_btnEdit.left = new FormAttachment(0, 10);
@@ -187,13 +188,15 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                                {
                                                        permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + ": Confirm deletion", "Press button to show delete "+account.name+".\nPress and hold to cancel.", 5000);
                                                        shell.setMinimized(true);
+                                                       FkManager.getInstance().trig(account, 'd', mySelf);
                                                        permitCountdownDialog.open();
+                                                       
 
                                                }
                                        }
                                });
                                fd_btnEdit.right = new FormAttachment(btnDelete, -6);
-                               btnDelete.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/trashdelete.gif"));
+                               btnDelete.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/trashdelete.gif"));
                                FormData fd_btnDelete = new FormData();
                                fd_btnDelete.top = new FormAttachment(0, 10);
                                fd_btnDelete.left = new FormAttachment(0, 166);
@@ -203,7 +206,7 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
 
                                Button btnCancel = new Button(shell, SWT.NONE);
                                fd_grpChange.bottom = new FormAttachment(btnCancel, -6);
-                               btnCancel.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/Delete.png"));
+                               btnCancel.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/Delete.png"));
                                FormData fd_btnCancel = new FormData();
                                fd_btnCancel.left = new FormAttachment(grpMakeFinalKey, 0, SWT.LEFT);
                                fd_btnCancel.bottom = new FormAttachment(100, -10);
@@ -232,12 +235,11 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                                        public void widgetSelected(SelectionEvent e) {
                                                FkManager.getInstance().trig(account, 's', mySelf);
                                                permitCountdownDialog = new PermitCountDownDialog(shell,SWT.SHELL_TRIM, account.name + ": Ready for display", "Press button to show username and password.\nPress and hold to cancel.", 30000);
-                                               askPermitShow=true;
                                                shell.setMinimized(true);
                                                permitCountdownDialog.open();
                                        }
                                });
-                               btnShowUsername.setImage(SWTResourceManager.getImage("/home/dusted/Downloads/both.png"));
+                               btnShowUsername.setImage(SWTResourceManager.getImage(MainWin.class, "/fkgui/gfx/both.png"));
                                btnShowUsername.setBounds(10, 36, 327, 35);
                                btnShowUsername.setText("Show Username + Password");                            
                                
@@ -269,14 +271,37 @@ public class TriggerDialog extends Dialog implements FkActionEventListener {
                        break;
                case ACTION_OKAY:
                        result = (Object)new Boolean(true);
-                       if( askPermitShow )
+                       if( event.action == 's' )
                        {
-                               String s = event.data.substring( event.data.indexOf( "Account: "+ event.acc.num), event.data.lastIndexOf("[done]") );
+                               int begin = event.data.lastIndexOf("Account: "+ event.acc.num);
+                               if( begin == -1 )
+                               {
+                                       begin=0;
+                               }
+                               int end = event.data.lastIndexOf("[done]");
+                               String s = event.data.substring( begin,end  );
                                dialog = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
                                dialog.setText("Account information");
                                dialog.setMessage(s);
                                dialog.open();
                        }
+                       
+                       if( event.action == 'd' )
+                       {
+                               result = (Object)new Boolean(false); //We want the mainwin to get back after deleting an account.
+                               dialog = new MessageBox(shell, SWT.ICON_INFORMATION | SWT.OK);
+                               dialog.setText("Account deleted");
+                               dialog.setMessage(event.acc.name + " has been erased.");
+                               dialog.open();
+                               Display.getDefault().asyncExec( new Runnable() {
+                                       @Override
+                                       public void run() {
+                                               delegate.updateAccountList();
+                                       }
+                                       
+                               } );
+                       }
+                       
                        if( !shell.isDisposed() )
                        {
                                shell.close();
diff --git a/src/fkgui/gfx/Delete.png b/src/fkgui/gfx/Delete.png
new file mode 100644 (file)
index 0000000..291af17
Binary files /dev/null and b/src/fkgui/gfx/Delete.png differ
diff --git a/src/fkgui/gfx/both.png b/src/fkgui/gfx/both.png
new file mode 100644 (file)
index 0000000..28e202c
Binary files /dev/null and b/src/fkgui/gfx/both.png differ
diff --git a/src/fkgui/gfx/finalkey1.png b/src/fkgui/gfx/finalkey1.png
new file mode 100644 (file)
index 0000000..52838a4
Binary files /dev/null and b/src/fkgui/gfx/finalkey1.png differ
diff --git a/src/fkgui/gfx/finalkey2.png b/src/fkgui/gfx/finalkey2.png
new file mode 100644 (file)
index 0000000..fa3dcd0
Binary files /dev/null and b/src/fkgui/gfx/finalkey2.png differ
diff --git a/src/fkgui/gfx/gtk_edit.png b/src/fkgui/gfx/gtk_edit.png
new file mode 100644 (file)
index 0000000..b73a4a3
Binary files /dev/null and b/src/fkgui/gfx/gtk_edit.png differ
diff --git a/src/fkgui/gfx/key-icon.png b/src/fkgui/gfx/key-icon.png
new file mode 100644 (file)
index 0000000..4ab0dc6
Binary files /dev/null and b/src/fkgui/gfx/key-icon.png differ
diff --git a/src/fkgui/gfx/lightning.png b/src/fkgui/gfx/lightning.png
new file mode 100644 (file)
index 0000000..67ec9d6
Binary files /dev/null and b/src/fkgui/gfx/lightning.png differ
diff --git a/src/fkgui/gfx/new.png b/src/fkgui/gfx/new.png
new file mode 100644 (file)
index 0000000..e22a9ce
Binary files /dev/null and b/src/fkgui/gfx/new.png differ
diff --git a/src/fkgui/gfx/trashdelete.gif b/src/fkgui/gfx/trashdelete.gif
new file mode 100644 (file)
index 0000000..0f30108
Binary files /dev/null and b/src/fkgui/gfx/trashdelete.gif differ
diff --git a/src/fkgui/gfx/user.png b/src/fkgui/gfx/user.png
new file mode 100644 (file)
index 0000000..ba60e2a
Binary files /dev/null and b/src/fkgui/gfx/user.png differ