diff --git a/sflphone-client-gnome/debian/changelog b/sflphone-client-gnome/debian/changelog index b3e6ca9d9d3d79893ed8a3cd5f05c5ef3396d8dc..32ca076bb8ac7a840959c69424bd83eba0160264 100644 --- a/sflphone-client-gnome/debian/changelog +++ b/sflphone-client-gnome/debian/changelog @@ -1,7 +1,30 @@ -sflphone-client-gnome (0.9.5-SYSVER~snapshot1242399317) SYSTEM; urgency=low +sflphone-client-gnome (0.9.5-SYSVER~snapshot1242878510) SYSTEM; urgency=low - ** SNAPSHOT 1242399317 ** + ** SNAPSHOT 1242878510 ** + * [#1403] Add smaller icon for gnome notifications + * [#1403] Prevent crash when hangup && no notification + * [#1403] Remove all actions on notifications; code refactoring + * [#1451] Use stun.sflphone.org as default STUN server + * [#1456] Add a flag to be replaced in the control files + * [#1454] Make cppunit optional; remove from build deps in control + files + * [#1401] Add libexpat1-dev dependency in control files + + -- SFLphone Automatic Build System <team@sflphone.org> Thu, 21 May 2009 00:01:56 -0400 + +sflphone-client-gnome (0.9.5-SYSVER~rc2) SYSTEM; urgency=low + + ** 0.9.5 rc2 ** + + * [#1422] Improved error message + * [#1402] Fix pjsip build + * [#1404] Clear GTK-Critical Bug at client startup + * [#1422] Added automatic VM shutdown when building on more than one + VM + * [#1422] Fixed some issues with new changelog generation script + * [#1422] Moved distribution update to specific file + * [#1422] Dropped git-dch, replace by home made implementation * Changes for name based dbus connection * Clean changelogs * [#1343] Gnome: Implement a callback system to handle focus on @@ -24,6 +47,7 @@ sflphone-client-gnome (0.9.5-SYSVER~snapshot1242399317) SYSTEM; urgency=low * [#1407] Add a scenario to pick_up action * Test client dbus connection to a fixed owner * Add python dbus test suite + * [#1161] Modified version handling in build system * [#1314] Test pulse audio and audio streams connect and disconnect * [#1402] Add info message after configure * [#1402] Build the daemon with the local pjsip library (vs the @@ -34,10 +58,12 @@ sflphone-client-gnome (0.9.5-SYSVER~snapshot1242399317) SYSTEM; urgency=low * [#1314] Refactoring of pulselayer to test conect/disconnect * Add debug messages in debus calls concerning account * [#1314] Add some return values to audio init functions + * [#1406] add liblog4c-dev in build-depends + * [#1409] Restore .desktop icon * Bug #1405: Fix strings as requested. * Bug #1404: Fix strings in preferences panel. - -- SFLphone Automatic Build System <team@sflphone.org> Fri, 15 May 2009 10:55:43 -0400 + -- SFLphone Automatic Build System <team@sflphone.org> Tue, 19 May 2009 12:08:18 -0400 sflphone-client-gnome (0.9.5-0ubuntu1~rc1) SYSTEM; urgency=low diff --git a/sflphone-client-gnome/debian/control.hardy b/sflphone-client-gnome/debian/control.hardy index 83f0f4e995874fc3ae5b701075ef62d1747baae9..7cf132491b14be839829bfd90ba87104aee5300d 100644 --- a/sflphone-client-gnome/debian/control.hardy +++ b/sflphone-client-gnome/debian/control.hardy @@ -8,7 +8,7 @@ Standards-Version: 3.7.3 Package: sflphone-client-gnome Priority: optional Architecture: any -Depends: sflphone-common (>= 0.9.5), libdbus-glib-1-2 (>= 0.73), libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0), libdbus-glib-1-2, libnotify1 (>= 0.4), libsexy2 (>= 0.1), librsvg2-common (>=2.22.2), liblog4c3 +Depends: sflphone-common (=VERSION), libdbus-glib-1-2 (>= 0.73), libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0), libdbus-glib-1-2, libnotify1 (>= 0.4), libsexy2 (>= 0.1), librsvg2-common (>=2.22.2), liblog4c3 Replaces: sflphone Conflicts: sflphone Homepage: http://www.sflphone.org diff --git a/sflphone-client-gnome/debian/control.intrepid b/sflphone-client-gnome/debian/control.intrepid index 214c29304ebd213dc937cf627dde9851f0305181..747bdbf429f07c0d1ff0e66922cba5f0ab0ba753 100644 --- a/sflphone-client-gnome/debian/control.intrepid +++ b/sflphone-client-gnome/debian/control.intrepid @@ -8,7 +8,7 @@ Standards-Version: 3.8.0 Package: sflphone-client-gnome Priority: optional Architecture: any -Depends: sflphone-common (>=0.9.5), libdbus-glib-1-2 (>= 0.73), libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0), libdbus-glib-1-2, libnotify1 (>= 0.4), libsexy2 (>= 0.1), librsvg2-common (>= 2.22.2), liblog4c3 +Depends: sflphone-common (=VERSION), libdbus-glib-1-2 (>= 0.73), libgtk2.0-0 , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0), libdbus-glib-1-2, libnotify1 (>= 0.4), libsexy2 (>= 0.1), librsvg2-common (>= 2.22.2), liblog4c3 Replaces: sflphone Conflicts: sflphone Homepage: http://www.sflphone.org diff --git a/sflphone-client-gnome/debian/control.jaunty b/sflphone-client-gnome/debian/control.jaunty index f36c19b8107b61ff95010cf4db3f415783d715b9..dd6a423896dbeb104fdbfb5615a6a795cd3590f7 100644 --- a/sflphone-client-gnome/debian/control.jaunty +++ b/sflphone-client-gnome/debian/control.jaunty @@ -8,7 +8,7 @@ Standards-Version: 3.7.3 Package: sflphone-client-gnome Priority: optional Architecture: any -Depends: sflphone-common (>=0.9.5), libdbus-glib-1-2 (>= 0.73), libgtk2.0-0 (>=2.16) , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) ,libdbus-glib-1-2, libnotify1 (>= 0.4), librsvg2-common (>=2.22.2), liblog4c3 +Depends: sflphone-common (=VERSION), libdbus-glib-1-2 (>= 0.73), libgtk2.0-0 (>=2.16) , libc6 (>= 2.3.6-6) , libglib2.0-0 (>= 2.12.0) ,libdbus-glib-1-2, libnotify1 (>= 0.4), librsvg2-common (>=2.22.2), liblog4c3 Replaces: sflphone Conflicts: sflphone Homepage: http://www.sflphone.org diff --git a/sflphone-client-gnome/pixmaps/Makefile.am b/sflphone-client-gnome/pixmaps/Makefile.am index 47973af90bd9c2128f0fd0beddfb02d868b4246d..15fc5055572ecdb0ed65c9c7feeb871384650fd8 100644 --- a/sflphone-client-gnome/pixmaps/Makefile.am +++ b/sflphone-client-gnome/pixmaps/Makefile.am @@ -2,6 +2,6 @@ icondir = $(datadir)/pixmaps icon_DATA = sflphone.svg -buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history2.svg sflphone.svg sflphone_notif.svg stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg home.svg wait-on.gif +buttons_DATA = accept.svg current.svg transfert.svg hang_up.svg hold.svg unhold.svg refuse.svg call.svg ring.svg dial.svg mic.svg mic_25.svg mic_50.svg mic_75.svg speaker.svg speaker_25.svg speaker_50.svg speaker_75.svg fail.svg incoming.svg outgoing.svg missed.svg mailbox.svg busy.svg icon_accept.svg icon_hold.svg icon_unhold.svg icon_hangup.svg icon_call.svg icon_dialpad.svg icon_volume.svg icon_dialpad_off.svg icon_volume_off.svg history2.svg sflphone.svg sflphone_small.svg stock_person.svg icon_rec.svg rec_call.svg addressbook.svg contact_default.svg face-monkey.svg users.svg home.svg wait-on.gif buttonsdir = $(datadir)/sflphone EXTRA_DIST = $(buttons_DATA) $(icon_DATA) diff --git a/sflphone-client-gnome/pixmaps/sflphone_small.svg b/sflphone-client-gnome/pixmaps/sflphone_small.svg new file mode 100644 index 0000000000000000000000000000000000000000..eb4154c3de093bd2da6f8b413370e085fb4c76bb --- /dev/null +++ b/sflphone-client-gnome/pixmaps/sflphone_small.svg @@ -0,0 +1,373 @@ +<?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="60" + height="60" + id="svg5875" + sodipodi:version="0.32" + inkscape:version="0.46" + version="1.0" + sodipodi:docname="sflphone_small.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape"> + <defs + id="defs5877"> + <linearGradient + inkscape:collect="always" + id="linearGradient3803"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop3805" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop3807" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient4684"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop4686" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop4688" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient4669"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop4671" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop4673" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient3859"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop3861" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop3863" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient5850"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop5852" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop5854" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5850" + id="linearGradient5856" + x1="476.3125" + y1="439.0293" + x2="477.3125" + y2="514.42188" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + id="linearGradient4999"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop5001" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop5003" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4999" + id="linearGradient5862" + gradientUnits="userSpaceOnUse" + x1="698.38525" + y1="245.5472" + x2="702.81964" + y2="977.78302" /> + <linearGradient + inkscape:collect="always" + id="linearGradient4991"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop4993" /> + <stop + style="stop-color:#ffffff;stop-opacity:0;" + offset="1" + id="stop4995" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4991" + id="radialGradient4997" + cx="736.5" + cy="640.93073" + fx="736.5" + fy="640.93073" + r="91.964203" + gradientTransform="matrix(1,0,0,0.8097086,0,99.14184)" + gradientUnits="userSpaceOnUse" /> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + id="perspective5883" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3859" + id="linearGradient3873" + x1="352.19498" + y1="451.55289" + x2="106.34038" + y2="658.39594" + gradientUnits="userSpaceOnUse" + gradientTransform="translate(-3.8268196,-1.7394634)" /> + <inkscape:perspective + id="perspective2422" + inkscape:persp3d-origin="372.04724 : 350.78739 : 1" + inkscape:vp_z="744.09448 : 526.18109 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 526.18109 : 1" + sodipodi:type="inkscape:persp3d" /> + <inkscape:perspective + id="perspective2437" + inkscape:persp3d-origin="168.5 : 109.33333 : 1" + inkscape:vp_z="337 : 164 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_x="0 : 164 : 1" + sodipodi:type="inkscape:persp3d" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4669" + id="linearGradient4675" + x1="-20.657925" + y1="-244.41351" + x2="184.57913" + y2="789.61469" + gradientUnits="userSpaceOnUse" + spreadMethod="pad" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4684" + id="linearGradient4690" + x1="52.987782" + y1="-84.148399" + x2="127.02813" + y2="99.500687" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4669" + id="linearGradient5149" + gradientUnits="userSpaceOnUse" + spreadMethod="pad" + x1="-20.657925" + y1="-244.41351" + x2="184.57913" + y2="789.61469" /> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient4991" + id="radialGradient5297" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,0.8097086,0,99.14184)" + cx="736.5" + cy="640.93073" + fx="736.5" + fy="640.93073" + r="91.964203" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4999" + id="linearGradient5299" + gradientUnits="userSpaceOnUse" + x1="698.38525" + y1="245.5472" + x2="702.81964" + y2="977.78302" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4684" + id="linearGradient5301" + gradientUnits="userSpaceOnUse" + x1="52.987782" + y1="-84.148399" + x2="127.02813" + y2="99.500687" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient4684" + id="linearGradient5308" + gradientUnits="userSpaceOnUse" + x1="52.987782" + y1="-84.148399" + x2="127.02813" + y2="99.500687" + gradientTransform="matrix(0.325641,0,0,0.325641,0.2327614,0.2327611)" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient3803" + id="linearGradient3809" + x1="12.663443" + y1="8.5301828" + x2="41.858654" + y2="57.533279" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.507315,0,0,0.507315,-0.2061336,-0.2061349)" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + gridtolerance="10000" + guidetolerance="10" + objecttolerance="10" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="4.6527672" + inkscape:cx="28.248197" + inkscape:cy="59.641316" + inkscape:document-units="px" + inkscape:current-layer="layer2" + showgrid="false" + inkscape:window-width="1680" + inkscape:window-height="1050" + inkscape:window-x="0" + inkscape:window-y="0" + showguides="true" + inkscape:guide-bbox="true" /> + <metadata + id="metadata5880"> + <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>Icône SFL</dc:title> + <dc:date>2009-04-29</dc:date> + <dc:creator> + <cc:Agent> + <dc:title>Jérôme Oufella</dc:title> + </cc:Agent> + </dc:creator> + <dc:rights> + <cc:Agent> + <dc:title>(c) 2009 Savoir-faire Linux inc.</dc:title> + </cc:Agent> + </dc:rights> + <dc:subject> + <rdf:Bag> + <rdf:li>sfl icon</rdf:li> + </rdf:Bag> + </dc:subject> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Circle" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-182.15973,-428.80763)" + style="display:inline"> + <g + style="display:inline" + id="g5868" + transform="matrix(0.325641,0,0,0.325641,46.600177,287.14294)"> + <path + transform="matrix(0.9959566,0,0,1.2202117,1.6861043,-136.53125)" + d="M 602,544.5 A 92.5,75.5 0 1 1 417,544.5 A 92.5,75.5 0 1 1 602,544.5 z" + sodipodi:ry="75.5" + sodipodi:rx="92.5" + sodipodi:cy="544.5" + sodipodi:cx="509.5" + id="path4987" + style="fill:#00252b;fill-opacity:1;fill-rule:evenodd" + sodipodi:type="arc" /> + <path + transform="matrix(0.9200853,0,0,1.1406537,-168.51683,-66.406557)" + d="M 827,521 A 90.5,73 0 1 1 646,521 A 90.5,73 0 1 1 827,521 z" + sodipodi:ry="73" + sodipodi:rx="90.5" + sodipodi:cy="521" + sodipodi:cx="736.5" + id="path4989" + style="opacity:0.83064515;fill:url(#radialGradient5297);fill-opacity:1;fill-rule:evenodd;stroke:url(#linearGradient5299);stroke-width:2.92839932;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" + sodipodi:type="arc" /> + </g> + </g> + <g + inkscape:groupmode="layer" + id="layer3" + inkscape:label="Bg logo" + style="display:inline"> + <path + style="opacity:1;fill:#006f82;fill-opacity:0;fill-rule:evenodd;stroke:#006f82;stroke-width:0.5276075;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" + d="M 5.1199734,31.313113 L 5.1173154,30.101213 L 5.5127844,32.069942 L 5.5084614,30.100608 L 6.1645814,32.018438 L 6.1595994,29.746128 L 6.6874434,32.623577 L 6.8081844,28.230246 L 7.2114134,33.733676 L 7.8485894,27.016728 L 7.9965804,35.045358 L 8.5041554,28.682079 L 8.9050514,33.125098 L 9.1568414,29.034539 L 9.5585124,33.83103 L 9.8035424,26.660233 L 10.606444,36.051231 L 10.319643,24.18513 L 11.78498,38.372215 L 11.362926,24.284506 L 12.567823,38.623479 L 12.013725,23.778538 L 12.821168,35.239864 L 13.065868,27.917573 L 13.472856,35.137862 L 13.974774,26.199305 L 13.991395,33.773664 L 14.622259,24.178465 L 14.516799,35.540215 L 15.146445,25.389554 L 15.435679,38.366558 L 16.184297,23.014637 L 16.351127,39.627541 L 16.962822,21.296569 L 17.266124,40.686532 L 17.742346,20.032962 L 18.050086,41.442746 L 18.39282,19.375509 L 19.095908,42.703533 L 19.05005,21.798295 L 19.613117,40.733395 L 19.83755,24.170383 L 20.260158,38.51057 L 20.494774,26.59317 L 21.170171,37.297257 L 21.278177,27.096914 L 21.691367,37.144964 L 22.06169,27.651156 L 22.601273,35.881161 L 22.323229,28.004223 L 23.382682,35.475979 L 23.107848,29.063422 L 23.897453,32.394928 L 24.094731,16.946127 L 24.809906,32.292524 L 24.891776,14.674351 L 25.331657,32.392707 L 26.069985,16.846516 L 26.153647,41.491058 L 26.850171,15.8847 L 27.178743,42.296221 L 27.398079,14.416507 L 28.339305,45.420135 L 28.169731,14.061839 L 29.114481,46.67275 L 29.180859,12.997786 L 29.798649,47.881815 L 29.721342,12.641996 L 30.573525,48.996553 L 30.503636,12.640783 L 31.759379,50.157304 L 31.832603,24.1013 L 32.306619,48.385256 L 32.227628,25.868046 L 33.443159,49.551416 L 32.880978,26.523482 L 33.381944,49.599341 L 32.589752,12.637552 L 34.643969,48.533417 L 33.11261,13.242692 L 35.304194,47.823676 L 34.326736,13.796859 L 36.466768,47.366524 L 36.243111,13.843792 C 36.243111,13.843792 37.103933,49.644074 37.364147,49.391188 C 37.624353,49.138304 37.938851,14.194636 37.938851,14.194636 L 38.01184,47.465711 L 38.59265,15.052054 L 38.672725,47.059832 L 39.245222,15.354018 L 39.323203,46.405645 L 40.161553,17.018965 L 40.354118,45.36672 L 41.206714,17.976767 L 41.270663,42.630824 L 41.881573,19.44188 L 42.428988,35.741448 L 42.927515,20.754931 L 43.340448,35.183098 L 44.355731,22.521558 L 44.905042,39.680731 L 45.1518,24.296269 L 45.835226,38.665529 L 46.046274,24.996793 L 46.744032,36.897057 L 46.980339,25.752192 L 48.014716,35.28218 L 47.906655,27.468211 L 48.827926,35.884795 L 48.951487,28.27512 L 50.339856,34.371724 L 50.386559,28.673903 L 51.430689,34.625473 L 51.470756,29.429364 L 52.348461,32.446503 L 52.549363,27.652043 L 52.921323,33.357508 L 53.266475,30.382747 C 53.266475,30.382747 53.821576,32.190559 53.821021,31.93808 C 53.820461,31.685604 54.581167,30.833398 54.449769,30.379135 C 54.318395,29.924879 55.003442,31.535832 55.003442,31.535832" + id="path4922" + sodipodi:nodetypes="ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccscccccccccccccccccccccccccccccccccccc" /> + </g> + <g + inkscape:groupmode="layer" + id="layer2" + inkscape:label="Handset" + style="display:inline"> + <path + style="opacity:0.07000002;fill:url(#linearGradient5308);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:12.29699993;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;display:inline" + d="M 29.642218,3.8148121 C 15.421355,4.1755011 3.9979864,15.833578 3.9979864,30.140856 C 3.9979864,34.435543 5.0313494,38.484629 6.8575214,42.067459 C 6.4099894,40.144483 6.1757104,38.14238 6.1757104,36.083805 C 6.1757104,21.549427 17.967377,9.7475851 32.501753,9.7475851 C 42.739962,9.7475841 51.613502,15.606608 55.968259,24.147025 C 53.252498,12.497895 42.79637,3.8148121 30.324029,3.8148121 C 30.096929,3.8148121 29.867945,3.8090871 29.642218,3.8148121 z" + id="path4679" /> + <path + id="path3760" + d="M 44.655469,47.474134 C 44.480416,47.935405 42.667056,49.650138 41.820999,50.154441 L 40.885711,50.711928 L 37.037514,45.696982 L 33.189313,40.682041 L 33.851699,39.995424 C 34.499939,39.323463 36.44502,38.018167 37.077317,37.830787 C 37.351837,37.749431 37.905038,38.399548 41.061017,42.512397 C 43.076715,45.139238 44.694222,47.372021 44.655469,47.474134 z M 25.394446,22.45477 C 25.249806,22.8359 22.961483,24.786714 22.215712,25.164665 L 21.538155,25.508039 L 17.745382,20.476194 L 13.952605,15.444347 L 15.258489,14.367175 C 15.976727,13.774729 16.918592,13.143789 17.351521,12.965082 L 18.138665,12.640164 L 21.812126,17.427387 C 24.275119,20.637141 25.455555,22.293747 25.394446,22.45477 z M 40.205035,51.178837 C 40.180701,51.242851 39.756691,51.5004 39.262793,51.751169 C 35.381446,53.721885 29.143271,51.402061 23.270447,45.80402 C 21.191766,43.822593 16.903782,38.514689 15.209833,35.826137 C 11.940859,30.637789 10.403556,26.281881 10.448868,22.336062 C 10.477147,19.873542 11.28535,17.79576 12.734622,16.459673 L 13.23156,16.001542 L 17.043581,20.895153 L 20.855605,25.788765 L 20.547291,26.322796 C 20.121429,27.060418 20.19846,28.02785 20.800262,29.499813 C 21.55555,31.347187 27.547838,39.152349 29.155469,40.382759 C 30.418804,41.349659 31.195999,41.631933 32.130094,41.46313 L 32.79155,41.343595 L 36.520414,46.203025 C 38.57129,48.875713 40.229372,51.114823 40.205035,51.178837 z" + style="opacity:0.32000002;fill:#000000;fill-opacity:1" /> + <path + style="fill:#dfdfdf;fill-opacity:1" + d="M 46.477547,45.652056 C 46.302494,46.113327 44.489134,47.82806 43.643077,48.332363 L 42.707789,48.889851 L 38.859591,43.874904 L 35.011391,38.859963 L 35.673777,38.173347 C 36.322017,37.501386 38.267097,36.196088 38.899395,36.008709 C 39.173915,35.927353 39.727116,36.577471 42.883095,40.69032 C 44.898792,43.317161 46.516299,45.549944 46.477547,45.652056 z M 27.216524,20.632693 C 27.071884,21.013822 24.783561,22.964636 24.037791,23.342587 L 23.360233,23.68596 L 19.567459,18.654116 L 15.774683,13.622269 L 17.080566,12.545097 C 17.798805,11.952651 18.74067,11.321711 19.173599,11.143005 L 19.960743,10.818085 L 23.634203,15.60531 C 26.097197,18.815064 27.277633,20.471669 27.216524,20.632693 z M 42.027113,49.356759 C 42.002779,49.420772 41.578769,49.678319 41.084871,49.929092 C 37.203524,51.899808 30.965348,49.579982 25.092524,43.981942 C 23.013844,42.000514 18.72586,36.692611 17.031911,34.004059 C 13.762936,28.815711 12.225634,24.459803 12.270946,20.513984 C 12.299225,18.051464 13.107429,15.973682 14.5567,14.637595 L 15.053638,14.179464 L 18.865659,19.073076 L 22.677682,23.966688 L 22.369368,24.500718 C 21.943507,25.23834 22.020538,26.205773 22.62234,27.677735 C 23.377627,29.525109 29.369916,37.330271 30.977547,38.560681 C 32.240882,39.527582 33.018077,39.809855 33.952171,39.641052 L 34.613628,39.521517 L 38.342492,44.380947 C 40.393368,47.053635 42.05145,49.292746 42.027113,49.356759 z" + id="path3218" /> + <g + transform="matrix(0.3036796,0,0,0.3036796,-53.920882,-127.4775)" + id="g3787" + style="fill:#ffffff;fill-opacity:0"> + <path + id="path3789" + d="M 324.6064,576.10592 C 324.02996,577.62486 318.05867,583.27138 315.27265,584.93202 L 312.1928,586.7678 L 299.5209,570.25386 L 286.84899,553.73994 L 289.03019,551.47895 C 291.16481,549.26622 297.56985,544.96795 299.65197,544.35092 C 300.55595,544.08302 302.37761,546.22382 312.77007,559.7672 C 319.40765,568.41724 324.73401,575.76967 324.6064,576.10592 z M 261.18093,493.71856 C 260.70464,494.9736 253.16932,501.39752 250.71354,502.64209 L 248.48238,503.7728 L 235.99299,487.20322 L 223.50359,470.63363 L 227.80379,467.08656 C 230.16891,465.13567 233.27042,463.05802 234.69603,462.46955 L 237.28805,461.39961 L 249.38455,477.16367 C 257.49505,487.73321 261.38216,493.18832 261.18093,493.71856 z M 309.95137,588.3053 C 309.87124,588.51609 308.475,589.36418 306.84862,590.18996 C 294.06756,596.67941 273.5256,589.04036 254.18672,570.60633 C 247.34174,564.0816 233.22165,546.60297 227.64357,537.74972 C 216.87902,520.66478 211.81677,506.32102 211.96598,493.32766 C 212.0591,485.21872 214.72047,478.3767 219.49284,473.97704 L 221.12923,472.46844 L 233.682,488.58283 L 246.23478,504.69722 L 245.21952,506.45575 C 243.81718,508.8847 244.07084,512.0704 246.05254,516.91749 C 248.53966,523.00079 268.27193,548.70275 273.56577,552.75442 C 277.72586,555.93837 280.28512,556.86788 283.36104,556.31202 L 285.53918,555.9184 L 297.81812,571.92023 C 304.57154,580.72124 310.03151,588.09451 309.95137,588.3053 z" + style="opacity:0.32000002;fill:#ffffff;fill-opacity:0" /> + <path + style="fill:#ffffff;fill-opacity:0" + d="M 330.6064,570.10592 C 330.02996,571.62486 324.05867,577.27138 321.27265,578.93202 L 318.1928,580.7678 L 305.5209,564.25386 L 292.84899,547.73994 L 295.03019,545.47895 C 297.16481,543.26622 303.56985,538.96795 305.65197,538.35092 C 306.55595,538.08302 308.37761,540.22382 318.77007,553.7672 C 325.40765,562.41724 330.73401,569.76967 330.6064,570.10592 z M 267.18093,487.71856 C 266.70464,488.9736 259.16932,495.39752 256.71354,496.64209 L 254.48238,497.7728 L 241.99299,481.20322 L 229.50359,464.63363 L 233.80379,461.08656 C 236.16891,459.13567 239.27042,457.05802 240.69603,456.46955 L 243.28805,455.39961 L 255.38455,471.16367 C 263.49505,481.73321 267.38216,487.18832 267.18093,487.71856 z M 315.95137,582.3053 C 315.87124,582.51609 314.475,583.36418 312.84862,584.18996 C 300.06756,590.67941 279.5256,583.04036 260.18672,564.60633 C 253.34174,558.0816 239.22165,540.60297 233.64357,531.74972 C 222.87902,514.66478 217.81677,500.32102 217.96598,487.32766 C 218.0591,479.21872 220.72047,472.3767 225.49284,467.97704 L 227.12923,466.46844 L 239.682,482.58283 L 252.23478,498.69722 L 251.21952,500.45575 C 249.81718,502.8847 250.07084,506.0704 252.05254,510.91749 C 254.53966,517.00079 274.27193,542.70275 279.56577,546.75442 C 283.72586,549.93837 286.28512,550.86788 289.36104,550.31202 L 291.53918,549.9184 L 303.81812,565.92023 C 310.57154,574.72124 316.03151,582.09451 315.95137,582.3053 z" + id="path3791" /> + </g> + <path + style="fill:url(#linearGradient3809);fill-opacity:1;stroke:none" + d="M 19.959634,10.812111 L 19.166955,11.145037 C 18.734026,11.323743 17.792519,11.947707 17.074281,12.540153 L 15.774286,13.618197 L 19.563295,18.659639 L 21.576701,21.323043 C 22.41762,19.694995 23.432459,18.196578 24.57303,16.836476 C 24.268481,16.434556 23.99655,16.067589 23.637668,15.599896 L 19.959634,10.812111 z M 15.060874,14.173073 L 14.553559,14.632827 C 13.104288,15.968914 12.29892,18.051991 12.270643,20.51451 C 12.225331,24.460329 13.757746,28.817569 17.02672,34.005916 C 17.474411,34.71647 18.112629,35.60749 18.83403,36.574198 C 18.726964,35.591093 18.65964,34.593474 18.65964,33.577869 C 18.65964,29.425329 19.571357,25.50693 21.196214,22.084015 L 18.865736,19.071833 L 15.060874,14.173073 z" + id="path3798" /> + </g> +</svg> diff --git a/sflphone-client-gnome/src/config/configwindow.c b/sflphone-client-gnome/src/config/configwindow.c index 951082084a1dd50f908fcf12e60f17bc45629243..e120047410dc5172d7af4cd2606db6737aaf10b7 100644 --- a/sflphone-client-gnome/src/config/configwindow.c +++ b/sflphone-client-gnome/src/config/configwindow.c @@ -498,7 +498,7 @@ void update_registration( void ) GtkWidget* create_stun_tab() { GtkWidget * tableNat; - gchar * stun_server= "stun.ekiga.net:3478"; + gchar * stun_server= "stun.sflphone.org:3478"; gchar * stun_enabled = "FALSE"; GtkWidget * label; diff --git a/sflphone-client-gnome/src/contacts/calltree.c b/sflphone-client-gnome/src/contacts/calltree.c index 01d6d6960dceda42824aebb60085a45ebf541662..6c6e771dc308c92c1584a30e9b7c033c0b2b6220 100644 --- a/sflphone-client-gnome/src/contacts/calltree.c +++ b/sflphone-client-gnome/src/contacts/calltree.c @@ -31,6 +31,8 @@ GtkCellRenderer *rend; GtkTreeViewColumn *col; GtkTreeSelection *sel; + + /** * Show popup menu */ @@ -450,6 +452,9 @@ calltree_add_call (calltab_t* tab, call_t * c) GdkPixbuf *pixbuf=NULL; GtkTreeIter iter; GtkTreeSelection* sel; + GtkTreeModel *model; + GtkTreePath *path; + // New call in the list gchar * description; @@ -460,6 +465,7 @@ calltree_add_call (calltab_t* tab, call_t * c) gtk_list_store_prepend (tab->store, &iter); + if( tab == current_calls ) { switch(c->state) @@ -506,7 +512,7 @@ calltree_add_call (calltab_t* tab, call_t * c) WARN ("This widget doesn't exist - This is a bug in the application."); } - + //Resize it if(pixbuf) { @@ -521,12 +527,17 @@ calltree_add_call (calltab_t* tab, call_t * c) 2, c, // Pointer -1); + if (pixbuf != NULL) g_object_unref(G_OBJECT(pixbuf)); - sel = gtk_tree_view_get_selection(GTK_TREE_VIEW(tab->view)); - gtk_tree_selection_select_iter(GTK_TREE_SELECTION(sel), &iter); + + gtk_tree_view_set_model(GTK_TREE_VIEW(tab->view), GTK_TREE_MODEL(tab->store)); + + gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(tab->view)), &iter); + toolbar_update_buttons(); + } void calltree_display (calltab_t *tab) { diff --git a/sflphone-client-gnome/src/sflnotify.c b/sflphone-client-gnome/src/sflnotify.c index 4021a044f0228a08943e4f1dd6778d88039a43b9..882aeb5407b90c4e21a05c3d444872204f5912a7 100644 --- a/sflphone-client-gnome/src/sflnotify.c +++ b/sflphone-client-gnome/src/sflnotify.c @@ -19,124 +19,94 @@ #include <sflnotify.h> -static NotifyNotification *notification; +GnomeNotification *_gnome_notification; - void -notify_incoming_call( call_t* c ) +void create_new_gnome_notification (gchar *title, gchar *body, NotifyUrgency urgency, gint timeout, GnomeNotification **notif) { - if( dbus_get_notify()){ + GnomeNotification *_notif; - GdkPixbuf *pixbuf; - gchar* callerid; - gchar* title; - notify_init("sflphone"); + if( dbus_get_notify()){ - if (g_strcasecmp (c->accountID,"") == 0) { - title = g_markup_printf_escaped ("IP-to-IP call"); - } - else { - title = g_markup_printf_escaped(_("%s account: %s") , - (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_TYPE) , - (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_ALIAS) ) ; - } - callerid = g_markup_printf_escaped(_("<i>From:</i> %s") , c->from); + _notif = g_new0 (GnomeNotification, 1); - pixbuf = gdk_pixbuf_new_from_file(ICONS_DIR "/ring.svg", NULL); + notify_init ("SFLphone"); - notification = notify_notification_new( title, - callerid, - NULL, - NULL); - notify_notification_set_urgency( notification , NOTIFY_URGENCY_CRITICAL ); - notify_notification_set_icon_from_pixbuf (notification, pixbuf); + // Set struct fields + _notif->notification = notify_notification_new (title, body, NULL, NULL); + //_notif->icon = gdk_pixbuf_new_from_file_at_size (LOGO, 120, 120, NULL); + _notif->icon = gdk_pixbuf_new_from_file (LOGO_SMALL, NULL); #if GTK_CHECK_VERSION(2,10,0) - notify_notification_attach_to_status_icon( notification , get_status_icon() ); + notify_notification_attach_to_status_icon (_notif->notification , get_status_icon() ); #endif - notify_notification_set_timeout( notification , (( g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER )); - g_object_set_data( G_OBJECT( notification ) , "call" , c ); - notify_notification_add_action( notification , "accept" , _("Accept") , (NotifyActionCallback) answer_call_cb , NULL, NULL ); - notify_notification_add_action( notification , "refuse" , _("Refuse") , (NotifyActionCallback) refuse_call_cb , NULL , NULL ); - notify_notification_add_action( notification , "ignore" , _("Ignore") , (NotifyActionCallback) ignore_call_cb , NULL , NULL ); - if (!notify_notification_show (notification, NULL)) { + notify_notification_set_urgency (_notif->notification, urgency); + + if (_notif->icon != NULL) + notify_notification_set_icon_from_pixbuf (_notif->notification, _notif->icon); + else + ERROR ("notify(), cannot load notification icon"); + + notify_notification_set_timeout (_notif->notification, timeout); + + if (!notify_notification_show (_notif->notification, NULL)) { ERROR("notify(), failed to send notification"); } + + *notif = _notif; } } - void -answer_call_cb( NotifyNotification *notification, gpointer data UNUSED ) -{ - call_t* c = (call_t*)g_object_get_data( G_OBJECT( notification ) , "call" ); - c->history_state = INCOMING; - calltree_update_call( history , c ); - dbus_accept(c); -#if GTK_CHECK_VERSION(2,10,0) - if( __POPUP_WINDOW ) - status_icon_unminimize(); -#endif - g_object_unref( notification ); -} - void -refuse_call_cb( NotifyNotification *notification, gpointer data UNUSED) -{ - call_t* c = (call_t*)g_object_get_data( G_OBJECT( notification ) , "call" ); - dbus_refuse(c); - g_object_unref( notification ); -} void -ignore_call_cb( NotifyNotification *notification, gpointer data UNUSED) +notify_incoming_call (call_t* c) { - g_object_unref( notification ); + + gchar* callerid; + gchar* title; + + if (g_strcasecmp (c->accountID,"") == 0) { + title = g_markup_printf_escaped ("IP-to-IP call"); + } + else { + title = g_markup_printf_escaped(_("%s account: %s") , + (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_TYPE) , + (gchar*)g_hash_table_lookup(account_list_get_by_id(c->accountID)->properties , ACCOUNT_ALIAS) ) ; + } + callerid = g_markup_printf_escaped(_("<i>From:</i> %s") , c->from); + + create_new_gnome_notification (title, + callerid, + NOTIFY_URGENCY_CRITICAL, + (g_strcasecmp(__TIMEOUT_MODE, "default") == 0 )? __TIMEOUT_TIME : NOTIFY_EXPIRES_NEVER, + &_gnome_notification); } void -notify_voice_mails( guint count , account_t* acc ) +notify_voice_mails (guint count, account_t* acc) { - - if( dbus_get_mail_notify()) { // the account is different from NULL - GdkPixbuf *pixbuf; gchar* title; gchar* body; - notify_init("sflphone"); title = g_markup_printf_escaped(_("%s account: %s") , (gchar*)g_hash_table_lookup(acc->properties , ACCOUNT_TYPE) , (gchar*) g_hash_table_lookup(acc->properties , ACCOUNT_ALIAS) ) ; body = g_markup_printf_escaped(_("%d voice mails"), count); - pixbuf = gdk_pixbuf_new_from_file(LOGO, NULL); - - notification = notify_notification_new( title, - body, - NULL, - NULL); - notify_notification_set_urgency( notification , NOTIFY_URGENCY_LOW ); - notify_notification_set_icon_from_pixbuf (notification, pixbuf); -#if GTK_CHECK_VERSION(2,10,0) - notify_notification_attach_to_status_icon( notification , get_status_icon() ); -#endif - notify_notification_set_timeout( notification , NOTIFY_EXPIRES_DEFAULT ); - notify_notification_add_action( notification , "ignore" , _("Ignore") , (NotifyActionCallback) ignore_call_cb , NULL , NULL ); - - if (!notify_notification_show (notification, NULL)) { - ERROR("notify(), failed to send notification"); - } - } + create_new_gnome_notification (title, + body, + NOTIFY_URGENCY_LOW, + NOTIFY_EXPIRES_DEFAULT, + &_gnome_notification); } void -notify_current_account( account_t* acc ) +notify_current_account (account_t* acc) { - if( dbus_get_notify()){ // the account is different from NULL - GdkPixbuf *pixbuf; gchar* title; gchar* body=""; - notify_init("sflphone"); body = g_markup_printf_escaped(_("Calling with %s account <i>%s</i>") , (gchar*)g_hash_table_lookup( acc->properties , ACCOUNT_TYPE) , @@ -144,109 +114,69 @@ notify_current_account( account_t* acc ) title = g_markup_printf_escaped(_("Current account")); - pixbuf = gdk_pixbuf_new_from_file(LOGO, NULL); - - notification = notify_notification_new( title, - body, - NULL, - NULL); - notify_notification_set_urgency( notification , NOTIFY_URGENCY_NORMAL ); - notify_notification_set_icon_from_pixbuf (notification, pixbuf); -#if GTK_CHECK_VERSION(2,10,0) - notify_notification_attach_to_status_icon( notification , get_status_icon() ); -#endif - notify_notification_set_timeout( notification , NOTIFY_EXPIRES_DEFAULT ); - notify_notification_add_action( notification , "ignore" , _("Ignore") , (NotifyActionCallback) ignore_call_cb , NULL , NULL ); - - if (!notify_notification_show (notification, NULL)) { - ERROR("notify(), failed to send notification"); - } - } + create_new_gnome_notification (title, + body, + NOTIFY_URGENCY_NORMAL, + NOTIFY_EXPIRES_DEFAULT, + &_gnome_notification); } + void -notify_no_accounts( ) +notify_no_accounts () { - GdkPixbuf *pixbuf; gchar* title; gchar* body=""; - notify_init("sflphone"); body = g_markup_printf_escaped(_("You haven't setup any accounts")); - title = g_markup_printf_escaped(_("Error")); - pixbuf = gdk_pixbuf_new_from_file(LOGO, NULL); - - notification = notify_notification_new( title, - body, - NULL, - NULL); - notify_notification_set_urgency( notification , NOTIFY_URGENCY_CRITICAL ); - notify_notification_set_icon_from_pixbuf (notification, pixbuf); -#if GTK_CHECK_VERSION(2,10,0) - notify_notification_attach_to_status_icon( notification , get_status_icon() ); -#endif - notify_notification_set_timeout( notification , NOTIFY_EXPIRES_DEFAULT ); - //notify_notification_add_action( notification , "setup" , _("Setup Accounts") , (NotifyActionCallback) setup_accounts_cb , NULL , NULL ); - - if (!notify_notification_show (notification, NULL)) { - ERROR("notify(), failed to send notification"); - } + create_new_gnome_notification (title, + body, + NOTIFY_URGENCY_CRITICAL, + NOTIFY_EXPIRES_DEFAULT, + &_gnome_notification); } - void -setup_accounts_cb( NotifyNotification *notification, gpointer data UNUSED) -{ - //gtk_widget_set_parent( show_accounts_window() , GTK_WIDGET(get_main_window())); - show_accounts_window(); - g_object_unref( notification ); -} void -notify_no_registered_accounts( ) +notify_no_registered_accounts () { - GdkPixbuf *pixbuf; gchar* title; gchar* body=""; - notify_init("sflphone"); - body = g_markup_printf_escaped(_("You have no registered accounts")); - - title = g_markup_printf_escaped(_("Error")); - pixbuf = gdk_pixbuf_new_from_file(LOGO, NULL); - - notification = notify_notification_new( title, - body, - NULL, - NULL); - notify_notification_set_urgency( notification , NOTIFY_URGENCY_CRITICAL ); - notify_notification_set_icon_from_pixbuf (notification, pixbuf); -#if GTK_CHECK_VERSION(2,10,0) - notify_notification_attach_to_status_icon( notification , get_status_icon() ); -#endif - notify_notification_set_timeout( notification , NOTIFY_EXPIRES_DEFAULT ); - //notify_notification_add_action( notification , "setup" , _("Setup Accounts") , (NotifyActionCallback) setup_accounts_cb , NULL , NULL ); - - if (!notify_notification_show (notification, NULL)) { - ERROR("notify(), failed to send notification"); - } - + create_new_gnome_notification (title, + body, + NOTIFY_URGENCY_CRITICAL, + NOTIFY_EXPIRES_DEFAULT, + &_gnome_notification); } void stop_notification( void ) { - if( notification != NULL ) + /* + if( _gnome_notification != NULL ) { - if(notify_notification_show( notification , NULL)) + if(_gnome_notification->notification != NULL) { - notify_notification_close( notification , NULL); - g_object_unref( notification ); - notification = NULL; + notify_notification_close (_gnome_notification->notification, NULL); + g_object_unref(_gnome_notification->notification ); + _gnome_notification->notification = NULL; } - notification = NULL; - } + free_notification (_gnome_notification); + }*/ +} + +/** + * Freeing a notification instance + */ +void free_notification (GnomeNotification *g) +{ + g_free(g->title); + g_free(g->body); + g_free(g->notification); + g_free(g); } diff --git a/sflphone-client-gnome/src/sflnotify.h b/sflphone-client-gnome/src/sflnotify.h index 6131322b445326a68b60114d1c849d5a020ad208..1f0fdff962ba1c3b8028a036d79ca90a5cc3cdf9 100644 --- a/sflphone-client-gnome/src/sflnotify.h +++ b/sflphone-client-gnome/src/sflnotify.h @@ -17,9 +17,8 @@ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ - -#ifndef __SFL_NOTIFY_H__ -#define __SFL_NOTIFY_H__ +#ifndef __GNOME_NOTIFICATION_H__ +#define __GNOME_NOTIFICATION_H__ /** @file sflnotify.h * @brief Implements desktop notification for incoming events. @@ -29,11 +28,22 @@ #include <accountlist.h> #include <calllist.h> #include <dbus/dbus.h> -#include <actions.h> #include <statusicon.h> -#include <configwindow.h> #include <sflphone_const.h> +G_BEGIN_DECLS + +typedef struct { + NotifyNotification *notification; + gchar *title; + gchar *body; + GdkPixbuf *icon; +} GnomeNotification; + +void create_new_gnome_notification (gchar *title, gchar *body, NotifyUrgency urgency, gint timeout, GnomeNotification **notif); + +void free_notification (GnomeNotification *g); + /** * Notify an incoming call * A dialog box is attached to the status icon @@ -65,41 +75,11 @@ void notify_no_accounts( ); */ void notify_no_registered_accounts( ); -/** - * Callback when answer button is pressed. - * Action associated: Pick up the incoming call - * @param notification The pointer on the notification structure - * @param data The data associated. Here: call_t* - */ -void answer_call_cb( NotifyNotification *notification, gpointer data ); - -/** - * Callback when refuse button is pressed - * Action associated: Hang up the incoming call - * @param notification The pointer on the notification structure - * @param data The data associated. Here: call_t* - */ -void refuse_call_cb( NotifyNotification *notification, gpointer data ); - -/** - * Callback when ignore button is pressed - * Action associated: Nothing - The call continues ringing - * @param notification The pointer on the notification structure - * @param data The data associated. Here: call_t* - */ -void ignore_call_cb( NotifyNotification *notification, gpointer data ); - -/** - * Callback when you try to make a call without accounts setup and 'setup account' button is clicked. - * Action associated: Open the account window - * @param notification The pointer on the notification structure - * @param data The data associated. Here: account_t* - */ -void setup_accounts_cb(NotifyNotification *notification, gpointer data); - /** * Stop and close the current notification if an action occured before the timeout */ void stop_notification( void ); +G_END_DECLS + #endif diff --git a/sflphone-client-gnome/src/sflphone_const.h b/sflphone-client-gnome/src/sflphone_const.h index 9a86a86fa46c6bcd437d7f862d102a55f156364c..9ae9bbb696a50aa3a6b8207c7f5a8f30ab0dd8e3 100644 --- a/sflphone-client-gnome/src/sflphone_const.h +++ b/sflphone-client-gnome/src/sflphone_const.h @@ -28,8 +28,8 @@ * @brief Contains the global variables for the client code */ - -#define LOGO ICONS_DIR "/sflphone.svg" +#define LOGO ICONS_DIR "/sflphone.svg" +#define LOGO_SMALL ICONS_DIR "/sflphone_small.svg" /** Locale */ #define _(STRING) gettext( STRING ) diff --git a/sflphone-common/Makefile.am b/sflphone-common/Makefile.am index f774bdf57cdde3095aa6082adb35b7f09a5c383c..ffd473d7d1fb1878fcc9cc46d7505db095930206 100644 --- a/sflphone-common/Makefile.am +++ b/sflphone-common/Makefile.am @@ -1,14 +1,21 @@ # Makefile.am +if BUILD_TEST +TESTS_DIR=test unittest: @(cd test; make) @echo "" @echo "NOTICE: Unitary tests successfully build" @echo "Go in the test directory to run them" @echo "" +else +unittest: + @echo "SFLphone WARNING:" + @echo " -- You need the cppunit devel package to compile the unitary tests." +endif ACLOCAL_AMFLAGS = -I m4 -SUBDIRS = libs src ringtones po man test +SUBDIRS = libs src ringtones po man $(TESTS_DIR) EXTRA_DIST = m4/*.m4 tools/*.sh platform/* images/* README.gentoo diff --git a/sflphone-common/configure.ac b/sflphone-common/configure.ac index f46555b486de00e632af13b36312bd5c0ec7f286..69f2bcf1ff60155866443a426b88423595a9df18 100644 --- a/sflphone-common/configure.ac +++ b/sflphone-common/configure.ac @@ -267,11 +267,9 @@ AC_ARG_WITH(build-libdbus-cxx, ) AC_SUBST(BUILD_LIBDBUS_CXX_DIR) - - dnl Check for libcppunit-dev CPPUNIT_MIN_VERSION=1.12 -PKG_CHECK_MODULES(CPPUNIT, cppunit >= ${CPPUNIT_MIN_VERSION}) +PKG_CHECK_MODULES(CPPUNIT, cppunit >= ${CPPUNIT_MIN_VERSION}, AM_CONDITIONAL(BUILD_TEST, test 1 = 1 ), AM_CONDITIONAL(BUILD_TEST, test 0 = 1 )) AC_SUBST(CPPUNIT_LIBS) # check for libgsm1 (doesn't use pkg-config) diff --git a/sflphone-common/debian/changelog b/sflphone-common/debian/changelog index ae1afff28ea3437334059fd994efc191179dac4a..47f26ef31facee903e1b9dca085f04a3d55eb3ae 100644 --- a/sflphone-common/debian/changelog +++ b/sflphone-common/debian/changelog @@ -1,7 +1,30 @@ -sflphone-common (0.9.5-SYSVER~snapshot1242399317) SYSTEM; urgency=low +sflphone-common (0.9.5-SYSVER~snapshot1242878510) SYSTEM; urgency=low - ** SNAPSHOT 1242399317 ** + ** SNAPSHOT 1242878510 ** + * [#1403] Add smaller icon for gnome notifications + * [#1403] Prevent crash when hangup && no notification + * [#1403] Remove all actions on notifications; code refactoring + * [#1451] Use stun.sflphone.org as default STUN server + * [#1456] Add a flag to be replaced in the control files + * [#1454] Make cppunit optional; remove from build deps in control + files + * [#1401] Add libexpat1-dev dependency in control files + + -- SFLphone Automatic Build System <team@sflphone.org> Thu, 21 May 2009 00:01:54 -0400 + +sflphone-common (0.9.5-SYSVER~rc2) SYSTEM; urgency=low + + ** 0.9.5 rc2 ** + + * [#1422] Improved error message + * [#1402] Fix pjsip build + * [#1404] Clear GTK-Critical Bug at client startup + * [#1422] Added automatic VM shutdown when building on more than one + VM + * [#1422] Fixed some issues with new changelog generation script + * [#1422] Moved distribution update to specific file + * [#1422] Dropped git-dch, replace by home made implementation * Changes for name based dbus connection * Clean changelogs * [#1343] Gnome: Implement a callback system to handle focus on @@ -24,6 +47,7 @@ sflphone-common (0.9.5-SYSVER~snapshot1242399317) SYSTEM; urgency=low * [#1407] Add a scenario to pick_up action * Test client dbus connection to a fixed owner * Add python dbus test suite + * [#1161] Modified version handling in build system * [#1314] Test pulse audio and audio streams connect and disconnect * [#1402] Add info message after configure * [#1402] Build the daemon with the local pjsip library (vs the @@ -34,10 +58,12 @@ sflphone-common (0.9.5-SYSVER~snapshot1242399317) SYSTEM; urgency=low * [#1314] Refactoring of pulselayer to test conect/disconnect * Add debug messages in debus calls concerning account * [#1314] Add some return values to audio init functions + * [#1406] add liblog4c-dev in build-depends + * [#1409] Restore .desktop icon * Bug #1405: Fix strings as requested. * Bug #1404: Fix strings in preferences panel. - -- SFLphone Automatic Build System <team@sflphone.org> Fri, 15 May 2009 10:55:31 -0400 + -- SFLphone Automatic Build System <team@sflphone.org> Tue, 19 May 2009 12:08:03 -0400 sflphone-common (0.9.5-0ubuntu1~rc1) SYSTEM; urgency=low diff --git a/sflphone-common/debian/control.hardy b/sflphone-common/debian/control.hardy index a8e21760384ceb2d7f09614be3772d84c6f4c942..e14674d170b6caa6f4bac6d1118e5d1a336a88f6 100644 --- a/sflphone-common/debian/control.hardy +++ b/sflphone-common/debian/control.hardy @@ -2,7 +2,7 @@ Source: sflphone-common Maintainer: SavoirFaireLinux Inc <emmanuel.milou@savoirfairelinux.com> Section: gnome Priority: optional -Build-Depends: debhelper (>= 5), libgcc1, autoconf, automake, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libcppunit-dev, libgsm1-dev, libspeex-dev, libtool, libdbus-1-dev, libasound2-dev, uuid-dev +Build-Depends: debhelper (>= 5), libgcc1, autoconf, automake, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libgsm1-dev, libspeex-dev, libtool, libdbus-1-dev, libasound2-dev, uuid-dev, libexpat1-dev Standards-Version: 3.7.3 Package: sflphone-common diff --git a/sflphone-common/debian/control.intrepid b/sflphone-common/debian/control.intrepid index 7376cb3ebc957cc3792790236073cbfb8da6e03e..270e67811229719df9e000fd3a0871e30b9c675a 100644 --- a/sflphone-common/debian/control.intrepid +++ b/sflphone-common/debian/control.intrepid @@ -2,7 +2,7 @@ Source: sflphone-common Maintainer: SavoirFaireLinux Inc <emmanuel.milou@savoirfairelinux.com> Section: gnome Priority: optional -Build-Depends: debhelper (>= 5), libgcc1 , autoconf, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libcppunit-dev, libgsm1-dev, libspeex-dev, libtool, libdbus-1-dev, libasound2-dev, libspeexdsp-dev, uuid-dev +Build-Depends: debhelper (>= 5), libgcc1 , autoconf, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libgsm1-dev, libspeex-dev, libtool, libdbus-1-dev, libasound2-dev, libspeexdsp-dev, uuid-dev, libexpat1-dev Standards-Version: 3.8.0 Package: sflphone-common diff --git a/sflphone-common/debian/control.jaunty b/sflphone-common/debian/control.jaunty index 67dc4c90701f7313966ac891f7cc84559ac278c5..f871e07e758e0ce60d07488c106de092517de54e 100644 --- a/sflphone-common/debian/control.jaunty +++ b/sflphone-common/debian/control.jaunty @@ -2,7 +2,7 @@ Source: sflphone-common Maintainer: SavoirFaireLinux Inc <emmanuel.milou@savoirfairelinux.com> Section: gnome Priority: optional -Build-Depends: debhelper (>= 5), libgcc1 , autoconf, automake, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libcppunit-dev, libgsm1-dev, libspeex-dev, libtool, libdbus-1-dev, libasound2-dev, libspeexdsp-dev, uuid-dev +Build-Depends: debhelper (>= 5), libgcc1 , autoconf, automake, libpulse-dev, libsamplerate0-dev, libcommoncpp2-dev, libccrtp-dev, libgsm1-dev, libspeex-dev, libtool, libdbus-1-dev, libasound2-dev, libspeexdsp-dev, uuid-dev, libexpat1-dev Standards-Version: 3.7.3 Package: sflphone-common diff --git a/sflphone-common/po/de.po b/sflphone-common/po/de.po index f0e8f4fd94452609c1e1c2cbc8c59b721a92c686..5a1104c6c3bb253d4433e27dd1f0b7e7ee0d05fe 100644 --- a/sflphone-common/po/de.po +++ b/sflphone-common/po/de.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: sflphone\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-05 17:03-0400\n" +"POT-Creation-Date: 2009-05-05 17:43-0400\n" "PO-Revision-Date: 2009-01-08 10:46-0500\n" "Last-Translator: Sven Werlen <sven.werlen@savoirfairelinux.com>\n" "Language-Team: SavoirFaire Linux Inc <sflphoneteam@savoirfairelinux.com>\n" @@ -438,8 +438,8 @@ msgid "_Show main window" msgstr "_Hauptfenster anzeigen" #: ../../sflphone-client-gnome/src/statusicon.c:124 -#, c-format -msgid "SFLphone - %i accounts registered" +#, fuzzy, c-format +msgid "SFLphone - %i accounts configured" msgstr "SFLphone - %i Konten registriert" #: ../../sflphone-client-gnome/src/timestamp.c:46 diff --git a/sflphone-common/po/es.po b/sflphone-common/po/es.po index 867ee386d22d2588b897f88fc91ec32c9757a0f4..065a1d431eefe193243ae2366ce8a9c88b4035cb 100644 --- a/sflphone-common/po/es.po +++ b/sflphone-common/po/es.po @@ -9,7 +9,7 @@ msgid "" msgstr "" "Project-Id-Version: SFLphone 0.9.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-05 17:03-0400\n" +"POT-Creation-Date: 2009-05-05 17:43-0400\n" "PO-Revision-Date: 2008-08-11 11:53+0200\n" "Last-Translator: Maxime Chambreuil <maxime.chambreuil@savoirfairelinux.com>\n" "Language-Team: SavoirFaireLinux Inc <sflphoneteam@savoirfairelinux.com>\n" @@ -435,8 +435,8 @@ msgid "_Show main window" msgstr "Mostrar ventana principal" #: ../../sflphone-client-gnome/src/statusicon.c:124 -#, c-format -msgid "SFLphone - %i accounts registered" +#, fuzzy, c-format +msgid "SFLphone - %i accounts configured" msgstr "SFLphone - %i cuenta registrada" #: ../../sflphone-client-gnome/src/timestamp.c:46 diff --git a/sflphone-common/po/ru.po b/sflphone-common/po/ru.po index 97ddd36c6d4d4c6f82659e6acdf0d54093d5cc2b..109c66c9b80adeb83c9385990a4865295f60004c 100644 --- a/sflphone-common/po/ru.po +++ b/sflphone-common/po/ru.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: SFLphone 0.9.4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-05 17:03-0400\n" +"POT-Creation-Date: 2009-05-05 17:43-0400\n" "PO-Revision-Date: 2009-01-08 15:19 GMT-5\n" "Last-Translator: HUSSEIN ABDALLAH <hussein.abdallah@savoirfairelinux.com>\n" "Language-Team: Savoir-Faire Linux Inc <sflphoneteam@savoirfairelinux.com>\n" @@ -432,8 +432,8 @@ msgid "_Show main window" msgstr "_Показать главное окно" #: ../../sflphone-client-gnome/src/statusicon.c:124 -#, c-format -msgid "SFLphone - %i accounts registered" +#, fuzzy, c-format +msgid "SFLphone - %i accounts configured" msgstr "SFLphone - Зарегистрировано %i аккаунтов" #: ../../sflphone-client-gnome/src/timestamp.c:46 diff --git a/sflphone-common/po/zh_CN.po b/sflphone-common/po/zh_CN.po index 08199ce8b25656394c0112db295af5feffb8303b..0cfb2ca145f72e76b3f53cb96672438368c3d5bb 100644 --- a/sflphone-common/po/zh_CN.po +++ b/sflphone-common/po/zh_CN.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: SFLphone 0.9.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-05 17:03-0400\n" +"POT-Creation-Date: 2009-05-05 17:43-0400\n" "PO-Revision-Date: 2008-10-28 14:15\n" "Last-Translator: Yun Liu <yun.liu@savoirfairelinux.com>\n" "Language-Team: SavoirFaireLinux Inc <sflphoneteam@savoirfairelinux.com>\n" @@ -432,8 +432,8 @@ msgid "_Show main window" msgstr "显示主窗口(S)" #: ../../sflphone-client-gnome/src/statusicon.c:124 -#, c-format -msgid "SFLphone - %i accounts registered" +#, fuzzy, c-format +msgid "SFLphone - %i accounts configured" msgstr "SFLphone - %i 个帐户已注册" #: ../../sflphone-client-gnome/src/timestamp.c:46 diff --git a/sflphone-common/po/zh_HK.po b/sflphone-common/po/zh_HK.po index 96b6be28b4014d748ba3fceb2ad5aa1096cdb7fa..fa7d301e6528165bd73e5d413cc186380675c7b5 100644 --- a/sflphone-common/po/zh_HK.po +++ b/sflphone-common/po/zh_HK.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: SFLphone 0.9.2\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-05-05 17:03-0400\n" +"POT-Creation-Date: 2009-05-05 17:43-0400\n" "PO-Revision-Date: 2008-10-28 14:15\n" "Last-Translator: Yun Liu <yun.liu@savoirfairelinux.com>\n" "Language-Team: SavoirFaireLinux Inc <sflphoneteam@savoirfairelinux.com>\n" @@ -431,8 +431,8 @@ msgid "_Show main window" msgstr "顯示主窗口(S)" #: ../../sflphone-client-gnome/src/statusicon.c:124 -#, c-format -msgid "SFLphone - %i accounts registered" +#, fuzzy, c-format +msgid "SFLphone - %i accounts configured" msgstr "SFLphone - %i 個帳戶已註冊" #: ../../sflphone-client-gnome/src/timestamp.c:46 diff --git a/sflphone-common/src/user_cfg.h b/sflphone-common/src/user_cfg.h index 396ffc22781f4ef5f22f372f6f39862605aa5cbf..ee708017505aac2ce43a148e89b77db15dcb8401 100644 --- a/sflphone-common/src/user_cfg.h +++ b/sflphone-common/src/user_cfg.h @@ -90,7 +90,7 @@ #define PHONE_NUMBER_HOOK_ADD_PREFIX "Hooks.phone_number_add_prefix" #define EMPTY_FIELD "" /** Default value for empty field */ -#define DFT_STUN_SERVER "stun.ekiga.net" /** Default STUN server address */ +#define DFT_STUN_SERVER "stun.sflphone.org" /** Default STUN server address */ #define YES_STR "1" /** Default YES value */ #define NO_STR "0" /** Default NO value */ #define DFT_PULSE_LENGTH_STR "250" /** Default DTMF lenght */ diff --git a/tools/build-system/bin/git-dch b/tools/build-system/bin/git-dch deleted file mode 100755 index f9ee5bc56f14d320c63c27da987ca0029fbb244f..0000000000000000000000000000000000000000 --- a/tools/build-system/bin/git-dch +++ /dev/null @@ -1,404 +0,0 @@ -#!/usr/bin/python -u -# vim: set fileencoding=utf-8 : -# -# (C) 2007,2008 Guido Guenther <agx@sigxcpu.org> -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -"""Generate Debian changelog entries from git commit messages""" - -import sys -import re -import os.path -import shutil -import subprocess -import gbp.command_wrappers as gbpc -from gbp.git_utils import (GitRepositoryError, GitRepository, build_tag) -from gbp.config import GbpOptionParser, GbpOptionGroup -from gbp.errors import GbpError -from gbp.deb_utils import parse_changelog -from gbp.command_wrappers import (Command, CommandExecFailed) - -snapshot_re = re.compile("\s*\*\* SNAPSHOT build @(?P<commit>[a-z0-9]+)\s+\*\*") -author_re = re.compile('Author: (?P<author>.*) <(?P<email>.*)>') -bug_r = r'(?:bug)?\#?\s?\d+' -bug_re = re.compile(bug_r, re.I) - -def system(cmd): - try: - Command(cmd, shell=True)() - except CommandExecFailed: - raise GbpError - - -def escape_commit(msg): - return msg.replace('"','\\\"').replace("$","\$").replace("`","\`") - - -def spawn_dch(msg='', author=None, email=None, newversion=False, version=None, release=False, distribution=None): - distopt = "" - versionopt = "" - env = "" - - if newversion: - if version: - versionopt = '--newversion=%s' % version - else: - versionopt = '-i' - elif release: - versionopt = "--release" - msg = None - - if author and email: - env = """DEBFULLNAME="%s" DEBEMAIL="%s" """ % (author, email) - - if distribution: - distopt = "--distribution=%s" % distribution - - cmd = '%(env)s dch --no-auto-nmu %(distopt)s %(versionopt)s ' % locals() - if type(msg) == type(''): - cmd += '"%s"' % escape_commit(msg) - system(cmd) - - -def add_changelog_entry(msg, author, email): - "add aa single changelog entry" - spawn_dch(msg=msg, author=author, email=email) - - -def add_changelog_section(msg, distribution, author=None, email=None, version=None): - "add a new changelog section" - spawn_dch(msg=msg, newversion= True, version=version, author=author, email=email, distribution=distribution) - - -def fixup_trailer(repo, git_author=False): - """fixup the changelog trailer's comitter and email address - it might - otherwise point to the last git committer instead of the person creating - the changelog""" - author = email = None - if git_author: - try: author = repo.get_config('user.name') - except KeyError: pass - - try: email = repo.get_config('user.email') - except KeyError: pass - - spawn_dch(msg='', author=author, email=email) - - -def head_commit(): - """get the full sha1 of the last commit on HEAD""" - commit = subprocess.Popen([ 'git', 'log', 'HEAD^..' ], stdout=subprocess.PIPE).stdout - sha = commit.readline().split()[-1] - return sha - - -def snapshot_version(version): - """ - get the current release and snapshot version - Format is <debian-version>~<release>.gbp<short-commit-id> - """ - try: - (release, suffix) = version.rsplit('~', 1) - (snapshot, commit) = suffix.split('.', 1) - if not commit.startswith('gbp'): - raise ValueError - else: - snapshot = int(snapshot) - except ValueError: # not a snapshot release - release = version - snapshot = 0 - return release, snapshot - - -def mangle_changelog(changelog, cp, snapshot=''): - """ - Mangle changelog to either add or remove snapshot markers - - @param snapshot: SHA1 if snapshot header should be added/maintained, empty if it should be removed - @type snapshot: str - """ - try: - tmpfile = '%s.%s' % (changelog, snapshot) - cw = file(tmpfile, 'w') - cr = file(changelog, 'r') - - cr.readline() # skip version and empty line - cr.readline() - print >>cw, "%(Source)s (%(MangledVersion)s) %(Distribution)s; urgency=%(urgency)s\n" % cp - - line = cr.readline() - if snapshot_re.match(line): - cr.readline() # consume the empty line after the snapshot header - line = '' - - if snapshot: - print >>cw, " ** SNAPSHOT build @%s **\n" % snapshot - - if line: - print >>cw, line.rstrip() - shutil.copyfileobj(cr, cw) - cw.close() - cr.close() - os.unlink(changelog) - os.rename(tmpfile, changelog) - except OSError, e: - raise GbpError, "Error mangling changelog %s" % e - - -def do_release(changelog, cp): - "remove the snapshot header and set the distribution" - (release, snapshot) = snapshot_version(cp['Version']) - if snapshot: - cp['MangledVersion'] = release - mangle_changelog(changelog, cp) - # <julien.bonjean@savoirfairelinux.com> - # prevent doing a release - # spawn_dch(release=True) - - -def do_snapshot(changelog, next_snapshot): - """ - Add new snapshot banner to most recent changelog section. The next snapshot - number is calculated by eval()'ing next_snapshot - """ - # commit = head_commit() - - cp = parse_changelog(changelog) - - # <julien.bonjean@savoirfairelinux.com> - # clean version before generate snapshot - version=cp['Version'] - try: - (release, suffix) = version.rsplit('~', 1) - except: - pass - try: - (snapshot, commit) = suffix.split('.', 1) - stripped = str(int(snapshot)) - except: - version=release - commit = head_commit() - - (release, snapshot) = snapshot_version(version) - snapshot = int(eval(next_snapshot)) - - suffix = "%d.gbp%s" % (snapshot, "".join(commit[0:6])) - cp['MangledVersion'] = "%s~%s" % (release, suffix) - - mangle_changelog(changelog, cp, commit) - return snapshot, commit - - -def get_author(commit): - """get the author from a commit message""" - for line in commit: - m = author_re.match(line) - if m: - return m.group('author'), m.group('email') - - -def parse_commit(repo, commitid, options): - """parse a commit and return message and author""" - msg = '' - thanks = '' - closes = '' - bugs = {} - bts_closes = re.compile(r'(?P<bts>%s):\s+%s' % (options.meta_closes, bug_r), re.I) - - commit = repo.show(commitid) - author, email = get_author(commit) - if not author: - raise GbpError, "can't parse author of commit %s" % commit - for line in commit: - if line.startswith(' '): # commit body - line = line[4:] - m = bts_closes.match(line) - if m: - bug_nums = [ bug.strip() for bug in bug_re.findall(line, re.I) ] - try: - bugs[m.group('bts')] += bug_nums - except KeyError: - bugs[m.group('bts')] = bug_nums - elif line.startswith('Thanks: '): - thanks = line.split(' ', 1)[1].strip() - else: # normal commit message - if options.short and msg: - continue - elif line.strip(): # don't add all whitespace lines - msg += line - # start of diff output: - elif line.startswith('diff '): - break - if options.meta: - for bts in bugs: - closes += '(%s: %s) ' % (bts, ', '.join(bugs[bts])) - if thanks: - thanks = '- thanks to %s' % thanks - msg += closes + thanks - if options.idlen: - msg = "[%s] " % commitid[0:options.idlen] + msg - return msg, (author, email) - - -def shortlog_to_dch(repo, commits, options): - """convert the changes in git shortlog format to debian changelog format""" - author = 'Unknown' - - for commit in commits: - msg, (author, email) = parse_commit(repo, commit, options) - add_changelog_entry(msg, author, email) - - -def guess_snapshot_commit(cp): - """guess the last commit documented in the changelog from the snapshot banner""" - sr = re.search(snapshot_re, cp['Changes']) - if sr: - return sr.group('commit') - - -def main(argv): - ret = 0 - changelog = 'debian/changelog' - until = 'HEAD' - found_snapshot_header = False - first_commit = None - - parser = GbpOptionParser(command=os.path.basename(argv[0]), prefix='', - usage='%prog [options] paths') - range_group = GbpOptionGroup(parser, "commit range options", "which commits to add to the changelog") - version_group = GbpOptionGroup(parser, "release & version number options", "what version number and release to use") - commit_group = GbpOptionGroup(parser, "commit message formatting", "howto format the changelog entries") - naming_group = GbpOptionGroup(parser, "branch and tag naming", "branch names and tag formats") - parser.add_option_group(range_group) - parser.add_option_group(version_group) - parser.add_option_group(commit_group) - parser.add_option_group(naming_group) - - naming_group.add_config_file_option(option_name="debian-branch", dest="debian_branch") - naming_group.add_config_file_option(option_name="upstream-tag", dest="upstream_tag") - naming_group.add_config_file_option(option_name="debian-tag", dest="debian_tag") - naming_group.add_config_file_option(option_name="snapshot-number", dest="snapshot_number", - help="expression to determine the next snapshot number, default is '%(snapshot-number)s'") - parser.add_config_file_option(option_name="git-log", dest="git_log", - help="options to pass to git-log, default is '%(git-log)s'") - parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, - help="verbose command execution") - range_group.add_option("-s", "--since", dest="since", help="commit to start from (e.g. HEAD^^^, debian/0.4.3)") - range_group.add_option("-a", "--auto", action="store_true", dest="auto", default=False, - help="autocomplete changelog from last snapshot or tag") - version_group.add_option("-R", "--release", action="store_true", dest="release", default=False, - help="mark as release") - version_group.add_option("-S", "--snapshot", action="store_true", dest="snapshot", default=False, - help="mark as snapshot build") - version_group.add_option("-N", "--new-version", dest="new_version", - help="use this as base for the new version number") - version_group.add_config_file_option(option_name="git-author", dest="git_author", action="store_true") - version_group.add_config_file_option(option_name="no-git-author", dest="git_author", action="store_false") - commit_group.add_config_file_option(option_name="meta", dest="meta", - help="parse meta tags in commit messages, default is '%(meta)s'", action="store_true") - commit_group.add_config_file_option(option_name="meta-closes", dest="meta_closes", - help="Meta tags for the bts close commands, default is '%(meta-closes)s'") - commit_group.add_option("--full", action="store_false", dest="short", default=True, - help="include the full commit message instead of only the first line") - commit_group.add_config_file_option(option_name="id-length", dest="idlen", - help="include N digits of the commit id in the changelog entry, default is '%(id-length)s'", - type="int", metavar="N") - (options, args) = parser.parse_args(argv[1:]) - - if options.snapshot and options.release: - parser.error("'--snapshot' and '--release' are incompatible options") - - if options.since and options.auto: - parser.error("'--since' and '--auto' are incompatible options") - - try: - if options.verbose: - gbpc.Command.verbose = True - - try: - repo = GitRepository('.') - except GitRepositoryError: - raise GbpError, "%s is not a git repository" % (os.path.abspath('.')) - - branch = repo.get_branch() - if options.debian_branch != branch: - print >>sys.stderr, "You are not on branch '%s' but on '%s'" % (options.debian_branch, branch) - raise GbpError, "Use --debian-branch to set the branch to pick changes from" - - cp = parse_changelog(changelog) - - if options.since: - since = options.since - else: - since = '' - if options.auto: - since = guess_snapshot_commit(cp) - if since: - print "Continuing from commit '%s'" % since - found_snapshot_header = True - else: - print "Couldn't find snapshot header, using version info" - if not since: - since = build_tag(options.debian_tag, cp['Version']) - - if args: - print "Only looking for changes on '%s'" % " ".join(args) - commits = repo.commits(since, until, " ".join(args), options.git_log.split(" ")) - - # add a new changelog section if: - if cp['Distribution'] != "UNRELEASED" and not found_snapshot_header and commits: - # the last version was a release and we have pending commits - add_section = True - elif options.new_version or not found_snapshot_header: - # the user wants to force a new version or switch to snapshot mode - add_section = True - else: - add_section = False - - if add_section: - if commits: - first_commit = commits[0] - commits = commits[1:] - commit_msg, (commit_author, commit_email) = parse_commit(repo, first_commit, options) - else: - commit_msg = "UNRELEASED" - commit_author = None - commit_email = None - add_changelog_section(distribution="UNRELEASED", msg=commit_msg, - version=options.new_version, author=commit_author, - email=commit_email) - - if commits: - shortlog_to_dch(repo, commits, options) - fixup_trailer(repo, git_author=options.git_author) - elif not first_commit: - print "No changes detected from %s to %s." % (since, until) - - if options.release: - do_release(changelog, cp) - elif options.snapshot: - (snap, version) = do_snapshot(changelog, options.snapshot_number) - print "Changelog has been prepared for snapshot #%d at %s" % (snap, version) - - except (GbpError, GitRepositoryError), err: - if len(err.__str__()): - print >>sys.stderr, err - ret = 1 - return ret - -if __name__ == "__main__": - sys.exit(main(sys.argv)) - -# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: diff --git a/tools/build-system/launch-build-machine.sh b/tools/build-system/launch-build-machine.sh index cefc4f4428bf180a251761017ea911020d2cd27c..9144928eb82e8519c12960c251ede3081f3cd80d 100755 --- a/tools/build-system/launch-build-machine.sh +++ b/tools/build-system/launch-build-machine.sh @@ -7,9 +7,17 @@ # Author: Julien Bonjean (julien@bonjean.info) # # Creation Date: 2009-04-20 -# Last Modified: +# Last Modified: 2009-05-15 12:23:31 -0400 ##################################################### +# +# Not working with git 1.5.4.3 +# +# +# +# + + TAG=`date +%Y-%m-%d` # wait delay after startup and shutdown of VMs @@ -69,6 +77,8 @@ DO_SEND_EMAIL=1 EDITOR=echo export EDITOR +NON_FATAL_ERRORS= + MACHINES=( "ubuntu-8.04" "ubuntu-8.04-64" "ubuntu-8.10" "ubuntu-8.10-64" "ubuntu-9.04" "ubuntu-9.04-64" ) ######################### @@ -81,20 +91,6 @@ echo " | SFLPhone build system |" echo " \\***********************/" echo -cd ${SCRIPTS_DIR} - -if [ "$?" -ne "0" ]; then - echo " !! Cannot cd to working directory" - exit -1 -fi - -WHO=`whoami` - -if [ "${WHO}" != "${USER}" ]; then - echo "!! Please use user ${USER} to run this script" - exit -1; -fi - for PARAMETER in $* do case ${PARAMETER} in @@ -137,6 +133,26 @@ do esac done +# if more than one VM will be launched, automatically stop running VMs +if [ "${#MACHINES[@]}" -gt "1" ]; then + VBoxManage list runningvms | tail -n +5 | awk '{print $1}' | xargs -i VBoxManage controlvm {} poweroff +fi + +# change to working directory +cd ${SCRIPTS_DIR} + +if [ "$?" -ne "0" ]; then + echo " !! Cannot cd to working directory" + exit -1 +fi + +WHO=`whoami` + +if [ "${WHO}" != "${USER}" ]; then + echo "!! Please use user ${USER} to run this script" + exit -1; +fi + # logging mkdir ${PACKAGING_RESULT_DIR} 2>/dev/null if [ ${DO_LOGGING} ]; then @@ -200,13 +216,12 @@ if [ ${DO_PREPARE} ]; then echo "Clone repository" git clone ssh://repos-sflphone-git@sflphone.org/~/sflphone.git ${REPOSITORY_DIR} >/dev/null 2>&1 - if [ "$?" -ne "0" ]; then echo " !! Cannot clone repository" exit -1 fi - FULL_VER=`cd ${REPOSITORY_DIR} && git describe --tag HEAD | cut -d "/" -f2 | cut -d "-" -f1-2` + FULL_VER=`cd ${REPOSITORY_DIR} && git describe --tag HEAD | cut -d "/" -f2 | cut -d "-" -f1-2 | sed 's/\.rc.*//' | sed 's/\.beta.*//'` # change current branch if needed if [ ${RELEASE_MODE} ]; then @@ -220,27 +235,13 @@ if [ ${DO_PREPARE} ]; then # generate the changelog, according to the distribution and the git commit messages echo "Update changelogs" - # use git to generate changelogs - # TODO : currently do symlink to workaround git-dch bug, check if better way is possible - if [ ${RELEASE_MODE} ]; then - cd ${REPOSITORY_DIR} && ln -s ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/ . && ${BIN_DIR}/git-dch -a -R -N "${FULL_VER}${VERSION_APPEND}" --debian-branch=release && rm debian && \ - # cd ${REPOSITORY_DIR} && ln -s ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian . && ${BIN_DIR}/git-dch -a -R -N "${FULL_VER}${VERSION_APPEND}" --debian-branch=release && rm debian && \ - cd ${REPOSITORY_DIR} && ln -s ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian . && ${BIN_DIR}/git-dch -a -R -N "${FULL_VER}${VERSION_APPEND}" --debian-branch=release && rm debian - else - cd ${REPOSITORY_DIR} && ln -s ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian . && ${BIN_DIR}/git-dch -a -S && rm debian && \ - # cd ${REPOSITORY_DIR} && ln -s ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian . && ${BIN_DIR}/git-dch -a -S && rm debian && \ - cd ${REPOSITORY_DIR} && ln -s ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian . && ${BIN_DIR}/git-dch -a -S && rm debian - fi + ${SCRIPTS_DIR}/sfl-git-dch.sh ${RELEASE_MODE} if [ "$?" -ne "0" ]; then echo "!! Cannot update changelogs" exit -1 fi - # change UNRELEASED flag to system as we alway do a build for each distribution - # and distribution is set by another script - find ${REPOSITORY_DIR} -name changelog -exec sed -i 's/UNRELEASED/SYSTEM/g' {} \; - cd ${REPOSITORY_DIR} echo "Update repository with new changelog" echo " Switch to master branch to commit" @@ -255,7 +256,7 @@ if [ ${DO_PREPARE} ]; then if [ ! ${RELEASE_MODE} ]; then VERSION_COMMIT=${FULL_VER}" Snapshot ${TAG}" fi - git-commit -m "[#1262] Updated changelogs for version ${VERSION_COMMIT}" . >/dev/null + git commit -m "[#1262] Updated changelogs for version ${VERSION_COMMIT}" . >/dev/null echo " Pushing commit" git push origin master >/dev/null @@ -267,7 +268,7 @@ if [ ${DO_PREPARE} ]; then fi echo "Archiving repository" - tar czf ${REPOSITORY_ARCHIVE} -C `dirname ${REPOSITORY_DIR}` sflphone + tar czf ${REPOSITORY_ARCHIVE} --exclude .git -C `dirname ${REPOSITORY_DIR}` sflphone if [ "$?" -ne "0" ]; then echo " !! Cannot archive repository" @@ -309,10 +310,6 @@ if [ ${DO_MAIN_LOOP} ]; then sleep ${STARTUP_WAIT} fi - echo "Doing updates" - ${SSH_BASE} 'sudo apt-get update >/dev/null' - ${SSH_BASE} 'sudo apt-get upgrade -y >/dev/null' - echo "Clean remote directory" ${SSH_BASE} "rm -rf ${REMOTE_DEPLOY_DIR} 2>/dev/null" @@ -321,7 +318,7 @@ if [ ${DO_MAIN_LOOP} ]; then if [ "$?" -ne "0" ]; then echo " !! Cannot deploy packaging system" - exit -1 + NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n" fi echo "Launch remote build" @@ -329,7 +326,7 @@ if [ ${DO_MAIN_LOOP} ]; then if [ "$?" -ne "0" ]; then echo " !! Error during remote packaging process" - # exit -1 + NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n" fi echo "Retrieve dists and log files (current tag is ${TAG})" @@ -338,7 +335,7 @@ if [ ${DO_MAIN_LOOP} ]; then if [ "$?" -ne "0" ]; then echo " !! Cannot retrieve remote files" - exit -1 + NON_FATAL_ERRORS="${NON_FATAL_ERRORS} !! Error when packaging for ${MACHINE}\n" fi if [ "${VM_STATE}" = "running" ]; then @@ -348,8 +345,8 @@ if [ ${DO_MAIN_LOOP} ]; then ${SSH_BASE} 'sudo shutdown -h now' echo "Wait ${SHUTDOWN_WAIT} s" sleep ${SHUTDOWN_WAIT} - echo "Hard shut down" - cd "${VBOX_USER_HOME}" && VBoxManage controlvm ${MACHINE} poweroff + # hard shut down (just to be sure) + cd "${VBOX_USER_HOME}" && VBoxManage controlvm ${MACHINE} poweroff >/dev/null 2>&1 fi done fi @@ -418,6 +415,12 @@ if [ ${DO_UPLOAD} ]; then fi fi +if [ ${NON_FATAL_ERRORS} ]; then + echo "Non fatal errors :" + echo ${NON_FATAL_ERRORS} + exit -1 +fi + # close file descriptor exec 3>&- diff --git a/tools/build-system/remote/build-package-ubuntu.sh b/tools/build-system/remote/build-package-ubuntu.sh index 0a28c1790cc75c6bb621289cced618085ca0640c..e975f6833e22b863a2c35787bd21422bacd819c4 100755 --- a/tools/build-system/remote/build-package-ubuntu.sh +++ b/tools/build-system/remote/build-package-ubuntu.sh @@ -52,7 +52,7 @@ if [ "$?" -ne "0" ]; then exit -1 fi -# decompress reppository +# decompress repository echo "Untar repository" cd ${BUILD_DIR} && tar xf ${REPOSITORY_ARCHIVE} @@ -66,8 +66,9 @@ echo "Switch to internal logging" # get system parameters ARCH_FLAG=`getconf -a|grep LONG_BIT | sed -e 's/LONG_BIT\s*//'` OS_VERSION=`lsb_release -d -s -c | sed -e '1d'` -VER=`cd ${REPOSITORY_DIR} && git describe --tag HEAD | cut -d "/" -f2 | cut -d "-" -f1` -FULL_VER=`cd ${REPOSITORY_DIR} && git describe --tag HEAD | cut -d "/" -f2 | cut -d "-" -f1-2` +PACKAGE_SYSVER="0ubuntu1" +VERSION=`cd ${REPOSITORY_DIR} && head -n 1 ./sflphone-client-gnome/debian/changelog | awk '{print $2}' | sed -e 's/(//g' -e 's/)//g' | cut -d "-" -f1` +FULL_VERSION=`cd ${REPOSITORY_DIR} && head -n 1 ./sflphone-client-gnome/debian/changelog | awk '{print $2}' | sed -e 's/(//g' -e 's/)//g' -e 's/SYSVER/'${PACKAGE_SYSVER}'/g'` # define log files GLOBAL_LOG=${ROOT_DIR}/sflphone-${OS_VERSION}-${ARCH_FLAG}.log @@ -80,13 +81,20 @@ exec 3<>${GLOBAL_LOG} exec 1>&3 exec 2>&3 -echo "SFLPhone version is ${VER}" +echo "SFLPhone version is ${VERSION}" -# generate the changelog, according to the distribution and the git commit messages +echo "Do updates" +sudo apt-get update >/dev/null +sudo apt-get upgrade -y >/dev/null + +# generate the changelog, according to the distribution echo "Generate changelogs" sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/changelog && \ +sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_COMMON_DIR}/debian/changelog && \ # sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/changelog && \ - sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/changelog + # sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR}/debian/changelog && \ + sed -i 's/SYSTEM/'${OS_VERSION}'/g' ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/changelog && \ + sed -i 's/SYSVER/'${PACKAGE_SYSVER}'/g' ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR}/debian/changelog if [ "$?" -ne "0" ]; then echo "!! Cannot generate changelogs" @@ -107,16 +115,16 @@ fi # provide prerequisite directories used by debuild echo "Build sflphone packages on Ubuntu $OS_VERSION $ARCH_FLAG bit architecture...." cp -r ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common && \ -cp -r ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common-$VER.orig && \ - # cp -r ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR} ${BUILD_DIR}/sflphone-client-kde-$VER.orig && \ - cp -r ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR} ${BUILD_DIR}/sflphone-client-gnome-$VER.orig && \ +cp -r ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common-${FULL_VERSION}.orig && \ + # cp -r ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR} ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION}.orig && \ + cp -r ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR} ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION}.orig && \ # do a cp to because path must remain for client compilation -mv ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common-$VER && \ - # mv ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR} ${BUILD_DIR}/sflphone-client-kde-$VER && \ - mv ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR} ${BUILD_DIR}/sflphone-client-gnome-$VER +mv ${REPOSITORY_SFLPHONE_COMMON_DIR} ${BUILD_DIR}/sflphone-common-${FULL_VERSION} && \ + # mv ${REPOSITORY_SFLPHONE_CLIENT_KDE_DIR} ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION} && \ + mv ${REPOSITORY_SFLPHONE_CLIENT_GNOME_DIR} ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION} # build package sflphone-common -cd ${BUILD_DIR}/sflphone-common-$VER/debian && \ +cd ${BUILD_DIR}/sflphone-common-${FULL_VERSION}/debian && \ debuild -us -uc >${PACKAGING_LOG} 2>&1 if [ "$?" -ne "0" ]; then @@ -125,8 +133,8 @@ if [ "$?" -ne "0" ]; then fi # build package sflphone-client-gnome -cd ${BUILD_DIR}/sflphone-client-gnome-$VER/debian && \ -debuild -us -uc >${PACKAGING_LOG} 2>&1 +cd ${BUILD_DIR}/sflphone-client-gnome-${FULL_VERSION}/debian && \ +debuild -us -uc >>${PACKAGING_LOG} 2>&1 if [ "$?" -ne "0" ]; then echo "!! Cannot generate package sflphone-client-gnome" @@ -134,8 +142,8 @@ if [ "$?" -ne "0" ]; then fi # build package sflphone-client-kde -# cd ${BUILD_DIR}/sflphone-client-kde-$VER/debian && \ -# debuild -us -uc >${PACKAGING_LOG} 2>&1 +# cd ${BUILD_DIR}/sflphone-client-kde-${FULL_VERSION}/debian && \ +# debuild -us -uc >>${PACKAGING_LOG} 2>&1 # if [ "$?" -ne "0" ]; then # echo "!! Cannot generate package sflphone-client-kde" diff --git a/tools/build-system/sfl-git-dch.sh b/tools/build-system/sfl-git-dch.sh new file mode 100755 index 0000000000000000000000000000000000000000..986da2bdaa57ceec96343b2f19911f0476bfdac7 --- /dev/null +++ b/tools/build-system/sfl-git-dch.sh @@ -0,0 +1,165 @@ +#!/bin/bash +##################################################### +# File Name: sfl-git-dch.sh +# +# Purpose : +# +# Author: Julien Bonjean (julien@bonjean.info) +# +# Creation Date: 2009-05-13 +# Last Modified: 2009-05-14 17:22:48 -0400 +##################################################### + +# set -x + +RELEASE_MODE=$1 + +ROOT_DIR="/home/projects/sflphone" +TODEPLOY_DIR="${ROOT_DIR}/sflphone-packaging" +TODEPLOY_BUILD_DIR="${TODEPLOY_DIR}/build" +REPOSITORY_DIR="${TODEPLOY_BUILD_DIR}/sflphone" +SCRIPTS_DIR="${ROOT_DIR}/build-system" + +CHANGELOG_FILES=( "sflphone-common/debian/changelog" "sflphone-client-gnome/debian/changelog" ) + +SNAPSHOT_TAG=`date +%s` + +export DEBFULLNAME="SFLphone Automatic Build System" +export DEBEMAIL="team@sflphone.org" +export EDITOR="echo" + +cd ${REPOSITORY_DIR} + +if [ "$?" -ne "0" ]; then + echo " !! Cannot cd to working directory" + exit -1 +fi + +# get last release tag +LAST_RELEASE_TAG_NAME=`git describe --tag HEAD --match "debian/*" --abbrev=40 | cut -d "-" -f1-2` + +if [ "$?" -ne "0" ]; then + echo " !! Error when retrieving last tag" + exit -1 +fi + +# get last release commit hash +LAST_RELEASE_COMMIT_HASH=`git show --pretty=format:"%H" -s ${LAST_RELEASE_TAG_NAME=} | tail -n 1` + +if [ "$?" -ne "0" ]; then + echo " !! Error when retrieving last release commit hash" + exit -1 +fi + +echo "Last release tag is : ${LAST_RELEASE_TAG_NAME} (commit ${LAST_RELEASE_COMMIT_HASH})" +echo + + +# use git log to retrieve changelog content +CHANGELOG_CONTENT=`git log --no-merges --pretty=format:"%s" ${LAST_RELEASE_COMMIT_HASH}.. | grep -v "\[\#1262\]"` + +if [ "$?" -ne "0" ]; then + echo " !! Error when retrieving changelog content" + exit -1 +fi + +# get version +SOFTWARE_VERSION=`echo ${LAST_RELEASE_TAG_NAME} | cut -d "/" -f2- | cut -d "-" -f1` + +if [ "$?" -ne "0" ]; then + echo " !! Error when retrieving software version" + exit -1 +fi + +# add version info +SOFTWARE_VERSION_APPEND= +if [ ${RELEASE_MODE} ] +then + if [ "${RELEASE_MODE}" != "release" ]; then + SOFTWARE_VERSION_APPEND="~${RELEASE_MODE}" + fi +else + SOFTWARE_VERSION_APPEND="~snapshot${SNAPSHOT_TAG}" +fi + + + + +# iterate throw changelog files +for CHANGELOG_FILE in ${CHANGELOG_FILES[@]} +do + echo "Changelog : ${CHANGELOG_FILE}" + echo + rm -f ${CHANGELOG_FILE}.dch >/dev/null 2>&1 + + # if previous entry is a snapshot, remove it + sed -n 's/ //g;3p;3q' ${CHANGELOG_FILE} | grep "**SNAPSHOT" >/dev/null 2>&1 + if [ $? -eq 0 ]; then + echo "Previous entry is a snapshot, removing it" + + # detect first section length + FIRST_SECTION_LENGTH=`tail -n +2 ${CHANGELOG_FILE} | nl -ba | grep -m 1 "sflphone-.* SYSTEM; urgency=.*" | awk '{print $1}'` + + if [ "$?" -ne "0" ] || [ ! ${FIRST_SECTION_LENGTH} ]; then + echo " !! Error when retrieving snapshot entry length" + exit -1 + fi + + # remove first section + sed -i "1,${FIRST_SECTION_LENGTH}d" ${CHANGELOG_FILE} + + if [ "$?" -ne "0" ]; then + echo " !! Error when removing snapshot section" + exit -1 + fi + fi + + echo -n "Generate changelog " + IS_FIRST=1 + echo "${CHANGELOG_CONTENT}" | while read line + do + + if [ ${IS_FIRST} ] + then + yes | dch --changelog ${CHANGELOG_FILE} -b --allow-lower-version --no-auto-nmu --distribution SYSTEM --newversion ${SOFTWARE_VERSION}-SYSVER${SOFTWARE_VERSION_APPEND} "$line" >/dev/null 2>&1 + + if [ "$?" -ne "0" ]; then + echo + echo " !! Error with new version" + exit -1 + fi + + IS_FIRST= + else + dch --changelog ${CHANGELOG_FILE} --no-auto-nmu "$line" + if [ "$?" -ne "0" ]; then + echo + echo " !! Error when adding changelog entry" + exit -1 + fi + fi + echo -n . + done + + # add snapshot or release flag if needed + echo + if [ ${RELEASE_MODE} ]; then + sed -i "3i\ ** ${SOFTWARE_VERSION} ${RELEASE_MODE} **\n" ${CHANGELOG_FILE} + if [ "$?" -ne "0" ]; then + echo " !! Error when adding snapshot flag" + exit -1 + fi + else + sed -i "3i\ ** SNAPSHOT ${SNAPSHOT_TAG} **\n" ${CHANGELOG_FILE} + if [ "$?" -ne "0" ]; then + echo " !! Error when adding snapshot flag" + exit -1 + fi + fi + echo +done + +echo "All done !" + +exit 0 +