mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
Merge branch 'next' into lang
Conflicts: diylc/diylc-library/lib/diylc-core.jar diylc/diylc-swing/lib/diylc-core.jar diylc/diylc-swing/library/main.jar
This commit is contained in:
Binary file not shown.
@@ -125,6 +125,8 @@
|
||||
</bundleapp>
|
||||
<zip destfile="${build.dir}/diylc-${diylc.version}-osx.zip">
|
||||
<zipfileset filemode="755" dir="${build.dir}/DIYLC.app" prefix="DIYLC.app" />
|
||||
<zipfileset filemode="755" dir="${basedir}/themes" prefix="DIYLC.app/Contents/Resources/themes" />
|
||||
<zipfileset filemode="755" dir="${basedir}/fonts" prefix="DIYLC.app/Contents/Resources/fonts" />
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
@@ -166,7 +168,7 @@
|
||||
</zip>
|
||||
</target>
|
||||
|
||||
<target name="full" depends="win,mac,universal" />
|
||||
<target name="full" depends="win,universal,mac" />
|
||||
|
||||
<target name="javadoc">
|
||||
<javadoc access="public" author="true" classpathref="class.path" destdir="doc" nodeprecated="false" nodeprecatedlist="false" noindex="false" nonavbar="false" notree="false" source="1.6" splitindex="true" use="true" version="true">
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,34 @@
|
||||
<project name="diylc-swing-ftp" basedir="."
|
||||
default="printVersion">
|
||||
<property environment="env" />
|
||||
<property name="FTP_USER" value="diylc_deploy@diy-fever.com" />
|
||||
<property name="URL" value="ftp.diy-fever.com" />
|
||||
|
||||
<target name="upload">
|
||||
<echo
|
||||
message="Logging to ${FTP_USER}:${env.DIYLC_DEPLOY_PWD}@${URL}" />
|
||||
<ftp server="${URL}" userid="${FTP_USER}"
|
||||
password="${env.DIYLC_DEPLOY_PWD}">
|
||||
<fileset dir="./../diylc-core/src/org/diylc/presenter">
|
||||
<include name="update.xml" />
|
||||
</fileset>
|
||||
</ftp>
|
||||
</target>
|
||||
|
||||
<path id="class.path">
|
||||
<fileset dir="${basedir}">
|
||||
<include name="lib/**/*.jar" />
|
||||
<include name="library/**/*.jar" />
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<target name="printVersion">
|
||||
<java classname="org.diylc.utils.VersionReader">
|
||||
<sysproperty key="DEBUG" value="true" />
|
||||
<arg value="${basedir}/" />
|
||||
<classpath>
|
||||
<path refid="class.path" />
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
</project>
|
||||
@@ -39,6 +39,7 @@ import org.diylc.presenter.Presenter;
|
||||
import org.diylc.swing.gui.MainFrame;
|
||||
import org.diylc.swing.gui.TemplateDialog;
|
||||
import org.diylc.swingframework.FontChooserComboBox;
|
||||
import org.diylc.utils.ResourceLoader;
|
||||
|
||||
/**
|
||||
* Main class that runs DIYLC.
|
||||
@@ -100,23 +101,23 @@ public class DIYLCStarter {
|
||||
@Override
|
||||
public void run() {
|
||||
LOG.debug("Starting font pre-loading");
|
||||
|
||||
File dir = new File("fonts");
|
||||
File[] fonts = dir.listFiles();
|
||||
|
||||
File[] fonts = ResourceLoader.getFiles("fonts");
|
||||
|
||||
for (int i = 0; i < fonts.length; i++) {
|
||||
try {
|
||||
LOG.info("Dynamically loading font: " + fonts[i].getName());
|
||||
Font customFont = Font.createFont(Font.TRUETYPE_FONT, new File(fonts[i].getAbsolutePath())).deriveFont(12f);
|
||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
// register the font
|
||||
ge.registerFont(customFont);
|
||||
} catch (IOException e) {
|
||||
LOG.error("Could not load font", e);
|
||||
} catch (FontFormatException e) {
|
||||
LOG.error("Font format error", e);
|
||||
if (fonts != null)
|
||||
for (int i = 0; i < fonts.length; i++) {
|
||||
try {
|
||||
LOG.info("Dynamically loading font: " + fonts[i].getName());
|
||||
Font customFont = Font.createFont(Font.TRUETYPE_FONT, new File(fonts[i].getAbsolutePath())).deriveFont(12f);
|
||||
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
|
||||
// register the font
|
||||
ge.registerFont(customFont);
|
||||
} catch (IOException e) {
|
||||
LOG.error("Could not load font", e);
|
||||
} catch (FontFormatException e) {
|
||||
LOG.error("Font format error", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FontChooserComboBox box = new FontChooserComboBox();
|
||||
box.getPreferredSize();
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.diylc.images.IconLoader;
|
||||
import org.diylc.lang.TranslateUtil;
|
||||
import org.diylc.swing.ActionFactory;
|
||||
import org.diylc.swing.ISwingUI;
|
||||
import org.diylc.utils.ResourceLoader;
|
||||
|
||||
import com.thoughtworks.xstream.XStream;
|
||||
import com.thoughtworks.xstream.io.xml.DomDriver;
|
||||
@@ -163,11 +164,11 @@ public class ConfigPlugin implements IPlugIn {
|
||||
ActionFactory.getInstance()
|
||||
.createConfigAction(plugInPort, "Sticky Points", IPlugInPort.STICKY_POINTS_KEY, true), CONFIG_MENU);
|
||||
|
||||
File themeDir = new File("themes");
|
||||
if (themeDir.exists()) {
|
||||
File[] themeFiles = ResourceLoader.getFiles("themes");
|
||||
if (themeFiles != null && themeFiles.length > 0) {
|
||||
XStream xStream = new XStream(new DomDriver());
|
||||
swingUI.injectSubmenu(THEME_MENU, IconLoader.Pens.getIcon(), CONFIG_MENU);
|
||||
for (File file : themeDir.listFiles()) {
|
||||
for (File file : themeFiles) {
|
||||
if (file.getName().toLowerCase().endsWith(".xml")) {
|
||||
try {
|
||||
InputStream in = new FileInputStream(file);
|
||||
|
||||
Reference in New Issue
Block a user