Add bookmark on search widget

review586006
This commit is contained in:
Cédric Krier committed 2012-11-16 20:12:31 +01:00
1 parent 62976eea90
commit bf3a4a05ab
8 files changed
+861 -21

No files matched your search

+1
View File
@@ -1,3 +1,4 @@
* Add bookmark on search widget
* Manage domains on Action Window
* Use range for Date/Time fields in filter box
* Allow multi-selection for Selection field in filter box
+2 -2
View File
@@ -93,8 +93,8 @@ Figure: Tryton client application::
| |-+ | |-----------------------------------------------||
Tool bar | | |- | | New Save Switch Reload | Prev Next | Attach v ||
| | |- | |-----------------------------------------------||
| + | | ____________________ ||
Search widget | |-+ | | Search | | <- -> Find Clear ||
| + | | _______________________ ||
Search widget | |-+ | | Filter | *| Bookmark <- -> ||
| | |- | |-----------------------------------------------||
| | |- | | ||
| + | | ||
+426
View File
@@ -0,0 +1,426 @@
<?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="48px"
height="48px"
id="svg1256"
sodipodi:version="0.32"
inkscape:version="0.48.2 r9819"
sodipodi:docname="x-office-address-book.svg"
inkscape:output_extension="org.inkscape.output.svg.inkscape"
version="1.1">
<defs
id="defs3">
<inkscape:perspective
sodipodi:type="inkscape:persp3d"
inkscape:vp_x="0 : 24 : 1"
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_z="48 : 24 : 1"
inkscape:persp3d-origin="24 : 16 : 1"
id="perspective58" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5060"
id="radialGradient6719"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(-2.774389,0,0,1.969706,112.7623,-872.8854)"
cx="605.71429"
cy="486.64789"
fx="605.71429"
fy="486.64789"
r="117.14286" />
<linearGradient
inkscape:collect="always"
id="linearGradient5060">
<stop
style="stop-color:black;stop-opacity:1;"
offset="0"
id="stop5062" />
<stop
style="stop-color:black;stop-opacity:0;"
offset="1"
id="stop5064" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5060"
id="radialGradient6717"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
cx="605.71429"
cy="486.64789"
fx="605.71429"
fy="486.64789"
r="117.14286" />
<linearGradient
id="linearGradient5048">
<stop
style="stop-color:black;stop-opacity:0;"
offset="0"
id="stop5050" />
<stop
id="stop5056"
offset="0.5"
style="stop-color:black;stop-opacity:1;" />
<stop
style="stop-color:black;stop-opacity:0;"
offset="1"
id="stop5052" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5048"
id="linearGradient6715"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.774389,0,0,1.969706,-1892.179,-872.8854)"
x1="302.85715"
y1="366.64789"
x2="302.85715"
y2="609.50507" />
<linearGradient
id="linearGradient12512">
<stop
style="stop-color:#ffffff;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop12513" />
<stop
style="stop-color:#fff520;stop-opacity:0.89108908;"
offset="0.50000000"
id="stop12517" />
<stop
style="stop-color:#fff300;stop-opacity:0.0000000;"
offset="1.0000000"
id="stop12514" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient12512"
id="radialGradient278"
gradientUnits="userSpaceOnUse"
cx="55.000000"
cy="125.00000"
fx="55.000000"
fy="125.00000"
r="14.375000" />
<linearGradient
inkscape:collect="always"
id="linearGradient21644">
<stop
style="stop-color:#000000;stop-opacity:1;"
offset="0"
id="stop21646" />
<stop
style="stop-color:#000000;stop-opacity:0;"
offset="1"
id="stop21648" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient2116">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop2118" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop2120" />
</linearGradient>
<linearGradient
id="linearGradient2094">
<stop
style="stop-color:#d6e3f0;stop-opacity:1.0000000;"
offset="0.0000000"
id="stop2096" />
<stop
style="stop-color:#95b1cf;stop-opacity:1.0000000;"
offset="1.0000000"
id="stop2098" />
</linearGradient>
<linearGradient
id="linearGradient2803">
<stop
id="stop2805"
offset="0"
style="stop-color:#ffffff;stop-opacity:1;" />
<stop
id="stop2807"
offset="1.0000000"
style="stop-color:#cbcbcb;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
id="linearGradient2795">
<stop
id="stop2797"
offset="0.0000000"
style="stop-color:#000000;stop-opacity:0.068627454;" />
<stop
id="stop2799"
offset="1.0000000"
style="stop-color:#ffffff;stop-opacity:1.0000000;" />
</linearGradient>
<linearGradient
gradientUnits="userSpaceOnUse"
y2="4.9530048"
x2="41.219128"
y1="4.9530050"
x1="35.433035"
gradientTransform="matrix(0.254000,0.000000,1.822151e-16,3.759813,0.788629,0.148567)"
id="linearGradient2801"
xlink:href="#linearGradient2795"
inkscape:collect="always" />
<linearGradient
gradientUnits="userSpaceOnUse"
y2="84.287079"
x2="10.219901"
y1="93.338043"
x1="10.496115"
gradientTransform="matrix(2.262742,0.000000,0.000000,0.441942,1.000000,-0.875000)"
id="linearGradient2813"
xlink:href="#linearGradient2803"
inkscape:collect="always" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2094"
id="linearGradient2100"
gradientTransform="matrix(0.957750,0.000000,0.000000,1.027989,1.000000,-0.571911)"
x1="6.5871811"
y1="22.132999"
x2="14.511404"
y2="22.132999"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient2116"
id="linearGradient2112"
gradientTransform="matrix(1.025428,0.000000,0.000000,0.957303,0.000000,-0.806758)"
x1="73.361984"
y1="26.652197"
x2="-2.7582901"
y2="21.270376"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient21644"
id="radialGradient21650"
cx="25.125"
cy="36.75"
fx="25.125"
fy="36.75"
r="15.75"
gradientTransform="matrix(1.000000,0.000000,0.000000,0.595238,-6.245005e-16,14.87500)"
gradientUnits="userSpaceOnUse" />
<radialGradient
cx="24"
cy="22"
r="22"
fx="24"
fy="22"
id="R0"
xlink:href="#G0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,-0.2,0.2,1,-3.8,6.8)" />
<linearGradient
id="G0">
<stop
id="s1"
style="stop-color:#e6cf00;stop-opacity:1"
offset="0" />
<stop
id="s2"
style="stop-color:#fde94a;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
x1="14.660452"
y1="7.0243196"
x2="24.030643"
y2="34.826122"
id="G3"
xlink:href="#G1"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="G1">
<stop
id="s3"
style="stop-color:#fcf9fb;stop-opacity:1"
offset="0" />
<stop
id="s4"
style="stop-color:#fcf9fb;stop-opacity:0"
offset="1" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="0.27843137"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="9.5208333"
inkscape:cx="24"
inkscape:cy="24"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:grid-bbox="true"
inkscape:document-units="px"
inkscape:window-width="1094"
inkscape:window-height="723"
inkscape:window-x="0"
inkscape:window-y="15"
fill="#ef2929"
stroke="#cc0000"
inkscape:showpageshadow="false"
inkscape:window-maximized="0" />
<metadata
id="metadata4">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:date />
<dc:creator>
<cc:Agent>
<dc:title>Jakub Steiner</dc:title>
</cc:Agent>
</dc:creator>
<dc:source>http://jimmac.musichall.cz</dc:source>
<dc:subject>
<rdf:Bag>
<rdf:li>address</rdf:li>
<rdf:li>contact</rdf:li>
<rdf:li>book</rdf:li>
<rdf:li>office</rdf:li>
</rdf:Bag>
</dc:subject>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<g
id="layer1"
inkscape:label="Layer 1"
inkscape:groupmode="layer">
<path
style="opacity:1;color:#000000;fill:#edd400;fill-opacity:1;fill-rule:evenodd;stroke:#c4a000;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 33.096456,4.6520202 L 40.521077,4.6520202 C 41.228184,4.6520202 41.758513,4.8287969 41.93529,5.71268 L 42.819174,12.606972 C 42.907562,13.667632 42.443523,14.021185 41.493349,14.021185 L 32.919679,14.021185 L 33.096456,4.6520202 z "
id="path21630"
sodipodi:nodetypes="ccccccc" />
<path
sodipodi:nodetypes="ccccccc"
id="path21632"
d="M 34.10295,5.638875 L 40.463507,5.638875 C 40.771656,5.638875 40.940266,5.669037 40.986054,5.960473 L 41.777489,12.344449 C 41.847258,12.775421 41.959897,13.019804 41.637211,13.034341 L 33.963412,13.034341 L 34.10295,5.638875 z "
style="opacity:0.48538011;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000006;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
sodipodi:nodetypes="ccccccc"
id="path21634"
d="M 35.596456,12.40202 L 43.021077,12.40202 C 43.728184,12.40202 44.258513,12.578797 44.43529,13.46268 L 45.319174,20.356972 C 45.407562,21.417632 44.943523,21.771185 43.993349,21.771185 L 35.419679,21.771185 L 35.596456,12.40202 z "
style="opacity:1;color:#000000;fill:#9db029;fill-opacity:1;fill-rule:evenodd;stroke:#727e0a;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
style="opacity:0.48538011;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.0000006;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 36.60295,13.388875 L 42.963507,13.388875 C 43.271656,13.388875 43.440266,13.419037 43.486054,13.710473 L 44.277489,20.094449 C 44.347258,20.525421 44.459897,20.769804 44.137211,20.784341 L 36.463412,20.784341 L 36.60295,13.388875 z "
id="path21636"
sodipodi:nodetypes="ccccccc" />
<path
style="opacity:1;color:#000000;fill:#ef2929;fill-opacity:1;fill-rule:evenodd;stroke:#cc0000;stroke-width:0.99999988;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 36.06451,20.776498 L 44.50992,20.776498 C 45.314245,20.776498 45.917487,20.995896 46.118569,22.092882 L 47.123975,30.649381 C 47.224515,31.965765 46.696677,32.40456 45.615866,32.40456 L 35.863428,32.40456 L 36.06451,20.776498 z "
id="path21638"
sodipodi:nodetypes="ccccccc" />
<path
sodipodi:nodetypes="ccccccc"
id="path21640"
d="M 37.209384,21.763574 L 44.444435,21.763574 C 44.79495,21.763574 44.986742,21.801928 45.038825,22.172513 L 45.939072,30.290267 C 46.018433,30.838284 46.146559,31.149038 45.779508,31.167522 L 37.050661,31.167522 L 37.209384,21.763574 z "
style="opacity:0.48538011;color:#000000;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:1.00000072;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<g
style="display:inline"
transform="matrix(2.105461e-2,0,0,2.086758e-2,42.85172,40.44648)"
id="g6707">
<rect
style="opacity:0.40206185;color:black;fill:url(#linearGradient6715);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
id="rect6709"
width="1339.6335"
height="478.35718"
x="-1559.2523"
y="-150.69685" />
<path
style="opacity:0.40206185;color:black;fill:url(#radialGradient6717);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M -219.61876,-150.68038 C -219.61876,-150.68038 -219.61876,327.65041 -219.61876,327.65041 C -76.744594,328.55086 125.78146,220.48075 125.78138,88.454235 C 125.78138,-43.572302 -33.655436,-150.68036 -219.61876,-150.68038 z "
id="path6711"
sodipodi:nodetypes="cccc" />
<path
sodipodi:nodetypes="cccc"
id="path6713"
d="M -1559.2523,-150.68038 C -1559.2523,-150.68038 -1559.2523,327.65041 -1559.2523,327.65041 C -1702.1265,328.55086 -1904.6525,220.48075 -1904.6525,88.454235 C -1904.6525,-43.572302 -1745.2157,-150.68036 -1559.2523,-150.68038 z "
style="opacity:0.40206185;color:black;fill:url(#radialGradient6719);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
</g>
<path
style="color:#000000;fill:#5b6b94;fill-opacity:1;fill-rule:nonzero;stroke:#364878;stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 6.3643222,5.5185897 C 6.4551049,3.6036003 7.3719758,2.5542814 9.0788784,2.549044 L 38.405776,2.4590577 C 38.652361,2.4583011 38.974317,2.6592071 38.999012,2.9089888 L 42.257491,35.867228 L 40.942189,35.923862 L 41.571429,42.369516 C 41.632441,42.994499 41.390059,43.52882 40.5,43.533035 L 9.7893046,43.678474 C 7.25676,43.690468 4.6538454,41.59976 4.7759337,39.024403 L 6.3643222,5.5185897 z "
id="rect1408"
sodipodi:nodetypes="csssccsssss" />
<path
id="path2489"
d="M 40.125,34.875 L 10.9375,35 C 9.3809819,35.177868 8.125,36.39612 8.125,38 C 8.125,39.60388 9.3809819,40.822132 10.9375,41 L 40.125,41.125 L 40.125,41.0625 C 38.469378,40.984348 37.125,39.674851 37.125,38 C 37.125,36.325149 38.469378,35.015652 40.125,34.9375 L 40.125,34.875 z "
style="color:#000000;fill:url(#linearGradient2813);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<path
sodipodi:nodetypes="ccccccssc"
id="path2784"
d="M 9.6875,2.8125 C 7.9805897,2.8125 7.050103,3.8215062 6.96875,5.6738658 L 5.3125,37.825772 C 5.22054,40.904199 7.1393732,42.654485 9.125,43.15625 C 4.875,41.525579 5.4375,34.164455 10.75,34.195222 L 41.648286,34.195222 L 38.335786,3.2432432 C 38.310025,3.0025304 37.987878,2.8125 37.742036,2.8125 L 9.6875,2.8125 z "
style="color:#000000;fill:url(#linearGradient2100);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" />
<rect
y="3.968539"
x="9.7886267"
height="29.604792"
width="2"
id="rect2793"
style="opacity:0.48044691;color:#000000;fill:url(#linearGradient2801);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dashoffset:0;stroke-opacity:0.60818715;visibility:visible;display:inline;overflow:visible"
transform="matrix(1.000000,0.000000,-3.582731e-2,0.999358,0.000000,0.000000)" />
<path
style="color:#000000;fill:none;fill-opacity:1;fill-rule:nonzero;stroke:url(#linearGradient2112);stroke-width:1.00000012;stroke-linecap:round;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:20;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible"
d="M 9.8751008,3.3336831 C 8.1912014,3.3336831 7.5384236,4.0658459 7.4581673,5.887831 L 6.1592633,35.777198 C 7.0925916,34.170451 8.5988591,33.594437 11.011665,33.594437 L 40.963081,33.594437 L 38.137179,3.7573631 C 38.114727,3.5203092 37.793961,3.3336831 37.551434,3.3336831 L 9.8751008,3.3336831 z "
id="path2104"
sodipodi:nodetypes="cccscssc" />
<g
transform="matrix(0.53594566,0,0,0.53594566,11.876644,6.2366429)"
id="g4054">
<path
inkscape:connector-curvature="0"
style="fill:url(#R0);stroke:#c4a000"
id="star"
d="M 37.310531,41.5 24.030644,34.826121 10.735101,41.471448 13.289408,27.369086 2.5511635,17.368344 17.409702,15.326301 24.068641,2.5 30.697416,15.340488 45.551111,17.414249 34.789382,27.392039 37.310531,41.5 z" />
<path
inkscape:connector-curvature="0"
style="opacity:0.8;fill:url(#G3);stroke:none"
id="hl"
d="m 17.731857,15.79089 6.331883,-12.2040705 6.305712,12.2079845 14.070696,1.966694 -3.619753,3.360009 c -16.4375,-3.6875 -9.455375,7.220474 -27.568647,9.243214 L 13.819799,27.184324 3.6604518,17.718688 c 0,0 14.0714052,-1.927798 14.0714052,-1.927798 z" />
<path
inkscape:connector-curvature="0"
style="opacity:0.68999999;fill:none;stroke:#ffffff"
id="ol"
d="M 35.973752,39.712833 24.028333,33.709386 12.082531,39.678326 14.362768,27.008543 4.7776396,18.070249 18.056076,16.247921 24.062792,4.6783526 l 5.98244,11.5773884 13.277727,1.857319 -9.609256,8.921725 2.260049,12.678048 z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 20 KiB

