- Enables multiple line selection in the default contact list.

- Some minor code formatting and javadoc.
cusax-fix
Yana Stamcheva 16 years ago
parent b8f4551ede
commit 80f7da8aaa

@ -151,6 +151,12 @@ service.gui.buttons.MORE_ACTIONS_ROLLOVER_BUTTON=resources/images/impl/gui/butto
service.gui.buttons.HIDE_ACTIONS_BUTTON=resources/images/impl/gui/buttons/hideMoreActions.png
service.gui.buttons.HIDE_ACTIONS_ROLLOVER_BUTTON=resources/images/impl/gui/buttons/hideMoreActionsRollover.png
# Sound level icons
service.gui.soundlevel.SOUND_LEVEL_ACTIVE = resources/images/impl/gui/common/soundlevel/soundActive.png
service.gui.soundlevel.SOUND_LEVEL_INACTIVE = resources/images/impl/gui/common/soundlevel/soundInactive.png
service.gui.soundlevel.MICROPHONE = resources/images/impl/gui/common/soundlevel/Microphone.png
service.gui.soundlevel.HEADPHONE = resources/images/impl/gui/common/soundlevel/Headphone.png
# Smileys icons
service.gui.smileys.SMILEY1=resources/images/impl/gui/common/smileys/default/smiley1.gif
service.gui.smileys.SMILEY2=resources/images/impl/gui/common/smileys/default/smiley2.gif

@ -14,6 +14,6 @@ Import-Package: org.osgi.framework,
javax.swing.filechooser,
net.java.sip.communicator.util,
net.java.sip.communicator.util.xml,
net.java.sip.communicator.service.fileaccess,
net.java.sip.communicator.service.fileaccess
Export-Package: net.java.sip.communicator.service.fileaccess
Metadata-Location: /net/java/sip/communicator/impl/fileaccess/fileaccess.metadata.xml

@ -1150,12 +1150,7 @@ public boolean dispatchKeyEvent(KeyEvent e)
*/
public List<Chat> getChats()
{
List<Chat> chats = new ArrayList<Chat>();
for (ChatPanel chat : chatWindowManager.getChatPanels())
{
chats.add(chat);
}
return chats;
return new ArrayList<Chat>(chatWindowManager.getChatPanels());
}
/**

@ -171,7 +171,7 @@ private void initNetworkList()
networksList.add(wizard);
// is it the prefered protocol ?
// is it the preferred protocol ?
if(preferredWizardName != null
&& wizard.getClass().getName().equals(preferredWizardName))
{

@ -148,6 +148,8 @@ else if (status == FileTransferStatusChangeEvent.IN_PROGRESS)
{
progressBar.setVisible(true);
}
cancelButton.setVisible(true);
retryButton.setVisible(false);
}
else if (status == FileTransferStatusChangeEvent.COMPLETED)
{

@ -11,6 +11,7 @@
import java.util.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
@ -29,15 +30,28 @@ public class DefaultContactList
{
private static final long serialVersionUID = 0L;
protected Object[] currentlySelectedObjects;
public DefaultContactList()
{
this.setOpaque(false);
this.getSelectionModel().setSelectionMode(
ListSelectionModel.SINGLE_SELECTION);
ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
this.setTransferHandler(new ContactListTransferHandler(this));
this.setCellRenderer(new ContactListCellRenderer());
this.addListSelectionListener(new ListSelectionListener()
{
public void valueChanged(ListSelectionEvent e)
{
if (!e.getValueIsAdjusting())
{
currentlySelectedObjects = getSelectedValues();
}
}
});
}
/**

@ -110,8 +110,8 @@ public AddContactDialog(MainFrame mainFrame,
*/
private void init()
{
this.setTitle(
GuiActivator.getResources().getI18NString("service.gui.ADD_CONTACT"));
this.setTitle(GuiActivator.getResources()
.getI18NString("service.gui.ADD_CONTACT"));
this.setSize(520, 250);

@ -116,7 +116,6 @@ public RegistrationState getRegistrationState()
return joustSimStateToRegistrationState(connState);
}
/**
* Converts the specified joust sim connection state to a corresponding
* RegistrationState.
@ -508,7 +507,6 @@ protected void initialize(String screenname,
OperationSetServerStoredContactInfo.class.getName(),
serverStoredContactInfo);
OperationSetServerStoredAccountInfo serverStoredAccountInfo =
new OperationSetServerStoredAccountInfoIcqImpl
(infoRetreiver, screenname, this);
@ -653,7 +651,8 @@ public void fireRegistrationStateChanged( RegistrationState oldState,
lastRegistrationState = newState;
super.fireRegistrationStateChanged(oldState, newState, reasonCode, reason);
super.fireRegistrationStateChanged(
oldState, newState, reasonCode, reason);
}
/**
@ -909,10 +908,10 @@ public void gotMessage(Conversation con, MessageInfo minfo)
}
/**
* Fix for late close conenction due to
* Fix for late close connection due to
* multiple logins.
* Listening for incoming packets for the close command
* when this is received we discconect the session to force it
* when this is received we disconnect the session to force it
* because otherwise is wait for timeout of reading from the socket stream
* which leads to from 10 to 20 seconds delay of closing the session
* and connection

@ -1,12 +1,9 @@
/*
* MockMessage.java
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Created on Jun 21, 2007, 3:10:21 PM
*
* To change this template, choose Tools | Template Manager and open the
* template in the editor.
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.protocol.mock;
import net.java.sip.communicator.service.protocol.*;

@ -1,3 +1,9 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.protocol.mock;
import java.text.*;
@ -30,7 +36,6 @@ public class MockOperationSetBasicTelephony
*/
private Hashtable<String, Call> activeCalls = new Hashtable<String, Call>();
public MockOperationSetBasicTelephony(MockProvider protocolProvider)
{
this.protocolProvider = protocolProvider;

@ -1,3 +1,9 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.protocol.mock;
import java.io.*;

@ -7,7 +7,6 @@
package net.java.sip.communicator.util;
import java.awt.image.*;
import java.io.*;
import java.net.*;
import java.util.*;
@ -145,26 +144,32 @@ public static ResourceManagementService getResources()
return resourceService;
}
public static BufferedImage getImage(String key)
/**
* Returns the image corresponding to the given <tt>imageID</tt>.
*
* @param imageID the identifier of the image
* @return the image corresponding to the given <tt>imageID</tt>
*/
public static BufferedImage getImage(String imageID)
{
if (imageCache.containsKey(key))
return imageCache.get(key);
URL url = getResources().getImageURL(key);
BufferedImage image = null;
if (url != null)
URL path = getResources().getImageURL(imageID);
if (path == null)
{
try
{
image = ImageIO.read(url);
imageCache.put(key, image);
}
catch (IOException ex)
{
logger.error("Failed to load image " + key, ex);
}
return null;
}
try
{
image = ImageIO.read(path);
}
catch (Exception exc)
{
logger.error("Failed to load image:" + path, exc);
}
return image;
}
}

@ -140,7 +140,6 @@ public void setUp()
= System.getProperty(
JabberProtocolProviderServiceLick.CHAT_ROOM_NAME);
//find the protocol providers exported for the two accounts
ServiceReference[] jabberProvider1Refs
= bc.getServiceReferences(

Loading…
Cancel
Save