git://git.nikiroo.be
/
fanfix.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
339652c
)
Fix ClassCastException
author
Kevin Lamonte
<kevin.lamonte@gmail.com>
Sun, 20 Aug 2017 20:44:35 +0000
(16:44 -0400)
committer
Kevin Lamonte
<kevin.lamonte@gmail.com>
Sun, 20 Aug 2017 20:44:35 +0000
(16:44 -0400)
src/jexer/TApplication.java
patch
|
blob
|
blame
|
history
src/jexer/TWidget.java
patch
|
blob
|
blame
|
history
src/jexer/menu/TMenu.java
patch
|
blob
|
blame
|
history
src/jexer/menu/TMenu.properties
patch
|
blob
|
blame
|
history
diff --git
a/src/jexer/TApplication.java
b/src/jexer/TApplication.java
index 57d60955e33a1f1d4b21a2069e8b930c922d0124..66f711017604bfb1f37b89fb5ad91612ec4eee78 100644
(file)
--- a/
src/jexer/TApplication.java
+++ b/
src/jexer/TApplication.java
@@
-2512,6
+2512,10
@@
public class TApplication implements Runnable {
showAboutDialog();
return true;
}
showAboutDialog();
return true;
}
+ if (menu.getId() == TMenu.MID_REPAINT) {
+ doRepaint();
+ return true;
+ }
return false;
}
return false;
}
diff --git
a/src/jexer/TWidget.java
b/src/jexer/TWidget.java
index 22766dde5aa281212c320182fbad09f76c9978f6..12e43444a6f085392903d4335fe6004fc72c6194 100644
(file)
--- a/
src/jexer/TWidget.java
+++ b/
src/jexer/TWidget.java
@@
-622,7
+622,12
@@
public abstract class TWidget implements Comparable<TWidget> {
this.parent = parent;
this.window = parent.window;
children = new ArrayList<TWidget>();
this.parent = parent;
this.window = parent.window;
children = new ArrayList<TWidget>();
- parent.addChild(this);
+
+ // Do not add TStatusBars, they are drawn by TApplication
+ if (this instanceof TStatusBar) {
+ } else {
+ parent.addChild(this);
+ }
}
/**
}
/**
@@
-642,7
+647,12
@@
public abstract class TWidget implements Comparable<TWidget> {
this.parent = parent;
this.window = parent.window;
children = new ArrayList<TWidget>();
this.parent = parent;
this.window = parent.window;
children = new ArrayList<TWidget>();
- parent.addChild(this);
+
+ // Do not add TStatusBars, they are drawn by TApplication
+ if (this instanceof TStatusBar) {
+ } else {
+ parent.addChild(this);
+ }
this.x = x;
this.y = y;
this.x = x;
this.y = y;
diff --git
a/src/jexer/menu/TMenu.java
b/src/jexer/menu/TMenu.java
index 0e948cee0df2fbb7845a53bcf76e6a64074da37e..c4a11df23d6f38b51aa071be0dbd4ff93cf10e7d 100644
(file)
--- a/
src/jexer/menu/TMenu.java
+++ b/
src/jexer/menu/TMenu.java
@@
-104,6
+104,9
@@
public final class TMenu extends TWindow {
public static final int MID_HELP_ACTIVE_FILE = 45;
public static final int MID_ABOUT = 46;
public static final int MID_HELP_ACTIVE_FILE = 45;
public static final int MID_ABOUT = 46;
+ // Other
+ public static final int MID_REPAINT = 50;
+
/**
* Public constructor.
*
/**
* Public constructor.
*
@@
-477,6
+480,10
@@
public final class TMenu extends TWindow {
label = i18n.getString("menuHelpAbout");
break;
label = i18n.getString("menuHelpAbout");
break;
+ case MID_REPAINT:
+ label = i18n.getString("menuRepaintDesktop");
+ break;
+
default:
throw new IllegalArgumentException("Invalid menu ID: " + id);
}
default:
throw new IllegalArgumentException("Invalid menu ID: " + id);
}
diff --git
a/src/jexer/menu/TMenu.properties
b/src/jexer/menu/TMenu.properties
index bf3b4f3dad91fc2ffca0f21629ea136bf065f2d3..000df917d26052a345b5d7ad9e4973114e350a71 100644
(file)
--- a/
src/jexer/menu/TMenu.properties
+++ b/
src/jexer/menu/TMenu.properties
@@
-20,3
+20,5
@@
menuHelpPrevious=&Previous topic
menuHelpHelp=&Help on help
menuHelpActive=Active &file...
menuHelpAbout=&About...
menuHelpHelp=&Help on help
menuHelpActive=Active &file...
menuHelpAbout=&About...
+
+menuRepaintDesktop=&Repaint desktop