From b828fa1150b2972a352ca4f46acdcdca3eb266ba Mon Sep 17 00:00:00 2001 From: Thomas M Date: Wed, 18 Jan 2017 23:43:25 +0100 Subject: VoiceCall Target resource (#37) * VoiceCall Target resource in chat/toolBars/ added. * Unneeded change forgotten to remove --- .../impl/gui/main/chat/toolBars/MainToolBar.java | 13 +++++++++---- .../jabber/OperationSetBasicTelephonyJabberImpl.java | 5 ++++- 2 files changed, 13 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java b/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java index 6905df9..7080d13 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java @@ -715,14 +715,19 @@ public class MainToolBar m.put(opSetClass, ct.getProtocolProvider()); UIContactDetailImpl d = new UIContactDetailImpl( - ct.getName(), + ct.getName() + (ct.getResourceName() == null + ? "" + : "/" + ct.getResourceName()), ct.getDisplayName(), null, - null, + (ct.getResourceName() == null + ? Arrays.asList(GuiActivator.getResources().getI18NString("service.gui.VIA") + ": " + + ct.getProtocolProvider().getAccountID().getAccountAddress()) + : null), null, m, null, - ct.getName()); + ct); PresenceStatus status = ct.getStatus(); byte[] statusIconBytes = status.getStatusIcon(); @@ -736,7 +741,7 @@ public class MainToolBar res.add(d); } - + Point location = new Point(callButton.getX(), callButton.getY() + callButton.getHeight()); diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java index 6853ae7..78027c0 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/OperationSetBasicTelephonyJabberImpl.java @@ -280,7 +280,10 @@ public class OperationSetBasicTelephonyJabberImpl Iterable sessionInitiateExtensions) throws OperationFailedException { - return createOutgoingCall(call, calleeAddress, null, null); + if (calleeAddress.contains("/")) + return createOutgoingCall(call, calleeAddress, calleeAddress, null); + else + return createOutgoingCall(call, calleeAddress, null, null); } /** -- cgit v1.1