tn5250j/src/org/tn5250j Gui5250.java,1.54,1.55 My5250.java,1.36,1.37 Screen5250.java,1.45,1.46 SessionPopup.java,1.5,1.6 TN5250jConstants.java,1.49,1.50

[email protected]
Newsgroups gmane.comp.java.tn5250j.cvs
Message-ID <[email protected]>
Update of /cvsroot/tn5250j/tn5250j/src/org/tn5250j
In directory sc8-pr-cvs1:/tmp/cvs-serv26694/src/org/tn5250j

Modified Files:
	Gui5250.java My5250.java Screen5250.java SessionPopup.java 
	TN5250jConstants.java 
Log Message:
Several bugfixes.

Index: Gui5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Gui5250.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -d -r1.54 -r1.55
*** Gui5250.java	5 Dec 2003 07:07:12 -0000	1.54
--- Gui5250.java	20 Jan 2004 15:53:28 -0000	1.55
***************
*** 447,450 ****
--- 447,455 ----
        fireEmulatorAction(EmulatorActionEvent.START_NEW_SESSION);
     }
+ 
+    public void startDuplicateSession() {
+       fireEmulatorAction(EmulatorActionEvent.START_DUPLICATE);
+    }
+ 
     public void sendAidKey(int whichOne) {
  
***************
*** 593,602 ****
     }
  
- 
-    protected void doConnections() {
- 
-       fireEmulatorAction(EmulatorActionEvent.START_NEW_SESSION);
-    }
- 
     public void doMeSpool() {
  
--- 598,601 ----

Index: My5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/My5250.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** My5250.java	22 Dec 2003 14:19:54 -0000	1.36
--- My5250.java	20 Jan 2004 15:53:28 -0000	1.37
***************
*** 46,50 ****
     protected GUIViewInterface frame1;
     private String[] sessionArgs = null;
!    public static Properties sessions = new Properties();
     private static BootStrapper strapper = null;
     protected SessionManager manager;
--- 46,50 ----
     protected GUIViewInterface frame1;
     private String[] sessionArgs = null;
!    private static Properties sessions = new Properties();
     private static BootStrapper strapper = null;
     protected SessionManager manager;
***************
*** 293,316 ****
              LangTool.init();
  
- //            // check if a locale parameter is specified on the command line
- //            if (isSpecified("-L",args)) {
- //
- //               Locale.setDefault(parseLocal(getParm("-L",args)));
- //               LangTool.init();
- //               if (args[0].startsWith("-")) {
- //
- //                  m.sessionArgs = null;
- //               }
- //               else {
- //                  m.splash.updateProgress(++m.step);
- //                  m.frame1.setVisible(true);
- //                  m.splash.setVisible(false);
- //                  m.frame1.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
- //                  LangTool.init();
- //                  m.sessionArgs = args;
- //               }
- //            }
- //            else {
- //               LangTool.init();
                 if (isSpecified("-s",args))
                    m.sessionArgs = args;
--- 293,296 ----
***************
*** 478,481 ****
--- 458,483 ----
     }
  
+    void startDuplicateSession(Session ses) {
+ 
+       loadSessions();
+       if (ses == null) {
+          Sessions sess = manager.getSessions();
+          for (int x = 0; x < sess.getCount(); x++) {
+ 
+             if (sess.item(x).isVisible()) {
+ 
+                ses = sess.item(x);
+                break;
+             }
+          }
+       }
+ 
+       String selArgs = sessions.getProperty(ses.getSessionName());
+       sessionArgs = new String[NUM_PARMS];
+       parseArgs(selArgs, sessionArgs);
+ 
+       newSession(ses.getSessionName(),sessionArgs);
+    }
+ 
     private String getConnectSession () {
  
***************
*** 765,768 ****
--- 767,773 ----
              startNewSession();
              break;
+          case EmulatorActionEvent.START_DUPLICATE:
+             startDuplicateSession(ses);
+             break;
        }
     }

Index: Screen5250.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/Screen5250.java,v
retrieving revision 1.45
retrieving revision 1.46
diff -C2 -d -r1.45 -r1.46
*** Screen5250.java	18 Dec 2003 13:10:19 -0000	1.45
--- Screen5250.java	20 Jan 2004 15:53:28 -0000	1.46
***************
*** 4089,4093 ****
        }
        dirty.setBounds(tArea.getBounds());
! //      dirty.setBounds(fmWidth * numCols,fmHeight * numRows,0,0);
     }
  
--- 4089,4093 ----
        }
        dirty.setBounds(tArea.getBounds());
!       drawing = true;
     }
  

Index: SessionPopup.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/SessionPopup.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** SessionPopup.java	12 Dec 2003 07:24:54 -0000	1.5
--- SessionPopup.java	20 Jan 2004 15:53:28 -0000	1.6
***************
*** 351,355 ****
           }
  
- 
           if (OptionAccessFactory.getInstance().isValidOption(MNEMONIC_E_MAIL)) {
  
--- 351,354 ----
***************
*** 388,392 ****
           action = new AbstractAction(LangTool.getString("popup.connections")) {
                 public void actionPerformed(ActionEvent e) {
!                   session.doConnections();
                 }
             };
--- 387,391 ----
           action = new AbstractAction(LangTool.getString("popup.connections")) {
                 public void actionPerformed(ActionEvent e) {
!                   session.startNewSession();
                 }
             };

Index: TN5250jConstants.java
===================================================================
RCS file: /cvsroot/tn5250j/tn5250j/src/org/tn5250j/TN5250jConstants.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** TN5250jConstants.java	12 Dec 2003 07:24:54 -0000	1.49
--- TN5250jConstants.java	20 Jan 2004 15:53:28 -0000	1.50
***************
*** 152,155 ****
--- 152,156 ----
     public static final int SPOOL_FILE = 5015;
     public static final int QUICK_MAIL = 5016;
+    public static final int OPEN_SAME = 5017;
  
  
***************
*** 199,203 ****
          "[opennew]","[togcon]","[hotspots]","[gui]","[dspmsgs]",
          "[dspattr]","[print]","[cursor]","[debug]","[close]",
!         "[transfer]","[e-mail]","[runscript]","[spoolfile]","[quick-mail]"
     };
  
--- 200,205 ----
          "[opennew]","[togcon]","[hotspots]","[gui]","[dspmsgs]",
          "[dspattr]","[print]","[cursor]","[debug]","[close]",
!         "[transfer]","[e-mail]","[runscript]","[spoolfile]","[quick-mail]",
!         "[open-same]"
     };
  
***************
*** 221,225 ****
          5002, 5003, 5004, 5005, 5006,
          5007, 5008, 5009, 5010, 5011,
!         5012, 5013, 5014, 5015, 5016
     };
  
--- 223,228 ----
          5002, 5003, 5004, 5005, 5006,
          5007, 5008, 5009, 5010, 5011,
!         5012, 5013, 5014, 5015, 5016,
!         5017
     };
  
***************
*** 317,320 ****
--- 320,324 ----
     public static final String MNEMONIC_SPOOL_FILE   =  "[spoolfile]";
     public static final String MNEMONIC_QUICK_MAIL   =  "[quick-mail]";
+    public static final String MNEMONIC_OPEN_SAME   =  "[open_same]";
  
  




-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.