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
Java 1.6+ compatibility (at least) instead of 1.8+ only
[jvcard.git]
/
src
/
be
/
nikiroo
/
jvcard
/
tui
/
panes
/
ContactDetails.java
diff --git
a/src/be/nikiroo/jvcard/tui/panes/ContactDetails.java
b/src/be/nikiroo/jvcard/tui/panes/ContactDetails.java
index 08df4034165c761931a0fedebcf5eebf241d0058..06c88fc9ec02a66f71011f6842ecb54d6e1e0603 100644
(file)
--- a/
src/be/nikiroo/jvcard/tui/panes/ContactDetails.java
+++ b/
src/be/nikiroo/jvcard/tui/panes/ContactDetails.java
@@
-1,10
+1,10
@@
package be.nikiroo.jvcard.tui.panes;
import java.awt.Image;
package be.nikiroo.jvcard.tui.panes;
import java.awt.Image;
-import java.util.Base64;
import java.util.LinkedList;
import java.util.List;
import java.util.LinkedList;
import java.util.List;
+import javax.xml.bind.DatatypeConverter;
import javax.swing.ImageIcon;
import be.nikiroo.jvcard.Contact;
import javax.swing.ImageIcon;
import be.nikiroo.jvcard.Contact;
@@
-116,7
+116,7
@@
public class ContactDetails extends MainContent {
if (encoding != null && encoding.getValue() != null
&& encoding.getValue().equalsIgnoreCase("b")) {
if (encoding != null && encoding.getValue() != null
&& encoding.getValue().equalsIgnoreCase("b")) {
- image = new ImageIcon(
Base64.getDecoder().decode
(
+ image = new ImageIcon(
DatatypeConverter.parseBase64Binary
(
photo.getValue())).getImage();
}
}
photo.getValue())).getImage();
}
}
@@
-166,6
+166,14
@@
public class ContactDetails extends MainContent {
return false;
}
});
return false;
}
});
+ // TODO: add "normal" edit and remove this one into RAW edit
+ actions.add(new KeyAction(Mode.CONTACT_DETAILS_RAW, 'e',
+ Trans.StringId.KEY_ACTION_EDIT_CONTACT) {
+ @Override
+ public Object getObject() {
+ return contact;
+ }
+ });
return actions;
}
return actions;
}