aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2013-09-30 17:17:12 +0300
committerDamian Minkov <damencho@jitsi.org>2013-09-30 17:17:12 +0300
commitbb8762c9452666b59258d3c9906a51e3d3ef1588 (patch)
tree9cc3dc1c51ec978d256f1ff3e7f6c866917f0ab6 /src/net/java/sip
parent4014631dd5bbc5dbff0174e066f6c0691700cbcd (diff)
downloadjitsi-bb8762c9452666b59258d3c9906a51e3d3ef1588.zip
jitsi-bb8762c9452666b59258d3c9906a51e3d3ef1588.tar.gz
jitsi-bb8762c9452666b59258d3c9906a51e3d3ef1588.tar.bz2
Adds new property which can skip using default saved preferred provider when call using the call history.
Diffstat (limited to 'src/net/java/sip')
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallManager.java52
1 files changed, 49 insertions, 3 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
index d8144d8..4a4f8a2 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
@@ -62,6 +62,14 @@ public class CallManager
+ ".call.SHOW_DESKTOP_SHARING_WARNING";
/**
+ * The name of the property which indicates whether the preferred provider
+ * will be used when calling UIContact (call history).
+ */
+ private static final String USE_PREFERRED_PROVIDER_PROP
+ = "net.java.sip.communicator.impl.gui.main"
+ + ".call.USE_PREFERRED_PROVIDER_PROP";
+
+ /**
* The <tt>CallPanel</tt>s opened by <tt>CallManager</tt> (because
* <tt>CallContainer</tt> does not give access to such lists.)
*/
@@ -3692,6 +3700,36 @@ public class CallManager
JComponent invoker,
Point location)
{
+ call(uiContactDetailList,
+ uiContact,
+ isVideo,
+ isDesktop,
+ invoker,
+ location,
+ true);
+ }
+
+ /**
+ * Call any of the supplied details.
+ *
+ * @param uiContactDetailList the list with details to choose for calling
+ * @param uiContact the <tt>UIContactImpl</tt> to check what is enabled,
+ * available.
+ * @param isVideo if <tt>true</tt> will create video call.
+ * @param isDesktop if <tt>true</tt> will share the desktop.
+ * @param invoker the invoker component
+ * @param location the location where this was invoked.
+ * @param usePreferredProvider whether to use the <tt>uiContact</tt>
+ * preferredProvider if provided.
+ */
+ private static void call(List<UIContactDetail> uiContactDetailList,
+ UIContactImpl uiContact,
+ boolean isVideo,
+ boolean isDesktop,
+ JComponent invoker,
+ Point location,
+ boolean usePreferredProvider)
+ {
ChooseCallAccountPopupMenu chooseCallAccountPopupMenu = null;
Class<? extends OperationSet> opsetClass =
@@ -3737,8 +3775,11 @@ public class CallManager
{
UIContactDetail detail = uiContactDetailList.get(0);
- ProtocolProviderService preferredProvider
- = detail.getPreferredProtocolProvider(opsetClass);
+ ProtocolProviderService preferredProvider = null;
+
+ if(usePreferredProvider)
+ preferredProvider =
+ detail.getPreferredProtocolProvider(opsetClass);
List<ProtocolProviderService> providers = null;
String protocolName = null;
@@ -3853,12 +3894,17 @@ public class CallManager
= uiContact.getContactDetailsForOperationSet(
getOperationSetForCall(isVideo, isDesktop));
+ boolean usePreferredProvider =
+ GuiActivator.getConfigurationService().getBoolean(
+ USE_PREFERRED_PROVIDER_PROP, true);
+
call( telephonyContacts,
uiContactImpl,
isVideo,
isDesktop,
invoker,
- location);
+ location,
+ usePreferredProvider);
}
/**