Browse Source

Add accounts info of each key in Wallet Keys

PascalCoin 6 years ago
parent
commit
ae84f6c0d0

+ 4 - 34
src/gui-classic/UFRMOperation.dfm

@@ -66,7 +66,6 @@ object FRMOperation: TFRMOperation
     Width = 130
     Width = 130
     Height = 31
     Height = 31
     Caption = 'Execute (F12)'
     Caption = 'Execute (F12)'
-    DoubleBuffered = True
     Glyph.Data = {
     Glyph.Data = {
       DE010000424DDE01000000000000760000002800000024000000120000000100
       DE010000424DDE01000000000000760000002800000024000000120000000100
       0400000000006801000000000000000000001000000000000000000000000000
       0400000000006801000000000000000000001000000000000000000000000000
@@ -85,7 +84,6 @@ object FRMOperation: TFRMOperation
       333A333333333333333338330000333333333333333333333333333333333333
       333A333333333333333338330000333333333333333333333333333333333333
       0000}
       0000}
     NumGlyphs = 2
     NumGlyphs = 2
-    ParentDoubleBuffered = False
     TabOrder = 2
     TabOrder = 2
     OnClick = actExecuteExecute
     OnClick = actExecuteExecute
   end
   end
@@ -94,9 +92,8 @@ object FRMOperation: TFRMOperation
     Top = 445
     Top = 445
     Width = 116
     Width = 116
     Height = 31
     Height = 31
-    DoubleBuffered = True
     Kind = bkCancel
     Kind = bkCancel
-    ParentDoubleBuffered = False
+    NumGlyphs = 2
     TabOrder = 3
     TabOrder = 3
   end
   end
   object PageControlLocked: TPageControl
   object PageControlLocked: TPageControl
@@ -229,6 +226,7 @@ object FRMOperation: TFRMOperation
           Height = 19
           Height = 19
           Caption = 'Encrypted with password'
           Caption = 'Encrypted with password'
           TabOrder = 2
           TabOrder = 2
+          TabStop = True
           OnClick = memoPayloadClick
           OnClick = memoPayloadClick
         end
         end
         object rbNotEncrypted: TRadioButton
         object rbNotEncrypted: TRadioButton
@@ -238,6 +236,7 @@ object FRMOperation: TFRMOperation
           Height = 19
           Height = 19
           Caption = 'Dont encrypt (Public payload)'
           Caption = 'Dont encrypt (Public payload)'
           TabOrder = 4
           TabOrder = 4
+          TabStop = True
           OnClick = memoPayloadClick
           OnClick = memoPayloadClick
         end
         end
         object ebEncryptPassword: TEdit
         object ebEncryptPassword: TEdit
@@ -272,6 +271,7 @@ object FRMOperation: TFRMOperation
           Height = 19
           Height = 19
           Caption = 'Encrypted with old public key'
           Caption = 'Encrypted with old public key'
           TabOrder = 0
           TabOrder = 0
+          TabStop = True
           OnClick = memoPayloadClick
           OnClick = memoPayloadClick
         end
         end
       end
       end
@@ -292,10 +292,6 @@ object FRMOperation: TFRMOperation
         OnChange = PageControlOpTypeChange
         OnChange = PageControlOpTypeChange
         object tsTransaction: TTabSheet
         object tsTransaction: TTabSheet
           Caption = 'Transaction'
           Caption = 'Transaction'
-          ExplicitLeft = 0
-          ExplicitTop = 0
-          ExplicitWidth = 0
-          ExplicitHeight = 0
           object lblDestAccount: TLabel
           object lblDestAccount: TLabel
             Left = 13
             Left = 13
             Top = 32
             Top = 32
@@ -382,10 +378,6 @@ object FRMOperation: TFRMOperation
         object tsChangePrivateKey: TTabSheet
         object tsChangePrivateKey: TTabSheet
           Caption = 'Change key'
           Caption = 'Change key'
           ImageIndex = 1
           ImageIndex = 1
-          ExplicitLeft = 0
-          ExplicitTop = 0
-          ExplicitWidth = 0
-          ExplicitHeight = 0
           object gbChangeKey: TGroupBox
           object gbChangeKey: TGroupBox
             Left = 7
             Left = 7
             Top = 6
             Top = 6
