Revision 9653 trunk/libraries/libCorePlugin/src/com/iver/core/preferences/general/BrowserControlPage.java
BrowserControlPage.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.1 2007-01-10 16:55:04 jaume |
|
46 |
* Revision 1.2 2007-01-10 18:28:58 jaume |
|
47 |
* *** empty log message *** |
|
48 |
* |
|
49 |
* Revision 1.1 2007/01/10 16:55:04 jaume |
|
47 | 50 |
* default browser now configurable in linux |
48 | 51 |
* |
49 | 52 |
* |
... | ... | |
61 | 64 |
import javax.swing.JPanel; |
62 | 65 |
import javax.swing.JRadioButton; |
63 | 66 |
import javax.swing.JTextField; |
67 |
import javax.swing.SwingConstants; |
|
64 | 68 |
|
65 | 69 |
import com.iver.andami.PluginServices; |
66 | 70 |
import com.iver.andami.preferences.AbstractPreferencePage; |
... | ... | |
104 | 108 |
JPanel aux; |
105 | 109 |
|
106 | 110 |
ButtonGroup group = new ButtonGroup(); |
107 |
rdBtnSelectBrowser = new JRadioButton(PluginServices.getText(this, "select_a_known_browser")); |
|
111 |
rdBtnSelectBrowser = new JRadioButton(PluginServices.getText(this, "options.general.browser.select_a_known_browser"));
|
|
108 | 112 |
rdBtnSelectBrowser.addActionListener(this); |
109 | 113 |
|
110 | 114 |
aux = new JPanel(new FlowLayout(FlowLayout.LEADING)); |
... | ... | |
114 | 118 |
|
115 | 119 |
addComponent(rdBtnSelectBrowser, aux); |
116 | 120 |
|
117 |
rdBtnSpecifyCommand = new JRadioButton(PluginServices.getText(this, "specify_a_command")); |
|
121 |
rdBtnSpecifyCommand = new JRadioButton(PluginServices.getText(this, "options.general.browser.specify_a_command")); |
|
122 |
rdBtnSpecifyCommand.setVerticalAlignment(SwingConstants.BOTTOM); |
|
118 | 123 |
rdBtnSpecifyCommand.addActionListener(this); |
119 |
txtCustomCommand = new JTextField(25); |
|
120 |
addComponent(rdBtnSpecifyCommand, txtCustomCommand); |
|
124 |
aux = new JPanel(new FlowLayout(FlowLayout.LEADING)); |
|
125 |
aux.add(txtCustomCommand = new JTextField(25)); |
|
126 |
addComponent(rdBtnSpecifyCommand, aux); |
|
121 | 127 |
group.add(rdBtnSelectBrowser); |
122 | 128 |
group.add(rdBtnSpecifyCommand); |
123 | 129 |
|
... | ... | |
158 | 164 |
// Default Projection |
159 | 165 |
if (xml.contains(DEFAULT_BROWSER_KEY_NAME)) { |
160 | 166 |
String cmd = xml.getStringProperty(DEFAULT_BROWSER_KEY_NAME); |
161 |
cmbBrowsers.setSelectedItem(cmd); |
|
162 |
rdBtnSelectBrowser.setSelected(supportedBrowsers.contains(cmd)); |
|
167 |
boolean b = supportedBrowsers.contains(cmd); |
|
168 |
if (b) { |
|
169 |
cmbBrowsers.setSelectedItem(cmd); |
|
170 |
cmbBrowsers.setEnabled(true); |
|
171 |
txtCustomCommand.setEnabled(false); |
|
172 |
} else { |
|
173 |
txtCustomCommand.setText(cmd); |
|
174 |
txtCustomCommand.setEnabled(true); |
|
175 |
cmbBrowsers.setEnabled(false); |
|
176 |
} |
|
177 |
rdBtnSelectBrowser.setSelected(b); |
|
178 |
rdBtnSpecifyCommand.setSelected(!b); |
|
163 | 179 |
} else { |
164 | 180 |
initializeDefaults(); |
165 | 181 |
} |
Also available in: Unified diff