Revision 41314 trunk/org.gvsig.desktop/org.gvsig.desktop.framework/org.gvsig.andami/src/main/java/org/gvsig/andami/Launcher.java

View differences:

Launcher.java
24 24
package org.gvsig.andami;
25 25

  
26 26
import java.awt.BorderLayout;
27
import java.awt.Color;
27 28
import java.awt.Component;
28 29
import java.awt.Cursor;
29 30
import java.awt.Dimension;
......
490 491
			this.addError("Can't get personalized theme for the application",
491 492
					ex);
492 493
		}
493

  
494
                UIManager.put("Desktop.background", theme.getBackgroundColor());
495
                
496
                
494 497
		// Mostrar la ventana de inicio
495 498
		Frame f = new Frame();
496 499
		splashWindow = new MultiSplashWindow(f, theme, 27);
......
581 584
		splashWindow.process(translate("SplashWindow.update_framework_configuration"));
582 585
		updateAndamiConfig();
583 586

  
584
		frame = new MDIFrame();
587
		frame = MDIFrame.getInstance();
585 588
		// Se configura el nombre e icono de la aplicacion
586 589
		splashWindow.process(translate("SplashWindow.setting_up_applications_name_and_icons"));
587 590
		frameIcon(theme);
......
3027 3030
        localeStr = normalizeLanguageCode(localeStr);
3028 3031
        locale = getLocale(localeStr, andamiConfig.getLocaleCountry(),
3029 3032
                andamiConfig.getLocaleVariant());
3030
        Locale.setDefault(locale);
3033
        org.gvsig.i18n.Messages.setCurrentLocale(locale);
3031 3034
        JComponent.setDefaultLocale(locale);
3035
        /*
3032 3036
        org.gvsig.i18n.Messages.addLocale(locale);
3033 3037
        // add english and spanish as fallback languages
3034 3038
        if ( localeStr.equals("es") || localeStr.equals("ca")
......
3042 3046
            org.gvsig.i18n.Messages.addLocale(new Locale("en"));
3043 3047
            org.gvsig.i18n.Messages.addLocale(new Locale("es"));
3044 3048
        }
3045

  
3049
        */
3046 3050
        // Create classloader for the i18n resources in the
3047 3051
        // andami and user i18n folder. Those values will have
3048 3052
        // precedence over any other values added afterwards
......
3055 3059
                logger.info("Can't create i18n folder in gvSIG home (" + userI18nFolder + ").", e);
3056 3060
            }
3057 3061
        }
3058
        logger.info("Loading i18n resources from the application and user "
3059
                + "folders: {}, {}", appI18nFolder, userI18nFolder);
3062
//        logger.info("Loading i18n resources from the application and user "
3063
//                + "folders: {}, {}", appI18nFolder, userI18nFolder);
3060 3064

  
3061 3065
        URL[] i18nURLs = getURLsFromI18nFolders(userI18nFolder, appI18nFolder);
3062
        ClassLoader i18nClassLoader = new URLClassLoader(i18nURLs);
3066
        ClassLoader i18nClassLoader = URLClassLoader.newInstance(i18nURLs, null);
3067
        logger.info("loading resources from classloader "+i18nClassLoader.toString()+".");
3063 3068
        org.gvsig.i18n.Messages.addResourceFamily("text", i18nClassLoader,
3064 3069
                "Andami Launcher");
3065 3070
        
......
3086 3091
                File[] subFiles = folder.listFiles();
3087 3092
                for( int n2=0; n2<subFiles.length; n2++ ) {
3088 3093
                    File subFolder = subFiles[n2];
3094
                    if( "andami".equalsIgnoreCase(subFolder.getName()) ) {
3095
                        // Skip andami and add the last.
3096
                        continue;
3097
                    }
3089 3098
                    if( subFolder.isDirectory() ) {
3090 3099
                        try {
3091 3100
                            urls.add(subFolder.toURI().toURL());
......
3096 3105
                    }
3097 3106
                }
3098 3107
            }
3108
            File folder = new File(appFolder,"andami");
3109
            try {
3110
                urls.add(folder.toURI().toURL());
3111
            } catch (MalformedURLException ex) {
3112
                logger.warn("Can't convert file to url (file="+folder.getAbsolutePath()+").", ex);
3113
                return null;
3114
            }
3099 3115
            return urls.toArray(new URL[urls.size()]);
3100 3116
        }
3101 3117
        

Also available in: Unified diff