- @SuppressWarnings("unused")
- TWindow w = new TuiFileListWindow(this, files);
+ int width = getBackend().getScreen().getWidth();
+ int height = getBackend().getScreen().getHeight() - 2;
+
+ if (backend(textMode) == BackendType.SWING) {
+ // TODO: why does the size change after the FIRST window has been
+ // created (SWING mode only?) ?
+ // A problem with the graphical size not an exact number of
+ // cols/lines?
+ width--;
+ height--;
+ }
+
+ width = Math.max(1, width);
+ height = Math.max(1, height);
+
+ TuiBrowserWindow main = new TuiFileListWindow(TuiLauncherJexer.this,
+ width, height, files);
+
+ main.addCloseListener(new TAction() {
+ @Override
+ public void DO() {
+ TuiLauncherJexer.this.exit(false);
+ }
+ });