Fixes on the phone status dispatch for call window chat button.

cusax-fix 4959
Damian Minkov 12 years ago
parent 1f27ff7ee7
commit fbd82c797f

@ -162,6 +162,7 @@ service.gui.buttons.CHAT_BUTTON_SMALL_WHITE=resources/images/impl/gui/buttons/ch
service.gui.buttons.CHAT_BUTTON_ONLINE_ICON=resources/images/impl/gui/buttons/chatSmallOnline.png
service.gui.buttons.CHAT_BUTTON_OFFLINE_ICON=resources/images/impl/gui/buttons/chatSmallOffline.png
service.gui.buttons.CHAT_BUTTON_AWAY_ICON=resources/images/impl/gui/buttons/chatSmallAway.png
service.gui.buttons.CHAT_BUTTON_EXTENDED_AWAY_ICON=resources/images/impl/gui/buttons/chatSmallExtendedAway.png
service.gui.buttons.CHAT_BUTTON_DND_ICON=resources/images/impl/gui/buttons/chatSmallDND.png
service.gui.buttons.CHAT_BUTTON_FFC_ICON=resources/images/impl/gui/buttons/chatSmallFree.png
service.gui.buttons.CHAT_BUTTON_ON_THE_PHONE_ICON=resources/images/impl/gui/buttons/chatSmallPhone.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

@ -348,18 +348,23 @@ public static BufferedImage getMessageStatusIcon(PresenceStatus status)
return ImageLoader
.getImage(ImageLoader.CHAT_BUTTON_OFFLINE_ICON);
}
else if(connectivity < PresenceStatus.AWAY_THRESHOLD)
else if(connectivity < PresenceStatus.EXTENDED_AWAY_THRESHOLD)
{
return ImageLoader
.getImage(ImageLoader.CHAT_BUTTON_DND_ICON);
}
else if(connectivity == PresenceStatus.AWAY_THRESHOLD)
else if(connectivity == PresenceStatus.EXTENDED_AWAY_THRESHOLD)
{
// the special status On The Phone is state
// between DND and AWAY states.
// between DND and EXTENDED AWAY states.
return ImageLoader
.getImage(ImageLoader.CHAT_BUTTON_ON_THE_PHONE_ICON);
}
else if(connectivity < PresenceStatus.AWAY_THRESHOLD)
{
return ImageLoader
.getImage(ImageLoader.CHAT_BUTTON_EXTENDED_AWAY_ICON);
}
else if(connectivity < PresenceStatus.AVAILABLE_THRESHOLD)
{
return ImageLoader

@ -1367,6 +1367,12 @@ public class ImageLoader
public static final ImageID CHAT_BUTTON_AWAY_ICON
= new ImageID("service.gui.buttons.CHAT_BUTTON_AWAY_ICON");
/**
* Chat button "away" icon.
*/
public static final ImageID CHAT_BUTTON_EXTENDED_AWAY_ICON
= new ImageID("service.gui.buttons.CHAT_BUTTON_EXTENDED_AWAY_ICON");
/**
* Chat button "free for chat" icon.
*/

@ -412,10 +412,11 @@ private void handleCallEvent(int type, CallEvent callEvent)
? PresenceStatus.AVAILABLE_THRESHOLD
: presence.getPresenceStatus().getStatus();
// between AVAILABLE and AWAY (>20, <= 31) are the busy
// statuses as DND and On the phone
// between AVAILABLE and EXTENDED AWAY (>20, <= 31) are
// the busy statuses as DND and On the phone
if (presenceStatus > PresenceStatus.ONLINE_THRESHOLD
&& presenceStatus <= PresenceStatus.AWAY_THRESHOLD)
&& presenceStatus <=
PresenceStatus.EXTENDED_AWAY_THRESHOLD)
{
rejectCallWithBusyHere(call);
return;

Loading…
Cancel
Save