From 7815ab120dd48bd084178a409317e6fe4a63b713 Mon Sep 17 00:00:00 2001 From: Damian Minkov Date: Tue, 22 Mar 2011 11:11:59 +0000 Subject: [PATCH] Some string fix and proper home creation/use under Linux after rename. --- .../install/debian/sip-communicator.sh.tmpl | 3 --- resources/languages/resources.properties | 18 ++++++++-------- .../launcher/SIPCommunicator.java | 21 +++++++++++++------ 3 files changed, 24 insertions(+), 18 deletions(-) diff --git a/resources/install/debian/sip-communicator.sh.tmpl b/resources/install/debian/sip-communicator.sh.tmpl index f3d3cb5c2..ab2f22b55 100644 --- a/resources/install/debian/sip-communicator.sh.tmpl +++ b/resources/install/debian/sip-communicator.sh.tmpl @@ -26,9 +26,6 @@ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$LIBPATH/native # make LD_PRELOAD use libaoss so that java doesn't hog on the audio device. export LD_PRELOAD=/usr/lib/libaoss.so -# create .sip-commnicator/log in home or otherwise java.util.logging will freak -mkdir -p $HOME/.sip-communicator/log - cd $SCDIR exec $COMMAND $* diff --git a/resources/languages/resources.properties b/resources/languages/resources.properties index 447cccc9f..b63e06fa1 100644 --- a/resources/languages/resources.properties +++ b/resources/languages/resources.properties @@ -266,7 +266,7 @@ service.gui.LOCALLY_ON_HOLD_STATUS=Locally on hold service.gui.LOGIN=&Login service.gui.LOGIN_NETWORK_ERROR=Unable to log in with account: User name: {0}, Server name: {1}, due to a network failure. Please check your network connection. service.gui.LOGIN_GENERAL_ERROR=An error occurred while logging in with account: User name: {0}, Server name: {1}:{2}. -service.gui.LOGIN_INTERNAL_ERROR=An error occurred while logging in with account: User name: {0}, Server name: {1}. This is most probably an internal application error. Please report the problem to our developers mailing list (dev@sip-communicator.dev.java.net). +service.gui.LOGIN_INTERNAL_ERROR=An error occurred while logging in with account: User name: {0}, Server name: {1}. This is most probably an internal application error. Please report the problem to our developers mailing list (dev@jitsi.java.net). service.gui.LOGIN_INVALID_PROPERTIES_ERROR=Unable to log in with account: User name: {0}, Server name: {1}, due to an account configuration problem. Please check your account configuration. service.gui.LOGIN_WINDOW_TITLE=Login {0} service.gui.LOGOFF_NOT_SUCCEEDED=An error occurred while logging off with the following account: User name: {0}, Server name: {1}. @@ -286,7 +286,7 @@ service.gui.MOVE_CONTACT=Move Contact service.gui.MOVE_CONTACT_ERROR=&Contact cannot be moved service.gui.MSG_DELIVERY_FAILURE=The above message could not be delivered service.gui.MSG_DELIVERY_NOT_SUPPORTED=The protocol you are using doesn't support offline messages. You could try to reach this contact through another protocol or wait until he/she becomes online. -service.gui.MSG_DELIVERY_INTERNAL_ERROR=An internal error occurred. This is most probably a bug. Please report it here: http://www.sip-communicator.org/index.php/Development/BugsAndIssues. +service.gui.MSG_DELIVERY_INTERNAL_ERROR=An internal error occurred. This is most probably a bug. Please report it here: http://www.jitsi.org/index.php/Development/BugsAndIssues. service.gui.MSG_DELIVERY_ERROR=Failed to deliver message. service.gui.MSG_DELIVERY_UNKNOWN_ERROR=Unknown error has occurred while delivering your message. service.gui.MSG_NOT_DELIVERED=A network problem occurred. Please check your network configuration and try again. @@ -311,7 +311,7 @@ service.gui.NO_CAMERA_AVAILABLE=No camera available service.gui.NO_AVAILABLE_ROOMS=The list of rooms for this server is currently not available. service.gui.NO_CONTACTS_FOUND=No matching contacts found. Press Ctrl+Enter to call {0} or use the buttons below. service.gui.NO_MESSAGE=No message -service.gui.NO_GROUP_CHAT_ACCOUNT_AVAILABLE=No accounts, supporting multi user chat found. Check sip-communicator.org for more information on which protocols support multi user chat. +service.gui.NO_GROUP_CHAT_ACCOUNT_AVAILABLE=No accounts, supporting multi user chat found. Check jitsi.org for more information on which protocols support multi user chat. service.gui.NO_ONLINE_TELEPHONY_ACCOUNT=At least one online telephony account is needed in order to make a call. Please login to one of your telephony accounts and try again. service.gui.NON_EMPTY_CHAT_WINDOW_CLOSE=You're trying to close a chat with a non-sent message. Are you sure you want to close this chat? service.gui.NON_EXISTING_USER_ID=The {0} server does not recognize specified user id. @@ -642,10 +642,10 @@ plugin.branding.WELCOME_MESSAGE=
The {1} is currently under active The version you are running is only experimental and MAY NOT \ work as expected. Please refer to {2} for more information.
plugin.branding.COPYRIGHT=
(c)2003-2011 Copyright \ - sip-communicator.org. All rights reserved. Visit \ - http://sip-communicator.org.\ + jitsi.org. All rights reserved. Visit \ + http://jitsi.org.\
-plugin.branding.LICENSE=
The SIP Communicator is distributed under \ +plugin.branding.LICENSE=
The Jitsi is distributed under \ the terms of the LGPL (\ http://www.gnu.org).
@@ -705,7 +705,7 @@ plugin.generalconfig.LEAVE_CHATROOM_ON_WINDOW_CLOSE=Leave chat rooms when closin # gibberish accregwizz plugin.gibberishaccregwizz.PROTOCOL_NAME=Gibberish -plugin.gibberishaccregwizz.PROTOCOL_DESCRIPTION=A SIP Communicator test protocol. +plugin.gibberishaccregwizz.PROTOCOL_DESCRIPTION=A Jitsi test protocol. plugin.gibberishaccregwizz.USERNAME=User ID: plugin.gibberishaccregwizz.USERNAME_AND_PASSWORD=Identification @@ -799,7 +799,7 @@ plugin.pluginmanager.NEW=New # rss accregwizz plugin.rssaccregwizz.PROTOCOL_NAME=RSS -plugin.rssaccregwizz.PROTICOL_DESCRIPTION=Add your preferred RSS feeds into SIP Communicator ! +plugin.rssaccregwizz.PROTICOL_DESCRIPTION=Add your preferred RSS feeds into Jitsi ! plugin.rssaccregwizz.ERROR_ACCOUNT_EXISTS=RSS account already exists! plugin.rssaccregwizz.ACCOUNT_INFO=This wizard will create an RSS account for you.\n\n\ Note that you could have only one RSS account!\n\n\ @@ -1083,7 +1083,7 @@ plugin.otr.menu.CB_AUTO=Automatically initiate private messaging plugin.otr.menu.CB_ENABLE=Enable private messaging plugin.otr.menu.CB_REQUIRE=Require private messaging plugin.otr.menu.CB_RESET=Reset -plugin.otr.authbuddydialog.HELP_URI=http://www.sip-communicator.org/index.php/GSOC2009/OTR +plugin.otr.authbuddydialog.HELP_URI=http://www.jitsi.org/index.php/GSOC2009/OTR plugin.otr.authbuddydialog.AUTHENTICATION_INFO=Authenticating a buddy helps ensure that the person you are talking to is who he or she claims to be. To verify the fingerprint, contact your buddy via some other authenticated channel, such as the telephone or GPG-signed email. Each of you should tell your fingerprint to the other. If everything matches up, you should indicate in the above dialog that you *have* verified the fingerprint. plugin.otr.authbuddydialog.LOCAL_FINGERPRINT=Fingerprint for you, {0}: {1} plugin.otr.authbuddydialog.REMOTE_FINGERPRINT=Purported fingerprint for {0}: {1} diff --git a/src/net/java/sip/communicator/launcher/SIPCommunicator.java b/src/net/java/sip/communicator/launcher/SIPCommunicator.java index beda167b9..0d7728012 100644 --- a/src/net/java/sip/communicator/launcher/SIPCommunicator.java +++ b/src/net/java/sip/communicator/launcher/SIPCommunicator.java @@ -168,7 +168,15 @@ private static void setScHomeDir(String osName) if ((location == null) || (name == null)) { String defaultLocation = System.getProperty("user.home"); - String defaultName = ".sip-communicator"; + String defaultName = ".jitsi"; + + // Whether we should check legacy names + // 1) when such name is not forced we check + // 2) if such is forced and is the overridableDirName check it + // (the later is the case with name transition SIP Communicator + // -> Jitsi, check them only for Jitsi) + boolean chekLegacyDirNames = (name == null) || + name.equals(overridableDirName); if (osName.startsWith("Mac")) { @@ -213,11 +221,9 @@ && new File(defaultLocation, defaultName).isDirectory()) name = defaultName; } - // if we are after app name transition SIP Communicator -> Jitsi - // lets use old one (in case of windows and macosx) if - // there is a old home directory with settings - if(isHomeDirnameForced - && name.equals(overridableDirName) + // if we need to check legacy names and there is no + // current home dir already created + if(chekLegacyDirNames && !new File(location, name).isDirectory()) { // now check whether some of the legacy dir names @@ -244,5 +250,8 @@ && new File(defaultLocation, defaultName).isDirectory()) System.setProperty(PNAME_SC_HOME_DIR_LOCATION, location); System.setProperty(PNAME_SC_HOME_DIR_NAME, name); } + + // when we end up with the home dirs, make sure we have log dir + new File(location, name + File.separator + "log").mkdirs(); } }