+142
View File
@@ -0,0 +1,142 @@
<?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"
version="1.0"
width="48"
height="48"
id="svg0"
inkscape:version="0.48.2 r9819"
sodipodi:docname="tryton-star.svg">
<metadata
id="metadata3152">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1165"
inkscape:window-height="725"
id="namedview3150"
showgrid="false"
inkscape:zoom="4.9166667"
inkscape:cx="-11.79661"
inkscape:cy="24"
inkscape:window-x="199"
inkscape:window-y="15"
inkscape:window-maximized="0"
inkscape:current-layer="svg0" />
<defs
id="defs">
<linearGradient
id="G0">
<stop
id="s1"
style="stop-color:#e6cf00;stop-opacity:1"
offset="0" />
<stop
id="s2"
style="stop-color:#fde94a;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="G1">
<stop
id="s3"
style="stop-color:#fcf9fb;stop-opacity:1"
offset="0" />
<stop
id="s4"
style="stop-color:#fcf9fb;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
id="G2">
<stop
id="s5"
style="stop-color:#000000;stop-opacity:0.63"
offset="0" />
<stop
id="s6"
style="stop-color:#000000;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
x1="14.660452"
y1="7.0243196"
x2="24.030643"
y2="34.826122"
id="G3"
xlink:href="#G1"
gradientUnits="userSpaceOnUse" />
<radialGradient
cx="24"
cy="22"
r="22"
fx="24"
fy="22"
id="R0"
xlink:href="#G0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,-0.2,0.2,1,-3.8,6.8)" />
<radialGradient
cx="17.3125"
cy="25.53125"
r="9.6875"
fx="17.3125"
fy="25.53125"
id="R1"
xlink:href="#G2"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.4,0,0,0.67,-17.1,22.4)" />
</defs>
<path
d="M 47,39.5 C 47,43.08967 36.702552,46 24,46 C 11.297449,46 1,43.08967 1,39.5 C 1,35.91 11.297449,32 24,32 C 36.702552,32 47,35.909969 47,39.5 z"
id="s"
style="opacity:0.5;fill:url(#R1)" />
<path
d="M 37.310531,41.5 L 24.030644,34.826121 L 10.735101,41.471448 L 13.289408,27.369086 L 2.5511635,17.368344 L 17.409702,15.326301 L 24.068641,2.5 L 30.697416,15.340488 L 45.551111,17.414249 L 34.789382,27.392039 L 37.310531,41.5 z"
id="star"
style="fill:url(#R0);stroke:#c4a000" />
<path
d="M 17.731857,15.79089 L 24.06374,3.5868195 L 30.369452,15.794804 L 44.440148,17.761498 L 40.820395,21.121507 C 24.382895,17.434007 31.36502,28.341981 13.251748,30.364721 L 13.819799,27.184324 L 3.6604518,17.718688 C 3.6604518,17.718688 17.731857,15.79089 17.731857,15.79089 z"
id="hl"
style="opacity:0.8;fill:url(#G3);stroke:none" />
<path
d="M 35.973752,39.712833 L 24.028333,33.709386 L 12.082531,39.678326 L 14.362768,27.008543 L 4.7776396,18.070249 L 18.056076,16.247921 L 24.062792,4.6783526 L 30.045232,16.255741 L 43.322959,18.11306 L 33.713703,27.034785 L 35.973752,39.712833 z"
id="ol"
style="opacity:0.68999999;fill:none;stroke:#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

