[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/impl/gui/main/contactlist/, /sip-communicator/src/net/java/sip/communicator/impl/gui/ma...

yanas at dev.java.net yanas at dev.java.net
Thu Apr 12 17:33:49 CEST 2007


User: yanas   
Date: 2007-04-12 15:33:49+0000
Modified:
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/contactlist/CommonRightButtonMenu.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/menus/QuickMenu.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/chatroomslist/chatroomwizard/CreateChatRoomWizard.java
   sip-communicator/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListRightButtonMenu.java

Log:
 StackOverFlow exception when trying to open the "Add contact" wizard - fixed

File Changes:

Directory: /sip-communicator/src/net/java/sip/communicator/impl/gui/main/contactlist/
=====================================================================================

File [changed]: ContactListPanel.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListPanel.java?r1=1.93&r2=1.94
Delta lines:  +3 -39
--------------------
--- ContactListPanel.java	2007-04-11 14:16:38+0000	1.93
+++ ContactListPanel.java	2007-04-12 15:33:46+0000	1.94
@@ -104,14 +104,6 @@
 
         this.treePanel.setBackground(Color.WHITE);
         this.contactList.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
-
-        this.getRootPane().getActionMap().put("runChat",
-                new RunMessageWindowAction());
-
-        InputMap imap = this.getRootPane().getInputMap(
-                JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT);
-
-        imap.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0), "runChat");
     }
 
     /**
@@ -165,7 +157,6 @@
      */
     public class RunMessageWindow implements Runnable
     {
-
         private MetaContact metaContact;
 
         private Contact protocolContact;
@@ -196,6 +187,7 @@
         }
     }
 
+
     /**
      * When a message is received determines whether to open a new chat window
      * or chat window tab, or to indicate that a message is received from a
@@ -421,34 +413,6 @@
     }
 
     /**
-     * Opens chat window when the selected value is a MetaContact and opens a
-     * group when the selected value is a MetaContactGroup.
-     */
-    private class RunMessageWindowAction extends AbstractAction
-    {
-        public void actionPerformed(ActionEvent e)
-        {
-            Object selectedValue = getContactList().getSelectedValue();
-
-            if (selectedValue instanceof MetaContact) {
-                MetaContact contact = (MetaContact) selectedValue;
-
-                SwingUtilities.invokeLater(new RunMessageWindow(contact));
-            }
-            else if (selectedValue instanceof MetaContactGroup) {
-                MetaContactGroup group = (MetaContactGroup) selectedValue;
-
-                ContactListModel model = (ContactListModel) contactList
-                        .getModel();
-
-                if (model.isGroupClosed(group)) {
-                    model.openGroup(group);
-                }
-            }
-        }
-    };
-
-    /**
      * The TypingTimer is started after a PAUSED typing notification is
      * received. It waits 5 seconds and if no other typing event occurs removes
      * the PAUSED message from the chat status panel.

File [changed]: ContactRightButtonMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactRightButtonMenu.java?r1=1.47&r2=1.48
Delta lines:  +6 -3
-------------------
--- ContactRightButtonMenu.java	2007-03-12 17:40:55+0000	1.47
+++ ContactRightButtonMenu.java	2007-04-12 15:33:46+0000	1.48
@@ -388,15 +388,18 @@
                 dialog.setVisible(true);
             }
         }
-        else if (itemName.equalsIgnoreCase("sendMessage")) {
+        else if (itemName.equalsIgnoreCase("sendMessage"))
+        {
             ContactListPanel clistPanel = mainFrame.getContactListPanel();
             SwingUtilities.invokeLater(clistPanel.new RunMessageWindow(
                     contactItem));
         }
-        else if (itemName.equalsIgnoreCase("sendFile")) {
+        else if (itemName.equalsIgnoreCase("sendFile"))
+        {
             // disabled
         }
-        else if (itemName.equalsIgnoreCase("renameContact")) {
+        else if (itemName.equalsIgnoreCase("renameContact"))
+        {
             RenameContactDialog dialog = new RenameContactDialog(
                     mainFrame, contactItem);
 

File [changed]: CommonRightButtonMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/contactlist/CommonRightButtonMenu.java?r1=1.5&r2=1.6
Delta lines:  +1 -1
-------------------
--- CommonRightButtonMenu.java	2006-12-05 13:02:40+0000	1.5
+++ CommonRightButtonMenu.java	2007-04-12 15:33:46+0000	1.6
@@ -80,7 +80,7 @@
         else if(itemName.equals("addContact")) {
             AddContactWizard wizard = new AddContactWizard(mainFrame);
             
-            wizard.showDialog(false);
+            wizard.setVisible(true);
         }
     }
 }

Directory: /sip-communicator/src/net/java/sip/communicator/impl/gui/main/menus/
===============================================================================

File [changed]: QuickMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/menus/QuickMenu.java?r1=1.24&r2=1.25
Delta lines:  +1 -2
-------------------
--- QuickMenu.java	2007-04-11 14:15:54+0000	1.24
+++ QuickMenu.java	2007-04-12 15:33:46+0000	1.25
@@ -183,10 +183,9 @@
 
         if (buttonName.equals("add"))
         {
-
             AddContactWizard wizard = new AddContactWizard(mainFrame);
             
-            wizard.showDialog(false);
+            wizard.setVisible(true);
         }
         else if (buttonName.equals("config"))
         {

Directory: /sip-communicator/src/net/java/sip/communicator/impl/gui/main/chatroomslist/chatroomwizard/
======================================================================================================

File [changed]: CreateChatRoomWizard.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/chatroomslist/chatroomwizard/CreateChatRoomWizard.java?r1=1.1&r2=1.2
Delta lines:  +8 -3
-------------------
--- CreateChatRoomWizard.java	2007-03-12 17:40:56+0000	1.1
+++ CreateChatRoomWizard.java	2007-04-12 15:33:46+0000	1.2
@@ -62,10 +62,15 @@
     }
     
     /**
-     * Overrides the Wizard.showModalDialog method.
+     * Invokes the <tt>Wizard.showDialog</tt> method in order to perform
+     * additional operations when visualizing this component.
      */
-    public void showDialog(boolean modal) {
-        super.showDialog(modal);        
+    public void setVisible(boolean isVisible)
+    {
+        if(isVisible)
+            showDialog(false);
+        else
+            super.setVisible(false);
     }
     
     /**

Directory: /sip-communicator/src/net/java/sip/communicator/impl/gui/main/chatroomslist/
=======================================================================================

File [changed]: ChatRoomsListRightButtonMenu.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomsListRightButtonMenu.java?r1=1.1&r2=1.2
Delta lines:  +1 -1
-------------------
--- ChatRoomsListRightButtonMenu.java	2007-03-12 17:40:57+0000	1.1
+++ ChatRoomsListRightButtonMenu.java	2007-04-12 15:33:46+0000	1.2
@@ -119,7 +119,7 @@
             CreateChatRoomWizard createChatRoomWizard
                 = new CreateChatRoomWizard(mainFrame);
             
-            createChatRoomWizard.showDialog(false);
+            createChatRoomWizard.setVisible(true);
         }
         else if (itemName.equals("searchForChatRooms"))
         {




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator.dev.java.net





More information about the commits mailing list