diff options
56 files changed, 893 insertions, 467 deletions
diff --git a/Makefile.am b/Makefile.am index a14dcd113..cc530dd66 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = po profiles pixmaps libempathy libempathy-gtk src +SUBDIRS = po data libempathy libempathy-gtk src DISTCHECK_CONFIGURE_FLAGS = \ --disable-scrollkeeper diff --git a/configure.ac b/configure.ac index d03973ce3..bf331eee6 100644 --- a/configure.ac +++ b/configure.ac @@ -84,9 +84,9 @@ PKG_CHECK_MODULES(MISSION_CONTROL_PLUGINS, dnl ----------------------------------------------------------- AC_OUTPUT([ Makefile + data/Makefile + data/16x16/Makefile po/Makefile.in - profiles/Makefile - pixmaps/Makefile libempathy/Makefile libempathy-gtk/Makefile src/Makefile diff --git a/data/16x16/Makefile.am b/data/16x16/Makefile.am new file mode 100644 index 000000000..1b12272c3 --- /dev/null +++ b/data/16x16/Makefile.am @@ -0,0 +1,13 @@ +icondir = $(datadir)/icons/hicolor/16x16/apps +icon_DATA = \ + empathy-available.png \ + empathy-offline.png \ + empathy-away.png \ + empathy-extended-away.png \ + empathy-busy.png \ + empathy-pending.png \ + empathy-message.png \ + empathy-message-new.png \ + empathy-typing.png + +EXTRA_DIST = $(icon_DATA) diff --git a/data/16x16/empathy-available.png b/data/16x16/empathy-available.png Binary files differnew file mode 100644 index 000000000..66b24967a --- /dev/null +++ b/data/16x16/empathy-available.png diff --git a/data/16x16/empathy-away.png b/data/16x16/empathy-away.png Binary files differnew file mode 100644 index 000000000..ff59e309d --- /dev/null +++ b/data/16x16/empathy-away.png diff --git a/data/16x16/empathy-busy.png b/data/16x16/empathy-busy.png Binary files differnew file mode 100644 index 000000000..fec554d89 --- /dev/null +++ b/data/16x16/empathy-busy.png diff --git a/data/16x16/empathy-extended-away.png b/data/16x16/empathy-extended-away.png Binary files differnew file mode 100644 index 000000000..9f74bd01a --- /dev/null +++ b/data/16x16/empathy-extended-away.png diff --git a/data/16x16/empathy-message-new.png b/data/16x16/empathy-message-new.png Binary files differnew file mode 100644 index 000000000..da01aff75 --- /dev/null +++ b/data/16x16/empathy-message-new.png diff --git a/data/16x16/empathy-message.png b/data/16x16/empathy-message.png Binary files differnew file mode 100644 index 000000000..be0e2e157 --- /dev/null +++ b/data/16x16/empathy-message.png diff --git a/data/16x16/empathy-offline.png b/data/16x16/empathy-offline.png Binary files differnew file mode 100644 index 000000000..0321dc6bb --- /dev/null +++ b/data/16x16/empathy-offline.png diff --git a/data/16x16/empathy-pending.png b/data/16x16/empathy-pending.png Binary files differnew file mode 100644 index 000000000..4adfdb648 --- /dev/null +++ b/data/16x16/empathy-pending.png diff --git a/data/16x16/empathy-typing.png b/data/16x16/empathy-typing.png Binary files differnew file mode 100644 index 000000000..5c272a339 --- /dev/null +++ b/data/16x16/empathy-typing.png diff --git a/pixmaps/Makefile.am b/data/Makefile.am index 6143ddc2e..0f2e1b074 100644 --- a/pixmaps/Makefile.am +++ b/data/Makefile.am @@ -1,17 +1,11 @@ -imagedir = $(datadir)/empathy +SUBDIRS = 16x16 -image_DATA = \ - gossip-offline.png \ - gossip-available.png \ - gossip-busy.png \ - gossip-away.png \ - gossip-extended-away.png \ - gossip-pending.png \ - gossip-message.png \ - gossip-typing.png \ - gossip-group-message.png \ - vcard_16.png \ - vcard_48.png +profiledir = $(datadir)/mission-control/profiles +profile_DATA = \ + jabber.profile \ + gtalk.profile \ + salut.profile \ + msn.profile gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor @@ -27,6 +21,7 @@ update-icon-cache: fi EXTRA_DIST = \ - $(image_DATA) + $(image_DATA) \ + $(profile_DATA) diff --git a/profiles/gtalk.profile b/data/gtalk.profile index c70bfa840..c70bfa840 100644 --- a/profiles/gtalk.profile +++ b/data/gtalk.profile diff --git a/profiles/jabber.profile b/data/jabber.profile index 811132cdf..811132cdf 100644 --- a/profiles/jabber.profile +++ b/data/jabber.profile diff --git a/profiles/msn.profile b/data/msn.profile index 599204c1b..599204c1b 100644 --- a/profiles/msn.profile +++ b/data/msn.profile diff --git a/profiles/salut.profile b/data/salut.profile index 22c9c1867..22c9c1867 100644 --- a/profiles/salut.profile +++ b/data/salut.profile diff --git a/data/scalable/message-new.xcf b/data/scalable/message-new.xcf Binary files differnew file mode 100644 index 000000000..57d574347 --- /dev/null +++ b/data/scalable/message-new.xcf diff --git a/data/scalable/message.xcf b/data/scalable/message.xcf Binary files differnew file mode 100644 index 000000000..c255be046 --- /dev/null +++ b/data/scalable/message.xcf diff --git a/data/scalable/process-typing.xcf b/data/scalable/process-typing.xcf Binary files differnew file mode 100644 index 000000000..d2fa5f44d --- /dev/null +++ b/data/scalable/process-typing.xcf diff --git a/data/scalable/status-avaible.svg b/data/scalable/status-avaible.svg new file mode 100644 index 000000000..8d4cc585f --- /dev/null +++ b/data/scalable/status-avaible.svg @@ -0,0 +1,104 @@ +<?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://web.resource.org/cc/" + 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="16px" + height="16px" + id="svg4908" + sodipodi:version="0.32" + inkscape:version="0.44+devel" + sodipodi:docbase="/home/andreas/project/gossip/16x16" + sodipodi:docname="status-avaible.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:export-filename="/home/andreas/project/gossip/16x16/status-avaible.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:modified="true"> + <defs + id="defs4910"> + <linearGradient + inkscape:collect="always" + id="linearGradient5899"> + <stop + style="stop-color:#7fe719;stop-opacity:1" + offset="0" + id="stop5901" /> + <stop + style="stop-color:#67bc13;stop-opacity:1" + offset="1" + id="stop5903" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient5899" + id="radialGradient5905" + cx="9.466115" + cy="8.9839392" + fx="9.466115" + fy="8.9839392" + r="6.7474474" + gradientTransform="matrix(1.1671849,-3.2679277e-3,2.7524467e-3,1.0150183,-1.6222549,-0.2024225)" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.197802" + inkscape:cx="14.452639" + inkscape:cy="6.4458104" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1674" + inkscape:window-height="969" + inkscape:window-x="0" + inkscape:window-y="26" /> + <metadata + id="metadata4913"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + sodipodi:type="arc" + style="opacity:1;fill:url(#radialGradient5905);fill-opacity:1;stroke:#376e01;stroke-width:0.97113216;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4926" + sodipodi:cx="7.9737625" + sodipodi:cy="7.7221532" + sodipodi:rx="6.2618814" + sodipodi:ry="6.3632426" + d="M 14.235644 7.7221532 A 6.2618814 6.3632426 0 1 1 1.7118812,7.7221532 A 6.2618814 6.3632426 0 1 1 14.235644 7.7221532 z" + transform="matrix(1.0380267,0,0,1.0214918,-0.2769783,0.1118841)" /> + <path + sodipodi:type="arc" + style="opacity:0.4;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.14770162;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5897" + sodipodi:cx="7.9737625" + sodipodi:cy="7.7221532" + sodipodi:rx="6.2618814" + sodipodi:ry="6.3632426" + d="M 14.235644 7.7221532 A 6.2618814 6.3632426 0 1 1 1.7118812,7.7221532 A 6.2618814 6.3632426 0 1 1 14.235644 7.7221532 z" + transform="matrix(0.8783303,0,0,0.8643392,0.996403,1.3254404)" /> + </g> +</svg> diff --git a/data/scalable/status-away-extended.svg b/data/scalable/status-away-extended.svg new file mode 100644 index 000000000..3104dff54 --- /dev/null +++ b/data/scalable/status-away-extended.svg @@ -0,0 +1,120 @@ +<?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://web.resource.org/cc/" + 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="16px" + height="16px" + id="svg4908" + sodipodi:version="0.32" + inkscape:version="0.44" + sodipodi:docbase="/home/martyn/Desktop/16x16" + sodipodi:docname="status-away-extended.svg" + inkscape:export-filename="/home/martyn/Desktop/16x16/status-away-extended.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90"> + <defs + id="defs4910"> + <linearGradient + inkscape:collect="always" + id="linearGradient5917"> + <stop + style="stop-color:#d80000;stop-opacity:1" + offset="0" + id="stop5919" /> + <stop + style="stop-color:#ca0000;stop-opacity:1" + offset="1" + id="stop5921" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5917" + id="linearGradient5923" + x1="6.5096536" + y1="8.5893564" + x2="9.9108915" + y2="11.540099" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1.1538462,0,0,1.0752822,-1.2307693,-0.1129232)" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="42.866662" + inkscape:cx="8.0000008" + inkscape:cy="7.4533429" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1323" + inkscape:window-height="987" + inkscape:window-x="0" + inkscape:window-y="26" /> + <metadata + id="metadata4913"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + style="fill:url(#linearGradient5923);fill-opacity:1;fill-rule:evenodd;stroke:#8a0000;stroke-width:1px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" + d="M 0.5,14.5 L 15.5,14.5 L 7.975762,1.5 L 0.5,14.5 z " + id="path4944" + sodipodi:nodetypes="cccc" /> + <path + style="opacity:0.3;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999994px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 2.2790289,13.5 L 13.779497,13.5 L 8.0106803,3.5000001 L 2.2790289,13.5 z " + id="path4946" + sodipodi:nodetypes="cccc" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:#ffe680;fill-opacity:1;stroke:#555753;stroke-width:0.8123197;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4911" + sodipodi:cx="11.09375" + sodipodi:cy="11.890625" + sodipodi:rx="4.53125" + sodipodi:ry="3.640625" + d="M 15.625 11.890625 A 4.53125 3.640625 0 1 1 6.5625,11.890625 A 4.53125 3.640625 0 1 1 15.625 11.890625 z" + transform="matrix(0.983072,0,0,1.223563,-1.005946,-3.448939)" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:none;fill-opacity:1;stroke:white;stroke-width:1.01539958;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5882" + sodipodi:cx="11.09375" + sodipodi:cy="11.890625" + sodipodi:rx="4.53125" + sodipodi:ry="3.640625" + d="M 15.625 11.890625 A 4.53125 3.640625 0 1 1 6.5625,11.890625 A 4.53125 3.640625 0 1 1 15.625 11.890625 z" + transform="matrix(0.786458,0,0,0.978852,1.175241,-0.539149)" /> + <path + style="fill:none;fill-rule:evenodd;stroke:black;stroke-width:0.91149789px;stroke-linecap:round;stroke-linejoin:round;marker-mid:none;stroke-opacity:1" + d="M 10.027723,8.0394381 L 10.027723,11.229682 L 6.8944493,11.229682" + id="path5884" /> + <path + style="opacity:0.33695655;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 5.8909083,11.545458 C 9.3617367,11.656825 9.9649551,9.8471677 13.714194,9.8750085 C 13.073853,8.0931929 11.598288,7.100202 9.8999937,7.0909217 C 8.1738593,7.0816413 5.9187492,8.9469795 5.8909083,11.545458 z " + id="path5886" + sodipodi:nodetypes="cczc" /> + </g> +</svg> diff --git a/data/scalable/status-away.svg b/data/scalable/status-away.svg new file mode 100644 index 000000000..7e7b0ed6b --- /dev/null +++ b/data/scalable/status-away.svg @@ -0,0 +1,93 @@ +<?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://web.resource.org/cc/" + 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="16px" + height="16px" + id="svg4908" + sodipodi:version="0.32" + inkscape:version="0.44+devel" + sodipodi:docbase="/home/andreas/project/gossip/16x16" + sodipodi:docname="status-away.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:export-filename="/home/andreas/project/gossip/16x16/status-away.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:modified="true"> + <defs + id="defs4910"> + <linearGradient + inkscape:collect="always" + id="linearGradient5917"> + <stop + style="stop-color:#f80000;stop-opacity:1" + offset="0" + id="stop5919" /> + <stop + style="stop-color:#e70000;stop-opacity:1" + offset="1" + id="stop5921" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5917" + id="linearGradient5923" + x1="6.5096536" + y1="8.5893564" + x2="9.9108915" + y2="11.540099" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(1,0,0,0.9925682,6.043956e-8,1.1147803e-2)" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.627417" + inkscape:cx="13.206814" + inkscape:cy="4.0564985" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1674" + inkscape:window-height="969" + inkscape:window-x="0" + inkscape:window-y="26" /> + <metadata + id="metadata4913"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + style="fill:url(#linearGradient5923);fill-opacity:1;fill-rule:evenodd;stroke:#8a0000;stroke-width:0.99999988px;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:1" + d="M 1.5,13.5 L 14.499999,13.5 L 7.9789933,1.4999999 L 1.5,13.5 z " + id="path4944" + sodipodi:nodetypes="cccc" /> + <path + style="opacity:0.3;fill:none;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000012px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 3.2186016,12.488535 L 12.832121,12.488535 L 8.0098272,3.5671249 L 3.2186016,12.488535 z " + id="path4946" + sodipodi:nodetypes="cccc" /> + </g> +</svg> diff --git a/data/scalable/status-busy.svg b/data/scalable/status-busy.svg new file mode 100644 index 000000000..66fc70945 --- /dev/null +++ b/data/scalable/status-busy.svg @@ -0,0 +1,140 @@ +<?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://web.resource.org/cc/" + 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="16px" + height="16px" + id="svg6941" + sodipodi:version="0.32" + inkscape:version="0.44+devel" + sodipodi:docbase="/home/andreas/project/gossip/16x16" + sodipodi:docname="status-busy.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:export-filename="/home/andreas/project/gossip/16x16/status-busy.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:modified="true"> + <defs + id="defs6943"> + <linearGradient + inkscape:collect="always" + id="linearGradient5899"> + <stop + style="stop-color:#fce94f;stop-opacity:1" + offset="0" + id="stop5901" /> + <stop + style="stop-color:#edd400;stop-opacity:1" + offset="1" + id="stop5903" /> + </linearGradient> + <radialGradient + inkscape:collect="always" + xlink:href="#linearGradient5899" + id="radialGradient5905" + cx="9.466115" + cy="8.9839392" + fx="9.466115" + fy="8.9839392" + r="6.7474474" + gradientTransform="matrix(1.1671849,-3.2679277e-3,2.7524467e-3,1.0150183,-1.6222549,-0.2024225)" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="15.696217" + inkscape:cx="17.665904" + inkscape:cy="9.7718474" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1674" + inkscape:window-height="969" + inkscape:window-x="0" + inkscape:window-y="26" /> + <metadata + id="metadata6946"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + sodipodi:type="arc" + style="opacity:1;fill:url(#radialGradient5905);fill-opacity:1;stroke:#8d7300;stroke-width:0.97113222;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path4926" + sodipodi:cx="7.9737625" + sodipodi:cy="7.7221532" + sodipodi:rx="6.2618814" + sodipodi:ry="6.3632426" + d="M 14.235644 7.7221532 A 6.2618814 6.3632426 0 1 1 1.7118812,7.7221532 A 6.2618814 6.3632426 0 1 1 14.235644 7.7221532 z" + transform="matrix(1.0380267,0,0,1.0214918,-0.2769782,0.1118841)" /> + <path + sodipodi:type="arc" + style="opacity:0.6;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1.14770162;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5897" + sodipodi:cx="7.9737625" + sodipodi:cy="7.7221532" + sodipodi:rx="6.2618814" + sodipodi:ry="6.3632426" + d="M 14.235644 7.7221532 A 6.2618814 6.3632426 0 1 1 1.7118812,7.7221532 A 6.2618814 6.3632426 0 1 1 14.235644 7.7221532 z" + transform="matrix(0.8783303,0,0,0.8643392,0.996403,1.3254404)" /> + <rect + style="opacity:1;fill:#eeeeec;fill-opacity:1;stroke:#888a85;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect5886" + width="9.000001" + height="9" + x="5.5" + y="5.5" + rx="0" + ry="0" /> + <rect + style="opacity:1;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect5969" + width="7" + height="7" + x="6.5" + y="6.5" + rx="0" + ry="0" /> + <path + sodipodi:type="arc" + style="opacity:1;fill:#8d7300;fill-opacity:1;stroke:none;stroke-width:1.46393549;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="path5888" + sodipodi:cx="10.676733" + sodipodi:cy="7.8460393" + sodipodi:rx="1.4415842" + sodipodi:ry="1.4866337" + d="M 12.118317 7.8460393 A 1.4415842 1.4866337 0 1 1 9.2351488,7.8460393 A 1.4415842 1.4866337 0 1 1 12.118317 7.8460393 z" + transform="matrix(0.6936814,0,0,0.6726606,2.5937487,2.7222784)" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999994px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" + d="M 7.4772272,10.5 L 11.522773,10.5" + id="path5883" /> + <path + style="fill:none;fill-rule:evenodd;stroke:#888a85;stroke-width:1px;stroke-linecap:round;stroke-linejoin:miter;stroke-opacity:1" + d="M 7.4872926,12.5 L 11.524094,12.5" + id="path5885" /> + </g> +</svg> diff --git a/data/scalable/status-offline.svg b/data/scalable/status-offline.svg new file mode 100644 index 000000000..975f7dc8f --- /dev/null +++ b/data/scalable/status-offline.svg @@ -0,0 +1,101 @@ +<?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://web.resource.org/cc/" + 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="16px" + height="16px" + id="svg6941" + sodipodi:version="0.32" + inkscape:version="0.44+devel" + sodipodi:docbase="/home/andreas/project/gossip/16x16" + sodipodi:docname="status-offline.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:export-filename="/home/andreas/project/gossip/16x16/status-offline.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:modified="true"> + <defs + id="defs6943"> + <linearGradient + inkscape:collect="always" + id="linearGradient7922"> + <stop + style="stop-color:#e8e8e6;stop-opacity:1" + offset="0" + id="stop7924" /> + <stop + style="stop-color:#babdb6;stop-opacity:1" + offset="1" + id="stop7926" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient7922" + id="linearGradient7928" + x1="0.67574239" + y1="0.81831664" + x2="9.8658419" + y2="10.594059" + gradientUnits="userSpaceOnUse" + gradientTransform="matrix(0.8666667,0,0,0.8666667,1.0666667,1.0666666)" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="22.197802" + inkscape:cx="15.038145" + inkscape:cy="7.8865336" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:grid-bbox="true" + inkscape:document-units="px" + inkscape:window-width="1674" + inkscape:window-height="969" + inkscape:window-x="0" + inkscape:window-y="26" /> + <metadata + id="metadata6946"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <rect + style="opacity:1;fill:url(#linearGradient7928);fill-opacity:1;stroke:#555753;stroke-width:0.99999994;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect6949" + width="13" + height="13" + x="1.5" + y="1.4999999" + rx="1.4641089" + ry="1.4641089" /> + <rect + style="opacity:0.4;fill:none;fill-opacity:1;stroke:#ffffff;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect7920" + width="11" + height="11" + x="2.5" + y="2.5" + rx="0.45049509" + ry="0.45049506" /> + </g> +</svg> diff --git a/data/scalable/status-pending.svg b/data/scalable/status-pending.svg new file mode 100644 index 000000000..89c626c85 --- /dev/null +++ b/data/scalable/status-pending.svg @@ -0,0 +1,103 @@ +<?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://web.resource.org/cc/" + 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="22" + height="22" + id="svg4908" + sodipodi:version="0.32" + inkscape:version="0.44+devel" + version="1.0" + sodipodi:docbase="/home/andreas/project/misc icons/22x22" + sodipodi:docname="status-pending.svg" + inkscape:output_extension="org.inkscape.output.svg.inkscape" + inkscape:export-filename="/home/andreas/project/misc icons/22x22/status-pending.png" + inkscape:export-xdpi="90" + inkscape:export-ydpi="90" + sodipodi:modified="TRUE"> + <defs + id="defs4910"> + <linearGradient + inkscape:collect="always" + id="linearGradient5898"> + <stop + style="stop-color:#555753;stop-opacity:1;" + offset="0" + id="stop5900" /> + <stop + style="stop-color:#3b3c39;stop-opacity:1" + offset="1" + id="stop5902" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient5898" + id="linearGradient5904" + x1="13.756032" + y1="6.1055899" + x2="11.815526" + y2="10.317804" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="32" + inkscape:cx="13.74062" + inkscape:cy="11.30699" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:grid-bbox="true" + inkscape:document-units="px" + width="22px" + height="22px" + inkscape:window-width="1680" + inkscape:window-height="973" + inkscape:window-x="0" + inkscape:window-y="26" /> + <metadata + id="metadata4913"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + </cc:Work> + </rdf:RDF> + </metadata> + <g + id="layer1" + inkscape:label="Layer 1" + inkscape:groupmode="layer"> + <path + transform="scale(1.0248552,0.9757476)" + style="font-size:26.23629379px;font-style:normal;font-weight:normal;fill:url(#linearGradient5904);fill-opacity:1.0;stroke:#2e3436;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans" + d="M 11.275218,14.919035 L 7.3476583,14.919035 L 7.3476583,13.925219 C 7.3476538,13.224909 7.4885713,12.605727 7.7704111,12.067669 C 8.0522411,11.521089 8.3408215,10.829313 9.246116,9.9923373 L 10.066,9.2493173 C 10.552798,8.8052256 10.907227,8.3867434 11.129288,7.9938696 C 11.359871,7.6010219 11.475167,7.2081611 11.475176,6.8152861 C 11.475167,6.2174687 11.270196,5.7520141 10.860263,5.4189209 C 10.450313,5.0773184 9.8781028,4.9065094 9.1436305,4.9064933 C 8.4518474,4.9065094 7.7045578,5.0516971 6.9017597,5.3420567 C 6.0989529,5.6239073 5.2619887,6.0466597 4.3908644,6.6103151 L 4.3908644,2.5877583 C 5.4242572,2.2290778 6.3679772,1.9643238 7.222027,1.7934955 C 8.0760675,1.6227057 8.9002211,1.5373012 9.6944902,1.5372817 C 11.778353,1.5373012 13.366877,1.9643238 14.460067,2.8183508 C 15.553233,3.6638737 16.099822,4.9022392 16.099835,6.5334509 C 16.099822,7.3704297 15.933283,8.1219894 15.600218,8.7881324 C 15.267128,9.4457594 14.699188,10.154617 13.896397,10.914707 L 13.076512,11.644916 C 12.495751,12.174434 11.723583,12.601456 11.544243,12.925985 C 11.364884,13.24199 11.275209,13.592149 11.275218,13.976462 L 11.275218,14.919035 M 7.3040896,16.952301 L 11.275218,16.952301 L 11.275218,21.009531 L 7.3040896,21.009531 L 7.3040896,16.952301" + id="text4916" + sodipodi:nodetypes="cccsccsssssccsssssccsccccccc" /> + <path + style="font-size:26.23629379px;font-style:normal;font-weight:normal;fill:none;fill-opacity:1;stroke:#eeeeec;stroke-width:1.00000024px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:Bitstream Vera Sans;opacity:0.3" + d="M 10.531174,13.500001 L 8.5164063,13.500001 C 8.5164063,12.945747 8.7402784,12.078404 9.502579,11.143944 C 10.535614,9.6270452 12.892911,8.6362695 12.800574,6.4913892 C 12.708237,4.3018572 10.841095,3.7491649 9.4251268,3.7085782 C 8.0538104,3.6679915 6.7663299,4.0790254 5.5,4.8038685 L 5.5,3.3107849 C 6.3825651,3.0144106 7.1885459,2.7956469 7.9179435,2.6544931 C 8.6473335,2.5133711 9.3511984,2.4428023 10.029541,2.4427861 C 13.078781,2.3815955 15.397539,3.3494535 15.500001,6.5710727 C 15.213972,9.3832031 12.116268,10.497789 10.531174,12.721162 L 10.531174,13.500001" + id="path4925" + sodipodi:nodetypes="ccczzccscccc" /> + <rect + style="opacity:0.3;fill:none;fill-opacity:1;stroke:#eeeeec;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" + id="rect5896" + width="1.9715405" + height="1.9651624" + x="8.5284595" + y="17.534838" /> + </g> +</svg> diff --git a/libempathy-gtk/Makefile.am b/libempathy-gtk/Makefile.am index 2818b2a23..c5b66b744 100644 --- a/libempathy-gtk/Makefile.am +++ b/libempathy-gtk/Makefile.am @@ -10,6 +10,7 @@ noinst_LTLIBRARIES = libempathy-gtk.la libempathy_gtk_la_SOURCES = \ ephy-spinner.c ephy-spinner.h \ + empathy-images.h \ empathy-main-window.c empathy-main-window.h \ gossip-accounts-dialog.c gossip-accounts-dialog.h \ gossip-account-widget-generic.c gossip-account-widget-generic.h \ @@ -17,7 +18,6 @@ libempathy_gtk_la_SOURCES = \ gossip-profile-chooser.c gossip-profile-chooser.h \ gossip-cell-renderer-expander.c gossip-cell-renderer-expander.h \ gossip-cell-renderer-text.c gossip-cell-renderer-text.h \ - gossip-stock.c gossip-stock.h \ gossip-spell.c gossip-spell.h \ gossip-contact-groups.c gossip-contact-groups.h \ gossip-contact-list.c gossip-contact-list.h \ diff --git a/libempathy-gtk/empathy-images.h b/libempathy-gtk/empathy-images.h new file mode 100644 index 000000000..439f4c92e --- /dev/null +++ b/libempathy-gtk/empathy-images.h @@ -0,0 +1,42 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ +/* + * Copyright (C) 2007 Collabora Ltd. + * + * 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. + * + * Authors: Xavier Claessens <xclaesse@gmail.com> + */ + +#ifndef __EMPATHY_IMAGES_H__ +#define __EMPATHY_IMAGES_H__ + +G_BEGIN_DECLS + +#define EMPATHY_IMAGE_OFFLINE "empathy-offline" +#define EMPATHY_IMAGE_AVAILABLE "empathy-available" +#define EMPATHY_IMAGE_BUSY "empathy-busy" +#define EMPATHY_IMAGE_AWAY "empathy-away" +#define EMPATHY_IMAGE_EXT_AWAY "empathy-extended-away" +#define EMPATHY_IMAGE_PENDING "empathy-pending" + +#define EMPATHY_IMAGE_MESSAGE "empathy-message" +#define EMPATHY_IMAGE_TYPING "empathy-typing" +#define EMPATHY_IMAGE_CONTACT_INFORMATION "vcard_16" +#define EMPATHY_IMAGE_GROUP_MESSAGE "gossip-group-message" + +G_END_DECLS + +#endif /* __EMPATHY_IMAGES_ICONS_H__ */ diff --git a/libempathy-gtk/gossip-accounts-dialog.c b/libempathy-gtk/gossip-accounts-dialog.c index ad9f79765..449577aec 100644 --- a/libempathy-gtk/gossip-accounts-dialog.c +++ b/libempathy-gtk/gossip-accounts-dialog.c @@ -305,15 +305,12 @@ accounts_dialog_update_account (GossipAccountsDialog *dialog, if (account) { McProfile *profile; - GdkPixbuf *pixbuf; - - pixbuf = gossip_pixbuf_from_account (account, GTK_ICON_SIZE_DIALOG); - gtk_image_set_from_pixbuf (GTK_IMAGE (dialog->image_type), pixbuf); - if (pixbuf) { - g_object_unref (pixbuf); - } profile = mc_account_get_profile (account); + gtk_image_set_from_icon_name (GTK_IMAGE (dialog->image_type), + mc_profile_get_icon_name (profile), + GTK_ICON_SIZE_DIALOG); + gtk_label_set_text (GTK_LABEL (dialog->label_type), mc_profile_get_display_name (profile)); @@ -412,6 +409,7 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column, GossipAccountsDialog *dialog) { McAccount *account; + const gchar *icon_name; GdkPixbuf *pixbuf; TelepathyConnectionStatus status; @@ -420,7 +418,8 @@ accounts_dialog_model_pixbuf_data_func (GtkTreeViewColumn *tree_column, COL_ACCOUNT_POINTER, &account, -1); - pixbuf = gossip_pixbuf_from_account (account, GTK_ICON_SIZE_BUTTON); + icon_name = gossip_icon_name_from_account (account); + pixbuf = gossip_pixbuf_from_icon_name (icon_name, GTK_ICON_SIZE_BUTTON); if (pixbuf) { if (status == TP_CONN_STATUS_DISCONNECTED || diff --git a/libempathy-gtk/gossip-chat-window.c b/libempathy-gtk/gossip-chat-window.c index 9f6f1a363..feeda5e00 100644 --- a/libempathy-gtk/gossip-chat-window.c +++ b/libempathy-gtk/gossip-chat-window.c @@ -40,6 +40,7 @@ #include <libempathy/gossip-conf.h> #include "gossip-chat-window.h" +#include "empathy-images.h" //#include "gossip-add-contact-dialog.h" //#include "gossip-chat-invite.h" //#include "gossip-contact-info-dialog.h" @@ -48,7 +49,6 @@ #include "gossip-preferences.h" #include "gossip-private-chat.h" //#include "gossip-sound.h" -#include "gossip-stock.h" #include "gossip-ui-utils.h" #define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CHAT_WINDOW, GossipChatWindowPriv)) @@ -106,8 +106,6 @@ struct _GossipChatWindowPriv { static void gossip_chat_window_class_init (GossipChatWindowClass *klass); static void gossip_chat_window_init (GossipChatWindow *window); static void gossip_chat_window_finalize (GObject *object); -static GdkPixbuf *chat_window_get_status_pixbuf (GossipChatWindow *window, - GossipChat *chat); static void chat_window_accel_cb (GtkAccelGroup *accelgroup, GObject *object, guint key, @@ -354,9 +352,9 @@ gossip_chat_window_init (GossipChatWindow *window) * stock image */ image = gtk_image_menu_item_get_image (GTK_IMAGE_MENU_ITEM (priv->menu_conv_info)); - gtk_image_set_from_stock (GTK_IMAGE (image), - GOSSIP_STOCK_CONTACT_INFORMATION, - GTK_ICON_SIZE_MENU); + gtk_image_set_from_icon_name (GTK_IMAGE (image), + EMPATHY_IMAGE_CONTACT_INFORMATION, + GTK_ICON_SIZE_MENU); /* Set up smiley menu */ menu = gossip_chat_view_get_smiley_menu ( @@ -502,30 +500,6 @@ gossip_chat_window_finalize (GObject *object) G_OBJECT_CLASS (gossip_chat_window_parent_class)->finalize (object); } -static GdkPixbuf * -chat_window_get_status_pixbuf (GossipChatWindow *window, - GossipChat *chat) -{ - GossipChatWindowPriv *priv; - GdkPixbuf *pixbuf; - - priv = GET_PRIV (window); - - if (g_list_find (priv->chats_new_msg, chat)) { - pixbuf = gossip_stock_render (GOSSIP_STOCK_MESSAGE, - GTK_ICON_SIZE_MENU); - } - else if (g_list_find (priv->chats_composing, chat)) { - pixbuf = gossip_stock_render (GOSSIP_STOCK_TYPING, - GTK_ICON_SIZE_MENU); - } - else { - pixbuf = gossip_chat_get_status_pixbuf (chat); - } - - return pixbuf; -} - static void chat_window_accel_cb (GtkAccelGroup *accelgroup, GObject *object, @@ -668,15 +642,24 @@ static void chat_window_update_status (GossipChatWindow *window, GossipChat *chat) { - GtkImage *image; - GdkPixbuf *pixbuf; + GossipChatWindowPriv *priv; + GtkImage *image; + const gchar *icon_name = NULL; + + priv = GET_PRIV (window); - pixbuf = chat_window_get_status_pixbuf (window, chat); + if (g_list_find (priv->chats_new_msg, chat)) { + icon_name = EMPATHY_IMAGE_MESSAGE; + } + else if (g_list_find (priv->chats_composing, chat)) { + icon_name = EMPATHY_IMAGE_TYPING; + } + else { + icon_name = gossip_chat_get_status_icon_name (chat); + } image = g_object_get_data (G_OBJECT (chat), "chat-window-tab-image"); - gtk_image_set_from_pixbuf (image, pixbuf); + gtk_image_set_from_icon_name (image, icon_name, GTK_ICON_SIZE_MENU); - g_object_unref (pixbuf); - chat_window_update_title (window, chat); chat_window_update_tooltip (window, chat); } @@ -686,7 +669,6 @@ chat_window_update_title (GossipChatWindow *window, GossipChat *chat) { GossipChatWindowPriv *priv; - GdkPixbuf *pixbuf = NULL; const gchar *str; gchar *title; gint n_chats; @@ -742,16 +724,10 @@ chat_window_update_title (GossipChatWindow *window, g_free (title); if (priv->chats_new_msg) { - pixbuf = gossip_stock_render (GOSSIP_STOCK_MESSAGE, - GTK_ICON_SIZE_MENU); + gtk_window_set_icon_name (GTK_WINDOW (priv->dialog), + EMPATHY_IMAGE_MESSAGE); } else { - pixbuf = NULL; - } - - gtk_window_set_icon (GTK_WINDOW (priv->dialog), pixbuf); - - if (pixbuf) { - g_object_unref (pixbuf); + gtk_window_set_icon_name (GTK_WINDOW (priv->dialog), NULL); } } diff --git a/libempathy-gtk/gossip-chat.c b/libempathy-gtk/gossip-chat.c index 85aeee274..e8906dbdd 100644 --- a/libempathy-gtk/gossip-chat.c +++ b/libempathy-gtk/gossip-chat.c @@ -1072,13 +1072,13 @@ gossip_chat_get_tooltip (GossipChat *chat) return NULL; } -GdkPixbuf * -gossip_chat_get_status_pixbuf (GossipChat *chat) +const gchar * +gossip_chat_get_status_icon_name (GossipChat *chat) { g_return_val_if_fail (GOSSIP_IS_CHAT (chat), NULL); - if (GOSSIP_CHAT_GET_CLASS (chat)->get_status_pixbuf) { - return GOSSIP_CHAT_GET_CLASS (chat)->get_status_pixbuf (chat); + if (GOSSIP_CHAT_GET_CLASS (chat)->get_status_icon_name) { + return GOSSIP_CHAT_GET_CLASS (chat)->get_status_icon_name (chat); } return NULL; diff --git a/libempathy-gtk/gossip-chat.h b/libempathy-gtk/gossip-chat.h index 3de788eef..8cbcee0b6 100644 --- a/libempathy-gtk/gossip-chat.h +++ b/libempathy-gtk/gossip-chat.h @@ -66,27 +66,26 @@ struct _GossipChatClass { GObjectClass parent; /* VTable */ - const gchar * (*get_name) (GossipChat *chat); - gchar * (*get_tooltip) (GossipChat *chat); - GdkPixbuf * (*get_status_pixbuf)(GossipChat *chat); - GossipContact * (*get_contact) (GossipChat *chat); - GtkWidget * (*get_widget) (GossipChat *chat); - - gboolean (*get_show_contacts)(GossipChat *chat); - void (*set_show_contacts)(GossipChat *chat, - gboolean show); - - gboolean (*is_group_chat) (GossipChat *chat); - void (*save_geometry) (GossipChat *chat, - gint x, - gint y, - gint w, - gint h); - void (*load_geometry) (GossipChat *chat, - gint *x, - gint *y, - gint *w, - gint *h); + const gchar * (*get_name) (GossipChat *chat); + gchar * (*get_tooltip) (GossipChat *chat); + const gchar * (*get_status_icon_name)(GossipChat *chat); + GossipContact * (*get_contact) (GossipChat *chat); + GtkWidget * (*get_widget) (GossipChat *chat); + + gboolean (*get_show_contacts) (GossipChat *chat); + void (*set_show_contacts) (GossipChat *chat, + gboolean show); + gboolean (*is_group_chat) (GossipChat *chat); + void (*save_geometry) (GossipChat *chat, + gint x, + gint y, + gint w, + gint h); + void (*load_geometry) (GossipChat *chat, + gint *x, + gint *y, + gint *w, + gint *h); }; GType gossip_chat_get_type (void); @@ -103,14 +102,13 @@ void gossip_chat_copy (GossipChat *chat); void gossip_chat_paste (GossipChat *chat); const gchar * gossip_chat_get_name (GossipChat *chat); gchar * gossip_chat_get_tooltip (GossipChat *chat); -GdkPixbuf * gossip_chat_get_status_pixbuf (GossipChat *chat); +const gchar * gossip_chat_get_status_icon_name (GossipChat *chat); GossipContact * gossip_chat_get_contact (GossipChat *chat); GossipContact * gossip_chat_get_own_contact (GossipChat *chat); GtkWidget * gossip_chat_get_widget (GossipChat *chat); gboolean gossip_chat_get_show_contacts (GossipChat *chat); void gossip_chat_set_show_contacts (GossipChat *chat, gboolean show); - gboolean gossip_chat_is_group_chat (GossipChat *chat); gboolean gossip_chat_is_connected (GossipChat *chat); diff --git a/libempathy-gtk/gossip-contact-list.c b/libempathy-gtk/gossip-contact-list.c index bf0556dcb..aa5eb3855 100644 --- a/libempathy-gtk/gossip-contact-list.c +++ b/libempathy-gtk/gossip-contact-list.c @@ -37,11 +37,11 @@ #include <libempathy/empathy-contact-manager.h> #include <libempathy/gossip-debug.h> +#include "empathy-images.h" #include "gossip-contact-list.h" #include "gossip-contact-groups.h" #include "gossip-cell-renderer-expander.h" #include "gossip-cell-renderer-text.h" -#include "gossip-stock.h" #include "gossip-ui-utils.h" //#include "gossip-chat-invite.h" //#include "gossip-contact-info-dialog.h" @@ -257,7 +257,7 @@ static gboolean contact_list_update_list_mode_foreach (GtkTreeModel GossipContactList *list); enum { - COL_PIXBUF_STATUS, + COL_ICON_STATUS, COL_PIXBUF_AVATAR, COL_PIXBUF_AVATAR_VISIBLE, COL_NAME, @@ -288,11 +288,11 @@ static const GtkActionEntry entries[] = { N_("_Group"),NULL, NULL, NULL }, - { "Chat", GOSSIP_STOCK_MESSAGE, + { "Chat", EMPATHY_IMAGE_MESSAGE, N_("_Chat"), NULL, N_("Chat with contact"), G_CALLBACK (contact_list_action_cb) }, - { "Information", GOSSIP_STOCK_CONTACT_INFORMATION, + { "Information", EMPATHY_IMAGE_CONTACT_INFORMATION, N_("Infor_mation"), "<control>I", N_("View contact information"), G_CALLBACK (contact_list_action_cb) }, @@ -308,7 +308,7 @@ static const GtkActionEntry entries[] = { N_("_Remove"), NULL, N_("Remove contact"), G_CALLBACK (contact_list_action_cb) }, - { "Invite", GOSSIP_STOCK_GROUP_MESSAGE, + { "Invite", EMPATHY_IMAGE_GROUP_MESSAGE, N_("_Invite to Chat Room"), NULL, N_("Invite to a currently open chat room"), G_CALLBACK (contact_list_action_cb) }, @@ -602,7 +602,6 @@ contact_list_contact_update (GossipContactList *list, gboolean do_remove = FALSE; gboolean do_set_active = FALSE; gboolean do_set_refresh = FALSE; - GdkPixbuf *pixbuf_presence; GdkPixbuf *pixbuf_avatar; priv = GET_PRIV (list); @@ -701,11 +700,10 @@ contact_list_contact_update (GossipContactList *list, set_model = TRUE; } - pixbuf_presence = gossip_pixbuf_for_contact (contact); pixbuf_avatar = gossip_pixbuf_avatar_from_contact_scaled (contact, 32, 32); for (l = iters; l && set_model; l = l->next) { gtk_tree_store_set (priv->store, l->data, - COL_PIXBUF_STATUS, pixbuf_presence, + COL_ICON_STATUS, gossip_icon_name_for_contact (contact), COL_STATUS, gossip_contact_get_status (contact), COL_IS_ONLINE, now_online, COL_NAME, gossip_contact_get_name (contact), @@ -713,9 +711,6 @@ contact_list_contact_update (GossipContactList *list, -1); } - if (pixbuf_presence) { - g_object_unref (pixbuf_presence); - } if (pixbuf_avatar) { g_object_unref (pixbuf_avatar); } @@ -1036,7 +1031,7 @@ contact_list_get_group (GossipContactList *list, gtk_tree_store_append (priv->store, &iter_group, NULL); gtk_tree_store_set (priv->store, &iter_group, - COL_PIXBUF_STATUS, NULL, + COL_ICON_STATUS, NULL, COL_NAME, name, COL_IS_GROUP, TRUE, COL_IS_ACTIVE, FALSE, @@ -1102,11 +1097,9 @@ contact_list_add_contact (GossipContactList *list, /* If no groups just add it at the top level. */ groups = gossip_contact_get_groups (contact); if (!groups) { - GdkPixbuf *pixbuf_status; GdkPixbuf *pixbuf_avatar; gboolean show_avatar = FALSE; - pixbuf_status = gossip_pixbuf_for_contact (contact); pixbuf_avatar = gossip_pixbuf_avatar_from_contact_scaled (contact, 32, 32); if (priv->show_avatars && !priv->is_compact) { @@ -1125,7 +1118,7 @@ contact_list_add_contact (GossipContactList *list, gtk_tree_store_append (priv->store, &iter, NULL); gtk_tree_store_set (priv->store, &iter, - COL_PIXBUF_STATUS, pixbuf_status, + COL_ICON_STATUS, gossip_icon_name_for_contact (contact), COL_PIXBUF_AVATAR, pixbuf_avatar, COL_PIXBUF_AVATAR_VISIBLE, show_avatar, COL_NAME, gossip_contact_get_name (contact), @@ -1145,16 +1138,12 @@ contact_list_add_contact (GossipContactList *list, if (pixbuf_avatar) { g_object_unref (pixbuf_avatar); } - if (pixbuf_status) { - g_object_unref (pixbuf_status); - } } /* Else add to each group. */ for (l = groups; l; l = l->next) { GtkTreePath *path; GtkTreeIter model_iter_group; - GdkPixbuf *pixbuf_status; GdkPixbuf *pixbuf_avatar; const gchar *name; gboolean created; @@ -1166,7 +1155,6 @@ contact_list_add_contact (GossipContactList *list, continue; } - pixbuf_status = gossip_pixbuf_for_contact (contact); pixbuf_avatar = gossip_pixbuf_avatar_from_contact_scaled (contact, 32, 32); contact_list_get_group (list, name, &iter_group, &iter_separator, &created); @@ -1187,7 +1175,7 @@ contact_list_add_contact (GossipContactList *list, gtk_tree_store_insert_after (priv->store, &iter, &iter_group, NULL); gtk_tree_store_set (priv->store, &iter, - COL_PIXBUF_STATUS, pixbuf_status, + COL_ICON_STATUS, gossip_icon_name_for_contact (contact), COL_PIXBUF_AVATAR, pixbuf_avatar, COL_PIXBUF_AVATAR_VISIBLE, show_avatar, COL_NAME, gossip_contact_get_name (contact), @@ -1207,9 +1195,6 @@ contact_list_add_contact (GossipContactList *list, if (pixbuf_avatar) { g_object_unref (pixbuf_avatar); } - if (pixbuf_status) { - g_object_unref (pixbuf_status); - } if (!created) { continue; @@ -1303,7 +1288,7 @@ contact_list_create_model (GossipContactList *list) } priv->store = gtk_tree_store_new (COL_COUNT, - GDK_TYPE_PIXBUF, /* Status pixbuf */ + G_TYPE_STRING, /* Status icon-name */ GDK_TYPE_PIXBUF, /* Avatar pixbuf */ G_TYPE_BOOLEAN, /* Avatar pixbuf visible */ G_TYPE_STRING, /* Name */ @@ -1834,9 +1819,6 @@ contact_list_cell_set_background (GossipContactList *list, NULL); } } else { - g_object_set (cell, - "cell-background-gdk", NULL, - NULL); #if 0 gint color_sum_normal; gint color_sum_selected; @@ -1873,24 +1855,22 @@ contact_list_pixbuf_cell_data_func (GtkTreeViewColumn *tree_column, GtkTreeIter *iter, GossipContactList *list) { - GdkPixbuf *pixbuf; - gboolean is_group; - gboolean is_active; + gchar *icon_name; + gboolean is_group; + gboolean is_active; gtk_tree_model_get (model, iter, COL_IS_GROUP, &is_group, COL_IS_ACTIVE, &is_active, - COL_PIXBUF_STATUS, &pixbuf, + COL_ICON_STATUS, &icon_name, -1); g_object_set (cell, "visible", !is_group, - "pixbuf", pixbuf, + "icon-name", icon_name, NULL); - if (pixbuf) { - g_object_unref (pixbuf); - } + g_free (icon_name); contact_list_cell_set_background (list, cell, is_group, is_active); } diff --git a/libempathy-gtk/gossip-preferences.c b/libempathy-gtk/gossip-preferences.c index 2179a7efa..a02a4fa96 100644 --- a/libempathy-gtk/gossip-preferences.c +++ b/libempathy-gtk/gossip-preferences.c @@ -33,7 +33,6 @@ #include <libempathy/gossip-conf.h> #include "gossip-preferences.h" -#include "gossip-stock.h" #include "gossip-ui-utils.h" #include "gossip-theme-manager.h" #include "gossip-spell.h" diff --git a/libempathy-gtk/gossip-presence-chooser.c b/libempathy-gtk/gossip-presence-chooser.c index e540c8a4e..46b275456 100644 --- a/libempathy-gtk/gossip-presence-chooser.c +++ b/libempathy-gtk/gossip-presence-chooser.c @@ -34,7 +34,7 @@ #include <libempathy/empathy-marshal.h> #include "gossip-ui-utils.h" -#include "gossip-stock.h" +#include "empathy-images.h" #include "gossip-presence-chooser.h" #include "gossip-status-presets.h" @@ -321,7 +321,6 @@ presence_chooser_show_dialog (GossipPresenceChooser *chooser, GtkWidget *combo; GtkWidget *entry; GtkWidget *checkbutton; - GdkPixbuf *pixbuf; const gchar *default_status; priv = GET_PRIV (chooser); @@ -355,9 +354,9 @@ presence_chooser_show_dialog (GossipPresenceChooser *chooser, G_CALLBACK (presence_chooser_dialog_response_cb), chooser); - pixbuf = gossip_pixbuf_for_presence_state (state); - gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf); - g_object_unref (pixbuf); + gtk_image_set_from_icon_name (GTK_IMAGE (image), + gossip_icon_name_for_presence_state (state), + GTK_ICON_SIZE_MENU); if (!store[state]) { GList *presets, *l; @@ -486,10 +485,10 @@ presence_chooser_menu_add_item (GossipPresenceChooser *chooser, { GtkWidget *item; GtkWidget *image; - const gchar *stock; + const gchar *icon_name; item = gtk_image_menu_item_new_with_label (str); - stock = gossip_stock_for_state (state); + icon_name = gossip_icon_name_for_presence_state (state); if (custom) { g_signal_connect ( @@ -505,7 +504,7 @@ presence_chooser_menu_add_item (GossipPresenceChooser *chooser, chooser); } - image = gtk_image_new_from_stock (stock, GTK_ICON_SIZE_MENU); + image = gtk_image_new_from_icon_name (icon_name, GTK_ICON_SIZE_MENU); gtk_widget_show (image); gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image); @@ -943,7 +942,6 @@ presence_chooser_flash_timeout_cb (GossipPresenceChooser *chooser) { GossipPresenceChooserPriv *priv; McPresence state; - GdkPixbuf *pixbuf; static gboolean on = FALSE; priv = GET_PRIV (chooser); @@ -954,9 +952,9 @@ presence_chooser_flash_timeout_cb (GossipPresenceChooser *chooser) state = priv->flash_state_2; } - pixbuf = gossip_pixbuf_for_presence_state (state); - gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), pixbuf); - g_object_unref (pixbuf); + gtk_image_set_from_icon_name (GTK_IMAGE (priv->image), + gossip_icon_name_for_presence_state (state), + GTK_ICON_SIZE_MENU); on = !on; @@ -991,7 +989,6 @@ gossip_presence_chooser_flash_stop (GossipPresenceChooser *chooser, McPresence state) { GossipPresenceChooserPriv *priv; - GdkPixbuf *pixbuf; g_return_if_fail (GOSSIP_IS_PRESENCE_CHOOSER (chooser)); @@ -1002,9 +999,9 @@ gossip_presence_chooser_flash_stop (GossipPresenceChooser *chooser, priv->flash_timeout_id = 0; } - pixbuf = gossip_pixbuf_for_presence_state (state); - gtk_image_set_from_pixbuf (GTK_IMAGE (priv->image), pixbuf); - g_object_unref (pixbuf); + gtk_image_set_from_icon_name (GTK_IMAGE (priv->image), + gossip_icon_name_for_presence_state (state), + GTK_ICON_SIZE_MENU); priv->last_state = state; } diff --git a/libempathy-gtk/gossip-private-chat.c b/libempathy-gtk/gossip-private-chat.c index 17c55b19c..a3bdbb6be 100644 --- a/libempathy-gtk/gossip-private-chat.c +++ b/libempathy-gtk/gossip-private-chat.c @@ -44,7 +44,7 @@ #include "gossip-chat.h" #include "gossip-preferences.h" //#include "gossip-sound.h" -#include "gossip-stock.h" +#include "empathy-images.h" #include "gossip-ui-utils.h" #define DEBUG_DOMAIN "PrivateChat" @@ -78,13 +78,9 @@ static void private_chat_widget_destroy_cb (GtkWidget GossipPrivateChat *chat); static const gchar * private_chat_get_name (GossipChat *chat); static gchar * private_chat_get_tooltip (GossipChat *chat); -static GdkPixbuf * private_chat_get_status_pixbuf (GossipChat *chat); +static const gchar * private_chat_get_status_icon_name (GossipChat *chat); static GossipContact *private_chat_get_contact (GossipChat *chat); static GtkWidget * private_chat_get_widget (GossipChat *chat); -/*static GdkPixbuf * private_chat_pad_to_size (GdkPixbuf *pixbuf, - gint width, - gint height, - gint extra_padding_right);*/ G_DEFINE_TYPE (GossipPrivateChat, gossip_private_chat, GOSSIP_TYPE_CHAT); @@ -96,14 +92,14 @@ gossip_private_chat_class_init (GossipPrivateChatClass *klass) object_class->finalize = private_chat_finalize; - chat_class->get_name = private_chat_get_name; - chat_class->get_tooltip = private_chat_get_tooltip; - chat_class->get_status_pixbuf = private_chat_get_status_pixbuf; - chat_class->get_contact = private_chat_get_contact; - chat_class->get_widget = private_chat_get_widget; - chat_class->get_show_contacts = NULL; - chat_class->set_show_contacts = NULL; - chat_class->is_group_chat = NULL; + chat_class->get_name = private_chat_get_name; + chat_class->get_tooltip = private_chat_get_tooltip; + chat_class->get_status_icon_name = private_chat_get_status_icon_name; + chat_class->get_contact = private_chat_get_contact; + chat_class->get_widget = private_chat_get_widget; + chat_class->get_show_contacts = NULL; + chat_class->set_show_contacts = NULL; + chat_class->is_group_chat = NULL; g_type_class_add_private (object_class, sizeof (GossipPrivateChatPriv)); } @@ -283,8 +279,8 @@ private_chat_get_tooltip (GossipChat *chat) status); } -static GdkPixbuf * -private_chat_get_status_pixbuf (GossipChat *chat) +static const gchar * +private_chat_get_status_icon_name (GossipChat *chat) { GossipPrivateChatPriv *priv; GossipContact *contact; @@ -295,7 +291,7 @@ private_chat_get_status_pixbuf (GossipChat *chat) contact = gossip_chat_get_contact (chat); - return gossip_pixbuf_for_contact (contact); + return gossip_icon_name_for_contact (contact); } static GossipContact * diff --git a/libempathy-gtk/gossip-profile-chooser.c b/libempathy-gtk/gossip-profile-chooser.c index 7accbefe4..96c072c9e 100644 --- a/libempathy-gtk/gossip-profile-chooser.c +++ b/libempathy-gtk/gossip-profile-chooser.c @@ -64,16 +64,16 @@ gossip_profile_chooser_new (void) /* set up combo box with new store */ store = gtk_list_store_new (COL_COUNT, - GDK_TYPE_PIXBUF, /* Icon */ - G_TYPE_STRING, /* Label */ - MC_TYPE_PROFILE); /* Profile */ + G_TYPE_STRING, /* Icon name */ + G_TYPE_STRING, /* Label */ + MC_TYPE_PROFILE); /* Profile */ combo_box = gtk_combo_box_new_with_model (GTK_TREE_MODEL (store)); renderer = gtk_cell_renderer_pixbuf_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, FALSE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer, - "pixbuf", COL_ICON, + "icon-name", COL_ICON, NULL); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, TRUE); @@ -89,7 +89,7 @@ gossip_profile_chooser_new (void) gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, - COL_ICON, gossip_pixbuf_from_profile (profile, GTK_ICON_SIZE_BUTTON), + COL_ICON, mc_profile_get_icon_name (profile), COL_LABEL, mc_profile_get_display_name (profile), COL_PROFILE, profile, -1); diff --git a/libempathy-gtk/gossip-stock.c b/libempathy-gtk/gossip-stock.c deleted file mode 100644 index 1490e65e7..000000000 --- a/libempathy-gtk/gossip-stock.c +++ /dev/null @@ -1,129 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2003-2007 Imendio AB - * - * 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. - * - * Authors: Mikael Hallendal <micke@imendio.com> - * Richard Hult <richard@imendio.com> - * Martyn Russell <martyn@imendio.com> - */ - -#include "config.h" - -#include <gtk/gtk.h> - -#include <libempathy/gossip-paths.h> - -#include "gossip-stock.h" - -static GtkIconFactory *icon_factory = NULL; -static GtkWidget *main_widget = NULL; - -static GtkStockItem stock_items[] = { - { GOSSIP_STOCK_OFFLINE, NULL }, - { GOSSIP_STOCK_AVAILABLE, NULL }, - { GOSSIP_STOCK_BUSY, NULL }, - { GOSSIP_STOCK_AWAY, NULL }, - { GOSSIP_STOCK_EXT_AWAY, NULL }, - { GOSSIP_STOCK_PENDING, NULL }, - { GOSSIP_STOCK_MESSAGE, NULL }, - { GOSSIP_STOCK_TYPING, NULL }, - { GOSSIP_STOCK_CONTACT_INFORMATION, NULL }, - { GOSSIP_STOCK_GROUP_MESSAGE, NULL } -}; - -void -gossip_stock_init (GtkWidget *widget) -{ - GtkIconSet *icon_set; - gint i; - - g_assert (icon_factory == NULL); - - main_widget = g_object_ref (widget); - - gtk_stock_add (stock_items, G_N_ELEMENTS (stock_items)); - - icon_factory = gtk_icon_factory_new (); - gtk_icon_factory_add_default (icon_factory); - g_object_unref (icon_factory); - - for (i = 0; i < G_N_ELEMENTS (stock_items); i++) { - gchar *path, *filename; - GdkPixbuf *pixbuf; - - filename = g_strdup_printf ("%s.png", stock_items[i].stock_id); - path = gossip_paths_get_image_path (filename); - pixbuf = gdk_pixbuf_new_from_file (path, NULL); - g_free (path); - g_free (filename); - - icon_set = gtk_icon_set_new_from_pixbuf (pixbuf); - - gtk_icon_factory_add (icon_factory, - stock_items[i].stock_id, - icon_set); - - gtk_icon_set_unref (icon_set); - - g_object_unref (pixbuf); - } -} - -void -gossip_stock_finalize (void) -{ - g_assert (icon_factory != NULL); - - gtk_icon_factory_remove_default (icon_factory); - g_object_unref (main_widget); - - main_widget = NULL; - icon_factory = NULL; -} - -GdkPixbuf * -gossip_stock_render (const gchar *stock, - GtkIconSize size) -{ - return gtk_widget_render_icon (main_widget, stock, size, NULL); -} - -const gchar * -gossip_stock_for_state (McPresence state) -{ - switch (state) { - case MC_PRESENCE_AVAILABLE: - return GOSSIP_STOCK_AVAILABLE; - case MC_PRESENCE_DO_NOT_DISTURB: - return GOSSIP_STOCK_BUSY; - case MC_PRESENCE_AWAY: - return GOSSIP_STOCK_AWAY; - case MC_PRESENCE_EXTENDED_AWAY: - return GOSSIP_STOCK_EXT_AWAY; - case MC_PRESENCE_HIDDEN: - case MC_PRESENCE_OFFLINE: - case MC_PRESENCE_UNSET: - return GOSSIP_STOCK_OFFLINE; - default: - g_assert_not_reached (); - } - - return NULL; -} - - diff --git a/libempathy-gtk/gossip-stock.h b/libempathy-gtk/gossip-stock.h deleted file mode 100644 index 8cf66eb65..000000000 --- a/libempathy-gtk/gossip-stock.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Copyright (C) 2003-2007 Imendio AB - * - * 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. - * - * Authors: Mikael Hallendal <micke@imendio.com> - * Richard Hult <richard@imendio.com> - * Martyn Russell <martyn@imendio.com> - */ - -#ifndef __GOSSIP_STOCK_H__ -#define __GOSSIP_STOCK_H__ - -#include <glib.h> -#include <gtk/gtk.h> - -#include <libmissioncontrol/mission-control.h> - -G_BEGIN_DECLS - -#define GOSSIP_STOCK_OFFLINE "gossip-offline" -#define GOSSIP_STOCK_AVAILABLE "gossip-available" -#define GOSSIP_STOCK_BUSY "gossip-busy" -#define GOSSIP_STOCK_AWAY "gossip-away" -#define GOSSIP_STOCK_EXT_AWAY "gossip-extended-away" -#define GOSSIP_STOCK_PENDING "gossip-pending" - -#define GOSSIP_STOCK_MESSAGE "gossip-message" -#define GOSSIP_STOCK_TYPING "gossip-typing" - - -#define GOSSIP_STOCK_CONTACT_INFORMATION "vcard_16" - -#define GOSSIP_STOCK_AIM "gossip-aim" -#define GOSSIP_STOCK_ICQ "gossip-icq" -#define GOSSIP_STOCK_MSN "gossip-msn" -#define GOSSIP_STOCK_YAHOO "gossip-yahoo" - -#define GOSSIP_STOCK_GROUP_MESSAGE "gossip-group-message" - -void gossip_stock_init (GtkWidget *widget); -void gossip_stock_finalize (void); -GdkPixbuf * gossip_stock_render (const gchar *stock, - GtkIconSize size); -const gchar * gossip_stock_for_state (McPresence state); - -G_END_DECLS - -#endif /* __GOSSIP_STOCK_ICONS_H__ */ diff --git a/libempathy-gtk/gossip-ui-utils.c b/libempathy-gtk/gossip-ui-utils.c index b6dfb8f92..9bf2fb36d 100644 --- a/libempathy-gtk/gossip-ui-utils.c +++ b/libempathy-gtk/gossip-ui-utils.c @@ -41,7 +41,9 @@ #include <libempathy/gossip-debug.h> #include "gossip-ui-utils.h" -#include "gossip-stock.h" +#include "empathy-images.h" + +#define DEBUG_DOMAIN "UiUtils" struct SizeData { gint width; @@ -200,24 +202,34 @@ gossip_glade_setup_size_group (GladeXML *gui, } GdkPixbuf * -gossip_pixbuf_from_smiley (GossipSmiley type, - GtkIconSize icon_size) +gossip_pixbuf_from_icon_name (const gchar *icon_name, + GtkIconSize icon_size) { GtkIconTheme *theme; GdkPixbuf *pixbuf = NULL; GError *error = NULL; - gint w, h; - gint size; - const gchar *icon_id; theme = gtk_icon_theme_get_default (); - if (!gtk_icon_size_lookup (icon_size, &w, &h)) { - size = 16; - } else { - size = (w + h) / 2; + pixbuf = gtk_icon_theme_load_icon (theme, + icon_name, + icon_size, + 0, + &error); + if (error) { + gossip_debug (DEBUG_DOMAIN, "Error loading icon: %s", error->message); + g_clear_error (&error); } + return pixbuf; +} + +GdkPixbuf * +gossip_pixbuf_from_smiley (GossipSmiley type, + GtkIconSize icon_size) +{ + const gchar *icon_id; + switch (type) { case GOSSIP_SMILEY_NORMAL: /* :) */ icon_id = "stock_smiley-1"; @@ -306,106 +318,79 @@ gossip_pixbuf_from_smiley (GossipSmiley type, icon_id = NULL; } - pixbuf = gtk_icon_theme_load_icon (theme, - icon_id, /* icon name */ - size, /* size */ - 0, /* flags */ - &error); - return pixbuf; + return gossip_pixbuf_from_icon_name (icon_id, icon_size); } -GdkPixbuf * -gossip_pixbuf_from_profile (McProfile *profile, - GtkIconSize icon_size) -{ - GtkIconTheme *theme; - gint size = 48; - gint w, h; - const gchar *icon_id = NULL; - GError *error = NULL; - - theme = gtk_icon_theme_get_default (); - - if (gtk_icon_size_lookup (icon_size, &w, &h)) { - size = (w + h) / 2; - } - - icon_id = mc_profile_get_icon_name (profile); - - theme = gtk_icon_theme_get_default (); - return gtk_icon_theme_load_icon (theme, - icon_id, /* Icon name */ - size, /* Size */ - 0, /* Flags */ - &error); -} - -GdkPixbuf * -gossip_pixbuf_from_account (McAccount *account, - GtkIconSize icon_size) +const gchar * +gossip_icon_name_from_account (McAccount *account) { McProfile *profile; profile = mc_account_get_profile (account); - return gossip_pixbuf_from_profile (profile, icon_size); + return mc_profile_get_icon_name (profile); } -GdkPixbuf * -gossip_pixbuf_for_presence_state (McPresence state) +const gchar * +gossip_icon_name_for_presence_state (McPresence state) { - const gchar *stock; - - stock = gossip_stock_for_state (state); + switch (state) { + case MC_PRESENCE_AVAILABLE: + return EMPATHY_IMAGE_AVAILABLE; + case MC_PRESENCE_DO_NOT_DISTURB: + return EMPATHY_IMAGE_BUSY; + case MC_PRESENCE_AWAY: + return EMPATHY_IMAGE_AWAY; + case MC_PRESENCE_EXTENDED_AWAY: + return EMPATHY_IMAGE_EXT_AWAY; + case MC_PRESENCE_HIDDEN: + case MC_PRESENCE_OFFLINE: + case MC_PRESENCE_UNSET: + return EMPATHY_IMAGE_OFFLINE; + default: + g_assert_not_reached (); + } - return gossip_stock_render (stock, GTK_ICON_SIZE_MENU); + return NULL; } -GdkPixbuf * -gossip_pixbuf_for_presence (GossipPresence *presence) +const gchar * +gossip_icon_name_for_presence (GossipPresence *presence) { McPresence state; g_return_val_if_fail (GOSSIP_IS_PRESENCE (presence), - gossip_pixbuf_offline ()); + EMPATHY_IMAGE_OFFLINE); state = gossip_presence_get_state (presence); - return gossip_pixbuf_for_presence_state (state); + return gossip_icon_name_for_presence_state (state); } -GdkPixbuf * -gossip_pixbuf_for_contact (GossipContact *contact) +const gchar * +gossip_icon_name_for_contact (GossipContact *contact) { GossipPresence *presence; GossipSubscription subscription; g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), - gossip_pixbuf_offline ()); + EMPATHY_IMAGE_OFFLINE); presence = gossip_contact_get_presence (contact); if (presence) { - return gossip_pixbuf_for_presence (presence); + return gossip_icon_name_for_presence (presence); } subscription = gossip_contact_get_subscription (contact); if (subscription != GOSSIP_SUBSCRIPTION_BOTH && subscription != GOSSIP_SUBSCRIPTION_TO) { - return gossip_stock_render (GOSSIP_STOCK_PENDING, - GTK_ICON_SIZE_MENU); + return EMPATHY_IMAGE_PENDING; } - return gossip_pixbuf_offline (); -} - -GdkPixbuf * -gossip_pixbuf_offline (void) -{ - return gossip_stock_render (GOSSIP_STOCK_OFFLINE, - GTK_ICON_SIZE_MENU); + return EMPATHY_IMAGE_OFFLINE; } GdkPixbuf * diff --git a/libempathy-gtk/gossip-ui-utils.h b/libempathy-gtk/gossip-ui-utils.h index 1e1bb1ee3..d1625cfe3 100644 --- a/libempathy-gtk/gossip-ui-utils.h +++ b/libempathy-gtk/gossip-ui-utils.h @@ -67,16 +67,14 @@ void gossip_glade_setup_size_group (GladeXML *g gchar *first_widget, ...); /* Pixbufs */ -GdkPixbuf * gossip_pixbuf_from_smiley (GossipSmiley type, - GtkIconSize icon_size); -GdkPixbuf * gossip_pixbuf_from_profile (McProfile *account, +GdkPixbuf * gossip_pixbuf_from_icon_name (const gchar *icon_name, GtkIconSize icon_size); -GdkPixbuf * gossip_pixbuf_from_account (McAccount *account, +GdkPixbuf * gossip_pixbuf_from_smiley (GossipSmiley type, GtkIconSize icon_size); -GdkPixbuf * gossip_pixbuf_for_presence_state (McPresence state); -GdkPixbuf * gossip_pixbuf_for_presence (GossipPresence *presence); -GdkPixbuf * gossip_pixbuf_for_contact (GossipContact *contact); -GdkPixbuf * gossip_pixbuf_offline (void); +const gchar * gossip_icon_name_from_account (McAccount *account); +const gchar * gossip_icon_name_for_presence_state (McPresence state); +const gchar * gossip_icon_name_for_presence (GossipPresence *presence); +const gchar * gossip_icon_name_for_contact (GossipContact *contact); GdkPixbuf * gossip_pixbuf_from_avatar_scaled (GossipAvatar *avatar, gint width, gint height); diff --git a/pixmaps/gossip-available.png b/pixmaps/gossip-available.png Binary files differdeleted file mode 100644 index c2d074f50..000000000 --- a/pixmaps/gossip-available.png +++ /dev/null diff --git a/pixmaps/gossip-away.png b/pixmaps/gossip-away.png Binary files differdeleted file mode 100644 index ba9ed232a..000000000 --- a/pixmaps/gossip-away.png +++ /dev/null diff --git a/pixmaps/gossip-busy.png b/pixmaps/gossip-busy.png Binary files differdeleted file mode 100644 index 190c5ae70..000000000 --- a/pixmaps/gossip-busy.png +++ /dev/null diff --git a/pixmaps/gossip-extended-away.png b/pixmaps/gossip-extended-away.png Binary files differdeleted file mode 100644 index 59dbe08f8..000000000 --- a/pixmaps/gossip-extended-away.png +++ /dev/null diff --git a/pixmaps/gossip-group-message.png b/pixmaps/gossip-group-message.png Binary files differdeleted file mode 100644 index ed2d33b9f..000000000 --- a/pixmaps/gossip-group-message.png +++ /dev/null diff --git a/pixmaps/gossip-message.png b/pixmaps/gossip-message.png Binary files differdeleted file mode 100644 index 84c3cefff..000000000 --- a/pixmaps/gossip-message.png +++ /dev/null diff --git a/pixmaps/gossip-offline.png b/pixmaps/gossip-offline.png Binary files differdeleted file mode 100644 index 528eae409..000000000 --- a/pixmaps/gossip-offline.png +++ /dev/null diff --git a/pixmaps/gossip-pending.png b/pixmaps/gossip-pending.png Binary files differdeleted file mode 100644 index f48de8127..000000000 --- a/pixmaps/gossip-pending.png +++ /dev/null diff --git a/pixmaps/gossip-typing.png b/pixmaps/gossip-typing.png Binary files differdeleted file mode 100644 index defad7b08..000000000 --- a/pixmaps/gossip-typing.png +++ /dev/null diff --git a/pixmaps/vcard_16.png b/pixmaps/vcard_16.png Binary files differdeleted file mode 100644 index 0dfdb7780..000000000 --- a/pixmaps/vcard_16.png +++ /dev/null diff --git a/pixmaps/vcard_48.png b/pixmaps/vcard_48.png Binary files differdeleted file mode 100644 index 776006cd8..000000000 --- a/pixmaps/vcard_48.png +++ /dev/null diff --git a/profiles/Makefile.am b/profiles/Makefile.am deleted file mode 100644 index 53702835f..000000000 --- a/profiles/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -profiledir = $(datadir)/mission-control/profiles - -profile_DATA = \ - jabber.profile \ - gtalk.profile \ - salut.profile \ - msn.profile - -EXTRA_DIST = $(profile_DATA) diff --git a/src/empathy-chat-main.c b/src/empathy-chat-main.c index 7fde26ae0..91dd510b4 100644 --- a/src/empathy-chat-main.c +++ b/src/empathy-chat-main.c @@ -37,7 +37,6 @@ #include <libempathy/empathy-contact-manager.h> #include <libempathy/empathy-contact-list.h> #include <libempathy-gtk/gossip-private-chat.h> -#include <libempathy-gtk/gossip-stock.h> #define BUS_NAME "org.gnome.Empathy.Chat" #define OBJECT_PATH "/org/freedesktop/Telepathy/ChannelHandler" @@ -80,8 +79,6 @@ main (int argc, char *argv[]) EmpathyChandler *chandler; gtk_init (&argc, &argv); - /* FIXME: This is a horrible hack */ - gossip_stock_init (gtk_window_new (GTK_WINDOW_TOPLEVEL)); chandler = empathy_chandler_new (BUS_NAME, OBJECT_PATH); diff --git a/src/empathy-contact-list-main.c b/src/empathy-contact-list-main.c index 084649bab..8ea131c21 100644 --- a/src/empathy-contact-list-main.c +++ b/src/empathy-contact-list-main.c @@ -30,14 +30,12 @@ #include <libmissioncontrol/mc-account.h> #include <libempathy-gtk/empathy-main-window.h> -#include <libempathy-gtk/gossip-stock.h> #include <libempathy-gtk/gossip-accounts-dialog.h> static void destroy_cb (GtkWidget *window, gpointer user_data) { - gossip_stock_finalize (); gtk_main_quit (); } @@ -49,9 +47,6 @@ main (int argc, char *argv[]) gtk_init (&argc, &argv); - /* FIXME: This is a horrible hack */ - gossip_stock_init (gtk_window_new (GTK_WINDOW_TOPLEVEL)); - window = empathy_main_window_show (); g_signal_connect (window, "destroy", G_CALLBACK (destroy_cb), diff --git a/src/empathy-main.c b/src/empathy-main.c index 2aea589f6..fb5684aa3 100644 --- a/src/empathy-main.c +++ b/src/empathy-main.c @@ -35,8 +35,8 @@ #include <libempathy/gossip-debug.h> #include <libempathy-gtk/empathy-main-window.h> +#include <libempathy-gtk/empathy-images.h> #include <libempathy-gtk/gossip-status-presets.h> -#include <libempathy-gtk/gossip-stock.h> #include <libempathy-gtk/gossip-accounts-dialog.h> #define DEBUG_DOMAIN "Empathy" @@ -104,7 +104,6 @@ static void destroy_cb (GtkWidget *window, gpointer user_data) { - gossip_stock_finalize (); gtk_main_quit (); } @@ -130,9 +129,6 @@ main (int argc, char *argv[]) gtk_init (&argc, &argv); - /* FIXME: This is a horrible hack */ - gossip_stock_init (gtk_window_new (GTK_WINDOW_TOPLEVEL)); - /* Setting up MC */ monitor = mc_account_monitor_new (); mc = mission_control_new (tp_get_bus ()); @@ -154,7 +150,7 @@ main (int argc, char *argv[]) NULL); /* Setting up the tray icon */ - icon = gtk_status_icon_new_from_stock (GOSSIP_STOCK_MESSAGE); + icon = gtk_status_icon_new_from_icon_name (EMPATHY_IMAGE_MESSAGE); gtk_status_icon_set_tooltip (icon, "Empathy - click here to show/hide the main window"); gtk_status_icon_set_visible (icon, TRUE); g_signal_connect (icon, "activate", |