diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-03-16 23:11:34 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-03-17 00:14:04 +0000 |
| commit | bef548a19c2f884e594fa409a88761f8f4be4518 (patch) | |
| tree | dd90cfd399feda039ca7e6460428483557242b42 | |
| parent | a32c192781a6de6c534cff2a52f746dde897d435 (diff) | |
Various work on improved config dialog.
| -rw-r--r-- | icons/colour_conversions.png | bin | 0 -> 275 bytes | |||
| -rw-r--r-- | icons/colour_conversions.svg | 86 | ||||
| -rw-r--r-- | icons/defaults.png | bin | 638 -> 581 bytes | |||
| -rw-r--r-- | icons/defaults.svg | 12 | ||||
| -rw-r--r-- | icons/kdm_email.png | bin | 0 -> 1544 bytes | |||
| -rw-r--r-- | icons/kdm_email.svg | 197 | ||||
| -rw-r--r-- | icons/tms.png | bin | 0 -> 1576 bytes | |||
| -rw-r--r-- | icons/tms.svg | 192 | ||||
| -rwxr-xr-x | run/dcpomatic | 3 | ||||
| -rw-r--r-- | src/wx/config_dialog.cc | 313 |
10 files changed, 660 insertions, 143 deletions
diff --git a/icons/colour_conversions.png b/icons/colour_conversions.png Binary files differnew file mode 100644 index 000000000..5cd2b32bf --- /dev/null +++ b/icons/colour_conversions.png diff --git a/icons/colour_conversions.svg b/icons/colour_conversions.svg new file mode 100644 index 000000000..59b35c14f --- /dev/null +++ b/icons/colour_conversions.svg @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="744.09448819" + height="1052.3622047" + id="svg3882" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="colour_conversions.svg" + inkscape:export-filename="/home/carl/src/dcpomatic/icons/colour_conversions.png" + inkscape:export-xdpi="8.3965015" + inkscape:export-ydpi="8.3965015"> + <defs + id="defs3884" /> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1" + inkscape:cx="465.68138" + inkscape:cy="520" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + inkscape:window-width="1366" + inkscape:window-height="714" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" /> + <metadata + id="metadata3887"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <rect + style="color:#000000;fill:#ff0000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10.62992096;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + id="rect3941" + width="100" + height="300" + x="193.66678" + y="335.36218" /> + <rect + style="color:#000000;fill:#00ff00;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10.62992096;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + id="rect3941-5" + width="100" + height="300" + x="293.66678" + y="335.36218" /> + <rect + style="color:#000000;fill:#0000ff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:10.62992096;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + id="rect3941-5-1" + width="100" + height="300" + x="393.66678" + y="335.36218" /> + <rect + style="color:#000000;fill:none;stroke:none;stroke-width:10.62992095999999975;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + id="rect4026" + width="343" + height="343" + x="172" + y="315.36218" /> + </g> +</svg> diff --git a/icons/defaults.png b/icons/defaults.png Binary files differindex edca493a0..9fd41a935 100644 --- a/icons/defaults.png +++ b/icons/defaults.png diff --git a/icons/defaults.svg b/icons/defaults.svg index 029681578..ab254950d 100644 --- a/icons/defaults.svg +++ b/icons/defaults.svg @@ -14,7 +14,10 @@ id="svg2" version="1.1" inkscape:version="0.48.4 r9939" - sodipodi:docname="New document 1"> + sodipodi:docname="defaults.svg" + inkscape:export-filename="/home/carl/src/dcpomatic/icons/defaults.png" + inkscape:export-xdpi="9.7627115" + inkscape:export-ydpi="9.7627115"> <defs id="defs4" /> <sodipodi:namedview @@ -99,5 +102,12 @@ d="m 167,421.36218 181,0" style="color:#000000;fill:none;stroke:#008080;stroke-width:10.62992096;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" /> </g> + <rect + style="color:#000000;fill:none;stroke:none;stroke-width:0;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + id="rect3880" + width="295" + height="295" + x="74" + y="360.36218" /> </g> </svg> diff --git a/icons/kdm_email.png b/icons/kdm_email.png Binary files differnew file mode 100644 index 000000000..28701ee49 --- /dev/null +++ b/icons/kdm_email.png diff --git a/icons/kdm_email.svg b/icons/kdm_email.svg new file mode 100644 index 000000000..ace413dae --- /dev/null +++ b/icons/kdm_email.svg @@ -0,0 +1,197 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + id="svg4217" + viewBox="0 0 744.09449 1052.3622" + version="1.0" + inkscape:version="0.48.4 r9939" + width="100%" + height="100%" + sodipodi:docname="kdm_email.svg" + inkscape:export-filename="/home/carl/src/dcpomatic/icons/kdm_email.png" + inkscape:export-xdpi="6.5100002" + inkscape:export-ydpi="6.5100002"> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1366" + inkscape:window-height="714" + id="namedview6320" + showgrid="false" + inkscape:zoom="0.60313323" + inkscape:cx="-87.032436" + inkscape:cy="195.645" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg4217" /> + <defs + id="defs4219"> + <linearGradient + id="linearGradient3594" + y2="742.5" + gradientUnits="userSpaceOnUse" + x2="-886.76001" + gradientTransform="matrix(-0.84033,-0.84033,-0.84033,0.84033,214.12,-1075.4)" + y1="742.5" + x1="-772.01001"> + <stop + id="stop4687" + stop-color="#fff" + offset="0" /> + <stop + id="stop4689" + stop-color="#fff" + stop-opacity="0" + offset="1" /> + </linearGradient> + <linearGradient + id="linearGradient3601" + y2="613.94" + gradientUnits="userSpaceOnUse" + x2="385.04001" + gradientTransform="matrix(0.70711,-0.70711,0.70711,0.70711,-126.18,372.21)" + y1="63.870998" + x1="386.39001"> + <stop + id="stop3797" + stop-color="#ffe800" + offset="0" /> + <stop + id="stop3799" + stop-color="#dfb300" + offset="1" /> + </linearGradient> + <linearGradient + id="linearGradient3609" + y2="161.84" + gradientUnits="userSpaceOnUse" + x2="212.92999" + y1="358.29999" + x1="409.38"> + <stop + id="stop4034" + stop-color="#dfb300" + offset="0" /> + <stop + id="stop3374" + stop-color="#dfb300" + offset=".5" /> + <stop + id="stop3376" + stop-color="#dfb300" + offset="1" /> + </linearGradient> + <linearGradient + id="linearGradient3632" + y2="448.35001" + gradientUnits="userSpaceOnUse" + x2="382.89999" + gradientTransform="matrix(0.70711,-0.70711,0.70711,0.70711,-126.18,372.21)" + y1="448.35001" + x1="403.63"> + <stop + id="stop3636" + stop-color="#ffe800" + stop-opacity=".39216" + offset="0" /> + <stop + id="stop3638" + stop-color="#dfb300" + stop-opacity=".39216" + offset="1" /> + </linearGradient> + </defs> + <g + id="layer1" + transform="translate(-77.797413,384.00351)"> + <path + id="path6625" + d="m 227.2,177.73 c -46.65,46.65 -46.67,122.4 -0.03,169.04 30.92,30.92 74.6,41.33 114.12,31.27 l 22.3,22.29 39.67,4.86 4.91,39.73 39.68,4.86 4.89,39.7 39.72,4.91 4.86,39.68 70.53,-5.91 5.66,-0.46 1.07,-12.21 5.62,-63.77 L 558.13,429.65 536.1,407.62 514.05,385.57 492.02,363.55 469.97,341.5 447.92,319.45 425.87,297.4 c 12.55,-40.94 2.66,-87.25 -29.71,-119.62 -46.64,-46.64 -122.32,-46.69 -168.96,-0.05 z m 24.21,24.32 c 21.41,-21.41 52.07,-25.54 68.44,-9.17 16.37,16.37 12.26,47.05 -9.14,68.46 -21.41,21.41 -52.07,25.49 -68.44,9.12 -16.37,-16.37 -12.27,-47.01 9.14,-68.41 z" + style="color:#000000;fill:url(#linearGradient3601)" + inkscape:connector-curvature="0" /> + <path + id="path6871" + d="m 388.43,339.03 c -1.68,1.68 -2.88,3.59 -3.69,5.59 -0.74,1.82 -1.28,3.93 -1.28,6.32 0,2.4 0.52,4.53 1.26,6.35 0.77,1.9 2.01,3.91 3.69,5.59 L 551.53,526 l 3.27,3.27 4.62,-0.38 5.68,-0.46 8.39,-0.71 0.75,-8.4 1.06,-12.19 0.4,-4.64 -3.29,-3.3 -160.16,-160.16 c -1.68,-1.68 -3.68,-2.91 -5.59,-3.69 -1.81,-0.73 -3.92,-1.28 -6.32,-1.28 -2.4,0 -4.51,0.55 -6.32,1.28 -1.91,0.78 -3.91,2.01 -5.59,3.69 z" + style="color:#000000;fill:url(#linearGradient3632)" + inkscape:connector-curvature="0" /> + <path + id="path2365" + d="m 239.44,192.85 c -2.29,2.41 -4.43,4.92 -6.43,7.49 2.5,-3.23 5.25,-6.31 8.22,-9.28 -0.6,0.6 -1.21,1.18 -1.79,1.79 z m 3.62,-3.58 c 4.29,-4.07 8.84,-7.67 13.61,-10.83 -4.76,3.15 -9.33,6.77 -13.61,10.83 z m -11.62,13.17 c -0.93,1.27 -1.81,2.53 -2.67,3.82 0.85,-1.29 1.74,-2.56 2.67,-3.82 z m -2.81,4.05 c -0.89,1.35 -1.76,2.74 -2.58,4.13 0.82,-1.4 1.68,-2.77 2.58,-4.13 z m -2.58,4.13 c -1.66,2.8 -3.16,5.65 -4.51,8.57 1.35,-2.91 2.86,-5.78 4.51,-8.57 z m -4.51,8.57 c -1.35,2.92 -2.55,5.9 -3.6,8.91 1.05,-3.01 2.25,-6 3.6,-8.91 z m -3.6,8.91 c -1.05,3 -1.97,6.05 -2.72,9.12 0.75,-3.08 1.67,-6.12 2.72,-9.12 z m -2.72,9.12 c -0.31,1.27 -0.58,2.53 -0.84,3.8 0.26,-1.27 0.53,-2.53 0.84,-3.8 z m 43.53,-60.1 c 1.38,-0.87 2.79,-1.69 4.2,-2.48 -1.41,0.79 -2.82,1.61 -4.2,2.48 z m 8.49,-4.73 c 1.44,-0.71 2.88,-1.37 4.35,-2.01 -1.46,0.63 -2.92,1.3 -4.35,2.01 z m 17.89,-6.76 c 1.53,-0.41 3.06,-0.77 4.6,-1.11 -1.54,0.34 -3.07,0.7 -4.6,1.11 z m 4.62,-1.13 c 1.54,-0.34 3.09,-0.62 4.64,-0.88 -1.55,0.26 -3.1,0.54 -4.64,0.88 z m -75.52,77.34 c -0.16,0.79 -0.29,1.58 -0.42,2.36 0.13,-0.77 0.27,-1.58 0.42,-2.36 z m -0.42,2.36 c -0.13,0.78 -0.27,1.55 -0.38,2.33 0.11,-0.79 0.24,-1.55 0.38,-2.33 z m -0.69,4.67 c -0.09,0.78 -0.17,1.57 -0.24,2.36 0.07,-0.78 0.15,-1.58 0.24,-2.36 z m -0.44,4.73 c -0.06,0.78 -0.1,1.56 -0.13,2.34 0.03,-0.79 0.07,-1.56 0.13,-2.34 z m 93.47,-91.26 c 1.18,-0.06 2.37,-0.1 3.56,-0.12 -1.2,0.02 -2.37,0.06 -3.56,0.12 z m 4.71,-0.12 c 0.78,0 1.57,0.01 2.36,0.03 -0.79,-0.02 -1.57,-0.03 -2.36,-0.03 z m -98.18,105.52 c 0.11,1.58 0.25,3.16 0.44,4.73 -0.19,-1.57 -0.33,-3.16 -0.44,-4.73 z M 322.66,162.93 c 1.56,0.19 3.12,0.4 4.68,0.66 -1.56,-0.26 -3.12,-0.47 -4.68,-0.66 z m -108.85,114.2 c 0.13,0.78 0.26,1.58 0.42,2.36 -0.15,-0.77 -0.29,-1.58 -0.42,-2.36 z m 0.42,2.36 c 0.14,0.77 0.31,1.54 0.48,2.3 -0.17,-0.77 -0.33,-1.52 -0.48,-2.3 z m 1.61,6.92 c 0.21,0.77 0.41,1.55 0.64,2.32 -0.23,-0.76 -0.44,-1.55 -0.64,-2.32 z m 1.35,4.57 c 0.24,0.76 0.49,1.51 0.75,2.26 -0.27,-0.75 -0.51,-1.5 -0.75,-2.26 z m 0.75,2.26 c 0.25,0.71 0.5,1.43 0.77,2.14 -0.26,-0.7 -0.52,-1.43 -0.77,-2.14 z m 1.7,4.48 c 0.3,0.75 0.61,1.48 0.93,2.21 -0.32,-0.73 -0.63,-1.47 -0.93,-2.21 z m 0.93,2.21 c 0.32,0.74 0.63,1.48 0.97,2.21 -0.34,-0.72 -0.65,-1.47 -0.97,-2.21 z m 0.97,2.21 c 0.34,0.73 0.7,1.45 1.06,2.17 -0.36,-0.72 -0.72,-1.44 -1.06,-2.17 z m 2.14,4.31 c 0.38,0.72 0.78,1.43 1.17,2.15 -0.39,-0.71 -0.79,-1.43 -1.17,-2.15 z M 359.25,174.91 c 1.12,0.63 2.23,1.28 3.34,1.97 -1.11,-0.69 -2.22,-1.34 -3.34,-1.97 z M 227.33,312.79 c 0.38,0.61 0.77,1.23 1.17,1.84 -0.4,-0.61 -0.79,-1.22 -1.17,-1.84 z m 1.57,2.46 c 0.42,0.62 0.85,1.24 1.28,1.85 -0.43,-0.62 -0.86,-1.23 -1.28,-1.85 z m 2.72,3.86 c 0.95,1.3 1.95,2.57 2.98,3.83 -1.02,-1.25 -2.03,-2.54 -2.98,-3.83 z M 371.07,182.75 c 1.3,1.01 2.61,2.04 3.87,3.12 -1.27,-1.09 -2.56,-2.1 -3.87,-3.12 z M 244.92,333.79 c 38.64,34.9 98.35,33.74 135.59,-3.49 37.23,-37.24 38.39,-96.96 3.49,-135.59 31.41,35.32 -20.5,44.27 -57.68,81.45 -37.17,37.17 -46.08,89.04 -81.4,57.63 z" + style="color:#000000;fill:url(#linearGradient3609)" + inkscape:connector-curvature="0" /> + <path + id="path6632" + d="m 239.44,192.87 c -36.65,38.56 -36.03,99.58 1.8,137.42 38.44,38.43 46.67,-15.69 85.1,-54.13 38.43,-38.43 92.59,-46.69 54.15,-85.12 -38.43,-38.44 -100.81,-38.41 -139.25,0.03 -0.6,0.6 -1.22,1.19 -1.8,1.8 z m 11.99,9.17 c 21.4,-21.41 52.05,-25.51 68.42,-9.14 16.37,16.37 12.27,47.02 -9.14,68.43 -21.4,21.4 -52.05,25.5 -68.42,9.13 -16.37,-16.37 -12.27,-47.02 9.14,-68.42 z" + style="color:#000000;fill:url(#linearGradient3594)" + inkscape:connector-curvature="0" /> + </g> + <metadata + id="metadata6318"> + <rdf:RDF> + <cc:Work> + <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:publisher> + <cc:Agent + rdf:about="http://openclipart.org/"> + <dc:title>Openclipart</dc:title> + </cc:Agent> + </dc:publisher> + <dc:title>Key</dc:title> + <dc:date>2007-02-27T15:15:43</dc:date> + <dc:description>A key icon.</dc:description> + <dc:source>http://openclipart.org/detail/3330/key-by-barretr</dc:source> + <dc:creator> + <cc:Agent> + <dc:title>barretr</dc:title> + </cc:Agent> + </dc:creator> + <dc:subject> + <rdf:Bag> + <rdf:li>clip art</rdf:li> + <rdf:li>clipart</rdf:li> + <rdf:li>icon</rdf:li> + <rdf:li>image</rdf:li> + <rdf:li>key</rdf:li> + <rdf:li>media</rdf:li> + <rdf:li>png</rdf:li> + <rdf:li>public domain</rdf:li> + <rdf:li>svg</rdf:li> + </rdf:Bag> + </dc:subject> + </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> + <rect + style="color:#000000;fill:#ff0000;fill-opacity:0;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-miterlimit:4;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + id="rect6322" + width="442.68826" + height="442.68826" + x="84.558434" + y="505.21939" /> +</svg> diff --git a/icons/tms.png b/icons/tms.png Binary files differnew file mode 100644 index 000000000..60e3cc2ff --- /dev/null +++ b/icons/tms.png diff --git a/icons/tms.svg b/icons/tms.svg new file mode 100644 index 000000000..c1815b9b3 --- /dev/null +++ b/icons/tms.svg @@ -0,0 +1,192 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + xmlns:osb="http://www.openswatchbook.org/uri/2009/osb" + 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="744.09448819" + height="1052.3622047" + id="svg4047" + version="1.1" + inkscape:version="0.48.4 r9939" + sodipodi:docname="tms.svg" + inkscape:export-filename="/home/carl/src/dcpomatic/icons/tms.png" + inkscape:export-xdpi="11.282503" + inkscape:export-ydpi="11.282503"> + <defs + id="defs4049"> + <linearGradient + inkscape:collect="always" + id="linearGradient6220"> + <stop + style="stop-color:#280b0b;stop-opacity:1;" + offset="0" + id="stop6222" /> + <stop + style="stop-color:#280b0b;stop-opacity:0;" + offset="1" + id="stop6224" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient6212"> + <stop + style="stop-color:#280b0b;stop-opacity:1;" + offset="0" + id="stop6214" /> + <stop + style="stop-color:#280b0b;stop-opacity:0;" + offset="1" + id="stop6216" /> + </linearGradient> + <linearGradient + inkscape:collect="always" + id="linearGradient6204"> + <stop + style="stop-color:#280b0b;stop-opacity:1;" + offset="0" + id="stop6206" /> + <stop + style="stop-color:#280b0b;stop-opacity:0;" + offset="1" + id="stop6208" /> + </linearGradient> + <linearGradient + id="linearGradient6065" + osb:paint="solid"> + <stop + style="stop-color:#ffffff;stop-opacity:1;" + offset="0" + id="stop6067" /> + </linearGradient> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="252.46881 : 700.96181 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="945.56329 : 858.96181 : 1" + inkscape:persp3d-origin="602.51605 : 274.56811 : 1" + id="perspective4055" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6204" + id="linearGradient6210" + x1="310.2699" + y1="446.39062" + x2="115.85081" + y2="662.24622" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6212" + id="linearGradient6218" + x1="254.40172" + y1="409.5137" + x2="532.05225" + y2="261.88489" + gradientUnits="userSpaceOnUse" /> + <linearGradient + inkscape:collect="always" + xlink:href="#linearGradient6220" + id="linearGradient6226" + x1="358.52518" + y1="490.35175" + x2="581.59894" + y2="475.05954" + gradientUnits="userSpaceOnUse" /> + </defs> + <sodipodi:namedview + id="base" + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1.0" + inkscape:pageopacity="0.0" + inkscape:pageshadow="2" + inkscape:zoom="1.7002102" + inkscape:cx="334.00378" + inkscape:cy="602.77323" + inkscape:document-units="px" + inkscape:current-layer="layer1" + showgrid="false" + showguides="true" + inkscape:guide-bbox="true" + objecttolerance="10000" + inkscape:window-width="1366" + inkscape:window-height="714" + inkscape:window-x="0" + inkscape:window-y="27" + inkscape:window-maximized="1"> + <sodipodi:guide + orientation="0,1" + position="-88,846" + id="guide6105" /> + </sodipodi:namedview> + <metadata + id="metadata4052"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1"> + <path + style="fill:url(#linearGradient6226);fill-opacity:1;stroke:#4d4d4d;stroke-width:12;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 323.35383,442.15071 -0.58817,142.87283 73.44365,-49.82452 -2.19901,-140.69539 z" + id="path6121" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + style="fill:url(#linearGradient6210);stroke:#4d4d4d;stroke-width:12;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;fill-opacity:1" + d="m 323.35382,439.86652 -87.07405,-40.13194 0,126.71456 86.48589,58.35081 z" + id="path6123" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + style="fill:url(#linearGradient6218);fill-opacity:1;stroke:#4d4d4d;stroke-width:12;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 236.28706,399.69135 64.7791,-37.11367 93.23766,31.49886 -69.74842,46.49277 z" + id="path6125" + inkscape:connector-curvature="0" + sodipodi:nodetypes="ccccc" /> + <path + style="fill:none;stroke:#ff0000;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 339.3698,456.5535 12.93958,-9.4106" + id="path6127" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#ff0000;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 339.95796,471.84573 12.93958,-9.4106" + id="path6127-4" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#00ff00;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 340.54612,487.13795 12.93958,-9.4106" + id="path6127-4-9" + inkscape:connector-curvature="0" /> + <path + style="fill:none;stroke:#00ff00;stroke-width:8;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" + d="m 367.6016,534.77913 12.93958,-9.4106" + id="path6127-4-9-1" + inkscape:connector-curvature="0" /> + <rect + style="color:#000000;fill:#ff0000;fill-opacity:0;fill-rule:nonzero;stroke:none;stroke-width:8;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate" + id="rect6202" + width="255.26256" + height="255.26256" + x="188.21201" + y="346.56711" /> + </g> +</svg> diff --git a/run/dcpomatic b/run/dcpomatic index 66d79d5c9..544ffc040 100755 --- a/run/dcpomatic +++ b/run/dcpomatic @@ -59,6 +59,9 @@ if [ `uname -s` == "Darwin" ]; then cp $ENV/libffi*.dylib $lib cp icons/defaults.png $resources cp icons/servers.png $resources + cp icons/tms.png $resources + cp icons/colour_conversions.png $resources + cp icons/kdm_email.png $resources sed -e "s/@VERSION@/test/g" platform/osx/Info.plist.in > $app/Contents/Info.plist diff --git a/src/wx/config_dialog.cc b/src/wx/config_dialog.cc index 7fe81de4e..8938c84f9 100644 --- a/src/wx/config_dialog.cc +++ b/src/wx/config_dialog.cc @@ -52,11 +52,25 @@ using boost::bind; using boost::shared_ptr; using boost::lexical_cast; -class GeneralPage : public wxStockPreferencesPage +class Page { public: - GeneralPage () + Page (wxSize panel_size, int border) + : _panel_size (panel_size) + , _border (border) + {} + +protected: + wxSize _panel_size; + int _border; +}; + +class GeneralPage : public wxStockPreferencesPage, public Page +{ +public: + GeneralPage (wxSize panel_size, int border) : wxStockPreferencesPage (Kind_General) + , Page (panel_size, border) {} wxWindow* CreateWindow (wxWindow* parent) @@ -67,7 +81,7 @@ public: wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); table->AddGrowableCol (1, 1); - s->Add (table, 1, wxALL | wxEXPAND, 8); + s->Add (table, 1, wxALL | wxEXPAND, _border); _set_language = new wxCheckBox (panel, wxID_ANY, _("Set language")); table->Add (_set_language, 1); @@ -248,9 +262,13 @@ private: wxCheckBox* _check_for_test_updates; }; -class DefaultsPage : public wxPreferencesPage +class DefaultsPage : public wxPreferencesPage, public Page { public: + DefaultsPage (wxSize panel_size, int border) + : Page (panel_size, border) + {} + wxString GetName () const { return _("Defaults"); @@ -271,42 +289,42 @@ public: wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); table->AddGrowableCol (1, 1); - s->Add (table, 1, wxALL | wxEXPAND, 8); + s->Add (table, 1, wxALL | wxEXPAND, _border); { add_label_to_sizer (table, panel, _("Default duration of still images"), true); wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _default_still_length = new wxSpinCtrl (panel); - s->Add (_default_still_length); + _still_length = new wxSpinCtrl (panel); + s->Add (_still_length); add_label_to_sizer (s, panel, _("s"), false); table->Add (s, 1); } add_label_to_sizer (table, panel, _("Default directory for new films"), true); #ifdef DCPOMATIC_USE_OWN_DIR_PICKER - _default_directory = new DirPickerCtrl (panel); + _directory = new DirPickerCtrl (panel); #else - _default_directory = new wxDirPickerCtrl (panel, wxDD_DIR_MUST_EXIST); + _directory = new wxDirPickerCtrl (panel, wxDD_DIR_MUST_EXIST); #endif - table->Add (_default_directory, 1, wxEXPAND); + table->Add (_directory, 1, wxEXPAND); add_label_to_sizer (table, panel, _("Default DCI name details"), true); - _default_dci_metadata_button = new wxButton (panel, wxID_ANY, _("Edit...")); - table->Add (_default_dci_metadata_button); + _dci_metadata_button = new wxButton (panel, wxID_ANY, _("Edit...")); + table->Add (_dci_metadata_button); add_label_to_sizer (table, panel, _("Default container"), true); - _default_container = new wxChoice (panel, wxID_ANY); - table->Add (_default_container); + _container = new wxChoice (panel, wxID_ANY); + table->Add (_container); add_label_to_sizer (table, panel, _("Default content type"), true); - _default_dcp_content_type = new wxChoice (panel, wxID_ANY); - table->Add (_default_dcp_content_type); + _dcp_content_type = new wxChoice (panel, wxID_ANY); + table->Add (_dcp_content_type); { add_label_to_sizer (table, panel, _("Default JPEG2000 bandwidth"), true); wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _default_j2k_bandwidth = new wxSpinCtrl (panel); - s->Add (_default_j2k_bandwidth); + _j2k_bandwidth = new wxSpinCtrl (panel); + s->Add (_j2k_bandwidth); add_label_to_sizer (s, panel, _("Mbit/s"), false); table->Add (s, 1); } @@ -314,75 +332,88 @@ public: { add_label_to_sizer (table, panel, _("Default audio delay"), true); wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL); - _default_audio_delay = new wxSpinCtrl (panel); - s->Add (_default_audio_delay); + _audio_delay = new wxSpinCtrl (panel); + s->Add (_audio_delay); add_label_to_sizer (s, panel, _("ms"), false); table->Add (s, 1); } + + add_label_to_sizer (table, panel, _("Default issuer"), true); + _issuer = new wxTextCtrl (panel, wxID_ANY); + table->Add (_issuer, 1, wxEXPAND); + + add_label_to_sizer (table, panel, _("Default creator"), true); + _creator = new wxTextCtrl (panel, wxID_ANY); + table->Add (_creator, 1, wxEXPAND); Config* config = Config::instance (); - _default_still_length->SetRange (1, 3600); - _default_still_length->SetValue (config->default_still_length ()); - _default_still_length->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::default_still_length_changed, this)); + _still_length->SetRange (1, 3600); + _still_length->SetValue (config->default_still_length ()); + _still_length->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::still_length_changed, this)); - _default_directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ())); - _default_directory->Bind (wxEVT_COMMAND_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::default_directory_changed, this)); + _directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ())); + _directory->Bind (wxEVT_COMMAND_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::directory_changed, this)); - _default_dci_metadata_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DefaultsPage::edit_default_dci_metadata_clicked, this, parent)); + _dci_metadata_button->Bind (wxEVT_COMMAND_BUTTON_CLICKED, boost::bind (&DefaultsPage::edit_dci_metadata_clicked, this, parent)); vector<Ratio const *> ratio = Ratio::all (); int n = 0; for (vector<Ratio const *>::iterator i = ratio.begin(); i != ratio.end(); ++i) { - _default_container->Append (std_to_wx ((*i)->nickname ())); + _container->Append (std_to_wx ((*i)->nickname ())); if (*i == config->default_container ()) { - _default_container->SetSelection (n); + _container->SetSelection (n); } ++n; } - _default_container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::default_container_changed, this)); + _container->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::container_changed, this)); vector<DCPContentType const *> const ct = DCPContentType::all (); n = 0; for (vector<DCPContentType const *>::const_iterator i = ct.begin(); i != ct.end(); ++i) { - _default_dcp_content_type->Append (std_to_wx ((*i)->pretty_name ())); + _dcp_content_type->Append (std_to_wx ((*i)->pretty_name ())); if (*i == config->default_dcp_content_type ()) { - _default_dcp_content_type->SetSelection (n); + _dcp_content_type->SetSelection (n); } ++n; } - _default_dcp_content_type->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::default_dcp_content_type_changed, this)); + _dcp_content_type->Bind (wxEVT_COMMAND_CHOICE_SELECTED, boost::bind (&DefaultsPage::dcp_content_type_changed, this)); - _default_j2k_bandwidth->SetRange (50, 250); - _default_j2k_bandwidth->SetValue (config->default_j2k_bandwidth() / 1000000); - _default_j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::default_j2k_bandwidth_changed, this)); + _j2k_bandwidth->SetRange (50, 250); + _j2k_bandwidth->SetValue (config->default_j2k_bandwidth() / 1000000); + _j2k_bandwidth->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::j2k_bandwidth_changed, this)); - _default_audio_delay->SetRange (-1000, 1000); - _default_audio_delay->SetValue (config->default_audio_delay ()); - _default_audio_delay->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::default_audio_delay_changed, this)); + _audio_delay->SetRange (-1000, 1000); + _audio_delay->SetValue (config->default_audio_delay ()); + _audio_delay->Bind (wxEVT_COMMAND_SPINCTRL_UPDATED, boost::bind (&DefaultsPage::audio_delay_changed, this)); + + _issuer->SetValue (std_to_wx (config->dcp_metadata().issuer)); + _issuer->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DefaultsPage::issuer_changed, this)); + _creator->SetValue (std_to_wx (config->dcp_metadata().creator)); + _creator->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&DefaultsPage::creator_changed, this)); return panel; } private: - void default_j2k_bandwidth_changed () + void j2k_bandwidth_changed () { - Config::instance()->set_default_j2k_bandwidth (_default_j2k_bandwidth->GetValue() * 1000000); + Config::instance()->set_default_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000); } - void default_audio_delay_changed () + void audio_delay_changed () { - Config::instance()->set_default_audio_delay (_default_audio_delay->GetValue()); + Config::instance()->set_default_audio_delay (_audio_delay->GetValue()); } - void default_directory_changed () + void directory_changed () { - Config::instance()->set_default_directory (wx_to_std (_default_directory->GetPath ())); + Config::instance()->set_default_directory (wx_to_std (_directory->GetPath ())); } - void edit_default_dci_metadata_clicked (wxWindow* parent) + void edit_dci_metadata_clicked (wxWindow* parent) { DCIMetadataDialog* d = new DCIMetadataDialog (parent, Config::instance()->default_dci_metadata ()); d->ShowModal (); @@ -390,39 +421,59 @@ private: d->Destroy (); } - void default_still_length_changed () + void still_length_changed () { - Config::instance()->set_default_still_length (_default_still_length->GetValue ()); + Config::instance()->set_default_still_length (_still_length->GetValue ()); } - void default_container_changed () + void container_changed () { vector<Ratio const *> ratio = Ratio::all (); - Config::instance()->set_default_container (ratio[_default_container->GetSelection()]); + Config::instance()->set_default_container (ratio[_container->GetSelection()]); } - void default_dcp_content_type_changed () + void dcp_content_type_changed () { vector<DCPContentType const *> ct = DCPContentType::all (); - Config::instance()->set_default_dcp_content_type (ct[_default_dcp_content_type->GetSelection()]); + Config::instance()->set_default_dcp_content_type (ct[_dcp_content_type->GetSelection()]); + } + + void issuer_changed () + { + libdcp::XMLMetadata m = Config::instance()->dcp_metadata (); + m.issuer = wx_to_std (_issuer->GetValue ()); + Config::instance()->set_dcp_metadata (m); } - wxSpinCtrl* _default_j2k_bandwidth; - wxSpinCtrl* _default_audio_delay; - wxButton* _default_dci_metadata_button; - wxSpinCtrl* _default_still_length; + void creator_changed () + { + libdcp::XMLMetadata m = Config::instance()->dcp_metadata (); + m.creator = wx_to_std (_creator->GetValue ()); + Config::instance()->set_dcp_metadata (m); + } + + wxSpinCtrl* _j2k_bandwidth; + wxSpinCtrl* _audio_delay; + wxButton* _dci_metadata_button; + wxSpinCtrl* _still_length; #ifdef DCPOMATIC_USE_OWN_DIR_PICKER - DirPickerCtrl* _default_directory; + DirPickerCtrl* _directory; #else - wxDirPickerCtrl* _default_directory; + wxDirPickerCtrl* _directory; #endif - wxChoice* _default_container; - wxChoice* _default_dcp_content_type; + wxChoice* _container; + wxChoice* _dcp_content_type; + wxTextCtrl* _issuer; + wxTextCtrl* _creator; }; -class EncodingServersPage : public wxPreferencesPage +class EncodingServersPage : public wxPreferencesPage, public Page { public: + EncodingServersPage (wxSize panel_size, int border) + : Page (panel_size, border) + {} + wxString GetName () const { return _("Servers"); @@ -437,12 +488,12 @@ public: wxWindow* CreateWindow (wxWindow* parent) { - wxPanel* panel = new wxPanel (parent); + wxPanel* panel = new wxPanel (parent, wxID_ANY, wxDefaultPosition, _panel_size); wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); panel->SetSizer (s); _use_any_servers = new wxCheckBox (panel, wxID_ANY, _("Use all servers")); - s->Add (_use_any_servers, 0, wxALL, DCPOMATIC_SIZER_X_GAP); + s->Add (_use_any_servers, 0, wxALL, _border); vector<string> columns; columns.push_back (wx_to_std (_("IP address / host name"))); @@ -454,7 +505,7 @@ public: boost::bind (&EncodingServersPage::server_column, this, _1) ); - s->Add (_servers_list, 1, wxEXPAND | wxALL, DCPOMATIC_SIZER_X_GAP); + s->Add (_servers_list, 1, wxEXPAND | wxALL, _border); _use_any_servers->SetValue (Config::instance()->use_any_servers ()); _use_any_servers->Bind (wxEVT_COMMAND_CHECKBOX_CLICKED, boost::bind (&EncodingServersPage::use_any_servers_changed, this)); @@ -478,8 +529,13 @@ private: EditableList<string, ServerDialog>* _servers_list; }; -class ColourConversionsPage : public wxPreferencesPage +class ColourConversionsPage : public wxPreferencesPage, public Page { +public: + ColourConversionsPage (wxSize panel_size, int border) + : Page (panel_size, border) + {} + wxString GetName () const { return _("Colour Conversions"); @@ -488,21 +544,28 @@ class ColourConversionsPage : public wxPreferencesPage #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("blank", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap ("colour_conversions", wxBITMAP_TYPE_PNG_RESOURCE); } #endif wxWindow* CreateWindow (wxWindow* parent) { + wxPanel* panel = new wxPanel (parent, wxID_ANY, wxDefaultPosition, _panel_size); + wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); + panel->SetSizer (s); + vector<string> columns; columns.push_back (wx_to_std (_("Name"))); - return new EditableList<PresetColourConversion, PresetColourConversionDialog> ( - parent, + wxPanel* list = new EditableList<PresetColourConversion, PresetColourConversionDialog> ( + panel, columns, boost::bind (&Config::colour_conversions, Config::instance()), boost::bind (&Config::set_colour_conversions, Config::instance(), _1), boost::bind (&ColourConversionsPage::colour_conversion_column, this, _1), 300 ); + + s->Add (list, 1, wxEXPAND | wxALL, _border); + return panel; } private: @@ -512,69 +575,13 @@ private: } }; -class MetadataPage : public wxPreferencesPage +class TMSPage : public wxPreferencesPage, public Page { - wxString GetName () const - { - return _("Metadata"); - } - -#ifdef DCPOMATIC_OSX - wxBitmap GetLargeIcon () const - { - return wxBitmap ("blank", wxBITMAP_TYPE_PNG_RESOURCE); - } -#endif - - wxWindow* CreateWindow (wxWindow* parent) - { - wxPanel* panel = new wxPanel (parent); - wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); - panel->SetSizer (s); - - wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); - table->AddGrowableCol (1, 1); - s->Add (table, 1, wxALL | wxEXPAND, 8); - - add_label_to_sizer (table, panel, _("Issuer"), true); - _issuer = new wxTextCtrl (panel, wxID_ANY); - table->Add (_issuer, 1, wxEXPAND); - - add_label_to_sizer (table, panel, _("Creator"), true); - _creator = new wxTextCtrl (panel, wxID_ANY); - table->Add (_creator, 1, wxEXPAND); - - Config* config = Config::instance (); - - _issuer->SetValue (std_to_wx (config->dcp_metadata().issuer)); - _issuer->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&MetadataPage::issuer_changed, this)); - _creator->SetValue (std_to_wx (config->dcp_metadata().creator)); - _creator->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&MetadataPage::creator_changed, this)); - - return panel; - } - -private: - wxTextCtrl* _issuer; - wxTextCtrl* _creator; - - void issuer_changed () - { - libdcp::XMLMetadata m = Config::instance()->dcp_metadata (); - m.issuer = wx_to_std (_issuer->GetValue ()); - Config::instance()->set_dcp_metadata (m); - } - - void creator_changed () - { - libdcp::XMLMetadata m = Config::instance()->dcp_metadata (); - m.creator = wx_to_std (_creator->GetValue ()); - Config::instance()->set_dcp_metadata (m); - } -}; +public: + TMSPage (wxSize panel_size, int border) + : Page (panel_size, border) + {} -class TMSPage : public wxPreferencesPage -{ wxString GetName () const { return _("TMS"); @@ -583,19 +590,19 @@ class TMSPage : public wxPreferencesPage #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("blank", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap ("tms", wxBITMAP_TYPE_PNG_RESOURCE); } #endif wxWindow* CreateWindow (wxWindow* parent) { - wxPanel* panel = new wxPanel (parent); + wxPanel* panel = new wxPanel (parent, wxID_ANY, wxDefaultPosition, _panel_size); wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); panel->SetSizer (s); wxFlexGridSizer* table = new wxFlexGridSizer (2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP); table->AddGrowableCol (1, 1); - s->Add (table, 1, wxALL | wxEXPAND, 8); + s->Add (table, 1, wxALL | wxEXPAND, _border); add_label_to_sizer (table, panel, _("IP address"), true); _tms_ip = new wxTextCtrl (panel, wxID_ANY); @@ -654,9 +661,14 @@ private: wxTextCtrl* _tms_password; }; -class KDMEmailPage : public wxPreferencesPage +class KDMEmailPage : public wxPreferencesPage, public Page { public: + + KDMEmailPage (wxSize panel_size, int border) + : Page (panel_size, border) + {} + wxString GetName () const { return _("KDM Email"); @@ -665,18 +677,23 @@ public: #ifdef DCPOMATIC_OSX wxBitmap GetLargeIcon () const { - return wxBitmap ("blank", wxBITMAP_TYPE_PNG_RESOURCE); + return wxBitmap ("kdm_email", wxBITMAP_TYPE_PNG_RESOURCE); } #endif wxWindow* CreateWindow (wxWindow* parent) { + /* We have to force both width and height of this one */ +#ifdef DCPOMATIC_OSX + wxPanel* panel = new wxPanel (parent, wxID_ANY, wxDefaultPosition, wxSize (480, 128)); +#else wxPanel* panel = new wxPanel (parent); +#endif wxBoxSizer* s = new wxBoxSizer (wxVERTICAL); panel->SetSizer (s); - _kdm_email = new wxTextCtrl (panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE); - s->Add (_kdm_email, 1, wxEXPAND | wxALL, 12); + _kdm_email = new wxTextCtrl (panel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize (480, 128), wxTE_MULTILINE); + s->Add (_kdm_email, 1, wxEXPAND | wxALL, _border); _kdm_email->Bind (wxEVT_COMMAND_TEXT_UPDATED, boost::bind (&KDMEmailPage::kdm_email_changed, this)); _kdm_email->SetValue (wx_to_std (Config::instance()->kdm_email ())); @@ -697,12 +714,24 @@ wxPreferencesEditor* create_config_dialog () { wxPreferencesEditor* e = new wxPreferencesEditor (); - e->AddPage (new GeneralPage); - e->AddPage (new DefaultsPage); - e->AddPage (new EncodingServersPage); - e->AddPage (new ColourConversionsPage); - e->AddPage (new MetadataPage); - e->AddPage (new TMSPage); - e->AddPage (new KDMEmailPage); + +#ifdef DCPOMATIC_OSX + /* Width that we force some of the config panels to be on OSX so that + the containing window doesn't shrink too much when we select those panels. + This is obviously an unpleasant hack. + */ + wxSize ps = wxSize (480, -1); + int const border = 16; +#else + wxSize ps = wxDefaultSize; + int const border = 8; +#endif + + e->AddPage (new GeneralPage (ps, border)); + e->AddPage (new DefaultsPage (ps, border)); + e->AddPage (new EncodingServersPage (ps, border)); + e->AddPage (new ColourConversionsPage (ps, border)); + e->AddPage (new TMSPage (ps, border)); + e->AddPage (new KDMEmailPage (ps, border)); return e; } |
