git://git.nikiroo.be
/
jvcard.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
VCard format: correctly co/decode escaped values
[jvcard.git]
/
src
/
be
/
nikiroo
/
jvcard
/
tui
/
MainWindow.java
diff --git
a/src/be/nikiroo/jvcard/tui/MainWindow.java
b/src/be/nikiroo/jvcard/tui/MainWindow.java
index 236289904a07297401e35754a8f0d1babc98e12e..d7cb80d8b2e624ad2b6453914c0ff13a1e878b1f 100644
(file)
--- a/
src/be/nikiroo/jvcard/tui/MainWindow.java
+++ b/
src/be/nikiroo/jvcard/tui/MainWindow.java
@@
-1,5
+1,6
@@
package be.nikiroo.jvcard.tui;
package be.nikiroo.jvcard.tui;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
@@
-221,6
+222,16
@@
public class MainWindow extends BasicWindow {
if (contentStack.size() > 0)
prev = contentStack.remove(contentStack.size() - 1);
if (contentStack.size() > 0)
prev = contentStack.remove(contentStack.size() - 1);
+ if (prev != null) {
+ try {
+ String mess = prev.wakeup();
+ if (mess != null)
+ setMessage(mess, false);
+ } catch (IOException e) {
+ setMessage(e.getMessage(), true);
+ }
+ }
+
pushContent(prev);
return removed;
pushContent(prev);
return removed;
@@
-610,6
+621,12
@@
public class MainWindow extends BasicWindow {
handled = true;
handled = true;
+ action.getObject(); // see {@link KeyAction#getMessage()}
+ String mess = action.getMessage();
+ if (mess != null) {
+ setMessage(mess, action.isError());
+ }
+
if (action.onAction()) {
handleAction(action, null);
}
if (action.onAction()) {
handleAction(action, null);
}
@@
-658,6
+675,10
@@
public class MainWindow extends BasicWindow {
case CONTACT_LIST:
if (action.getCard() != null) {
pushContent(new ContactList(action.getCard()));
case CONTACT_LIST:
if (action.getCard() != null) {
pushContent(new ContactList(action.getCard()));
+ } else if (action.getObject() != null
+ && action.getObject() instanceof MainContent) {
+ MainContent mergeContent = (MainContent) action.getObject();
+ pushContent(mergeContent);
}
break;
case CONTACT_DETAILS:
}
break;
case CONTACT_DETAILS: