Refreshes the menu and the buttons. @param result update number of results
(final boolean result)
| 610 | * @param result update number of results |
| 611 | */ |
| 612 | public void refreshControls(final boolean result) { |
| 613 | final DBNodes marked = context.marked, current = context.current(); |
| 614 | if(result && marked != null) { |
| 615 | results.setText(BaseXLayout.results((marked.isEmpty() ? current : marked).size(), -1, this)); |
| 616 | } |
| 617 | |
| 618 | final boolean inf = gopts.get(GUIOptions.SHOWINFO); |
| 619 | context.options.set(MainOptions.QUERYINFO, inf); |
| 620 | context.options.set(MainOptions.XMLPLAN, inf); |
| 621 | |
| 622 | final Data data = context.data(); |
| 623 | mode.setEnabled(data != null); |
| 624 | final int m = data == null ? 2 : gopts.get(GUIOptions.SEARCHMODE); |
| 625 | if(mode.getSelectedIndex() != m) { |
| 626 | mode.setSelectedIndex(m); |
| 627 | input.mode(mode.getSelectedItem()); |
| 628 | } |
| 629 | |
| 630 | toolbar.refresh(); |
| 631 | menu.refresh(); |
| 632 | } |
| 633 | |
| 634 | /** |
| 635 | * Toggles fullscreen mode. |