[sip-comm-dev] Re: svn commit: r6639 - trunk/src/net/java/sip/communicator/impl/protocol/yahoo


#1

Hi Valentin,

I've noticed from your last commits that in your IDE you forgot to replace your tabs with spaces (http://www.sip-communicator.org/index.php/Documentation/CodeConvention) !

If you're using Eclipse you should go in the Preferences window : General / Editors / Text Editors and check "Insert spaces for tabs". "Displayed tab width" should be 4. In order to easily find your tabs you could also check "Show whitespace characters".

Here is a list of the files where tabs should be replaced with spaces:

impl/gui/main/chat/conference/ChatContactCellRenderer
impl/gui/main/chat/conference/ChatRoomMemberListPanel
impl/gui/main/chat/conference/ConferenceChatManager
impl/gui/main/chat/toolbars/MainToolBar
impl/gui/main/chat/ChatContactRightButtonMenu
impl/gui/main/chat/ChatOperationReasonDialog
impl/gui/main/chat/ChatWindowManager
impl/gui/main/contactlist/ContactRightButtonMenu
impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl
impl/protocol/msn/OperationSetAdHocMultiUserChatYahooImpl
plugin/accountinfo/AccountDetailsPanel
plugin/notificationconfiguration/NotificationConfigurationPanel
plugin/pluginmanager/NewBundleDialog
plugin/whiteboard/gui/WhiteboardFrame
plugin/sshaccregwizz/FirstWizardPage
util/swing/GenericFileDialog
util/swing/SIPCommFileChooser
util/swing/SIPCommFileChooserImpl
util/swing/SIPCommFiledDialogImpl
util/swing/SIPCommFileFilter
slick/protocol/jabber/TestOperationSetMultiUserChat2

Cheers,
Yana

···

On Jan 18, 2010, at 9:21 AM, vmartinet@dev.java.net wrote:

Author: vmartinet
Date: 2010-01-18 08:21:03+0000
New Revision: 6639

Modified:
  trunk/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java
  trunk/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java

Log:
Yahoo: deleted useless things and fixed bug in creating a conference.

Modified: trunk/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java?view=diff&rev=6639&p1=trunk/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java&p2=trunk/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java&r1=6638&r2=6639

--- trunk/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/protocol/yahoo/AdHocChatRoomYahooImpl.java 2010-01-18 08:21:03+0000
@@ -292,14 +292,8 @@
    {
        try
        {
- // the contact is invited unless if he wasn't invited during room's
- // creation:
- if(!opSetMuc.getAlreadyInvitedContactAddresses().contains(
- userAddress))
- {
                provider.getYahooSession().extendConference(yahooConference,
                    userAddress, reason);
- }
        }
        catch (IOException ioe)
        {

Modified: trunk/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java?view=diff&rev=6639&p1=trunk/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java&p2=trunk/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java&r1=6638&r2=6639

--- trunk/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java (original)
+++ trunk/src/net/java/sip/communicator/impl/protocol/yahoo/OperationSetAdHocMultiUserChatYahooImpl.java 2010-01-18 08:21:03+0000
@@ -75,15 +75,6 @@
    private final MessageDecoder messageDecoder = new MessageDecoder();

    /**
- * Contacts who have been invited to a chat room during his creation (when a
- * Yahoo! chat room is created with contacts, an invitation to this chat
- * room is sent to each of them). These contacts are stored here in order to
- * avoid them to be invited again after room's creation.
- */
- private final List<String> alreadyInvitedContactAddresses
- = new Vector<String>();
-
- /**
     * Instantiates the user operation set with a currently valid instance of
     * the Yahoo protocol provider.
     *
@@ -238,27 +229,13 @@
                                                String reason)
        throws OperationFailedException
    {
- String[] invitedContacts = null; // parameter used for room's creation
-
- if (contacts != null)
- {
- int contactsIndex = 0;
-
- invitedContacts = new String[contacts.size()];
- for (Contact contact : contacts)
- {
- String contactAddress = contact.getAddress();
-
- invitedContacts[contactsIndex] = contactAddress;
- contactsIndex++;
-
- // contact's address is stored here in order to avoid this
- // contact to be invited again in the chat room implementation:
- this.alreadyInvitedContactAddresses.add(contactAddress);
- }
- }
-
- return createAdHocChatRoom(adHocRoomName, invitedContacts, reason);
+ String[] contactsToInvite = new String[contacts.size()];
+ for(int i=0; i<contacts.size(); i++)
+ { System.out.println(contacts.get(i).getAddress()+" is being invited");
+ contactsToInvite[i] = contacts.get(i).getAddress();
+ }
+ return createAdHocChatRoom(
+ adHocRoomName, contactsToInvite, reason);
    }

    /**
@@ -491,17 +468,6 @@
    }

    /**
- * Returns the Vector of addresses of the contacts invited during a chat
- * room creation.
- *
- * @return Vector<String> contact addresses
- */
- public List<String> getAlreadyInvitedContactAddresses()
- {
- return alreadyInvitedContactAddresses;
- }
-
- /**
     * Create a Message instance for sending arbitrary MIME-encoding content.
     *
     * @param content content value
@@ -649,13 +615,6 @@
                    Contact participant =
                        presenceOpSet.findContactByID(ev.getFrom());

- if (alreadyInvitedContactAddresses.contains(participant
- .getAddress()))
- {
- alreadyInvitedContactAddresses.remove(participant
- .getAddress());
- }
-
                    chatRoom.addChatRoomParticipant(participant);
                }
            }

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

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