aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--art/ic_send_picture_away.svg55
-rw-r--r--art/ic_send_picture_dnd.svg55
-rw-r--r--art/ic_send_picture_offline.svg55
-rw-r--r--art/ic_send_picture_online.svg55
-rwxr-xr-xart/render.rb4
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java3
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java21
-rw-r--r--src/main/res/drawable-hdpi/ic_send_picture_away.pngbin0 -> 790 bytes
-rw-r--r--src/main/res/drawable-hdpi/ic_send_picture_dnd.pngbin0 -> 884 bytes
-rw-r--r--src/main/res/drawable-hdpi/ic_send_picture_offline.pngbin0 -> 657 bytes
-rw-r--r--src/main/res/drawable-hdpi/ic_send_picture_online.pngbin0 -> 867 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_send_picture_away.pngbin0 -> 512 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_send_picture_dnd.pngbin0 -> 585 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_send_picture_offline.pngbin0 -> 456 bytes
-rw-r--r--src/main/res/drawable-mdpi/ic_send_picture_online.pngbin0 -> 580 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_send_picture_away.pngbin0 -> 899 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_send_picture_dnd.pngbin0 -> 1016 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_send_picture_offline.pngbin0 -> 799 bytes
-rw-r--r--src/main/res/drawable-xhdpi/ic_send_picture_online.pngbin0 -> 997 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_send_picture_away.pngbin0 -> 1327 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_send_picture_dnd.pngbin0 -> 1516 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_send_picture_offline.pngbin0 -> 1159 bytes
-rw-r--r--src/main/res/drawable-xxhdpi/ic_send_picture_online.pngbin0 -> 1493 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/ic_send_picture_away.pngbin0 -> 1632 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/ic_send_picture_dnd.pngbin0 -> 1784 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/ic_send_picture_offline.pngbin0 -> 1428 bytes
-rw-r--r--src/main/res/drawable-xxxhdpi/ic_send_picture_online.pngbin0 -> 1800 bytes
-rw-r--r--src/main/res/values/arrays.xml2
28 files changed, 249 insertions, 1 deletions
diff --git a/art/ic_send_picture_away.svg b/art/ic_send_picture_away.svg
new file mode 100644
index 00000000..a85a1eec
--- /dev/null
+++ b/art/ic_send_picture_away.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ viewBox="0 0 48 48"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="ic_send_picture_away.svg">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1916"
+ inkscape:window-height="1036"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="4.9166667"
+ inkscape:cx="6.5084746"
+ inkscape:cy="24"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2" />
+ <path
+ d="M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"
+ id="path4"
+ style="fill:#ff9800;fill-opacity:0.627451" />
+</svg>
diff --git a/art/ic_send_picture_dnd.svg b/art/ic_send_picture_dnd.svg
new file mode 100644
index 00000000..0c7d0635
--- /dev/null
+++ b/art/ic_send_picture_dnd.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ viewBox="0 0 48 48"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="ic_send_picture_dnd.svg">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1916"
+ inkscape:window-height="1036"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="4.9166667"
+ inkscape:cx="6.5084746"
+ inkscape:cy="24"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2" />
+ <path
+ d="M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"
+ id="path4"
+ style="fill:#f44336;fill-opacity:0.627451" />
+</svg>
diff --git a/art/ic_send_picture_offline.svg b/art/ic_send_picture_offline.svg
new file mode 100644
index 00000000..048508a3
--- /dev/null
+++ b/art/ic_send_picture_offline.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ viewBox="0 0 48 48"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="ic_send_picture_offline.svg">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1916"
+ inkscape:window-height="1036"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="4.9166667"
+ inkscape:cx="6.5084746"
+ inkscape:cy="24"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2" />
+ <path
+ d="M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"
+ id="path4"
+ style="fill:#000000;fill-opacity:0.627451" />
+</svg>
diff --git a/art/ic_send_picture_online.svg b/art/ic_send_picture_online.svg
new file mode 100644
index 00000000..06181bbd
--- /dev/null
+++ b/art/ic_send_picture_online.svg
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="48"
+ height="48"
+ viewBox="0 0 48 48"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="ic_send_picture_online.svg">
+ <metadata
+ id="metadata10">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <defs
+ id="defs8" />
+ <sodipodi:namedview
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1"
+ objecttolerance="10"
+ gridtolerance="10"
+ guidetolerance="10"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:window-width="1916"
+ inkscape:window-height="1036"
+ id="namedview6"
+ showgrid="false"
+ inkscape:zoom="4.9166667"
+ inkscape:cx="6.5084746"
+ inkscape:cy="24"
+ inkscape:window-x="0"
+ inkscape:window-y="20"
+ inkscape:window-maximized="0"
+ inkscape:current-layer="svg2" />
+ <path
+ d="M42 38V10c0-2.21-1.79-4-4-4H10c-2.21 0-4 1.79-4 4v28c0 2.21 1.79 4 4 4h28c2.21 0 4-1.79 4-4zM17 27l5 6.01L29 24l9 12H10l7-9z"
+ id="path4"
+ style="fill:#259b24;fill-opacity:0.627451" />
+</svg>
diff --git a/art/render.rb b/art/render.rb
index ad53b1f4..698abea5 100755
--- a/art/render.rb
+++ b/art/render.rb
@@ -30,6 +30,10 @@ images = {
'ic_send_cancel_offline.svg' => ['ic_send_cancel_offline', 36],
'ic_send_cancel_away.svg' => ['ic_send_cancel_away', 36],
'ic_send_cancel_dnd.svg' => ['ic_send_cancel_dnd', 36],
+ 'ic_send_picture_online.svg' => ['ic_send_picture_online', 36],
+ 'ic_send_picture_offline.svg' => ['ic_send_picture_offline', 36],
+ 'ic_send_picture_away.svg' => ['ic_send_picture_away', 36],
+ 'ic_send_picture_dnd.svg' => ['ic_send_picture_dnd', 36]
}
images.each do |source, result|
resolutions.each do |name, factor|
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index d9f56c5d..c48b5865 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -479,6 +479,9 @@ public class ConversationActivity extends XmppActivity
case ATTACHMENT_CHOICE_TAKE_PHOTO:
getPreferences().edit().putString("recently_used_quick_action","photo").apply();
break;
+ case ATTACHMENT_CHOICE_CHOOSE_IMAGE:
+ getPreferences().edit().putString("recently_used_quick_action","picture").apply();
+ break;
}
final Conversation conversation = getSelectedConversation();
final int encryption = conversation.getNextEncryption(forceEncryption());
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index 02f664db..a817b27b 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -256,6 +256,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
case RECORD_VOICE:
activity.attachFile(ConversationActivity.ATTACHMENT_CHOICE_RECORD_VOICE);
break;
+ case CHOOSE_PICTURE:
+ activity.attachFile(ConversationActivity.ATTACHMENT_CHOICE_CHOOSE_IMAGE);
+ break;
case CANCEL:
if (conversation != null && conversation.getMode() == Conversation.MODE_MULTI) {
conversation.setNextCounterpart(null);
@@ -818,7 +821,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
updateChatMsgHint();
}
- enum SendButtonAction {TEXT, TAKE_PHOTO, SEND_LOCATION, RECORD_VOICE, CANCEL}
+ enum SendButtonAction {TEXT, TAKE_PHOTO, SEND_LOCATION, RECORD_VOICE, CANCEL, CHOOSE_PICTURE}
private int getSendButtonImageResource(SendButtonAction action, int status) {
switch (action) {
@@ -887,6 +890,19 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
default:
return R.drawable.ic_send_cancel_offline;
}
+ case CHOOSE_PICTURE:
+ switch (status) {
+ case Presences.CHAT:
+ case Presences.ONLINE:
+ return R.drawable.ic_send_picture_online;
+ case Presences.AWAY:
+ return R.drawable.ic_send_picture_away;
+ case Presences.XA:
+ case Presences.DND:
+ return R.drawable.ic_send_picture_dnd;
+ default:
+ return R.drawable.ic_send_picture_offline;
+ }
}
return R.drawable.ic_send_text_offline;
}
@@ -920,6 +936,9 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
case "voice":
action = SendButtonAction.RECORD_VOICE;
break;
+ case "picture":
+ action = SendButtonAction.CHOOSE_PICTURE;
+ break;
default:
action = SendButtonAction.TEXT;
break;
diff --git a/src/main/res/drawable-hdpi/ic_send_picture_away.png b/src/main/res/drawable-hdpi/ic_send_picture_away.png
new file mode 100644
index 00000000..09d1c7b7
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_send_picture_away.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/ic_send_picture_dnd.png b/src/main/res/drawable-hdpi/ic_send_picture_dnd.png
new file mode 100644
index 00000000..77964b5b
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_send_picture_dnd.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/ic_send_picture_offline.png b/src/main/res/drawable-hdpi/ic_send_picture_offline.png
new file mode 100644
index 00000000..28135e25
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_send_picture_offline.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/ic_send_picture_online.png b/src/main/res/drawable-hdpi/ic_send_picture_online.png
new file mode 100644
index 00000000..feb926c6
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_send_picture_online.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_send_picture_away.png b/src/main/res/drawable-mdpi/ic_send_picture_away.png
new file mode 100644
index 00000000..d3ebca53
--- /dev/null
+++ b/src/main/res/drawable-mdpi/ic_send_picture_away.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_send_picture_dnd.png b/src/main/res/drawable-mdpi/ic_send_picture_dnd.png
new file mode 100644
index 00000000..1d293f20
--- /dev/null
+++ b/src/main/res/drawable-mdpi/ic_send_picture_dnd.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_send_picture_offline.png b/src/main/res/drawable-mdpi/ic_send_picture_offline.png
new file mode 100644
index 00000000..95d5621e
--- /dev/null
+++ b/src/main/res/drawable-mdpi/ic_send_picture_offline.png
Binary files differ
diff --git a/src/main/res/drawable-mdpi/ic_send_picture_online.png b/src/main/res/drawable-mdpi/ic_send_picture_online.png
new file mode 100644
index 00000000..be4194d3
--- /dev/null
+++ b/src/main/res/drawable-mdpi/ic_send_picture_online.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_send_picture_away.png b/src/main/res/drawable-xhdpi/ic_send_picture_away.png
new file mode 100644
index 00000000..f9aa21dc
--- /dev/null
+++ b/src/main/res/drawable-xhdpi/ic_send_picture_away.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_send_picture_dnd.png b/src/main/res/drawable-xhdpi/ic_send_picture_dnd.png
new file mode 100644
index 00000000..95e4acce
--- /dev/null
+++ b/src/main/res/drawable-xhdpi/ic_send_picture_dnd.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_send_picture_offline.png b/src/main/res/drawable-xhdpi/ic_send_picture_offline.png
new file mode 100644
index 00000000..75ff2fc4
--- /dev/null
+++ b/src/main/res/drawable-xhdpi/ic_send_picture_offline.png
Binary files differ
diff --git a/src/main/res/drawable-xhdpi/ic_send_picture_online.png b/src/main/res/drawable-xhdpi/ic_send_picture_online.png
new file mode 100644
index 00000000..0f68d5f5
--- /dev/null
+++ b/src/main/res/drawable-xhdpi/ic_send_picture_online.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_send_picture_away.png b/src/main/res/drawable-xxhdpi/ic_send_picture_away.png
new file mode 100644
index 00000000..7898ed4f
--- /dev/null
+++ b/src/main/res/drawable-xxhdpi/ic_send_picture_away.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_send_picture_dnd.png b/src/main/res/drawable-xxhdpi/ic_send_picture_dnd.png
new file mode 100644
index 00000000..ccffabbe
--- /dev/null
+++ b/src/main/res/drawable-xxhdpi/ic_send_picture_dnd.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_send_picture_offline.png b/src/main/res/drawable-xxhdpi/ic_send_picture_offline.png
new file mode 100644
index 00000000..7b5687e4
--- /dev/null
+++ b/src/main/res/drawable-xxhdpi/ic_send_picture_offline.png
Binary files differ
diff --git a/src/main/res/drawable-xxhdpi/ic_send_picture_online.png b/src/main/res/drawable-xxhdpi/ic_send_picture_online.png
new file mode 100644
index 00000000..82eab70c
--- /dev/null
+++ b/src/main/res/drawable-xxhdpi/ic_send_picture_online.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/ic_send_picture_away.png b/src/main/res/drawable-xxxhdpi/ic_send_picture_away.png
new file mode 100644
index 00000000..1daa8ecc
--- /dev/null
+++ b/src/main/res/drawable-xxxhdpi/ic_send_picture_away.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/ic_send_picture_dnd.png b/src/main/res/drawable-xxxhdpi/ic_send_picture_dnd.png
new file mode 100644
index 00000000..d8257aad
--- /dev/null
+++ b/src/main/res/drawable-xxxhdpi/ic_send_picture_dnd.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/ic_send_picture_offline.png b/src/main/res/drawable-xxxhdpi/ic_send_picture_offline.png
new file mode 100644
index 00000000..d487709b
--- /dev/null
+++ b/src/main/res/drawable-xxxhdpi/ic_send_picture_offline.png
Binary files differ
diff --git a/src/main/res/drawable-xxxhdpi/ic_send_picture_online.png b/src/main/res/drawable-xxxhdpi/ic_send_picture_online.png
new file mode 100644
index 00000000..c095d795
--- /dev/null
+++ b/src/main/res/drawable-xxxhdpi/ic_send_picture_online.png
Binary files differ
diff --git a/src/main/res/values/arrays.xml b/src/main/res/values/arrays.xml
index fec077cc..5be352d1 100644
--- a/src/main/res/values/arrays.xml
+++ b/src/main/res/values/arrays.xml
@@ -44,6 +44,7 @@
<item>@string/none</item>
<item>@string/recently_used</item>
<item>@string/attach_take_picture</item>
+ <item>@string/attach_choose_picture</item>
<item>@string/attach_record_voice</item>
<item>@string/send_location</item>
</string-array>
@@ -52,6 +53,7 @@
<item>none</item>
<item>recent</item>
<item>photo</item>
+ <item>picture</item>
<item>voice</item>
<item>location</item>
</string-array>