save "show/hide offline" property

cusax-fix
Yana Stamcheva 20 years ago
parent ec98f81c65
commit 7437a70163

@ -629,6 +629,13 @@ public void windowClosing(WindowEvent e) {
configService.setProperty(
"net.java.sip.communicator.impl.ui.showCallPanel",
new Boolean(callManager.isShown()));
configService.setProperty(
"net.java.sip.communicator.impl.ui.showOffline",
new Boolean(getContactListPanel()
.getContactList().isShowOffline()));
}
catch (PropertyVetoException e1) {
logger.error("The proposed property change "
@ -653,15 +660,23 @@ public void loadConfigurationSettings() {
ConfigurationService configService
= GuiActivator.getConfigurationService();
String isShown = configService.getString(
String isCallPanelShown = configService.getString(
"net.java.sip.communicator.impl.ui.showCallPanel");
if(isShown != null && isShown != "") {
callManager.setShown(new Boolean(isShown).booleanValue());
String isShowOffline = configService.getString(
"net.java.sip.communicator.impl.ui.showOffline");
if(isCallPanelShown != null && isCallPanelShown != "") {
callManager.setShown(new Boolean(isCallPanelShown).booleanValue());
}
else {
callManager.setShown(true);
}
if(isShowOffline != null && isShowOffline != "") {
getContactListPanel().getContactList()
.setShowOffline(new Boolean(isShowOffline).booleanValue());
}
}
/**

@ -964,5 +964,23 @@ public GroupRightButtonMenu getGroupRightButtonMenu()
{
return groupRightButtonMenu;
}
/**
* Returns TRUE if the list shows offline contacts, FALSE otherwise.
* @return TRUE if the list shows offline contacts, FALSE otherwise
*/
public boolean isShowOffline()
{
return listModel.showOffline();
}
/**
* Sets the showOffline property.
* @param isShowOffline TRUE to show all offline users, FALSE to hide
* offline users.
*/
public void setShowOffline(boolean isShowOffline)
{
listModel.setShowOffline(isShowOffline);
}
}

Loading…
Cancel
Save