From c42404dc832eee275113d3032790c83f81ab2c85 Mon Sep 17 00:00:00 2001 From: hristoterezov Date: Wed, 11 Dec 2013 10:58:57 +0200 Subject: [PATCH] Changes the chat room error messages to show in popup notifications instead of dialogs. --- .../conference/ConferenceChatManager.java | 26 ++++++++----------- .../communicator/impl/muc/MUCServiceImpl.java | 2 +- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java index 92e08de4c..744d97861 100644 --- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java +++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java @@ -412,14 +412,12 @@ public void localUserAdHocPresenceChanged( else if (evt.getEventType().equals( LocalUserAdHocChatRoomPresenceChangeEvent.LOCAL_USER_JOIN_FAILED)) { - new ErrorDialog( - GuiActivator.getUIService().getMainFrame(), - GuiActivator.getResources().getI18NString("service.gui.ERROR"), + GuiActivator.getAlertUIService().showAlertPopup( + GuiActivator.getResources().getI18NString("service.gui.ERROR"), GuiActivator.getResources().getI18NString( - "service.gui.FAILED_TO_JOIN_CHAT_ROOM", - new String[]{sourceAdHocChatRoom.getName()}) - + evt.getReason()) - .showDialog(); + "service.gui.FAILED_TO_JOIN_CHAT_ROOM", + new String[]{sourceAdHocChatRoom.getName()}) + + evt.getReason()); } else if (LocalUserAdHocChatRoomPresenceChangeEvent .LOCAL_USER_LEFT.equals(eventType) @@ -510,13 +508,12 @@ public void run() else if (LocalUserChatRoomPresenceChangeEvent .LOCAL_USER_JOIN_FAILED.equals(eventType)) { - new ErrorDialog( - GuiActivator.getUIService().getMainFrame(), - GuiActivator.getResources().getI18NString("service.gui.ERROR"), + GuiActivator.getAlertUIService().showAlertPopup( + GuiActivator.getResources().getI18NString("service.gui.ERROR"), GuiActivator.getResources().getI18NString( "service.gui.FAILED_TO_JOIN_CHAT_ROOM", - new String[]{sourceChatRoom.getName()}) + evt.getReason()) - .showDialog(); + new String[]{sourceChatRoom.getName()}) + + evt.getReason()); } else if (LocalUserChatRoomPresenceChangeEvent .LOCAL_USER_LEFT.equals(eventType) @@ -1053,10 +1050,9 @@ else if(SUBSCRIPTION_ALREADY_EXISTS.equals(returnCode)) if (!SUCCESS.equals(returnCode) && !AUTHENTICATION_FAILED.equals(returnCode)) { - new ErrorDialog( - GuiActivator.getUIService().getMainFrame(), + GuiActivator.getAlertUIService().showAlertPopup( GuiActivator.getResources().getI18NString( - "service.gui.ERROR"), errorMessage).showDialog(); + "service.gui.ERROR"), errorMessage); } } } diff --git a/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java b/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java index e05842c7e..0dc9b5bd8 100644 --- a/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java +++ b/src/net/java/sip/communicator/impl/muc/MUCServiceImpl.java @@ -794,7 +794,7 @@ else if(SUBSCRIPTION_ALREADY_EXISTS.equals(returnCode)) if (!SUCCESS.equals(returnCode) && !AUTHENTICATION_FAILED.equals(returnCode)) { - MUCActivator.getAlertUIService().showAlertDialog( + MUCActivator.getAlertUIService().showAlertPopup( resources.getI18NString("service.gui.ERROR"), errorMessage); }