Adds options to disable group renaming and removing, and contact move and rename.

cusax-fix
Damian Minkov 13 years ago
parent d0f28b72ca
commit 8a1bba4b66

@ -867,7 +867,8 @@ private void initButtonsPanel(UIContact uiContact)
&& AccountUtils.getOpSetRegisteredProviders(
OperationSetDesktopSharingServer.class,
null,
null).size() > 0))
null).size() > 0)
|| hasVideoPhone)
{
x += addButton(desktopSharingButton, ++gridX, x, false);
}

@ -67,12 +67,20 @@ public GroupRightButtonMenu(MainFrame mainFrame, MetaContactGroup group)
this.mainFrame = mainFrame;
if (!ConfigurationUtils.isAddContactDisabled())
{
this.add(addContactItem);
this.addSeparator();
}
this.addSeparator();
if (!ConfigurationUtils.isGroupRenameDisabled())
{
this.add(renameGroupItem);
}
this.add(renameGroupItem);
this.add(removeGroupItem);
if (!ConfigurationUtils.isGroupRemoveDisabled())
{
this.add(removeGroupItem);
}
this.addContactItem.setMnemonic(GuiActivator.getResources()
.getI18nMnemonic("service.gui.ADD_CONTACT"));

@ -528,7 +528,8 @@ else if(d instanceof VideoDetail)
OperationSetDesktopSharingServer.class) != null &&
hasContactCapabilities(contact,
OperationSetDesktopSharingServer.class)
|| routingForDesktopEnabled)
|| routingForDesktopEnabled
|| hasVideoDetail)
{
multiContactFullShareMenu.add(
createMenuItem( contactAddress,
@ -659,21 +660,27 @@ else if(d instanceof VideoDetail)
addSeparator();
add(moveToMenu);
add(moveSubcontactMenu);
if (!ConfigurationUtils.isContactMoveDisabled())
{
add(moveToMenu);
add(moveSubcontactMenu);
addSeparator();
addSeparator();
}
if (!ConfigurationUtils.isAddContactDisabled())
{
add(addContactItem);
addSeparator();
}
addSeparator();
separator = false;
if (!ConfigurationUtils.isRemoveContactDisabled())
{
if (metaContact.getContactCount() > 1)
{
add(removeContactMenu);
separator = true;
}
else
{
@ -689,12 +696,20 @@ else if(d instanceof VideoDetail)
deleteIcon);
add(removeContactItem);
separator = true;
}
}
add(renameContactItem);
if (!ConfigurationUtils.isContactRenameDisabled())
{
add(renameContactItem);
separator = true;
}
addSeparator();
if(separator)
{
addSeparator();
}
add(viewHistoryItem);
@ -760,7 +775,8 @@ else if (authRequestItemCount == 1
if (metaContact.getDefaultContact(
OperationSetDesktopSharingServer.class) == null
&& !routingForDesktopEnabled)
&& !routingForDesktopEnabled
&& !hasVideoDetail)
{
fullShareMenuItem.setEnabled(false);
regionShareMenuItem.setEnabled(false);

@ -176,6 +176,27 @@ public class ConfigurationUtils
*/
private static boolean isRemoveContactDisabled;
/**
* Indicates if the move contact functionality is disabled.
*/
private static boolean isContactMoveDisabled;
/**
* Indicates if the rename contact functionality is disabled.
*/
private static boolean isContactRenameDisabled;
/**
* Indicates if the remove group functionality is disabled.
*/
private static boolean isGroupRemoveDisabled;
/**
* Indicates if the rename group functionality is disabled.
*/
private static boolean isGroupRenameDisabled;
/**
* Indicates if the pre set status messages are enabled.
*/
@ -639,6 +660,33 @@ public static void loadGuiConfigurations()
"CONTACT_REMOVE_DISABLED",
false);
// Load the "CONTACT_MOVE_DISABLED" property.
isContactMoveDisabled
= configService.getBoolean(
"net.java.sip.communicator.impl.gui.main.contactlist." +
"CONTACT_MOVE_DISABLED",
false);
// Load the "CONTACT_RENAME_DISABLED" property.
isContactRenameDisabled
= configService.getBoolean(
"net.java.sip.communicator.impl.gui.main.contactlist." +
"CONTACT_RENAME_DISABLED",
false);
// Load the "GROUP_REMOVE_DISABLED" property.
isGroupRemoveDisabled
= configService.getBoolean(
"net.java.sip.communicator.impl.gui.main.contactlist." +
"GROUP_REMOVE_DISABLED",
false);
// Load the "GROUP_RENAME_DISABLED" property.
isGroupRenameDisabled
= configService.getBoolean(
"net.java.sip.communicator.impl.gui.main.contactlist." +
"GROUP_RENAME_DISABLED",
false);
// Load the "PRESET_STATUS_MESSAGES" property.
isPresetStatusMessagesEnabled
= configService.getBoolean(
@ -1157,6 +1205,48 @@ public static boolean isRemoveContactDisabled()
return isRemoveContactDisabled;
}
/**
* Returns <code>true</code> if the "CONTACT_MOVE_DISABLED" property is
* true, otherwise - returns <code>false</code>.
* @return <code>true</code> if the "CONTACT_MOVE_DISABLED" property is
* true, otherwise - returns <code>false</code>.
*/
public static boolean isContactMoveDisabled()
{
return isContactMoveDisabled;
}
/**
* Returns <code>true</code> if the "CONTACT_RENAME_DISABLED" property is
* true, otherwise - returns <code>false</code>.
* @return <code>true</code> if the "CONTACT_RENAME_DISABLED" property is
* true, otherwise - returns <code>false</code>.
*/
public static boolean isContactRenameDisabled()
{
return isContactRenameDisabled;
}
/**
* Returns <code>true</code> if the "GROUP_REMOVE_DISABLED" property is
* true, otherwise - returns <code>false</code>.
* @return <code>true</code> if the "GROUP_REMOVE_DISABLED" property is
* true, otherwise - returns <code>false</code>.
*/
public static boolean isGroupRemoveDisabled()
{
return isGroupRemoveDisabled;
}
/**
* Returns <code>true</code> if the "GROUP_RENAME_DISABLED" property is
* true, otherwise - returns <code>false</code>.
* @return <code>true</code> if the "GROUP_RENAME_DISABLED" property is
* true, otherwise - returns <code>false</code>.
*/
public static boolean isGroupRenameDisabled()
{
return isGroupRenameDisabled;
}
/**
* Returns <code>true</code> if the "PRESET_STATUS_MESSAGES" property is
* true, otherwise - returns <code>false</code>.

Loading…
Cancel
Save