Compare commits
670 Commits
wip/ebassi
...
peek-passw
Author | SHA1 | Date | |
---|---|---|---|
|
de9e31c028 | ||
|
d3d65e9148 | ||
|
1cb1977988 | ||
|
e0b5b95eff | ||
|
5822a35087 | ||
|
a3b73a416e | ||
|
d3cecd65a5 | ||
|
470720e11a | ||
|
c3f43cf1f2 | ||
|
5251253fc0 | ||
|
f5e112fd2d | ||
|
56ee1f3566 | ||
|
4afad781fe | ||
|
8e4c441f78 | ||
|
44198cc779 | ||
|
f454a31caa | ||
|
3863e44360 | ||
|
8566218485 | ||
|
1475575799 | ||
|
bc901ffa5a | ||
|
b114d45c5f | ||
|
9a1c698070 | ||
|
884088f649 | ||
|
ad5c5d477e | ||
|
1513bf4174 | ||
|
eacbeb9efd | ||
|
18da852e15 | ||
|
39fbf13fcb | ||
|
9105de9170 | ||
|
eeed55d45c | ||
|
3a3b325f8e | ||
|
dbe58452d7 | ||
|
a8bf5eee0f | ||
|
bd113aa85c | ||
|
1fecbd4241 | ||
|
3545abc7a1 | ||
|
70b341139b | ||
|
b391aea2b3 | ||
|
979e9bec27 | ||
|
e737b42113 | ||
|
cf00c36c85 | ||
|
3cc84d2860 | ||
|
791bf0c2eb | ||
|
3a3c2d14ab | ||
|
4916280883 | ||
|
0e1a50366a | ||
|
20f7588a84 | ||
|
348912dff4 | ||
|
610692d07b | ||
|
45ea288ba2 | ||
|
b79545e83c | ||
|
02318dbda7 | ||
|
afbfccb89e | ||
|
bed4c68041 | ||
|
8ceff21497 | ||
|
4fe67310fb | ||
|
f35b8a7541 | ||
|
9948ca7be2 | ||
|
eaf41cc90c | ||
|
9e0c471b03 | ||
|
dc282991c6 | ||
|
7931ab5f33 | ||
|
416a4cf5ea | ||
|
bbd4e2f60d | ||
|
5577e30ad4 | ||
|
5caf8ca76b | ||
|
fda4546de5 | ||
|
fe7dcf6eec | ||
|
539e3d387b | ||
|
efbb26b8cb | ||
|
69251d051a | ||
|
d930c4a4d1 | ||
|
f36e41600a | ||
|
78d013f8d3 | ||
|
b4ae491b45 | ||
|
1469d01e2e | ||
|
b0083b33bb | ||
|
c5c75f338e | ||
|
572266429f | ||
|
91ad2eef5c | ||
|
14890fad47 | ||
|
5a6a7b50af | ||
|
8438880906 | ||
|
df6494d73a | ||
|
9335cde8e8 | ||
|
e836c575ce | ||
|
47fb1ec4c4 | ||
|
f0624266dc | ||
|
74ab3cdf75 | ||
|
58c2bea959 | ||
|
d3c45cb979 | ||
|
df27cb7240 | ||
|
397b8ee9d5 | ||
|
6687a0892a | ||
|
77c0e68b57 | ||
|
fd667bb203 | ||
|
d773bc0689 | ||
|
eddc823378 | ||
|
eb1310effe | ||
|
8a0182e401 | ||
|
edc4f954c6 | ||
|
c35554cf68 | ||
|
9861887f1a | ||
|
3ae31b0e79 | ||
|
06df7e6f2c | ||
|
0d39cb7379 | ||
|
cc216c9e84 | ||
|
09fea73a40 | ||
|
704e377fae | ||
|
12663d2844 | ||
|
4e8aa0c37a | ||
|
ea4f552d50 | ||
|
2501152842 | ||
|
a13d8501d4 | ||
|
69b1a348c6 | ||
|
b82e57fec6 | ||
|
5dbfb18d11 | ||
|
b6893b6d9f | ||
|
4001e7645b | ||
|
ac8b192eab | ||
|
fad9468e77 | ||
|
222d310370 | ||
|
fe95391184 | ||
|
e16cdb141c | ||
|
08badd23cd | ||
|
cc2c39209c | ||
|
d633beaccd | ||
|
23fb77af43 | ||
|
ccbaec0231 | ||
|
89470ab201 | ||
|
a3901f2563 | ||
|
5dd0863bd7 | ||
|
8d93321461 | ||
|
3ccbcf9f55 | ||
|
ef5108c89f | ||
|
0230a7b1e5 | ||
|
55337c588c | ||
|
9e231f6333 | ||
|
3ebf19b783 | ||
|
9591d40742 | ||
|
de6132a158 | ||
|
ddb52a5b5e | ||
|
47249431e3 | ||
|
f9041230c6 | ||
|
e54ce8f328 | ||
|
8d987be673 | ||
|
445dca42f5 | ||
|
c53e9ed6aa | ||
|
2b9436b279 | ||
|
bd99ae3767 | ||
|
0e603a6646 | ||
|
9d0e8b85c1 | ||
|
da0bd697b8 | ||
|
3471aac4ef | ||
|
593774133f | ||
|
41c0ac1a68 | ||
|
4e97417efa | ||
|
beb8d362ff | ||
|
f202707210 | ||
|
f8609efa2b | ||
|
2e5ccce088 | ||
|
3487ebe4fd | ||
|
f57e66cf37 | ||
|
1818f5589d | ||
|
d291dff0ac | ||
|
b70cd64d6d | ||
|
e8b5056940 | ||
|
6711aa2a4e | ||
|
ae47ec1c3b | ||
|
14444826c1 | ||
|
46cb221220 | ||
|
dfc1673653 | ||
|
b64f852d60 | ||
|
12442bd1bf | ||
|
0ae7c30105 | ||
|
fd318a17a4 | ||
|
e2b9f3258e | ||
|
ad58dd5cf5 | ||
|
4052bb2535 | ||
|
d8482edaf5 | ||
|
baefee17c5 | ||
|
751ef5b5b9 | ||
|
5965ead5a7 | ||
|
5fc446dabf | ||
|
70100d888a | ||
|
380c4ece8d | ||
|
6df2023e9d | ||
|
f59f4d774b | ||
|
a881cbff3a | ||
|
5b10a2929e | ||
|
b0eceb65d7 | ||
|
6e19fb7b36 | ||
|
b96e835d9e | ||
|
65174c7989 | ||
|
f0795a795b | ||
|
a5a7cdd84b | ||
|
6cb8f638d1 | ||
|
50e66d5c0d | ||
|
efd92f7a9e | ||
|
407307c7e4 | ||
|
51fac44ba5 | ||
|
2bdc0748e5 | ||
|
1ef250f44a | ||
|
0d119f81c8 | ||
|
e1570e9ebc | ||
|
4a293aa762 | ||
|
f0142b9c4b | ||
|
6a4bf2b993 | ||
|
f5b44c11c8 | ||
|
c24f32619f | ||
|
49d83820a2 | ||
|
70a1233a28 | ||
|
e5857a760f | ||
|
f67ef125f3 | ||
|
837d9bf39e | ||
|
96fa1fb5c1 | ||
|
a3ae12c0b7 | ||
|
ffee2d4567 | ||
|
b1fe5d8f1f | ||
|
e7824d8f9e | ||
|
8e97dc03de | ||
|
5d208071f5 | ||
|
eea651d5f9 | ||
|
888b967d6b | ||
|
f95ed63b88 | ||
|
3eda783d0a | ||
|
27f008de44 | ||
|
7d69430ebd | ||
|
05f8319270 | ||
|
0961fe7a55 | ||
|
ddea11b7b8 | ||
|
66b6824876 | ||
|
0fe1091ba8 | ||
|
f64b0a705e | ||
|
c1ad7217b5 | ||
|
f11d0118a3 | ||
|
7f8ba95db5 | ||
|
ff4b3f1170 | ||
|
78c54b27d7 | ||
|
85fb368834 | ||
|
0e29408215 | ||
|
3df4d1440a | ||
|
572142b950 | ||
|
103637f3b9 | ||
|
a339a5d617 | ||
|
74f4aecef5 | ||
|
2e9c7d0744 | ||
|
2e94891a6f | ||
|
b9a41a903b | ||
|
ef89ef9051 | ||
|
b741d36ced | ||
|
82bde1e10a | ||
|
eb8b1095c8 | ||
|
b303c20570 | ||
|
4dd7eb40a3 | ||
|
19bf937401 | ||
|
9ca392b38d | ||
|
c739071d31 | ||
|
120ee17e09 | ||
|
02e856f62e | ||
|
01f7f255b5 | ||
|
514c3679dc | ||
|
8fbfa955de | ||
|
cfc7dc016e | ||
|
8222631d63 | ||
|
93b47c12d7 | ||
|
9a8082bab2 | ||
|
8ce6cf569f | ||
|
e223f16aa9 | ||
|
dead174d70 | ||
|
e922ec1839 | ||
|
63a23ed0da | ||
|
2ecb4003be | ||
|
a953fd762e | ||
|
dbf0654e5b | ||
|
4529f52c02 | ||
|
63a8bd06a6 | ||
|
7c6e3e31c7 | ||
|
d006ee65f5 | ||
|
65e9d71da5 | ||
|
02bb364474 | ||
|
9174616a17 | ||
|
0ef6c3afed | ||
|
a417956054 | ||
|
b299ac8dfa | ||
|
22ea832eb3 | ||
|
ac445229d0 | ||
|
3422edff6c | ||
|
102c0ce696 | ||
|
996a4246fb | ||
|
613f8ceacf | ||
|
0e11944166 | ||
|
08bd6904b9 | ||
|
37b841b59b | ||
|
7d9e63ae38 | ||
|
f1012b5623 | ||
|
a0454e4025 | ||
|
b8c981fb2b | ||
|
3a1a7c43f3 | ||
|
fa3d1940bf | ||
|
667ea2dd42 | ||
|
210c5d88a2 | ||
|
c6e6fb19e7 | ||
|
39d5f9e07b | ||
|
cbbc7dd70f | ||
|
a31da76f95 | ||
|
8bb6d00ce2 | ||
|
1930c74736 | ||
|
ea098f8d51 | ||
|
45fb1d06e3 | ||
|
d247e5707d | ||
|
36ac867ea9 | ||
|
936181f354 | ||
|
fcb58887fa | ||
|
1801bf6d83 | ||
|
b9c8dd64b3 | ||
|
32795963c0 | ||
|
7325f8e204 | ||
|
76be7a5025 | ||
|
c9d9f8b750 | ||
|
ca2c05cdb3 | ||
|
10e5856583 | ||
|
0739399766 | ||
|
bea1a02edd | ||
|
74d6d81db9 | ||
|
e5e2bd3187 | ||
|
d327d3fab2 | ||
|
fb4f5e0a78 | ||
|
aa552229c9 | ||
|
c44c44ee25 | ||
|
7ad0f7fc52 | ||
|
285aba6ece | ||
|
19ffb40b27 | ||
|
86978d2654 | ||
|
694d7c378b | ||
|
446713fb8b | ||
|
2fbdd8b849 | ||
|
ddf2a3681d | ||
|
4ca1f7e29f | ||
|
aeda099f47 | ||
|
2e5bc9fbc3 | ||
|
d65a60e0bd | ||
|
d3a2218ff4 | ||
|
e0ec5caaf8 | ||
|
2ba928e142 | ||
|
07722582ef | ||
|
1f56f5c2e9 | ||
|
cd37b872ca | ||
|
acaa257469 | ||
|
89d8ae0431 | ||
|
fb44491926 | ||
|
ae9a29f8ce | ||
|
2866a13f30 | ||
|
6ef775dbcb | ||
|
927e983ff8 | ||
|
fbe0db4007 | ||
|
8de8b8eebc | ||
|
82fdd483d2 | ||
|
8c0b70691b | ||
|
1750922631 | ||
|
2dd85b826f | ||
|
c0c6c87781 | ||
|
f4b26af255 | ||
|
2bd93303c4 | ||
|
4fb342fb03 | ||
|
ffc7a81f84 | ||
|
5f73d527ec | ||
|
93514b474f | ||
|
ce5f198c93 | ||
|
16026b6898 | ||
|
7207c82c39 | ||
|
bcafd20529 | ||
|
6c4e088620 | ||
|
4df2a4c82c | ||
|
92d6f5e8fd | ||
|
ec6458db16 | ||
|
aa71b6c405 | ||
|
2d57cb6ce3 | ||
|
756e8f3189 | ||
|
52b83ac553 | ||
|
4feb88e2a4 | ||
|
14bc61cde7 | ||
|
220ccaf363 | ||
|
46fba85ed7 | ||
|
78da8e4dc5 | ||
|
f496b4c072 | ||
|
2e1a204c49 | ||
|
cdb729441e | ||
|
e0f8b8e820 | ||
|
916508f3db | ||
|
9255a12493 | ||
|
976664c004 | ||
|
8595665524 | ||
|
7b08d13aea | ||
|
dc0750f6ef | ||
|
ccb0a0fdfe | ||
|
dcdec4bf96 | ||
|
30386bbaca | ||
|
16024fba7c | ||
|
317b9e638c | ||
|
bee51835c4 | ||
|
a872c41f79 | ||
|
ea554580c7 | ||
|
14feafe3a9 | ||
|
d1ea591f18 | ||
|
2146fd28f8 | ||
|
f79ded3aef | ||
|
9bfdcfbbcb | ||
|
131c225598 | ||
|
81f88baa2c | ||
|
e1f903cb11 | ||
|
6959e8c6a6 | ||
|
a72b91ec94 | ||
|
58eb1c905a | ||
|
37d218b160 | ||
|
2eaffe4648 | ||
|
7cb505a395 | ||
|
cf5f577834 | ||
|
7371d14718 | ||
|
3f2934bff9 | ||
|
3d05e6777a | ||
|
e522641920 | ||
|
3517eb7c54 | ||
|
b72ee00539 | ||
|
c07cd23aa9 | ||
|
8ef417dad1 | ||
|
49cbf2a16b | ||
|
915acce470 | ||
|
e0dac3ab73 | ||
|
ed6a6d30a6 | ||
|
7384cc7e70 | ||
|
3fcfd734f4 | ||
|
4dc3595e2c | ||
|
f05932811b | ||
|
c16a861f68 | ||
|
257bd4f63f | ||
|
038a9b2b84 | ||
|
b8903a4aba | ||
|
d8a5f41aab | ||
|
1632cc7929 | ||
|
a7eae67228 | ||
|
c7467b4e76 | ||
|
81055ca7d9 | ||
|
232c1750a7 | ||
|
4763406439 | ||
|
b675597075 | ||
|
ce60089f46 | ||
|
edd3f28a1d | ||
|
e31f7356e9 | ||
|
4ace873046 | ||
|
72b6644223 | ||
|
1fb3febacc | ||
|
59152b8a8d | ||
|
addcf2e526 | ||
|
ed3b9669b3 | ||
|
ad9c2a624f | ||
|
101f7c7aa4 | ||
|
190412f2e8 | ||
|
786322426a | ||
|
a3e517aa9c | ||
|
8d537379ed | ||
|
7be59fa8e3 | ||
|
7a59fd7fdf | ||
|
a5e4a38b60 | ||
|
b56c0fb596 | ||
|
5a0eea82ba | ||
|
61fbd5b541 | ||
|
22f073b57b | ||
|
1668496359 | ||
|
45361e19c3 | ||
|
d2d35e52c3 | ||
|
dbc4298b0a | ||
|
e91144f6c9 | ||
|
a75dcce707 | ||
|
28044aa2df | ||
|
4fbf10f71e | ||
|
3260a60034 | ||
|
785373ce2a | ||
|
aad44999f3 | ||
|
721e598e99 | ||
|
51268f53d8 | ||
|
9d950087ef | ||
|
1674b6e269 | ||
|
33ac41bc94 | ||
|
f60ca91d2b | ||
|
057144cfdd | ||
|
9b91041025 | ||
|
b215384064 | ||
|
e6c5b9348d | ||
|
55b99e9916 | ||
|
131e8d8905 | ||
|
e82d97f069 | ||
|
490bb4c2ea | ||
|
79664567c4 | ||
|
7abcd5ba3b | ||
|
3489ed087d | ||
|
ca1ffa0c23 | ||
|
32e61b955a | ||
|
de4703ebfa | ||
|
a8e6cd3c47 | ||
|
f6c07a0ddb | ||
|
25fd230327 | ||
|
866d0c4fb9 | ||
|
4569bc6358 | ||
|
1b6734346c | ||
|
803ae6a62f | ||
|
589cb19715 | ||
|
0f24fddaf7 | ||
|
179e85f803 | ||
|
1aeeefdccb | ||
|
dcda16a26f | ||
|
99c5a3d72c | ||
|
101f1c7b42 | ||
|
2350d0945a | ||
|
dbd360262c | ||
|
5120748981 | ||
|
d080be3e50 | ||
|
14010899b5 | ||
|
25e199e7b7 | ||
|
257df1d8b5 | ||
|
47ba423eca | ||
|
489e87baea | ||
|
43234eec42 | ||
|
3d1fd5169c | ||
|
268fcbb838 | ||
|
af63e894e6 | ||
|
2514760a8b | ||
|
4040f76529 | ||
|
3bb1423804 | ||
|
35e973d698 | ||
|
8390883028 | ||
|
f84116b8ff | ||
|
27446b4b04 | ||
|
4dca2f9604 | ||
|
5852a5ece8 | ||
|
a7fa1cf6f2 | ||
|
d9d4879623 | ||
|
a15325ef44 | ||
|
5765d47568 | ||
|
7286ede490 | ||
|
4a333f826a | ||
|
8c4dc3de4d | ||
|
0a5362a7d9 | ||
|
245cebec1d | ||
|
bde2332a1a | ||
|
20429f4764 | ||
|
1b504a3303 | ||
|
61ec2ab5c9 | ||
|
611964d915 | ||
|
16481734c1 | ||
|
d54cccfdd5 | ||
|
7f4b7c48e8 | ||
|
df1f036a95 | ||
|
f3c51cdf5f | ||
|
95404c8a51 | ||
|
b2f0c10ade | ||
|
847b3a9bae | ||
|
7fcd183317 | ||
|
9b06692442 | ||
|
8a667a5f1d | ||
|
a3801299f5 | ||
|
714d04cb86 | ||
|
f03fe74369 | ||
|
57542e0cf6 | ||
|
70db084d43 | ||
|
c5f90fc20d | ||
|
1528e7eabf | ||
|
9dee863217 | ||
|
e31a96123e | ||
|
a65f5c2e73 | ||
|
a5ba0d46c2 | ||
|
b0e67f1eed | ||
|
b3dbdcdf77 | ||
|
f87e40bccd | ||
|
19dbc831c5 | ||
|
e2693ef44f | ||
|
2de7f760e5 | ||
|
d339a43634 | ||
|
003eefe8bf | ||
|
f3f5a896de | ||
|
883d5d8584 | ||
|
c7b1df1ebd | ||
|
e9e40ddb42 | ||
|
a543ed84f6 | ||
|
3d34b91453 | ||
|
1ccba26de9 | ||
|
c47abb5f68 | ||
|
28c51175d8 | ||
|
99738e7059 | ||
|
494e9d750a | ||
|
3a13515777 | ||
|
ab6a67dbeb | ||
|
d7756dc62b | ||
|
bd71e744d2 | ||
|
09361e7665 | ||
|
4349e33d4e | ||
|
afaac98442 | ||
|
c1f79a935c | ||
|
636a9a6ea7 | ||
|
6ebbd8d375 | ||
|
773efe41a9 | ||
|
359bc7695c | ||
|
7723749e00 | ||
|
c875465477 | ||
|
7978e04963 | ||
|
bbd1532f84 | ||
|
3d40f003b2 | ||
|
a0e8cd5bac | ||
|
d86c99312c | ||
|
f3fdb83160 | ||
|
9430b0b6ee | ||
|
045b92abdd | ||
|
af56f06b7b | ||
|
5e00cdbd74 | ||
|
9baef5e101 | ||
|
c7af14dea8 | ||
|
f3f22b76dc | ||
|
a0f750f7c9 | ||
|
3543a54545 | ||
|
95c0f07295 | ||
|
8f697d6715 | ||
|
28241cecff | ||
|
8e0cbc1c3d | ||
|
7843da1f2b | ||
|
7aad0896a7 | ||
|
7c72712b0f | ||
|
a25d6b1dc7 | ||
|
c8ec0f42a0 | ||
|
2353e0e03f | ||
|
11f9ae8202 | ||
|
0e07912231 | ||
|
c49cc977fa | ||
|
3ca688a6dd | ||
|
fae6113ce3 | ||
|
5c81cc2f36 | ||
|
01e985a830 | ||
|
b2eff300b1 | ||
|
dbc8d253c3 | ||
|
0f6e15cfa2 | ||
|
ea2f66226a | ||
|
e14fe222e8 | ||
|
58d9c3d5bd | ||
|
a5fcdca935 | ||
|
215903c4f1 | ||
|
16867d8abf | ||
|
9b15c6900a | ||
|
135cf16969 | ||
|
374e93ef96 | ||
|
83f8056992 | ||
|
cf1526cca6 | ||
|
c1c764255f | ||
|
7dd54b5789 | ||
|
697aa95c7e | ||
|
a93f984b16 | ||
|
5c50e48156 | ||
|
c7af3e61e2 | ||
|
e104337704 | ||
|
8a7706f2b5 | ||
|
6a3c2a230a | ||
|
a33ff4c6ab | ||
|
7ff949ea30 | ||
|
25bca27bfe | ||
|
e269f43afc | ||
|
a52431d2b4 | ||
|
8a27302d56 | ||
|
8ce01084af | ||
|
3fa28ffd92 | ||
|
5383d11bb4 | ||
|
ed65ab1ba9 | ||
|
aa14b187e0 |
@@ -27,6 +27,6 @@ ccache --show-stats
|
|||||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
xvfb-run -a -s "-screen 0 1024x768x24" \
|
||||||
meson test \
|
meson test \
|
||||||
--print-errorlogs \
|
--print-errorlogs \
|
||||||
--suite=gtk+ \
|
--suite=gtk \
|
||||||
--no-suite=gtk+:gsk \
|
--no-suite=gtk:gsk \
|
||||||
--no-suite=gtk+:a11y
|
--no-suite=gtk:a11y
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
## Version information
|
## Version information
|
||||||
<!--
|
<!--
|
||||||
- Which version of GTK+ you are using
|
- Which version of GTK you are using
|
||||||
- What operating system and version
|
- What operating system and version
|
||||||
- For Linux, which distribution
|
- For Linux, which distribution
|
||||||
- If you built GTK+ yourself, the list of options used to configure the build
|
- If you built GTK+ yourself, the list of options used to configure the build
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
## Version information
|
## Version information
|
||||||
<!--
|
<!--
|
||||||
- Which version of GTK+ you are using
|
- Which version of GTK you are using
|
||||||
- What operating system and version
|
- What operating system and version
|
||||||
- for Linux, which distribution
|
- for Linux, which distribution
|
||||||
- If you built GTK+ yourself, the list of options used to configure the build
|
- If you built GTK+ yourself, the list of options used to configure the build
|
||||||
|
@@ -21,7 +21,7 @@ many things that we value:
|
|||||||
Please, do not use the issue tracker for support questions. If you have
|
Please, do not use the issue tracker for support questions. If you have
|
||||||
questions on how to use GTK effectively, you can use:
|
questions on how to use GTK effectively, you can use:
|
||||||
|
|
||||||
- the `#gtk+` IRC channel on irc.gnome.org
|
- the `#gtk` IRC channel on irc.gnome.org
|
||||||
- the [gtk](https://mail.gnome.org/mailman/listinfo/gtk-list) mailing list,
|
- the [gtk](https://mail.gnome.org/mailman/listinfo/gtk-list) mailing list,
|
||||||
for general questions on GTK
|
for general questions on GTK
|
||||||
- the [gtk-app-devel](https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list)
|
- the [gtk-app-devel](https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list)
|
||||||
@@ -245,7 +245,7 @@ people committing to GTK to follow a few rules:
|
|||||||
better way to do things. If you are making changes to GTK, you should
|
better way to do things. If you are making changes to GTK, you should
|
||||||
be subscribed to the [gtk-devel](https://mail.gnome.org/mailman/listinfo/gtk-devel-list)
|
be subscribed to the [gtk-devel](https://mail.gnome.org/mailman/listinfo/gtk-devel-list)
|
||||||
mailing list; this is a good place to ask about intended changes.
|
mailing list; this is a good place to ask about intended changes.
|
||||||
The `#gtk+` IRC channel on irc.gnome.org is also a good place to find GTK
|
The `#gtk` IRC channel on irc.gnome.org is also a good place to find GTK
|
||||||
developers to discuss changes, but if you live outside of the EU/US time
|
developers to discuss changes, but if you live outside of the EU/US time
|
||||||
zones, an email to the gtk-devel mailing list is the most certain and
|
zones, an email to the gtk-devel mailing list is the most certain and
|
||||||
preferred method.
|
preferred method.
|
||||||
|
26
README.md
@@ -1,17 +1,17 @@
|
|||||||
GTK+ — The GTK toolkit
|
GTK — The GTK toolkit
|
||||||
======================
|
=====================
|
||||||
|
|
||||||
[](https://gitlab.gnome.org/GNOME/gtk/pipelines)
|
[](https://gitlab.gnome.org/GNOME/gtk/pipelines)
|
||||||
|
|
||||||
General information
|
General information
|
||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
GTK+ is a multi-platform toolkit for creating graphical user interfaces.
|
GTK is a multi-platform toolkit for creating graphical user interfaces.
|
||||||
Offering a complete set of widgets, GTK+ is suitable for projects ranging
|
Offering a complete set of widgets, GTK is suitable for projects ranging
|
||||||
from small one-off projects to complete application suites.
|
from small one-off projects to complete application suites.
|
||||||
|
|
||||||
GTK+ is free software and part of the GNU Project. However, the
|
GTK is free software and part of the GNU Project. However, the
|
||||||
licensing terms for GTK+, the GNU LGPL, allow it to be used by all
|
licensing terms for GTK, the GNU LGPL, allow it to be used by all
|
||||||
developers, including those developing proprietary software, without any
|
developers, including those developing proprietary software, without any
|
||||||
license fees or royalties.
|
license fees or royalties.
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ Nightly documentation can be found at
|
|||||||
Building and installing
|
Building and installing
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
In order to build GTK+ you will need:
|
In order to build GTK you will need:
|
||||||
|
|
||||||
- [a C99 compatible compiler](https://wiki.gnome.org/Projects/GLib/CompilerRequirements)
|
- [a C99 compatible compiler](https://wiki.gnome.org/Projects/GLib/CompilerRequirements)
|
||||||
- [Python 3](https://www.python.org/)
|
- [Python 3](https://www.python.org/)
|
||||||
@@ -79,7 +79,7 @@ If you are building the Wayland backend, you will also need:
|
|||||||
- Wayland-cursor
|
- Wayland-cursor
|
||||||
- Wayland-EGL
|
- Wayland-EGL
|
||||||
|
|
||||||
Once you have all the necessary dependencies, you can build GTK+ by using
|
Once you have all the necessary dependencies, you can build GTK by using
|
||||||
Meson:
|
Meson:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
@@ -94,7 +94,7 @@ You can run the test suite using:
|
|||||||
$ meson test
|
$ meson test
|
||||||
```
|
```
|
||||||
|
|
||||||
And, finally, you can install GTK+ using:
|
And, finally, you can install GTK using:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo ninja install
|
$ sudo ninja install
|
||||||
@@ -118,10 +118,10 @@ In the bug report please include:
|
|||||||
|
|
||||||
* Information about your system. For instance:
|
* Information about your system. For instance:
|
||||||
|
|
||||||
- which version of GTK+ you are using
|
- which version of GTK you are using
|
||||||
- what operating system and version
|
- what operating system and version
|
||||||
- for Linux, which distribution
|
- for Linux, which distribution
|
||||||
- if you built GTK+, the list of options used to configure the build
|
- if you built GTK, the list of options used to configure the build
|
||||||
|
|
||||||
And anything else you think is relevant.
|
And anything else you think is relevant.
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ In the bug report please include:
|
|||||||
Release notes
|
Release notes
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
The release notes for GTK+ are part of the migration guide in the API
|
The release notes for GTK are part of the migration guide in the API
|
||||||
reference. See:
|
reference. See:
|
||||||
|
|
||||||
- [3.x release notes](https://developer.gnome.org/gtk3/unstable/gtk-migrating-2-to-3.html)
|
- [3.x release notes](https://developer.gnome.org/gtk3/unstable/gtk-migrating-2-to-3.html)
|
||||||
@@ -152,7 +152,7 @@ reference. See:
|
|||||||
Licensing terms
|
Licensing terms
|
||||||
---------------
|
---------------
|
||||||
|
|
||||||
GTK+ is released under the terms of the GNU Lesser General Public License,
|
GTK is released under the terms of the GNU Lesser General Public License,
|
||||||
version 2.1 or, at your option, any later version, as published by the Free
|
version 2.1 or, at your option, any later version, as published by the Free
|
||||||
Software Foundation.
|
Software Foundation.
|
||||||
|
|
||||||
|
@@ -5,7 +5,6 @@
|
|||||||
"sdk": "org.gnome.Sdk",
|
"sdk": "org.gnome.Sdk",
|
||||||
"command": "gtk4-demo",
|
"command": "gtk4-demo",
|
||||||
"tags": ["devel", "development", "nightly"],
|
"tags": ["devel", "development", "nightly"],
|
||||||
"rename-icon": "gtk4-demo",
|
|
||||||
"desktop-file-name-prefix": "(Development) ",
|
"desktop-file-name-prefix": "(Development) ",
|
||||||
"finish-args": [
|
"finish-args": [
|
||||||
"--device=dri",
|
"--device=dri",
|
||||||
|
@@ -5,7 +5,6 @@
|
|||||||
"sdk": "org.gnome.Sdk",
|
"sdk": "org.gnome.Sdk",
|
||||||
"command": "gtk4-widget-factory",
|
"command": "gtk4-widget-factory",
|
||||||
"tags": ["devel", "development", "nightly"],
|
"tags": ["devel", "development", "nightly"],
|
||||||
"rename-icon": "gtk4-widget-factory",
|
|
||||||
"desktop-file-name-prefix": "(Development) ",
|
"desktop-file-name-prefix": "(Development) ",
|
||||||
"finish-args": [
|
"finish-args": [
|
||||||
"--device=dri",
|
"--device=dri",
|
||||||
|
31
build-aux/meson/post-install.py
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
if 'DESTDIR' not in os.environ:
|
||||||
|
gtk_api_version = sys.argv[1]
|
||||||
|
gtk_abi_version = sys.argv[2]
|
||||||
|
gtk_libdir = sys.argv[3]
|
||||||
|
gtk_datadir = sys.argv[4]
|
||||||
|
|
||||||
|
gtk_moduledir = os.path.join(gtk_libdir, 'gtk-' + gtk_api_version, gtk_abi_version)
|
||||||
|
gtk_printmodule_dir = os.path.join(gtk_moduledir, 'printbackends')
|
||||||
|
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
||||||
|
|
||||||
|
print('Compiling GSettings schemas...')
|
||||||
|
subprocess.call(['glib-compile-schemas',
|
||||||
|
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||||
|
|
||||||
|
print('Updating icon cache...')
|
||||||
|
subprocess.call(['gtk-update-icon-cache', '-q', '-t' ,'-f',
|
||||||
|
os.path.join(gtk_datadir, 'icons', 'hicolor')])
|
||||||
|
|
||||||
|
print('Updating module cache for print backends...')
|
||||||
|
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
||||||
|
subprocess.call(['gio-querymodules', gtk_printmodule_dir])
|
||||||
|
|
||||||
|
print('Updating module cache for input methods...')
|
||||||
|
os.makedirs(gtk_immodule_dir, exist_ok=True)
|
||||||
|
subprocess.call(['gio-querymodules', gtk_immodule_dir])
|
@@ -1,26 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
gtk_api_version=$1
|
|
||||||
gtk_abi_version=$2
|
|
||||||
gtk_libdir=$3
|
|
||||||
gtk_datadir=$4
|
|
||||||
|
|
||||||
# Package managers set this so we don't need to run
|
|
||||||
if [ -z "$DESTDIR" ]; then
|
|
||||||
echo Compiling GSettings schemas...
|
|
||||||
glib-compile-schemas ${gtk_datadir}/glib-2.0/schemas
|
|
||||||
|
|
||||||
echo Updating desktop database...
|
|
||||||
update-desktop-database -q ${gtk_datadir}/applications
|
|
||||||
|
|
||||||
echo Updating icon cache...
|
|
||||||
gtk-update-icon-cache -q -t -f ${gtk_datadir}/icons/hicolor
|
|
||||||
|
|
||||||
echo Updating module cache for print backends...
|
|
||||||
mkdir -p ${gtk_libdir}/gtk-4.0/4.0.0/printbackends
|
|
||||||
gio-querymodules ${gtk_libdir}/gtk-4.0/4.0.0/printbackends
|
|
||||||
|
|
||||||
echo Updating module cache for input methods...
|
|
||||||
mkdir -p ${gtk_libdir}/gtk-4.0/4.0.0/immodules
|
|
||||||
gio-querymodules ${gtk_libdir}/gtk-4.0/4.0.0/immodules
|
|
||||||
fi
|
|
@@ -200,20 +200,20 @@ activate_about (GSimpleAction *action,
|
|||||||
};
|
};
|
||||||
|
|
||||||
gtk_show_about_dialog (GTK_WINDOW (window),
|
gtk_show_about_dialog (GTK_WINDOW (window),
|
||||||
"program-name", "GTK+ Code Demos",
|
"program-name", "GTK Code Demos",
|
||||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
"version", g_strdup_printf ("%s,\nRunning against GTK %d.%d.%d",
|
||||||
PACKAGE_VERSION,
|
PACKAGE_VERSION,
|
||||||
gtk_get_major_version (),
|
gtk_get_major_version (),
|
||||||
gtk_get_minor_version (),
|
gtk_get_minor_version (),
|
||||||
gtk_get_micro_version ()),
|
gtk_get_micro_version ()),
|
||||||
"copyright", "(C) 1997-2013 The GTK+ Team",
|
"copyright", "(C) 1997-2013 The GTK Team",
|
||||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||||
"website", "http://www.gtk.org",
|
"website", "http://www.gtk.org",
|
||||||
"comments", "Program to demonstrate GTK+ functions.",
|
"comments", "Program to demonstrate GTK functions.",
|
||||||
"authors", authors,
|
"authors", authors,
|
||||||
"documenters", documentors,
|
"documenters", documentors,
|
||||||
"logo-icon-name", "gtk4-demo",
|
"logo-icon-name", "org.gtk.Demo",
|
||||||
"title", "About GTK+ Code Demos",
|
"title", "About GTK Code Demos",
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<template class="DemoApplicationWindow" parent="GtkApplicationWindow">
|
<template class="DemoApplicationWindow" parent="GtkApplicationWindow">
|
||||||
<property name="title" translatable="yes">Application Class</property>
|
<property name="title" translatable="yes">Application Class</property>
|
||||||
@@ -25,8 +24,7 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSeparatorToolItem">
|
<object class="GtkSeparatorToolItem"/>
|
||||||
</object>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkToolButton">
|
<object class="GtkToolButton">
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.10 -->
|
|
||||||
<menu id="appmenu">
|
<menu id="appmenu">
|
||||||
<section>
|
<section>
|
||||||
<item>
|
<item>
|
||||||
|
@@ -80,7 +80,7 @@ on_entry_changed (GtkWidget *widget, gpointer data)
|
|||||||
|
|
||||||
page_number = gtk_assistant_get_current_page (assistant);
|
page_number = gtk_assistant_get_current_page (assistant);
|
||||||
current_page = gtk_assistant_get_nth_page (assistant, page_number);
|
current_page = gtk_assistant_get_nth_page (assistant, page_number);
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (widget));
|
text = gtk_editable_get_text (GTK_EDITABLE (widget));
|
||||||
|
|
||||||
if (text && *text)
|
if (text && *text)
|
||||||
gtk_assistant_set_page_complete (assistant, current_page, TRUE);
|
gtk_assistant_set_page_complete (assistant, current_page, TRUE);
|
||||||
@@ -96,12 +96,12 @@ create_page1 (GtkWidget *assistant)
|
|||||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||||
|
|
||||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||||
gtk_box_pack_start (GTK_BOX (box), label);
|
gtk_container_add (GTK_CONTAINER (box), label);
|
||||||
|
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
|
gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE);
|
||||||
gtk_widget_set_valign (entry, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (entry, GTK_ALIGN_CENTER);
|
||||||
gtk_box_pack_start (GTK_BOX (box), entry);
|
gtk_container_add (GTK_CONTAINER (box), entry);
|
||||||
g_signal_connect (G_OBJECT (entry), "changed",
|
g_signal_connect (G_OBJECT (entry), "changed",
|
||||||
G_CALLBACK (on_entry_changed), assistant);
|
G_CALLBACK (on_entry_changed), assistant);
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ create_page2 (GtkWidget *assistant)
|
|||||||
|
|
||||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||||
"even if you do not check this");
|
"even if you do not check this");
|
||||||
gtk_box_pack_start (GTK_BOX (box), checkbutton);
|
gtk_container_add (GTK_CONTAINER (box), checkbutton);
|
||||||
|
|
||||||
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
|
gtk_assistant_append_page (GTK_ASSISTANT (assistant), box);
|
||||||
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
|
gtk_assistant_set_page_complete (GTK_ASSISTANT (assistant), box, TRUE);
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.20"/>
|
<requires lib="gtk+" version="3.20"/>
|
||||||
<object class="GtkWindow" id="window">
|
<object class="GtkWindow" id="window">
|
||||||
@@ -54,269 +53,275 @@
|
|||||||
<property name="vhomogeneous">0</property>
|
<property name="vhomogeneous">0</property>
|
||||||
<property name="transition-type">crossfade</property>
|
<property name="transition-type">crossfade</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid">
|
<object class="GtkStackPage">
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="vexpand">1</property>
|
|
||||||
<property name="row-spacing">12</property>
|
|
||||||
<property name="column-spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Duck</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Background</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<style>
|
|
||||||
<class name="duck"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<style>
|
|
||||||
<class name="gradient"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">
|
|
||||||
Blended picture</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">2</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<style>
|
|
||||||
<class name="blend0"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">3</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="name">page0</property>
|
<property name="name">page0</property>
|
||||||
<property name="title" translatable="yes">Ducky</property>
|
<property name="title" translatable="yes">Ducky</property>
|
||||||
</packing>
|
<property name="child">
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="vexpand">1</property>
|
||||||
|
<property name="row-spacing">12</property>
|
||||||
|
<property name="column-spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Duck</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Background</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<style>
|
||||||
|
<class name="duck"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<style>
|
||||||
|
<class name="gradient"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">
|
||||||
|
Blended picture</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<style>
|
||||||
|
<class name="blend0"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid">
|
<object class="GtkStackPage">
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="vexpand">1</property>
|
|
||||||
<property name="row-spacing">12</property>
|
|
||||||
<property name="column-spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Red</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Blue</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<style>
|
|
||||||
<class name="red"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<style>
|
|
||||||
<class name="blue"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">
|
|
||||||
Blended picture</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">2</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<style>
|
|
||||||
<class name="blend1"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">3</property>
|
|
||||||
<property name="width">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="name">page1</property>
|
<property name="name">page1</property>
|
||||||
<property name="title" translatable="yes">Blends</property>
|
<property name="title" translatable="yes">Blends</property>
|
||||||
</packing>
|
<property name="child">
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="vexpand">1</property>
|
||||||
|
<property name="row-spacing">12</property>
|
||||||
|
<property name="column-spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Red</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Blue</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<style>
|
||||||
|
<class name="red"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<style>
|
||||||
|
<class name="blue"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">
|
||||||
|
Blended picture</property>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<style>
|
||||||
|
<class name="blend1"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
<property name="width">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkGrid">
|
<object class="GtkStackPage">
|
||||||
<property name="halign">center</property>
|
|
||||||
<property name="valign">center</property>
|
|
||||||
<property name="hexpand">1</property>
|
|
||||||
<property name="vexpand">1</property>
|
|
||||||
<property name="row-spacing">6</property>
|
|
||||||
<property name="column-spacing">12</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<style>
|
|
||||||
<class name="cyan"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<style>
|
|
||||||
<class name="magenta"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<style>
|
|
||||||
<class name="yellow"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkImage">
|
|
||||||
<property name="halign">center</property>
|
|
||||||
<style>
|
|
||||||
<class name="blend2"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Cyan</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<style>
|
|
||||||
<class name="dim-label"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Magenta</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<style>
|
|
||||||
<class name="dim-label"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Yellow</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<style>
|
|
||||||
<class name="dim-label"/>
|
|
||||||
</style>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">0</property>
|
|
||||||
<property name="top-attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">Blended picture</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<attributes>
|
|
||||||
<attribute name="weight" value="bold"/>
|
|
||||||
</attributes>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="left-attach">1</property>
|
|
||||||
<property name="top-attach">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="name">page2</property>
|
<property name="name">page2</property>
|
||||||
<property name="title" translatable="yes">CMYK</property>
|
<property name="title" translatable="yes">CMYK</property>
|
||||||
</packing>
|
<property name="child">
|
||||||
|
<object class="GtkGrid">
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<property name="valign">center</property>
|
||||||
|
<property name="hexpand">1</property>
|
||||||
|
<property name="vexpand">1</property>
|
||||||
|
<property name="row-spacing">6</property>
|
||||||
|
<property name="column-spacing">12</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<style>
|
||||||
|
<class name="cyan"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<style>
|
||||||
|
<class name="magenta"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">1</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<style>
|
||||||
|
<class name="yellow"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkImage">
|
||||||
|
<property name="halign">center</property>
|
||||||
|
<style>
|
||||||
|
<class name="blend2"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Cyan</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Magenta</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">0</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Yellow</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<style>
|
||||||
|
<class name="dim-label"/>
|
||||||
|
</style>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">0</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Blended picture</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<attributes>
|
||||||
|
<attribute name="weight" value="bold"></attribute>
|
||||||
|
</attributes>
|
||||||
|
</object>
|
||||||
|
<packing>
|
||||||
|
<property name="left-attach">1</property>
|
||||||
|
<property name="top-attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -326,7 +331,6 @@ Blended picture</property>
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child type="titlebar">
|
<child type="titlebar"/>
|
||||||
</child>
|
|
||||||
</object>
|
</object>
|
||||||
</interface>
|
</interface>
|
||||||
|
482
demos/gtk-demo/bluroverlay.c
Normal file
@@ -0,0 +1,482 @@
|
|||||||
|
/*
|
||||||
|
* bluroverlay.c
|
||||||
|
* This file is part of gtk
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 - Ignacio Casal Quinteiro, Mike Krüger
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "bluroverlay.h"
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is a cut-down copy of gtkoverlay.c with a custom snapshot
|
||||||
|
* function that support a limited form of blur-under.
|
||||||
|
*/
|
||||||
|
typedef struct _BlurOverlayChild BlurOverlayChild;
|
||||||
|
|
||||||
|
struct _BlurOverlayChild
|
||||||
|
{
|
||||||
|
double blur;
|
||||||
|
};
|
||||||
|
|
||||||
|
enum {
|
||||||
|
GET_CHILD_POSITION,
|
||||||
|
LAST_SIGNAL
|
||||||
|
};
|
||||||
|
|
||||||
|
static guint signals[LAST_SIGNAL] = { 0 };
|
||||||
|
static GQuark child_data_quark = 0;
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (BlurOverlay, blur_overlay, GTK_TYPE_BIN)
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_set_overlay_child (GtkWidget *widget,
|
||||||
|
BlurOverlayChild *child_data)
|
||||||
|
{
|
||||||
|
g_object_set_qdata_full (G_OBJECT (widget), child_data_quark, child_data, g_free);
|
||||||
|
}
|
||||||
|
|
||||||
|
static BlurOverlayChild *
|
||||||
|
blur_overlay_get_overlay_child (GtkWidget *widget)
|
||||||
|
{
|
||||||
|
return (BlurOverlayChild *) g_object_get_qdata (G_OBJECT (widget), child_data_quark);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_measure (GtkWidget *widget,
|
||||||
|
GtkOrientation orientation,
|
||||||
|
int for_size,
|
||||||
|
int *minimum,
|
||||||
|
int *natural,
|
||||||
|
int *minimum_baseline,
|
||||||
|
int *natural_baseline)
|
||||||
|
{
|
||||||
|
GtkWidget *child;
|
||||||
|
|
||||||
|
for (child = gtk_widget_get_first_child (widget);
|
||||||
|
child != NULL;
|
||||||
|
child = gtk_widget_get_next_sibling (child))
|
||||||
|
{
|
||||||
|
int child_min, child_nat, child_min_baseline, child_nat_baseline;
|
||||||
|
|
||||||
|
gtk_widget_measure (child,
|
||||||
|
orientation,
|
||||||
|
for_size,
|
||||||
|
&child_min, &child_nat,
|
||||||
|
&child_min_baseline, &child_nat_baseline);
|
||||||
|
|
||||||
|
*minimum = MAX (*minimum, child_min);
|
||||||
|
*natural = MAX (*natural, child_nat);
|
||||||
|
if (child_min_baseline > -1)
|
||||||
|
*minimum_baseline = MAX (*minimum_baseline, child_min_baseline);
|
||||||
|
if (child_nat_baseline > -1)
|
||||||
|
*natural_baseline = MAX (*natural_baseline, child_nat_baseline);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_compute_child_allocation (BlurOverlay *overlay,
|
||||||
|
GtkWidget *widget,
|
||||||
|
BlurOverlayChild *child,
|
||||||
|
GtkAllocation *widget_allocation)
|
||||||
|
{
|
||||||
|
GtkAllocation allocation;
|
||||||
|
gboolean result;
|
||||||
|
|
||||||
|
g_signal_emit (overlay, signals[GET_CHILD_POSITION],
|
||||||
|
0, widget, &allocation, &result);
|
||||||
|
|
||||||
|
widget_allocation->x = allocation.x;
|
||||||
|
widget_allocation->y = allocation.y;
|
||||||
|
widget_allocation->width = allocation.width;
|
||||||
|
widget_allocation->height = allocation.height;
|
||||||
|
}
|
||||||
|
|
||||||
|
static GtkAlign
|
||||||
|
effective_align (GtkAlign align,
|
||||||
|
GtkTextDirection direction)
|
||||||
|
{
|
||||||
|
switch (align)
|
||||||
|
{
|
||||||
|
case GTK_ALIGN_START:
|
||||||
|
return direction == GTK_TEXT_DIR_RTL ? GTK_ALIGN_END : GTK_ALIGN_START;
|
||||||
|
case GTK_ALIGN_END:
|
||||||
|
return direction == GTK_TEXT_DIR_RTL ? GTK_ALIGN_START : GTK_ALIGN_END;
|
||||||
|
case GTK_ALIGN_FILL:
|
||||||
|
case GTK_ALIGN_CENTER:
|
||||||
|
case GTK_ALIGN_BASELINE:
|
||||||
|
default:
|
||||||
|
return align;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_child_update_style_classes (BlurOverlay *overlay,
|
||||||
|
GtkWidget *child,
|
||||||
|
GtkAllocation *child_allocation)
|
||||||
|
{
|
||||||
|
int width, height;
|
||||||
|
GtkAlign valign, halign;
|
||||||
|
gboolean is_left, is_right, is_top, is_bottom;
|
||||||
|
gboolean has_left, has_right, has_top, has_bottom;
|
||||||
|
GtkStyleContext *context;
|
||||||
|
|
||||||
|
context = gtk_widget_get_style_context (child);
|
||||||
|
has_left = gtk_style_context_has_class (context, GTK_STYLE_CLASS_LEFT);
|
||||||
|
has_right = gtk_style_context_has_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||||
|
has_top = gtk_style_context_has_class (context, GTK_STYLE_CLASS_TOP);
|
||||||
|
has_bottom = gtk_style_context_has_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||||
|
|
||||||
|
is_left = is_right = is_top = is_bottom = FALSE;
|
||||||
|
|
||||||
|
width = gtk_widget_get_width (GTK_WIDGET (overlay));
|
||||||
|
height = gtk_widget_get_height (GTK_WIDGET (overlay));
|
||||||
|
|
||||||
|
halign = effective_align (gtk_widget_get_halign (child),
|
||||||
|
gtk_widget_get_direction (child));
|
||||||
|
|
||||||
|
if (halign == GTK_ALIGN_START)
|
||||||
|
is_left = (child_allocation->x == 0);
|
||||||
|
else if (halign == GTK_ALIGN_END)
|
||||||
|
is_right = (child_allocation->x + child_allocation->width == width);
|
||||||
|
|
||||||
|
valign = gtk_widget_get_valign (child);
|
||||||
|
|
||||||
|
if (valign == GTK_ALIGN_START)
|
||||||
|
is_top = (child_allocation->y == 0);
|
||||||
|
else if (valign == GTK_ALIGN_END)
|
||||||
|
is_bottom = (child_allocation->y + child_allocation->height == height);
|
||||||
|
|
||||||
|
if (has_left && !is_left)
|
||||||
|
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_LEFT);
|
||||||
|
else if (!has_left && is_left)
|
||||||
|
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
|
||||||
|
|
||||||
|
if (has_right && !is_right)
|
||||||
|
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||||
|
else if (!has_right && is_right)
|
||||||
|
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||||
|
|
||||||
|
if (has_top && !is_top)
|
||||||
|
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TOP);
|
||||||
|
else if (!has_top && is_top)
|
||||||
|
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
|
||||||
|
|
||||||
|
if (has_bottom && !is_bottom)
|
||||||
|
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||||
|
else if (!has_bottom && is_bottom)
|
||||||
|
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_child_allocate (BlurOverlay *overlay,
|
||||||
|
GtkWidget *widget,
|
||||||
|
BlurOverlayChild *child)
|
||||||
|
{
|
||||||
|
GtkAllocation child_allocation;
|
||||||
|
|
||||||
|
if (!gtk_widget_get_visible (widget))
|
||||||
|
return;
|
||||||
|
|
||||||
|
blur_overlay_compute_child_allocation (overlay, widget, child, &child_allocation);
|
||||||
|
|
||||||
|
blur_overlay_child_update_style_classes (overlay, widget, &child_allocation);
|
||||||
|
gtk_widget_size_allocate (widget, &child_allocation, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_size_allocate (GtkWidget *widget,
|
||||||
|
int width,
|
||||||
|
int height,
|
||||||
|
int baseline)
|
||||||
|
{
|
||||||
|
BlurOverlay *overlay = BLUR_OVERLAY (widget);
|
||||||
|
GtkWidget *child;
|
||||||
|
GtkWidget *main_widget;
|
||||||
|
|
||||||
|
main_widget = gtk_bin_get_child (GTK_BIN (overlay));
|
||||||
|
if (main_widget && gtk_widget_get_visible (main_widget))
|
||||||
|
gtk_widget_size_allocate (main_widget,
|
||||||
|
&(GtkAllocation) {
|
||||||
|
0, 0,
|
||||||
|
width, height
|
||||||
|
}, -1);
|
||||||
|
|
||||||
|
for (child = gtk_widget_get_first_child (widget);
|
||||||
|
child != NULL;
|
||||||
|
child = gtk_widget_get_next_sibling (child))
|
||||||
|
{
|
||||||
|
if (child != main_widget)
|
||||||
|
{
|
||||||
|
BlurOverlayChild *child_data = blur_overlay_get_overlay_child (child);
|
||||||
|
blur_overlay_child_allocate (overlay, child, child_data);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
blur_overlay_get_child_position (BlurOverlay *overlay,
|
||||||
|
GtkWidget *widget,
|
||||||
|
GtkAllocation *alloc)
|
||||||
|
{
|
||||||
|
GtkRequisition min, req;
|
||||||
|
GtkAlign halign;
|
||||||
|
GtkTextDirection direction;
|
||||||
|
int width, height;
|
||||||
|
|
||||||
|
gtk_widget_get_preferred_size (widget, &min, &req);
|
||||||
|
width = gtk_widget_get_width (GTK_WIDGET (overlay));
|
||||||
|
height = gtk_widget_get_height (GTK_WIDGET (overlay));
|
||||||
|
|
||||||
|
alloc->x = 0;
|
||||||
|
alloc->width = MAX (min.width, MIN (width, req.width));
|
||||||
|
|
||||||
|
direction = gtk_widget_get_direction (widget);
|
||||||
|
|
||||||
|
halign = gtk_widget_get_halign (widget);
|
||||||
|
switch (effective_align (halign, direction))
|
||||||
|
{
|
||||||
|
case GTK_ALIGN_START:
|
||||||
|
/* nothing to do */
|
||||||
|
break;
|
||||||
|
case GTK_ALIGN_FILL:
|
||||||
|
alloc->width = MAX (alloc->width, width);
|
||||||
|
break;
|
||||||
|
case GTK_ALIGN_CENTER:
|
||||||
|
alloc->x += width / 2 - alloc->width / 2;
|
||||||
|
break;
|
||||||
|
case GTK_ALIGN_END:
|
||||||
|
alloc->x += width - alloc->width;
|
||||||
|
break;
|
||||||
|
case GTK_ALIGN_BASELINE:
|
||||||
|
default:
|
||||||
|
g_assert_not_reached ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
alloc->y = 0;
|
||||||
|
alloc->height = MAX (min.height, MIN (height, req.height));
|
||||||
|
|
||||||
|
switch (gtk_widget_get_valign (widget))
|
||||||
|
{
|
||||||
|
case GTK_ALIGN_START:
|
||||||
|
/* nothing to do */
|
||||||
|
break;
|
||||||
|
case GTK_ALIGN_FILL:
|
||||||
|
alloc->height = MAX (alloc->height, height);
|
||||||
|
break;
|
||||||
|
case GTK_ALIGN_CENTER:
|
||||||
|
alloc->y += height / 2 - alloc->height / 2;
|
||||||
|
break;
|
||||||
|
case GTK_ALIGN_END:
|
||||||
|
alloc->y += height - alloc->height;
|
||||||
|
break;
|
||||||
|
case GTK_ALIGN_BASELINE:
|
||||||
|
default:
|
||||||
|
g_assert_not_reached ();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_add (GtkContainer *container,
|
||||||
|
GtkWidget *widget)
|
||||||
|
{
|
||||||
|
BlurOverlay *overlay = BLUR_OVERLAY (container);
|
||||||
|
gtk_widget_insert_after (widget, GTK_WIDGET (container), NULL);
|
||||||
|
overlay->main_widget = widget;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_remove (GtkContainer *container,
|
||||||
|
GtkWidget *widget)
|
||||||
|
{
|
||||||
|
BlurOverlay *overlay = BLUR_OVERLAY (container);
|
||||||
|
gtk_widget_unparent (widget);
|
||||||
|
if (overlay->main_widget == widget)
|
||||||
|
overlay->main_widget = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_forall (GtkContainer *overlay,
|
||||||
|
GtkCallback callback,
|
||||||
|
gpointer callback_data)
|
||||||
|
{
|
||||||
|
GtkWidget *child;
|
||||||
|
|
||||||
|
child = gtk_widget_get_first_child (GTK_WIDGET (overlay));
|
||||||
|
while (child != NULL)
|
||||||
|
{
|
||||||
|
GtkWidget *next = gtk_widget_get_next_sibling (child);
|
||||||
|
|
||||||
|
(* callback) (child, callback_data);
|
||||||
|
|
||||||
|
child = next;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_snapshot (GtkWidget *widget,
|
||||||
|
GtkSnapshot *snapshot)
|
||||||
|
{
|
||||||
|
GtkWidget *main_widget;
|
||||||
|
GskRenderNode *main_widget_node = NULL;
|
||||||
|
GtkWidget *child;
|
||||||
|
GtkAllocation main_alloc;
|
||||||
|
cairo_region_t *clip = NULL;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
main_widget = BLUR_OVERLAY (widget)->main_widget;
|
||||||
|
gtk_widget_get_allocation (widget, &main_alloc);
|
||||||
|
|
||||||
|
for (child = gtk_widget_get_first_child (widget);
|
||||||
|
child != NULL;
|
||||||
|
child = gtk_widget_get_next_sibling (child))
|
||||||
|
{
|
||||||
|
BlurOverlayChild *child_info = blur_overlay_get_overlay_child (child);
|
||||||
|
double blur = 0;
|
||||||
|
if (child_info)
|
||||||
|
blur = child_info->blur;
|
||||||
|
|
||||||
|
if (blur > 0)
|
||||||
|
{
|
||||||
|
GtkAllocation alloc;
|
||||||
|
graphene_rect_t bounds;
|
||||||
|
|
||||||
|
if (main_widget_node == NULL)
|
||||||
|
{
|
||||||
|
GtkSnapshot *child_snapshot;
|
||||||
|
|
||||||
|
child_snapshot = gtk_snapshot_new ();
|
||||||
|
gtk_widget_snapshot_child (widget, main_widget, child_snapshot);
|
||||||
|
main_widget_node = gtk_snapshot_free_to_node (child_snapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
gtk_widget_get_allocation (child, &alloc);
|
||||||
|
graphene_rect_init (&bounds, alloc.x, alloc.y, alloc.width, alloc.height);
|
||||||
|
gtk_snapshot_push_blur (snapshot, blur);
|
||||||
|
gtk_snapshot_push_clip (snapshot, &bounds);
|
||||||
|
gtk_snapshot_append_node (snapshot, main_widget_node);
|
||||||
|
gtk_snapshot_pop (snapshot);
|
||||||
|
gtk_snapshot_pop (snapshot);
|
||||||
|
|
||||||
|
if (clip == NULL)
|
||||||
|
{
|
||||||
|
cairo_rectangle_int_t rect;
|
||||||
|
rect.x = rect.y = 0;
|
||||||
|
rect.width = main_alloc.width;
|
||||||
|
rect.height = main_alloc.height;
|
||||||
|
clip = cairo_region_create_rectangle (&rect);
|
||||||
|
}
|
||||||
|
cairo_region_subtract_rectangle (clip, (cairo_rectangle_int_t *)&alloc);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (clip == NULL)
|
||||||
|
{
|
||||||
|
for (child = gtk_widget_get_first_child (widget);
|
||||||
|
child != NULL;
|
||||||
|
child = gtk_widget_get_next_sibling (child))
|
||||||
|
{
|
||||||
|
gtk_widget_snapshot_child (widget, child, snapshot);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (i = 0; i < cairo_region_num_rectangles (clip); i++)
|
||||||
|
{
|
||||||
|
cairo_rectangle_int_t rect;
|
||||||
|
graphene_rect_t bounds;
|
||||||
|
|
||||||
|
cairo_region_get_rectangle (clip, i, &rect);
|
||||||
|
graphene_rect_init (&bounds, rect.x, rect.y, rect.width, rect.height);
|
||||||
|
gtk_snapshot_push_clip (snapshot, &bounds);
|
||||||
|
gtk_snapshot_append_node (snapshot, main_widget_node);
|
||||||
|
gtk_snapshot_pop (snapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
cairo_region_destroy (clip);
|
||||||
|
|
||||||
|
for (child = gtk_widget_get_first_child (widget);
|
||||||
|
child != NULL;
|
||||||
|
child = gtk_widget_get_next_sibling (child))
|
||||||
|
{
|
||||||
|
if (child != main_widget)
|
||||||
|
gtk_widget_snapshot_child (widget, child, snapshot);
|
||||||
|
}
|
||||||
|
|
||||||
|
gsk_render_node_unref (main_widget_node);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_class_init (BlurOverlayClass *klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
|
||||||
|
GtkContainerClass *container_class = GTK_CONTAINER_CLASS (klass);
|
||||||
|
|
||||||
|
widget_class->measure = blur_overlay_measure;
|
||||||
|
widget_class->size_allocate = blur_overlay_size_allocate;
|
||||||
|
widget_class->snapshot = blur_overlay_snapshot;
|
||||||
|
|
||||||
|
container_class->add = blur_overlay_add;
|
||||||
|
container_class->remove = blur_overlay_remove;
|
||||||
|
container_class->forall = blur_overlay_forall;
|
||||||
|
|
||||||
|
klass->get_child_position = blur_overlay_get_child_position;
|
||||||
|
|
||||||
|
signals[GET_CHILD_POSITION] =
|
||||||
|
g_signal_new ("get-child-position",
|
||||||
|
G_TYPE_FROM_CLASS (object_class),
|
||||||
|
G_SIGNAL_RUN_LAST,
|
||||||
|
G_STRUCT_OFFSET (BlurOverlayClass, get_child_position),
|
||||||
|
g_signal_accumulator_true_handled, NULL,
|
||||||
|
NULL,
|
||||||
|
G_TYPE_BOOLEAN, 2,
|
||||||
|
GTK_TYPE_WIDGET,
|
||||||
|
GDK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE);
|
||||||
|
|
||||||
|
child_data_quark = g_quark_from_static_string ("gtk-overlay-child-data");
|
||||||
|
|
||||||
|
gtk_widget_class_set_css_name (widget_class, "overlay");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
blur_overlay_init (BlurOverlay *overlay)
|
||||||
|
{
|
||||||
|
gtk_widget_set_has_surface (GTK_WIDGET (overlay), FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkWidget *
|
||||||
|
blur_overlay_new (void)
|
||||||
|
{
|
||||||
|
return g_object_new (BLUR_TYPE_OVERLAY, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
blur_overlay_add_overlay (BlurOverlay *overlay,
|
||||||
|
GtkWidget *widget,
|
||||||
|
double blur)
|
||||||
|
{
|
||||||
|
BlurOverlayChild *child = g_new0 (BlurOverlayChild, 1);
|
||||||
|
|
||||||
|
gtk_widget_insert_before (widget, GTK_WIDGET (overlay), NULL);
|
||||||
|
|
||||||
|
child->blur = blur;
|
||||||
|
|
||||||
|
blur_overlay_set_overlay_child (widget, child);
|
||||||
|
}
|
65
demos/gtk-demo/bluroverlay.h
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
/*
|
||||||
|
* bluroverlay.h
|
||||||
|
* This file is part of gtk
|
||||||
|
*
|
||||||
|
* Copyright (C) 2011 - Ignacio Casal Quinteiro, Mike Krüger
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library 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
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef __BLUR_OVERLAY_H__
|
||||||
|
#define __BLUR_OVERLAY_H__
|
||||||
|
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define BLUR_TYPE_OVERLAY (blur_overlay_get_type ())
|
||||||
|
#define BLUR_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), BLUR_TYPE_OVERLAY, BlurOverlay))
|
||||||
|
#define BLUR_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), BLUR_TYPE_OVERLAY, BlurOverlayClass))
|
||||||
|
#define BLUR_IS_OVERLAY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), BLUR_TYPE_OVERLAY))
|
||||||
|
#define BLUR_IS_OVERLAY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), BLUR_TYPE_OVERLAY))
|
||||||
|
#define BLUR_OVERLAY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), BLUR_TYPE_OVERLAY, BlurOverlayClass))
|
||||||
|
|
||||||
|
typedef struct _BlurOverlay BlurOverlay;
|
||||||
|
typedef struct _BlurOverlayClass BlurOverlayClass;
|
||||||
|
|
||||||
|
struct _BlurOverlay
|
||||||
|
{
|
||||||
|
GtkBin parent_instance;
|
||||||
|
|
||||||
|
GtkWidget *main_widget;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _BlurOverlayClass
|
||||||
|
{
|
||||||
|
GtkBinClass parent_class;
|
||||||
|
|
||||||
|
gboolean (*get_child_position) (BlurOverlay *overlay,
|
||||||
|
GtkWidget *widget,
|
||||||
|
GtkAllocation *allocation);
|
||||||
|
};
|
||||||
|
|
||||||
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
GType blur_overlay_get_type (void) G_GNUC_CONST;
|
||||||
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
GtkWidget *blur_overlay_new (void);
|
||||||
|
GDK_AVAILABLE_IN_ALL
|
||||||
|
void blur_overlay_add_overlay (BlurOverlay *overlay,
|
||||||
|
GtkWidget *widget,
|
||||||
|
double blur);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* __BLUR_OVERLAY_H__ */
|
@@ -1,127 +0,0 @@
|
|||||||
/* Button Boxes
|
|
||||||
*
|
|
||||||
* The Button Box widgets are used to arrange buttons with padding.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
|
||||||
#include <gtk/gtk.h>
|
|
||||||
|
|
||||||
static GtkWidget *
|
|
||||||
create_bbox (gint horizontal,
|
|
||||||
char *title,
|
|
||||||
gint spacing,
|
|
||||||
gint layout)
|
|
||||||
{
|
|
||||||
GtkWidget *frame;
|
|
||||||
GtkWidget *bbox;
|
|
||||||
GtkWidget *button;
|
|
||||||
|
|
||||||
frame = gtk_frame_new (title);
|
|
||||||
|
|
||||||
if (horizontal)
|
|
||||||
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
|
|
||||||
else
|
|
||||||
bbox = gtk_button_box_new (GTK_ORIENTATION_VERTICAL);
|
|
||||||
|
|
||||||
g_object_set (bbox, "margin", 5, NULL);
|
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame), bbox);
|
|
||||||
|
|
||||||
gtk_button_box_set_layout (GTK_BUTTON_BOX (bbox), layout);
|
|
||||||
gtk_box_set_spacing (GTK_BOX (bbox), spacing);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label (_("OK"));
|
|
||||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label (_("Cancel"));
|
|
||||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
|
||||||
|
|
||||||
button = gtk_button_new_with_label (_("Help"));
|
|
||||||
gtk_container_add (GTK_CONTAINER (bbox), button);
|
|
||||||
|
|
||||||
return frame;
|
|
||||||
}
|
|
||||||
|
|
||||||
GtkWidget *
|
|
||||||
do_button_box (GtkWidget *do_widget)
|
|
||||||
{
|
|
||||||
static GtkWidget *window = NULL;
|
|
||||||
GtkWidget *main_vbox;
|
|
||||||
GtkWidget *vbox;
|
|
||||||
GtkWidget *hbox;
|
|
||||||
GtkWidget *frame_horz;
|
|
||||||
GtkWidget *frame_vert;
|
|
||||||
|
|
||||||
if (!window)
|
|
||||||
{
|
|
||||||
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
|
||||||
gtk_widget_get_display (do_widget));
|
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Button Boxes");
|
|
||||||
|
|
||||||
g_signal_connect (window, "destroy",
|
|
||||||
G_CALLBACK (gtk_widget_destroyed),
|
|
||||||
&window);
|
|
||||||
|
|
||||||
main_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
|
||||||
g_object_set (main_vbox, "margin", 10, NULL);
|
|
||||||
gtk_container_add (GTK_CONTAINER (window), main_vbox);
|
|
||||||
|
|
||||||
frame_horz = gtk_frame_new ("Horizontal Button Boxes");
|
|
||||||
gtk_widget_set_margin_top (frame_horz, 10);
|
|
||||||
gtk_widget_set_margin_bottom (frame_horz, 10);
|
|
||||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_horz);
|
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
|
||||||
g_object_set (vbox, "margin", 10, NULL);
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame_horz), vbox);
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
|
||||||
create_bbox (TRUE, "Spread", 40, GTK_BUTTONBOX_SPREAD));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
|
||||||
create_bbox (TRUE, "Edge", 40, GTK_BUTTONBOX_EDGE));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
|
||||||
create_bbox (TRUE, "Start", 40, GTK_BUTTONBOX_START));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
|
||||||
create_bbox (TRUE, "End", 40, GTK_BUTTONBOX_END));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
|
||||||
create_bbox (TRUE, "Center", 40, GTK_BUTTONBOX_CENTER));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
|
||||||
create_bbox (TRUE, "Expand", 0, GTK_BUTTONBOX_EXPAND));
|
|
||||||
|
|
||||||
frame_vert = gtk_frame_new ("Vertical Button Boxes");
|
|
||||||
gtk_box_pack_start (GTK_BOX (main_vbox), frame_vert);
|
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
|
||||||
g_object_set (hbox, "margin", 10, NULL);
|
|
||||||
gtk_container_add (GTK_CONTAINER (frame_vert), hbox);
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
|
||||||
create_bbox (FALSE, "Spread", 10, GTK_BUTTONBOX_SPREAD));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
|
||||||
create_bbox (FALSE, "Edge", 10, GTK_BUTTONBOX_EDGE));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
|
||||||
create_bbox (FALSE, "Start", 10, GTK_BUTTONBOX_START));
|
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
|
||||||
create_bbox (FALSE, "End", 10, GTK_BUTTONBOX_END));
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
|
||||||
create_bbox (FALSE, "Center", 10, GTK_BUTTONBOX_CENTER));
|
|
||||||
gtk_box_pack_start (GTK_BOX (hbox),
|
|
||||||
create_bbox (FALSE, "Expand", 0, GTK_BUTTONBOX_EXPAND));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
|
||||||
gtk_widget_show (window);
|
|
||||||
else
|
|
||||||
gtk_widget_destroy (window);
|
|
||||||
|
|
||||||
return window;
|
|
||||||
}
|
|
@@ -7,7 +7,7 @@
|
|||||||
* computers, as long as there is a network connection to the
|
* computers, as long as there is a network connection to the
|
||||||
* computer where the application is running.
|
* computer where the application is running.
|
||||||
*
|
*
|
||||||
* Only some of the windowing systems where GTK+ runs have the
|
* Only some of the windowing systems where GTK runs have the
|
||||||
* concept of multiple displays. (The X Window System is the
|
* concept of multiple displays. (The X Window System is the
|
||||||
* main example.) Other windowing systems can only handle one
|
* main example.) Other windowing systems can only handle one
|
||||||
* keyboard and mouse, and combine all monitors into
|
* keyboard and mouse, and combine all monitors into
|
||||||
@@ -71,20 +71,12 @@ find_toplevel_at_pointer (GdkDisplay *display)
|
|||||||
GdkSurface *pointer_window;
|
GdkSurface *pointer_window;
|
||||||
GtkWidget *widget = NULL;
|
GtkWidget *widget = NULL;
|
||||||
|
|
||||||
pointer_window = gdk_device_get_surface_at_position (gtk_get_current_event_device (),
|
pointer_window = gdk_device_get_surface_at_position (gtk_get_current_event_device (), NULL, NULL);
|
||||||
NULL, NULL);
|
|
||||||
|
|
||||||
/* The user data field of a GdkSurface is used to store a pointer
|
|
||||||
* to the widget that created it.
|
|
||||||
*/
|
|
||||||
if (pointer_window)
|
if (pointer_window)
|
||||||
{
|
widget = GTK_WIDGET (gtk_root_get_for_surface (pointer_window));
|
||||||
gpointer widget_ptr;
|
|
||||||
gdk_surface_get_user_data (pointer_window, &widget_ptr);
|
|
||||||
widget = widget_ptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
return widget ? gtk_widget_get_toplevel (widget) : NULL;
|
return widget;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -315,7 +307,7 @@ create_frame (ChangeDisplayInfo *info,
|
|||||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrollwin),
|
||||||
GTK_SHADOW_IN);
|
GTK_SHADOW_IN);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), scrollwin);
|
gtk_container_add (GTK_CONTAINER (hbox), scrollwin);
|
||||||
|
|
||||||
*tree_view = gtk_tree_view_new ();
|
*tree_view = gtk_tree_view_new ();
|
||||||
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
|
gtk_tree_view_set_headers_visible (GTK_TREE_VIEW (*tree_view), FALSE);
|
||||||
@@ -325,7 +317,7 @@ create_frame (ChangeDisplayInfo *info,
|
|||||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||||
|
|
||||||
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
*button_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), *button_vbox);
|
gtk_container_add (GTK_CONTAINER (hbox), *button_vbox);
|
||||||
|
|
||||||
if (!info->size_group)
|
if (!info->size_group)
|
||||||
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
info->size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||||
@@ -365,11 +357,11 @@ create_display_frame (ChangeDisplayInfo *info)
|
|||||||
|
|
||||||
button = left_align_button_new ("_Open...");
|
button = left_align_button_new ("_Open...");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
|
g_signal_connect (button, "clicked", G_CALLBACK (open_display_cb), info);
|
||||||
gtk_box_pack_start (GTK_BOX (button_vbox), button);
|
gtk_container_add (GTK_CONTAINER (button_vbox), button);
|
||||||
|
|
||||||
button = left_align_button_new ("_Close");
|
button = left_align_button_new ("_Close");
|
||||||
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
|
g_signal_connect (button, "clicked", G_CALLBACK (close_display_cb), info);
|
||||||
gtk_box_pack_start (GTK_BOX (button_vbox), button);
|
gtk_container_add (GTK_CONTAINER (button_vbox), button);
|
||||||
|
|
||||||
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
|
info->display_model = (GtkTreeModel *)gtk_list_store_new (DISPLAY_NUM_COLUMNS,
|
||||||
G_TYPE_STRING,
|
G_TYPE_STRING,
|
||||||
@@ -542,10 +534,10 @@ do_changedisplay (GtkWidget *do_widget)
|
|||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||||
g_object_set (vbox, "margin", 8, NULL);
|
g_object_set (vbox, "margin", 8, NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (content_area), vbox);
|
gtk_container_add (GTK_CONTAINER (content_area), vbox);
|
||||||
|
|
||||||
frame = create_display_frame (info);
|
frame = create_display_frame (info);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
initialize_displays (info);
|
initialize_displays (info);
|
||||||
|
|
||||||
|
@@ -28,7 +28,7 @@ copy_button_clicked (GtkWidget *button,
|
|||||||
clipboard = gtk_widget_get_clipboard (entry);
|
clipboard = gtk_widget_get_clipboard (entry);
|
||||||
|
|
||||||
/* Set clipboard text */
|
/* Set clipboard text */
|
||||||
gdk_clipboard_set_text (clipboard, gtk_entry_get_text (GTK_ENTRY (entry)));
|
gdk_clipboard_set_text (clipboard, gtk_editable_get_text (GTK_EDITABLE (entry)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -50,7 +50,7 @@ paste_received (GObject *source_object,
|
|||||||
if (text)
|
if (text)
|
||||||
{
|
{
|
||||||
/* Set the entry text */
|
/* Set the entry text */
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
gtk_editable_set_text (GTK_EDITABLE (entry), text);
|
||||||
g_free (text);
|
g_free (text);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -259,45 +259,45 @@ do_clipboard (GtkWidget *do_widget)
|
|||||||
|
|
||||||
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
|
label = gtk_label_new ("\"Copy\" will copy the text\nin the entry to the clipboard");
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
g_object_set (hbox, "margin", 8, NULL);
|
g_object_set (hbox, "margin", 8, NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
|
|
||||||
/* Create the first entry */
|
/* Create the first entry */
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
gtk_container_add (GTK_CONTAINER (hbox), entry);
|
||||||
|
|
||||||
/* Create the button */
|
/* Create the button */
|
||||||
button = gtk_button_new_with_mnemonic (_("_Copy"));
|
button = gtk_button_new_with_mnemonic (_("_Copy"));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (copy_button_clicked), entry);
|
G_CALLBACK (copy_button_clicked), entry);
|
||||||
|
|
||||||
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
label = gtk_label_new ("\"Paste\" will paste the text from the clipboard to the entry");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
g_object_set (hbox, "margin", 8, NULL);
|
g_object_set (hbox, "margin", 8, NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
|
|
||||||
/* Create the second entry */
|
/* Create the second entry */
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
gtk_container_add (GTK_CONTAINER (hbox), entry);
|
||||||
|
|
||||||
/* Create the button */
|
/* Create the button */
|
||||||
button = gtk_button_new_with_mnemonic (_("_Paste"));
|
button = gtk_button_new_with_mnemonic (_("_Paste"));
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (paste_button_clicked), entry);
|
G_CALLBACK (paste_button_clicked), entry);
|
||||||
|
|
||||||
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
label = gtk_label_new ("Images can be transferred via the clipboard, too");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
g_object_set (hbox, "margin", 8, NULL);
|
g_object_set (hbox, "margin", 8, NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
|
|
||||||
/* Create the first image */
|
/* Create the first image */
|
||||||
image = gtk_image_new_from_icon_name ("dialog-warning");
|
image = gtk_image_new_from_icon_name ("dialog-warning");
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
/* Color Chooser
|
/* Color Chooser
|
||||||
*
|
*
|
||||||
* A GtkColorChooser lets the user choose a color. There are several
|
* A GtkColorChooser lets the user choose a color. There are several
|
||||||
* implementations of the GtkColorChooser interface in GTK+. The
|
* implementations of the GtkColorChooser interface in GTK. The
|
||||||
* GtkColorChooserDialog is a prebuilt dialog containing a
|
* GtkColorChooserDialog is a prebuilt dialog containing a
|
||||||
* GtkColorChooserWidget.
|
* GtkColorChooserWidget.
|
||||||
*/
|
*/
|
||||||
@@ -88,7 +88,7 @@ do_colorsel (GtkWidget *do_widget)
|
|||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
da = gtk_drawing_area_new ();
|
da = gtk_drawing_area_new ();
|
||||||
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 200);
|
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 200);
|
||||||
@@ -101,7 +101,7 @@ do_colorsel (GtkWidget *do_widget)
|
|||||||
gtk_widget_set_halign (button, GTK_ALIGN_END);
|
gtk_widget_set_halign (button, GTK_ALIGN_END);
|
||||||
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (button, GTK_ALIGN_CENTER);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), button);
|
gtk_container_add (GTK_CONTAINER (vbox), button);
|
||||||
|
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (change_color_callback), NULL);
|
G_CALLBACK (change_color_callback), NULL);
|
||||||
|
@@ -256,7 +256,7 @@ mask_entry_set_background (MaskEntry *entry)
|
|||||||
{
|
{
|
||||||
if (entry->mask)
|
if (entry->mask)
|
||||||
{
|
{
|
||||||
if (!g_regex_match_simple (entry->mask, gtk_entry_get_text (GTK_ENTRY (entry)), 0, 0))
|
if (!g_regex_match_simple (entry->mask, gtk_editable_get_text (GTK_EDITABLE (entry)), 0, 0))
|
||||||
{
|
{
|
||||||
PangoAttrList *attrs;
|
PangoAttrList *attrs;
|
||||||
|
|
||||||
@@ -326,7 +326,7 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
* insensitive rows
|
* insensitive rows
|
||||||
*/
|
*/
|
||||||
frame = gtk_frame_new ("Items with icons");
|
frame = gtk_frame_new ("Items with icons");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (box, "margin", 5, NULL);
|
g_object_set (box, "margin", 5, NULL);
|
||||||
@@ -367,7 +367,7 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
/* A combobox demonstrating trees.
|
/* A combobox demonstrating trees.
|
||||||
*/
|
*/
|
||||||
frame = gtk_frame_new ("Where are we ?");
|
frame = gtk_frame_new ("Where are we ?");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (box, "margin", 5, NULL);
|
g_object_set (box, "margin", 5, NULL);
|
||||||
@@ -395,7 +395,7 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
|
|
||||||
/* A GtkComboBoxEntry with validation */
|
/* A GtkComboBoxEntry with validation */
|
||||||
frame = gtk_frame_new ("Editable");
|
frame = gtk_frame_new ("Editable");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (box, "margin", 5, NULL);
|
g_object_set (box, "margin", 5, NULL);
|
||||||
@@ -413,7 +413,7 @@ do_combobox (GtkWidget *do_widget)
|
|||||||
|
|
||||||
/* A combobox with string IDs */
|
/* A combobox with string IDs */
|
||||||
frame = gtk_frame_new ("String IDs");
|
frame = gtk_frame_new ("String IDs");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
g_object_set (box, "margin", 5, NULL);
|
g_object_set (box, "margin", 5, NULL);
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.94 -->
|
|
||||||
<object class="GdkCursor" id="default_cursor">
|
<object class="GdkCursor" id="default_cursor">
|
||||||
<property name="name">default</property>
|
<property name="name">default</property>
|
||||||
</object>
|
</object>
|
||||||
|
Before Width: | Height: | Size: 324 B |
Before Width: | Height: | Size: 874 B |
Before Width: | Height: | Size: 437 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 465 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 581 B |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 854 B |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 7.4 KiB |
Before Width: | Height: | Size: 41 KiB |
1
demos/gtk-demo/data/scalable/apps/org.gtk.Demo.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128" version="1.0"><defs><linearGradient id="f"><stop offset="0" stop-color="#ff7800"/><stop offset="1" stop-color="#ed333b"/></linearGradient><linearGradient id="e"><stop offset="0" stop-color="#f5c211"/><stop offset="1" stop-color="#33d17a" stop-opacity=".899"/></linearGradient><linearGradient id="d"><stop offset="0" stop-color="#c0bfbc"/><stop offset=".036" stop-color="#fafaf9"/><stop offset=".088" stop-color="#c0bfbc"/><stop offset=".399" stop-color="#d5d5d3"/><stop offset=".491" stop-color="#eaeae9"/><stop offset=".569" stop-color="#a7a5a1"/><stop offset=".966" stop-color="#a9a7a3"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient id="a"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#f6f5f4"/></linearGradient><linearGradient id="b"><stop offset="0" stop-color="#d5d3cf"/><stop offset="1" stop-color="#949390"/></linearGradient><linearGradient id="c"><stop offset="0" stop-color="#9a9996"/><stop offset="1" stop-color="#77767b"/></linearGradient><linearGradient xlink:href="#d" id="g" x1="-142.049" y1="236.001" x2="-9.951" y2="236.001" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#e" id="h" cx="90.974" cy="263.479" fx="90.974" fy="263.479" r="22.703" gradientTransform="matrix(1.90297 -.05506 .0501 1.73133 -89.25 -176.863)" gradientUnits="userSpaceOnUse"/><radialGradient xlink:href="#f" id="i" cx="61.718" cy="270.719" fx="61.718" fy="270.719" r="22.703" gradientTransform="matrix(2.49049 0 0 2.92132 -91.99 -503.52)" gradientUnits="userSpaceOnUse"/></defs><path transform="translate(123.265 -118.118) scale(.7798)" d="M-75.74 161.438a10.997 10.997 0 0 0-5.758 1.468l-55.053 31.785a10.997 10.997 0 0 0-5.498 9.524v63.57a10.997 10.997 0 0 0 5.498 9.524l55.053 31.785a10.997 10.997 0 0 0 10.996 0l55.053-31.785a10.997 10.997 0 0 0 5.498-9.524v-63.57a10.997 10.997 0 0 0-5.498-9.524l-55.053-31.785a10.997 10.997 0 0 0-5.238-1.469z" style="marker:none" fill="url(#g)"/><path style="marker:none" d="M64.203 3.77a8.575 8.575 0 0 0-4.49 1.146l-42.93 24.786a8.575 8.575 0 0 0-4.288 7.427V86.7a8.575 8.575 0 0 0 4.287 7.426l42.93 24.786a8.575 8.575 0 0 0 8.575 0l42.93-24.786a8.575 8.575 0 0 0 4.288-7.426V37.129a8.575 8.575 0 0 0-4.287-7.427L68.288 4.916a8.575 8.575 0 0 0-4.085-1.145z" fill="#fff"/><path style="marker:none" d="M109.869 33.297L64 59.779 18.131 33.297 64 6.814z" fill="#98c1f1"/><path style="marker:none" d="M66.263 287.505l45.35-25.884.056-52.762-45.406 26.215z" fill="url(#h)" transform="translate(0 -172)"/><path d="M61.718 287.34l-45.35-25.885-.056-52.761 45.406 26.215z" style="marker:none" fill="url(#i)" transform="translate(0 -172)"/></svg>
|
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 101 KiB |
@@ -1,29 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
|
|
||||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
|
||||||
|
|
||||||
<svg xmlns:cc='http://creativecommons.org/ns#' xmlns:dc='http://purl.org/dc/elements/1.1/' sodipodi:docname='gtk3-demo-symbolic.svg' height='16.000015' id='svg7384' xmlns:inkscape='http://www.inkscape.org/namespaces/inkscape' xmlns:osb='http://www.openswatchbook.org/uri/2009/osb' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#' xmlns:sodipodi='http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd' xmlns:svg='http://www.w3.org/2000/svg' inkscape:version='0.48.5 r10040' version='1.1' width='16' xmlns='http://www.w3.org/2000/svg'>
|
|
||||||
<metadata id='metadata90'>
|
|
||||||
<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>Gnome Symbolic Icon Theme</dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<sodipodi:namedview inkscape:bbox-paths='true' bordercolor='#666666' borderopacity='1' inkscape:current-layer='layer9' inkscape:cx='-12.5126' inkscape:cy='-0.73412416' gridtolerance='10' inkscape:guide-bbox='true' guidetolerance='10' id='namedview88' inkscape:object-nodes='false' inkscape:object-paths='false' objecttolerance='10' pagecolor='#555753' inkscape:pageopacity='1' inkscape:pageshadow='2' showborder='false' showgrid='false' showguides='true' inkscape:snap-bbox='true' inkscape:snap-bbox-midpoints='false' inkscape:snap-global='true' inkscape:snap-grids='true' inkscape:snap-nodes='true' inkscape:snap-others='false' inkscape:snap-to-guides='true' inkscape:window-height='1375' inkscape:window-maximized='1' inkscape:window-width='2560' inkscape:window-x='0' inkscape:window-y='27' inkscape:zoom='5.6568542'>
|
|
||||||
<inkscape:grid empspacing='2' enabled='true' id='grid4866' originx='-182.99998px' originy='-251.99998px' snapvisiblegridlinesonly='true' spacingx='1px' spacingy='1px' type='xygrid' visible='true'/>
|
|
||||||
</sodipodi:namedview>
|
|
||||||
<title id='title9167'>Gnome Symbolic Icon Theme</title>
|
|
||||||
<defs id='defs7386'>
|
|
||||||
<linearGradient id='linearGradient7212' osb:paint='solid'>
|
|
||||||
<stop id='stop7214' offset='0' style='stop-color:#000000;stop-opacity:1;'/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
|
||||||
<g inkscape:groupmode='layer' id='layer9' inkscape:label='apps' style='display:inline' transform='translate(-424.00018,35)'>
|
|
||||||
|
|
||||||
<rect height='8.0000048' id='rect7866' style='opacity:0.3;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(0.83205029,0.5547002,0,1,0,0)' width='7.2111053' x='510.78668' y='-314.33347'/>
|
|
||||||
<rect height='8.0000086' id='rect7868' style='opacity:0.5;color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new' transform='matrix(-0.86824295,0.49613928,0,1,0,0)' width='8.0622425' x='-505.61908' y='219.8575'/>
|
|
||||||
<path inkscape:connector-curvature='0' d='m 431.53145,-28 -5.875,-3.65625 6.8125,-3.34375 6.03125,3 z' id='path7870' sodipodi:nodetypes='ccccc' style='color:#000000;fill:#bebebe;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.39999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:new'/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 3.3 KiB |
114
demos/gtk-demo/data/symbolic/apps/org.gtk.Demo-symbolic.svg
Normal file
@@ -0,0 +1,114 @@
|
|||||||
|
<?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:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
sodipodi:docname="org.gtk.Demo-symbolic.svg"
|
||||||
|
height="16.03125"
|
||||||
|
id="svg7384"
|
||||||
|
inkscape:version="0.92.4 5da689c313, 2019-01-14"
|
||||||
|
version="1.1"
|
||||||
|
width="16">
|
||||||
|
<metadata
|
||||||
|
id="metadata90">
|
||||||
|
<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>Gnome Symbolic Icon Theme</dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<sodipodi:namedview
|
||||||
|
inkscape:bbox-paths="true"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1"
|
||||||
|
inkscape:current-layer="layer9"
|
||||||
|
inkscape:cx="0.53203442"
|
||||||
|
inkscape:cy="9.1822592"
|
||||||
|
gridtolerance="10"
|
||||||
|
inkscape:guide-bbox="true"
|
||||||
|
guidetolerance="10"
|
||||||
|
id="namedview88"
|
||||||
|
inkscape:object-nodes="false"
|
||||||
|
inkscape:object-paths="false"
|
||||||
|
objecttolerance="10"
|
||||||
|
pagecolor="#555753"
|
||||||
|
inkscape:pageopacity="1"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
showborder="true"
|
||||||
|
showgrid="false"
|
||||||
|
showguides="true"
|
||||||
|
inkscape:snap-bbox="true"
|
||||||
|
inkscape:snap-bbox-midpoints="false"
|
||||||
|
inkscape:snap-global="true"
|
||||||
|
inkscape:snap-grids="true"
|
||||||
|
inkscape:snap-nodes="true"
|
||||||
|
inkscape:snap-others="false"
|
||||||
|
inkscape:snap-to-guides="true"
|
||||||
|
inkscape:window-height="1375"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:window-width="2560"
|
||||||
|
inkscape:window-x="0"
|
||||||
|
inkscape:window-y="27"
|
||||||
|
inkscape:zoom="1">
|
||||||
|
<inkscape:grid
|
||||||
|
empspacing="2"
|
||||||
|
enabled="true"
|
||||||
|
id="grid4866"
|
||||||
|
originx="-203"
|
||||||
|
originy="-251.96875"
|
||||||
|
snapvisiblegridlinesonly="true"
|
||||||
|
spacingx="1"
|
||||||
|
spacingy="1"
|
||||||
|
type="xygrid"
|
||||||
|
visible="true" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<title
|
||||||
|
id="title9167">Gnome Symbolic Icon Theme</title>
|
||||||
|
<defs
|
||||||
|
id="defs7386">
|
||||||
|
<linearGradient
|
||||||
|
id="linearGradient7212"
|
||||||
|
osb:paint="solid">
|
||||||
|
<stop
|
||||||
|
id="stop7214"
|
||||||
|
offset="0"
|
||||||
|
style="stop-color:#000000;stop-opacity:1;" />
|
||||||
|
</linearGradient>
|
||||||
|
</defs>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer9"
|
||||||
|
inkscape:label="apps"
|
||||||
|
style="display:inline"
|
||||||
|
transform="translate(-444.0002,35)">
|
||||||
|
<path
|
||||||
|
style="display:inline;opacity:0.3;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
|
||||||
|
d="m 457.97232,-31.569556 -5.96212,3.44224 -5.96215,-3.44224 v 0 l 5.96215,-3.44226 z"
|
||||||
|
id="path870-6"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccc" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cccccc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path886-9"
|
||||||
|
d="m 450.98519,-19.648086 -5.99273,-3.42041 -0.007,-6.97219 v 0 l 6.00018,3.4642 z"
|
||||||
|
style="display:inline;opacity:1;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new" />
|
||||||
|
<path
|
||||||
|
style="display:inline;opacity:0.60100002;vector-effect:none;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.99999994;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;marker:none;marker-start:none;marker-mid:none;marker-end:none;paint-order:normal;enable-background:new"
|
||||||
|
d="m 452.98577,-19.648086 5.99273,-3.42041 0.007,-6.97219 v 0 l -6.00018,3.4642 z"
|
||||||
|
id="path931"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="cccccc" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 4.3 KiB |
@@ -143,7 +143,6 @@
|
|||||||
<file>application_demo.c</file>
|
<file>application_demo.c</file>
|
||||||
<file>assistant.c</file>
|
<file>assistant.c</file>
|
||||||
<file>builder.c</file>
|
<file>builder.c</file>
|
||||||
<file>button_box.c</file>
|
|
||||||
<file>changedisplay.c</file>
|
<file>changedisplay.c</file>
|
||||||
<file>clipboard.c</file>
|
<file>clipboard.c</file>
|
||||||
<file>colorsel.c</file>
|
<file>colorsel.c</file>
|
||||||
@@ -190,6 +189,7 @@
|
|||||||
<file>paintable_animated.c</file>
|
<file>paintable_animated.c</file>
|
||||||
<file>paintable_mediastream.c</file>
|
<file>paintable_mediastream.c</file>
|
||||||
<file>panes.c</file>
|
<file>panes.c</file>
|
||||||
|
<file>password_entry.c</file>
|
||||||
<file>pickers.c</file>
|
<file>pickers.c</file>
|
||||||
<file>pixbufs.c</file>
|
<file>pixbufs.c</file>
|
||||||
<file>popover.c</file>
|
<file>popover.c</file>
|
||||||
@@ -248,6 +248,7 @@
|
|||||||
</gresource>
|
</gresource>
|
||||||
<gresource prefix="/transparent">
|
<gresource prefix="/transparent">
|
||||||
<file>portland-rose.jpg</file>
|
<file>portland-rose.jpg</file>
|
||||||
|
<file>bluroverlay.c</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
<gresource prefix="/markup">
|
<gresource prefix="/markup">
|
||||||
<file>markup.txt</file>
|
<file>markup.txt</file>
|
||||||
@@ -261,4 +262,23 @@
|
|||||||
<gresource prefix="/dnd">
|
<gresource prefix="/dnd">
|
||||||
<file>dnd.css</file>
|
<file>dnd.css</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
|
<gresource prefix="/org/gtk/Demo">
|
||||||
|
<file>icons/16x16/actions/application-exit.png</file>
|
||||||
|
<file>icons/16x16/actions/document-new.png</file>
|
||||||
|
<file>icons/16x16/actions/document-open.png</file>
|
||||||
|
<file>icons/16x16/actions/document-save.png</file>
|
||||||
|
<file>icons/16x16/actions/edit-copy.png</file>
|
||||||
|
<file>icons/16x16/actions/edit-cut.png</file>
|
||||||
|
<file>icons/16x16/actions/edit-paste.png</file>
|
||||||
|
<file>icons/16x16/actions/process-stop.png</file>
|
||||||
|
<file>icons/16x16/actions/go-home.png</file>
|
||||||
|
<file>icons/16x16/actions/go-up.png</file>
|
||||||
|
<file>icons/16x16/actions/mail-send-receive-symbolic.symbolic.png</file>
|
||||||
|
<file>icons/16x16/actions/view-fullscreen-symbolic.symbolic.png</file>
|
||||||
|
<file>icons/16x16/actions/document-edit-symbolic.symbolic.png</file>
|
||||||
|
<file>icons/16x16/emotes/face-cool.png</file>
|
||||||
|
<file>icons/16x16/emotes/face-laugh-symbolic.symbolic.png</file>
|
||||||
|
<file>icons/16x16/status/battery-caution-charging-symbolic.symbolic.png</file>
|
||||||
|
<file>icons/16x16/categories/applications-other.png</file>
|
||||||
|
</gresource>
|
||||||
</gresources>
|
</gresources>
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
<?xml version="1.0" standalone="no"?>
|
|
||||||
<!--*- mode: xml -*-->
|
|
||||||
<interface>
|
<interface>
|
||||||
<object class="GtkListStore" id="liststore1">
|
<object class="GtkListStore" id="liststore1">
|
||||||
<columns>
|
<columns>
|
||||||
@@ -76,8 +74,7 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSeparatorMenuItem">
|
<object class="GtkSeparatorMenuItem"/>
|
||||||
</object>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkMenuItem" id="quit_item">
|
<object class="GtkMenuItem" id="quit_item">
|
||||||
@@ -174,8 +171,7 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSeparatorToolItem">
|
<object class="GtkSeparatorToolItem"/>
|
||||||
</object>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkToolButton">
|
<object class="GtkToolButton">
|
||||||
@@ -199,9 +195,6 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||||
@@ -255,16 +248,9 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkStatusbar" id="statusbar1">
|
<object class="GtkStatusbar" id="statusbar1"/>
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
@@ -56,20 +56,20 @@ interactive_dialog_clicked (GtkButton *button,
|
|||||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||||
gtk_box_pack_start (GTK_BOX (content_area), hbox);
|
gtk_container_add (GTK_CONTAINER (content_area), hbox);
|
||||||
|
|
||||||
image = gtk_image_new_from_icon_name ("dialog-question");
|
image = gtk_image_new_from_icon_name ("dialog-question");
|
||||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), image);
|
gtk_container_add (GTK_CONTAINER (hbox), image);
|
||||||
|
|
||||||
table = gtk_grid_new ();
|
table = gtk_grid_new ();
|
||||||
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
|
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
|
||||||
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
|
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), table);
|
gtk_container_add (GTK_CONTAINER (hbox), table);
|
||||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||||
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
|
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
|
||||||
local_entry1 = gtk_entry_new ();
|
local_entry1 = gtk_entry_new ();
|
||||||
gtk_entry_set_text (GTK_ENTRY (local_entry1), gtk_entry_get_text (GTK_ENTRY (entry1)));
|
gtk_editable_set_text (GTK_EDITABLE (local_entry1), gtk_editable_get_text (GTK_EDITABLE (entry1)));
|
||||||
gtk_grid_attach (GTK_GRID (table), local_entry1, 1, 0, 1, 1);
|
gtk_grid_attach (GTK_GRID (table), local_entry1, 1, 0, 1, 1);
|
||||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), local_entry1);
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), local_entry1);
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ interactive_dialog_clicked (GtkButton *button,
|
|||||||
gtk_grid_attach (GTK_GRID (table), label, 0, 1, 1, 1);
|
gtk_grid_attach (GTK_GRID (table), label, 0, 1, 1, 1);
|
||||||
|
|
||||||
local_entry2 = gtk_entry_new ();
|
local_entry2 = gtk_entry_new ();
|
||||||
gtk_entry_set_text (GTK_ENTRY (local_entry2), gtk_entry_get_text (GTK_ENTRY (entry2)));
|
gtk_editable_set_text (GTK_EDITABLE (local_entry2), gtk_editable_get_text (GTK_EDITABLE (entry2)));
|
||||||
gtk_grid_attach (GTK_GRID (table), local_entry2, 1, 1, 1, 1);
|
gtk_grid_attach (GTK_GRID (table), local_entry2, 1, 1, 1, 1);
|
||||||
gtk_label_set_mnemonic_widget (GTK_LABEL (label), local_entry2);
|
gtk_label_set_mnemonic_widget (GTK_LABEL (label), local_entry2);
|
||||||
|
|
||||||
@@ -85,8 +85,8 @@ interactive_dialog_clicked (GtkButton *button,
|
|||||||
|
|
||||||
if (response == GTK_RESPONSE_OK)
|
if (response == GTK_RESPONSE_OK)
|
||||||
{
|
{
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry1), gtk_entry_get_text (GTK_ENTRY (local_entry1)));
|
gtk_editable_set_text (GTK_EDITABLE (entry1), gtk_editable_get_text (GTK_EDITABLE (local_entry1)));
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry2), gtk_entry_get_text (GTK_ENTRY (local_entry2)));
|
gtk_editable_set_text (GTK_EDITABLE (entry2), gtk_editable_get_text (GTK_EDITABLE (local_entry2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
gtk_widget_destroy (dialog);
|
gtk_widget_destroy (dialog);
|
||||||
@@ -123,29 +123,29 @@ do_dialog (GtkWidget *do_widget)
|
|||||||
|
|
||||||
/* Standard message dialog */
|
/* Standard message dialog */
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
button = gtk_button_new_with_mnemonic ("_Message Dialog");
|
button = gtk_button_new_with_mnemonic ("_Message Dialog");
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (message_dialog_clicked), NULL);
|
G_CALLBACK (message_dialog_clicked), NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
|
gtk_container_add (GTK_CONTAINER (vbox), gtk_separator_new (GTK_ORIENTATION_HORIZONTAL));
|
||||||
|
|
||||||
/* Interactive dialog*/
|
/* Interactive dialog*/
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 8);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
|
|
||||||
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
|
button = gtk_button_new_with_mnemonic ("_Interactive Dialog");
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (interactive_dialog_clicked), NULL);
|
G_CALLBACK (interactive_dialog_clicked), NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), vbox2);
|
gtk_container_add (GTK_CONTAINER (hbox), vbox2);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), button);
|
gtk_container_add (GTK_CONTAINER (vbox2), button);
|
||||||
|
|
||||||
table = gtk_grid_new ();
|
table = gtk_grid_new ();
|
||||||
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
|
gtk_grid_set_row_spacing (GTK_GRID (table), 4);
|
||||||
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
|
gtk_grid_set_column_spacing (GTK_GRID (table), 4);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), table);
|
gtk_container_add (GTK_CONTAINER (hbox), table);
|
||||||
|
|
||||||
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
label = gtk_label_new_with_mnemonic ("_Entry 1");
|
||||||
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
|
gtk_grid_attach (GTK_GRID (table), label, 0, 0, 1, 1);
|
||||||
|
@@ -199,7 +199,7 @@ edit_label_done (GtkWidget *entry, gpointer data)
|
|||||||
gtk_container_child_get (GTK_CONTAINER (fixed), entry, "x", &x, "y", &y, NULL);
|
gtk_container_child_get (GTK_CONTAINER (fixed), entry, "x", &x, "y", &y, NULL);
|
||||||
|
|
||||||
label = GTK_WIDGET (g_object_get_data (G_OBJECT (entry), "label"));
|
label = GTK_WIDGET (g_object_get_data (G_OBJECT (entry), "label"));
|
||||||
gtk_label_set_text (GTK_LABEL (label), gtk_entry_get_text (GTK_ENTRY (entry)));
|
gtk_label_set_text (GTK_LABEL (label), gtk_editable_get_text (GTK_EDITABLE (entry)));
|
||||||
|
|
||||||
gtk_widget_destroy (entry);
|
gtk_widget_destroy (entry);
|
||||||
}
|
}
|
||||||
@@ -218,7 +218,7 @@ edit_cb (GtkWidget *child)
|
|||||||
|
|
||||||
g_object_set_data (G_OBJECT (entry), "label", child);
|
g_object_set_data (G_OBJECT (entry), "label", child);
|
||||||
|
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), gtk_label_get_text (GTK_LABEL (child)));
|
gtk_editable_set_text (GTK_EDITABLE (entry), gtk_label_get_text (GTK_LABEL (child)));
|
||||||
g_signal_connect (entry, "activate", G_CALLBACK (edit_label_done), NULL);
|
g_signal_connect (entry, "activate", G_CALLBACK (edit_label_done), NULL);
|
||||||
gtk_fixed_put (GTK_FIXED (fixed), entry, x, y);
|
gtk_fixed_put (GTK_FIXED (fixed), entry, x, y);
|
||||||
gtk_widget_grab_focus (entry);
|
gtk_widget_grab_focus (entry);
|
||||||
@@ -352,7 +352,7 @@ do_dnd (GtkWidget *do_widget)
|
|||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
fixed = gtk_fixed_new ();
|
fixed = gtk_fixed_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), fixed);
|
gtk_container_add (GTK_CONTAINER (vbox), fixed);
|
||||||
gtk_widget_set_hexpand (fixed, TRUE);
|
gtk_widget_set_hexpand (fixed, TRUE);
|
||||||
gtk_widget_set_vexpand (fixed, TRUE);
|
gtk_widget_set_vexpand (fixed, TRUE);
|
||||||
|
|
||||||
|
@@ -208,12 +208,12 @@ do_drawingarea (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"<u>Checkerboard pattern</u>");
|
"<u>Checkerboard pattern</u>");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_widget_set_vexpand (frame, TRUE);
|
gtk_widget_set_vexpand (frame, TRUE);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
da = gtk_drawing_area_new ();
|
da = gtk_drawing_area_new ();
|
||||||
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
|
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
|
||||||
@@ -228,12 +228,12 @@ do_drawingarea (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"<u>Scribble area</u>");
|
"<u>Scribble area</u>");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_widget_set_vexpand (frame, TRUE);
|
gtk_widget_set_vexpand (frame, TRUE);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
da = gtk_drawing_area_new ();
|
da = gtk_drawing_area_new ();
|
||||||
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
|
gtk_drawing_area_set_content_width (GTK_DRAWING_AREA (da), 100);
|
||||||
|
@@ -356,7 +356,7 @@ do_editable_cells (GtkWidget *do_widget)
|
|||||||
g_object_set (vbox, "margin", 5, NULL);
|
g_object_set (vbox, "margin", 5, NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_container_add (GTK_CONTAINER (vbox),
|
||||||
gtk_label_new ("Shopping list (you can edit the cells!)"));
|
gtk_label_new ("Shopping list (you can edit the cells!)"));
|
||||||
|
|
||||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||||
@@ -365,7 +365,7 @@ do_editable_cells (GtkWidget *do_widget)
|
|||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||||
GTK_POLICY_AUTOMATIC,
|
GTK_POLICY_AUTOMATIC,
|
||||||
GTK_POLICY_AUTOMATIC);
|
GTK_POLICY_AUTOMATIC);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), sw);
|
gtk_container_add (GTK_CONTAINER (vbox), sw);
|
||||||
|
|
||||||
/* create models */
|
/* create models */
|
||||||
items_model = create_items_model ();
|
items_model = create_items_model ();
|
||||||
@@ -387,17 +387,17 @@ do_editable_cells (GtkWidget *do_widget)
|
|||||||
/* some buttons */
|
/* some buttons */
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||||
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
gtk_box_set_homogeneous (GTK_BOX (hbox), TRUE);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Add item");
|
button = gtk_button_new_with_label ("Add item");
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (add_item), treeview);
|
G_CALLBACK (add_item), treeview);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Remove item");
|
button = gtk_button_new_with_label ("Remove item");
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (remove_item), treeview);
|
G_CALLBACK (remove_item), treeview);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), button);
|
gtk_container_add (GTK_CONTAINER (hbox), button);
|
||||||
|
|
||||||
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
|
gtk_window_set_default_size (GTK_WINDOW (window), 320, 200);
|
||||||
}
|
}
|
||||||
|
@@ -34,19 +34,19 @@ do_entry_buffer (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"Entries share a buffer. Typing in one is reflected in the other.");
|
"Entries share a buffer. Typing in one is reflected in the other.");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
/* Create a buffer */
|
/* Create a buffer */
|
||||||
buffer = gtk_entry_buffer_new (NULL, 0);
|
buffer = gtk_entry_buffer_new (NULL, 0);
|
||||||
|
|
||||||
/* Create our first entry */
|
/* Create our first entry */
|
||||||
entry = gtk_entry_new_with_buffer (buffer);
|
entry = gtk_entry_new_with_buffer (buffer);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||||
|
|
||||||
/* Create the second entry */
|
/* Create the second entry */
|
||||||
entry = gtk_entry_new_with_buffer (buffer);
|
entry = gtk_entry_new_with_buffer (buffer);
|
||||||
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
|
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||||
|
|
||||||
g_object_unref (buffer);
|
g_object_unref (buffer);
|
||||||
}
|
}
|
||||||
|
@@ -60,11 +60,11 @@ do_entry_completion (GtkWidget *do_widget)
|
|||||||
|
|
||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
|
gtk_label_set_markup (GTK_LABEL (label), "Completion demo, try writing <b>total</b> or <b>gnome</b> for example.");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
/* Create our entry */
|
/* Create our entry */
|
||||||
entry = gtk_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||||
|
|
||||||
/* Create the completion object */
|
/* Create the completion object */
|
||||||
completion = gtk_entry_completion_new ();
|
completion = gtk_entry_completion_new ();
|
||||||
|
@@ -73,7 +73,7 @@ do_expander (GtkWidget *do_widget)
|
|||||||
"resize the window. Do it already !", -1);
|
"resize the window. Do it already !", -1);
|
||||||
gtk_container_add (GTK_CONTAINER (sw), tv);
|
gtk_container_add (GTK_CONTAINER (sw), tv);
|
||||||
gtk_container_add (GTK_CONTAINER (expander), sw);
|
gtk_container_add (GTK_CONTAINER (expander), sw);
|
||||||
gtk_box_pack_end (GTK_BOX (area), expander);
|
gtk_container_add (GTK_CONTAINER (area), expander);
|
||||||
g_signal_connect (expander, "notify::expanded",
|
g_signal_connect (expander, "notify::expanded",
|
||||||
G_CALLBACK (expander_cb), window);
|
G_CALLBACK (expander_cb), window);
|
||||||
|
|
||||||
|
@@ -1,12 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- Generated with glade 3.18.1 -->
|
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.16"/>
|
<requires lib="gtk+" version="3.16"/>
|
||||||
<object class="GtkListStore" id="liststore1">
|
<object class="GtkListStore" id="liststore1">
|
||||||
<columns>
|
<columns>
|
||||||
<!-- column-name width -->
|
|
||||||
<column type="gint"/>
|
<column type="gint"/>
|
||||||
<!-- column-name height -->
|
|
||||||
<column type="gint"/>
|
<column type="gint"/>
|
||||||
</columns>
|
</columns>
|
||||||
<data>
|
<data>
|
||||||
@@ -43,7 +39,7 @@
|
|||||||
<property name="label" translatable="yes">Original</property>
|
<property name="label" translatable="yes">Original</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
<accessibility>
|
<accessibility>
|
||||||
<relation type="label-for" target="treeview1"/>
|
<relation type="label-for" target="treeview1"/>
|
||||||
@@ -149,7 +145,7 @@
|
|||||||
<property name="label" translatable="yes">Computed Columns</property>
|
<property name="label" translatable="yes">Computed Columns</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
<accessibility>
|
<accessibility>
|
||||||
<relation type="label-for" target="treeview2"/>
|
<relation type="label-for" target="treeview2"/>
|
||||||
@@ -165,7 +161,7 @@
|
|||||||
<property name="label" translatable="yes">Filtered</property>
|
<property name="label" translatable="yes">Filtered</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
<accessibility>
|
<accessibility>
|
||||||
<relation type="label-for" target="treeview3"/>
|
<relation type="label-for" target="treeview3"/>
|
||||||
|
@@ -264,7 +264,10 @@ do_fishbowl (GtkWidget *do_widget)
|
|||||||
NULL);
|
NULL);
|
||||||
gtk_builder_connect_signals (builder, NULL);
|
gtk_builder_connect_signals (builder, NULL);
|
||||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||||
|
g_signal_connect (window, "destroy",
|
||||||
|
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||||
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
|
bowl = GTK_WIDGET (gtk_builder_get_object (builder, "bowl"));
|
||||||
|
selected_widget_type = -1;
|
||||||
set_widget_type (GTK_FISHBOWL (bowl), 0);
|
set_widget_type (GTK_FISHBOWL (bowl), 0);
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
gtk_window_set_display (GTK_WINDOW (window),
|
||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_display (do_widget));
|
||||||
@@ -279,6 +282,5 @@ do_fishbowl (GtkWidget *do_widget)
|
|||||||
else
|
else
|
||||||
gtk_widget_destroy (window);
|
gtk_widget_destroy (window);
|
||||||
|
|
||||||
|
|
||||||
return window;
|
return window;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.6 -->
|
|
||||||
<object class="GtkWindow" id="window">
|
<object class="GtkWindow" id="window">
|
||||||
<property name="title" translatable="yes">Fishbowl</property>
|
<property name="title" translatable="yes">Fishbowl</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
@@ -69,8 +67,8 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkToggleButton" id="changes_prevent">
|
<object class="GtkToggleButton" id="changes_prevent">
|
||||||
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">True</property>
|
<property name="active" bind-source="changes_allow" bind-property="active" bind-flags="bidirectional|invert-boolean">1</property>
|
||||||
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">False</property>
|
<property name="visible" bind-source="changes_prevent" bind-property="active" bind-flags="invert-boolean">0</property>
|
||||||
<property name="icon-name">changes-prevent</property>
|
<property name="icon-name">changes-prevent</property>
|
||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
</object>
|
</object>
|
||||||
@@ -84,7 +82,7 @@
|
|||||||
<object class="GtkFishbowl" id="bowl">
|
<object class="GtkFishbowl" id="bowl">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="animating">True</property>
|
<property name="animating">True</property>
|
||||||
<property name="benchmark" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">True</property>
|
<property name="benchmark" bind-source="changes_allow" bind-property="active" bind-flags="invert-boolean">1</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
@@ -1,5 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- Generated with glade 3.18.1 -->
|
|
||||||
<interface>
|
<interface>
|
||||||
<requires lib="gtk+" version="3.12"/>
|
<requires lib="gtk+" version="3.12"/>
|
||||||
<object class="GtkWindow" id="window">
|
<object class="GtkWindow" id="window">
|
||||||
@@ -53,7 +51,7 @@
|
|||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<property name="label" translatable="yes">Font Features</property>
|
<property name="label" translatable="yes">Font Features</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -84,7 +82,7 @@
|
|||||||
<property name="label" translatable="yes">Font Variations</property>
|
<property name="label" translatable="yes">Font Variations</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -115,31 +113,35 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkStack" id="stack">
|
<object class="GtkStack" id="stack">
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="label">
|
<object class="GtkStackPage">
|
||||||
<property name="wrap">1</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="yalign">0</property>
|
|
||||||
<property name="valign">start</property>
|
|
||||||
<property name="selectable">1</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="name">label</property>
|
<property name="name">label</property>
|
||||||
</packing>
|
<property name="child">
|
||||||
|
<object class="GtkLabel" id="label">
|
||||||
|
<property name="wrap">1</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="yalign">0</property>
|
||||||
|
<property name="valign">start</property>
|
||||||
|
<property name="selectable">1</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkEntry" id="entry">
|
<object class="GtkStackPage">
|
||||||
<property name="text">Grumpy wizards make toxic brew for the evil Queen and Jack. A quick movement of the enemy will jeopardize six gunboats. The job of waxing linoleum frequently peeves chintzy kids. My girl wove six dozen plaid jackets before she quit. Twelve ziggurats quickly jumped a finch box.
|
<property name="name">entry</property>
|
||||||
|
<property name="child">
|
||||||
|
<object class="GtkEntry" id="entry">
|
||||||
|
<property name="text">Grumpy wizards make toxic brew for the evil Queen and Jack. A quick movement of the enemy will jeopardize six gunboats. The job of waxing linoleum frequently peeves chintzy kids. My girl wove six dozen plaid jackets before she quit. Twelve ziggurats quickly jumped a finch box.
|
||||||
|
|
||||||
Разъяренный чтец эгоистично бьёт пятью жердями шустрого фехтовальщика. Наш банк вчера же выплатил Ф.Я. Эйхгольду комиссию за ценные вещи. Эх, чужак, общий съём цен шляп (юфть) – вдрызг! В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!
|
Разъяренный чтец эгоистично бьёт пятью жердями шустрого фехтовальщика. Наш банк вчера же выплатил Ф.Я. Эйхгольду комиссию за ценные вещи. Эх, чужак, общий съём цен шляп (юфть) – вдрызг! В чащах юга жил бы цитрус? Да, но фальшивый экземпляр!
|
||||||
|
|
||||||
Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός</property>
|
Τάχιστη αλώπηξ βαφής ψημένη γη, δρασκελίζει υπέρ νωθρού κυνός</property>
|
||||||
<signal name="activate" handler="stop_edit"/>
|
<signal name="activate" handler="stop_edit"/>
|
||||||
<property name="valign">start</property>
|
<property name="valign">start</property>
|
||||||
<property name="width-chars">50</property>
|
<property name="width-chars">50</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="name">entry</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
@@ -305,7 +305,7 @@ update_display (void)
|
|||||||
char *font_desc;
|
char *font_desc;
|
||||||
char *features;
|
char *features;
|
||||||
|
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||||
|
|
||||||
if (gtk_label_get_selection_bounds (GTK_LABEL (label), &ins, &bound))
|
if (gtk_label_get_selection_bounds (GTK_LABEL (label), &ins, &bound))
|
||||||
{
|
{
|
||||||
@@ -728,7 +728,7 @@ adjustment_changed (GtkAdjustment *adjustment,
|
|||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
str = g_strdup_printf ("%g", gtk_adjustment_get_value (adjustment));
|
str = g_strdup_printf ("%g", gtk_adjustment_get_value (adjustment));
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), str);
|
gtk_editable_set_text (GTK_EDITABLE (entry), str);
|
||||||
g_free (str);
|
g_free (str);
|
||||||
|
|
||||||
update_display ();
|
update_display ();
|
||||||
@@ -741,7 +741,7 @@ entry_activated (GtkEntry *entry,
|
|||||||
gdouble value;
|
gdouble value;
|
||||||
gchar *err = NULL;
|
gchar *err = NULL;
|
||||||
|
|
||||||
value = g_strtod (gtk_entry_get_text (entry), &err);
|
value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
|
||||||
if (err != NULL)
|
if (err != NULL)
|
||||||
gtk_adjustment_set_value (adjustment, value);
|
gtk_adjustment_set_value (adjustment, value);
|
||||||
}
|
}
|
||||||
@@ -821,7 +821,7 @@ add_axis (FT_Var_Axis *ax, FT_Fixed value, int i)
|
|||||||
gtk_grid_attach (GTK_GRID (variations_grid), axis_scale, 1, i, 1, 1);
|
gtk_grid_attach (GTK_GRID (variations_grid), axis_scale, 1, i, 1, 1);
|
||||||
axis_entry = gtk_entry_new ();
|
axis_entry = gtk_entry_new ();
|
||||||
gtk_widget_set_valign (axis_entry, GTK_ALIGN_BASELINE);
|
gtk_widget_set_valign (axis_entry, GTK_ALIGN_BASELINE);
|
||||||
gtk_entry_set_width_chars (GTK_ENTRY (axis_entry), 4);
|
gtk_editable_set_width_chars (GTK_EDITABLE (axis_entry), 4);
|
||||||
gtk_grid_attach (GTK_GRID (variations_grid), axis_entry, 2, i, 1, 1);
|
gtk_grid_attach (GTK_GRID (variations_grid), axis_entry, 2, i, 1, 1);
|
||||||
|
|
||||||
axis = g_new (Axis, 1);
|
axis = g_new (Axis, 1);
|
||||||
@@ -1639,7 +1639,7 @@ static char *text;
|
|||||||
static void
|
static void
|
||||||
switch_to_entry (void)
|
switch_to_entry (void)
|
||||||
{
|
{
|
||||||
text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
|
text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (entry)));
|
||||||
gtk_stack_set_visible_child_name (GTK_STACK (stack), "entry");
|
gtk_stack_set_visible_child_name (GTK_STACK (stack), "entry");
|
||||||
gtk_widget_grab_focus (entry);
|
gtk_widget_grab_focus (entry);
|
||||||
}
|
}
|
||||||
@@ -1677,7 +1677,7 @@ entry_key_press (GtkEventController *controller,
|
|||||||
{
|
{
|
||||||
if (keyval == GDK_KEY_Escape)
|
if (keyval == GDK_KEY_Escape)
|
||||||
{
|
{
|
||||||
gtk_entry_set_text (GTK_ENTRY (entry), text);
|
gtk_editable_set_text (GTK_EDITABLE (entry), text);
|
||||||
stop_edit ();
|
stop_edit ();
|
||||||
return GDK_EVENT_STOP;
|
return GDK_EVENT_STOP;
|
||||||
}
|
}
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
/* Foreign drawing
|
/* Foreign drawing
|
||||||
*
|
*
|
||||||
* Many applications can't use GTK+ widgets, for a variety of reasons,
|
* Many applications can't use GTK widgets, for a variety of reasons,
|
||||||
* but still want their user interface to appear integrated with the
|
* but still want their user interface to appear integrated with the
|
||||||
* rest of the desktop, and follow GTK+ themes. This demo shows how to
|
* rest of the desktop, and follow GTK themes. This demo shows how to
|
||||||
* use GtkStyleContext and the gtk_render_ APIs to achieve this.
|
* use GtkStyleContext and the gtk_render_ APIs to achieve this.
|
||||||
*
|
*
|
||||||
* Note that this is a very simple, non-interactive example.
|
* Note that this is a very simple, non-interactive example.
|
||||||
|
BIN
demos/gtk-demo/icons/16x16/actions/application-exit.png
Normal file
After Width: | Height: | Size: 659 B |
After Width: | Height: | Size: 223 B |
BIN
demos/gtk-demo/icons/16x16/actions/document-new.png
Normal file
After Width: | Height: | Size: 330 B |
BIN
demos/gtk-demo/icons/16x16/actions/document-open.png
Normal file
After Width: | Height: | Size: 420 B |
BIN
demos/gtk-demo/icons/16x16/actions/document-save.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
demos/gtk-demo/icons/16x16/actions/edit-copy.png
Normal file
After Width: | Height: | Size: 401 B |
BIN
demos/gtk-demo/icons/16x16/actions/edit-cut.png
Normal file
After Width: | Height: | Size: 781 B |
BIN
demos/gtk-demo/icons/16x16/actions/edit-paste.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
demos/gtk-demo/icons/16x16/actions/go-home.png
Normal file
After Width: | Height: | Size: 582 B |
BIN
demos/gtk-demo/icons/16x16/actions/go-up.png
Normal file
After Width: | Height: | Size: 336 B |
After Width: | Height: | Size: 185 B |
BIN
demos/gtk-demo/icons/16x16/actions/process-stop.png
Normal file
After Width: | Height: | Size: 422 B |
After Width: | Height: | Size: 208 B |
BIN
demos/gtk-demo/icons/16x16/categories/applications-other.png
Normal file
After Width: | Height: | Size: 682 B |
BIN
demos/gtk-demo/icons/16x16/emotes/face-cool.png
Normal file
After Width: | Height: | Size: 845 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 239 B |
@@ -266,7 +266,7 @@ do_iconview (GtkWidget *do_widget)
|
|||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
tool_bar = gtk_toolbar_new ();
|
tool_bar = gtk_toolbar_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), tool_bar);
|
gtk_container_add (GTK_CONTAINER (vbox), tool_bar);
|
||||||
|
|
||||||
up_button = gtk_tool_button_new (NULL, NULL);
|
up_button = gtk_tool_button_new (NULL, NULL);
|
||||||
gtk_tool_button_set_label (GTK_TOOL_BUTTON (up_button), _("_Up"));
|
gtk_tool_button_set_label (GTK_TOOL_BUTTON (up_button), _("_Up"));
|
||||||
@@ -292,7 +292,7 @@ do_iconview (GtkWidget *do_widget)
|
|||||||
GTK_POLICY_AUTOMATIC);
|
GTK_POLICY_AUTOMATIC);
|
||||||
gtk_widget_set_vexpand (sw, TRUE);
|
gtk_widget_set_vexpand (sw, TRUE);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), sw);
|
gtk_container_add (GTK_CONTAINER (vbox), sw);
|
||||||
|
|
||||||
/* Create the store and fill it with the contents of '/' */
|
/* Create the store and fill it with the contents of '/' */
|
||||||
parent = g_strdup ("/");
|
parent = g_strdup ("/");
|
||||||
|
@@ -262,7 +262,7 @@ start_progressive_loading (GtkWidget *picture)
|
|||||||
* pauses in the reading process.
|
* pauses in the reading process.
|
||||||
*/
|
*/
|
||||||
load_timeout = g_timeout_add (150, progressive_timeout, picture);
|
load_timeout = g_timeout_add (150, progressive_timeout, picture);
|
||||||
g_source_set_name_by_id (load_timeout, "[gtk+] progressive_timeout");
|
g_source_set_name_by_id (load_timeout, "[gtk] progressive_timeout");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -354,13 +354,13 @@ do_images (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"<u>Image loaded from a file</u>");
|
"<u>Image loaded from a file</u>");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
image = gtk_image_new_from_icon_name ("gtk3-demo");
|
image = gtk_image_new_from_icon_name ("gtk3-demo");
|
||||||
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
gtk_image_set_icon_size (GTK_IMAGE (image), GTK_ICON_SIZE_LARGE);
|
||||||
@@ -373,13 +373,13 @@ do_images (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"<u>Animation loaded from a file</u>");
|
"<u>Animation loaded from a file</u>");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
picture = gtk_picture_new_for_resource ("/images/floppybuddy.gif");
|
picture = gtk_picture_new_for_resource ("/images/floppybuddy.gif");
|
||||||
|
|
||||||
@@ -390,13 +390,13 @@ do_images (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"<u>Symbolic themed icon</u>");
|
"<u>Symbolic themed icon</u>");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
gicon = g_themed_icon_new_with_default_fallbacks ("battery-caution-charging-symbolic");
|
gicon = g_themed_icon_new_with_default_fallbacks ("battery-caution-charging-symbolic");
|
||||||
image = gtk_image_new_from_gicon (gicon);
|
image = gtk_image_new_from_gicon (gicon);
|
||||||
@@ -412,13 +412,13 @@ do_images (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"<u>Progressive image loading</u>");
|
"<u>Progressive image loading</u>");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
/* Create an empty image for now; the progressive loader
|
/* Create an empty image for now; the progressive loader
|
||||||
* will create the pixbuf and fill it in.
|
* will create the pixbuf and fill it in.
|
||||||
@@ -435,13 +435,13 @@ do_images (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"<u>Displaying video</u>");
|
"<u>Displaying video</u>");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
frame = gtk_frame_new (NULL);
|
frame = gtk_frame_new (NULL);
|
||||||
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN);
|
||||||
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (frame, GTK_ALIGN_CENTER);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
video = gtk_video_new_for_resource ("/images/gtk-logo.webm");
|
video = gtk_video_new_for_resource ("/images/gtk-logo.webm");
|
||||||
gtk_media_stream_set_loop (gtk_video_get_media_stream (GTK_VIDEO (video)), TRUE);
|
gtk_media_stream_set_loop (gtk_video_get_media_stream (GTK_VIDEO (video)), TRUE);
|
||||||
@@ -454,7 +454,7 @@ do_images (GtkWidget *do_widget)
|
|||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label),
|
gtk_label_set_markup (GTK_LABEL (label),
|
||||||
"<u>GtkWidgetPaintable</u>");
|
"<u>GtkWidgetPaintable</u>");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
paintable = gtk_widget_paintable_new (do_widget);
|
paintable = gtk_widget_paintable_new (do_widget);
|
||||||
picture = gtk_picture_new_for_paintable (paintable);
|
picture = gtk_picture_new_for_paintable (paintable);
|
||||||
@@ -464,7 +464,7 @@ do_images (GtkWidget *do_widget)
|
|||||||
|
|
||||||
/* Sensitivity control */
|
/* Sensitivity control */
|
||||||
button = gtk_toggle_button_new_with_mnemonic ("_Insensitive");
|
button = gtk_toggle_button_new_with_mnemonic ("_Insensitive");
|
||||||
gtk_box_pack_start (GTK_BOX (base_vbox), button);
|
gtk_container_add (GTK_CONTAINER (base_vbox), button);
|
||||||
|
|
||||||
g_signal_connect (button, "toggled",
|
g_signal_connect (button, "toggled",
|
||||||
G_CALLBACK (toggle_sensitivity_callback),
|
G_CALLBACK (toggle_sensitivity_callback),
|
||||||
|
@@ -65,24 +65,24 @@ do_infobar (GtkWidget *do_widget)
|
|||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
bar = gtk_info_bar_new ();
|
bar = gtk_info_bar_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_INFO);
|
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_INFO);
|
||||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
|
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_INFO");
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||||
|
|
||||||
button = gtk_toggle_button_new_with_label ("Message");
|
button = gtk_toggle_button_new_with_label ("Message");
|
||||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||||
|
|
||||||
bar = gtk_info_bar_new ();
|
bar = gtk_info_bar_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_WARNING);
|
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_WARNING);
|
||||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
|
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_WARNING");
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||||
|
|
||||||
button = gtk_toggle_button_new_with_label ("Warning");
|
button = gtk_toggle_button_new_with_label ("Warning");
|
||||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||||
@@ -91,24 +91,24 @@ do_infobar (GtkWidget *do_widget)
|
|||||||
bar = gtk_info_bar_new_with_buttons (_("_OK"), GTK_RESPONSE_OK, NULL);
|
bar = gtk_info_bar_new_with_buttons (_("_OK"), GTK_RESPONSE_OK, NULL);
|
||||||
gtk_info_bar_set_show_close_button (GTK_INFO_BAR (bar), TRUE);
|
gtk_info_bar_set_show_close_button (GTK_INFO_BAR (bar), TRUE);
|
||||||
g_signal_connect (bar, "response", G_CALLBACK (on_bar_response), window);
|
g_signal_connect (bar, "response", G_CALLBACK (on_bar_response), window);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_QUESTION);
|
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_QUESTION);
|
||||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
|
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_QUESTION");
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||||
|
|
||||||
button = gtk_toggle_button_new_with_label ("Question");
|
button = gtk_toggle_button_new_with_label ("Question");
|
||||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||||
|
|
||||||
bar = gtk_info_bar_new ();
|
bar = gtk_info_bar_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_ERROR);
|
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_ERROR);
|
||||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
|
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_ERROR");
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||||
|
|
||||||
button = gtk_toggle_button_new_with_label ("Error");
|
button = gtk_toggle_button_new_with_label ("Error");
|
||||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||||
@@ -116,12 +116,12 @@ do_infobar (GtkWidget *do_widget)
|
|||||||
gtk_container_add (GTK_CONTAINER (actions), button);
|
gtk_container_add (GTK_CONTAINER (actions), button);
|
||||||
|
|
||||||
bar = gtk_info_bar_new ();
|
bar = gtk_info_bar_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), bar);
|
gtk_container_add (GTK_CONTAINER (vbox), bar);
|
||||||
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_OTHER);
|
gtk_info_bar_set_message_type (GTK_INFO_BAR (bar), GTK_MESSAGE_OTHER);
|
||||||
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
|
label = gtk_label_new ("This is an info bar with message type GTK_MESSAGE_OTHER");
|
||||||
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
|
||||||
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
gtk_label_set_xalign (GTK_LABEL (label), 0);
|
||||||
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
gtk_container_add (GTK_CONTAINER (gtk_info_bar_get_content_area (GTK_INFO_BAR (bar))), label);
|
||||||
|
|
||||||
button = gtk_toggle_button_new_with_label ("Other");
|
button = gtk_toggle_button_new_with_label ("Other");
|
||||||
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
g_object_bind_property (bar, "revealed", button, "active", G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
|
||||||
@@ -130,7 +130,7 @@ do_infobar (GtkWidget *do_widget)
|
|||||||
frame = gtk_frame_new ("Info bars");
|
frame = gtk_frame_new ("Info bars");
|
||||||
gtk_widget_set_margin_top (frame, 8);
|
gtk_widget_set_margin_top (frame, 8);
|
||||||
gtk_widget_set_margin_bottom (frame, 8);
|
gtk_widget_set_margin_bottom (frame, 8);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), frame);
|
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||||
|
|
||||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||||
g_object_set (vbox2, "margin", 8, NULL);
|
g_object_set (vbox2, "margin", 8, NULL);
|
||||||
@@ -138,9 +138,9 @@ do_infobar (GtkWidget *do_widget)
|
|||||||
|
|
||||||
/* Standard message dialog */
|
/* Standard message dialog */
|
||||||
label = gtk_label_new ("An example of different info bars");
|
label = gtk_label_new ("An example of different info bars");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), label);
|
gtk_container_add (GTK_CONTAINER (vbox2), label);
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox2), actions);
|
gtk_container_add (GTK_CONTAINER (vbox2), actions);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
|
@@ -268,7 +268,7 @@ do_list_store (GtkWidget *do_widget)
|
|||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
|
|
||||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
sw = gtk_scrolled_window_new (NULL, NULL);
|
sw = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (sw),
|
||||||
@@ -276,7 +276,7 @@ do_list_store (GtkWidget *do_widget)
|
|||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||||
GTK_POLICY_NEVER,
|
GTK_POLICY_NEVER,
|
||||||
GTK_POLICY_AUTOMATIC);
|
GTK_POLICY_AUTOMATIC);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), sw);
|
gtk_container_add (GTK_CONTAINER (vbox), sw);
|
||||||
|
|
||||||
/* create tree model */
|
/* create tree model */
|
||||||
model = create_model ();
|
model = create_model ();
|
||||||
|
@@ -361,12 +361,12 @@ do_listbox (GtkWidget *do_widget)
|
|||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
|
||||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||||
label = gtk_label_new ("Messages from Gtk+ and friends");
|
label = gtk_label_new ("Messages from GTK and friends");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
scrolled = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||||
gtk_widget_set_vexpand (scrolled, TRUE);
|
gtk_widget_set_vexpand (scrolled, TRUE);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), scrolled);
|
gtk_container_add (GTK_CONTAINER (vbox), scrolled);
|
||||||
listbox = gtk_list_box_new ();
|
listbox = gtk_list_box_new ();
|
||||||
gtk_container_add (GTK_CONTAINER (scrolled), listbox);
|
gtk_container_add (GTK_CONTAINER (scrolled), listbox);
|
||||||
|
|
||||||
|
@@ -1,7 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface domain="gtk40">
|
<interface domain="gtk40">
|
||||||
<!-- interface-requires gtk+ 3.10 -->
|
|
||||||
<!-- interface-requires gtkdemo 3.10 -->
|
|
||||||
<object class="GtkMenu" id="menu1">
|
<object class="GtkMenu" id="menu1">
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkMenuItem" id="menuitem1">
|
<object class="GtkMenuItem" id="menuitem1">
|
||||||
@@ -53,7 +50,7 @@
|
|||||||
<property name="valign">baseline</property>
|
<property name="valign">baseline</property>
|
||||||
<property name="label" translatable="0">Username</property>
|
<property name="label" translatable="0">Username</property>
|
||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"/>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -67,9 +64,6 @@
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLabel" id="short_time_label">
|
<object class="GtkLabel" id="short_time_label">
|
||||||
@@ -79,10 +73,6 @@
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="pack-type">end</property>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -118,9 +108,6 @@
|
|||||||
<object class="GtkLabel" id="label4">
|
<object class="GtkLabel" id="label4">
|
||||||
<property name="label" translatable="yes">Resent by</property>
|
<property name="label" translatable="yes">Resent by</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkLinkButton" id="resent_by_button">
|
<object class="GtkLinkButton" id="resent_by_button">
|
||||||
@@ -130,9 +117,6 @@
|
|||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
<property name="uri">http://www.gtk.org</property>
|
<property name="uri">http://www.gtk.org</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -172,9 +156,6 @@
|
|||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
<signal name="clicked" handler="reshare_clicked" swapped="yes"/>
|
<signal name="clicked" handler="reshare_clicked" swapped="yes"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="favorite-buttton">
|
<object class="GtkButton" id="favorite-buttton">
|
||||||
@@ -184,9 +165,6 @@
|
|||||||
<property name="relief">none</property>
|
<property name="relief">none</property>
|
||||||
<signal name="clicked" handler="favorite_clicked" swapped="yes"/>
|
<signal name="clicked" handler="favorite_clicked" swapped="yes"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkMenuButton" id="more-button">
|
<object class="GtkMenuButton" id="more-button">
|
||||||
@@ -200,14 +178,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">3</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
@@ -250,14 +222,8 @@ FAVORITES</property>
|
|||||||
</child>
|
</child>
|
||||||
<child type="label_item"/>
|
<child type="label_item"/>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="box6">
|
<object class="GtkBox" id="box6">
|
||||||
@@ -279,14 +245,8 @@ FAVORITES</property>
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">2</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
@@ -42,24 +42,24 @@ activate_about (GSimpleAction *action,
|
|||||||
{
|
{
|
||||||
GtkApplication *app = user_data;
|
GtkApplication *app = user_data;
|
||||||
const gchar *authors[] = {
|
const gchar *authors[] = {
|
||||||
"The GTK+ Team",
|
"The GTK Team",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
|
gtk_show_about_dialog (GTK_WINDOW (gtk_application_get_active_window (app)),
|
||||||
"program-name", "GTK+ Demo",
|
"program-name", "GTK Demo",
|
||||||
"version", g_strdup_printf ("%s,\nRunning against GTK+ %d.%d.%d",
|
"version", g_strdup_printf ("%s,\nRunning against GTK %d.%d.%d",
|
||||||
PACKAGE_VERSION,
|
PACKAGE_VERSION,
|
||||||
gtk_get_major_version (),
|
gtk_get_major_version (),
|
||||||
gtk_get_minor_version (),
|
gtk_get_minor_version (),
|
||||||
gtk_get_micro_version ()),
|
gtk_get_micro_version ()),
|
||||||
"copyright", "(C) 1997-2013 The GTK+ Team",
|
"copyright", "(C) 1997-2013 The GTK Team",
|
||||||
"license-type", GTK_LICENSE_LGPL_2_1,
|
"license-type", GTK_LICENSE_LGPL_2_1,
|
||||||
"website", "http://www.gtk.org",
|
"website", "http://www.gtk.org",
|
||||||
"comments", "Program to demonstrate GTK+ widgets",
|
"comments", "Program to demonstrate GTK widgets",
|
||||||
"authors", authors,
|
"authors", authors,
|
||||||
"logo-icon-name", "gtk3-demo",
|
"logo-icon-name", "org.gtk.Demo",
|
||||||
"title", "About GTK+ Demo",
|
"title", "About GTK Demo",
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -667,10 +667,9 @@ add_data_tab (const gchar *demoname)
|
|||||||
label = gtk_label_new (resources[i]);
|
label = gtk_label_new (resources[i]);
|
||||||
gtk_widget_show (label);
|
gtk_widget_show (label);
|
||||||
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
|
gtk_notebook_append_page (GTK_NOTEBOOK (notebook), widget, label);
|
||||||
gtk_container_child_set (GTK_CONTAINER (notebook),
|
g_object_set (gtk_notebook_get_page (GTK_NOTEBOOK (notebook), widget),
|
||||||
widget,
|
"tab-expand", TRUE,
|
||||||
"tab-expand", TRUE,
|
NULL);
|
||||||
NULL);
|
|
||||||
|
|
||||||
g_free (resource_name);
|
g_free (resource_name);
|
||||||
}
|
}
|
||||||
|
@@ -1,25 +1,20 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.10 -->
|
|
||||||
<object class="GtkTreeStore" id="treestore">
|
<object class="GtkTreeStore" id="treestore">
|
||||||
<columns>
|
<columns>
|
||||||
<!-- column-name NAME -->
|
|
||||||
<column type="gchararray"/>
|
<column type="gchararray"/>
|
||||||
<!-- column-name TITLE -->
|
|
||||||
<column type="gchararray"/>
|
<column type="gchararray"/>
|
||||||
<!-- column-name FILENAME -->
|
|
||||||
<column type="gchararray"/>
|
<column type="gchararray"/>
|
||||||
<!-- column-name FUNC -->
|
|
||||||
<column type="gpointer"/>
|
<column type="gpointer"/>
|
||||||
<!-- column-name STYLE -->
|
|
||||||
<column type="gint"/>
|
<column type="gint"/>
|
||||||
</columns>
|
</columns>
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkApplicationWindow" id="window">
|
<object class="GtkApplicationWindow" id="window">
|
||||||
<style><class name="devel"/></style>
|
<style>
|
||||||
|
<class name="devel"/>
|
||||||
|
</style>
|
||||||
<property name="default-width">800</property>
|
<property name="default-width">800</property>
|
||||||
<property name="default-height">600</property>
|
<property name="default-height">600</property>
|
||||||
<property name="title">GTK+ Demo</property>
|
<property name="title">GTK Demo</property>
|
||||||
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
|
<signal name="destroy" handler="gtk_main_quit" swapped="no"/>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="headerbar">
|
<object class="GtkHeaderBar" id="headerbar">
|
||||||
@@ -91,70 +86,63 @@
|
|||||||
<property name="show-border">0</property>
|
<property name="show-border">0</property>
|
||||||
<property name="expand">1</property>
|
<property name="expand">1</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkScrolledWindow">
|
<object class="GtkNotebookPage">
|
||||||
<property name="can-focus">1</property>
|
<property name="tab-expand">1</property>
|
||||||
<child>
|
<property name="child">
|
||||||
<object class="GtkTextView" id="info-textview">
|
<object class="GtkScrolledWindow">
|
||||||
<property name="can-focus">1</property>
|
<property name="can-focus">1</property>
|
||||||
<property name="left-margin">20</property>
|
<child>
|
||||||
<property name="right-margin">20</property>
|
<object class="GtkTextView" id="info-textview">
|
||||||
<property name="top-margin">20</property>
|
<property name="can-focus">1</property>
|
||||||
<property name="bottom-margin">20</property>
|
<property name="left-margin">20</property>
|
||||||
<property name="pixels-above-lines">2</property>
|
<property name="right-margin">20</property>
|
||||||
<property name="pixels-below-lines">2</property>
|
<property name="top-margin">20</property>
|
||||||
<property name="editable">0</property>
|
<property name="bottom-margin">20</property>
|
||||||
<property name="wrap-mode">word</property>
|
<property name="pixels-above-lines">2</property>
|
||||||
<property name="cursor-visible">0</property>
|
<property name="pixels-below-lines">2</property>
|
||||||
|
<property name="editable">0</property>
|
||||||
|
<property name="wrap-mode">word</property>
|
||||||
|
<property name="cursor-visible">0</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</property>
|
||||||
|
<property name="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">_Info</property>
|
||||||
|
<property name="use-underline">1</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="tab-expand">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child type="tab">
|
|
||||||
<object class="GtkLabel">
|
|
||||||
<property name="label" translatable="yes">_Info</property>
|
|
||||||
<property name="use-underline">1</property>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="tab-expand">1</property>
|
|
||||||
<property name="tab-fill">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkScrolledWindow" id="source-scrolledwindow">
|
<object class="GtkNotebookPage">
|
||||||
<property name="can-focus">1</property>
|
|
||||||
<child>
|
|
||||||
<object class="GtkTextView" id="source-textview">
|
|
||||||
<property name="can-focus">1</property>
|
|
||||||
<property name="left-margin">20</property>
|
|
||||||
<property name="right-margin">20</property>
|
|
||||||
<property name="top-margin">20</property>
|
|
||||||
<property name="bottom-margin">20</property>
|
|
||||||
<property name="editable">0</property>
|
|
||||||
<property name="cursor-visible">0</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
</object>
|
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
<property name="position">1</property>
|
||||||
<property name="tab-expand">1</property>
|
<property name="tab-expand">1</property>
|
||||||
</packing>
|
<property name="child">
|
||||||
</child>
|
<object class="GtkScrolledWindow" id="source-scrolledwindow">
|
||||||
<child type="tab">
|
<property name="can-focus">1</property>
|
||||||
<object class="GtkLabel">
|
<child>
|
||||||
<property name="label" translatable="yes">Source</property>
|
<object class="GtkTextView" id="source-textview">
|
||||||
|
<property name="can-focus">1</property>
|
||||||
|
<property name="left-margin">20</property>
|
||||||
|
<property name="right-margin">20</property>
|
||||||
|
<property name="top-margin">20</property>
|
||||||
|
<property name="bottom-margin">20</property>
|
||||||
|
<property name="editable">0</property>
|
||||||
|
<property name="cursor-visible">0</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
<property name="tab">
|
||||||
|
<object class="GtkLabel">
|
||||||
|
<property name="label" translatable="yes">Source</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
<property name="tab-fill">0</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
@@ -115,7 +115,7 @@ do_menus (GtkWidget *do_widget)
|
|||||||
|
|
||||||
menubar = gtk_menu_bar_new ();
|
menubar = gtk_menu_bar_new ();
|
||||||
gtk_widget_set_hexpand (menubar, TRUE);
|
gtk_widget_set_hexpand (menubar, TRUE);
|
||||||
gtk_box_pack_start (GTK_BOX (box1), menubar);
|
gtk_container_add (GTK_CONTAINER (box1), menubar);
|
||||||
gtk_widget_show (menubar);
|
gtk_widget_show (menubar);
|
||||||
|
|
||||||
menu = create_menu (2);
|
menu = create_menu (2);
|
||||||
@@ -136,19 +136,19 @@ do_menus (GtkWidget *do_widget)
|
|||||||
gtk_widget_show (menuitem);
|
gtk_widget_show (menuitem);
|
||||||
|
|
||||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||||
gtk_box_pack_start (GTK_BOX (box1), box2);
|
gtk_container_add (GTK_CONTAINER (box1), box2);
|
||||||
gtk_widget_show (box2);
|
gtk_widget_show (box2);
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Flip");
|
button = gtk_button_new_with_label ("Flip");
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (change_orientation), menubar);
|
G_CALLBACK (change_orientation), menubar);
|
||||||
gtk_box_pack_start (GTK_BOX (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
|
||||||
button = gtk_button_new_with_label ("Close");
|
button = gtk_button_new_with_label ("Close");
|
||||||
g_signal_connect_swapped (button, "clicked",
|
g_signal_connect_swapped (button, "clicked",
|
||||||
G_CALLBACK(gtk_widget_destroy), window);
|
G_CALLBACK(gtk_widget_destroy), window);
|
||||||
gtk_box_pack_start (GTK_BOX (box2), button);
|
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||||
gtk_widget_set_can_default (button, TRUE);
|
gtk_widget_set_can_default (button, TRUE);
|
||||||
gtk_widget_grab_default (button);
|
gtk_widget_grab_default (button);
|
||||||
gtk_widget_show (button);
|
gtk_widget_show (button);
|
||||||
|
@@ -1,4 +1,3 @@
|
|||||||
<?xml version="1.0"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<menu id="appmenu">
|
<menu id="appmenu">
|
||||||
<section>
|
<section>
|
||||||
|
@@ -4,7 +4,6 @@ demos = files([
|
|||||||
'application_demo.c',
|
'application_demo.c',
|
||||||
'assistant.c',
|
'assistant.c',
|
||||||
'builder.c',
|
'builder.c',
|
||||||
'button_box.c',
|
|
||||||
'changedisplay.c',
|
'changedisplay.c',
|
||||||
'clipboard.c',
|
'clipboard.c',
|
||||||
'colorsel.c',
|
'colorsel.c',
|
||||||
@@ -48,6 +47,7 @@ demos = files([
|
|||||||
'paintable_animated.c',
|
'paintable_animated.c',
|
||||||
'paintable_mediastream.c',
|
'paintable_mediastream.c',
|
||||||
'panes.c',
|
'panes.c',
|
||||||
|
'password_entry.c',
|
||||||
'pickers.c',
|
'pickers.c',
|
||||||
'pixbufs.c',
|
'pixbufs.c',
|
||||||
'popover.c',
|
'popover.c',
|
||||||
@@ -76,7 +76,7 @@ demos = files([
|
|||||||
|
|
||||||
gtkdemo_deps = [ libgtk_dep, ]
|
gtkdemo_deps = [ libgtk_dep, ]
|
||||||
|
|
||||||
extra_demo_sources = files(['main.c', 'gtkfishbowl.c', 'fontplane.c', 'gtkgears.c', 'puzzlepiece.c'])
|
extra_demo_sources = files(['main.c', 'gtkfishbowl.c', 'fontplane.c', 'gtkgears.c', 'puzzlepiece.c', 'bluroverlay.c'])
|
||||||
|
|
||||||
if harfbuzz_dep.found() and pangoft_dep.found()
|
if harfbuzz_dep.found() and pangoft_dep.found()
|
||||||
demos += files('font_features.c')
|
demos += files('font_features.c')
|
||||||
@@ -100,7 +100,7 @@ gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
|
|||||||
source_dir: '.')
|
source_dir: '.')
|
||||||
|
|
||||||
executable('gtk4-demo',
|
executable('gtk4-demo',
|
||||||
demos, demos_h, extra_demo_sources, gtkdemo_resources,
|
demos, demos_h, extra_demo_sources, gtkdemo_resources,
|
||||||
c_args: gtkdemo_args,
|
c_args: gtkdemo_args,
|
||||||
dependencies: gtkdemo_deps,
|
dependencies: gtkdemo_deps,
|
||||||
include_directories: confinc,
|
include_directories: confinc,
|
||||||
@@ -120,12 +120,10 @@ executable('gtk4-demo-application',
|
|||||||
# icons
|
# icons
|
||||||
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||||
|
|
||||||
foreach icon_size: [ '16x16', '22x22', '24x24', '32x32', '48x48', '256x256', ]
|
foreach size: ['scalable', 'symbolic']
|
||||||
gtk_demo_icons_dir = join_paths(icontheme_dir, '@0@/apps'.format(icon_size))
|
install_subdir('data/' + size,
|
||||||
install_data('data/@0@/gtk4-demo.png'.format(icon_size),
|
install_dir: icontheme_dir
|
||||||
install_dir: gtk_demo_icons_dir)
|
)
|
||||||
install_data('data/@0@/gtk4-demo-symbolic.symbolic.png'.format(icon_size),
|
|
||||||
install_dir: gtk_demo_icons_dir)
|
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
# desktop file
|
# desktop file
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.6 -->
|
|
||||||
<object class="GtkWindow" id="window1">
|
<object class="GtkWindow" id="window1">
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar">
|
<object class="GtkHeaderBar">
|
||||||
@@ -56,7 +54,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
<property name="action-name">win.color</property>
|
<property name="action-name">win.color</property>
|
||||||
<property name="action-target">'red'</property>
|
<property name="action-target">'red'</property>
|
||||||
<property name="text">Red</property>
|
<property name="text">Red</property>
|
||||||
<property name="inverted">1</property>
|
<property name="inverted">1</property>
|
||||||
</object>
|
</object>
|
||||||
@@ -64,7 +62,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
<property name="action-name">win.color</property>
|
<property name="action-name">win.color</property>
|
||||||
<property name="action-target">'green'</property>
|
<property name="action-target">'green'</property>
|
||||||
<property name="text">Green</property>
|
<property name="text">Green</property>
|
||||||
<property name="inverted">1</property>
|
<property name="inverted">1</property>
|
||||||
</object>
|
</object>
|
||||||
@@ -72,7 +70,7 @@
|
|||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
<property name="action-name">win.color</property>
|
<property name="action-name">win.color</property>
|
||||||
<property name="action-target">'blue'</property>
|
<property name="action-target">'blue'</property>
|
||||||
<property name="text">Blue</property>
|
<property name="text">Blue</property>
|
||||||
<property name="inverted">1</property>
|
<property name="inverted">1</property>
|
||||||
</object>
|
</object>
|
||||||
@@ -99,8 +97,7 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkSeparator">
|
<object class="GtkSeparator"/>
|
||||||
</object>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkModelButton">
|
<object class="GtkModelButton">
|
||||||
|
@@ -3,12 +3,12 @@
|
|||||||
<id>org.gtk.Demo.desktop</id>
|
<id>org.gtk.Demo.desktop</id>
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>LGPL-2.0+</project_license>
|
<project_license>LGPL-2.0+</project_license>
|
||||||
<name>GTK+ Demo</name>
|
<name>GTK Demo</name>
|
||||||
<summary>Program to demonstrate GTK+ functions</summary>
|
<summary>Program to demonstrate GTK functions</summary>
|
||||||
<description>
|
<description>
|
||||||
<p>
|
<p>
|
||||||
GTK+ Demo is a collection of examples that demonstrate the major
|
GTK Demo is a collection of examples that demonstrate the major
|
||||||
features of the GTK+ toolkit.
|
features of the GTK toolkit.
|
||||||
</p>
|
</p>
|
||||||
</description>
|
</description>
|
||||||
<screenshots>
|
<screenshots>
|
||||||
@@ -30,4 +30,4 @@
|
|||||||
<translation type="gettext">gtk-4.0</translation>
|
<translation type="gettext">gtk-4.0</translation>
|
||||||
<update_contact>matthias.clasen_at_gmail.com</update_contact>
|
<update_contact>matthias.clasen_at_gmail.com</update_contact>
|
||||||
<developer_name>Matthias Clasen and others</developer_name>
|
<developer_name>Matthias Clasen and others</developer_name>
|
||||||
</component>
|
</component>
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Name=GTK+ Demo
|
Name=GTK Demo
|
||||||
Comment=GTK+ code examples and demonstrations
|
Comment=GTK code examples and demonstrations
|
||||||
Exec=gtk4-demo
|
Exec=gtk4-demo
|
||||||
Icon=gtk4-demo
|
Icon=org.gtk.Demo
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
static void
|
static void
|
||||||
do_number (GtkButton *button, GtkEntry *entry)
|
do_number (GtkButton *button, GtkEntry *entry)
|
||||||
{
|
{
|
||||||
gtk_entry_set_text (entry, gtk_button_get_label (button));
|
gtk_editable_set_text (GTK_EDITABLE (entry), gtk_button_get_label (button));
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@@ -57,7 +57,7 @@ do_overlay (GtkWidget *do_widget)
|
|||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (overlay), vbox, TRUE);
|
gtk_widget_set_can_pick (vbox, FALSE);
|
||||||
gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
|
||||||
gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
|
gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
|
||||||
|
|
||||||
@@ -65,7 +65,7 @@ do_overlay (GtkWidget *do_widget)
|
|||||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||||
gtk_widget_set_margin_top (label, 8);
|
gtk_widget_set_margin_top (label, 8);
|
||||||
gtk_widget_set_margin_bottom (label, 50);
|
gtk_widget_set_margin_bottom (label, 50);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||||
@@ -74,7 +74,7 @@ do_overlay (GtkWidget *do_widget)
|
|||||||
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "Your Lucky Number");
|
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "Your Lucky Number");
|
||||||
gtk_widget_set_margin_top (entry, 50);
|
gtk_widget_set_margin_top (entry, 50);
|
||||||
gtk_widget_set_margin_bottom (entry, 8);
|
gtk_widget_set_margin_bottom (entry, 8);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), entry);
|
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||||
|
|
||||||
gtk_container_add (GTK_CONTAINER (window), overlay);
|
gtk_container_add (GTK_CONTAINER (window), overlay);
|
||||||
|
|
||||||
|
@@ -64,15 +64,15 @@ do_overlay2 (GtkWidget *do_widget)
|
|||||||
g_signal_connect (window, "destroy",
|
g_signal_connect (window, "destroy",
|
||||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||||
|
|
||||||
image = gtk_image_new_from_resource ("/overlay2/decor1.png");
|
image = gtk_picture_new_for_resource ("/overlay2/decor1.png");
|
||||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
|
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
|
||||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (overlay), image, TRUE);
|
gtk_widget_set_can_pick (image, FALSE);
|
||||||
gtk_widget_set_halign (image, GTK_ALIGN_START);
|
gtk_widget_set_halign (image, GTK_ALIGN_START);
|
||||||
gtk_widget_set_valign (image, GTK_ALIGN_START);
|
gtk_widget_set_valign (image, GTK_ALIGN_START);
|
||||||
|
|
||||||
image = gtk_image_new_from_resource ("/overlay2/decor2.png");
|
image = gtk_picture_new_for_resource ("/overlay2/decor2.png");
|
||||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
|
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), image);
|
||||||
gtk_overlay_set_overlay_pass_through (GTK_OVERLAY (overlay), image, TRUE);
|
gtk_widget_set_can_pick (image, FALSE);
|
||||||
gtk_widget_set_halign (image, GTK_ALIGN_END);
|
gtk_widget_set_halign (image, GTK_ALIGN_END);
|
||||||
gtk_widget_set_valign (image, GTK_ALIGN_END);
|
gtk_widget_set_valign (image, GTK_ALIGN_END);
|
||||||
|
|
||||||
|
@@ -171,8 +171,24 @@ on_pad_knob_change (GSimpleAction *action,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
drawing_area_hierarchy_changed (GtkWidget *widget,
|
drawing_area_unroot (GtkWidget *widget)
|
||||||
GtkWidget *previous_toplevel)
|
{
|
||||||
|
DrawingArea *area = (DrawingArea *) widget;
|
||||||
|
GtkWidget *toplevel;
|
||||||
|
|
||||||
|
toplevel = gtk_widget_get_toplevel (widget);
|
||||||
|
|
||||||
|
if (area->pad_controller)
|
||||||
|
{
|
||||||
|
gtk_widget_remove_controller (toplevel, GTK_EVENT_CONTROLLER (area->pad_controller));
|
||||||
|
area->pad_controller = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
GTK_WIDGET_CLASS (drawing_area_parent_class)->unroot (widget);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
drawing_area_root (GtkWidget *widget)
|
||||||
{
|
{
|
||||||
DrawingArea *area = (DrawingArea *) widget;
|
DrawingArea *area = (DrawingArea *) widget;
|
||||||
GSimpleActionGroup *action_group;
|
GSimpleActionGroup *action_group;
|
||||||
@@ -180,20 +196,12 @@ drawing_area_hierarchy_changed (GtkWidget *widget,
|
|||||||
GtkWidget *toplevel;
|
GtkWidget *toplevel;
|
||||||
gint i;
|
gint i;
|
||||||
|
|
||||||
if (previous_toplevel && area->pad_controller)
|
GTK_WIDGET_CLASS (drawing_area_parent_class)->root (widget);
|
||||||
{
|
|
||||||
gtk_widget_remove_controller (previous_toplevel,
|
|
||||||
GTK_EVENT_CONTROLLER (area->pad_controller));
|
|
||||||
area->pad_controller = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (area));
|
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (area));
|
||||||
if (!GTK_IS_WINDOW (toplevel))
|
|
||||||
return;
|
|
||||||
|
|
||||||
action_group = g_simple_action_group_new ();
|
action_group = g_simple_action_group_new ();
|
||||||
area->pad_controller = gtk_pad_controller_new (G_ACTION_GROUP (action_group),
|
area->pad_controller = gtk_pad_controller_new (G_ACTION_GROUP (action_group), NULL);
|
||||||
NULL);
|
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (pad_actions); i++)
|
for (i = 0; i < G_N_ELEMENTS (pad_actions); i++)
|
||||||
{
|
{
|
||||||
@@ -220,8 +228,7 @@ drawing_area_hierarchy_changed (GtkWidget *widget,
|
|||||||
gtk_pad_controller_set_action_entries (area->pad_controller, pad_actions,
|
gtk_pad_controller_set_action_entries (area->pad_controller, pad_actions,
|
||||||
G_N_ELEMENTS (pad_actions));
|
G_N_ELEMENTS (pad_actions));
|
||||||
|
|
||||||
gtk_widget_add_controller (toplevel,
|
gtk_widget_add_controller (toplevel, GTK_EVENT_CONTROLLER (area->pad_controller));
|
||||||
GTK_EVENT_CONTROLLER (area->pad_controller));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -233,7 +240,8 @@ drawing_area_class_init (DrawingAreaClass *klass)
|
|||||||
widget_class->snapshot = drawing_area_snapshot;
|
widget_class->snapshot = drawing_area_snapshot;
|
||||||
widget_class->map = drawing_area_map;
|
widget_class->map = drawing_area_map;
|
||||||
widget_class->unmap = drawing_area_unmap;
|
widget_class->unmap = drawing_area_unmap;
|
||||||
widget_class->hierarchy_changed = drawing_area_hierarchy_changed;
|
widget_class->root = drawing_area_root;
|
||||||
|
widget_class->unroot = drawing_area_unroot;
|
||||||
|
|
||||||
area_signals[COLOR_SET] =
|
area_signals[COLOR_SET] =
|
||||||
g_signal_new ("color-set",
|
g_signal_new ("color-set",
|
||||||
|
@@ -148,7 +148,7 @@ do_panes (GtkWidget *do_widget)
|
|||||||
|
|
||||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||||
g_object_set (vpaned, "margin", 5, NULL);
|
g_object_set (vpaned, "margin", 5, NULL);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), vpaned);
|
gtk_container_add (GTK_CONTAINER (vbox), vpaned);
|
||||||
|
|
||||||
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
|
gtk_paned_add1 (GTK_PANED (vpaned), hpaned);
|
||||||
@@ -173,13 +173,13 @@ do_panes (GtkWidget *do_widget)
|
|||||||
|
|
||||||
/* Now create toggle buttons to control sizing */
|
/* Now create toggle buttons to control sizing */
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_container_add (GTK_CONTAINER (vbox),
|
||||||
create_pane_options (GTK_PANED (hpaned),
|
create_pane_options (GTK_PANED (hpaned),
|
||||||
"Horizontal",
|
"Horizontal",
|
||||||
"Left",
|
"Left",
|
||||||
"Right"));
|
"Right"));
|
||||||
|
|
||||||
gtk_box_pack_start (GTK_BOX (vbox),
|
gtk_container_add (GTK_CONTAINER (vbox),
|
||||||
create_pane_options (GTK_PANED (vpaned),
|
create_pane_options (GTK_PANED (vpaned),
|
||||||
"Vertical",
|
"Vertical",
|
||||||
"Top",
|
"Top",
|
||||||
|
104
demos/gtk-demo/password_entry.c
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
/* Entry/Password Entry
|
||||||
|
*
|
||||||
|
* GtkPasswordEntry provides common functionality of
|
||||||
|
* entries that are used to enter passwords and other
|
||||||
|
* secrets.
|
||||||
|
*
|
||||||
|
* It will display a warning if CapsLock is on, and it
|
||||||
|
* can optionally provide a way to see the text.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <glib/gi18n.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
|
static GtkWidget *entry;
|
||||||
|
static GtkWidget *entry2;
|
||||||
|
static GtkWidget *button;
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_button (GObject *object,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
const char *text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||||
|
const char *text2 = gtk_editable_get_text (GTK_EDITABLE (entry2));
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive (button,
|
||||||
|
text[0] != '\0' && g_str_equal (text, text2));
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
get_strength (GtkPasswordEntry *entry)
|
||||||
|
{
|
||||||
|
const char *text;
|
||||||
|
int strength;
|
||||||
|
|
||||||
|
text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||||
|
|
||||||
|
strength = CLAMP (10 * strlen (text), 0, 100);
|
||||||
|
|
||||||
|
return strength;
|
||||||
|
}
|
||||||
|
|
||||||
|
GtkWidget *
|
||||||
|
do_password_entry (GtkWidget *do_widget)
|
||||||
|
{
|
||||||
|
static GtkWidget *window = NULL;
|
||||||
|
GtkWidget *box;
|
||||||
|
GtkWidget *header;
|
||||||
|
|
||||||
|
if (!window)
|
||||||
|
{
|
||||||
|
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
|
||||||
|
gtk_window_set_display (GTK_WINDOW (window),
|
||||||
|
gtk_widget_get_display (do_widget));
|
||||||
|
header = gtk_header_bar_new ();
|
||||||
|
gtk_header_bar_set_title (GTK_HEADER_BAR (header), "Choose a Password");
|
||||||
|
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), FALSE);
|
||||||
|
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||||
|
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||||
|
gtk_window_set_deletable (GTK_WINDOW (window), FALSE);
|
||||||
|
g_signal_connect (window, "destroy",
|
||||||
|
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||||
|
|
||||||
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||||
|
g_object_set (box, "margin", 18, NULL);
|
||||||
|
gtk_container_add (GTK_CONTAINER (window), box);
|
||||||
|
|
||||||
|
entry = gtk_password_entry_new ();
|
||||||
|
gtk_password_entry_set_show_peek_icon (GTK_PASSWORD_ENTRY (entry), TRUE);
|
||||||
|
g_object_set (entry,
|
||||||
|
"placeholder-text", "Password",
|
||||||
|
"activates-default", TRUE,
|
||||||
|
NULL);
|
||||||
|
g_signal_connect (entry, "notify::text", G_CALLBACK (update_button), NULL);
|
||||||
|
gtk_password_entry_set_show_strength (GTK_PASSWORD_ENTRY (entry), TRUE);
|
||||||
|
g_signal_connect (entry, "get-strength", G_CALLBACK (get_strength), NULL);
|
||||||
|
gtk_container_add (GTK_CONTAINER (box), entry);
|
||||||
|
|
||||||
|
entry2 = gtk_password_entry_new ();
|
||||||
|
gtk_password_entry_set_show_peek_icon (GTK_PASSWORD_ENTRY (entry2), TRUE);
|
||||||
|
g_object_set (entry2,
|
||||||
|
"placeholder-text", "Confirm",
|
||||||
|
"activates-default", TRUE,
|
||||||
|
NULL);
|
||||||
|
g_signal_connect (entry2, "notify::text", G_CALLBACK (update_button), NULL);
|
||||||
|
gtk_container_add (GTK_CONTAINER (box), entry2);
|
||||||
|
|
||||||
|
button = gtk_button_new_with_mnemonic ("_Done");
|
||||||
|
gtk_style_context_add_class (gtk_widget_get_style_context (button), "suggested-action");
|
||||||
|
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
||||||
|
gtk_widget_set_sensitive (button, FALSE);
|
||||||
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||||
|
|
||||||
|
gtk_widget_set_can_default (button, TRUE);
|
||||||
|
gtk_window_set_default (GTK_WINDOW (window), button);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!gtk_widget_get_visible (window))
|
||||||
|
gtk_widget_show (window);
|
||||||
|
else
|
||||||
|
gtk_widget_destroy (window);
|
||||||
|
|
||||||
|
return window;
|
||||||
|
}
|
@@ -1,10 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!-- Generated with glade 3.16.0 on Wed Nov 13 16:45:55 2013 -->
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.10 -->
|
|
||||||
<object class="GtkListStore" id="liststore1">
|
<object class="GtkListStore" id="liststore1">
|
||||||
<columns>
|
<columns>
|
||||||
<!-- column-name Name -->
|
|
||||||
<column type="gchararray"/>
|
<column type="gchararray"/>
|
||||||
</columns>
|
</columns>
|
||||||
<data>
|
<data>
|
||||||
@@ -81,9 +77,6 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
|
||||||
<property name="position">1</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
@@ -47,9 +47,11 @@ gtk_puzzle_piece_snapshot (GdkPaintable *paintable,
|
|||||||
gtk_snapshot_push_clip (snapshot,
|
gtk_snapshot_push_clip (snapshot,
|
||||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||||
|
|
||||||
gtk_snapshot_offset (snapshot,
|
gtk_snapshot_translate (snapshot,
|
||||||
- width * self->x,
|
&GRAPHENE_POINT_INIT (
|
||||||
- height * self->y);
|
- width * self->x,
|
||||||
|
- height * self->y
|
||||||
|
));
|
||||||
gdk_paintable_snapshot (self->puzzle,
|
gdk_paintable_snapshot (self->puzzle,
|
||||||
snapshot,
|
snapshot,
|
||||||
width * self->width,
|
width * self->width,
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.6 -->
|
|
||||||
<object class="GtkWindow" id="window">
|
<object class="GtkWindow" id="window">
|
||||||
<property name="default-width">300</property>
|
<property name="default-width">300</property>
|
||||||
<property name="default-height">300</property>
|
<property name="default-height">300</property>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define HEART "♥"
|
#define HEART "♥"
|
||||||
const char text[] = "I ♥ GTK+";
|
const char text[] = "I ♥ GTK";
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fancy_shape_renderer (cairo_t *cr,
|
fancy_shape_renderer (cairo_t *cr,
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.6 -->
|
|
||||||
<object class="GtkAdjustment" id="adjustment1">
|
<object class="GtkAdjustment" id="adjustment1">
|
||||||
<property name="upper">4</property>
|
<property name="upper">4</property>
|
||||||
<property name="value">2</property>
|
<property name="value">2</property>
|
||||||
@@ -76,11 +74,11 @@
|
|||||||
<property name="adjustment">adjustment2</property>
|
<property name="adjustment">adjustment2</property>
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<marks>
|
<marks>
|
||||||
<mark value="0" position="bottom"></mark>
|
<mark value="0" position="bottom"/>
|
||||||
<mark value="1" position="bottom"></mark>
|
<mark value="1" position="bottom"/>
|
||||||
<mark value="2" position="bottom"></mark>
|
<mark value="2" position="bottom"/>
|
||||||
<mark value="3" position="bottom"></mark>
|
<mark value="3" position="bottom"/>
|
||||||
<mark value="4" position="bottom"></mark>
|
<mark value="4" position="bottom"/>
|
||||||
</marks>
|
</marks>
|
||||||
<accessibility>
|
<accessibility>
|
||||||
<relation type="labelled-by" target="label_marks"/>
|
<relation type="labelled-by" target="label_marks"/>
|
||||||
@@ -116,11 +114,11 @@
|
|||||||
<relation type="labelled-by" target="label_discrete"/>
|
<relation type="labelled-by" target="label_discrete"/>
|
||||||
</accessibility>
|
</accessibility>
|
||||||
<marks>
|
<marks>
|
||||||
<mark value="0" position="bottom"></mark>
|
<mark value="0" position="bottom"/>
|
||||||
<mark value="1" position="bottom"></mark>
|
<mark value="1" position="bottom"/>
|
||||||
<mark value="2" position="bottom"></mark>
|
<mark value="2" position="bottom"/>
|
||||||
<mark value="3" position="bottom"></mark>
|
<mark value="3" position="bottom"/>
|
||||||
<mark value="4" position="bottom"></mark>
|
<mark value="4" position="bottom"/>
|
||||||
</marks>
|
</marks>
|
||||||
</object>
|
</object>
|
||||||
<packing>
|
<packing>
|
||||||
|
@@ -85,7 +85,7 @@ stop_search (GtkButton *button,
|
|||||||
static void
|
static void
|
||||||
clear_entry (GtkEntry *entry)
|
clear_entry (GtkEntry *entry)
|
||||||
{
|
{
|
||||||
gtk_entry_set_text (entry, "");
|
gtk_editable_set_text (GTK_EDITABLE (entry), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -240,20 +240,23 @@ do_search_entry (GtkWidget *do_widget)
|
|||||||
|
|
||||||
label = gtk_label_new (NULL);
|
label = gtk_label_new (NULL);
|
||||||
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
|
gtk_label_set_markup (GTK_LABEL (label), "Search entry demo");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
|
|
||||||
/* Create our entry */
|
/* Create our entry */
|
||||||
entry = gtk_search_entry_new ();
|
entry = gtk_entry_new ();
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), entry);
|
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
|
||||||
|
GTK_ENTRY_ICON_PRIMARY,
|
||||||
|
"edit-find-symbolic");
|
||||||
|
gtk_container_add (GTK_CONTAINER (hbox), entry);
|
||||||
|
|
||||||
/* Create the find and cancel buttons */
|
/* Create the find and cancel buttons */
|
||||||
notebook = gtk_notebook_new ();
|
notebook = gtk_notebook_new ();
|
||||||
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
|
gtk_notebook_set_show_tabs (GTK_NOTEBOOK (notebook), FALSE);
|
||||||
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
|
gtk_notebook_set_show_border (GTK_NOTEBOOK (notebook), FALSE);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), notebook);
|
gtk_container_add (GTK_CONTAINER (hbox), notebook);
|
||||||
|
|
||||||
find_button = gtk_button_new_with_label ("Find");
|
find_button = gtk_button_new_with_label ("Find");
|
||||||
g_signal_connect (find_button, "clicked",
|
g_signal_connect (find_button, "clicked",
|
||||||
|
@@ -13,7 +13,7 @@ search_changed_cb (GtkSearchEntry *entry,
|
|||||||
GtkLabel *result_label)
|
GtkLabel *result_label)
|
||||||
{
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (entry));
|
text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||||
g_message ("search changed: %s", text);
|
g_message ("search changed: %s", text);
|
||||||
gtk_label_set_text (result_label, text ? text : "");
|
gtk_label_set_text (result_label, text ? text : "");
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ static void
|
|||||||
changed_cb (GtkEditable *editable)
|
changed_cb (GtkEditable *editable)
|
||||||
{
|
{
|
||||||
const char *text;
|
const char *text;
|
||||||
text = gtk_entry_get_text (GTK_ENTRY (editable));
|
text = gtk_editable_get_text (GTK_EDITABLE (editable));
|
||||||
g_message ("changed: %s", text);
|
g_message ("changed: %s", text);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,38 +83,38 @@ do_search_entry2 (GtkWidget *do_widget)
|
|||||||
entry = gtk_search_entry_new ();
|
entry = gtk_search_entry_new ();
|
||||||
container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
gtk_widget_set_halign (container, GTK_ALIGN_CENTER);
|
gtk_widget_set_halign (container, GTK_ALIGN_CENTER);
|
||||||
gtk_box_pack_start (GTK_BOX (container), entry);
|
gtk_container_add (GTK_CONTAINER (container), entry);
|
||||||
searchbar = gtk_search_bar_new ();
|
searchbar = gtk_search_bar_new ();
|
||||||
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (searchbar), GTK_ENTRY (entry));
|
gtk_search_bar_connect_entry (GTK_SEARCH_BAR (searchbar), GTK_EDITABLE (entry));
|
||||||
gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (searchbar), FALSE);
|
gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (searchbar), FALSE);
|
||||||
gtk_container_add (GTK_CONTAINER (searchbar), container);
|
gtk_container_add (GTK_CONTAINER (searchbar), container);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), searchbar);
|
gtk_container_add (GTK_CONTAINER (vbox), searchbar);
|
||||||
|
|
||||||
/* Hook the search bar to key presses */
|
/* Hook the search bar to key presses */
|
||||||
gtk_search_bar_set_key_capture_widget (GTK_SEARCH_BAR (searchbar), window);
|
gtk_search_bar_set_key_capture_widget (GTK_SEARCH_BAR (searchbar), window);
|
||||||
|
|
||||||
/* Help */
|
/* Help */
|
||||||
label = gtk_label_new ("Start Typing to search");
|
label = gtk_label_new ("Start Typing to search");
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), label);
|
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||||
|
|
||||||
/* Toggle button */
|
/* Toggle button */
|
||||||
button = gtk_toggle_button_new_with_label ("Search");
|
button = gtk_toggle_button_new_with_label ("Search");
|
||||||
g_object_bind_property (button, "active",
|
g_object_bind_property (button, "active",
|
||||||
searchbar, "search-mode-enabled",
|
searchbar, "search-mode-enabled",
|
||||||
G_BINDING_BIDIRECTIONAL);
|
G_BINDING_BIDIRECTIONAL);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), button);
|
gtk_container_add (GTK_CONTAINER (vbox), button);
|
||||||
|
|
||||||
/* Result */
|
/* Result */
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
|
|
||||||
label = gtk_label_new ("Result:");
|
label = gtk_label_new ("Result:");
|
||||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||||
gtk_widget_set_margin_start (label, 6);
|
gtk_widget_set_margin_start (label, 6);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label);
|
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||||
|
|
||||||
label = gtk_label_new ("");
|
label = gtk_label_new ("");
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label);
|
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||||
|
|
||||||
g_signal_connect (entry, "search-changed",
|
g_signal_connect (entry, "search-changed",
|
||||||
G_CALLBACK (search_changed_cb), label);
|
G_CALLBACK (search_changed_cb), label);
|
||||||
@@ -122,15 +122,15 @@ do_search_entry2 (GtkWidget *do_widget)
|
|||||||
G_CALLBACK (changed_cb), label);
|
G_CALLBACK (changed_cb), label);
|
||||||
|
|
||||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
gtk_box_pack_start (GTK_BOX (vbox), hbox);
|
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||||
|
|
||||||
label = gtk_label_new ("Signal:");
|
label = gtk_label_new ("Signal:");
|
||||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||||
gtk_widget_set_margin_start (label, 6);
|
gtk_widget_set_margin_start (label, 6);
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label);
|
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||||
|
|
||||||
label = gtk_label_new ("");
|
label = gtk_label_new ("");
|
||||||
gtk_box_pack_start (GTK_BOX (hbox), label);
|
gtk_container_add (GTK_CONTAINER (hbox), label);
|
||||||
|
|
||||||
g_signal_connect (entry, "search-changed",
|
g_signal_connect (entry, "search-changed",
|
||||||
G_CALLBACK (search_changed), label);
|
G_CALLBACK (search_changed), label);
|
||||||
|
@@ -1,13 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.17 -->
|
|
||||||
<object class="GtkShortcutsWindow" id="shortcuts-boxes">
|
<object class="GtkShortcutsWindow" id="shortcuts-boxes">
|
||||||
<property name="modal">1</property>
|
<property name="modal">1</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsSection">
|
<object class="GtkShortcutsSection">
|
||||||
<property name="section-name">shortcuts</property>
|
<property name="section-name">shortcuts</property>
|
||||||
<property name="max-height">12</property>
|
<property name="max-height">12</property>
|
||||||
<!-- Overview shortcuts -->
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsGroup">
|
<object class="GtkShortcutsGroup">
|
||||||
<property name="title" translatable="yes">Overview</property>
|
<property name="title" translatable="yes">Overview</property>
|
||||||
@@ -44,12 +41,10 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<!-- Wizard and Properties shortcuts -->
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsGroup">
|
<object class="GtkShortcutsGroup">
|
||||||
<property name="title" translatable="yes">Box Creation and Properties</property>
|
<property name="title" translatable="yes">Box Creation and Properties</property>
|
||||||
<property name="view">wizard</property>
|
<property name="view">wizard</property>
|
||||||
<!-- LTR -->
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut">
|
<object class="GtkShortcutsShortcut">
|
||||||
<property name="direction">ltr</property>
|
<property name="direction">ltr</property>
|
||||||
@@ -64,7 +59,6 @@
|
|||||||
<property name="title" translatable="yes">Switch to the previous page</property>
|
<property name="title" translatable="yes">Switch to the previous page</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<!-- RTL -->
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut">
|
<object class="GtkShortcutsShortcut">
|
||||||
<property name="direction">rtl</property>
|
<property name="direction">rtl</property>
|
||||||
@@ -81,7 +75,6 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<!-- Display shortcuts -->
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsGroup">
|
<object class="GtkShortcutsGroup">
|
||||||
<property name="title" translatable="yes">Box Display</property>
|
<property name="title" translatable="yes">Box Display</property>
|
||||||
@@ -92,7 +85,6 @@
|
|||||||
<property name="title" translatable="yes">Grab/Ungrab keyboard</property>
|
<property name="title" translatable="yes">Grab/Ungrab keyboard</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<!-- LTR -->
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut">
|
<object class="GtkShortcutsShortcut">
|
||||||
<property name="direction">ltr</property>
|
<property name="direction">ltr</property>
|
||||||
@@ -100,7 +92,6 @@
|
|||||||
<property name="title" translatable="yes">Back to overview</property>
|
<property name="title" translatable="yes">Back to overview</property>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<!-- RTL -->
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkShortcutsShortcut">
|
<object class="GtkShortcutsShortcut">
|
||||||
<property name="direction">rtl</property>
|
<property name="direction">rtl</property>
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<interface>
|
<interface>
|
||||||
<!-- interface-requires gtk+ 3.17 -->
|
|
||||||
<object class="GtkShortcutsWindow" id="shortcuts-builder">
|
<object class="GtkShortcutsWindow" id="shortcuts-builder">
|
||||||
<property name="modal">1</property>
|
<property name="modal">1</property>
|
||||||
<child>
|
<child>
|
||||||
|