X-Git-Url: http://git.sourceforge.jp/view?p=coroid%2Finqubus.git;a=blobdiff_plain;f=frontend%2Fsrc%2Fyukihane%2Finqubus%2Fgui%2FConfigDialog.java;h=b37e458ba23b807d502a441de63f6450fa22a69e;hp=13bef370e4c56e0f8170a68d37b76f724c0eb3b1;hb=9513436635c8c2dd040e306c4aeb2eb78ec6a6c2;hpb=6b6380c90455064894e62be9bb5731be0cc49f19 diff --git a/frontend/src/yukihane/inqubus/gui/ConfigDialog.java b/frontend/src/yukihane/inqubus/gui/ConfigDialog.java index 13bef37..b37e458 100644 --- a/frontend/src/yukihane/inqubus/gui/ConfigDialog.java +++ b/frontend/src/yukihane/inqubus/gui/ConfigDialog.java @@ -38,6 +38,7 @@ import javax.swing.SpinnerNumberModel; import javax.swing.WindowConstants; import org.apache.commons.configuration.ConfigurationException; import yukihane.inqubus.config.Config; +import yukihane.inqubus.config.Config.CookieBrowser; /** * @@ -104,7 +105,6 @@ public class ConfigDialog extends JDialog { pnlAccount.setBorder(BorderFactory.createTitledBorder("アカウント")); - final JRadioButton btnAccount = new JRadioButton("次の情報を使用してログインする"); final JLabel lblMail = new JLabel("ID(メールアドレス)"); final JLabel lblPassword = new JLabel("パスワード"); @@ -144,14 +144,6 @@ public class ConfigDialog extends JDialog { ); - final JRadioButton btnLoginCookie = new JRadioButton("ブラウザのログイン情報を使用してアクセスする"); - final JRadioButton btnCookieIe = new JRadioButton("IE(7以降) (Windows)"); - final JRadioButton btnCookieFirefox = new JRadioButton("Firefox(4以降) (Windows)"); - final JRadioButton btnCookieChrome = new JRadioButton("Google Chrome (Windows)"); - final JRadioButton btnCookieChromium = new JRadioButton("Chrome派生ブラウザ (Windows)"); - final JRadioButton btnCookieOpera = new JRadioButton("Opera (Windows)"); - final JRadioButton btnCookieOther = new JRadioButton("上記以外 - cookie保存ディレクトリを次に入力"); - final JTextField fldCookie = new JTextField(); final JButton btnCookie = new JButton("..."); btnCookie.addActionListener(new FileChooseActionListener(this, JFileChooser.DIRECTORIES_ONLY, fldCookie)); @@ -835,8 +827,18 @@ public class ConfigDialog extends JDialog { // ネットワーク // ネットワーク - アカウント + final JRadioButton btnAccount = new JRadioButton("次の情報を使用してログインする"); private final JTextField fldMail; private final JPasswordField fldPassword = new JPasswordField(); + // ネットワーク - cookie + final JRadioButton btnLoginCookie = new JRadioButton("ブラウザのログイン情報を使用してアクセスする"); + final JRadioButton btnCookieIe = new JRadioButton("IE(7以降) (Windows)"); + final JRadioButton btnCookieFirefox = new JRadioButton("Firefox(4以降) (Windows)"); + final JRadioButton btnCookieChrome = new JRadioButton("Google Chrome (Windows)"); + final JRadioButton btnCookieChromium = new JRadioButton("Chrome派生ブラウザ (Windows)"); + final JRadioButton btnCookieOpera = new JRadioButton("Opera (Windows)"); + final JRadioButton btnCookieOther = new JRadioButton("上記以外 - cookie保存ディレクトリを次に入力"); + final JTextField fldCookie = new JTextField(); // ネットワーク - プロキシ private final JCheckBox cbProxyUse; private final JTextField fldProxyHost = new JTextField(); @@ -906,10 +908,41 @@ public class ConfigDialog extends JDialog { /* * ネットワーク - アカウント */ + btnAccount.setSelected(p.getNeedsLogin()); fldMail.setText(p.getId()); fldPassword.setText(p.getPassword()); /* + * ネットワーク - cookie + */ + final CookieBrowser cookieBrowser = p.getCookieBrowser(); + final JRadioButton enabledBrowser; + switch(cookieBrowser){ + case MSIE: + enabledBrowser = btnCookieIe; + break; + case FIREFOX: + enabledBrowser = btnCookieFirefox; + break; + case CHROME: + enabledBrowser = btnCookieChrome; + break; + case CHROMIUM: + enabledBrowser = btnCookieChromium; + break; + case OPERA: + enabledBrowser = btnCookieOpera; + break; + case OTHER: + enabledBrowser = btnCookieOther; + break; + default: + throw new UnsupportedOperationException(); + } + enabledBrowser.setSelected(true); + fldCookie.setText(p.getCookieDir()); + + /* * ネットワーク - プロキシ */ cbProxyUse.setSelected(p.getProxyUse());