aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/net/java/sip/communicator/impl')
-rw-r--r--src/net/java/sip/communicator/impl/gui/GuiActivator.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/UIServiceImpl.java10
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/MainFrame.java11
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/SingleWindowContainer.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/CallManager.java10
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingButton.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java4
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java15
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java10
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java12
-rwxr-xr-xsrc/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java39
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java14
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java7
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java8
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomProviderWrapper.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomWrapper.java10
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatManager.java7
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java8
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/menus/OptionsMenu.java13
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java9
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java24
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java14
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableUI.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java6
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/CommonRightButtonMenu.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListModel.java8
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java10
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/GroupRightButtonMenu.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactListManager.java17
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java13
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java5
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/SourceContactRightButtonMenu.java3
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIGroup.java4
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java10
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java18
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java7
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/presence/AccountStatusPanel.java2
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java6
-rw-r--r--src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java2148
51 files changed, 201 insertions, 2348 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/GuiActivator.java b/src/net/java/sip/communicator/impl/gui/GuiActivator.java
index e04ff49..abb051a 100644
--- a/src/net/java/sip/communicator/impl/gui/GuiActivator.java
+++ b/src/net/java/sip/communicator/impl/gui/GuiActivator.java
@@ -11,7 +11,6 @@ import java.util.*;
import net.java.sip.communicator.impl.gui.main.account.*;
import net.java.sip.communicator.impl.gui.main.contactlist.*;
import net.java.sip.communicator.impl.gui.main.presence.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.browserlauncher.*;
import net.java.sip.communicator.service.callhistory.*;
import net.java.sip.communicator.service.contactlist.*;
@@ -127,7 +126,7 @@ public class GuiActivator implements BundleActivator
isStarted = true;
GuiActivator.bundleContext = bContext;
- ConfigurationManager.loadGuiConfigurations();
+ ConfigurationUtils.loadGuiConfigurations();
try
{
diff --git a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
index 4ff784d..9f2c290 100644
--- a/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
+++ b/src/net/java/sip/communicator/impl/gui/UIServiceImpl.java
@@ -138,7 +138,7 @@ public class UIServiceImpl
// Initialize the single window container if we're in this case. This
// should be done before initializing the main window, because he'll
// search for it.
- if (ConfigurationManager.isSingleWindowInterfaceEnabled())
+ if (ConfigurationUtils.isSingleWindowInterfaceEnabled())
singleWindowContainer = new SingleWindowContainer();
// Initialize the main window.
@@ -170,7 +170,7 @@ public class UIServiceImpl
this.wizardContainer = new AccountRegWizardContainerImpl(mainFrame);
- if (ConfigurationManager.isTransparentWindowEnabled())
+ if (ConfigurationUtils.isTransparentWindowEnabled())
{
try
{
@@ -179,11 +179,11 @@ public class UIServiceImpl
catch (UnsupportedOperationException ex)
{
logger.error(ex.getMessage(), ex);
- ConfigurationManager.setTransparentWindowEnabled(false);
+ ConfigurationUtils.setTransparentWindowEnabled(false);
}
}
- if(ConfigurationManager.isApplicationVisible())
+ if(ConfigurationUtils.isApplicationVisible())
mainFrame.setFrameVisible(true);
SwingUtilities.invokeLater(new RunLoginGui());
@@ -1148,7 +1148,7 @@ public class UIServiceImpl
.showDialog();
}
- ConfigurationManager.setTransparentWindowEnabled(false);
+ ConfigurationUtils.setTransparentWindowEnabled(false);
}
}
else if (propertyName.equals(
diff --git a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
index 191c86a..3f3aa8d 100644
--- a/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
+++ b/src/net/java/sip/communicator/impl/gui/main/MainFrame.java
@@ -22,7 +22,6 @@ import net.java.sip.communicator.impl.gui.main.chat.conference.*;
import net.java.sip.communicator.impl.gui.main.contactlist.*;
import net.java.sip.communicator.impl.gui.main.menus.*;
import net.java.sip.communicator.impl.gui.main.presence.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contacteventhandler.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.gui.*;
@@ -180,7 +179,7 @@ public class MainFrame
*/
public MainFrame()
{
- if (!ConfigurationManager.isWindowDecorated())
+ if (!ConfigurationUtils.isWindowDecorated())
{
this.setUndecorated(true);
}
@@ -1724,7 +1723,7 @@ public class MainFrame
*/
public void setFrameVisible(final boolean isVisible)
{
- ConfigurationManager.setApplicationVisible(isVisible);
+ ConfigurationUtils.setApplicationVisible(isVisible);
SwingUtilities.invokeLater(new Runnable(){
public void run()
@@ -1887,7 +1886,7 @@ public class MainFrame
{
public void run()
{
- if (ConfigurationManager.isQuitWarningShown())
+ if (ConfigurationUtils.isQuitWarningShown())
{
MessageDialog dialog =
new MessageDialog(null,
@@ -1897,12 +1896,12 @@ public class MainFrame
"service.gui.HIDE_MAIN_WINDOW"), false);
if (dialog.showDialog() == MessageDialog.OK_DONT_ASK_CODE)
- ConfigurationManager.setQuitWarningShown(false);
+ ConfigurationUtils.setQuitWarningShown(false);
}
}
});
- ConfigurationManager.setApplicationVisible(false);
+ ConfigurationUtils.setApplicationVisible(false);
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/SingleWindowContainer.java b/src/net/java/sip/communicator/impl/gui/main/SingleWindowContainer.java
index 3df56cc..1b3ba4d 100644
--- a/src/net/java/sip/communicator/impl/gui/main/SingleWindowContainer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/SingleWindowContainer.java
@@ -19,7 +19,6 @@ import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.call.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.main.chat.toolBars.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
@@ -282,7 +281,7 @@ public class SingleWindowContainer
MainFrame mainWindow = GuiActivator.getUIService().getMainFrame();
if(mainWindow.getExtendedState() != JFrame.ICONIFIED)
{
- if(ConfigurationManager.isAutoPopupNewMessage()
+ if(ConfigurationUtils.isAutoPopupNewMessage()
|| setSelected)
mainWindow.toFront();
}
@@ -414,7 +413,7 @@ public class SingleWindowContainer
northPanel.setBorder(BorderFactory.createEmptyBorder(3, 0, 3, 0));
northPanel.setPreferredSize(new Dimension(500, 35));
- northPanel.setVisible(ConfigurationManager.isChatToolbarVisible());
+ northPanel.setVisible(ConfigurationUtils.isChatToolbarVisible());
northPanel.add(mainToolBar, BorderLayout.EAST);
northPanel.add(contactPhotoPanel, BorderLayout.WEST);
diff --git a/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java b/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
index 1c6514a..5760662 100644
--- a/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/account/NewAccountDialog.java
@@ -117,7 +117,7 @@ public class NewAccountDialog
mainPanel.add(buttonPanel, BorderLayout.SOUTH);
- if (!ConfigurationManager.isAdvancedAccountConfigDisabled())
+ if (!ConfigurationUtils.isAdvancedAccountConfigDisabled())
{
buttonPanel.add(advancedButton, BorderLayout.WEST);
this.advancedButton.addActionListener(this);
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
index 63371ff..b9d244a 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/CallManager.java
@@ -92,7 +92,7 @@ public class CallManager
Call sourceCall = ev.getSourceCall();
boolean isVideoCall
= ev.isVideoCall()
- && ConfigurationManager.hasEnabledVideoFormat(
+ && ConfigurationUtils.hasEnabledVideoFormat(
sourceCall.getProtocolProvider());
final ReceivedCallDialog receivedCallDialog
= new ReceivedCallDialog(
@@ -783,7 +783,7 @@ public class CallManager
callString = callString.trim();
// Removes special characters from phone numbers.
- if (ConfigurationManager.isNormalizePhoneNumber())
+ if (ConfigurationUtils.isNormalizePhoneNumber())
callString = PhoneNumberI18nService.normalize(callString);
List<ProtocolProviderService> telephonyProviders
@@ -1768,7 +1768,7 @@ public class CallManager
Contact contact = this.contact;
String stringContact = this.stringContact;
- if (ConfigurationManager.isNormalizePhoneNumber())
+ if (ConfigurationUtils.isNormalizePhoneNumber())
{
if (contact != null)
{
@@ -2099,7 +2099,7 @@ public class CallManager
String[] contactArray
= contactList.toArray(new String[contactList.size()]);
- if (ConfigurationManager.isNormalizePhoneNumber())
+ if (ConfigurationUtils.isNormalizePhoneNumber())
normalizePhoneNumbers(contactArray);
/* Try to have a single Call per ProtocolProviderService. */
@@ -2231,7 +2231,7 @@ public class CallManager
if (opSetVideoBridge == null || !opSetVideoBridge.isActive())
return;
- if (ConfigurationManager.isNormalizePhoneNumber())
+ if (ConfigurationUtils.isNormalizePhoneNumber())
normalizePhoneNumbers(callees);
try
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingButton.java b/src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingButton.java
index fa85e47..a8a1627 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/DesktopSharingButton.java
@@ -14,6 +14,7 @@ import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
/**
* The button responsible to start(the <tt>Call</tt> of) an associated
@@ -71,7 +72,7 @@ public class DesktopSharingButton
"service.gui.NO_DESKTOP_SHARING_FOR_PROTOCOL"));
desktopSharingAvailable = false;
}
- else if(!ConfigurationManager.hasEnabledVideoFormat(
+ else if(!ConfigurationUtils.hasEnabledVideoFormat(
call.getProtocolProvider()))
{
setToolTipText(GuiActivator.getResources()
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java b/src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java
index 586008d..5b50e37 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/LocalVideoButton.java
@@ -11,6 +11,7 @@ import java.util.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
import org.jitsi.service.neomedia.*;
import org.jitsi.service.neomedia.device.*;
@@ -145,7 +146,7 @@ public class LocalVideoButton
hasVideoTelephony = true;
}
if (!hasEnabledVideoFormat
- && ConfigurationManager.hasEnabledVideoFormat(
+ && ConfigurationUtils.hasEnabledVideoFormat(
protocolProvider))
{
hasEnabledVideoFormat = true;
diff --git a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java
index d9ce3e4..b7231ba 100644
--- a/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/call/conference/ConferenceInviteDialog.java
@@ -148,7 +148,7 @@ public class ConferenceInviteDialog
// Store the last used account in order to pre-select it
// next time.
- ConfigurationManager.setLastCallConferenceProvider(
+ ConfigurationUtils.setLastCallConferenceProvider(
preselectedProtocolProvider);
dispose();
@@ -360,7 +360,7 @@ public class ConferenceInviteDialog
// Try to select the last used account if available.
ProtocolProviderService pps
- = ConfigurationManager.getLastCallConferenceProvider();
+ = ConfigurationUtils.getLastCallConferenceProvider();
if (pps == null && conference != null)
{
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java
index ac93932..ed66903 100755
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatConversationPanel.java
@@ -276,7 +276,7 @@ public class ChatConversationPanel
GuiActivator.getResources().getI18nMnemonic(
"service.gui.COPY_LINK"));
- this.isSimpleTheme = ConfigurationManager.isChatSimpleThemeEnabled();
+ this.isSimpleTheme = ConfigurationUtils.isChatSimpleThemeEnabled();
/*
* When we append a new message (regardless of whether it is a string or
@@ -1353,7 +1353,7 @@ public class ChatConversationPanel
this.document = (HTMLDocument) editorKit.createDefaultDocument();
Constants.loadSimpleStyle(
document.getStyleSheet(), chatTextPane.getFont());
- this.isSimpleTheme = ConfigurationManager.isChatSimpleThemeEnabled();
+ this.isSimpleTheme = ConfigurationUtils.isChatSimpleThemeEnabled();
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
index 725c296..9afa043 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatPanel.java
@@ -29,6 +29,7 @@ import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.service.metahistory.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
@@ -828,7 +829,7 @@ public class ChatPanel
return;
}
- if (ConfigurationManager.isHistoryShown() && !isHistoryLoaded)
+ if (ConfigurationUtils.isHistoryShown() && !isHistoryLoaded)
{
synchronized (incomingEventBuffer)
{
@@ -1407,7 +1408,7 @@ public class ChatPanel
fileTransferTransport.getDisplayName(),
file);
- if (ConfigurationManager.isHistoryShown() && !isHistoryLoaded)
+ if (ConfigurationUtils.isHistoryShown() && !isHistoryLoaded)
{
synchronized (incomingEventBuffer)
{
@@ -1839,7 +1840,7 @@ public class ChatPanel
// Load the last N=CHAT_HISTORY_SIZE messages from history.
historyList = chatSession.getHistory(
- ConfigurationManager.getChatHistorySize());
+ ConfigurationUtils.getChatHistorySize());
return historyList;
}
@@ -1983,7 +1984,7 @@ public class ChatPanel
writeMessagePanel.updateChatTransportStatus(chatTransport);
- if(ConfigurationManager.isShowStatusChangedInChat())
+ if(ConfigurationUtils.isShowStatusChangedInChat())
{
// Show a status message to the user.
this.addMessage(
@@ -1996,7 +1997,7 @@ public class ChatPanel
"text/plain");
}
- if(ConfigurationManager.isMultiChatWindowEnabled())
+ if(ConfigurationUtils.isMultiChatWindowEnabled())
{
if (getChatContainer().getChatCount() > 0)
{
@@ -2250,7 +2251,7 @@ public class ChatPanel
= new ReceiveFileConversationComponent(
this, fileTransferOpSet, request, date);
- if (ConfigurationManager.isHistoryShown() && !isHistoryLoaded)
+ if (ConfigurationUtils.isHistoryShown() && !isHistoryLoaded)
{
synchronized (incomingEventBuffer)
{
@@ -2558,7 +2559,7 @@ public class ChatPanel
= messagePane.getHeight() - dividerLocation
- messagePane.getDividerSize();
- ConfigurationManager
+ ConfigurationUtils
.setChatWriteAreaSize(writeAreaSize);
// writeMessagePanel.setPreferredSize(
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
index 07c758b..929e0de 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindow.java
@@ -101,7 +101,7 @@ public class ChatWindow
*/
public ChatWindow()
{
- if (!ConfigurationManager.isWindowDecorated())
+ if (!ConfigurationUtils.isWindowDecorated())
this.setUndecorated(true);
this.addWindowFocusListener(this);
@@ -109,7 +109,7 @@ public class ChatWindow
this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
//If in mode TABBED_CHAT_WINDOW initialize the tabbed pane
- if(ConfigurationManager.isMultiChatWindowEnabled())
+ if(ConfigurationUtils.isMultiChatWindowEnabled())
chatTabbedPane = new ConversationTabbedPane();
menuBar = new MessageWindowMenuBar(this);
@@ -204,7 +204,7 @@ public class ChatWindow
*/
public void addChat(final ChatPanel chatPanel)
{
- if (ConfigurationManager.isMultiChatWindowEnabled())
+ if (ConfigurationUtils.isMultiChatWindowEnabled())
addChatTab(chatPanel);
else
addSimpleChat(chatPanel);
@@ -230,7 +230,7 @@ public class ChatWindow
mainToolBar = new MainToolBar(this);
boolean chatToolbarVisible
- = ConfigurationManager.isChatToolbarVisible();
+ = ConfigurationUtils.isChatToolbarVisible();
if (OSUtils.IS_MAC)
{
@@ -1133,7 +1133,7 @@ public class ChatWindow
if(getExtendedState() != JFrame.ICONIFIED)
{
- if (ConfigurationManager.isAutoPopupNewMessage() || setSelected)
+ if (ConfigurationUtils.isAutoPopupNewMessage() || setSelected)
{
if (!isVisible())
setVisible(true);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java
index 06fbde5..eca47d1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWindowManager.java
@@ -16,11 +16,11 @@ import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.main.chat.conference.*;
import net.java.sip.communicator.impl.gui.main.chatroomslist.*;
import net.java.sip.communicator.impl.gui.main.contactlist.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.Logger;
import org.jitsi.util.*;
@@ -444,7 +444,7 @@ public class ChatWindowManager
synchronized (chatSyncRoot)
{
- if (ConfigurationManager.isMultiChatWindowEnabled())
+ if (ConfigurationUtils.isMultiChatWindowEnabled())
{
if (chatPanelsIter.hasNext())
{
@@ -1015,7 +1015,7 @@ public class ChatWindowManager
this.chatPanels.add(chatPanel);
}
- if (ConfigurationManager.isHistoryShown())
+ if (ConfigurationUtils.isHistoryShown())
chatPanel.loadHistory(escapedMessageID);
fireChatCreated(chatPanel);
@@ -1041,7 +1041,7 @@ public class ChatWindowManager
// If we're in a multi-window mode we have two possibilities - multi
// chat window or single chat windows.
- if (ConfigurationManager.isMultiChatWindowEnabled())
+ if (ConfigurationUtils.isMultiChatWindowEnabled())
{
Iterator<ChatPanel> chatPanelsIter = chatPanels.iterator();
@@ -1117,7 +1117,7 @@ public class ChatWindowManager
this.chatPanels.add(chatPanel);
}
- if (ConfigurationManager.isHistoryShown())
+ if (ConfigurationUtils.isHistoryShown())
chatPanel.loadHistory(escapedMessageID);
fireChatCreated(chatPanel);
@@ -1150,7 +1150,7 @@ public class ChatWindowManager
this.chatPanels.add(chatPanel);
}
- if (ConfigurationManager.isHistoryShown())
+ if (ConfigurationUtils.isHistoryShown())
chatPanel.loadHistory(escapedMessageID);
fireChatCreated(chatPanel);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java
index 44d965f..2851392 100755
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ChatWritePanel.java
@@ -20,7 +20,6 @@ import javax.swing.undo.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.conference.*;
import net.java.sip.communicator.impl.gui.main.chat.menus.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.gui.event.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
@@ -103,7 +102,7 @@ public class ChatWritePanel
centerPanel = createCenter();
- int chatAreaSize = ConfigurationManager.getChatWriteAreaSize();
+ int chatAreaSize = ConfigurationUtils.getChatWriteAreaSize();
Dimension writeMessagePanelDefaultSize
= new Dimension(500, (chatAreaSize > 0) ? chatAreaSize : 28);
Dimension writeMessagePanelMinSize = new Dimension(500, 28);
@@ -136,7 +135,7 @@ public class ChatWritePanel
this.changeSendCommand((messageCommand == null || messageCommand
.equalsIgnoreCase("enter")));
- if(ConfigurationManager.isFontSupportEnabled())
+ if(ConfigurationUtils.isFontSupportEnabled())
initDefaultFontConfiguration();
}
@@ -145,20 +144,20 @@ public class ChatWritePanel
*/
private void initDefaultFontConfiguration()
{
- String fontFamily = ConfigurationManager.getChatDefaultFontFamily();
- int fontSize = ConfigurationManager.getChatDefaultFontSize();
+ String fontFamily = ConfigurationUtils.getChatDefaultFontFamily();
+ int fontSize = ConfigurationUtils.getChatDefaultFontSize();
// Font family and size
if (fontFamily != null && fontSize > 0)
setFontFamilyAndSize(fontFamily, fontSize);
// Font style
- setBoldStyleEnable(ConfigurationManager.isChatFontBold());
- setItalicStyleEnable(ConfigurationManager.isChatFontItalic());
- setUnderlineStyleEnable(ConfigurationManager.isChatFontUnderline());
+ setBoldStyleEnable(ConfigurationUtils.isChatFontBold());
+ setItalicStyleEnable(ConfigurationUtils.isChatFontItalic());
+ setUnderlineStyleEnable(ConfigurationUtils.isChatFontUnderline());
// Font color
- Color fontColor = ConfigurationManager.getChatDefaultFontColor();
+ Color fontColor = ConfigurationUtils.getChatDefaultFontColor();
if (fontColor != null)
setFontColor(fontColor);
@@ -530,7 +529,7 @@ public class ChatWritePanel
*/
public void keyTyped(KeyEvent e)
{
- if (ConfigurationManager.isSendTypingNotifications())
+ if (ConfigurationUtils.isSendTypingNotifications())
{
if (typingState != OperationSetTypingNotifications.STATE_TYPING)
{
@@ -938,7 +937,7 @@ public class ChatWritePanel
chatPanel.getChatSession(),
chatPanel.getChatSession().getCurrentChatTransport());
- if(ConfigurationManager.isHideAccountSelectionWhenPossibleEnabled()
+ if(ConfigurationUtils.isHideAccountSelectionWhenPossibleEnabled()
&& transportSelectorBox.getMenu().getItemCount() <= 1)
transportSelectorBox.setVisible(false);
}
@@ -985,7 +984,7 @@ public class ChatWritePanel
}
else
{
- if( ConfigurationManager
+ if( ConfigurationUtils
.isHideAccountSelectionWhenPossibleEnabled()
&& transportSelectorBox.getMenu().getItemCount() <= 1)
{
@@ -1045,7 +1044,7 @@ public class ChatWritePanel
// it was hidden cause we wanted to hide when there is only one
// provider
if(!transportSelectorBox.isVisible()
- && ConfigurationManager
+ && ConfigurationUtils
.isHideAccountSelectionWhenPossibleEnabled()
&& transportSelectorBox.getMenu().getItemCount() > 1)
{
@@ -1087,7 +1086,7 @@ public class ChatWritePanel
transportSelectorBox.removeChatTransport(chatTransport);
if(transportSelectorBox.getMenu().getItemCount() == 1
- && ConfigurationManager.isHideAccountSelectionWhenPossibleEnabled())
+ && ConfigurationUtils.isHideAccountSelectionWhenPossibleEnabled())
{
transportSelectorBox.setVisible(false);
}
@@ -1128,12 +1127,12 @@ public class ChatWritePanel
boolean isUnderline,
Color color)
{
- ConfigurationManager.setChatDefaultFontFamily(fontFamily);
- ConfigurationManager.setChatDefaultFontSize(fontSize);
- ConfigurationManager.setChatFontIsBold(isBold);
- ConfigurationManager.setChatFontIsItalic(isItalic);
- ConfigurationManager.setChatFontIsUnderline(isUnderline);
- ConfigurationManager.setChatDefaultFontColor(color);
+ ConfigurationUtils.setChatDefaultFontFamily(fontFamily);
+ ConfigurationUtils.setChatDefaultFontSize(fontSize);
+ ConfigurationUtils.setChatFontIsBold(isBold);
+ ConfigurationUtils.setChatFontIsItalic(isItalic);
+ ConfigurationUtils.setChatFontIsUnderline(isUnderline);
+ ConfigurationUtils.setChatDefaultFontColor(color);
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java
index e36fe19..ba2e489 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/ContactPhotoPanel.java
@@ -124,7 +124,7 @@ public class ContactPhotoPanel extends JLayeredPane
// cannot be saved with add contact dialog
if (!chatSession.isDescriptorPersistent()
&& !(chatSession instanceof ConferenceChatSession)
- && !ConfigurationManager.isAddContactDisabled())
+ && !ConfigurationUtils.isAddContactDisabled())
this.add(addContactButton, 0);
else
this.remove(addContactButton);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java b/src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java
index 4945aed..bae7567 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/FontChooser.java
@@ -13,7 +13,7 @@ import javax.swing.*;
import javax.swing.event.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.impl.gui.utils.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
import org.jitsi.service.resources.*;
@@ -169,13 +169,13 @@ public class FontChooser
private void initDefaults()
{
String defaultFontFamily
- = ConfigurationManager.getChatDefaultFontFamily();
+ = ConfigurationUtils.getChatDefaultFontFamily();
int defaultFontSize
- = ConfigurationManager.getChatDefaultFontSize();
+ = ConfigurationUtils.getChatDefaultFontSize();
Color defaultFontColor
- = ConfigurationManager.getChatDefaultFontColor();
+ = ConfigurationUtils.getChatDefaultFontColor();
if (defaultFontFamily != null)
setFontFamily(defaultFontFamily);
@@ -183,9 +183,9 @@ public class FontChooser
if (defaultFontSize > 0)
setFontSize(defaultFontSize);
- setBoldStyle(ConfigurationManager.isChatFontBold());
- setItalicStyle(ConfigurationManager.isChatFontItalic());
- setUnderlineStyle(ConfigurationManager.isChatFontUnderline());
+ setBoldStyle(ConfigurationUtils.isChatFontBold());
+ setItalicStyle(ConfigurationUtils.isChatFontItalic());
+ setUnderlineStyle(ConfigurationUtils.isChatFontUnderline());
if (defaultFontColor != null)
setColor(defaultFontColor);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java b/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java
index 061369a..10c64b1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatSession.java
@@ -18,6 +18,7 @@ import net.java.sip.communicator.service.filehistory.*;
import net.java.sip.communicator.service.metahistory.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
+import net.java.sip.communicator.util.*;
/**
* An implementation of the <tt>ChatSession</tt> interface that represents a
@@ -111,7 +112,7 @@ public class MetaContactChatSession
return metaHistory.findLast(
chatHistoryFilter,
metaContact,
- ConfigurationManager.getChatHistorySize());
+ ConfigurationUtils.getChatHistorySize());
}
/**
@@ -134,7 +135,7 @@ public class MetaContactChatSession
return metaHistory.findLastMessagesBefore(
chatHistoryFilter,
- metaContact, date, ConfigurationManager.getChatHistorySize());
+ metaContact, date, ConfigurationUtils.getChatHistorySize());
}
/**
@@ -157,7 +158,7 @@ public class MetaContactChatSession
return metaHistory.findFirstMessagesAfter(
chatHistoryFilter,
- metaContact, date, ConfigurationManager.getChatHistorySize());
+ metaContact, date, ConfigurationUtils.getChatHistorySize());
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java b/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java
index 73a8ae9..110b7fb 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/MetaContactChatTransport.java
@@ -11,7 +11,6 @@ import java.net.*;
import javax.swing.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.util.*;
@@ -97,8 +96,8 @@ public class MetaContactChatTransport
*/
private void checkImCaps()
{
- if (ConfigurationManager.getChatDefaultFontFamily() != null
- && ConfigurationManager.getChatDefaultFontSize() > 0)
+ if (ConfigurationUtils.getChatDefaultFontFamily() != null
+ && ConfigurationUtils.getChatDefaultFontSize() > 0)
{
OperationSetBasicInstantMessaging imOpSet
= contact.getProtocolProvider()
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java
index 6d35818..104e837 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/AdHocConferenceChatSession.java
@@ -12,11 +12,11 @@ import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.metahistory.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.protocol.globalstatus.*;
+import net.java.sip.communicator.util.*;
/**
* An implementation of <tt>ChatSession</tt> for ad-hoc conference chatting.
@@ -145,7 +145,7 @@ public class AdHocConferenceChatSession
return metaHistory.findLast(
chatHistoryFilter,
chatRoomWrapper.getAdHocChatRoom(),
- ConfigurationManager.getChatHistorySize());
+ ConfigurationUtils.getChatHistorySize());
}
/**
@@ -170,7 +170,7 @@ public class AdHocConferenceChatSession
chatHistoryFilter,
chatRoomWrapper.getAdHocChatRoom(),
date,
- ConfigurationManager.getChatHistorySize());
+ ConfigurationUtils.getChatHistorySize());
}
/**
@@ -195,7 +195,7 @@ public class AdHocConferenceChatSession
chatHistoryFilter,
chatRoomWrapper.getAdHocChatRoom(),
date,
- ConfigurationManager.getChatHistorySize());
+ ConfigurationUtils.getChatHistorySize());
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomProviderWrapper.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomProviderWrapper.java
index 1d9c0c7..f1bd829 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomProviderWrapper.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomProviderWrapper.java
@@ -9,7 +9,6 @@ package net.java.sip.communicator.impl.gui.main.chat.conference;
import java.util.*;
import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
@@ -244,7 +243,7 @@ public class ChatRoomProviderWrapper
if(chatRoomWrapper.isAutojoin())
{
String nickName =
- ConfigurationManager.getChatRoomProperty(
+ ConfigurationUtils.getChatRoomProperty(
chatRoomWrapper.getParentProvider()
.getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName");
@@ -281,7 +280,7 @@ public class ChatRoomProviderWrapper
true);
String nickName =
- ConfigurationManager.getChatRoomProperty(
+ ConfigurationUtils.getChatRoomProperty(
chatRoomWrapper.getParentProvider()
.getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName");
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java
index 85da533..39c6af8 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomSubjectPanel.java
@@ -82,7 +82,7 @@ public class ChatRoomSubjectPanel
ChatRoomMemberRole role = ((ChatRoomWrapper)chatSession.getDescriptor())
.getChatRoom().getUserRole();
- if(!ConfigurationManager.isChatRoomConfigDisabled()
+ if(!ConfigurationUtils.isChatRoomConfigDisabled()
&& (role.equals(ChatRoomMemberRole.ADMINISTRATOR)
|| role.equals(ChatRoomMemberRole.MODERATOR)
|| role.equals(ChatRoomMemberRole.OWNER)))
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomWrapper.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomWrapper.java
index 8bb58cb..de43ce0 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomWrapper.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ChatRoomWrapper.java
@@ -6,8 +6,8 @@
*/
package net.java.sip.communicator.impl.gui.main.chat.conference;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
/**
* The <tt>ChatRoomWrapper</tt> is the representation of the <tt>ChatRoom</tt>
@@ -180,7 +180,7 @@ public class ChatRoomWrapper
{
if(autoJoin == null)
{
- String val = ConfigurationManager.getChatRoomProperty(
+ String val = ConfigurationUtils.getChatRoomProperty(
getParentProvider().getProtocolProvider(),
getChatRoomID(), AUTOJOIN_PROPERTY_NAME);
@@ -206,7 +206,7 @@ public class ChatRoomWrapper
{
setPersistent(true);
- ConfigurationManager.saveChatRoom(
+ ConfigurationUtils.saveChatRoom(
getParentProvider().getProtocolProvider(),
getChatRoomID(),
getChatRoomID(),
@@ -215,13 +215,13 @@ public class ChatRoomWrapper
if(value)
{
- ConfigurationManager.updateChatRoomProperty(
+ ConfigurationUtils.updateChatRoomProperty(
getParentProvider().getProtocolProvider(),
chatRoomID, AUTOJOIN_PROPERTY_NAME, Boolean.toString(autoJoin));
}
else
{
- ConfigurationManager.updateChatRoomProperty(
+ ConfigurationUtils.updateChatRoomProperty(
getParentProvider().getProtocolProvider(),
chatRoomID, AUTOJOIN_PROPERTY_NAME, null);
}
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 d7f557a..0751784 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
@@ -14,7 +14,6 @@ import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.main.chat.history.*;
import net.java.sip.communicator.impl.gui.main.chatroomslist.*;
import net.java.sip.communicator.impl.gui.main.chatroomslist.joinforms.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
@@ -1128,7 +1127,7 @@ public class ConferenceChatManager
// We save the choice of the user, before the chat room is really
// joined, because even the join fails we want the next time when
// we login to join this chat room automatically.
- ConfigurationManager.updateChatRoomStatus(
+ ConfigurationUtils.updateChatRoomStatus(
chatRoomWrapper.getParentProvider().getProtocolProvider(),
chatRoomWrapper.getChatRoomID(),
GlobalStatusEnum.OFFLINE_STATUS);
@@ -1525,7 +1524,7 @@ public class ConferenceChatManager
catch (ExecutionException ignore)
{}
- ConfigurationManager.updateChatRoomStatus(
+ ConfigurationUtils.updateChatRoomStatus(
chatRoomWrapper.getParentProvider().getProtocolProvider(),
chatRoomWrapper.getChatRoomID(),
GlobalStatusEnum.ONLINE_STATUS);
@@ -1662,7 +1661,7 @@ public class ConferenceChatManager
catch (ExecutionException ignore)
{}
- ConfigurationManager.updateChatRoomStatus(
+ ConfigurationUtils.updateChatRoomStatus(
adHocChatRoomWrapper.getParentProvider().getProtocolProvider(),
adHocChatRoomWrapper.getAdHocChatRoomID(),
GlobalStatusEnum.ONLINE_STATUS);
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java
index 40e3e4c..d8e3a4b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/conference/ConferenceChatSession.java
@@ -12,11 +12,11 @@ import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.metahistory.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.event.*;
import net.java.sip.communicator.service.protocol.globalstatus.*;
+import net.java.sip.communicator.util.*;
/**
* An implementation of <tt>ChatSession</tt> for conference chatting.
@@ -96,7 +96,7 @@ public class ConferenceChatSession
*/
public void dispose()
{
- if(ConfigurationManager.isLeaveChatRoomOnWindowCloseEnabled())
+ if(ConfigurationUtils.isLeaveChatRoomOnWindowCloseEnabled())
{
ChatRoom chatRoom = chatRoomWrapper.getChatRoom();
chatRoom.removeMemberPresenceListener(this);
@@ -181,7 +181,7 @@ public class ConferenceChatSession
return metaHistory.findLast(
chatHistoryFilter,
chatRoomWrapper.getChatRoom(),
- ConfigurationManager.getChatHistorySize());
+ ConfigurationUtils.getChatHistorySize());
}
/**
@@ -231,7 +231,7 @@ public class ConferenceChatSession
chatHistoryFilter,
chatRoomWrapper.getChatRoom(),
date,
- ConfigurationManager.getChatHistorySize());
+ ConfigurationUtils.getChatHistorySize());
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java b/src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java
index 50cb359..82aa8d1 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/menus/EditMenu.java
@@ -13,6 +13,7 @@ import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.utils.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
@@ -68,7 +69,7 @@ public class EditMenu
this.add(copyMenuItem);
this.add(pasteMenuItem);
- if(ConfigurationManager.isFontSupportEnabled())
+ if(ConfigurationUtils.isFontSupportEnabled())
{
this.addSeparator();
this.fontDialogMenuItem.setName("font");
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java b/src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java
index f188fc0..260734b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/menus/FileMenu.java
@@ -15,6 +15,7 @@ import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.main.chat.history.*;
import net.java.sip.communicator.impl.gui.main.chatroomslist.*;
import net.java.sip.communicator.impl.gui.utils.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
@@ -57,7 +58,7 @@ public class FileMenu
this.setMnemonic(
GuiActivator.getResources().getI18nMnemonic("service.gui.FILE"));
- if (!ConfigurationManager.isGoToChatroomDisabled())
+ if (!ConfigurationUtils.isGoToChatroomDisabled())
{
this.add(myChatRoomsItem);
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/menus/OptionsMenu.java b/src/net/java/sip/communicator/impl/gui/main/chat/menus/OptionsMenu.java
index 86cc8bf..9511adf 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/menus/OptionsMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/menus/OptionsMenu.java
@@ -15,6 +15,7 @@ import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.utils.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
/**
* The <tt>OptionMenu</tt> is a menu in the chat window menu bar.
@@ -75,13 +76,13 @@ public class OptionsMenu
private void initValues()
{
this.viewToolBar.setSelected(
- ConfigurationManager.isChatToolbarVisible());
+ ConfigurationUtils.isChatToolbarVisible());
this.viewSmileys.setSelected(
- ConfigurationManager.isShowSmileys());
+ ConfigurationUtils.isShowSmileys());
this.chatSimpleTheme.setSelected(
- ConfigurationManager.isChatSimpleThemeEnabled());
+ ConfigurationUtils.isChatSimpleThemeEnabled());
}
/**
@@ -96,16 +97,16 @@ public class OptionsMenu
if (action.equals(ACTCMD_VIEW_TOOLBAR))
{
this.chatWindow.setToolbarVisible(viewToolBar.isSelected());
- ConfigurationManager
+ ConfigurationUtils
.setChatToolbarVisible(viewToolBar.isSelected());
}
else if (action.equals(ACTCMD_VIEW_SMILEYS))
{
- ConfigurationManager.setShowSmileys(viewSmileys.isSelected());
+ ConfigurationUtils.setShowSmileys(viewSmileys.isSelected());
}
else if (action.equals(ACTCMD_VIEW_SIMPLE_THEME))
{
- ConfigurationManager.setChatSimpleThemeEnabled(
+ ConfigurationUtils.setChatSimpleThemeEnabled(
chatSimpleTheme.isSelected());
List<ChatPanel> currentChats = chatWindow.getChats();
diff --git a/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java b/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java
index d8a4746..c3e5c91 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chat/toolBars/MainToolBar.java
@@ -30,6 +30,7 @@ import net.java.sip.communicator.service.protocol.ServerStoredDetails.FaxDetail;
import net.java.sip.communicator.service.protocol.ServerStoredDetails.GenericDetail;
import net.java.sip.communicator.service.protocol.ServerStoredDetails.PagerDetail;
import net.java.sip.communicator.service.protocol.ServerStoredDetails.PhoneNumberDetail;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
import net.java.sip.communicator.util.swing.SwingWorker;
@@ -182,7 +183,7 @@ public class MainToolBar
// if we leave a chat room when we close the window
// there is no need for this button
- if(!ConfigurationManager.isLeaveChatRoomOnWindowCloseEnabled())
+ if(!ConfigurationUtils.isLeaveChatRoomOnWindowCloseEnabled())
this.add(leaveChatRoomButton);
this.add(callButton);
@@ -215,7 +216,7 @@ public class MainToolBar
this.addSeparator();
- if(ConfigurationManager.isFontSupportEnabled())
+ if(ConfigurationUtils.isFontSupportEnabled())
{
this.add(fontButton);
fontButton.setName("font");
@@ -444,11 +445,11 @@ public class MainToolBar
{
SipCommFileChooser scfc = GenericFileDialog.create(
null, "Send file...", SipCommFileChooser.LOAD_FILE_OPERATION,
- ConfigurationManager.getSendFileLastDir());
+ ConfigurationUtils.getSendFileLastDir());
File selectedFile = scfc.getFileFromDialog();
if(selectedFile != null)
{
- ConfigurationManager.setSendFileLastDir(
+ ConfigurationUtils.setSendFileLastDir(
selectedFile.getParent());
chatContainer.getCurrentChat().sendFile(selectedFile);
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java
index 4ef442d..9cee780 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomList.java
@@ -10,7 +10,6 @@ import java.util.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.chat.conference.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.util.*;
@@ -213,7 +212,7 @@ public class ChatRoomList
if (chatRoomWrapper.isPersistent())
{
- ConfigurationManager.saveChatRoom(
+ ConfigurationUtils.saveChatRoom(
chatRoomProvider.getProtocolProvider(),
chatRoomWrapper.getChatRoomID(),
chatRoomWrapper.getChatRoomID(),
@@ -237,7 +236,7 @@ public class ChatRoomList
if (chatRoomWrapper.isPersistent())
{
- ConfigurationManager.saveChatRoom(
+ ConfigurationUtils.saveChatRoom(
chatRoomProvider.getProtocolProvider(),
chatRoomWrapper.getChatRoomID(),
null, // The new identifier.
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java
index 3bcba30..e6cc86b 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomRightButtonMenu.java
@@ -19,6 +19,7 @@ import net.java.sip.communicator.impl.gui.main.chatroomslist.joinforms.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.resources.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
import org.jitsi.service.resources.*;
@@ -117,7 +118,7 @@ public class ChatRoomRightButtonMenu
String nickName = null;
nickName =
- ConfigurationManager.getChatRoomProperty(
+ ConfigurationUtils.getChatRoomProperty(
chatRoomWrapper.getParentProvider()
.getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName");
@@ -138,7 +139,7 @@ public class ChatRoomRightButtonMenu
String nickName = null;
nickName =
- ConfigurationManager.getChatRoomProperty(
+ ConfigurationUtils.getChatRoomProperty(
chatRoomWrapper.getParentProvider()
.getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName");
@@ -166,15 +167,15 @@ public class ChatRoomRightButtonMenu
"",
false,
true);
-
+
String nickName = null;
-
+
nickName =
- ConfigurationManager.getChatRoomProperty(
+ ConfigurationUtils.getChatRoomProperty(
chatRoomWrapper.getParentProvider()
.getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName");
-
+
if(nickName == null)
nickName = getNickname();
@@ -202,13 +203,13 @@ public class ChatRoomRightButtonMenu
else if(itemName.equals("nickNameChatRoom"))
{
String nickName = null;
-
+
nickName =
- ConfigurationManager.getChatRoomProperty(
+ ConfigurationUtils.getChatRoomProperty(
chatRoomWrapper.getParentProvider()
.getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName");
-
+
ChatOperationReasonDialog reasonDialog =
new ChatOperationReasonDialog(GuiActivator.getResources()
.getI18NString("service.gui.CHANGE_NICKNAME"), GuiActivator
@@ -225,11 +226,10 @@ public class ChatRoomRightButtonMenu
{
nickName = reasonDialog.getReason().trim();
}
-
- ConfigurationManager.updateChatRoomProperty(chatRoomWrapper
+
+ ConfigurationUtils.updateChatRoomProperty(chatRoomWrapper
.getParentProvider().getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName", nickName);
-
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java
index 7ea29eb..a6c2bc5 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableDialog.java
@@ -19,8 +19,8 @@ import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.main.chat.conference.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
import org.jitsi.util.*;
@@ -363,7 +363,7 @@ public class ChatRoomTableDialog
{
nickName = reasonDialog.getReason().trim();
- ConfigurationManager.updateChatRoomProperty(
+ ConfigurationUtils.updateChatRoomProperty(
getSelectedProvider().getProtocolProvider(),
chatRoomWrapper.getChatRoomID(), "userNickName", nickName);
}
@@ -410,7 +410,7 @@ public class ChatRoomTableDialog
{
nickName = reasonDialog.getReason().trim();
- ConfigurationManager.updateChatRoomProperty(
+ ConfigurationUtils.updateChatRoomProperty(
getSelectedProvider().getProtocolProvider(),
chatRoomWrapper.getChatRoomID(), "userNickName",
nickName);
@@ -434,7 +434,7 @@ public class ChatRoomTableDialog
if (!selectedRoom.getChatRoom().isJoined())
{
String savedNick =
- ConfigurationManager.getChatRoomProperty(
+ ConfigurationUtils.getChatRoomProperty(
selectedRoom.getParentProvider()
.getProtocolProvider(), selectedRoom
.getChatRoomID(), "userNickName");
@@ -461,7 +461,7 @@ public class ChatRoomTableDialog
true);
String savedNick =
- ConfigurationManager.getChatRoomProperty(
+ ConfigurationUtils.getChatRoomProperty(
chatRoomWrapper.getParentProvider()
.getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName");
@@ -486,12 +486,12 @@ public class ChatRoomTableDialog
{
nickName = reasonDialog.getReason().trim();
- ConfigurationManager.updateChatRoomProperty(
+ ConfigurationUtils.updateChatRoomProperty(
getSelectedProvider().getProtocolProvider(),
chatRoomWrapper.getChatRoomID(),
"userNickName", nickName);
}
-
+
GuiActivator.getUIService().getConferenceChatManager()
.joinChatRoom(chatRoomWrapper,nickName,null);
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableUI.java b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableUI.java
index fba6560..9d9cbd8 100644
--- a/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableUI.java
+++ b/src/net/java/sip/communicator/impl/gui/main/chatroomslist/ChatRoomTableUI.java
@@ -20,6 +20,7 @@ import net.java.sip.communicator.impl.gui.main.chat.*;
import net.java.sip.communicator.impl.gui.main.chat.conference.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
/**
@@ -170,7 +171,7 @@ public class ChatRoomTableUI
}
String savedNick =
- ConfigurationManager.getChatRoomProperty(chatRoomWrapper
+ ConfigurationUtils.getChatRoomProperty(chatRoomWrapper
.getParentProvider().getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName");
@@ -192,7 +193,7 @@ public class ChatRoomTableUI
{
nickName = reasonDialog.getReason().trim();
- ConfigurationManager.updateChatRoomProperty(chatRoomWrapper
+ ConfigurationUtils.updateChatRoomProperty(chatRoomWrapper
.getParentProvider().getProtocolProvider(), chatRoomWrapper
.getChatRoomID(), "userNickName", nickName);
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
index d6bd128..e0a8979 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/AddContactDialog.java
@@ -165,7 +165,7 @@ public class AddContactDialog
// we have an empty choice and one account
if(accountCombo.getItemCount() > 2
|| (accountCombo.getItemCount() == 2
- && !ConfigurationManager
+ && !ConfigurationUtils
.isHideAccountSelectionWhenPossibleEnabled()))
{
labelsPanel.add(accountLabel);
@@ -213,7 +213,7 @@ public class AddContactDialog
this.getContentPane().add(mainPanel, BorderLayout.CENTER);
- if(ConfigurationManager.isHideAccountSelectionWhenPossibleEnabled())
+ if(ConfigurationUtils.isHideAccountSelectionWhenPossibleEnabled())
this.setPreferredSize(new Dimension(450, 205));
else
this.setPreferredSize(new Dimension(450, 250));
@@ -327,7 +327,7 @@ public class AddContactDialog
final String newGroupString = GuiActivator.getResources()
.getI18NString("service.gui.CREATE_GROUP");
- if (!ConfigurationManager.isCreateGroupDisabled())
+ if (!ConfigurationUtils.isCreateGroupDisabled())
{
groupCombo.addItem(newGroupString);
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/CommonRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/CommonRightButtonMenu.java
index a2cdbbd..f2cf1f0 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/CommonRightButtonMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/CommonRightButtonMenu.java
@@ -14,6 +14,7 @@ import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.contactlist.addgroup.*;
import net.java.sip.communicator.impl.gui.utils.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
@@ -48,10 +49,10 @@ public class CommonRightButtonMenu
{
this.mainFrame = mainFrame;
- if (!ConfigurationManager.isAddContactDisabled())
+ if (!ConfigurationUtils.isAddContactDisabled())
this.add(addContactItem);
- if (!ConfigurationManager.isCreateGroupDisabled())
+ if (!ConfigurationUtils.isCreateGroupDisabled())
this.add(createGroupItem);
this.addContactItem.setMnemonic(GuiActivator.getResources()
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListModel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListModel.java
index 6763353..1ecdb50 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListModel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListModel.java
@@ -10,9 +10,9 @@ import java.util.*;
import javax.swing.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
/**
* Implements <tt>ListModel</tt> for <tt>MetaContactListService</tt> in order to
@@ -383,7 +383,7 @@ public class ContactListModel
this.closedGroups.add(group);
- ConfigurationManager.setContactListGroupCollapsed(
+ ConfigurationUtils.setContactListGroupCollapsed(
group.getMetaUID(),
true);
}
@@ -402,7 +402,7 @@ public class ContactListModel
contentAdded(this.indexOf(group.getMetaContact(0)), this.indexOf(group
.getMetaContact(countContactsAndSubgroups(group) - 1)));
- ConfigurationManager.setContactListGroupCollapsed(
+ ConfigurationUtils.setContactListGroupCollapsed(
group.getMetaUID(),
false);
}
@@ -516,7 +516,7 @@ public class ContactListModel
private void initGroupsStatus(MetaContactGroup group)
{
- boolean isClosed = ConfigurationManager
+ boolean isClosed = ConfigurationUtils
.isContactListGroupCollapsed(group.getMetaUID());
if (isClosed)
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
index 430b485..594b742 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/ContactListTreeCellRenderer.java
@@ -842,7 +842,7 @@ public class ContactListTreeCellRenderer
OperationSetVideoTelephony.class);
if (videoContact != null
- || (ConfigurationManager
+ || (ConfigurationUtils
.isRouteVideoAndDesktopUsingPhoneNumberEnabled()
&& hasPhone
&& GuiActivator.getOpSetRegisteredProviders(
@@ -858,7 +858,7 @@ public class ContactListTreeCellRenderer
OperationSetDesktopSharingServer.class);
if (desktopContact != null
- || (ConfigurationManager
+ || (ConfigurationUtils
.isRouteVideoAndDesktopUsingPhoneNumberEnabled()
&& hasPhone
&& GuiActivator.getOpSetRegisteredProviders(
@@ -870,7 +870,7 @@ public class ContactListTreeCellRenderer
}
if (uiContact.getDescriptor() instanceof SourceContact
- && !ConfigurationManager.isAddContactDisabled())
+ && !ConfigurationUtils.isAddContactDisabled())
{
x += addButton(addContactButton, ++gridX, x, false);
}
@@ -1113,7 +1113,7 @@ public class ContactListTreeCellRenderer
= contactDescriptor.getContactDetailsForOperationSet(
OperationSetVideoTelephony.class);
- if(ConfigurationManager.isRouteVideoAndDesktopUsingPhoneNumberEnabled()
+ if(ConfigurationUtils.isRouteVideoAndDesktopUsingPhoneNumberEnabled()
&& contactDescriptor.getDescriptor() instanceof MetaContact)
{
videoContacts.addAll(CallManager.getAdditionalNumbers(
@@ -1230,7 +1230,7 @@ public class ContactListTreeCellRenderer
= contactDescriptor.getContactDetailsForOperationSet(
OperationSetDesktopSharingServer.class);
- if(ConfigurationManager.isRouteVideoAndDesktopUsingPhoneNumberEnabled()
+ if(ConfigurationUtils.isRouteVideoAndDesktopUsingPhoneNumberEnabled()
&& contactDescriptor.getDescriptor() instanceof MetaContact)
{
desktopContacts.addAll(CallManager.getAdditionalNumbers(
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/GroupRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/GroupRightButtonMenu.java
index 8c45425..6512a97 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/GroupRightButtonMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/GroupRightButtonMenu.java
@@ -66,7 +66,7 @@ public class GroupRightButtonMenu
this.group = group;
this.mainFrame = mainFrame;
- if (!ConfigurationManager.isAddContactDisabled())
+ if (!ConfigurationUtils.isAddContactDisabled())
this.add(addContactItem);
this.addSeparator();
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactListManager.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactListManager.java
index eb074c5..cc6859a 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactListManager.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactListManager.java
@@ -13,6 +13,7 @@ import net.java.sip.communicator.impl.gui.customcontrols.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
/**
@@ -140,7 +141,7 @@ public class MetaContactListManager
@SuppressWarnings("fallthrough") //intentional
public void run()
{
- if (!ConfigurationManager.isMoveContactConfirmationRequested())
+ if (!ConfigurationUtils.isMoveContactConfirmationRequested())
{
// we move the specified contact
GuiActivator.getContactListService()
@@ -165,7 +166,7 @@ public class MetaContactListManager
switch (dialog.showDialog())
{
case MessageDialog.OK_DONT_ASK_CODE:
- ConfigurationManager.setMoveContactConfirmationRequested(false);
+ ConfigurationUtils.setMoveContactConfirmationRequested(false);
// do fall through
case MessageDialog.OK_RETURN_CODE:
@@ -196,7 +197,7 @@ public class MetaContactListManager
@SuppressWarnings("fallthrough") //intentional
public void run()
{
- if (!ConfigurationManager.isMoveContactConfirmationRequested())
+ if (!ConfigurationUtils.isMoveContactConfirmationRequested())
{
// We move all subcontacts of the source MetaContact to the
// destination MetaContact.
@@ -221,7 +222,7 @@ public class MetaContactListManager
switch (dialog.showDialog())
{
case MessageDialog.OK_DONT_ASK_CODE:
- ConfigurationManager.setMoveContactConfirmationRequested(false);
+ ConfigurationUtils.setMoveContactConfirmationRequested(false);
// do fall through
case MessageDialog.OK_RETURN_CODE:
@@ -266,7 +267,7 @@ public class MetaContactListManager
public void run()
{
- if (!ConfigurationManager.isMoveContactConfirmationRequested())
+ if (!ConfigurationUtils.isMoveContactConfirmationRequested())
{
// we move the specified contact
GuiActivator.getContactListService()
@@ -291,7 +292,7 @@ public class MetaContactListManager
switch (dialog.showDialog())
{
case MessageDialog.OK_DONT_ASK_CODE:
- ConfigurationManager.setMoveContactConfirmationRequested(false);
+ ConfigurationUtils.setMoveContactConfirmationRequested(false);
// do fall through
case MessageDialog.OK_RETURN_CODE:
@@ -323,7 +324,7 @@ public class MetaContactListManager
@SuppressWarnings("fallthrough")
public void run()
{
- if (!ConfigurationManager.isMoveContactConfirmationRequested())
+ if (!ConfigurationUtils.isMoveContactConfirmationRequested())
{
// we move the specified contact
try
@@ -355,7 +356,7 @@ public class MetaContactListManager
switch (dialog.showDialog())
{
case MessageDialog.OK_DONT_ASK_CODE:
- ConfigurationManager.setMoveContactConfirmationRequested(false);
+ ConfigurationUtils.setMoveContactConfirmationRequested(false);
// do fall through
case MessageDialog.OK_RETURN_CODE:
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java
index bd720ba..0902cf4 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/MetaContactRightButtonMenu.java
@@ -469,7 +469,7 @@ public class MetaContactRightButtonMenu
}
routingForVideoEnabled =
- ConfigurationManager
+ ConfigurationUtils
.isRouteVideoAndDesktopUsingPhoneNumberEnabled()
&& phones.size() > 0
&& GuiActivator.getOpSetRegisteredProviders(
@@ -477,7 +477,7 @@ public class MetaContactRightButtonMenu
null,
null).size() > 0;
routingForDesktopEnabled =
- ConfigurationManager
+ ConfigurationUtils
.isRouteVideoAndDesktopUsingPhoneNumberEnabled()
&& phones.size() > 0
&& GuiActivator.getOpSetRegisteredProviders(
@@ -485,7 +485,6 @@ public class MetaContactRightButtonMenu
null,
null).size() > 0;
-
// add all the contacts that support telephony to the call menu
if (metaContact.getContactCount() > 1 || phones.size() > 0)
{
@@ -655,12 +654,12 @@ public class MetaContactRightButtonMenu
addSeparator();
- if (!ConfigurationManager.isAddContactDisabled())
+ if (!ConfigurationUtils.isAddContactDisabled())
add(addContactItem);
addSeparator();
- if (!ConfigurationManager.isRemoveContactDisabled())
+ if (!ConfigurationUtils.isRemoveContactDisabled())
add(removeContactMenu);
add(renameContactItem);
@@ -931,11 +930,11 @@ public class MetaContactRightButtonMenu
SipCommFileChooser scfc = GenericFileDialog.create(
null, "Send file...",
SipCommFileChooser.LOAD_FILE_OPERATION,
- ConfigurationManager.getSendFileLastDir());
+ ConfigurationUtils.getSendFileLastDir());
File selectedFile = scfc.getFileFromDialog();
if(selectedFile != null)
{
- ConfigurationManager.setSendFileLastDir(
+ ConfigurationUtils.setSendFileLastDir(
selectedFile.getParent());
// Obtain the corresponding chat panel.
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java
index 133f82b..b934ce8 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/PresenceFilter.java
@@ -10,7 +10,6 @@ import java.util.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.contactlist.contactsource.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.event.*;
@@ -44,7 +43,7 @@ public class PresenceFilter
*/
public PresenceFilter()
{
- isShowOffline = ConfigurationManager.isShowOffline();
+ isShowOffline = ConfigurationUtils.isShowOffline();
}
/**
@@ -117,7 +116,7 @@ public class PresenceFilter
{
this.isShowOffline = isShowOffline;
- ConfigurationManager.setShowOffline(isShowOffline);
+ ConfigurationUtils.setShowOffline(isShowOffline);
}
/**
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/SourceContactRightButtonMenu.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/SourceContactRightButtonMenu.java
index 1aa3e44..6a4f4d0 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/SourceContactRightButtonMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/SourceContactRightButtonMenu.java
@@ -19,6 +19,7 @@ import net.java.sip.communicator.impl.gui.main.contactlist.contactsource.*;
import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactsource.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
@@ -79,7 +80,7 @@ public class SourceContactRightButtonMenu
add(initCallMenu());
// Only create the menu if the add contact functionality is enabled.
- if (!ConfigurationManager.isAddContactDisabled())
+ if (!ConfigurationUtils.isAddContactDisabled())
{
addContactComponent
= TreeContactList.createAddContactMenu(sourceContact);
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
index c3501bd..c401f26 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/TreeContactList.java
@@ -1314,7 +1314,7 @@ public class TreeContactList
GroupNode groupNode = (GroupNode) collapsedNode;
String id = groupNode.getGroupDescriptor().getId();
if (id != null)
- ConfigurationManager
+ ConfigurationUtils
.setContactListGroupCollapsed(id, true);
}
}
@@ -1336,7 +1336,7 @@ public class TreeContactList
GroupNode groupNode = (GroupNode) collapsedNode;
String id = groupNode.getGroupDescriptor().getId();
if (id != null)
- ConfigurationManager
+ ConfigurationUtils
.setContactListGroupCollapsed(id, false);
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java
index 38ce960..ce9e360 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/UnknownContactPanel.java
@@ -16,8 +16,8 @@ import javax.swing.text.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.impl.gui.main.call.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
import net.java.sip.communicator.util.swing.event.*;
@@ -71,7 +71,7 @@ public class UnknownContactPanel
this.add(mainPanel, BorderLayout.NORTH);
- if (!ConfigurationManager.isAddContactDisabled())
+ if (!ConfigurationUtils.isAddContactDisabled())
{
initAddContactButton();
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java
index b0bf17d..3c8bccc 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIContact.java
@@ -443,7 +443,7 @@ public class MetaUIContact
&& protocolContact.getStatusMessage().length() > 0)
statusMessage = protocolContact.getStatusMessage();
- if(ConfigurationManager.isHideAccountStatusSelectorsEnabled())
+ if(ConfigurationUtils.isHideAccountStatusSelectorsEnabled())
break;
ImageIcon protocolStatusIcon
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIGroup.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIGroup.java
index 2824d84..54f3404 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIGroup.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/contactsource/MetaUIGroup.java
@@ -10,9 +10,9 @@ import javax.swing.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.contactlist.*;
-import net.java.sip.communicator.impl.gui.utils.*;
import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.gui.*;
+import net.java.sip.communicator.util.*;
/**
* The <tt>MetaUIGroup</tt> is the implementation of the UIGroup for the
@@ -88,7 +88,7 @@ public class MetaUIGroup
*/
public boolean isGroupCollapsed()
{
- return ConfigurationManager
+ return ConfigurationUtils
.isContactListGroupCollapsed(metaGroup.getMetaUID());
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java
index d701c38..5967877 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/AutoAnswerMenu.java
@@ -84,7 +84,7 @@ public class AutoAnswerMenu
// if we are in disabled menu mode and we have only one item
// change its name (like global auto answer)
- if( ConfigurationManager.isAutoAnswerDisableSubmenu()
+ if( ConfigurationUtils.isAutoAnswerDisableSubmenu()
&& getAutoAnswerItemCount(parentMenu) == 1)
{
updateItem(getAutoAnswerItem(parentMenu, 0), true);
@@ -162,7 +162,7 @@ public class AutoAnswerMenu
int itemsCount = getAutoAnswerItemCount(parentMenu);
// if menu is disabled for autoanswer and we have added an item
- if(ConfigurationManager.isAutoAnswerDisableSubmenu()
+ if(ConfigurationUtils.isAutoAnswerDisableSubmenu()
&& itemsCount != initialCount)
{
// if initial count was 1, lets change provider name to the
@@ -359,7 +359,7 @@ public class AutoAnswerMenu
// if menu is disabled for auto answer and we have left with one
// item set its name like a global one
- if(ConfigurationManager.isAutoAnswerDisableSubmenu()
+ if(ConfigurationUtils.isAutoAnswerDisableSubmenu()
&& getAutoAnswerItemCount(parentMenu) == 1)
{
updateItem(getAutoAnswerItem(parentMenu, 0), true);
@@ -566,7 +566,7 @@ public class AutoAnswerMenu
private static String getItemDisplayName(
ProtocolProviderService provider)
{
- if(ConfigurationManager.isAutoAnswerDisableSubmenu())
+ if(ConfigurationUtils.isAutoAnswerDisableSubmenu())
return GuiActivator.getResources()
.getI18NString("service.gui.AUTO_ANSWER")
+ " - " + provider.getAccountID().getDisplayName();
@@ -912,7 +912,7 @@ public class AutoAnswerMenu
answerWithVideoCheckBox.isSelected());
// as settings changed lets update items
- if( ConfigurationManager.isAutoAnswerDisableSubmenu()
+ if( ConfigurationUtils.isAutoAnswerDisableSubmenu()
&& getAutoAnswerItemCount(parentMenu) == 1)
{
updateItem(getAutoAnswerItem(parentMenu, 0), true);
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
index ddf2145..657b619 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/FileMenu.java
@@ -109,16 +109,16 @@ public class FileMenu
.getI18nMnemonic("service.gui.NEW_ACCOUNT"));
// add separator only if there are other items enabled
- if(!ConfigurationManager.isAddContactDisabled()
- || !ConfigurationManager.isCreateGroupDisabled()
- || !ConfigurationManager.isGoToChatroomDisabled())
+ if(!ConfigurationUtils.isAddContactDisabled()
+ || !ConfigurationUtils.isCreateGroupDisabled()
+ || !ConfigurationUtils.isGoToChatroomDisabled())
{
this.addSeparator();
endsWithSeparator = true;
}
}
- if (!ConfigurationManager.isAddContactDisabled())
+ if (!ConfigurationUtils.isAddContactDisabled())
{
addContactItem = new JMenuItem(
resources.getI18NString("service.gui.ADD_CONTACT") + "...");
@@ -134,8 +134,8 @@ public class FileMenu
// if next item is disabled add separator here
// only if there is something next
- if(ConfigurationManager.isCreateGroupDisabled()
- && !ConfigurationManager.isGoToChatroomDisabled())
+ if(ConfigurationUtils.isCreateGroupDisabled()
+ && !ConfigurationUtils.isGoToChatroomDisabled())
{
this.addSeparator();
endsWithSeparator = true;
@@ -144,19 +144,19 @@ public class FileMenu
endsWithSeparator = false;
}
- if (!ConfigurationManager.isCreateGroupDisabled())
+ if (!ConfigurationUtils.isCreateGroupDisabled())
{
this.add(createGroupItem);
// add separator if there is something next
- if(!ConfigurationManager.isGoToChatroomDisabled())
+ if(!ConfigurationUtils.isGoToChatroomDisabled())
{
this.addSeparator();
endsWithSeparator = true;
}
}
- if (!ConfigurationManager.isGoToChatroomDisabled())
+ if (!ConfigurationUtils.isGoToChatroomDisabled())
{
this.add(myChatRoomsItem);
endsWithSeparator = false;
diff --git a/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java b/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
index 67d5374..83f48aa 100644
--- a/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
+++ b/src/net/java/sip/communicator/impl/gui/main/menus/ToolsMenu.java
@@ -26,6 +26,7 @@ import net.java.sip.communicator.service.gui.*;
import net.java.sip.communicator.service.gui.Container;
import net.java.sip.communicator.service.notification.*;
import net.java.sip.communicator.service.protocol.*;
+import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.Logger;
import net.java.sip.communicator.util.skin.*;
import net.java.sip.communicator.util.swing.*;
@@ -205,7 +206,7 @@ public class ToolsMenu
}
else if (itemName.equals("showHideOffline"))
{
- boolean isShowOffline = ConfigurationManager.isShowOffline();
+ boolean isShowOffline = ConfigurationUtils.isShowOffline();
TreeContactList.presenceFilter.setShowOffline(!isShowOffline);
@@ -346,7 +347,7 @@ public class ToolsMenu
if(!cfg.getBoolean(AUTO_ANSWER_MENU_DISABLED_PROP, false))
{
- if(ConfigurationManager.isAutoAnswerDisableSubmenu())
+ if(ConfigurationUtils.isAutoAnswerDisableSubmenu())
{
this.addSeparator();
AutoAnswerMenu.registerMenuItems(this);
@@ -361,7 +362,7 @@ public class ToolsMenu
this.addSeparator();
// Show/hide offline contacts menu item.
- String offlineTextKey = ConfigurationManager.isShowOffline()
+ String offlineTextKey = ConfigurationUtils.isShowOffline()
? "service.gui.HIDE_OFFLINE_CONTACTS"
: "service.gui.SHOW_OFFLINE_CONTACTS";
diff --git a/src/net/java/sip/communicator/impl/gui/main/presence/AccountStatusPanel.java b/src/net/java/sip/communicator/impl/gui/main/presence/AccountStatusPanel.java
index 68b2587..902d294 100644
--- a/src/net/java/sip/communicator/impl/gui/main/presence/AccountStatusPanel.java
+++ b/src/net/java/sip/communicator/impl/gui/main/presence/AccountStatusPanel.java
@@ -652,7 +652,7 @@ public class AccountStatusPanel
*/
public String getUIClassID()
{
- if(ConfigurationManager.isTransparentWindowEnabled())
+ if(ConfigurationUtils.isTransparentWindowEnabled())
return uiClassID;
else
return super.getUIClassID();
diff --git a/src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java b/src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java
index 5632217..3dab776 100644
--- a/src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java
+++ b/src/net/java/sip/communicator/impl/gui/main/presence/GlobalStatusSelectorBox.java
@@ -22,8 +22,6 @@ import net.java.sip.communicator.service.systray.*;
import net.java.sip.communicator.util.*;
import net.java.sip.communicator.util.swing.*;
-import org.jitsi.service.configuration.*;
-
/**
* The <tt>GlobalStatusSelectorBox</tt> is a global status selector box, which
* appears in the status panel, when the user has more than one account. It
@@ -124,7 +122,7 @@ public class GlobalStatusSelectorBox
offlineStatus = status;
}
- if(!ConfigurationManager.isHideAccountStatusSelectorsEnabled())
+ if(!ConfigurationUtils.isHideAccountStatusSelectorsEnabled())
this.addSeparator();
this.setFont(titleLabel.getFont().deriveFont(Font.PLAIN, 11f));
@@ -187,7 +185,7 @@ public class GlobalStatusSelectorBox
? new PresenceStatusMenu(protocolProvider)
: new SimpleStatusMenu(protocolProvider);
- if(ConfigurationManager.isHideAccountStatusSelectorsEnabled())
+ if(ConfigurationUtils.isHideAccountStatusSelectorsEnabled())
statusSelectorMenu.setVisible(false);
// If this is the first account in our menu.
diff --git a/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java b/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java
deleted file mode 100644
index 8e5dfc6..0000000
--- a/src/net/java/sip/communicator/impl/gui/utils/ConfigurationManager.java
+++ /dev/null
@@ -1,2148 +0,0 @@
-/*
- * Jitsi, the OpenSource Java VoIP and Instant Messaging client.
- *
- * Distributable under LGPL license.
- * See terms of license at gnu.org.
- */
-package net.java.sip.communicator.impl.gui.utils;
-
-import java.awt.*;
-import java.beans.*;
-import java.util.*;
-import java.util.List; /* disambiguation */
-
-import net.java.sip.communicator.impl.gui.*;
-import net.java.sip.communicator.service.protocol.*;
-
-import org.jitsi.service.configuration.*;
-import org.jitsi.service.neomedia.*;
-import org.jitsi.service.neomedia.codec.*;
-import org.osgi.framework.*;
-
-/**
- * Cares about all common configurations. Storing and retrieving configuration
- * values.
- *
- * @author Yana Stamcheva
- * @author Damian Minkov
- */
-public class ConfigurationManager
-{
- /**
- * Indicates whether the message automatic pop-up is enabled.
- */
- private static boolean autoPopupNewMessage = false;
-
- /**
- * The send message command. ENTER ou Ctrl-ENTER
- */
- private static String sendMessageCommand;
-
- /**
- * Indicates if the call panel is shown.
- */
- private static boolean isCallPanelShown = true;
-
- /**
- * Indicates if the offline contacts are shown.
- */
- private static boolean isShowOffline = true;
-
- /**
- * Indicates if the application main window is visible by default.
- */
- private static boolean isApplicationVisible = true;
-
- /**
- * Indicates if the quit warning should be shown.
- */
- private static boolean isQuitWarningShown = true;
-
- /**
- * Indicates if typing notifications should be sent.
- */
- private static boolean isSendTypingNotifications;
-
- /**
- * Indicates if confirmation should be requested before really moving a
- * contact.
- */
- private static boolean isMoveContactConfirmationRequested = true;
-
- /**
- * Indicates if tabs in chat window are enabled.
- */
- private static boolean isMultiChatWindowEnabled;
-
- /**
- * Indicates whether we will leave chat room on window closing.
- */
- private static boolean isLeaveChatRoomOnWindowCloseEnabled;
-
- /**
- * Indicates if history logging is enabled.
- */
- private static boolean isHistoryLoggingEnabled;
-
- /**
- * Indicates if the history should be shown in the chat window.
- */
- private static boolean isHistoryShown;
-
- /**
- * The size of the chat history to show in chat window.
- */
- private static int chatHistorySize;
-
- /**
- * The size of the chat write area.
- */
- private static int chatWriteAreaSize;
-
- /**
- * The transparency of the window.
- */
- private static int windowTransparency;
-
- /**
- * Indicates if transparency is enabled.
- */
- private static boolean isTransparentWindowEnabled;
-
- /**
- * Indicates if the window is decorated.
- */
- private static boolean isWindowDecorated;
-
- /**
- * Indicates if the chat tool bar is visible.
- */
- private static boolean isChatToolbarVisible;
-
- /**
- * Indicates if the chat style bar is visible.
- */
- private static boolean isChatStylebarVisible;
-
- /**
- * Indicates if the smileys are shown.
- */
- private static boolean isShowSmileys;
-
- /**
- * Indicates if the chat simple theme is activated.
- */
- private static boolean isChatSimpleThemeEnabled;
-
- /**
- * Indicates if the add contact functionality is disabled.
- */
- private static boolean isAddContactDisabled;
-
- /**
- * Indicates if the go to chatroom functionality is disabled.
- */
- private static boolean isGoToChatroomDisabled;
-
- /**
- * Indicates if the create group functionality is disabled.
- */
- private static boolean isCreateGroupDisabled;
-
- /**
- * Indicates if the remove contact functionality is disabled.
- */
- private static boolean isRemoveContactDisabled;
-
- /**
- * The last directory used in file transfer.
- */
- private static String sendFileLastDir;
-
- /**
- * The configuration service.
- */
- private static ConfigurationService configService
- = GuiActivator.getConfigurationService();
-
- /**
- * The parent of the last contact.
- */
- private static String lastContactParent = null;
-
- /**
- * The last conference call provider.
- */
- private static ProtocolProviderService lastCallConferenceProvider = null;
-
- /**
- * Indicates if the "Advanced" configurations for an account should be
- * disabled for the user.
- */
- private static boolean isAdvancedAccountConfigDisabled;
-
- /**
- * The default font family used in chat windows.
- */
- private static String defaultFontFamily;
-
- /**
- * The default font size used in chat windows.
- */
- private static String defaultFontSize;
-
- /**
- * Indicates if the font is bold in chat windows.
- */
- private static boolean isDefaultFontBold = false;
-
- /**
- * Indicates if the font is italic in chat windows.
- */
- private static boolean isDefaultFontItalic = false;
-
- /**
- * Indicates if the font is underline in chat windows.
- */
- private static boolean isDefaultFontUnderline = false;
-
- /**
- * The default font color used in chat windows.
- */
- private static int defaultFontColor = -1;
-
- /**
- * whether to show the status changed message in chat history area.
- */
- private static boolean showStatusChangedInChat = true;
-
- /**
- * When enabled, allow to use the additional phone numbers
- * to route video calls and desktop sharing through it if possible.
- */
- private static boolean routeVideoAndDesktopUsingPhoneNumber = false;
-
- /**
- * Indicates that when we have a single account we can hide the select
- * account option when possible.
- */
- private static boolean hideAccountSelectionWhenPossible = false;
-
- /**
- * Hide accounts from accounts status list.
- */
- private static boolean hideAccountStatusSelectors = false;
-
- /**
- * Whether to disable creation of auto answer submenu.
- */
- private static boolean autoAnswerDisableSubmenu = false;
-
- /**
- * Whether the chat room user configuration functionality is disabled.
- */
- private static boolean isChatRoomConfigDisabled = false;
-
- /**
- * Indicates if the single window interface is enabled.
- */
- private static boolean isSingleWindowInterfaceEnabled = false;
-
- /**
- * The name of the show smileys property.
- */
- private static final String SHOW_SMILEYS_PROPERTY
- = "net.java.sip.communicator.service.replacement.SMILEY.enable";
-
- /**
- * The name of the simple theme property.
- */
- private static final String CHAT_SIMPLE_THEME_ENABLED_PROP
- = "net.java.sip.communicator.service.gui.CHAT_SIMPLE_THEME_ENABLED";
-
- /**
- * The name of the chat room configuration property.
- */
- private static final String CHAT_ROOM_CONFIG_DISABLED_PROP
- = "net.java.sip.communicator.service.gui.CHAT_ROOM_CONFIG_DISABLED";
-
- /**
- * The name of the single interface property.
- */
- private static final String SINGLE_WINDOW_INTERFACE_ENABLED
- = "net.java.sip.communicator.service.gui.SINGLE_WINDOW_INTERFACE_ENABLED";
-
- /**
- * Loads all user interface configurations.
- */
- public static void loadGuiConfigurations()
- {
- configService.addPropertyChangeListener(
- new ConfigurationChangeListener());
-
- // Load the "auPopupNewMessage" property.
- String autoPopupProperty =
- "service.gui.AUTO_POPUP_NEW_MESSAGE";
-
- String autoPopup = configService.getString(autoPopupProperty);
-
- if(autoPopup == null)
- autoPopup = GuiActivator.getResources().
- getSettingsString(autoPopupProperty);
-
- if(autoPopup != null && autoPopup.equalsIgnoreCase("yes"))
- autoPopupNewMessage = true;
-
- // Load the "sendMessageCommand" property.
- String messageCommandProperty
- = "service.gui.SEND_MESSAGE_COMMAND";
- String messageCommand = configService.getString(messageCommandProperty);
-
- if(messageCommand == null)
- messageCommand
- = GuiActivator.getResources()
- .getSettingsString(messageCommandProperty);
-
- if(messageCommand == null || messageCommand.length() == 0)
- sendMessageCommand = messageCommand;
-
- // Load the showCallPanel property.
- String callPanelShown = configService.getString(
- "net.java.sip.communicator.impl.gui.showCallPanel");
-
- if(callPanelShown != null && callPanelShown.length() > 0)
- {
- isCallPanelShown = Boolean.parseBoolean(callPanelShown);
- }
-
- // Load the "showOffline" property.
- String showOffline = configService.getString(
- "net.java.sip.communicator.impl.gui.showOffline");
-
- if(showOffline != null && showOffline.length() > 0)
- {
- isShowOffline = Boolean.parseBoolean(showOffline);
- }
-
- // Load the "showApplication" property.
- String isVisible = configService.getString(
- "net.java.sip.communicator.impl.systray.showApplication");
-
- if(isVisible != null && isVisible.length() > 0)
- {
- isApplicationVisible = new Boolean(isVisible).booleanValue();
- }
-
- // Load the "showAppQuitWarning" property.
- String quitWarningShown = configService.getString(
- "net.java.sip.communicator.impl.gui.quitWarningShown");
-
- if(quitWarningShown != null && quitWarningShown.length() > 0)
- {
- isQuitWarningShown
- = Boolean.parseBoolean(quitWarningShown);
- }
-
- // Load the "sendTypingNotifications" property.
- String isSendTypingNotifProperty =
- "service.gui.SEND_TYPING_NOTIFICATIONS_ENABLED";
- String isSendTypingNotif =
- configService.getString(isSendTypingNotifProperty);
-
- if(isSendTypingNotif == null)
- isSendTypingNotif =
- GuiActivator.getResources().
- getSettingsString(isSendTypingNotifProperty);
-
- if(isSendTypingNotif != null && isSendTypingNotif.length() > 0)
- {
- isSendTypingNotifications
- = Boolean.parseBoolean(isSendTypingNotif);
- }
-
- // Load the "isMoveContactConfirmationRequested" property.
- String isMoveContactConfirmationRequestedString
- = configService.getString(
- "net.java.sip.communicator.impl.gui.isMoveContactConfirmationRequested");
-
- if(isMoveContactConfirmationRequestedString != null
- && isMoveContactConfirmationRequestedString.length() > 0)
- {
- isMoveContactConfirmationRequested
- = Boolean.parseBoolean(isMoveContactConfirmationRequestedString);
- }
-
- // Load the "isMultiChatWindowEnabled" property.
- String isMultiChatWindowEnabledStringProperty
- = "service.gui.IS_MULTI_CHAT_WINDOW_ENABLED";
-
- String isMultiChatWindowEnabledString
- = configService.getString(isMultiChatWindowEnabledStringProperty);
-
- if(isMultiChatWindowEnabledString == null)
- isMultiChatWindowEnabledString =
- GuiActivator.getResources().
- getSettingsString(isMultiChatWindowEnabledStringProperty);
-
- if(isMultiChatWindowEnabledString != null
- && isMultiChatWindowEnabledString.length() > 0)
- {
- isMultiChatWindowEnabled
- = Boolean.parseBoolean(isMultiChatWindowEnabledString);
- }
-
- // Load the "isLeaveChatroomOnWindowCloseEnabled" property.
- String isLeaveChatRoomOnWindowCloseEnabledStringProperty
- = "service.gui.LEAVE_CHATROOM_ON_WINDOW_CLOSE";
-
- String isLeaveChatRoomOnWindowCloseEnabledString
- = configService.getString(
- isLeaveChatRoomOnWindowCloseEnabledStringProperty);
-
- if(isLeaveChatRoomOnWindowCloseEnabledString == null)
- isLeaveChatRoomOnWindowCloseEnabledString =
- GuiActivator.getResources().getSettingsString(
- isLeaveChatRoomOnWindowCloseEnabledStringProperty);
-
- if(isLeaveChatRoomOnWindowCloseEnabledString != null
- && isLeaveChatRoomOnWindowCloseEnabledString.length() > 0)
- {
- isLeaveChatRoomOnWindowCloseEnabled
- = new Boolean(isLeaveChatRoomOnWindowCloseEnabledString)
- .booleanValue();
- }
-
- // Load the "isHistoryLoggingEnabled" property.
- String isHistoryLoggingEnabledString
- = configService.getString(
- "net.java.sip.communicator.impl.gui.isHistoryLoggingEnabled");
-
- if(isHistoryLoggingEnabledString != null
- && isHistoryLoggingEnabledString.length() > 0)
- {
- isHistoryLoggingEnabled
- = Boolean.parseBoolean(isHistoryLoggingEnabledString);
- }
-
- // Load the "isHistoryShown" property.
- String isHistoryShownStringProperty =
- "service.gui.IS_MESSAGE_HISTORY_SHOWN";
-
- String isHistoryShownString
- = configService.getString(isHistoryShownStringProperty);
-
- if(isHistoryShownString == null)
- isHistoryShownString =
- GuiActivator.getResources().
- getSettingsString(isHistoryShownStringProperty);
-
- if(isHistoryShownString != null
- && isHistoryShownString.length() > 0)
- {
- isHistoryShown
- = Boolean.parseBoolean(isHistoryShownString);
- }
-
- // Load the "chatHistorySize" property.
- String chatHistorySizeStringProperty =
- "service.gui.MESSAGE_HISTORY_SIZE";
- String chatHistorySizeString
- = configService.getString(chatHistorySizeStringProperty);
-
- if(chatHistorySizeString == null)
- chatHistorySizeString =
- GuiActivator.getResources().
- getSettingsString(chatHistorySizeStringProperty);
-
- if(chatHistorySizeString != null
- && chatHistorySizeString.length() > 0)
- {
- chatHistorySize = Integer.parseInt(chatHistorySizeString);
- }
-
- // Load the "CHAT_WRITE_AREA_SIZE" property.
- String chatWriteAreaSizeStringProperty =
- "net.java.sip.communicator.impl.gui.CHAT_WRITE_AREA_SIZE";
- String chatWriteAreaSizeString
- = configService.getString(chatWriteAreaSizeStringProperty);
-
- if(chatWriteAreaSizeString == null)
- chatWriteAreaSizeString =
- GuiActivator.getResources().
- getSettingsString(chatWriteAreaSizeStringProperty);
-
- if(chatWriteAreaSizeString != null
- && chatWriteAreaSizeString.length() > 0)
- {
- chatWriteAreaSize
- = Integer.parseInt(chatWriteAreaSizeString);
- }
-
- // Load the "isTransparentWindowEnabled" property.
- String isTransparentWindowEnabledProperty =
- "impl.gui.IS_TRANSPARENT_WINDOW_ENABLED";
-
- String isTransparentWindowEnabledString
- = configService.getString(isTransparentWindowEnabledProperty);
-
- if(isTransparentWindowEnabledString == null)
- isTransparentWindowEnabledString =
- GuiActivator.getResources().
- getSettingsString(isTransparentWindowEnabledProperty);
-
- if(isTransparentWindowEnabledString != null
- && isTransparentWindowEnabledString.length() > 0)
- {
- isTransparentWindowEnabled
- = Boolean.parseBoolean(isTransparentWindowEnabledString);
- }
-
- // Load the "windowTransparency" property.
- String windowTransparencyProperty =
- "impl.gui.WINDOW_TRANSPARENCY";
-
- String windowTransparencyString
- = configService.getString(windowTransparencyProperty);
-
- if(windowTransparencyString == null)
- windowTransparencyString =
- GuiActivator.getResources().
- getSettingsString(windowTransparencyProperty);
-
- if(windowTransparencyString != null
- && windowTransparencyString.length() > 0)
- {
- windowTransparency
- = Integer.parseInt(windowTransparencyString);
- }
-
- // Load the "isWindowDecorated" property.
- String isWindowDecoratedProperty
- = "impl.gui.IS_WINDOW_DECORATED";
-
- String isWindowDecoratedString
- = configService.getString(isWindowDecoratedProperty);
-
- if(isWindowDecoratedString == null)
- isWindowDecoratedString =
- GuiActivator.getResources().
- getSettingsString(isWindowDecoratedProperty);
-
- if(isWindowDecoratedString != null
- && isWindowDecoratedString.length() > 0)
- {
- isWindowDecorated
- = Boolean.parseBoolean(isWindowDecoratedString);
- }
-
- // Load the "isChatToolbarVisible" property
- isChatToolbarVisible
- = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.chat.ChatWindow.showToolbar",
- true);
- // Load the "isChatToolbarVisible" property
- isChatStylebarVisible
- = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.chat.ChatWindow.showStylebar",
- true);
-
- // Load the "isShowSmileys" property
- isShowSmileys
- = configService.getBoolean(
- SHOW_SMILEYS_PROPERTY,
- true);
-
- // Load the "isChatSimpleThemeEnabled" property.
- isChatSimpleThemeEnabled
- = configService.getBoolean(
- CHAT_SIMPLE_THEME_ENABLED_PROP,
- true);
-
- // Load the "lastContactParent" property.
- lastContactParent = configService.getString(
- "net.java.sip.communicator.impl.gui.addcontact.lastContactParent");
-
- // Load the "sendFileLastDir" property.
- sendFileLastDir = configService.getString(
- "net.java.sip.communicator.impl.gui.chat.filetransfer." +
- "SEND_FILE_LAST_DIR");
-
- // Load the "ADD_CONTACT_DISABLED" property.
- isAddContactDisabled
- = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.main.contactlist." +
- "CONTACT_ADD_DISABLED",
- false);
-
- // Load the "CREATE_GROUP_DISABLED" property.
- isCreateGroupDisabled
- = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.main.contactlist." +
- "CREATE_GROUP_DISABLED",
- false);
-
- // Load the "GO_TO_CHATROOM_DISABLED" property.
- isGoToChatroomDisabled
- = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.main.chatroomslist." +
- "GO_TO_CHATROOM_DISABLED",
- false);
-
- // Load the "REMOVE_CONTACT_DISABLED" property.
- isRemoveContactDisabled
- = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.main.contactlist." +
- "CONTACT_REMOVE_DISABLED",
- false);
-
- // Load the "net.java.sip.communicator.impl.gui.main.account
- // .ADVANCED_CONFIG_DISABLED" property.
- String advancedConfigDisabledDefaultProp
- = GuiActivator.getResources().getSettingsString(
- "impl.gui.main.account.ADVANCED_CONFIG_DISABLED");
-
- boolean isAdvancedConfigDisabled = false;
-
- if (advancedConfigDisabledDefaultProp != null)
- isAdvancedConfigDisabled
- = Boolean.parseBoolean(advancedConfigDisabledDefaultProp);
-
- // Load the advanced account configuration disabled.
- isAdvancedAccountConfigDisabled
- = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.main.account." +
- "ADVANCED_CONFIG_DISABLED",
- isAdvancedConfigDisabled);
-
- // Single interface enabled property.
- String singleInterfaceEnabledProp
- = GuiActivator.getResources().getSettingsString(
- SINGLE_WINDOW_INTERFACE_ENABLED);
-
- boolean isEnabled = false;
-
- if (singleInterfaceEnabledProp != null)
- isEnabled = Boolean.parseBoolean(singleInterfaceEnabledProp);
- else
- isEnabled = Boolean.parseBoolean(
- GuiActivator.getResources().getSettingsString(
- "impl.gui.SINGLE_WINDOW_INTERFACE"));
-
- // Load the advanced account configuration disabled.
- isSingleWindowInterfaceEnabled
- = configService.getBoolean( SINGLE_WINDOW_INTERFACE_ENABLED,
- isEnabled);
-
- if(isFontSupportEnabled())
- {
- // Load default font family string.
- defaultFontFamily = configService.getString(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_FAMILY");
-
- // Load default font size.
- defaultFontSize = configService.getString(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_SIZE");
-
- // Load isBold chat property.
- isDefaultFontBold = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_BOLD",
- isDefaultFontBold);
-
- // Load isItalic chat property.
- isDefaultFontItalic = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_ITALIC",
- isDefaultFontItalic);
-
- // Load isUnderline chat property.
- isDefaultFontUnderline = configService.getBoolean(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_UNDERLINE",
- isDefaultFontUnderline);
-
- // Load default font color property.
- int colorSetting = configService.getInt(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_COLOR",
- -1);
-
- if(colorSetting != -1)
- defaultFontColor = colorSetting;
- }
-
- String showStatusChangedInChatProperty
- = "impl.gui.SHOW_STATUS_CHANGED_IN_CHAT";
- String showStatusChangedInChatDefault = GuiActivator.getResources().
- getSettingsString(showStatusChangedInChatProperty);
-
- // if there is a default value use it
- if(showStatusChangedInChatDefault != null)
- showStatusChangedInChat = Boolean.parseBoolean(
- showStatusChangedInChatDefault);
-
- showStatusChangedInChat = configService.getBoolean(
- showStatusChangedInChatProperty,
- showStatusChangedInChat);
-
- String routeVideoAndDesktopUsingPhoneNumberProperty
- = "impl.gui.ROUTE_VIDEO_AND_DESKTOP_TO_PNONENUMBER";
- String routeVideoAndDesktopUsingPhoneNumberDefault =
- GuiActivator.getResources()
- .getSettingsString(routeVideoAndDesktopUsingPhoneNumberProperty);
-
- if(routeVideoAndDesktopUsingPhoneNumberDefault != null)
- routeVideoAndDesktopUsingPhoneNumber = Boolean.parseBoolean(
- routeVideoAndDesktopUsingPhoneNumberDefault);
-
- routeVideoAndDesktopUsingPhoneNumber = configService.getBoolean(
- routeVideoAndDesktopUsingPhoneNumberProperty,
- routeVideoAndDesktopUsingPhoneNumber);
-
- String hideAccountMenuProperty
- = "impl.gui.HIDE_SELECTION_ON_SINGLE_ACCOUNT";
- String hideAccountMenuDefaultValue = GuiActivator.getResources()
- .getSettingsString(hideAccountMenuProperty);
-
- if(hideAccountMenuDefaultValue != null)
- hideAccountSelectionWhenPossible = Boolean.parseBoolean(
- hideAccountMenuDefaultValue);
-
- hideAccountSelectionWhenPossible = configService.getBoolean(
- hideAccountMenuProperty,
- hideAccountSelectionWhenPossible);
-
- String hideAccountStatusSelectorsProperty
- = "impl.gui.HIDE_ACCOUNT_STATUS_SELECTORS";
- String hideAccountsStatusDefaultValue = GuiActivator.getResources()
- .getSettingsString(hideAccountStatusSelectorsProperty);
-
- if(hideAccountsStatusDefaultValue != null)
- hideAccountStatusSelectors = Boolean.parseBoolean(
- hideAccountsStatusDefaultValue);
-
- hideAccountStatusSelectors = configService.getBoolean(
- hideAccountStatusSelectorsProperty,
- hideAccountStatusSelectors);
-
- String autoAnswerDisableSubmenuProperty
- = "impl.gui.AUTO_ANSWER_DISABLE_SUBMENU";
- String autoAnswerDisableSubmenuDefaultValue =
- GuiActivator.getResources()
- .getSettingsString(autoAnswerDisableSubmenuProperty);
-
- if(autoAnswerDisableSubmenuDefaultValue != null)
- autoAnswerDisableSubmenu = Boolean.parseBoolean(
- autoAnswerDisableSubmenuDefaultValue);
-
- autoAnswerDisableSubmenu = configService.getBoolean(
- autoAnswerDisableSubmenuProperty,
- autoAnswerDisableSubmenu);
-
- isChatRoomConfigDisabled = configService.getBoolean(
- CHAT_ROOM_CONFIG_DISABLED_PROP,
- isChatRoomConfigDisabled);
- }
-
- /**
- * Checks whether font support is disabled, checking in default
- * settings for the default value.
- * @return is font support disabled.
- */
- public static boolean isFontSupportEnabled()
- {
- String fontDisabledProp =
- "net.java.sip.communicator.impl.gui.FONT_SUPPORT_ENABLED";
-
- boolean defaultValue = false;
-
- String defaultSettingStr =
- GuiActivator.getResources().getSettingsString(fontDisabledProp);
-
- if(defaultSettingStr != null)
- defaultValue = Boolean.parseBoolean(defaultSettingStr);
-
- return configService.getBoolean(
- fontDisabledProp, defaultValue);
- }
-
- /**
- * Return TRUE if "autoPopupNewMessage" property is true, otherwise - return
- * FALSE. Indicates to the user interface whether new messages should be
- * opened and bring to front.
- * @return TRUE if "autoPopupNewMessage" property is true, otherwise
- * - return FALSE.
- */
- public static boolean isAutoPopupNewMessage()
- {
- return autoPopupNewMessage;
- }
-
- /**
- * Return TRUE if "showCallPanel" property is true, otherwise - return
- * FALSE. Indicates to the user interface whether the panel containing the
- * call and hangup buttons should be shown.
- * @return TRUE if "showCallPanel" property is true, otherwise - return
- * FALSE.
- */
- public static boolean isCallPanelShown()
- {
- return isCallPanelShown;
- }
-
- /**
- * Return TRUE if "showOffline" property is true, otherwise - return
- * FALSE. Indicates to the user interface whether offline user should be
- * shown in the contact list or not.
- * @return TRUE if "showOffline" property is true, otherwise - return
- * FALSE.
- */
- public static boolean isShowOffline()
- {
- return isShowOffline;
- }
-
- /**
- * Return TRUE if "showApplication" property is true, otherwise - return
- * FALSE. Indicates to the user interface whether the main application
- * window should shown or hidden on startup.
- * @return TRUE if "showApplication" property is true, otherwise - return
- * FALSE.
- */
- public static boolean isApplicationVisible()
- {
- return isApplicationVisible;
- }
-
- /**
- * Return TRUE if "quitWarningShown" property is true, otherwise -
- * return FALSE. Indicates to the user interface whether the quit warning
- * dialog should be shown when user clicks on the X button.
- * @return TRUE if "quitWarningShown" property is true, otherwise -
- * return FALSE. Indicates to the user interface whether the quit warning
- * dialog should be shown when user clicks on the X button.
- */
- public static boolean isQuitWarningShown()
- {
- return isQuitWarningShown;
- }
-
- /**
- * Return TRUE if "sendTypingNotifications" property is true, otherwise -
- * return FALSE. Indicates to the user interface whether typing
- * notifications are enabled or disabled.
- * @return TRUE if "sendTypingNotifications" property is true, otherwise -
- * return FALSE.
- */
- public static boolean isSendTypingNotifications()
- {
- return isSendTypingNotifications;
- }
-
- /**
- * Returns TRUE if the "isMoveContactConfirmationRequested" property is true,
- * otherwise - returns FALSE. Indicates to the user interface whether the
- * confirmation window during the move contact process is enabled or not.
- * @return TRUE if the "isMoveContactConfirmationRequested" property is true,
- * otherwise - returns FALSE
- */
- public static boolean isMoveContactConfirmationRequested()
- {
- return isMoveContactConfirmationRequested;
- }
-
- /**
- * Returns <code>true</code> if the "isMultiChatWindowEnabled" property is
- * true, otherwise - returns <code>false</code>. Indicates to the user
- * interface whether the chat window could contain multiple chats or just
- * one chat.
- * @return <code>true</code> if the "isMultiChatWindowEnabled" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isMultiChatWindowEnabled()
- {
- return isMultiChatWindowEnabled;
- }
-
- /**
- * Returns <code>true</code> if the "isLeaveChatRoomOnWindowCloseEnabled"
- * property is true, otherwise - returns <code>false</code>. Indicates to
- * the user interface whether when closing the chat window we would leave
- * the chat room.
- * @return <code>true</code> if the "isLeaveChatRoomOnWindowCloseEnabled"
- * property is true, otherwise - returns <code>false</code>.
- */
- public static boolean isLeaveChatRoomOnWindowCloseEnabled()
- {
- return isLeaveChatRoomOnWindowCloseEnabled;
- }
-
- /**
- * Returns <code>true</code> if the "isHistoryLoggingEnabled" property is
- * true, otherwise - returns <code>false</code>. Indicates to the user
- * interface whether the history logging is enabled.
- * @return <code>true</code> if the "isHistoryLoggingEnabled" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isHistoryLoggingEnabled()
- {
- return isHistoryLoggingEnabled;
- }
-
- /**
- * Returns <code>true</code> if the "isHistoryShown" property is
- * true, otherwise - returns <code>false</code>. Indicates to the user
- * whether the history is shown in the chat window.
- * @return <code>true</code> if the "isHistoryShown" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isHistoryShown()
- {
- return isHistoryShown;
- }
-
- /**
- * Returns <code>true</code> if the "isWindowDecorated" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "isWindowDecorated" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isWindowDecorated()
- {
- return isWindowDecorated;
- }
-
- /**
- * Returns <code>true</code> if the "isChatToolbarVisible" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "isChatToolbarVisible" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isChatToolbarVisible()
- {
- return isChatToolbarVisible;
- }
-
- /**
- * Returns <code>true</code> if the "isChatStylebarVisible" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "isChatStylebarVisible" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isChatStylebarVisible()
- {
- return isChatStylebarVisible;
- }
-
- /**
- * Returns <code>true</code> if the "isShowSmileys" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "isShowSmileys" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isShowSmileys()
- {
- return isShowSmileys;
- }
-
- /**
- * Returns <code>true</code> if the "isChatSimpleTheme" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "isChatSimpleTheme" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isChatSimpleThemeEnabled()
- {
- return isChatSimpleThemeEnabled;
- }
-
- /**
- * Returns <code>true</code> if the "ADD_CONTACT_DISABLED" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "ADD_CONTACT_DISABLED" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isAddContactDisabled()
- {
- return isAddContactDisabled;
- }
-
- /**
- * Returns <code>true</code> if the "CREATE_GROUP_DISABLED" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "CREATE_GROUP_DISABLED" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isCreateGroupDisabled()
- {
- return isCreateGroupDisabled;
- }
-
- /**
- * Returns <code>true</code> if the "GO_TO_CHATROOM_DISABLED" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "GO_TO_CHATROOM_DISABLED" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isGoToChatroomDisabled()
- {
- return isGoToChatroomDisabled;
- }
-
- /**
- * Returns <code>true</code> if the "REMOVE_CONTACT_DISABLED" property is
- * true, otherwise - returns <code>false</code>.
- * @return <code>true</code> if the "REMOVE_CONTACT_DISABLED" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isRemoveContactDisabled()
- {
- return isRemoveContactDisabled;
- }
-
- /**
- * Returns <code>true</code> if the "ADVANCED_CONFIG_DISABLED" property is
- * true, otherwise - returns <code>false</code>..
- * @return <code>true</code> if the "ADVANCED_CONFIG_DISABLED" property is
- * true, otherwise - returns <code>false</code>.
- */
- public static boolean isAdvancedAccountConfigDisabled()
- {
- return isAdvancedAccountConfigDisabled;
- }
-
- /**
- * Indicates if the chat room user configuration functionality is disabled.
- *
- * @return <tt>true</tt> if the chat room configuration is disabled,
- * <tt>false</tt> - otherwise
- */
- public static boolean isChatRoomConfigDisabled()
- {
- return isChatRoomConfigDisabled;
- }
-
- /**
- * Returns the default chat font family.
- *
- * @return the default chat font family
- */
- public static String getChatDefaultFontFamily()
- {
- return defaultFontFamily;
- }
-
- /**
- * Returns the default chat font size.
- *
- * @return the default chat font size
- */
- public static int getChatDefaultFontSize()
- {
- if (defaultFontSize != null && defaultFontSize.length() > 0)
- return new Integer(defaultFontSize).intValue();
-
- return -1;
- }
-
- /**
- * Returns the default chat font color.
- *
- * @return the default chat font color
- */
- public static Color getChatDefaultFontColor()
- {
- return defaultFontColor == -1 ? null : new Color(defaultFontColor);
- }
-
- /**
- * Returns the default chat font bold.
- *
- * @return the default chat font bold
- */
- public static boolean isChatFontBold()
- {
- return isDefaultFontBold;
- }
-
- /**
- * Returns the default chat font italic.
- *
- * @return the default chat font italic
- */
- public static boolean isChatFontItalic()
- {
- return isDefaultFontItalic;
- }
-
- /**
- * Returns the default chat font underline.
- *
- * @return the default chat font underline
- */
- public static boolean isChatFontUnderline()
- {
- return isDefaultFontUnderline;
- }
-
- /**
- * Sets the advanced account config disabled property.
- *
- * @param disabled the new value to set
- */
- public static void setAdvancedAccountConfigDisabled(boolean disabled)
- {
- isAdvancedAccountConfigDisabled = disabled;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.main.account." +
- "ADVANCED_CONFIG_DISABLED",
- Boolean.toString(isAdvancedAccountConfigDisabled));
- }
-
- /**
- * Return the "sendMessageCommand" property that was saved previously
- * through the <tt>ConfigurationService</tt>. Indicates to the user
- * interface whether the default send message command is Enter or CTRL-Enter.
- * @return "Enter" or "CTRL-Enter" message commands.
- */
- public static String getSendMessageCommand()
- {
- return sendMessageCommand;
- }
-
- /**
- * Return the "lastContactParent" property that was saved previously
- * through the <tt>ConfigurationService</tt>. Indicates
- * the last selected group on adding new contact
- * @return group name of the last selected group when adding contact.
- */
- public static String getLastContactParent()
- {
- return lastContactParent;
- }
-
- /**
- * Returns the call conference provider used for the last conference call.
- * @return the call conference provider used for the last conference call
- */
- public static ProtocolProviderService getLastCallConferenceProvider()
- {
- if (lastCallConferenceProvider != null)
- return lastCallConferenceProvider;
-
- // Obtain the "lastCallConferenceAccount" property from the
- // configuration service
- return findProviderFromAccountId(
- configService.getString(
- "net.java.sip.communicator.impl.gui.call.lastCallConferenceProvider"));
- }
-
- /**
- * Returns the protocol provider associated with the given
- * <tt>accountId</tt>.
- * @param savedAccountId the identifier of the account
- * @return the protocol provider associated with the given
- * <tt>accountId</tt>
- */
- private static ProtocolProviderService findProviderFromAccountId(
- String savedAccountId)
- {
- ProtocolProviderService protocolProvider = null;
- for (ProtocolProviderFactory providerFactory : GuiActivator
- .getProtocolProviderFactories().values())
- {
- ServiceReference serRef;
-
- for (AccountID accountId : providerFactory.getRegisteredAccounts())
- {
- // We're interested only in the savedAccountId
- if (!accountId.getAccountUniqueID().equals(savedAccountId))
- continue;
-
- serRef = providerFactory.getProviderForAccount(accountId);
-
- protocolProvider
- = (ProtocolProviderService) GuiActivator.bundleContext
- .getService(serRef);
- }
- }
-
- return protocolProvider;
- }
-
- /**
- * Returns the number of messages from chat history that would be shown in
- * the chat window.
- * @return the number of messages from chat history that would be shown in
- * the chat window.
- */
- public static int getChatHistorySize()
- {
- return chatHistorySize;
- }
-
- /**
- * Returns the preferred height of the chat write area.
- *
- * @return the preferred height of the chat write area.
- */
- public static int getChatWriteAreaSize()
- {
- return chatWriteAreaSize;
- }
-
- /**
- * Returns <code>true</code> if transparent windows are enabled,
- * <code>false</code> otherwise.
- *
- * @return <code>true</code> if transparent windows are enabled,
- * <code>false</code> otherwise.
- */
- public static boolean isTransparentWindowEnabled()
- {
- return isTransparentWindowEnabled;
- }
-
- /**
- * Returns the transparency value for all transparent windows.
- *
- * @return the transparency value for all transparent windows.
- */
- public static int getWindowTransparency()
- {
- return windowTransparency;
- }
-
- /**
- * Returns the last opened directory of the send file file chooser.
- *
- * @return the last opened directory of the send file file chooser
- */
- public static String getSendFileLastDir()
- {
- return sendFileLastDir;
- }
-
- /**
- * Returns <code>true</code> if phone numbers should be normalized,
- * <code>false</code> otherwise.
- *
- * @return <code>true</code> if phone numbers should be normalized,
- * <code>false</code> otherwise.
- */
- public static boolean isNormalizePhoneNumber()
- {
- return configService.getBoolean(
- "impl.gui.NORMALIZE_PHONE_NUMBER", true);
- }
-
- /**
- * Returns <code>true</code> if status changed should be shown in
- * chat history area, <code>false</code> otherwise.
- *
- * @return <code>true</code> if status changed should be shown in
- * chat history area, <code>false</code> otherwise.
- */
- public static boolean isShowStatusChangedInChat()
- {
- return showStatusChangedInChat;
- }
-
- /**
- * Whether allow to use additional phone numbers
- * to route video calls and desktop sharing through it.
- * @return whether allow to use additional phone numbers
- * to route video calls and desktop sharing through it.
- */
- public static boolean isRouteVideoAndDesktopUsingPhoneNumberEnabled()
- {
- return routeVideoAndDesktopUsingPhoneNumber;
- }
-
- /**
- * Whether allow user to select account when only a single
- * account is available.
- * @return whether allow user to select account when only a single
- * account is available.
- */
- public static boolean isHideAccountSelectionWhenPossibleEnabled()
- {
- return hideAccountSelectionWhenPossible;
- }
-
- /**
- * Whether to hide account statuses from global menu.
- * @return whether to hide account statuses.
- */
- public static boolean isHideAccountStatusSelectorsEnabled()
- {
- return hideAccountStatusSelectors;
- }
-
- /**
- * Whether creation of separate submenu for auto answer is disabled.
- * @return whether creation of separate submenu for auto answer
- * is disabled.
- */
- public static boolean isAutoAnswerDisableSubmenu()
- {
- return autoAnswerDisableSubmenu;
- }
-
- /**
- * Indicates if the single interface is enabled.
- *
- * @return <tt>true</tt> if the single window interface is enabled,
- * <tt>false</tt> - otherwise
- */
- public static boolean isSingleWindowInterfaceEnabled()
- {
- return isSingleWindowInterfaceEnabled;
- }
-
- /**
- * Updates the "singleWindowInterface" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param singleWindowInterface <code>true</code> to indicate that the
- * single window interface is enabled, <tt>false</tt> - otherwise
- */
- public static void setSingleWindowInterfaceEnabled(boolean isEnabled)
- {
- isSingleWindowInterfaceEnabled = isEnabled;
-
- configService.setProperty(SINGLE_WINDOW_INTERFACE_ENABLED, isEnabled);
- }
-
- /**
- * Sets the transparency value for all transparent windows.
- *
- * @param transparency the transparency value for all transparent windows.
- */
- public static void setWindowTransparency(int transparency)
- {
- windowTransparency = transparency;
- }
-
- /**
- * Updates the "showOffline" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isShowOffline <code>true</code> to indicate that the
- * offline users should be shown, <code>false</code> otherwise.
- */
- public static void setShowOffline(boolean isShowOffline)
- {
- ConfigurationManager.isShowOffline = isShowOffline;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.showOffline",
- Boolean.toString(isShowOffline));
- }
-
- /**
- * Updates the "showCallPanel" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isCallPanelShown <code>true</code> to indicate that the
- * call panel should be shown, <code>false</code> otherwise.
- */
- public static void setShowCallPanel(boolean isCallPanelShown)
- {
- ConfigurationManager.isCallPanelShown = isCallPanelShown;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.showCallPanel",
- Boolean.toString(isCallPanelShown));
- }
-
- /**
- * Updates the "showApplication" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isVisible <code>true</code> to indicate that the
- * application should be shown, <code>false</code> otherwise.
- */
- public static void setApplicationVisible(boolean isVisible)
- {
- // If we're already in the desired visible state, don't change anything.
- if (isApplicationVisible == isVisible)
- return;
-
- isApplicationVisible = isVisible;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.systray.showApplication",
- Boolean.toString(isVisible));
- }
-
- /**
- * Updates the "showAppQuitWarning" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isWarningShown indicates if the message warning the user that the
- * application would not be closed if she clicks the X button would be
- * shown again.
- */
- public static void setQuitWarningShown(boolean isWarningShown)
- {
- isQuitWarningShown = isWarningShown;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.quitWarningShown",
- Boolean.toString(isQuitWarningShown));
- }
-
- /**
- * Updates the "lastContactParent" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param groupName the group name of the selected group when adding
- * last contact
- */
- public static void setLastContactParent(String groupName)
- {
- lastContactParent = groupName;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.addcontact.lastContactParent",
- groupName);
- }
-
- /**
- * Updates the "isMoveContactQuestionEnabled" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isRequested indicates if a confirmation would be requested
- * from user during the move contact process.
- */
- public static void setMoveContactConfirmationRequested(boolean isRequested)
- {
- isMoveContactConfirmationRequested = isRequested;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.isMoveContactConfirmationRequested",
- Boolean.toString(isMoveContactConfirmationRequested));
- }
-
- /**
- * Updates the "isTransparentWindowEnabled" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isTransparent indicates if the transparency is enabled in the
- * application.
- */
- public static void setTransparentWindowEnabled(boolean isTransparent)
- {
- isTransparentWindowEnabled = isTransparent;
-
- configService.setProperty(
- "impl.gui.IS_TRANSPARENT_WINDOW_ENABLED",
- Boolean.toString(isTransparentWindowEnabled));
- }
-
- /**
- * Updates the "isChatToolbarVisible" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isVisible indicates if the chat toolbar is visible.
- */
- public static void setChatToolbarVisible(boolean isVisible)
- {
- isChatToolbarVisible = isVisible;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.ChatWindow.showToolbar",
- Boolean.toString(isChatToolbarVisible));
- }
-
- /**
- * Updates the "isShowSmileys" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isVisible indicates if the smileys are visible
- */
- public static void setShowSmileys(boolean isVisible)
- {
- isShowSmileys = isVisible;
-
- configService.setProperty(
- SHOW_SMILEYS_PROPERTY,
- Boolean.toString(isShowSmileys));
- }
-
- /**
- * Updates the "isChatSimpleThemeEnabled" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isVisible indicates if the chat simple theme is enabled
- */
- public static void setChatSimpleThemeEnabled(boolean isEnabled)
- {
- isChatSimpleThemeEnabled = isEnabled;
-
- configService.setProperty(
- CHAT_SIMPLE_THEME_ENABLED_PROP,
- Boolean.toString(isChatSimpleThemeEnabled));
- }
-
- /**
- * Updates the "isChatStylebarVisible" property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param isVisible indicates if the chat stylebar is visible.
- */
- public static void setChatStylebarVisible(boolean isVisible)
- {
- isChatStylebarVisible = isVisible;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.ChatWindow.showStylebar",
- Boolean.toString(isChatStylebarVisible));
- }
-
- /**
- * Updates the "net.java.sip.communicator.impl.gui.CHAT_WRITE_AREA_SIZE"
- * property through the <tt>ConfigurationService</tt>.
- *
- * @param size the new size to set
- */
- public static void setChatWriteAreaSize(int size)
- {
- chatWriteAreaSize = size;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.CHAT_WRITE_AREA_SIZE",
- Integer.toString(chatWriteAreaSize));
- }
-
- /**
- * Updates the "SEND_FILE_LAST_DIR"
- * property through the <tt>ConfigurationService</tt>.
- *
- * @param lastDir last download directory
- */
- public static void setSendFileLastDir(String lastDir)
- {
- sendFileLastDir = lastDir;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.filetransfer.SEND_FILE_LAST_DIR",
- lastDir);
- }
-
- /**
- * Sets the call conference provider used for the last conference call.
- * @param protocolProvider the call conference provider used for the last
- * conference call
- */
- public static void setLastCallConferenceProvider(
- ProtocolProviderService protocolProvider)
- {
- lastCallConferenceProvider = protocolProvider;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.call.lastCallConferenceProvider",
- protocolProvider.getAccountID().getAccountUniqueID());
- }
-
- /**
- * Sets the default font family.
- *
- * @param fontFamily the default font family name
- */
- public static void setChatDefaultFontFamily(String fontFamily)
- {
- defaultFontFamily = fontFamily;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_FAMILY",
- fontFamily);
- }
-
- /**
- * Sets the default font size.
- *
- * @param fontSize the default font size
- */
- public static void setChatDefaultFontSize(int fontSize)
- {
- defaultFontSize = String.valueOf(fontSize);
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_SIZE",
- fontSize);
- }
-
- /**
- * Sets the default isBold property.
- *
- * @param isBold indicates if the default chat font is bold
- */
- public static void setChatFontIsBold(boolean isBold)
- {
- isDefaultFontBold = isBold;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_BOLD",
- isBold);
- }
-
- /**
- * Sets the default isItalic property.
- *
- * @param isItalic indicates if the default chat font is italic
- */
- public static void setChatFontIsItalic(boolean isItalic)
- {
- isDefaultFontItalic = isItalic;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_ITALIC",
- isItalic);
- }
-
- /**
- * Sets the default isUnderline property.
- *
- * @param isUnderline indicates if the default chat font is underline
- */
- public static void setChatFontIsUnderline(boolean isUnderline)
- {
- isDefaultFontUnderline = isUnderline;
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_UNDERLINE",
- isUnderline);
- }
-
- /**
- * Sets the default font color.
- *
- * @param fontColor the default font color
- */
- public static void setChatDefaultFontColor(Color fontColor)
- {
- defaultFontColor = fontColor.getRGB();
-
- configService.setProperty(
- "net.java.sip.communicator.impl.gui.chat.DEFAULT_FONT_COLOR",
- defaultFontColor);
- }
-
- /**
- * Saves a chat room through the <tt>ConfigurationService</tt>.
- *
- * @param protocolProvider the protocol provider to which the chat room
- * belongs
- * @param oldChatRoomId the old identifier of the chat room
- * @param newChatRoomId the new identifier of the chat room
- * @param newChatRoomName the new chat room name
- */
- public static void saveChatRoom( ProtocolProviderService protocolProvider,
- String oldChatRoomId,
- String newChatRoomId,
- String newChatRoomName)
- {
- String prefix = "net.java.sip.communicator.impl.gui.accounts";
-
- List<String> accounts = configService
- .getPropertyNamesByPrefix(prefix, true);
-
- for (String accountRootPropName : accounts)
- {
- String accountUID
- = configService.getString(accountRootPropName);
-
- if(accountUID.equals(protocolProvider
- .getAccountID().getAccountUniqueID()))
- {
- List<String> chatRooms = configService
- .getPropertyNamesByPrefix(
- accountRootPropName + ".chatRooms", true);
-
- boolean isExistingChatRoom = false;
-
- for (String chatRoomPropName : chatRooms)
- {
- String chatRoomID
- = configService.getString(chatRoomPropName);
-
- if(!oldChatRoomId.equals(chatRoomID))
- continue;
-
- isExistingChatRoom = true;
-
- configService.setProperty(chatRoomPropName,
- newChatRoomId);
-
- configService.setProperty( chatRoomPropName
- + ".chatRoomName",
- newChatRoomName);
- }
-
- if(!isExistingChatRoom)
- {
- String chatRoomNodeName
- = "chatRoom" + Long.toString(System.currentTimeMillis());
-
- String chatRoomPackage = accountRootPropName
- + ".chatRooms." + chatRoomNodeName;
-
- configService.setProperty(chatRoomPackage,
- newChatRoomId);
-
- configService.setProperty( chatRoomPackage
- + ".chatRoomName",
- newChatRoomName);
- }
- }
- }
- }
-
- /**
- * Updates the status of the chat room through the
- * <tt>ConfigurationService</tt>.
- *
- * @param protocolProvider the protocol provider to which the chat room
- * belongs
- * @param chatRoomId the identifier of the chat room to update
- * @param chatRoomStatus the new status of the chat room
- */
- public static void updateChatRoomStatus(
- ProtocolProviderService protocolProvider,
- String chatRoomId,
- String chatRoomStatus)
- {
- String prefix = "net.java.sip.communicator.impl.gui.accounts";
-
- List<String> accounts = configService
- .getPropertyNamesByPrefix(prefix, true);
-
- for (String accountRootPropName : accounts)
- {
- String accountUID
- = configService.getString(accountRootPropName);
-
- if(accountUID.equals(protocolProvider
- .getAccountID().getAccountUniqueID()))
- {
- List<String> chatRooms = configService
- .getPropertyNamesByPrefix(
- accountRootPropName + ".chatRooms", true);
-
- for (String chatRoomPropName : chatRooms)
- {
- String chatRoomID
- = configService.getString(chatRoomPropName);
-
- if(!chatRoomId.equals(chatRoomID))
- continue;
-
- configService.setProperty( chatRoomPropName
- + ".lastChatRoomStatus",
- chatRoomStatus);
- }
- }
- }
- }
-
- /**
- * Updates the value of a chat room property through the
- * <tt>ConfigurationService</tt>.
- *
- * @param protocolProvider the protocol provider to which the chat room
- * belongs
- * @param chatRoomId the identifier of the chat room to update
- * @param property the name of the property of the chat room
- * @param value the value of the property if null, property will be removed
- */
- public static void updateChatRoomProperty(
- ProtocolProviderService protocolProvider,
- String chatRoomId,
- String property,
- String value)
- {
- String prefix = "net.java.sip.communicator.impl.gui.accounts";
-
- List<String> accounts = configService
- .getPropertyNamesByPrefix(prefix, true);
-
- for (String accountRootPropName : accounts)
- {
- String accountUID
- = configService.getString(accountRootPropName);
-
- if(accountUID.equals(protocolProvider
- .getAccountID().getAccountUniqueID()))
- {
- List<String> chatRooms = configService
- .getPropertyNamesByPrefix(
- accountRootPropName + ".chatRooms", true);
-
- for (String chatRoomPropName : chatRooms)
- {
- String chatRoomID
- = configService.getString(chatRoomPropName);
-
- if(!chatRoomId.equals(chatRoomID))
- continue;
-
- if(value != null)
- configService.setProperty( chatRoomPropName
- + "." + property,
- value);
- else
- configService.removeProperty(chatRoomPropName
- + "." + property);
- }
- }
- }
- }
-
- /**
- * Returns the chat room property, saved through the
- * <tt>ConfigurationService</tt>.
- *
- * @param protocolProvider the protocol provider, to which the chat room
- * belongs
- * @param chatRoomId the identifier of the chat room
- * @param property the property name, saved through the
- * <tt>ConfigurationService</tt>.
- * @return the value of the property, saved through the
- * <tt>ConfigurationService</tt>.
- */
- public static String getChatRoomProperty(
- ProtocolProviderService protocolProvider,
- String chatRoomId,
- String property)
- {
- String prefix = "net.java.sip.communicator.impl.gui.accounts";
-
- List<String> accounts = configService
- .getPropertyNamesByPrefix(prefix, true);
-
- for (String accountRootPropName : accounts)
- {
- String accountUID
- = configService.getString(accountRootPropName);
-
- if(accountUID.equals(protocolProvider
- .getAccountID().getAccountUniqueID()))
- {
- List<String> chatRooms = configService
- .getPropertyNamesByPrefix(
- accountRootPropName + ".chatRooms", true);
-
- for (String chatRoomPropName : chatRooms)
- {
- String chatRoomID
- = configService.getString(chatRoomPropName);
-
- if(!chatRoomId.equals(chatRoomID))
- continue;
-
- return configService.getString( chatRoomPropName
- + "." + property);
- }
- }
- }
-
- return null;
- }
-
- /**
- * Returns the last chat room status, saved through the
- * <tt>ConfigurationService</tt>.
- *
- * @param protocolProvider the protocol provider, to which the chat room
- * belongs
- * @param chatRoomId the identifier of the chat room
- * @return the last chat room status, saved through the
- * <tt>ConfigurationService</tt>.
- */
- public static String getChatRoomStatus(
- ProtocolProviderService protocolProvider,
- String chatRoomId)
- {
- String prefix = "net.java.sip.communicator.impl.gui.accounts";
-
- List<String> accounts = configService
- .getPropertyNamesByPrefix(prefix, true);
-
- for (String accountRootPropName : accounts)
- {
- String accountUID
- = configService.getString(accountRootPropName);
-
- if(accountUID.equals(protocolProvider
- .getAccountID().getAccountUniqueID()))
- {
- List<String> chatRooms = configService
- .getPropertyNamesByPrefix(
- accountRootPropName + ".chatRooms", true);
-
- for (String chatRoomPropName : chatRooms)
- {
- String chatRoomID
- = configService.getString(chatRoomPropName);
-
- if(!chatRoomId.equals(chatRoomID))
- continue;
-
- return configService.getString( chatRoomPropName
- + ".lastChatRoomStatus");
- }
- }
- }
-
- return null;
- }
-
- /**
- * Stores the last group <tt>status</tt> for the given <tt>groupID</tt>.
- * @param groupID the identifier of the group
- * @param isCollapsed indicates if the group is collapsed or expanded
- */
- public static void setContactListGroupCollapsed(String groupID,
- boolean isCollapsed)
- {
- String prefix = "net.java.sip.communicator.impl.gui.contactlist.groups";
-
- List<String> groups = configService
- .getPropertyNamesByPrefix(prefix, true);
-
- boolean isExistingGroup = false;
- for (String groupRootPropName : groups)
- {
- String storedID
- = configService.getString(groupRootPropName);
-
- if(storedID.equals(groupID))
- {
- configService.setProperty( groupRootPropName
- + ".isClosed",
- Boolean.toString(isCollapsed));
-
- isExistingGroup = true;
- break;
- }
- }
-
- if(!isExistingGroup)
- {
- String groupNodeName
- = "group" + Long.toString(System.currentTimeMillis());
-
- String groupPackage = prefix + "." + groupNodeName;
-
- configService.setProperty( groupPackage,
- groupID);
-
- configService.setProperty( groupPackage
- + ".isClosed",
- Boolean.toString(isCollapsed));
- }
- }
-
- /**
- * Returns <tt>true</tt> if the group given by <tt>groupID</tt> is collapsed
- * or <tt>false</tt> otherwise.
- * @param groupID the identifier of the group
- * @return <tt>true</tt> if the group given by <tt>groupID</tt> is collapsed
- * or <tt>false</tt> otherwise
- */
- public static boolean isContactListGroupCollapsed(String groupID)
- {
- String prefix = "net.java.sip.communicator.impl.gui.contactlist.groups";
-
- List<String> groups = configService
- .getPropertyNamesByPrefix(prefix, true);
- for (String groupRootPropName : groups)
- {
- String storedID
- = configService.getString(groupRootPropName);
-
- if(storedID.equals(groupID))
- {
- String status = (String) configService
- .getProperty( groupRootPropName + ".isClosed");
-
- return Boolean.parseBoolean(status);
- }
- }
-
- return false;
- }
-
- /**
- * Listens for changes of the properties.
- */
- private static class ConfigurationChangeListener
- implements PropertyChangeListener
- {
- public void propertyChange(PropertyChangeEvent evt)
- {
- // All properties we're interested in here are Strings.
- if (!(evt.getNewValue() instanceof String))
- return;
-
- String newValue = (String) evt.getNewValue();
-
- if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.addcontact.lastContactParent"))
- {
- lastContactParent = newValue;
- }
- else if (evt.getPropertyName().equals(
- "service.gui.AUTO_POPUP_NEW_MESSAGE"))
- {
- autoPopupNewMessage = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "service.gui.SEND_MESSAGE_COMMAND"))
- {
- sendMessageCommand = newValue;
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.showCallPanel"))
- {
- isCallPanelShown = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.showOffline"))
- {
- isShowOffline = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.systray.showApplication"))
- {
- isApplicationVisible = Boolean.parseBoolean(newValue);;
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.quitWarningShown"))
- {
- isQuitWarningShown = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "service.gui.SEND_TYPING_NOTIFICATIONS_ENABLED"))
- {
- isSendTypingNotifications = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.isMoveContactConfirmationRequested"))
- {
- isMoveContactConfirmationRequested
- = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "service.gui.IS_MULTI_CHAT_WINDOW_ENABLED"))
- {
- isMultiChatWindowEnabled = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "service.gui.LEAVE_CHATROOM_ON_WINDOW_CLOSE"))
- {
- isLeaveChatRoomOnWindowCloseEnabled
- = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.isHistoryLoggingEnabled"))
- {
- isHistoryLoggingEnabled = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "service.gui.IS_MESSAGE_HISTORY_SHOWN"))
- {
- isHistoryShown = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "service.gui.MESSAGE_HISTORY_SIZE"))
- {
- chatHistorySize = Integer.parseInt(newValue);
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.CHAT_WRITE_AREA_SIZE"))
- {
- chatWriteAreaSize = Integer.parseInt(newValue);
- }
- else if (evt.getPropertyName().equals(
- "impl.gui.IS_TRANSPARENT_WINDOW_ENABLED"))
- {
- isTransparentWindowEnabled = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "impl.gui.WINDOW_TRANSPARENCY"))
- {
- windowTransparency = Integer.parseInt(newValue);
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.chat.ChatWindow.showStylebar"))
- {
- isChatStylebarVisible = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.chat.ChatWindow.showToolbar"))
- {
- isChatToolbarVisible = Boolean.parseBoolean(newValue);
- }
- else if (evt.getPropertyName().equals(
- "net.java.sip.communicator.impl.gui.call.lastCallConferenceProvider"))
- {
- lastCallConferenceProvider = findProviderFromAccountId(newValue);
- }
- else if (evt.getPropertyName().equals(
- "impl.gui.SHOW_STATUS_CHANGED_IN_CHAT"))
- {
- showStatusChangedInChat = Boolean.parseBoolean(newValue);
- }
- }
- }
-
- /**
- * Returns the package name under which we would store information for the
- * given factory.
- * @param factory the <tt>ProtocolProviderFactory</tt>, which package name
- * we're looking for
- * @return the package name under which we would store information for the
- * given factory
- */
- public static String getFactoryImplPackageName(
- ProtocolProviderFactory factory)
- {
- String className = factory.getClass().getName();
-
- return className.substring(0, className.lastIndexOf('.'));
- }
-
- /**
- * Returns <tt>true</tt> if the account associated with
- * <tt>protocolProvider</tt> has at least one video format enabled in it's
- * configuration, <tt>false</tt> otherwise.
- *
- * @return <tt>true</tt> if the account associated with
- * <tt>protocolProvider</tt> has at least one video format enabled in it's
- * configuration, <tt>false</tt> otherwise.
- */
- public static boolean hasEnabledVideoFormat(
- ProtocolProviderService protocolProvider)
- {
- Map<String, String> accountProperties
- = protocolProvider.getAccountID().getAccountProperties();
-
- EncodingConfiguration encodingConfiguration;
- String overrideEncodings = accountProperties
- .get(ProtocolProviderFactory.OVERRIDE_ENCODINGS);
- if(Boolean.parseBoolean(overrideEncodings))
- {
- encodingConfiguration = GuiActivator.getMediaService().
- createEmptyEncodingConfiguration();
- encodingConfiguration.loadProperties(accountProperties,
- ProtocolProviderFactory.ENCODING_PROP_PREFIX);
- }
- else
- {
- encodingConfiguration = GuiActivator.getMediaService().
- getCurrentEncodingConfiguration();
- }
-
- return encodingConfiguration.hasEnabledFormat(MediaType.VIDEO);
- }
-} \ No newline at end of file