From 9d007c91887e0c2e9eb20da7b65a7a9c73a43e50 Mon Sep 17 00:00:00 2001 From: Georgy Litvinov Date: Tue, 10 Aug 2021 14:27:38 +0200 Subject: [PATCH] fix: no input file from LO --- .../w2phtml/gui/ConfigurationWindow.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java b/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java index 940bc35..23ba780 100644 --- a/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java +++ b/src/main/java/pro/litvinovg/w2phtml/gui/ConfigurationWindow.java @@ -53,16 +53,6 @@ public class ConfigurationWindow extends JFrame { * Create the application. */ public ConfigurationWindow() { - initializeConfigurationWindow(); - } - - public ConfigurationWindow(XComponentContext context, ODTDocument doc) { - this.context = context; - initializeConfigurationWindow(); - storage.setSourceFileName(doc.getFileName()); - } - - private void initializeConfigurationWindow() { this.localizer = new Localizer(); initializePreferences(); setTitle(localizer.getTranslation(CONVERTER_TITLE_LABEL)); @@ -71,7 +61,19 @@ public class ConfigurationWindow extends JFrame { initComponents(); createEvents(); } - + + public ConfigurationWindow(XComponentContext context, ODTDocument doc) { + this.context = context; + this.localizer = new Localizer(); + initializePreferences(); + storage.setSourceFileName(doc.getFileName()); + setTitle(localizer.getTranslation(CONVERTER_TITLE_LABEL)); + setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); + setIconImage(Toolkit.getDefaultToolkit().getImage(ConfigurationWindow.class.getResource("/pro/litvinovg/w2phtml/gui/resources/w2phtml.png"))); + initComponents(); + createEvents(); + } + private void initializePreferences() { storage = new PreferencesStorage(); }