@@ -474,7 +466,6 @@ object FRMOperation: TFRMOperation
               Top = 36
               Top = 36
               Width = 31
               Width = 31
               Height = 22
               Height = 22
-              DoubleBuffered = True
               Glyph.Data = {
               Glyph.Data = {
                 36050000424D3605000000000000360400002800000010000000100000000100
                 36050000424D3605000000000000360400002800000010000000100000000100
                 0800000000000001000000000000000000000001000000010000FF00FF008C6B
                 0800000000000001000000000000000000000001000000010000FF00FF008C6B
@@ -518,7 +509,6 @@ object FRMOperation: TFRMOperation
                 6247446E7336000000000B552C25263C3E4B4E483636000000000F55542F3057
                 6247446E7336000000000B552C25263C3E4B4E483636000000000F55542F3057
                 523331020000000000000B77766D5F5C5C5C2F08000000000000001476726C5C
                 523331020000000000000B77766D5F5C5C5C2F08000000000000001476726C5C
                 5A58100000000000000000000F0F0B0F0F0F0000000000000000}
                 5A58100000000000000000000F0F0B0F0F0F0000000000000000}
-              ParentDoubleBuffered = False
               TabOrder = 2
               TabOrder = 2
               OnClick = bbChangePrivateKeyKeysClick
               OnClick = bbChangePrivateKeyKeysClick
             end
             end
@@ -535,10 +525,6 @@ object FRMOperation: TFRMOperation
         object tsListForSale: TTabSheet
         object tsListForSale: TTabSheet
           Caption = 'List account for sale'
           Caption = 'List account for sale'
           ImageIndex = 3
           ImageIndex = 3
-          ExplicitLeft = 0
-          ExplicitTop = 0
-          ExplicitWidth = 0
-          ExplicitHeight = 0
           object gbSaleType: TGroupBox
           object gbSaleType: TGroupBox
             Left = 7
             Left = 7
             Top = 5
             Top = 5
@@ -682,10 +668,6 @@ object FRMOperation: TFRMOperation
         object tsDelist: TTabSheet
         object tsDelist: TTabSheet
           Caption = 'Delist account'
           Caption = 'Delist account'
           ImageIndex = 3
           ImageIndex = 3
-          ExplicitLeft = 0
-          ExplicitTop = 0
-          ExplicitWidth = 0
-          ExplicitHeight = 0
           object lblDelistErrors: TLabel
           object lblDelistErrors: TLabel
             Left = 13
             Left = 13
             Top = 10
             Top = 10
@@ -706,10 +688,6 @@ object FRMOperation: TFRMOperation
         object tsBuyAccount: TTabSheet
         object tsBuyAccount: TTabSheet
           Caption = 'Buy account'
           Caption = 'Buy account'
           ImageIndex = 4
           ImageIndex = 4
-          ExplicitLeft = 0
-          ExplicitTop = 0
-          ExplicitWidth = 0
-          ExplicitHeight = 0
           object lblAccountToBuy: TLabel
           object lblAccountToBuy: TLabel
             Left = 13
             Left = 13
             Top = 32
             Top = 32
@@ -836,7 +814,6 @@ object FRMOperation: TFRMOperation
             Top = 84
             Top = 84
             Width = 31
             Width = 31
             Height = 22
             Height = 22
-            DoubleBuffered = True
             Glyph.Data = {
             Glyph.Data = {
               36050000424D3605000000000000360400002800000010000000100000000100
               36050000424D3605000000000000360400002800000010000000100000000100
               0800000000000001000000000000000000000001000000010000FF00FF008C6B
               0800000000000001000000000000000000000001000000010000FF00FF008C6B
@@ -880,7 +857,6 @@ object FRMOperation: TFRMOperation
               6247446E7336000000000B552C25263C3E4B4E483636000000000F55542F3057
               6247446E7336000000000B552C25263C3E4B4E483636000000000F55542F3057
               523331020000000000000B77766D5F5C5C5C2F08000000000000001476726C5C
               523331020000000000000B77766D5F5C5C5C2F08000000000000001476726C5C
               5A58100000000000000000000F0F0B0F0F0F0000000000000000}
               5A58100000000000000000000F0F0B0F0F0F0000000000000000}
-            ParentDoubleBuffered = False
             TabOrder = 3
             TabOrder = 3
             OnClick = bbBuyNewKeyClick
             OnClick = bbBuyNewKeyClick
           end
           end
