Revision 38806 branches/v2_0_0_prep/frameworks/_fwAndami/src/org/gvsig/andami/Launcher.java
Launcher.java | ||
---|---|---|
547 | 547 |
} |
548 | 548 |
}); |
549 | 549 |
|
550 |
createDefaultIconTheme(); |
|
551 |
|
|
552 | 550 |
frame.message(Messages.getString("StatusBar.Aplicacion_iniciada"), JOptionPane.INFORMATION_MESSAGE); |
553 | 551 |
|
554 | 552 |
splashWindow.close(); |
... | ... | |
579 | 577 |
} |
580 | 578 |
} |
581 | 579 |
|
582 |
private void createDefaultIconTheme() { |
|
583 |
PluginsManager pluginsManager = PluginsLocator.getManager(); |
|
584 |
IconThemeManager iconManager = ToolsSwingLocator.getIconThemeManager(); |
|
585 |
|
|
586 |
File f = new File(pluginsManager.getApplicationHomeFolder(),"icon-theme"); |
|
587 |
if( !f.exists() ) { |
|
588 |
f.mkdir(); |
|
589 |
} |
|
590 |
IconTheme theme = iconManager.getDefault(); |
|
591 |
File f2 = new File(f,theme.getID()) ; |
|
592 |
if( !f2.exists() ) { |
|
593 |
logger.info("Creating default icon theme in "+f.getAbsolutePath()); |
|
594 |
theme.export(f); |
|
595 |
} |
|
596 |
} |
|
580 |
|
|
597 | 581 |
|
598 | 582 |
/** |
599 | 583 |
* |
... | ... | |
2980 | 2964 |
|
2981 | 2965 |
File f = new File(pluginsManager.getApplicationFolder(),"icon-theme"); |
2982 | 2966 |
if( !f.exists() ) { |
2983 |
f.mkdir(); |
|
2967 |
try { |
|
2968 |
f.mkdir(); |
|
2969 |
} catch(Exception ex) { |
|
2970 |
// Do nothing |
|
2971 |
} |
|
2984 | 2972 |
} |
2985 | 2973 |
iconManager.getRepository().add(f,"_Global"); |
2986 | 2974 |
|
2987 | 2975 |
f = new File(pluginsManager.getApplicationHomeFolder(),"icon-theme"); |
2988 | 2976 |
if( !f.exists() ) { |
2989 |
f.mkdir(); |
|
2977 |
try { |
|
2978 |
f.mkdir(); |
|
2979 |
} catch(Exception ex) { |
|
2980 |
// Do nothing |
|
2981 |
} |
|
2990 | 2982 |
} |
2991 | 2983 |
iconManager.getRepository().add(f,"_User"); |
2992 | 2984 |
|
2993 |
// TODO: falta por cargar de algun fichero de config el nombre del tema |
|
2994 |
// por deecto a usar y seleccionarlo aqui como tema corriente. |
|
2995 |
// |
|
2985 |
Preferences prefs = Preferences.userRoot().node("gvsig.icontheme"); |
|
2986 |
String defaultThemeID = prefs.get("default-theme", null); |
|
2987 |
if( defaultThemeID != null ) { |
|
2988 |
IconTheme iconTheme = iconManager.get(defaultThemeID); |
|
2989 |
if( iconTheme != null ) { |
|
2990 |
iconManager.setCurrent(iconTheme); |
|
2991 |
} |
|
2992 |
} |
|
2996 | 2993 |
} |
2997 | 2994 |
|
2998 | 2995 |
/** |
Also available in: Unified diff