+138
View File
@@ -0,0 +1,138 @@
<?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"
version="1.0"
width="48"
height="48"
id="svg0"
inkscape:version="0.48.2 r9819"
sodipodi:docname="tryton-unstar.svg">
<metadata
id="metadata3152">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<cc:license
rdf:resource="http://creativecommons.org/licenses/publicdomain/" />
<dc:title></dc:title>
</cc:Work>
<cc:License
rdf:about="http://creativecommons.org/licenses/publicdomain/">
<cc:permits
rdf:resource="http://creativecommons.org/ns#Reproduction" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#Distribution" />
<cc:permits
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
</cc:License>
</rdf:RDF>
</metadata>
<sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="732"
inkscape:window-height="662"
id="namedview3150"
showgrid="false"
inkscape:zoom="4.9166667"
inkscape:cx="24"
inkscape:cy="24"
inkscape:window-x="95"
inkscape:window-y="15"
inkscape:window-maximized="0"
inkscape:current-layer="svg0" />
<defs
id="defs">
<linearGradient
id="G0">
<stop
id="s1"
style="stop-color:#e6cf00;stop-opacity:1"
offset="0" />
<stop
id="s2"
style="stop-color:#fde94a;stop-opacity:1"
offset="1" />
</linearGradient>
<linearGradient
id="G1">
<stop
id="s3"
style="stop-color:#fcf9fb;stop-opacity:1"
offset="0" />
<stop
id="s4"
style="stop-color:#fcf9fb;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
id="G2">
<stop
id="s5"
style="stop-color:#000000;stop-opacity:0.63"
offset="0" />
<stop
id="s6"
style="stop-color:#000000;stop-opacity:0"
offset="1" />
</linearGradient>
<linearGradient
x1="14.660452"
y1="7.0243196"
x2="24.030643"
y2="34.826122"
id="G3"
xlink:href="#G1"
gradientUnits="userSpaceOnUse" />
<radialGradient
cx="24"
cy="22"
r="22"
fx="24"
fy="22"
id="R0"
xlink:href="#G0"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1,-0.2,0.2,1,-3.8,6.8)" />
<radialGradient
cx="17.3125"
cy="25.53125"
r="9.6875"
fx="17.3125"
fy="25.53125"
id="R1"
xlink:href="#G2"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(2.4,0,0,0.67,-17.1,22.4)" />
</defs>
<path
d="M 37.310531,41.5 L 24.030644,34.826121 L 10.735101,41.471448 L 13.289408,27.369086 L 2.5511635,17.368344 L 17.409702,15.326301 L 24.068641,2.5 L 30.697416,15.340488 L 45.551111,17.414249 L 34.789382,27.392039 L 37.310531,41.5 z"
id="star"
style="fill:none;stroke:#000000;stroke-opacity:0.63137257" />
<path
d="M 17.731857,15.79089 L 24.06374,3.5868195 L 30.369452,15.794804 L 44.440148,17.761498 L 40.820395,21.121507 C 24.382895,17.434007 31.36502,28.341981 13.251748,30.364721 L 13.819799,27.184324 L 3.6604518,17.718688 C 3.6604518,17.718688 17.731857,15.79089 17.731857,15.79089 z"
id="hl"
style="opacity:0.8;fill:url(#G3);stroke:none" />
<path
d="M 35.973752,39.712833 L 24.028333,33.709386 L 12.082531,39.678326 L 14.362768,27.008543 L 4.7776396,18.070249 L 18.056076,16.247921 L 24.062792,4.6783526 L 30.045232,16.255741 L 43.322959,18.11306 L 33.713703,27.034785 L 35.973752,39.712833 z"
id="ol"
style="opacity:0.68999999;fill:none;stroke:#ffffff" />
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

