Index: cprs/branches/tmg-cprs/CPRS-Chart/fxBroker.pas
===================================================================
--- cprs/branches/tmg-cprs/CPRS-Chart/fxBroker.pas	(revision 612)
+++ cprs/branches/tmg-cprs/CPRS-Chart/fxBroker.pas	(revision 738)
@@ -22,4 +22,6 @@
     DKLanguageController1: TDKLanguageController;
     btnClear: TBitBtn;
+    lblStoredCallsNum: TLabel;
+    cboJumpTo: TComboBox;
     procedure cmdPrevClick(Sender: TObject);
     procedure cmdNextClick(Sender: TObject);
@@ -31,8 +33,11 @@
     procedure btnRLTClick(Sender: TObject);
     procedure btnClearClick(Sender: TObject);
+    procedure cboJumpToDropDown(Sender: TObject);
+    procedure cboJumpToChange(Sender: TObject);
   private
     { Private declarations }
     FRetained: Integer;
     FCurrent: Integer;
+    procedure UpdateDisplay; //kt added
   public
     { Public declarations }
@@ -56,8 +61,12 @@
       FRetained := RetainedRPCCount - 1;
       FCurrent := FRetained;
+      UpdateDisplay; //kt
+      { //kt moved to UpdateDisplay
       LoadRPCData(memData.Lines, FCurrent);
       memData.SelStart := 0;
 //    lblCallID.Caption := 'Last Call Minus: ' + IntToStr(FRetained - FCurrent);  <-- original line.  //kt 8/7/2007
-      lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(FRetained - FCurrent); //kt added 8/7/2007
+      lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(HigherOf(FRetained - FCurrent,0)); //kt added 8/7/2007
+      lblStoredCallsNum.Caption := DKLangConstW('fxBroker_Stored_Calls') + IntToStr(RetainedRPCCount); //kt added 4/15/10
+      }
       ShowModal;
     end;
@@ -70,18 +79,64 @@
 begin
   FCurrent := HigherOf(FCurrent - 1, 0);
+  UpdateDisplay; //kt
+  { //kt moved to UpdateDisplay
   LoadRPCData(memData.Lines, FCurrent);
   memData.SelStart := 0;
 //lblCallID.Caption := 'Last Call Minus: ' + IntToStr(FRetained - FCurrent);  <-- original line.  //kt 8/7/2007
-  lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(FRetained - FCurrent); //kt added 8/7/2007
+  lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(HigherOf(FRetained - FCurrent,0)); //kt added 8/7/2007
+  lblStoredCallsNum.Caption := DKLangConstW('fxBroker_Stored_Calls') + IntToStr(RetainedRPCCount); //kt added 4/15/10
+  }
 end;
 
 procedure TfrmBroker.cmdNextClick(Sender: TObject);
 begin
+  FRetained := RetainedRPCCount - 1;  //kt added line 4/15/10
   FCurrent := LowerOf(FCurrent + 1, FRetained);
+  UpdateDisplay; //kt
+  { //kt moved to UpdateDisplay
   LoadRPCData(memData.Lines, FCurrent);
   memData.SelStart := 0;
 //lblCallID.Caption := 'Last Call Minus: ' + IntToStr(FRetained - FCurrent);  <-- original line.  //kt 8/7/2007
-  lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(FRetained - FCurrent); //kt added 8/7/2007
-end;
+  lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(HigherOf(FRetained - FCurrent,0)); //kt added 8/7/2007
+  lblStoredCallsNum.Caption := DKLangConstW('fxBroker_Stored_Calls') + IntToStr(RetainedRPCCount); //kt added 4/15/10
+  }
+end;
+
+procedure TfrmBroker.UpdateDisplay; //kt added
+begin
+  FRetained := RetainedRPCCount - 1;  //kt added line 4/15/10
+  LoadRPCData(memData.Lines, FCurrent);
+  memData.SelStart := 0;
+//lblCallID.Caption := 'Last Call Minus: ' + IntToStr(FRetained - FCurrent);  <-- original line.  //kt 8/7/2007
+  lblCallID.Caption := DKLangConstW('fxBroker_Last_Call_Minusx') + IntToStr(HigherOf(FRetained - FCurrent,0)); //kt added 8/7/2007
+  lblStoredCallsNum.Caption := DKLangConstW('fxBroker_Stored_Calls') + IntToStr(RetainedRPCCount); //kt added 4/15/10
+end;
+
+procedure TfrmBroker.cboJumpToDropDown(Sender: TObject);
+//kt added entire function
+var i : integer;
+    s : string;
+    Info : TStringList;   //Not owned here...
+begin
+  cboJumpTo.Items.Clear;
+  for i := 0 to RetainedRPCCount - 1 do begin
+    Info := AccessRPCData(i);
+    if Info.Count < 2 then continue;
+    s := Info.Strings[1];
+    s := piece(s,'Called at: ',2);
+    s := s + ':  ' + Info.Strings[0];
+    cboJumpTo.Items.Insert(0,s);
+  end;
+end;
+
+procedure TfrmBroker.cboJumpToChange(Sender: TObject);
+//kt added function
+begin
+  if cboJumpTo.Items.count > 0 then begin
+    FCurrent := (cboJumpTo.Items.count-1) - cboJumpTo.ItemIndex;
+    UpdateDisplay; //kt
+  end;
+end;
+
 
 procedure TfrmBroker.FormClose(Sender: TObject; var Action: TCloseAction);
@@ -138,7 +193,9 @@
 
 procedure TfrmBroker.btnClearClick(Sender: TObject);
-  //kt added endtire function
+  //kt added entire function
 begin
   ORNet.RPCCallsClear;
+  memData.Lines.Clear; //kt 4/15/10
+  cboJumpTo.Text := '-- Select a call to jump to --';
   FCurrent := 0;
   FRetained := RetainedRPCCount - 1;
@@ -146,3 +203,4 @@
 end;
 
+
 end.
