Modified default chat room auto-open behaviour to OPEN_ON_MESSAGE.

fix-message-formatting 5282
Danny van Heumen 11 years ago
parent 29953c199f
commit 9be99cdeb2

@ -228,7 +228,7 @@ private void refreshValue()
propertyListener);
if(value == null)
value = MUCService.OPEN_ON_IMPORTANT_MESSAGE;
value = MUCService.DEFAULT_AUTO_OPEN_BEHAVIOUR;
if(value.equals(MUCService.OPEN_ON_ACTIVITY))
{

@ -24,9 +24,8 @@
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.Logger;
import org.jitsi.util.*;
import org.jdesktop.swingworker.SwingWorker;
import org.jitsi.util.*;
import org.osgi.framework.*;
/**
@ -214,7 +213,7 @@ public void messageReceived(ChatRoomMessageReceivedEvent evt)
sourceChatRoom.getParentProvider(),
sourceChatRoom.getIdentifier());
if(autoOpenConfig == null)
autoOpenConfig = MUCService.OPEN_ON_IMPORTANT_MESSAGE;
autoOpenConfig = MUCService.DEFAULT_AUTO_OPEN_BEHAVIOUR;
if(autoOpenConfig.equals(MUCService.OPEN_ON_ACTIVITY)
|| (autoOpenConfig.equals(MUCService.OPEN_ON_MESSAGE)

@ -8,8 +8,6 @@
import java.util.*;
import org.jitsi.service.resources.*;
import net.java.sip.communicator.plugin.desktoputil.chat.*;
import net.java.sip.communicator.service.contactsource.*;
import net.java.sip.communicator.service.customcontactactions.*;
@ -17,6 +15,8 @@
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
import org.jitsi.service.resources.*;
/**
* Implements <tt>CustomContactActionsService</tt> for MUC contact source.
*
@ -643,7 +643,7 @@ public String getText(SourceContact actionSource)
((ChatRoomSourceContact)actionSource).getProvider(),
((ChatRoomSourceContact)actionSource).getChatRoomID());
if(openAutomaticallyValue == null)
openAutomaticallyValue = MUCService.OPEN_ON_IMPORTANT_MESSAGE;
openAutomaticallyValue = MUCService.DEFAULT_AUTO_OPEN_BEHAVIOUR;
String openAutomaticallyKey = MUCService.autoOpenConfigValuesTexts
.get(openAutomaticallyValue);
return "<html>" + text + "...<br><font size=\"2\"><center> ("

@ -26,6 +26,11 @@ public abstract class MUCService
public static final String DISABLED_PROPERTY
= "net.java.sip.communicator.impl.muc.MUC_SERVICE_DISABLED";
/**
* Key for auto-open configuration entry.
*/
private static String AUTO_OPEN_CONFIG_KEY = "openAutomatically";
/**
* The value for chat room configuration property to open automatically on
* activity
@ -44,6 +49,11 @@ public abstract class MUCService
*/
public static String OPEN_ON_IMPORTANT_MESSAGE = "on_important_message";
/**
* The default for chat room auto-open behaviour.
*/
public static String DEFAULT_AUTO_OPEN_BEHAVIOUR = OPEN_ON_MESSAGE;
/**
* Map for the auto open configuration values and their text representation
*/
@ -73,7 +83,7 @@ public static void setChatRoomAutoOpenOption(
{
ConfigurationUtils.updateChatRoomProperty(
pps,
chatRoomId, "openAutomatically", value);
chatRoomId, AUTO_OPEN_CONFIG_KEY, value);
}
/**
@ -88,7 +98,7 @@ public static String getChatRoomAutoOpenOption(
{
return ConfigurationUtils.getChatRoomProperty(
pps,
chatRoomId, "openAutomatically");
chatRoomId, AUTO_OPEN_CONFIG_KEY);
}
/**

Loading…
Cancel
Save