@@ -952,10 +928,6 @@ object FRMOperation: TFRMOperation
     object tsGlobalError: TTabSheet
     object tsGlobalError: TTabSheet
       ImageIndex = 1
       ImageIndex = 1
       TabVisible = False
       TabVisible = False
-      ExplicitLeft = 0
-      ExplicitTop = 0
-      ExplicitWidth = 0
-      ExplicitHeight = 0
       object lblGlobalErrors: TLabel
       object lblGlobalErrors: TLabel
         Left = 40
         Left = 40
         Top = 50
         Top = 50
@@ -980,7 +952,6 @@ object FRMOperation: TFRMOperation
         Width = 159
         Width = 159
         Height = 38
         Height = 38
         Caption = 'Password'
         Caption = 'Password'
-        DoubleBuffered = True
         Font.Charset = DEFAULT_CHARSET
         Font.Charset = DEFAULT_CHARSET
         Font.Color = clWindowText
         Font.Color = clWindowText
         Font.Height = -13
         Font.Height = -13
@@ -1039,7 +1010,6 @@ object FRMOperation: TFRMOperation
           9191EFF6E1C9C8CDD9CC91919191919191919191919191919191C9EDF9F3F3EB
           9191EFF6E1C9C8CDD9CC91919191919191919191919191919191C9EDF9F3F3EB
           DC91919191919191919191919191919191919191CBE0E1CF9191919191919191
           DC91919191919191919191919191919191919191CBE0E1CF9191919191919191
           9191919191919191919191919191919191919191919191919191}
           9191919191919191919191919191919191919191919191919191}
-        ParentDoubleBuffered = False
         ParentFont = False
         ParentFont = False
         TabOrder = 0
         TabOrder = 0
         OnClick = bbPasswordClick
         OnClick = bbPasswordClick

+ 2 - 2
src/gui-classic/UFRMWallet.pas

@@ -2321,8 +2321,8 @@ begin
         s := wk.Name;
         s := wk.Name;
       end;
       end;
       if Not Assigned(wk.PrivateKey) then begin
       if Not Assigned(wk.PrivateKey) then begin
-        if Length(wk.CryptedKey)>0 then s:=s+' (Encrypted, need password)';
-        s:=s+' (* without key)';
+        if Length(wk.CryptedKey)>0 then s:=s+' (**NEED PASSWORD**)'
+        else s:=s+' (**PUBLIC KEY ONLY**)';
       end;
       end;
       cbMyPrivateKeys.Items.AddObject(s,TObject(i));
       cbMyPrivateKeys.Items.AddObject(s,TObject(i));
     end;
     end;

+ 9 - 3
src/gui-classic/UFRMWalletKeys.pas

@@ -535,7 +535,7 @@ begin
 end;
 end;
 
 
 procedure TFRMWalletKeys.UpdateWalletKeys;
 procedure TFRMWalletKeys.UpdateWalletKeys;
-Var lasti,i : Integer;
+Var lasti,i,j : Integer;
   selected_wk,wk : TWalletKey;
   selected_wk,wk : TWalletKey;
   s : AnsiString;
   s : AnsiString;
 begin
 begin
@@ -563,9 +563,15 @@ begin
       end else begin
       end else begin
         s := wk.Name;
         s := wk.Name;
       end;
       end;
+      if (WalletKeys is TWalletKeysExt) then begin
+        j := TWalletKeysExt(WalletKeys).AccountsKeyList.IndexOfAccountKey(wk.AccountKey);
+        if (j>=0) then begin
+          s := s+' ('+IntToStr(TWalletKeysExt(WalletKeys).AccountsKeyList.AccountKeyList[j].Count)+' Accounts)';
+        end;
+      end;
       if Not Assigned(wk.PrivateKey) then begin
       if Not Assigned(wk.PrivateKey) then begin
-        if Length(wk.CryptedKey)>0 then s:=s+' (Encrypted, need password)';
-        s:=s+' (* without key)';
+        if Length(wk.CryptedKey)>0 then s:=s+' (**NEED PASSWORD**)'
+        else s:=s+' (**PUBLIC KEY ONLY**)';
       end;
       end;
       lbWalletKeys.Items.AddObject(s,TObject(i));
       lbWalletKeys.Items.AddObject(s,TObject(i));
     end;
     end;