+45
View File
@@ -45,6 +45,7 @@ except ImportError:
from tryton.exceptions import (TrytonServerError, TrytonError,
TrytonServerUnavailable)
from tryton.pyson import PYSONEncoder
_ = gettext.gettext
@@ -170,6 +171,50 @@ class ModelAccess(object):
MODELACCESS = ModelAccess()
class ViewSearch(object):
searches = None
def load_searches(self, refresh=False):
if not refresh:
self.searches = None
if self.searches is not None:
return
try:
self.searches = rpc.execute('model', 'ir.ui.view_search',
'get_search', rpc.CONTEXT)
except TrytonServerError:
self.searches = {}
def __getitem__(self, model):
self.load_searches()
return self.searches.get(model, [])
def add(self, model, name, domain):
domain = PYSONEncoder().encode(domain)
try:
id_ = RPCExecute('model', 'ir.ui.view_search',
'create', {
'model': model,
'name': name,
'domain': domain,
})
except RPCException:
return
self.searches.setdefault(model, []).append((id_, name, domain))
def remove(self, model, id_):
try:
RPCExecute('model', 'ir.ui.view_search', 'delete', [id_])
except RPCException:
return
for i, domain in enumerate(self.searches[model]):
if domain[0] == id_:
del self.searches[model][i]
break
VIEW_SEARCH = ViewSearch()
def find_in_path(name):
if os.name == "nt":
sep = ';'
+1
View File
@@ -930,6 +930,7 @@ class Main(object):
prefs = None
common.ICONFACTORY.load_icons()
common.MODELACCESS.load_models()
common.VIEW_SEARCH.load_searches()
if prefs and 'language_direction' in prefs:
translate.set_language_direction(prefs['language_direction'])
CONFIG['client.language_direction'] = \
@@ -111,28 +111,54 @@ class ScreenContainer(object):
self.search_entry.set_completion(self.completion)
self.search_entry.connect('key-press-event', self.key_press)
self.search_entry.connect('focus-in-event', self.focus_in)
self.search_entry.connect('icon-press', self.icon_press)
hbox.pack_start(self.search_entry, expand=True, fill=True)
but_find = gtk.Button()
tooltips.set_tip(but_find, _('Find'))
but_find.connect('clicked', self.do_search)
img_find = gtk.Image()
img_find.set_from_stock('tryton-find', gtk.ICON_SIZE_SMALL_TOOLBAR)
img_find.set_alignment(0.5, 0.5)
but_find.add(img_find)
but_find.set_relief(gtk.RELIEF_NONE)
hbox.pack_start(but_find, expand=False, fill=False)
def popup(widget):
menu = widget._menu
for child in menu.children():
menu.remove(child)
if not widget.props.active:
menu.popdown()
return
but_clear = gtk.Button()
tooltips.set_tip(but_clear, _('Clear'))
but_clear.connect('clicked', self.clear)
img_clear = gtk.Image()
img_clear.set_from_stock('tryton-clear', gtk.ICON_SIZE_SMALL_TOOLBAR)
img_clear.set_alignment(0.5, 0.5)
but_clear.add(img_clear)
but_clear.set_relief(gtk.RELIEF_NONE)
hbox.pack_start(but_clear, expand=False, fill=False)
def menu_position(menu):
x, y = widget.window.get_origin()
widget_allocation = widget.get_allocation()
return (
widget_allocation.x + x,
widget_allocation.y + widget_allocation.height + y,
False
)
for id_, name, domain in common.VIEW_SEARCH[
self.screen.model_name]:
menuitem = gtk.MenuItem(name)
menuitem.connect('activate', self.bookmark_activate, domain)
menu.add(menuitem)
menu.show_all()
menu.popup(None, None, menu_position, 0, 0)
def deactivate(menuitem, togglebutton):
togglebutton.props.active = False
but_bookmark = gtk.ToggleButton()
self.but_bookmark = but_bookmark
tooltips.set_tip(but_bookmark, _('Show bookmarks of filters'))
img_bookmark = gtk.Image()
img_bookmark.set_from_stock('tryton-bookmark',
gtk.ICON_SIZE_SMALL_TOOLBAR)
img_bookmark.set_alignment(0.5, 0.5)
but_bookmark.add(img_bookmark)
but_bookmark.set_relief(gtk.RELIEF_NONE)
menu = gtk.Menu()
menu.set_property('reserve-toggle-size', False)
menu.connect('deactivate', deactivate, but_bookmark)
but_bookmark._menu = menu
but_bookmark.connect('toggled', popup)
hbox.pack_start(but_bookmark, expand=False, fill=False)
but_prev = gtk.Button()
self.but_prev = but_prev
@@ -200,6 +226,9 @@ class ScreenContainer(object):
def set_screen(self, screen):
self.screen = screen
self.but_bookmark.set_sensitive(
bool(common.VIEW_SEARCH[screen.model_name]))
self.bookmark_match()
def show_filter(self):
if self.filter_vbox:
@@ -248,12 +277,47 @@ class ScreenContainer(object):
def clear(self, widget=None):
self.search_entry.set_text('')
self.bookmark_match()
def get_text(self):
return self.search_entry.get_text().decode('utf-8')
def set_text(self, value):
return self.search_entry.set_text(value)
self.search_entry.set_text(value)
self.bookmark_match()
def bookmark_activate(self, menuitem, domain):
self.set_text(self.screen.domain_parser.string(domain))
self.do_search()
def bookmark_match(self):
current_text = self.get_text()
current_domain = self.screen.domain_parser.parse(current_text)
self.search_entry.set_icon_activatable(gtk.ENTRY_ICON_SECONDARY,
bool(current_text))
self.search_entry.set_icon_sensitive(gtk.ENTRY_ICON_SECONDARY,
bool(current_text))
icon_stock = self.search_entry.get_icon_stock(gtk.ENTRY_ICON_SECONDARY)
for id_, name, domain in common.VIEW_SEARCH[self.screen.model_name]:
text = self.screen.domain_parser.string(domain)
domain = self.screen.domain_parser.parse(text.decode('utf-8'))
if (text == current_text
or domain == current_domain):
if icon_stock != 'tryton-star':
self.search_entry.set_icon_from_stock(
gtk.ENTRY_ICON_SECONDARY, 'tryton-star')
self.search_entry.set_icon_tooltip_text(
gtk.ENTRY_ICON_SECONDARY, _('Remove this bookmark'))
return id_
if icon_stock != 'tryton-unstar':
self.search_entry.set_icon_from_stock(gtk.ENTRY_ICON_SECONDARY,
'tryton-unstar')
if current_text:
self.search_entry.set_icon_tooltip_text(gtk.ENTRY_ICON_SECONDARY,
_('Bookmark this filter'))
else:
self.search_entry.set_icon_tooltip_text(gtk.ENTRY_ICON_SECONDARY,
None)
def search_next(self, widget=None):
self.screen.search_next(self.get_text())
@@ -299,6 +363,29 @@ class ScreenContainer(object):
def key_press(self, widget, event):
gobject.idle_add(self.update)
gobject.idle_add(self.bookmark_match)
def icon_press(self, widget, icon_pos, event):
if icon_pos == 1:
icon_stock = self.search_entry.get_icon_stock(icon_pos)
model_name = self.screen.model_name
if icon_stock == 'tryton-unstar':
text = self.get_text()
if not text:
return
name = common.ask(_('Bookmark Name:'))
if not name:
return
domain = self.screen.domain_parser.parse(text)
common.VIEW_SEARCH.add(model_name, name, domain)
self.set_text(self.screen.domain_parser.string(domain))
elif icon_stock == 'tryton-star':
id_ = self.bookmark_match()
common.VIEW_SEARCH.remove(model_name, id_)
# Refresh icon and bookmark button
self.bookmark_match()
self.but_bookmark.set_sensitive(
bool(common.VIEW_SEARCH[model_name]))
def focus_in(self, widget, event):
self.update()