Mercurial > hg > release > thermostat-0.15
changeset 1272:8689faefe49d
Disabled history mode switch
review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-October/008369.html
reviewed-by: jerboaa
author | Mario Torre <neugens.limasoftware@gmail.com> |
---|---|
date | Mon, 07 Oct 2013 13:04:53 +0200 |
parents | c43421c64478 |
children | f247a6e50be5 |
files | client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/MainWindow.java client/swing/src/test/java/com/redhat/thermostat/client/swing/internal/MainWindowTest.java |
diffstat | 2 files changed, 26 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/MainWindow.java Mon Oct 07 13:04:52 2013 +0200 +++ b/client/swing/src/main/java/com/redhat/thermostat/client/swing/internal/MainWindow.java Mon Oct 07 13:04:53 2013 +0200 @@ -76,7 +76,6 @@ import com.redhat.thermostat.client.swing.components.OverlayPanel; import com.redhat.thermostat.client.swing.components.ThermostatPopupMenu; import com.redhat.thermostat.client.swing.internal.accordion.Accordion; -import com.redhat.thermostat.client.swing.internal.accordion.AccordionModel; import com.redhat.thermostat.client.swing.internal.components.ThermostatGlassPane; import com.redhat.thermostat.client.swing.internal.components.ThermostatGlassPaneLayout; import com.redhat.thermostat.client.swing.internal.progress.AggregateNotificationPanel; @@ -242,16 +241,18 @@ editMenu.add(configureClientMenuItem); editMenu.addSeparator(); - JMenuItem historyModeMenuItem = new JCheckBoxMenuItem(translator.localize(LocaleResources.MENU_EDIT_ENABLE_HISTORY_MODE).getContents()); - historyModeMenuItem.setName("historyModeSwitch"); - historyModeMenuItem.setSelected(false); - historyModeMenuItem.addActionListener(new java.awt.event.ActionListener() { - @Override - public void actionPerformed(java.awt.event.ActionEvent e) { - fireViewAction(Action.SWITCH_HISTORY_MODE); - } - }); - editMenu.add(historyModeMenuItem); + + // FIXME: re-add this when ready +// JMenuItem historyModeMenuItem = new JCheckBoxMenuItem(translator.localize(LocaleResources.MENU_EDIT_ENABLE_HISTORY_MODE).getContents()); +// historyModeMenuItem.setName("historyModeSwitch"); +// historyModeMenuItem.setSelected(false); +// historyModeMenuItem.addActionListener(new java.awt.event.ActionListener() { +// @Override +// public void actionPerformed(java.awt.event.ActionEvent e) { +// fireViewAction(Action.SWITCH_HISTORY_MODE); +// } +// }); +// editMenu.add(historyModeMenuItem); JMenu viewMenu = new JMenu(translator.localize(LocaleResources.MENU_VIEW).getContents()); mainMenuBar.add(viewMenu);
--- a/client/swing/src/test/java/com/redhat/thermostat/client/swing/internal/MainWindowTest.java Mon Oct 07 13:04:52 2013 +0200 +++ b/client/swing/src/test/java/com/redhat/thermostat/client/swing/internal/MainWindowTest.java Mon Oct 07 13:04:53 2013 +0200 @@ -211,17 +211,17 @@ frameFixture.requireNotVisible(); } -// @Category(GUITest.class) -// @Test -// public void verifyThatClientPreferencesMenuItemTriggersEvent() { -// frameFixture.show(); -// JMenuItemFixture menuItem = frameFixture.menuItem("showClientConfig"); -// menuItem.click(); -// frameFixture.close(); -// frameFixture.requireNotVisible(); -// -// verify(l).actionPerformed(new ActionEvent<MainView.Action>(window, MainView.Action.SHOW_CLIENT_CONFIG)); -// } + @Category(GUITest.class) + @Test + public void verifyThatClientPreferencesMenuItemTriggersEvent() { + frameFixture.show(); + JMenuItemFixture menuItem = frameFixture.menuItem("showClientConfig"); + menuItem.click(); + frameFixture.close(); + frameFixture.requireNotVisible(); + + verify(l).actionPerformed(new ActionEvent<MainView.Action>(window, MainView.Action.SHOW_CLIENT_CONFIG)); + } @Category(GUITest.class) @Test @@ -236,8 +236,9 @@ } - @Category(GUITest.class) - @Test + // FIXME: re-add when history mode is back + //@Category(GUITest.class) + //@Test public void verifyThatHistorySwitchTriggersEvent() { frameFixture.show(); JMenuItemFixture menuItem = frameFixture.menuItem("historyModeSwitch");