aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--art/ic_toast.svg229
-rw-r--r--art/ic_toast_error.svg247
-rwxr-xr-xart/render.rb6
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteRemoteFileService.java16
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteTokenReceived.java11
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/upload/HttpUploadFileTransferService.java26
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/AccountUtil.java34
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/ui/ConversationsPlusToast.java102
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java4
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/ui/ViewUtil.java39
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/xmpp/utils/ErrorIqPacketExceptionHelper.java29
-rw-r--r--src/main/java/eu/siacs/conversations/entities/Account.java8
-rw-r--r--src/main/java/eu/siacs/conversations/services/XmppConnectionService.java8
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationActivity.java9
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ConversationFragment.java5
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java5
-rw-r--r--src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java20
-rw-r--r--src/main/java/eu/siacs/conversations/utils/Xmlns.java3
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java73
-rw-r--r--src/main/res/drawable-hdpi/ic_toast.pngbin0 -> 1708 bytes
-rw-r--r--src/main/res/drawable-hdpi/ic_toast_error.pngbin0 -> 1764 bytes
-rw-r--r--src/main/res/layout/cplus_toast_container.xml22
-rw-r--r--src/main/res/layout/message_sent.xml2
-rw-r--r--src/main/res/values/strings.xml2
24 files changed, 813 insertions, 87 deletions
diff --git a/art/ic_toast.svg b/art/ic_toast.svg
new file mode 100644
index 00000000..7bf2c515
--- /dev/null
+++ b/art/ic_toast.svg
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<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:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="512"
+ height="512"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="conversations_plus_baloons.svg"
+ inkscape:export-filename="/home/diesys/diesys/grafica/conversation/conversation_bubble.png"
+ inkscape:export-xdpi="100"
+ inkscape:export-ydpi="100">
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7071068"
+ inkscape:cx="-63.341475"
+ inkscape:cy="288.28557"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1366"
+ inkscape:window-height="684"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:snap-to-guides="true"
+ inkscape:snap-grids="false"
+ inkscape:object-paths="true"
+ inkscape:object-nodes="false"
+ inkscape:snap-nodes="false">
+ <sodipodi:guide
+ orientation="1,0"
+ position="0,534.28571"
+ id="guide3004" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="394.28571,511.42857"
+ id="guide3006" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="511.42857,320"
+ id="guide3008" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="401.42857,0"
+ id="guide3010" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="17.142857,258.57143"
+ id="guide3012" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="327.14286,494.28571"
+ id="guide3014" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="324.28571,17.142857"
+ id="guide3016" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="494.28571,237.14286"
+ id="guide3018" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="255.71429,302.85714"
+ id="guide3022" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="660,-315"
+ id="guide3904" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="554.28571,475.71429"
+ id="guide3931" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="581.42857,244.28571"
+ id="guide3933" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <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>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-540.36218)"
+ style="display:inline">
+ <path
+ d="m 253.34375,605.76562 c -107.90463,0 -195.953125,85.87684 -195.953125,191.85938 0,105.98253 88.043415,191.92187 195.953125,191.92188 33.56396,0 59.43822,-6.90343 88.98047,-17.63672 l 93.80664,37.80274 a 12.359798,12.359798 0 0 0 16.61719,-14.4297 L 427.35352,892.57031 c 16.32005,-28.65755 21.9121,-61.28733 21.9121,-94.94531 0,-105.97994 -88.0172,-191.85938 -195.92187,-191.85938 z"
+ id="path3885"
+ style="opacity:0.6;fill:#000000;fill-opacity:1;stroke:#000000"
+ inkscape:original="M 253.34375 618.125 C 151.96941 618.125 69.75 698.4746 69.75 797.625 C 69.75 896.77539 151.96941 977.1875 253.34375 977.1875 C 287.00054 977.1875 311.5728 970.27778 342.65625 958.71875 L 440.75 998.25 L 414.1875 890.8125 C 431.0772 863.65332 436.90625 831.73711 436.90625 797.625 C 436.90625 698.4746 354.71813 618.125 253.34375 618.125 z "
+ inkscape:radius="12.358562"
+ sodipodi:type="inkscape:offset"
+ transform="matrix(0.90520781,0,0,0.81882383,90.877888,53.951708)" />
+ <path
+ sodipodi:type="inkscape:offset"
+ inkscape:radius="12.358562"
+ inkscape:original="M 253.34375 618.125 C 151.96941 618.125 69.75 698.4746 69.75 797.625 C 69.75 896.77539 151.96941 977.1875 253.34375 977.1875 C 287.00054 977.1875 311.5728 970.27778 342.65625 958.71875 L 440.75 998.25 L 414.1875 890.8125 C 431.0772 863.65332 436.90625 831.73711 436.90625 797.625 C 436.90625 698.4746 354.71813 618.125 253.34375 618.125 z "
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000"
+ id="path3868"
+ d="m 253.34375,605.76562 c -107.90463,0 -195.953125,85.87684 -195.953125,191.85938 0,105.98253 88.043415,191.92187 195.953125,191.92188 33.56396,0 59.43822,-6.90343 88.98047,-17.63672 l 93.80664,37.80274 a 12.359798,12.359798 0 0 0 16.61719,-14.4297 L 427.35352,892.57031 c 16.32005,-28.65755 21.9121,-61.28733 21.9121,-94.94531 0,-105.97994 -88.0172,-191.85938 -195.92187,-191.85938 z"
+ transform="matrix(0.90520781,0,0,0.81882383,90.877888,50.676388)" />
+ <path
+ style="opacity:0.19211821;fill:url(#radialGradient3883);fill-opacity:1;stroke:none"
+ d="m 465.37929,645.95092 c -99.66655,0 -180.44749,71.72047 -180.44749,160.18241 0,18.66021 3.60043,36.57544 10.21189,53.2232 8.1887,1.03054 16.56083,1.56103 25.06293,1.56103 30.37749,0 53.79867,-5.64549 80.53519,-14.43157 l 84.91981,30.96145 a 11.188184,10.120499 0 0 0 15.04907,-11.82159 l -22.99792,-84.08283 c 14.78214,-23.46997 19.8297,-50.19542 19.8297,-77.76269 0,-20.04753 -4.25121,-39.20586 -11.994,-56.83149 -6.62195,-0.65358 -13.3526,-0.99792 -20.16918,-0.99792 z"
+ id="path3878"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccsssscc"
+ inkscape:connector-curvature="0"
+ id="path3845"
+ d="m 493.47738,871.35334 -24.04389,-87.99322 c 15.28869,-22.23857 20.55595,-48.35175 20.55595,-76.28358 0,-81.18671 -74.40499,-146.97946 -166.16989,-146.97946 -91.76484,0 -166.16981,65.79275 -166.16981,146.97946 0,81.18672 74.40497,147.02794 166.16981,147.02794 30.46639,0 52.72061,-5.65874 80.85763,-15.12352 z"
+ style="opacity:0;fill:none;stroke:#000000;stroke-width:17.21866226;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:68.87464583, 68.87464583;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path3855"
+ d="m 320.17833,548.76674 c -4.13827,-9.4e-4 -8.25632,0.0605 -9.81586,0.15351 -12.92075,0.76954 -22.81917,2.12193 -34.11502,4.70824 -4.34132,0.99402 -7.66199,1.87532 -11.68283,3.07059 -2.5677,0.76329 -6.47023,1.98325 -6.6759,2.09824 -0.0631,0.0352 2.55734,6.48362 6.13843,15.14825 0.0358,0.0868 0.13111,0.0961 0.2546,0.0511 0.85568,-0.31146 4.96317,-1.59671 6.87391,-2.14942 16.44697,-4.75734 33.78787,-7.08565 50.97451,-6.85765 2.42028,0.0321 5.48294,0.11062 6.78907,0.17914 1.30611,0.0686 2.39944,0.10688 2.43274,0.0767 0.0526,-0.0476 1.17785,-16.13384 1.13152,-16.1718 -0.01,-0.008 -1.08429,-0.0761 -2.40448,-0.15351 -1.60409,-0.0941 -5.76244,-0.15187 -9.90069,-0.15351 z m 85.17439,19.57499 c -0.0778,0.0759 -8.57119,14.09759 -8.57119,14.15032 0,0.0128 0.38971,0.21991 0.8769,0.46056 6.4421,3.18205 13.4978,7.39333 19.91497,11.84882 2.48679,1.7266 4.87769,3.48988 7.09982,5.24414 3.2378,2.55607 6.46633,5.33835 9.55245,8.21414 4.9072,4.57277 9.45432,9.38196 13.10605,13.89411 0.50173,0.62001 0.608,0.70303 0.79207,0.58852 0.87167,-0.54223 14.14115,-9.56974 14.14386,-9.62116 0.004,-0.0695 -2.56391,-3.14501 -3.64912,-4.37562 -4.33822,-4.91937 -8.14593,-8.7511 -13.26695,-13.38263 -6.3529,-5.74565 -12.40806,-10.50897 -19.23603,-15.09142 -1.9729,-1.32405 -4.01031,-2.63303 -6.13807,-3.94623 -5.07411,-3.13161 -14.3826,-8.21954 -14.62476,-7.98355 z m -211.19629,27.76323 -1.86699,1.79122 c -16.58679,15.77185 -29.26131,34.2146 -37.25495,54.24707 -0.39127,0.98058 -0.7358,1.85972 -0.76377,1.97029 -0.0367,0.14529 2.27287,0.91046 8.2883,2.73794 4.57858,1.39099 8.39743,2.52833 8.48633,2.53327 0.0889,0.005 0.70476,-1.35221 1.3861,-3.01945 6.99352,-17.11289 17.82285,-32.84295 32.02173,-46.51941 l 2.34786,-2.27736 -6.30817,-5.73177 z m 298.4074,80.04008 -7.60942,1.33057 c -4.18792,0.7436 -8.12463,1.43993 -8.76921,1.53529 -0.80487,0.1191 -1.18807,0.24336 -1.18807,0.38383 0,0.1125 0.17929,1.13426 0.39603,2.27735 2.07747,10.95686 2.52391,24.06935 1.30123,38.40797 -0.55966,6.56324 -1.80497,14.62573 -2.9985,19.47266 -0.17944,0.72877 -0.2917,1.37377 -0.25457,1.40735 0.0371,0.0335 3.93999,0.80348 8.68429,1.71443 4.74436,0.9109 8.69153,1.65348 8.74095,1.66321 0.0493,0.01 0.35153,-1.20446 0.67889,-2.71235 2.58164,-11.8915 3.70992,-23.06661 3.734,-37.02617 0.0169,-9.79205 -0.60847,-16.92701 -2.20646,-25.69062 z m -328.42069,44.52355 -0.59404,0.0767 c -0.32426,0.0425 -4.30309,0.47062 -8.82578,0.94676 -4.52269,0.47615 -8.27005,0.90467 -8.3166,0.94677 -0.10914,0.0987 0.19395,2.02928 0.87693,5.78293 3.74286,20.5706 11.55924,39.09836 24.24259,57.42003 0.34643,0.50043 0.71596,0.88794 0.82035,0.87001 0.27802,-0.0476 14.92958,-8.4814 14.93592,-8.59767 0.003,-0.0541 -0.61241,-0.97536 -1.35781,-2.04705 -3.27958,-4.71514 -7.63657,-12.12967 -10.04215,-17.09296 -5.78721,-11.94039 -9.59955,-24.12581 -11.56969,-37.02614 z m 316.85099,82.03592 c -0.36048,0.007 -16.97617,3.73907 -17.08581,3.83822 -0.0753,0.0682 16.94207,62.59192 17.19896,63.25382 0.30965,0.798 2.86925,7.31813 10.42538,6.19627 8.42278,-1.62864 7.56799,-10.19392 6.91501,-10.06007 -0.0867,0.0174 -3.86345,-14.3273 -8.59948,-31.67794 -6.7623,-24.77405 -8.66138,-31.55359 -8.85406,-31.5503 z m -244.80211,18.57706 c -0.31471,0.009 -0.93458,0.92267 -4.83721,6.70413 -2.54758,3.77402 -4.63919,6.89516 -4.63919,6.93441 0,0.095 2.63539,1.52222 5.43123,2.96823 17.18076,8.88581 36.19242,15.16537 55.6703,18.37201 2.75979,0.45453 4.36027,0.69944 8.48631,1.25377 0.53344,0.0717 1.05269,0.14407 1.15981,0.15373 0.242,0.0216 0.18744,0.43638 1.44268,-7.95778 0.57722,-3.86012 1.0799,-7.25173 1.13152,-7.54849 0.0906,-0.52038 0.0663,-0.53984 -0.45265,-0.6141 -0.29582,-0.0422 -2.06498,-0.28682 -3.93198,-0.53739 -17.1444,-2.30049 -34.78834,-7.57763 -50.21072,-14.99469 -2.7318,-1.3138 -7.81528,-3.92179 -9.10866,-4.68264 -0.0408,-0.024 -0.0965,-0.0525 -0.14144,-0.0512 z m 164.66293,6.32028 c -1.52266,0.0905 -3.53738,0.70727 -8.03371,2.175 -8.68549,2.83522 -18.54878,5.74416 -22.99794,6.7809 -0.64367,0.15 -1.18718,0.35231 -1.18807,0.43501 -0.002,0.14944 4.40029,15.44773 4.46946,15.532 0.0424,0.0521 4.87869,-1.18335 7.89228,-2.02144 3.91758,-1.08954 10.50973,-3.08747 15.2188,-4.60587 l 4.6675,-1.50969 17.14236,6.2435 c 13.94595,5.08505 17.14167,6.22073 17.22724,6.03865 0.69647,-1.48186 6.62352,-14.82249 6.59105,-14.84098 -0.29825,-0.17022 -37.77097,-13.74416 -38.3582,-13.89441 -0.96682,-0.2474 -1.71716,-0.3869 -2.63077,-0.33267 z"
+ style="opacity:0.5;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:4.30466557;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="ccssccssscccccccssssscccsssscccscsssccccccssssssssssccccscssccsscccsscsscsssssccsccsscsscsccscccccssc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Layer 2"
+ style="display:inline">
+ <path
+ sodipodi:type="inkscape:offset"
+ inkscape:radius="12.358562"
+ inkscape:original="M 253.34375 618.125 C 151.96941 618.125 69.75 698.4746 69.75 797.625 C 69.75 896.77539 151.96941 977.1875 253.34375 977.1875 C 287.00054 977.1875 311.5728 970.27778 342.65625 958.71875 L 440.75 998.25 L 414.1875 890.8125 C 431.0772 863.65332 436.90625 831.73711 436.90625 797.625 C 436.90625 698.4746 354.71813 618.125 253.34375 618.125 z "
+ style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#000000"
+ id="path3868-5"
+ d="m 253.34375,605.76562 c -107.90463,0 -195.953125,85.87684 -195.953125,191.85938 0,105.98253 88.043415,191.92187 195.953125,191.92188 33.56396,0 59.43822,-6.90343 88.98047,-17.63672 l 93.80664,37.80274 a 12.359798,12.359798 0 0 0 16.61719,-14.4297 L 427.35352,892.57031 c 16.32005,-28.65755 21.9121,-61.28733 21.9121,-94.94531 0,-105.97994 -88.0172,-191.85938 -195.92187,-191.85938 z"
+ transform="matrix(-0.77259808,0,0,0.77116679,367.55932,-282.28679)" />
+ <path
+ style="display:inline;opacity:0.19211821;fill:url(#radialGradient3883-8);fill-opacity:1;stroke:none"
+ d="m 47.92104,278.34166 c 85.06576,0 154.01258,67.54622 154.01258,150.8595 0,17.57416 -3.07299,34.44668 -8.71589,50.12552 -6.98908,0.97055 -14.13472,1.47017 -21.3913,1.47017 -25.9273,0 -45.91736,-5.31691 -68.73708,-13.59163 L 30.609993,496.36466 A 9.5491555,9.5314668 0 0 1 17.765567,485.2311 l 19.6288,-79.18904 C 24.777759,383.93808 20.469653,358.7681 20.469653,332.8053 c 0,-18.88073 3.628423,-36.92402 10.236917,-53.5238 5.65186,-0.61553 11.396492,-0.93984 17.21447,-0.93984 z"
+ id="path3878-3"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccsssscc"
+ inkscape:connector-curvature="0"
+ id="path3845-7"
+ d="M 23.939214,490.62525 44.460762,407.7534 C 31.411813,386.80914 26.916189,362.2158 26.916189,335.90966 c 0,-76.4615 63.504925,-138.42498 141.826591,-138.42498 78.32162,0 141.82653,61.96348 141.82653,138.42498 0,76.4615 -63.50491,138.47065 -141.82653,138.47065 -26.00317,0 -44.99723,-5.3294 -69.012271,-14.24332 z"
+ style="display:inline;opacity:0;fill:none;stroke:#000000;stroke-width:15.43764114;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:61.75056976, 61.75056976;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path3855-0"
+ d="m 171.85058,186.81378 c 3.53202,-0.001 7.0468,0.057 8.37786,0.14458 11.02792,0.72475 19.47625,1.99843 29.1173,4.43421 3.70534,0.93617 6.53954,1.76617 9.97134,2.89187 2.19153,0.71887 5.52236,1.86783 5.6979,1.97612 0.0538,0.0332 -2.18271,6.10627 -5.23917,14.2666 -0.0306,0.0818 -0.1119,0.0905 -0.2173,0.0482 -0.73033,-0.29333 -4.23609,-1.50378 -5.86691,-2.02432 -14.03755,-4.48046 -28.83807,-6.67326 -43.50693,-6.45851 -2.06572,0.0302 -4.6797,0.10417 -5.7945,0.1687 -1.11476,0.0646 -2.04792,0.10066 -2.07634,0.0722 -0.045,-0.0448 -1.0053,-15.19482 -0.96576,-15.23057 0.008,-0.008 0.92544,-0.0716 2.05223,-0.14458 1.3691,-0.0887 4.91826,-0.14303 8.45028,-0.14457 z m -72.696647,18.43569 c 0.06643,0.0714 7.315537,13.27709 7.315537,13.32675 0,0.012 -0.33262,0.20711 -0.74844,0.43375 -5.49836,2.99686 -11.520423,6.96303 -16.997493,11.15921 -2.122486,1.6261 -4.163129,3.28675 -6.059727,4.93891 -2.763466,2.4073 -5.519031,5.02765 -8.153046,7.73607 -4.188314,4.30662 -8.069301,8.83591 -11.18606,13.08544 -0.428228,0.58393 -0.518926,0.66211 -0.676036,0.55427 -0.743971,-0.51067 -12.069524,-9.01277 -12.07184,-9.0612 -0.0032,-0.0654 2.188315,-2.96196 3.114542,-4.12094 3.702693,-4.63305 6.952577,-8.24177 11.323395,-12.60374 5.422218,-5.41124 10.590321,-9.89733 16.418014,-14.21307 1.68388,-1.247 3.422814,-2.47978 5.238862,-3.71655 4.330773,-2.94935 12.27561,-7.74115 12.482292,-7.5189 z m 180.256787,26.14737 1.59348,1.68696 c 14.15689,14.8539 24.97464,32.22325 31.79723,51.08979 0.33396,0.9235 0.62801,1.75148 0.65189,1.85562 0.0314,0.13682 -1.93992,0.85746 -7.0741,2.57859 -3.90783,1.31002 -7.16723,2.38116 -7.24311,2.38582 -0.0759,0.005 -0.60152,-1.2735 -1.18304,-2.84371 -5.969,-16.11689 -15.21187,-30.93143 -27.33066,-43.81189 l -2.00392,-2.14481 5.38405,-5.39818 z m -254.691788,75.38159 6.494676,1.25313 c 3.574397,0.70032 6.934399,1.35613 7.484553,1.44593 0.686953,0.11217 1.014012,0.2292 1.014012,0.36149 0,0.10595 -0.153023,1.06824 -0.338008,2.14481 -1.77313,10.31915 -2.154169,22.66846 -1.110602,36.17254 0.477667,6.18126 1.540548,13.7745 2.559231,18.33932 0.153154,0.68636 0.248963,1.29382 0.21727,1.32544 -0.03169,0.0316 -3.362797,0.75672 -7.412074,1.61465 -4.049328,0.85789 -7.418252,1.55725 -7.460429,1.56642 -0.04205,0.009 -0.300037,-1.13437 -0.579433,-2.5545 -2.203444,-11.19939 -3.166429,-21.72408 -3.186982,-34.87117 -0.01437,-9.22213 0.519332,-15.94183 1.88322,-24.19538 z m 280.308238,41.9322 0.50701,0.0722 c 0.27676,0.0401 3.6727,0.44323 7.53284,0.89166 3.86013,0.44843 7.05852,0.85201 7.09824,0.89167 0.0932,0.0929 -0.16553,1.91116 -0.74845,5.44635 -3.19455,19.37336 -9.86586,36.82275 -20.69114,54.07808 -0.29568,0.4713 -0.61108,0.83626 -0.70017,0.81936 -0.2373,-0.0448 -12.74246,-7.98776 -12.74787,-8.09727 -0.003,-0.051 0.5227,-0.91859 1.15889,-1.9279 2.79915,-4.44071 6.51785,-11.42371 8.57102,-16.09812 4.93941,-11.24543 8.19324,-22.72164 9.87477,-34.87114 z M 34.593711,425.97191 c 0.307673,0.006 14.489227,3.52144 14.582798,3.61483 0.06429,0.0642 -14.460111,58.94894 -14.679361,59.57234 -0.264295,0.75154 -2.448917,6.89219 -8.89811,5.83562 -7.188866,-1.53385 -6.459303,-9.60062 -5.901978,-9.47455 0.07403,0.0164 3.297467,-13.49343 7.339677,-29.83423 5.771655,-23.33215 7.392523,-29.71712 7.556974,-29.71401 z m 208.939479,17.49584 c 0.26861,0.009 0.79767,0.86897 4.12858,6.31393 2.17437,3.55436 3.95956,6.49385 3.95956,6.53082 0,0.0895 -2.24931,1.43362 -4.63558,2.79547 -14.66383,8.36864 -30.89035,14.28272 -47.5148,17.30273 -2.35548,0.42806 -3.72149,0.65873 -7.24309,1.18079 -0.4553,0.0675 -0.89848,0.13569 -0.9899,0.14479 -0.20655,0.0203 -0.15998,0.41098 -1.23133,-7.49463 -0.49266,-3.63545 -0.9217,-6.82967 -0.96575,-7.10914 -0.0773,-0.4901 -0.0566,-0.50843 0.38632,-0.57837 0.25249,-0.0397 1.76248,-0.27013 3.35596,-0.5061 14.63282,-2.1666 29.69198,-7.13661 42.85504,-14.12199 2.3316,-1.23733 6.67037,-3.69353 7.77427,-4.4101 0.0348,-0.0226 0.0823,-0.0494 0.12072,-0.0482 z m -140.5404,5.95243 c 1.2996,0.0852 3.01916,0.6661 6.8568,2.04841 7.41309,2.6702 15.83145,5.40983 19.62883,6.38623 0.54937,0.14127 1.01325,0.3318 1.01402,0.4097 0.001,0.14074 -3.75566,14.54864 -3.8147,14.628 -0.0362,0.0491 -4.16398,-1.11446 -6.73609,-1.90379 -3.34367,-1.02612 -8.97009,-2.90777 -12.9893,-4.33779 l -3.98373,-1.42183 -14.631058,5.88012 c -11.902923,4.78909 -14.630484,5.85868 -14.703523,5.68719 -0.594444,-1.39562 -5.653196,-13.95979 -5.625485,-13.97721 0.254566,-0.16031 32.237656,-12.94422 32.738866,-13.08573 0.82518,-0.233 1.4656,-0.36438 2.24537,-0.3133 z"
+ style="display:inline;opacity:0.5;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:3.85941029;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="ccssccssscccccccssssscccsssscccscsssccccccssssssssssccccscssccsscccsscsscsssssccsccsscsscsccscccccssc" />
+ <ellipse
+ cy="334.93869"
+ cx="-242.26097"
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-7"
+ rx="16.401163"
+ ry="16.363543"
+ transform="scale(-1,1)" />
+ <ellipse
+ cy="334.93869"
+ cx="-170.28149"
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-1-89"
+ rx="16.401163"
+ ry="16.363543"
+ transform="scale(-1,1)" />
+ <ellipse
+ cy="334.93869"
+ cx="-98.116379"
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-1-8-8"
+ rx="16.401163"
+ ry="16.363543"
+ transform="scale(-1,1)" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer4"
+ inkscape:label="Dots">
+ <ellipse
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047"
+ cx="237.68259"
+ cy="165.68341"
+ rx="19.21628"
+ ry="17.374786" />
+ <ellipse
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-1"
+ cx="322.01675"
+ cy="165.68341"
+ rx="19.21628"
+ ry="17.374786" />
+ <ellipse
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-1-8"
+ cx="406.56836"
+ cy="165.68341"
+ rx="19.21628"
+ ry="17.374786" />
+ </g>
+</svg>
diff --git a/art/ic_toast_error.svg b/art/ic_toast_error.svg
new file mode 100644
index 00000000..7f6e8c1e
--- /dev/null
+++ b/art/ic_toast_error.svg
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<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="512"
+ height="512"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ sodipodi:docname="ic_toast_error.svg"
+ inkscape:export-filename="/home/diesys/diesys/grafica/conversation/conversation_bubble.png"
+ inkscape:export-xdpi="100"
+ inkscape:export-ydpi="100">
+ <defs
+ id="defs35" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.7071068"
+ inkscape:cx="-473.65212"
+ inkscape:cy="-2.1760243"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer3"
+ showgrid="false"
+ inkscape:window-width="1920"
+ inkscape:window-height="996"
+ inkscape:window-x="-8"
+ inkscape:window-y="-8"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:guide-bbox="true"
+ inkscape:snap-to-guides="true"
+ inkscape:snap-grids="false"
+ inkscape:object-paths="true"
+ inkscape:object-nodes="false"
+ inkscape:snap-nodes="false">
+ <sodipodi:guide
+ orientation="1,0"
+ position="0,534.28571"
+ id="guide3004" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="394.28571,511.42857"
+ id="guide3006" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="511.42857,320"
+ id="guide3008" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="401.42857,0"
+ id="guide3010" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="17.142857,258.57143"
+ id="guide3012" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="327.14286,494.28571"
+ id="guide3014" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="324.28571,17.142857"
+ id="guide3016" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="494.28571,237.14286"
+ id="guide3018" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="255.71429,302.85714"
+ id="guide3022" />
+ <sodipodi:guide
+ orientation="1,0"
+ position="660,-315"
+ id="guide3904" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="554.28571,475.71429"
+ id="guide3931" />
+ <sodipodi:guide
+ orientation="0,1"
+ position="581.42857,244.28571"
+ id="guide3933" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <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 />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-540.36218)"
+ style="display:inline">
+ <path
+ d="m 253.34375,605.76562 c -107.90463,0 -195.953125,85.87684 -195.953125,191.85938 0,105.98253 88.043415,191.92187 195.953125,191.92188 33.56396,0 59.43822,-6.90343 88.98047,-17.63672 l 93.80664,37.80274 a 12.359798,12.359798 0 0 0 16.61719,-14.4297 L 427.35352,892.57031 c 16.32005,-28.65755 21.9121,-61.28733 21.9121,-94.94531 0,-105.97994 -88.0172,-191.85938 -195.92187,-191.85938 z"
+ id="path3885"
+ style="opacity:0.6;fill:#000000;fill-opacity:1;stroke:#000000"
+ inkscape:original="M 253.34375 618.125 C 151.96941 618.125 69.75 698.4746 69.75 797.625 C 69.75 896.77539 151.96941 977.1875 253.34375 977.1875 C 287.00054 977.1875 311.5728 970.27778 342.65625 958.71875 L 440.75 998.25 L 414.1875 890.8125 C 431.0772 863.65332 436.90625 831.73711 436.90625 797.625 C 436.90625 698.4746 354.71813 618.125 253.34375 618.125 z "
+ inkscape:radius="12.358562"
+ sodipodi:type="inkscape:offset"
+ transform="matrix(0.90520781,0,0,0.81882383,90.877888,53.951708)" />
+ <path
+ sodipodi:type="inkscape:offset"
+ inkscape:radius="12.358562"
+ inkscape:original="M 253.34375 618.125 C 151.96941 618.125 69.75 698.4746 69.75 797.625 C 69.75 896.77539 151.96941 977.1875 253.34375 977.1875 C 287.00054 977.1875 311.5728 970.27778 342.65625 958.71875 L 440.75 998.25 L 414.1875 890.8125 C 431.0772 863.65332 436.90625 831.73711 436.90625 797.625 C 436.90625 698.4746 354.71813 618.125 253.34375 618.125 z "
+ style="fill:#ffffff;fill-opacity:1;stroke:#000000"
+ id="path3868"
+ d="m 253.34375,605.76562 c -107.90463,0 -195.953125,85.87684 -195.953125,191.85938 0,105.98253 88.043415,191.92187 195.953125,191.92188 33.56396,0 59.43822,-6.90343 88.98047,-17.63672 l 93.80664,37.80274 a 12.359798,12.359798 0 0 0 16.61719,-14.4297 L 427.35352,892.57031 c 16.32005,-28.65755 21.9121,-61.28733 21.9121,-94.94531 0,-105.97994 -88.0172,-191.85938 -195.92187,-191.85938 z"
+ transform="matrix(0.90520781,0,0,0.81882383,90.877888,50.676388)" />
+ <path
+ style="opacity:0.19211821;fill:url(#radialGradient3883);fill-opacity:1;stroke:none"
+ d="m 465.37929,645.95092 c -99.66655,0 -180.44749,71.72047 -180.44749,160.18241 0,18.66021 3.60043,36.57544 10.21189,53.2232 8.1887,1.03054 16.56083,1.56103 25.06293,1.56103 30.37749,0 53.79867,-5.64549 80.53519,-14.43157 l 84.91981,30.96145 a 11.188184,10.120499 0 0 0 15.04907,-11.82159 l -22.99792,-84.08283 c 14.78214,-23.46997 19.8297,-50.19542 19.8297,-77.76269 0,-20.04753 -4.25121,-39.20586 -11.994,-56.83149 -6.62195,-0.65358 -13.3526,-0.99792 -20.16918,-0.99792 z"
+ id="path3878"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccsssscc"
+ inkscape:connector-curvature="0"
+ id="path3845"
+ d="m 493.47738,871.35334 -24.04389,-87.99322 c 15.28869,-22.23857 20.55595,-48.35175 20.55595,-76.28358 0,-81.18671 -74.40499,-146.97946 -166.16989,-146.97946 -91.76484,0 -166.16981,65.79275 -166.16981,146.97946 0,81.18672 74.40497,147.02794 166.16981,147.02794 30.46639,0 52.72061,-5.65874 80.85763,-15.12352 z"
+ style="opacity:0;fill:none;stroke:#000000;stroke-width:17.21866226;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:68.87464583, 68.87464583;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path3855"
+ d="m 320.17833,548.76674 c -4.13827,-9.4e-4 -8.25632,0.0605 -9.81586,0.15351 -12.92075,0.76954 -22.81917,2.12193 -34.11502,4.70824 -4.34132,0.99402 -7.66199,1.87532 -11.68283,3.07059 -2.5677,0.76329 -6.47023,1.98325 -6.6759,2.09824 -0.0631,0.0352 2.55734,6.48362 6.13843,15.14825 0.0358,0.0868 0.13111,0.0961 0.2546,0.0511 0.85568,-0.31146 4.96317,-1.59671 6.87391,-2.14942 16.44697,-4.75734 33.78787,-7.08565 50.97451,-6.85765 2.42028,0.0321 5.48294,0.11062 6.78907,0.17914 1.30611,0.0686 2.39944,0.10688 2.43274,0.0767 0.0526,-0.0476 1.17785,-16.13384 1.13152,-16.1718 -0.01,-0.008 -1.08429,-0.0761 -2.40448,-0.15351 -1.60409,-0.0941 -5.76244,-0.15187 -9.90069,-0.15351 z m 85.17439,19.57499 c -0.0778,0.0759 -8.57119,14.09759 -8.57119,14.15032 0,0.0128 0.38971,0.21991 0.8769,0.46056 6.4421,3.18205 13.4978,7.39333 19.91497,11.84882 2.48679,1.7266 4.87769,3.48988 7.09982,5.24414 3.2378,2.55607 6.46633,5.33835 9.55245,8.21414 4.9072,4.57277 9.45432,9.38196 13.10605,13.89411 0.50173,0.62001 0.608,0.70303 0.79207,0.58852 0.87167,-0.54223 14.14115,-9.56974 14.14386,-9.62116 0.004,-0.0695 -2.56391,-3.14501 -3.64912,-4.37562 -4.33822,-4.91937 -8.14593,-8.7511 -13.26695,-13.38263 -6.3529,-5.74565 -12.40806,-10.50897 -19.23603,-15.09142 -1.9729,-1.32405 -4.01031,-2.63303 -6.13807,-3.94623 -5.07411,-3.13161 -14.3826,-8.21954 -14.62476,-7.98355 z m -211.19629,27.76323 -1.86699,1.79122 c -16.58679,15.77185 -29.26131,34.2146 -37.25495,54.24707 -0.39127,0.98058 -0.7358,1.85972 -0.76377,1.97029 -0.0367,0.14529 2.27287,0.91046 8.2883,2.73794 4.57858,1.39099 8.39743,2.52833 8.48633,2.53327 0.0889,0.005 0.70476,-1.35221 1.3861,-3.01945 6.99352,-17.11289 17.82285,-32.84295 32.02173,-46.51941 l 2.34786,-2.27736 -6.30817,-5.73177 z m 298.4074,80.04008 -7.60942,1.33057 c -4.18792,0.7436 -8.12463,1.43993 -8.76921,1.53529 -0.80487,0.1191 -1.18807,0.24336 -1.18807,0.38383 0,0.1125 0.17929,1.13426 0.39603,2.27735 2.07747,10.95686 2.52391,24.06935 1.30123,38.40797 -0.55966,6.56324 -1.80497,14.62573 -2.9985,19.47266 -0.17944,0.72877 -0.2917,1.37377 -0.25457,1.40735 0.0371,0.0335 3.93999,0.80348 8.68429,1.71443 4.74436,0.9109 8.69153,1.65348 8.74095,1.66321 0.0493,0.01 0.35153,-1.20446 0.67889,-2.71235 2.58164,-11.8915 3.70992,-23.06661 3.734,-37.02617 0.0169,-9.79205 -0.60847,-16.92701 -2.20646,-25.69062 z m -328.42069,44.52355 -0.59404,0.0767 c -0.32426,0.0425 -4.30309,0.47062 -8.82578,0.94676 -4.52269,0.47615 -8.27005,0.90467 -8.3166,0.94677 -0.10914,0.0987 0.19395,2.02928 0.87693,5.78293 3.74286,20.5706 11.55924,39.09836 24.24259,57.42003 0.34643,0.50043 0.71596,0.88794 0.82035,0.87001 0.27802,-0.0476 14.92958,-8.4814 14.93592,-8.59767 0.003,-0.0541 -0.61241,-0.97536 -1.35781,-2.04705 -3.27958,-4.71514 -7.63657,-12.12967 -10.04215,-17.09296 -5.78721,-11.94039 -9.59955,-24.12581 -11.56969,-37.02614 z m 316.85099,82.03592 c -0.36048,0.007 -16.97617,3.73907 -17.08581,3.83822 -0.0753,0.0682 16.94207,62.59192 17.19896,63.25382 0.30965,0.798 2.86925,7.31813 10.42538,6.19627 8.42278,-1.62864 7.56799,-10.19392 6.91501,-10.06007 -0.0867,0.0174 -3.86345,-14.3273 -8.59948,-31.67794 -6.7623,-24.77405 -8.66138,-31.55359 -8.85406,-31.5503 z m -244.80211,18.57706 c -0.31471,0.009 -0.93458,0.92267 -4.83721,6.70413 -2.54758,3.77402 -4.63919,6.89516 -4.63919,6.93441 0,0.095 2.63539,1.52222 5.43123,2.96823 17.18076,8.88581 36.19242,15.16537 55.6703,18.37201 2.75979,0.45453 4.36027,0.69944 8.48631,1.25377 0.53344,0.0717 1.05269,0.14407 1.15981,0.15373 0.242,0.0216 0.18744,0.43638 1.44268,-7.95778 0.57722,-3.86012 1.0799,-7.25173 1.13152,-7.54849 0.0906,-0.52038 0.0663,-0.53984 -0.45265,-0.6141 -0.29582,-0.0422 -2.06498,-0.28682 -3.93198,-0.53739 -17.1444,-2.30049 -34.78834,-7.57763 -50.21072,-14.99469 -2.7318,-1.3138 -7.81528,-3.92179 -9.10866,-4.68264 -0.0408,-0.024 -0.0965,-0.0525 -0.14144,-0.0512 z m 164.66293,6.32028 c -1.52266,0.0905 -3.53738,0.70727 -8.03371,2.175 -8.68549,2.83522 -18.54878,5.74416 -22.99794,6.7809 -0.64367,0.15 -1.18718,0.35231 -1.18807,0.43501 -0.002,0.14944 4.40029,15.44773 4.46946,15.532 0.0424,0.0521 4.87869,-1.18335 7.89228,-2.02144 3.91758,-1.08954 10.50973,-3.08747 15.2188,-4.60587 l 4.6675,-1.50969 17.14236,6.2435 c 13.94595,5.08505 17.14167,6.22073 17.22724,6.03865 0.69647,-1.48186 6.62352,-14.82249 6.59105,-14.84098 -0.29825,-0.17022 -37.77097,-13.74416 -38.3582,-13.89441 -0.96682,-0.2474 -1.71716,-0.3869 -2.63077,-0.33267 z"
+ style="opacity:0.5;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:4.30466557;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="ccssccssscccccccssssscccsssscccscsssccccccssssssssssccccscssccsscccsscsscsssssccsccsscsscsccscccccssc" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer2"
+ inkscape:label="Layer 2"
+ style="display:inline">
+ <path
+ sodipodi:type="inkscape:offset"
+ inkscape:radius="12.358562"
+ inkscape:original="M 253.34375 618.125 C 151.96941 618.125 69.75 698.4746 69.75 797.625 C 69.75 896.77539 151.96941 977.1875 253.34375 977.1875 C 287.00054 977.1875 311.5728 970.27778 342.65625 958.71875 L 440.75 998.25 L 414.1875 890.8125 C 431.0772 863.65332 436.90625 831.73711 436.90625 797.625 C 436.90625 698.4746 354.71813 618.125 253.34375 618.125 z "
+ style="display:inline;fill:#ffffff;fill-opacity:1;stroke:#000000"
+ id="path3868-5"
+ d="m 253.34375,605.76562 c -107.90463,0 -195.953125,85.87684 -195.953125,191.85938 0,105.98253 88.043415,191.92187 195.953125,191.92188 33.56396,0 59.43822,-6.90343 88.98047,-17.63672 l 93.80664,37.80274 a 12.359798,12.359798 0 0 0 16.61719,-14.4297 L 427.35352,892.57031 c 16.32005,-28.65755 21.9121,-61.28733 21.9121,-94.94531 0,-105.97994 -88.0172,-191.85938 -195.92187,-191.85938 z"
+ transform="matrix(-0.77259808,0,0,0.77116679,367.55932,-282.28679)" />
+ <path
+ style="display:inline;opacity:0.19211821;fill:url(#radialGradient3883-8);fill-opacity:1;stroke:none"
+ d="m 47.92104,278.34166 c 85.06576,0 154.01258,67.54622 154.01258,150.8595 0,17.57416 -3.07299,34.44668 -8.71589,50.12552 -6.98908,0.97055 -14.13472,1.47017 -21.3913,1.47017 -25.9273,0 -45.91736,-5.31691 -68.73708,-13.59163 L 30.609993,496.36466 A 9.5491555,9.5314668 0 0 1 17.765567,485.2311 l 19.6288,-79.18904 C 24.777759,383.93808 20.469653,358.7681 20.469653,332.8053 c 0,-18.88073 3.628423,-36.92402 10.236917,-53.5238 5.65186,-0.61553 11.396492,-0.93984 17.21447,-0.93984 z"
+ id="path3878-3"
+ inkscape:connector-curvature="0" />
+ <path
+ sodipodi:nodetypes="ccsssscc"
+ inkscape:connector-curvature="0"
+ id="path3845-7"
+ d="M 23.939214,490.62525 44.460762,407.7534 C 31.411813,386.80914 26.916189,362.2158 26.916189,335.90966 c 0,-76.4615 63.504925,-138.42498 141.826591,-138.42498 78.32162,0 141.82653,61.96348 141.82653,138.42498 0,76.4615 -63.50491,138.47065 -141.82653,138.47065 -26.00317,0 -44.99723,-5.3294 -69.012271,-14.24332 z"
+ style="display:inline;opacity:0;fill:none;stroke:#000000;stroke-width:15.43764114;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:61.75056976, 61.75056976;stroke-dashoffset:0;stroke-opacity:1" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path3855-0"
+ d="m 171.85058,186.81378 c 3.53202,-0.001 7.0468,0.057 8.37786,0.14458 11.02792,0.72475 19.47625,1.99843 29.1173,4.43421 3.70534,0.93617 6.53954,1.76617 9.97134,2.89187 2.19153,0.71887 5.52236,1.86783 5.6979,1.97612 0.0538,0.0332 -2.18271,6.10627 -5.23917,14.2666 -0.0306,0.0818 -0.1119,0.0905 -0.2173,0.0482 -0.73033,-0.29333 -4.23609,-1.50378 -5.86691,-2.02432 -14.03755,-4.48046 -28.83807,-6.67326 -43.50693,-6.45851 -2.06572,0.0302 -4.6797,0.10417 -5.7945,0.1687 -1.11476,0.0646 -2.04792,0.10066 -2.07634,0.0722 -0.045,-0.0448 -1.0053,-15.19482 -0.96576,-15.23057 0.008,-0.008 0.92544,-0.0716 2.05223,-0.14458 1.3691,-0.0887 4.91826,-0.14303 8.45028,-0.14457 z m -72.696647,18.43569 c 0.06643,0.0714 7.315537,13.27709 7.315537,13.32675 0,0.012 -0.33262,0.20711 -0.74844,0.43375 -5.49836,2.99686 -11.520423,6.96303 -16.997493,11.15921 -2.122486,1.6261 -4.163129,3.28675 -6.059727,4.93891 -2.763466,2.4073 -5.519031,5.02765 -8.153046,7.73607 -4.188314,4.30662 -8.069301,8.83591 -11.18606,13.08544 -0.428228,0.58393 -0.518926,0.66211 -0.676036,0.55427 -0.743971,-0.51067 -12.069524,-9.01277 -12.07184,-9.0612 -0.0032,-0.0654 2.188315,-2.96196 3.114542,-4.12094 3.702693,-4.63305 6.952577,-8.24177 11.323395,-12.60374 5.422218,-5.41124 10.590321,-9.89733 16.418014,-14.21307 1.68388,-1.247 3.422814,-2.47978 5.238862,-3.71655 4.330773,-2.94935 12.27561,-7.74115 12.482292,-7.5189 z m 180.256787,26.14737 1.59348,1.68696 c 14.15689,14.8539 24.97464,32.22325 31.79723,51.08979 0.33396,0.9235 0.62801,1.75148 0.65189,1.85562 0.0314,0.13682 -1.93992,0.85746 -7.0741,2.57859 -3.90783,1.31002 -7.16723,2.38116 -7.24311,2.38582 -0.0759,0.005 -0.60152,-1.2735 -1.18304,-2.84371 -5.969,-16.11689 -15.21187,-30.93143 -27.33066,-43.81189 l -2.00392,-2.14481 5.38405,-5.39818 z m -254.691788,75.38159 6.494676,1.25313 c 3.574397,0.70032 6.934399,1.35613 7.484553,1.44593 0.686953,0.11217 1.014012,0.2292 1.014012,0.36149 0,0.10595 -0.153023,1.06824 -0.338008,2.14481 -1.77313,10.31915 -2.154169,22.66846 -1.110602,36.17254 0.477667,6.18126 1.540548,13.7745 2.559231,18.33932 0.153154,0.68636 0.248963,1.29382 0.21727,1.32544 -0.03169,0.0316 -3.362797,0.75672 -7.412074,1.61465 -4.049328,0.85789 -7.418252,1.55725 -7.460429,1.56642 -0.04205,0.009 -0.300037,-1.13437 -0.579433,-2.5545 -2.203444,-11.19939 -3.166429,-21.72408 -3.186982,-34.87117 -0.01437,-9.22213 0.519332,-15.94183 1.88322,-24.19538 z m 280.308238,41.9322 0.50701,0.0722 c 0.27676,0.0401 3.6727,0.44323 7.53284,0.89166 3.86013,0.44843 7.05852,0.85201 7.09824,0.89167 0.0932,0.0929 -0.16553,1.91116 -0.74845,5.44635 -3.19455,19.37336 -9.86586,36.82275 -20.69114,54.07808 -0.29568,0.4713 -0.61108,0.83626 -0.70017,0.81936 -0.2373,-0.0448 -12.74246,-7.98776 -12.74787,-8.09727 -0.003,-0.051 0.5227,-0.91859 1.15889,-1.9279 2.79915,-4.44071 6.51785,-11.42371 8.57102,-16.09812 4.93941,-11.24543 8.19324,-22.72164 9.87477,-34.87114 z M 34.593711,425.97191 c 0.307673,0.006 14.489227,3.52144 14.582798,3.61483 0.06429,0.0642 -14.460111,58.94894 -14.679361,59.57234 -0.264295,0.75154 -2.448917,6.89219 -8.89811,5.83562 -7.188866,-1.53385 -6.459303,-9.60062 -5.901978,-9.47455 0.07403,0.0164 3.297467,-13.49343 7.339677,-29.83423 5.771655,-23.33215 7.392523,-29.71712 7.556974,-29.71401 z m 208.939479,17.49584 c 0.26861,0.009 0.79767,0.86897 4.12858,6.31393 2.17437,3.55436 3.95956,6.49385 3.95956,6.53082 0,0.0895 -2.24931,1.43362 -4.63558,2.79547 -14.66383,8.36864 -30.89035,14.28272 -47.5148,17.30273 -2.35548,0.42806 -3.72149,0.65873 -7.24309,1.18079 -0.4553,0.0675 -0.89848,0.13569 -0.9899,0.14479 -0.20655,0.0203 -0.15998,0.41098 -1.23133,-7.49463 -0.49266,-3.63545 -0.9217,-6.82967 -0.96575,-7.10914 -0.0773,-0.4901 -0.0566,-0.50843 0.38632,-0.57837 0.25249,-0.0397 1.76248,-0.27013 3.35596,-0.5061 14.63282,-2.1666 29.69198,-7.13661 42.85504,-14.12199 2.3316,-1.23733 6.67037,-3.69353 7.77427,-4.4101 0.0348,-0.0226 0.0823,-0.0494 0.12072,-0.0482 z m -140.5404,5.95243 c 1.2996,0.0852 3.01916,0.6661 6.8568,2.04841 7.41309,2.6702 15.83145,5.40983 19.62883,6.38623 0.54937,0.14127 1.01325,0.3318 1.01402,0.4097 0.001,0.14074 -3.75566,14.54864 -3.8147,14.628 -0.0362,0.0491 -4.16398,-1.11446 -6.73609,-1.90379 -3.34367,-1.02612 -8.97009,-2.90777 -12.9893,-4.33779 l -3.98373,-1.42183 -14.631058,5.88012 c -11.902923,4.78909 -14.630484,5.85868 -14.703523,5.68719 -0.594444,-1.39562 -5.653196,-13.95979 -5.625485,-13.97721 0.254566,-0.16031 32.237656,-12.94422 32.738866,-13.08573 0.82518,-0.233 1.4656,-0.36438 2.24537,-0.3133 z"
+ style="display:inline;opacity:0.5;fill:#ffffff;fill-opacity:1;stroke:#000000;stroke-width:3.85941029;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ sodipodi:nodetypes="ccssccssscccccccssssscccsssscccscsssccccccssssssssssccccscssccsscccsscsscsssssccsccsscsscsccscccccssc" />
+ <ellipse
+ cy="334.93869"
+ cx="-242.26097"
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-7"
+ rx="16.401163"
+ ry="16.363543"
+ transform="scale(-1,1)" />
+ <ellipse
+ cy="334.93869"
+ cx="-170.28149"
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-1-89"
+ rx="16.401163"
+ ry="16.363543"
+ transform="scale(-1,1)" />
+ <ellipse
+ cy="334.93869"
+ cx="-98.116379"
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-1-8-8"
+ rx="16.401163"
+ ry="16.363543"
+ transform="scale(-1,1)" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer4"
+ inkscape:label="Dots">
+ <ellipse
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047"
+ cx="237.68259"
+ cy="165.68341"
+ rx="19.21628"
+ ry="17.374786" />
+ <ellipse
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-1"
+ cx="322.01675"
+ cy="165.68341"
+ rx="19.21628"
+ ry="17.374786" />
+ <ellipse
+ style="opacity:0.928;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:#000000"
+ id="path3047-1-8"
+ cx="406.56836"
+ cy="165.68341"
+ rx="19.21628"
+ ry="17.374786" />
+ </g>
+ <g
+ inkscape:groupmode="layer"
+ id="layer3"
+ inkscape:label="Schrift">
+ <flowRoot
+ xml:space="preserve"
+ id="flowRoot3363"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:375px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:middle;fill:#ff0000;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ transform="translate(-4.9492404e-8,35.487951)"><flowRegion
+ id="flowRegion3365"><rect
+ id="rect3367"
+ width="478.00421"
+ height="500.63156"
+ x="15.556346"
+ y="-5.6021442"
+ style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:375px;line-height:125%;font-family:sans-serif;-inkscape-font-specification:'sans-serif, Normal';text-align:center;writing-mode:lr-tb;text-anchor:middle;fill:#ff0000" /></flowRegion><flowPara
+ id="flowPara3375">!</flowPara></flowRoot> </g>
+</svg>
diff --git a/art/render.rb b/art/render.rb
index c5dd4487..bc340ed9 100755
--- a/art/render.rb
+++ b/art/render.rb
@@ -11,8 +11,10 @@ resolutions = {
}
images = {
- 'conversations_plus_beta_baloons.svg' => ['ic_launcher', 48],
- 'conversations_plus_beta_baloons_notification.svg' => ['ic_notification', 24],
+ 'conversations_baloon.svg' => ['ic_launcher', 48],
+ 'conversations_mono.svg' => ['ic_notification', 24],
+ 'ic_toast.svg' => ['ic_toast', 24],
+ 'ic_toast_error.svg' => ['ic_toast_error', 24],
'ic_received_indicator.svg' => ['ic_received_indicator', 12],
'ic_send_text_offline.svg' => ['ic_send_text_offline', 36],
'ic_send_text_online.svg' => ['ic_send_text_online', 36],
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteRemoteFileService.java b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteRemoteFileService.java
index f60efb56..038369ca 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteRemoteFileService.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteRemoteFileService.java
@@ -29,12 +29,16 @@ public class DeleteRemoteFileService implements SimpleUserDecisionCallback {
path = this.message.getFileParams().getUrl();
}
- DeleteRemoteFile remoteFile = new DeleteRemoteFile(path, this.message);
- Account account = this.message.getConversation().getAccount();
- Jid host = account.getXmppConnection().findDiscoItemByFeature(FileTransferHttp.NAMESPACE);
- IqPacket request = FileTransferHttpDeleteSlotRequestPacketGenerator.generate(host, path);
- MessageUtil.setAndSaveFileStatus(this.message, FileStatus.DELETING);
- XmppSendUtil.sendIqPacket(account, request, new DeleteTokenReceived(remoteFile));
+ if (null != path) {
+ DeleteRemoteFile remoteFile = new DeleteRemoteFile(path, this.message);
+ Account account = this.message.getConversation().getAccount();
+ Jid host = account.getXmppConnection().findDiscoItemByFeature(FileTransferHttp.NAMESPACE);
+ if (null != host) {
+ IqPacket request = FileTransferHttpDeleteSlotRequestPacketGenerator.generate(host, path);
+ MessageUtil.setAndSaveFileStatus(this.message, FileStatus.DELETING);
+ XmppSendUtil.sendIqPacket(account, request, new DeleteTokenReceived(remoteFile));
+ }
+ }
}
}
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteTokenReceived.java b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteTokenReceived.java
index 3151ca30..ef0032e3 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteTokenReceived.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/delete/DeleteTokenReceived.java
@@ -1,17 +1,23 @@
package de.thedevstack.conversationsplus.services.filetransfer.http.delete;
+import android.widget.Toast;
+
import org.json.JSONException;
import org.json.JSONObject;
import java.io.IOException;
import de.thedevstack.android.logcat.Logging;
+
import de.thedevstack.conversationsplus.enums.FileStatus;
import de.thedevstack.conversationsplus.http.HttpClient;
import de.thedevstack.conversationsplus.utils.MessageUtil;
+import de.thedevstack.conversationsplus.utils.ui.ConversationsPlusToast;
+import de.thedevstack.conversationsplus.xmpp.exceptions.ServiceUnavailableException;
import de.thedevstack.conversationsplus.xmpp.exceptions.XmppException;
import de.thedevstack.conversationsplus.xmpp.filetransfer.http.delete.DeleteSlotPacketParser;
+import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.xmpp.stanzas.IqPacket;
import eu.siacs.conversations.xmpp.OnIqPacketReceived;
@@ -83,6 +89,11 @@ public class DeleteTokenReceived implements OnIqPacketReceived {
} catch (XmppException e) {
Logging.e("filetransfer.http.delete", "Error while trying to get the delete token: " + e.getMessage());
+ int messageResId = R.string.cplus_remote_file_delete_failed;
+ if (e instanceof ServiceUnavailableException) {
+ messageResId = R.string.cplus_remote_file_delete_service_unavailable;
+ }
+ ConversationsPlusToast.makeErrorToast(messageResId, Toast.LENGTH_LONG);
MessageUtil.setAndSaveFileStatus(remoteFile.getMessage(), FileStatus.DELETE_FAILED);
}
}
diff --git a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/upload/HttpUploadFileTransferService.java b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/upload/HttpUploadFileTransferService.java
index 7fe12dc6..0ab6a8ec 100644
--- a/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/upload/HttpUploadFileTransferService.java
+++ b/src/main/java/de/thedevstack/conversationsplus/services/filetransfer/http/upload/HttpUploadFileTransferService.java
@@ -9,8 +9,10 @@ import de.thedevstack.android.logcat.Logging;
import eu.siacs.conversations.services.AbstractConnectionManager;
import de.thedevstack.conversationsplus.services.FileTransferService;
import de.thedevstack.conversationsplus.services.filetransfer.AbstractFileTransferService;
+import de.thedevstack.conversationsplus.utils.AccountUtil;
import de.thedevstack.conversationsplus.utils.MessageUtil;
import de.thedevstack.conversationsplus.utils.XmppSendUtil;
+import de.thedevstack.conversationsplus.xmpp.filetransfer.http.FileTransferHttp;
import de.thedevstack.conversationsplus.xmpp.filetransfer.http.upload.HttpUpload;
import de.thedevstack.conversationsplus.xmpp.filetransfer.http.upload.HttpUploadRequestSlotPacketGenerator;
@@ -62,19 +64,29 @@ public class HttpUploadFileTransferService extends AbstractFileTransferService i
file.setExpectedSize(inputStreamAndExpectedSize.second);
Logging.d("httpupload", "Requesting upload slot for file upload");
- Jid host = account.getXmppConnection().findDiscoItemByFeature(HttpUpload.NAMESPACE);
- IqPacket request = HttpUploadRequestSlotPacketGenerator.generate(host, file.getName(), file.getSize(), file.getMimeType());
- XmppSendUtil.sendIqPacket(account, request, new HttpUploadSlotRequestReceived(entity));
- MessageUtil.markMessage(message, Message.STATUS_UNSEND);
+ Jid host = this.getHost(account);
+ if (null != host) {
+ IqPacket request = HttpUploadRequestSlotPacketGenerator.generate(host, file.getName(), file.getSize(), file.getMimeType());
+ XmppSendUtil.sendIqPacket(account, request, new HttpUploadSlotRequestReceived(entity));
+ MessageUtil.markMessage(message, Message.STATUS_UNSEND);
- Logging.d("httpupload", "Upload slot for file upload requested");
- started = true;
+ Logging.d("httpupload", "Upload slot for file upload requested");
+ started = true;
+ }
} catch (FileNotFoundException e) {
Logging.e("httpupload", "Could not find file, exception message: " + e.getMessage());
}
return started;
}
+ private Jid getHost(Account account) {
+ Jid host = account.getXmppConnection().findDiscoItemByFeature(FileTransferHttp.NAMESPACE);
+ if (null == host) {
+ host = account.getXmppConnection().findDiscoItemByFeature(HttpUpload.NAMESPACE);
+ }
+ return host;
+ }
+
/**
* Checks whether a message can be sent using this service or not.
*
@@ -87,6 +99,6 @@ public class HttpUploadFileTransferService extends AbstractFileTransferService i
&& null != message.getConversation()
&& null != message.getConversation().getAccount()
&& null != message.getFileParams()
- && message.getConversation().getAccount().httpUploadAvailable(message.getFileParams().getSize());
+ && AccountUtil.isHttpUploadAvailable(message.getConversation().getAccount(), message.getFileParams().getSize());
}
}
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/AccountUtil.java b/src/main/java/de/thedevstack/conversationsplus/utils/AccountUtil.java
new file mode 100644
index 00000000..06c6b6ab
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/utils/AccountUtil.java
@@ -0,0 +1,34 @@
+package de.thedevstack.conversationsplus.utils;
+
+import eu.siacs.conversations.entities.Account;
+
+/**
+ * Utility class to work with accounts.
+ */
+public final class AccountUtil {
+
+ public static boolean isHttpUploadAvailable(Account account, long filesize) {
+ return null != account
+ && null != account.getXmppConnection()
+ && null != account.getXmppConnection().getFeatures()
+ && account.getXmppConnection().getFeatures().httpUpload(filesize);
+ }
+
+ public static boolean isHttpUploadAvailable(Account account) {
+ return null != account
+ && null != account.getXmppConnection()
+ && null != account.getXmppConnection().getFeatures()
+ && account.getXmppConnection().getFeatures().httpUpload(0);
+ }
+
+ public static boolean isFileTransferHttpAvailable(Account account) {
+ return null != account
+ && null != account.getXmppConnection()
+ && null != account.getXmppConnection().getFeatures()
+ && account.getXmppConnection().getFeatures().hasFeatureFileTransferHttp(0);
+ }
+
+ private AccountUtil() {
+ // avoid instantiation of utility class
+ }
+}
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/ui/ConversationsPlusToast.java b/src/main/java/de/thedevstack/conversationsplus/utils/ui/ConversationsPlusToast.java
new file mode 100644
index 00000000..3ebb8602
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/utils/ui/ConversationsPlusToast.java
@@ -0,0 +1,102 @@
+package de.thedevstack.conversationsplus.utils.ui;
+
+import android.content.Context;
+import android.os.Handler;
+import android.os.Looper;
+import android.support.annotation.StringRes;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.widget.ImageView;
+import android.widget.Toast;
+
+import de.thedevstack.conversationsplus.ConversationsPlusApplication;
+
+import eu.siacs.conversations.R;
+
+/**
+ * Wrapper for custom styled Toasts for Conversations+.
+ */
+public final class ConversationsPlusToast {
+
+ /**
+ * Creates an error toast with text and duration
+ * @param text
+ * @param duration
+ */
+ public static void makeErrorToast(final CharSequence text, final int duration) {
+ Handler toastHandler = new Handler(Looper.getMainLooper());
+ toastHandler.post(new ConversationsPlusToast.ToastRunnable(text, duration, true));
+ }
+
+ /**
+ * Creates an error toast with text from resource and duration
+ * @param resId
+ * @param duration
+ */
+ public static void makeErrorToast(@StringRes int resId, int duration) {
+ makeErrorToast(ConversationsPlusApplication.getAppContext().getString(resId), duration);
+ }
+
+ /**
+ * Creates an toast with text and duration
+ * @param text
+ * @param duration
+ */
+ public static void makeToast(final CharSequence text, final int duration) {
+ Handler toastHandler = new Handler(Looper.getMainLooper());
+ toastHandler.post(new ConversationsPlusToast.ToastRunnable(text, duration));
+ }
+
+ /**
+ * Creates an toast with text from resource and duration
+ * @param resId
+ * @param duration
+ */
+ public static void makeToast(@StringRes int resId, int duration) {
+ makeToast(ConversationsPlusApplication.getAppContext().getString(resId), duration);
+ }
+
+ private ConversationsPlusToast() {
+ // avoid instantiation - helper class
+ }
+
+ /**
+ * Runnable to show the toast in an UI thread.
+ */
+ static class ToastRunnable implements Runnable {
+ private boolean showErrorToast = false;
+ private CharSequence text;
+ private int duration;
+
+ public ToastRunnable(CharSequence text, int duration, boolean isError) {
+ this.showErrorToast = isError;
+ this.text = text;
+ this.duration = duration;
+ }
+
+ public ToastRunnable(CharSequence text, int duration) {
+ this.text = text;
+ this.duration = duration;
+ }
+
+ @Override
+ public void run() {
+ Context applicationContext = ConversationsPlusApplication.getAppContext();
+ LayoutInflater inflater = LayoutInflater.from(applicationContext);
+ View layout = inflater.inflate(R.layout.cplus_toast_container, null);
+
+ TextViewUtil.setText(layout, R.id.cplus_toast_txt, text);
+
+ if (this.showErrorToast) {
+ // Set image view to error icon
+ ImageView iv = (ImageView) layout.findViewById(R.id.cplus_toast_icon);
+ iv.setImageResource(R.drawable.ic_toast_error);
+ }
+
+ Toast toast = new Toast(applicationContext);
+ toast.setDuration(duration);
+ toast.setView(layout);
+ toast.show();
+ }
+ }
+}
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java b/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java
index a775dad6..27a269f2 100644
--- a/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java
+++ b/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java
@@ -5,9 +5,9 @@ import android.view.View;
import android.widget.TextView;
/**
- * Created by steckbrief on 29.03.2016.
+ *
*/
-public final class TextViewUtil {
+public final class TextViewUtil extends ViewUtil {
public static void setText(View parentView, int textViewId, CharSequence text) {
TextView tv = (TextView) parentView.findViewById(textViewId);
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/ui/ViewUtil.java b/src/main/java/de/thedevstack/conversationsplus/utils/ui/ViewUtil.java
new file mode 100644
index 00000000..77422587
--- /dev/null
+++ b/src/main/java/de/thedevstack/conversationsplus/utils/ui/ViewUtil.java
@@ -0,0 +1,39 @@
+package de.thedevstack.conversationsplus.utils.ui;
+
+import android.support.annotation.IdRes;
+import android.view.View;
+
+/**
+ * Created by steckbrief on 11.01.2017.
+ */
+
+public class ViewUtil {
+
+ public static <T extends View> T visible(View parentView, @IdRes int textViewId) {
+ T tv = (T) parentView.findViewById(textViewId);
+ if (null != tv) {
+ tv.setVisibility(View.VISIBLE);
+ }
+
+ return tv;
+ }
+
+ public static <T extends View> T invisible(View parentView, @IdRes int textViewId) {
+ T tv = (T) parentView.findViewById(textViewId);
+ if (null != tv) {
+ tv.setVisibility(View.INVISIBLE);
+ }
+
+ return tv;
+ }
+
+ public static <T extends View> T gone(View parentView, @IdRes int textViewId) {
+ T tv = (T) parentView.findViewById(textViewId);
+ if (null != tv) {
+ tv.setVisibility(View.GONE);
+ }
+
+ return tv;
+ }
+
+}
diff --git a/src/main/java/de/thedevstack/conversationsplus/xmpp/utils/ErrorIqPacketExceptionHelper.java b/src/main/java/de/thedevstack/conversationsplus/xmpp/utils/ErrorIqPacketExceptionHelper.java
index 15771248..93e525a8 100644
--- a/src/main/java/de/thedevstack/conversationsplus/xmpp/utils/ErrorIqPacketExceptionHelper.java
+++ b/src/main/java/de/thedevstack/conversationsplus/xmpp/utils/ErrorIqPacketExceptionHelper.java
@@ -15,20 +15,23 @@ import eu.siacs.conversations.xml.Element;
public final class ErrorIqPacketExceptionHelper {
private final static String ERROR_NAMESPACE = "urn:ietf:params:xml:ns:xmpp-stanzas";
- public static void throwIqErrorException(Element packet) throws IqPacketErrorException {
- if (hasErrorElement(packet, "bad-request")) {
- throw new BadRequestIqErrorException(packet, getErrorText(packet));
+ public static void throwIqErrorException(Element errorIqPacket) throws IqPacketErrorException {
+ Element packet = IqPacketParser.findChild(errorIqPacket, "error", "jabber:client");
+ if (null != packet) {
+ if (hasErrorElement(packet, "bad-request")) {
+ throw new BadRequestIqErrorException(errorIqPacket, getErrorText(packet));
+ }
+ if (hasErrorElement(packet, "service-unavailable")) {
+ throw new ServiceUnavailableException(errorIqPacket, getErrorText(packet));
+ }
+ if (hasErrorElement(packet, "internal-server-error")) {
+ throw new InternalServerErrorException(errorIqPacket, getErrorText(packet));
+ }
+ if (hasErrorElement(packet, "undefined-condition")) {
+ throw new UndefinedConditionException(errorIqPacket, getErrorText(packet));
+ }
}
- if (hasErrorElement(packet, "service-unavailable")) {
- throw new ServiceUnavailableException(packet, getErrorText(packet));
- }
- if (hasErrorElement(packet, "internal-server-error")) {
- throw new InternalServerErrorException(packet, getErrorText(packet));
- }
- if (hasErrorElement(packet, "undefined-condition")) {
- throw new UndefinedConditionException(packet, getErrorText(packet));
- }
- throw new IqPacketErrorException(packet, "Unknown error packet.");
+ throw new IqPacketErrorException(errorIqPacket, "Unknown error packet.");
}
private static boolean hasErrorElement(Element packet, String elementName) {
diff --git a/src/main/java/eu/siacs/conversations/entities/Account.java b/src/main/java/eu/siacs/conversations/entities/Account.java
index 9b4198c8..9316706d 100644
--- a/src/main/java/eu/siacs/conversations/entities/Account.java
+++ b/src/main/java/eu/siacs/conversations/entities/Account.java
@@ -57,14 +57,6 @@ public class Account extends AbstractEntity {
public static final int OPTION_USECOMPRESSION = 3;
public final HashSet<Pair<String, String>> inProgressDiscoFetches = new HashSet<>();
- public boolean httpUploadAvailable(long filesize) {
- return xmppConnection != null && xmppConnection.getFeatures().httpUpload(filesize);
- }
-
- public boolean httpUploadAvailable() {
- return httpUploadAvailable(0);
- }
-
public void setDisplayName(String displayName) {
this.displayName = displayName;
}
diff --git a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
index 90f9027a..cba9f25b 100644
--- a/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
+++ b/src/main/java/eu/siacs/conversations/services/XmppConnectionService.java
@@ -38,7 +38,6 @@ import org.openintents.openpgp.util.OpenPgpApi;
import org.openintents.openpgp.util.OpenPgpServiceConnection;
import java.math.BigInteger;
-import java.security.SecureRandom;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
@@ -53,11 +52,11 @@ import java.util.Locale;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
-import de.duenndns.ssl.MemorizingTrustManager;
import de.thedevstack.android.logcat.Logging;
import de.thedevstack.conversationsplus.ConversationsPlusApplication;
import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.thedevstack.conversationsplus.services.filetransfer.FileTransferManager;
+import de.thedevstack.conversationsplus.utils.AccountUtil;
import de.thedevstack.conversationsplus.utils.ImageUtil;
import de.thedevstack.conversationsplus.utils.MessageUtil;
import de.thedevstack.conversationsplus.utils.UiUpdateHelper;
@@ -66,6 +65,7 @@ import de.thedevstack.conversationsplus.utils.XmppSendUtil;
import de.tzur.conversations.Settings;
import eu.siacs.conversations.Config;
+
import eu.siacs.conversations.R;
import eu.siacs.conversations.crypto.PgpEngine;
import eu.siacs.conversations.crypto.axolotl.AxolotlService;
@@ -86,7 +86,6 @@ import eu.siacs.conversations.entities.TransferablePlaceholder;
import eu.siacs.conversations.generator.IqGenerator;
import eu.siacs.conversations.generator.MessageGenerator;
import eu.siacs.conversations.generator.PresenceGenerator;
-import eu.siacs.conversations.http.HttpConnectionManager;
import eu.siacs.conversations.parser.IqParser;
import eu.siacs.conversations.parser.MessageParser;
import eu.siacs.conversations.parser.PresenceParser;
@@ -95,7 +94,6 @@ import eu.siacs.conversations.persistance.FileBackend;
import eu.siacs.conversations.ui.UiCallback;
import eu.siacs.conversations.utils.CryptoHelper;
import eu.siacs.conversations.utils.ExceptionHelper;
-import eu.siacs.conversations.utils.FileUtils;
import eu.siacs.conversations.utils.OnPhoneContactsLoadedListener;
import eu.siacs.conversations.utils.PhoneHelper;
import eu.siacs.conversations.utils.Xmlns;
@@ -1083,7 +1081,7 @@ public class XmppConnectionService extends Service implements OnPhoneContactsLoa
} else {
for (Conversation conversation : getConversations()) {
if (conversation.getMode() == Conversation.MODE_SINGLE
- || conversation.getAccount().httpUploadAvailable()) {
+ || AccountUtil.isHttpUploadAvailable(conversation.getAccount())) {
list.add(conversation);
}
}
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
index 4466dd22..1b725f1a 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationActivity.java
@@ -43,12 +43,15 @@ import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
+import de.timroes.android.listview.EnhancedListView;
+
import de.thedevstack.android.logcat.Logging;
+
import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.thedevstack.conversationsplus.ui.dialogs.UserDecisionDialog;
import de.thedevstack.conversationsplus.ui.listeners.ResizePictureUserDecisionListener;
+import de.thedevstack.conversationsplus.utils.AccountUtil;
import de.thedevstack.conversationsplus.utils.ConversationUtil;
-import de.timroes.android.listview.EnhancedListView;
import eu.siacs.conversations.Config;
import eu.siacs.conversations.R;
@@ -422,7 +425,7 @@ public class ConversationActivity extends XmppActivity
}
if (this.getSelectedConversation().getMode() == Conversation.MODE_MULTI) {
menuContactDetails.setVisible(false);
- menuAttach.setVisible(getSelectedConversation().getAccount().httpUploadAvailable() && getSelectedConversation().getMucOptions().participating());
+ menuAttach.setVisible(AccountUtil.isHttpUploadAvailable(getSelectedConversation().getAccount()) && getSelectedConversation().getMucOptions().participating());
menuInviteContact.setVisible(getSelectedConversation().getMucOptions().canInvite());
menuSecure.setVisible((Config.supportOpenPgp() || Config.supportOmemo()) && Config.multipleEncryptionChoices()); //only if pgp is supported we have a choice
} else {
@@ -493,7 +496,7 @@ public class ConversationActivity extends XmppActivity
}
}
};
- if ((account.httpUploadAvailable() || attachmentChoice == ATTACHMENT_CHOICE_LOCATION) && encryption != Message.ENCRYPTION_OTR) {
+ if ((AccountUtil.isHttpUploadAvailable(account) || attachmentChoice == ATTACHMENT_CHOICE_LOCATION) && encryption != Message.ENCRYPTION_OTR) {
conversation.setNextCounterpart(null);
callback.onPresenceSelected();
} else {
diff --git a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
index 08f49551..944299e1 100644
--- a/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
@@ -52,6 +52,7 @@ import de.thedevstack.conversationsplus.ui.dialogs.MessageDetailsDialog;
import de.thedevstack.conversationsplus.ui.listeners.DeleteFileCallback;
import de.thedevstack.conversationsplus.ui.listeners.SimpleUserDecisionCallback;
import de.thedevstack.conversationsplus.ui.listeners.UserDecisionListener;
+import de.thedevstack.conversationsplus.utils.AccountUtil;
import de.thedevstack.conversationsplus.utils.MessageUtil;
import eu.siacs.conversations.Config;
@@ -583,7 +584,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
deleteFile.setVisible(true);
deleteFile.setTitle(activity.getString(R.string.delete_x_file,UIHelper.getFileDescriptionString(activity, m)));
}
- if (m.isHttpUploaded() && MessageUtil.isMessageSent(m)) {
+ if (m.isHttpUploaded() && MessageUtil.isMessageSent(m) && AccountUtil.isFileTransferHttpAvailable(m.getConversation().getAccount())) {
MenuItem deleteRemoteFile = menu.findItem(R.id.msg_ctx_menu_delete_remote_file);
deleteRemoteFile.setVisible(true);
}
@@ -1043,7 +1044,7 @@ public class ConversationFragment extends Fragment implements EditMessage.Keyboa
final String text = this.mEditMessage == null ? "" : this.mEditMessage.getText().toString();
final boolean empty = text.length() == 0;
final boolean conference = c.getMode() == Conversation.MODE_MULTI;
- if (conference && !c.getAccount().httpUploadAvailable()) {
+ if (conference && !AccountUtil.isHttpUploadAvailable(c.getAccount())) {
if (empty && c.getNextCounterpart() != null) {
action = SendButtonAction.CANCEL;
} else {
diff --git a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java
index 7fcd6b33..ebe622d0 100644
--- a/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ShareWithActivity.java
@@ -15,7 +15,6 @@ import android.widget.Toast;
import java.net.URLConnection;
import java.util.ArrayList;
-import java.util.Iterator;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
@@ -23,6 +22,7 @@ import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.thedevstack.conversationsplus.ui.dialogs.UserDecisionDialog;
import de.thedevstack.conversationsplus.ui.listeners.ResizePictureUserDecisionListener;
import de.thedevstack.conversationsplus.ui.listeners.ShareWithResizePictureUserDecisionListener;
+import de.thedevstack.conversationsplus.utils.AccountUtil;
import de.thedevstack.conversationsplus.utils.ConversationUtil;
import eu.siacs.conversations.Config;
@@ -30,7 +30,6 @@ import eu.siacs.conversations.R;
import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
-import eu.siacs.conversations.persistance.FileBackend;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.ui.adapter.ConversationAdapter;
import eu.siacs.conversations.utils.FileUtils;
@@ -308,7 +307,7 @@ public class ShareWithActivity extends XmppActivity implements XmppConnectionSer
}
};
}
- if (account.httpUploadAvailable()
+ if (AccountUtil.isHttpUploadAvailable(account)
&& (conversation.getMode() == Conversation.MODE_MULTI
|| FileUtils.allFilesUnderSize(this, share.uris, max))
&& conversation.getNextEncryption() != Message.ENCRYPTION_OTR) {
diff --git a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
index 10450b8d..d413d059 100644
--- a/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
+++ b/src/main/java/eu/siacs/conversations/ui/adapter/MessageAdapter.java
@@ -42,7 +42,8 @@ import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.thedevstack.conversationsplus.entities.FileParams;
import de.thedevstack.conversationsplus.enums.FileStatus;
import de.thedevstack.conversationsplus.utils.MessageUtil;
-
+import de.thedevstack.conversationsplus.utils.ui.TextViewUtil;
+import de.thedevstack.conversationsplus.utils.ui.ViewUtil;
import eu.siacs.conversations.R;
import eu.siacs.conversations.crypto.axolotl.XmppAxolotlSession;
import eu.siacs.conversations.entities.Account;
@@ -237,9 +238,9 @@ public class MessageAdapter extends ArrayAdapter<Message> {
FileStatus fileStatus = message.getFileParams().getFileStatus();
if (fileStatus == FileStatus.DELETE_FAILED || fileStatus == FileStatus.DELETED || fileStatus == FileStatus.DELETING) {
viewHolder.remoteFileStatus.setVisibility(View.VISIBLE);
- viewHolder.remoteFileStatus.setTypeface(null, Typeface.ITALIC);
switch (fileStatus) {
case DELETE_FAILED:
+ TextViewUtil.setColor(viewHolder.remoteFileStatus, R.color.error);
viewHolder.remoteFileStatus.setText(R.string.remote_filestatus_delete_failed);
break;
case DELETED:
@@ -606,8 +607,7 @@ public class MessageAdapter extends ArrayAdapter<Message> {
ViewHolder viewHolder = new ViewHolder(view);
if (SENT == type
|| RECEIVED == type) {
- viewHolder.message_box = (LinearLayout) view.findViewById(R.id.message_box);
- viewHolder.message_box.setVisibility(View.VISIBLE);
+ viewHolder.message_box = ViewUtil.visible(view, R.id.message_box);
viewHolder.indicator = (ImageView) view.findViewById(R.id.security_indicator);
viewHolder.messageBody = (TextView) view.findViewById(R.id.message_body);
viewHolder.time = (TextView) view.findViewById(R.id.message_time);
@@ -619,17 +619,17 @@ public class MessageAdapter extends ArrayAdapter<Message> {
viewHolder.image = (ImageView) view.findViewById(R.id.message_image);
}
if (RECEIVED == type) { // Extra block as preparation for new /me representation
- viewHolder.contact_picture = (ImageView) view.findViewById(R.id.message_photo);
- viewHolder.contact_picture.setVisibility(View.VISIBLE);
+ viewHolder.contact_picture = ViewUtil.visible(view, R.id.message_photo);
}
if (RECEIVED == type) {
viewHolder.encryption = (TextView) view.findViewById(R.id.message_encryption);
}
if (STATUS == type) {
- viewHolder.contact_picture = (ImageView) view.findViewById(R.id.message_photo);
- viewHolder.contact_picture.setVisibility(View.VISIBLE);
- viewHolder.status_message = (TextView) view.findViewById(R.id.status_message);
- viewHolder.status_message.setVisibility(View.VISIBLE);
+ viewHolder.contact_picture = ViewUtil.visible(view, R.id.message_photo);
+ viewHolder.status_message = TextViewUtil.visible(view, R.id.status_message);
+ }
+ if (SENT == type) {
+ viewHolder.remoteFileStatus = TextViewUtil.gone(view, R.id.remote_file_status);
}
view.setTag(viewHolder);
diff --git a/src/main/java/eu/siacs/conversations/utils/Xmlns.java b/src/main/java/eu/siacs/conversations/utils/Xmlns.java
index ad30b3e6..17fd2d26 100644
--- a/src/main/java/eu/siacs/conversations/utils/Xmlns.java
+++ b/src/main/java/eu/siacs/conversations/utils/Xmlns.java
@@ -1,11 +1,8 @@
package eu.siacs.conversations.utils;
-import eu.siacs.conversations.Config;
-
public final class Xmlns {
public static final String BLOCKING = "urn:xmpp:blocking";
public static final String ROSTER = "jabber:iq:roster";
public static final String REGISTER = "jabber:iq:register";
public static final String BYTE_STREAMS = "http://jabber.org/protocol/bytestreams";
- public static final String HTTP_UPLOAD = "urn:xmpp:http:upload";
}
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index a5d0321d..139e207a 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -53,6 +53,9 @@ import de.thedevstack.android.logcat.Logging;
import de.thedevstack.conversationsplus.ConversationsPlusApplication;
import de.thedevstack.conversationsplus.ConversationsPlusPreferences;
import de.thedevstack.conversationsplus.dto.SrvRecord;
+import de.thedevstack.conversationsplus.xmpp.filetransfer.http.FileTransferHttp;
+import de.thedevstack.conversationsplus.xmpp.filetransfer.http.upload.HttpUpload;
+
import eu.siacs.conversations.Config;
import eu.siacs.conversations.crypto.XmppDomainVerifier;
import eu.siacs.conversations.crypto.sasl.DigestMd5;
@@ -67,7 +70,6 @@ import eu.siacs.conversations.generator.IqGenerator;
import eu.siacs.conversations.services.XmppConnectionService;
import eu.siacs.conversations.utils.DNSHelper;
import eu.siacs.conversations.utils.SSLSocketHelper;
-import eu.siacs.conversations.utils.SocksSocketFactory;
import eu.siacs.conversations.utils.Xmlns;
import eu.siacs.conversations.xml.Element;
import eu.siacs.conversations.xml.Tag;
@@ -1536,35 +1538,62 @@ public class XmppConnection implements Runnable {
this.blockListRequested = value;
}
+ public boolean hasFeatureFileTransferHttp(long filesize) {
+ if (Config.DISABLE_HTTP_UPLOAD) {
+ return false;
+ } else {
+ List<Entry<Jid, ServiceDiscoveryResult>> items = findDiscoItemsByFeature(FileTransferHttp.NAMESPACE);
+ if (items.size() > 0) {
+ long maxsize = this.parseMaxHttpUploadSize(items.get(0), FileTransferHttp.NAMESPACE);
+ return filesize <= maxsize;
+ } else {
+ return false;
+ }
+ }
+ }
+
public boolean httpUpload(long filesize) {
if (Config.DISABLE_HTTP_UPLOAD) {
return false;
} else {
- List<Entry<Jid, ServiceDiscoveryResult>> items = findDiscoItemsByFeature(Xmlns.HTTP_UPLOAD);
- if (items.size() > 0) {
- try {
- long maxsize = Long.parseLong(items.get(0).getValue().getExtendedDiscoInformation(Xmlns.HTTP_UPLOAD, "max-file-size"));
- return filesize <= maxsize;
- } catch (Exception e) {
- return true;
- }
- } else {
- return false;
- }
+ if (hasFeatureFileTransferHttp(filesize)) {
+ return true;
+ } else {
+ List<Entry<Jid, ServiceDiscoveryResult>> items = findDiscoItemsByFeature(HttpUpload.NAMESPACE);
+ if (items.size() > 0) {
+ long maxsize = this.parseMaxHttpUploadSize(items.get(0), HttpUpload.NAMESPACE);
+ return filesize <= maxsize;
+ } else {
+ return false;
+ }
+ }
}
}
+ private long parseMaxHttpUploadSize(Entry<Jid, ServiceDiscoveryResult> item, String namespace) {
+ long maxsize = Long.MAX_VALUE;
+ if (null != item && null != namespace) {
+ try {
+ maxsize = Long.parseLong(item.getValue().getExtendedDiscoInformation(namespace, "max-file-size"));
+ } catch (Exception e) {
+ // Suppress exception
+ }
+ }
+ return maxsize;
+ }
+
public long getMaxHttpUploadSize() {
- List<Entry<Jid, ServiceDiscoveryResult>> items = findDiscoItemsByFeature(Xmlns.HTTP_UPLOAD);
- if (items.size() > 0) {
- try {
- return Long.parseLong(items.get(0).getValue().getExtendedDiscoInformation(Xmlns.HTTP_UPLOAD, "max-file-size"));
- } catch (Exception e) {
- return -1;
- }
- } else {
- return -1;
- }
+ List<Entry<Jid, ServiceDiscoveryResult>> items = findDiscoItemsByFeature(HttpUpload.NAMESPACE);
+ if (items.size() > 0) {
+ long maxsize = this.parseMaxHttpUploadSize(items.get(0), HttpUpload.NAMESPACE);
+ if (Long.MAX_VALUE == maxsize) { // For code compatibility - legacy behavior returns -1 in case of no max-file-size
+ return -1;
+ } else {
+ return maxsize;
+ }
+ } else {
+ return -1;
+ }
}
}
diff --git a/src/main/res/drawable-hdpi/ic_toast.png b/src/main/res/drawable-hdpi/ic_toast.png
new file mode 100644
index 00000000..fd5d1d8b
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_toast.png
Binary files differ
diff --git a/src/main/res/drawable-hdpi/ic_toast_error.png b/src/main/res/drawable-hdpi/ic_toast_error.png
new file mode 100644
index 00000000..31de0901
--- /dev/null
+++ b/src/main/res/drawable-hdpi/ic_toast_error.png
Binary files differ
diff --git a/src/main/res/layout/cplus_toast_container.xml b/src/main/res/layout/cplus_toast_container.xml
new file mode 100644
index 00000000..f2aa09e3
--- /dev/null
+++ b/src/main/res/layout/cplus_toast_container.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:id="@+id/cplus_toast"
+ android:orientation="horizontal"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ android:padding="8dp"
+ android:background="#DAAA">
+
+ <ImageView android:id="@+id/cplus_toast_icon"
+ android:src="@drawable/ic_toast"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_marginRight="8dp"/>
+
+ <TextView android:id="@+id/cplus_toast_txt"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:textColor="#FFF"
+ android:shadowColor="#BB000000"
+ android:shadowRadius="2.75"/>
+</LinearLayout> \ No newline at end of file
diff --git a/src/main/res/layout/message_sent.xml b/src/main/res/layout/message_sent.xml
index f59c51f3..8bda9c8f 100644
--- a/src/main/res/layout/message_sent.xml
+++ b/src/main/res/layout/message_sent.xml
@@ -117,7 +117,7 @@
android:textColor="@color/secondaryText"
android:textSize="?attr/TextSizeInfo"
android:visibility="gone"
- android:textStyle="italic"/>
+ android:textStyle="normal|italic"/>
</LinearLayout>
</LinearLayout>
diff --git a/src/main/res/values/strings.xml b/src/main/res/values/strings.xml
index 5200fcb9..eb6800e0 100644
--- a/src/main/res/values/strings.xml
+++ b/src/main/res/values/strings.xml
@@ -682,4 +682,6 @@
<string name="file_not_on_remote_host">No file on remote host</string>
<string name="dlg_msg_details_original_filename">Original Filename</string>
<string name="cplus_open">Open</string>
+ <string name="cplus_remote_file_delete_service_unavailable">Remote File Deletion Service currently unavailable. Please try again later.</string>
+ <string name="cplus_remote_file_delete_failed">Failed to delete remote file.</string>
</resources>