From fbd82c797f0629bf640158ae7eba83be1c941ee6 Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Fri, 6 Dec 2013 11:48:51 +0200 Subject: [PATCH] Fixes on the phone status dispatch for call window chat button. --- resources/images/images.properties | 1 + .../impl/gui/buttons/chatSmallExtendedAway.png | Bin 0 -> 1992 bytes .../communicator/impl/gui/utils/Constants.java | 11 ++++++++--- .../communicator/impl/gui/utils/ImageLoader.java | 6 ++++++ .../protocol/SingleCallInProgressPolicy.java | 7 ++++--- 5 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 resources/images/impl/gui/buttons/chatSmallExtendedAway.png diff --git a/resources/images/images.properties b/resources/images/images.properties index 4f0331c0a..1af5fe552 100644 --- a/resources/images/images.properties +++ b/resources/images/images.properties @@ -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 diff --git a/resources/images/impl/gui/buttons/chatSmallExtendedAway.png b/resources/images/impl/gui/buttons/chatSmallExtendedAway.png new file mode 100644 index 0000000000000000000000000000000000000000..b0968be73a0a1e355192570f48d424f184ec0ded GIT binary patch literal 1992 zcmaJ?X;c$e7>%G}p&VrqTEMo~!-kSe80Dx3Qi&`|ML_Jt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qIscJXp||M!bB(8L0d3jqW&+Z~RV6AO>c%{kJ zP4X}NIW_tBj{Wy@|{rj+}od!^fG2K6=rPnS0xGWUZO$1YrWb}o{t@yy5*U9qs;+mbkZ|85BWIz{I?1`{rR=r H$j|-)N7^|A literal 0 HcmV?d00001 diff --git a/src/net/java/sip/communicator/impl/gui/utils/Constants.java b/src/net/java/sip/communicator/impl/gui/utils/Constants.java index 804793cd7..b6c61b657 100755 --- a/src/net/java/sip/communicator/impl/gui/utils/Constants.java +++ b/src/net/java/sip/communicator/impl/gui/utils/Constants.java @@ -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 diff --git a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java index 67f735bb1..ac82d7f79 100644 --- a/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java +++ b/src/net/java/sip/communicator/impl/gui/utils/ImageLoader.java @@ -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. */ diff --git a/src/net/java/sip/communicator/service/protocol/SingleCallInProgressPolicy.java b/src/net/java/sip/communicator/service/protocol/SingleCallInProgressPolicy.java index bf96d8025..44f6f5ce6 100644 --- a/src/net/java/sip/communicator/service/protocol/SingleCallInProgressPolicy.java +++ b/src/net/java/sip/communicator/service/protocol/SingleCallInProgressPolicy.java @@ -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;