mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
SPARK-1315 catches if could not find spark.jar and tries a workaround. added language icon
git-svn-id: http://svn.igniterealtime.org/svn/repos/spark/trunk@12325 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
committed by
holger.bergunde
parent
e18803d66d
commit
93412e8edf
@ -346,3 +346,5 @@ ACCEPT_INVITE_IMAGE = images/accept.png
|
||||
REJECT_INVITE_IMAGE = images/reject.png
|
||||
INVITE_MORE_IMAGE = images/invitemore.png
|
||||
|
||||
# Lanuage
|
||||
LANGUAGE_ICON = images/language_plugin.png
|
||||
@ -20,6 +20,7 @@
|
||||
package org.jivesoftware.sparkimpl.plugin.language;
|
||||
|
||||
import org.jivesoftware.resource.Res;
|
||||
import org.jivesoftware.resource.SparkRes;
|
||||
import org.jivesoftware.spark.SparkManager;
|
||||
import org.jivesoftware.spark.plugin.Plugin;
|
||||
import org.jivesoftware.spark.util.log.Log;
|
||||
@ -57,14 +58,15 @@ public class LanguagePlugin implements Plugin {
|
||||
final JMenu actionsMenu = SparkManager.getMainWindow().getMenuByName(Res.getString("menuitem.actions"));
|
||||
|
||||
languageMenu = new JMenu(Res.getString("menuitem.languages"));
|
||||
languageMenu.setIcon(SparkRes.getImageIcon("LANGUAGE_ICON"));
|
||||
|
||||
locales = Locale.getAvailableLocales();
|
||||
|
||||
// Load files
|
||||
URL sparkJar = getClass().getClassLoader().getResource("spark.jar");
|
||||
if (sparkJar == null) {
|
||||
// Do not initialize
|
||||
return;
|
||||
sparkJar = getClass().getProtectionDomain().getCodeSource().getLocation();
|
||||
if (sparkJar == null) return;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
BIN
src/resources/images/language_plugin.png
Normal file
BIN
src/resources/images/language_plugin.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 811 B |
Reference in New Issue
Block a user