Systray tooltip text now gets its value from the main application.properties file.

cusax-fix
Yana Stamcheva 18 years ago
parent 7bf7c06366
commit 6ff0d7a565

@ -1319,6 +1319,8 @@ javax.swing.event, javax.swing.border"/>
prefix="resources/images/impl/gui/buttons"/> prefix="resources/images/impl/gui/buttons"/>
<zipfileset dir="${resources}/images/impl/systray" <zipfileset dir="${resources}/images/impl/systray"
prefix="resources/images/impl/systray"/> prefix="resources/images/impl/systray"/>
<zipfileset dir="${resources}" includes="application.properties"
prefix="resources"/>
</jar> </jar>
</target> </target>

@ -32,6 +32,12 @@ public class Resources
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
.getBundle(BUNDLE_NAME); .getBundle(BUNDLE_NAME);
private static final String APPLICATION_RESUORCE_LOCATION
= "resources.application";
private static final ResourceBundle applicationBundle
= ResourceBundle.getBundle(APPLICATION_RESUORCE_LOCATION);
/** /**
* Returns an internationalized string corresponding to the given key. * Returns an internationalized string corresponding to the given key.
* *
@ -112,4 +118,22 @@ public static ImageIcon getImage(String imageID)
return new ImageIcon(image); return new ImageIcon(image);
} }
/**
* Returns the application property string corresponding to the given key.
*
* @param key The key of the string.
* @return the application property string corresponding to the given key
*/
public static String getApplicationString(String key)
{
try
{
return applicationBundle.getString(key);
}
catch (MissingResourceException e)
{
return '!' + key + '!';
}
}
} }

@ -143,7 +143,7 @@ else if (osName.startsWith("Mac OS X"))
currentIcon = logoIcon; currentIcon = logoIcon;
trayIcon = new TrayIcon(logoIcon, trayIcon = new TrayIcon(logoIcon,
Resources.getString("systrayToolTip"), Resources.getApplicationString("applicationName"),
menu); menu);
trayIcon.setIconAutoSize(true); trayIcon.setIconAutoSize(true);

@ -24,7 +24,6 @@ onlineStatus=Online
offlineStatus=Offline offlineStatus=Offline
messageReceived=Message received from messageReceived=Message received from
failedToLoadAddContactDialog=Failed to load the "Add contact" wizard dialog. failedToLoadAddContactDialog=Failed to load the "Add contact" wizard dialog.
systrayToolTip=SIP Communicator
setStatusMessage=Set status message setStatusMessage=Set status message
newStatusMessage=New status message newStatusMessage=New status message
statusMessageInfo=In the field below you can specify the new message you would like to use. statusMessageInfo=In the field below you can specify the new message you would like to use.

@ -26,7 +26,6 @@ onlineStatus=Online
offlineStatus=Offline offlineStatus=Offline
messageReceived=Nachricht erhalten von messageReceived=Nachricht erhalten von
failedToLoadAddContactDialog=Der "Kontakt hinzufügen"-Dialog konnte nicht gestartet werden. failedToLoadAddContactDialog=Der "Kontakt hinzufügen"-Dialog konnte nicht gestartet werden.
systrayToolTip=SIP Communicator
setStatusMessage=Setze Statusnachricht setStatusMessage=Setze Statusnachricht
newStatusMessage=Neue Statusnachricht newStatusMessage=Neue Statusnachricht
statusMessageInfo=Im Eingabefeld können Sie die neue Statusnachricht angeben. statusMessageInfo=Im Eingabefeld können Sie die neue Statusnachricht angeben.

Loading…
Cancel
Save