[fixes #825] Change update dialog checkbox action
This changes the action from 'remind me later' to 'don't update on startup'. Since the Cancel-button is already the same as 'remind me later' and it's handier/more logical to have the 'don't update on startup' checkbox in the update dialog
This commit is contained in:
		
							parent
							
								
									a1ba014f33
								
							
						
					
					
						commit
						6ce418556d
					
				| @ -17,6 +17,7 @@ import net.sf.openrocket.communication.UpdateInfo; | ||||
| import net.sf.openrocket.gui.components.URLLabel; | ||||
| import net.sf.openrocket.gui.util.GUIUtil; | ||||
| import net.sf.openrocket.gui.util.Icons; | ||||
| import net.sf.openrocket.gui.util.SwingPreferences; | ||||
| import net.sf.openrocket.l10n.Translator; | ||||
| import net.sf.openrocket.startup.Application; | ||||
| import net.sf.openrocket.util.Chars; | ||||
| @ -26,6 +27,7 @@ import net.sf.openrocket.gui.widgets.SelectColorButton; | ||||
| public class UpdateInfoDialog extends JDialog { | ||||
| 	private final JCheckBox checkAtStartup; | ||||
| 	private static final Translator trans = Application.getTranslator(); | ||||
| 	private final SwingPreferences preferences = (SwingPreferences) Application.getPreferences(); | ||||
| 
 | ||||
| 	public UpdateInfoDialog(UpdateInfo info) { | ||||
| 		//// OpenRocket update available | ||||
| @ -69,7 +71,13 @@ public class UpdateInfoDialog extends JDialog { | ||||
| 		checkAtStartup = new JCheckBox(trans.get("pref.dlg.checkbox.Checkupdates")); | ||||
| 		//// Check for software updates every time you start up OpenRocket | ||||
| 		checkAtStartup.setToolTipText(trans.get("pref.dlg.checkbox.Checkupdates.ttip")); | ||||
| 		checkAtStartup.setSelected(true); | ||||
| 		checkAtStartup.setSelected(preferences.getCheckUpdates()); | ||||
| 		checkAtStartup.addActionListener(new ActionListener() { | ||||
| 			@Override | ||||
| 			public void actionPerformed(ActionEvent e) { | ||||
| 				preferences.setCheckUpdates(checkAtStartup.isSelected()); | ||||
| 			} | ||||
| 		}); | ||||
| 		panel.add(checkAtStartup); | ||||
| 		 | ||||
| 		// Cancel button | ||||
| @ -89,9 +97,4 @@ public class UpdateInfoDialog extends JDialog { | ||||
| 		GUIUtil.setDisposableDialogOptions(this, button); | ||||
| 	} | ||||
| 	 | ||||
| 	 | ||||
| 	public boolean isReminderSelected() { | ||||
| 		return remind.isSelected(); | ||||
| 	} | ||||
| 	 | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user