Fixes case where no protocol providers offer telephony support.

cusax-fix
Sebastien Vincent 14 years ago
parent 3655866763
commit 95de7f628f

@ -780,9 +780,15 @@ private void initButtonsPanel(UIContact uiContact)
// for SourceContact in history that do not support telephony, we
// show the button but disabled
List<ProtocolProviderService> providers
= GuiActivator.getOpSetRegisteredProviders(
OperationSetBasicTelephony.class,
null,
null);
if (telephonyContact != null ||
uiContact.getDescriptor() instanceof SourceContact ||
hasPhone)
uiContact.getDescriptor() instanceof SourceContact ||
(hasPhone && providers.size() > 0))
{
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.NONE;

@ -532,7 +532,8 @@ private void init()
sendSmsItem.setName("sendSms");
}
if (callContactMenu.getItemCount() > 1 || hasPhones)
if (callContactMenu.getItemCount() > 1 ||
(hasPhones && callContactMenu.getItemCount() > 0))
{
this.add(callContactMenu);
}

Loading…
Cancel
Save