Compare commits
1023 Commits
wip/matthi
...
resizing-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0935a50bf5 | ||
|
|
19d60d7234 | ||
|
|
f2c148c42d | ||
|
|
5af0e93de0 | ||
|
|
e21a7d70f1 | ||
|
|
bc05b0bba5 | ||
|
|
ece755ff62 | ||
|
|
8c1a99214f | ||
|
|
8ce83d03af | ||
|
|
29c83ef0b9 | ||
|
|
7def3bf542 | ||
|
|
6d855c307b | ||
|
|
baf05d816a | ||
|
|
490bfce319 | ||
|
|
a27fef3a27 | ||
|
|
294d45f0c7 | ||
|
|
1d068da0c9 | ||
|
|
109c48a082 | ||
|
|
21e730003a | ||
|
|
55b77278f2 | ||
|
|
b62802b52f | ||
|
|
2ba9c35195 | ||
|
|
bbb8c04323 | ||
|
|
89a15f6d03 | ||
|
|
16a7197586 | ||
|
|
4f5e3b7b0d | ||
|
|
d1d269ea6b | ||
|
|
3d807f4b00 | ||
|
|
9654fff6e0 | ||
|
|
8a67899e0f | ||
|
|
bb30a23004 | ||
|
|
3faa7feb7c | ||
|
|
d099276b89 | ||
|
|
56afa05b97 | ||
|
|
c6fdfeae7e | ||
|
|
8725fd308b | ||
|
|
c40e23bde6 | ||
|
|
afcb9c0e63 | ||
|
|
fd1033f974 | ||
|
|
16505a4d1e | ||
|
|
a1ec68422f | ||
|
|
f8060b859d | ||
|
|
0c0ced1374 | ||
|
|
bfd8c5383f | ||
|
|
4d88e3af17 | ||
|
|
b694771728 | ||
|
|
51d6ec5131 | ||
|
|
7625ccd6fa | ||
|
|
95e2a2b4b3 | ||
|
|
4e774eddb9 | ||
|
|
35325ea11a | ||
|
|
5673310364 | ||
|
|
2d72ba21ce | ||
|
|
e0786a4a00 | ||
|
|
0b21883518 | ||
|
|
1ccab92813 | ||
|
|
f6d9e15c16 | ||
|
|
cd0b9a2359 | ||
|
|
96500816bc | ||
|
|
9d60047616 | ||
|
|
a95012caa3 | ||
|
|
51d55e4fbc | ||
|
|
05255bfc90 | ||
|
|
41ef2c5f34 | ||
|
|
4dfd413e0b | ||
|
|
6724d4250f | ||
|
|
8cd2f615ad | ||
|
|
517a34bdc8 | ||
|
|
658719a205 | ||
|
|
c27f811462 | ||
|
|
3590923c8b | ||
|
|
1b7004ffc7 | ||
|
|
85c713127e | ||
|
|
87a8fda163 | ||
|
|
79e6269058 | ||
|
|
6cf04c505f | ||
|
|
14900efe38 | ||
|
|
04c3c659f5 | ||
|
|
8557aaf327 | ||
|
|
052962a760 | ||
|
|
278fbcbbb4 | ||
|
|
26542778f7 | ||
|
|
a712ffa2ab | ||
|
|
12450cfcef | ||
|
|
71373ff6fb | ||
|
|
1fa9261fe3 | ||
|
|
c212dd4ec0 | ||
|
|
2ae1f40da2 | ||
|
|
0c82aa314c | ||
|
|
9e5ddeaa8a | ||
|
|
4e3251872c | ||
|
|
c13d70479b | ||
|
|
ecd50891ff | ||
|
|
71cec2ef5d | ||
|
|
83e9b5b408 | ||
|
|
f4a6a99b7c | ||
|
|
dd0c364938 | ||
|
|
2eec82c32a | ||
|
|
9212d95b0f | ||
|
|
29ba8f0819 | ||
|
|
8f7edb8a7d | ||
|
|
dcf37412c1 | ||
|
|
d6c35ab02f | ||
|
|
66df338087 | ||
|
|
d1718355cd | ||
|
|
bb3675b3c7 | ||
|
|
36711b6691 | ||
|
|
dc8adcda0e | ||
|
|
883a43ddd7 | ||
|
|
5ff2b8535f | ||
|
|
750f9917e3 | ||
|
|
e77d82eaac | ||
|
|
4babdcd662 | ||
|
|
f5b0cab5cf | ||
|
|
1d7b273669 | ||
|
|
774d431525 | ||
|
|
845afdbcd8 | ||
|
|
b58bad557b | ||
|
|
6dfd92b191 | ||
|
|
d7c4f93c76 | ||
|
|
0b0f7dc9c0 | ||
|
|
df19049dde | ||
|
|
edc2adbb5b | ||
|
|
2ff74eb667 | ||
|
|
cfd3651003 | ||
|
|
7c252e3830 | ||
|
|
d44d9ad40d | ||
|
|
9c8bceb691 | ||
|
|
21a1413bf3 | ||
|
|
8870ec5e7b | ||
|
|
c46f262d6e | ||
|
|
edc1c28236 | ||
|
|
f454c6f9d0 | ||
|
|
cf5a6a003a | ||
|
|
d2291abe2a | ||
|
|
5ce0098adc | ||
|
|
46a8a3fe31 | ||
|
|
c6ada2a329 | ||
|
|
a7d665f28b | ||
|
|
69bb4f8beb | ||
|
|
06f28af80f | ||
|
|
e60d6f70bf | ||
|
|
9126132e42 | ||
|
|
8562c623d3 | ||
|
|
2b8aeed4d8 | ||
|
|
ce89f1eda1 | ||
|
|
f561000124 | ||
|
|
93c9600145 | ||
|
|
31726cdc95 | ||
|
|
39eeb2a723 | ||
|
|
a06339fb48 | ||
|
|
0e1afbbdad | ||
|
|
a42738729b | ||
|
|
d6e352e862 | ||
|
|
f7eb5f8897 | ||
|
|
7398323b82 | ||
|
|
4ee82e8175 | ||
|
|
cebe469898 | ||
|
|
bbb15f65a7 | ||
|
|
b3a874c4d1 | ||
|
|
f49d267187 | ||
|
|
2c306f75c4 | ||
|
|
d7cd28c641 | ||
|
|
92cb629640 | ||
|
|
1492e8cf0e | ||
|
|
0ae46040a4 | ||
|
|
1d1e1a0068 | ||
|
|
1e3df88ee0 | ||
|
|
e818e98187 | ||
|
|
b4050482ec | ||
|
|
942a90cd64 | ||
|
|
20c1fb0a0a | ||
|
|
7972dc8776 | ||
|
|
7cb0dd9039 | ||
|
|
a5058c605f | ||
|
|
70b0bdd5e3 | ||
|
|
2d72cd00e3 | ||
|
|
95a533e8e1 | ||
|
|
0eb36cb823 | ||
|
|
c8d51a7b98 | ||
|
|
c77600f1e9 | ||
|
|
64b8d8b3e4 | ||
|
|
83682d919f | ||
|
|
6ed1cd63b6 | ||
|
|
cb320849de | ||
|
|
9659d3f78a | ||
|
|
1f3327d326 | ||
|
|
15325fe546 | ||
|
|
4152e90e7e | ||
|
|
c211fdcf42 | ||
|
|
af63893377 | ||
|
|
3304df7042 | ||
|
|
df85ef1754 | ||
|
|
a7e25f2c73 | ||
|
|
1c583edfb7 | ||
|
|
89c10e092a | ||
|
|
4bdd94fd3f | ||
|
|
5a55f6ff7b | ||
|
|
af07cfea5f | ||
|
|
348a38a876 | ||
|
|
0d98bab82b | ||
|
|
992c5fade7 | ||
|
|
75d09d5ab3 | ||
|
|
1c49371edf | ||
|
|
94d17a6809 | ||
|
|
9605e49fbf | ||
|
|
43816ba8d9 | ||
|
|
71be1751c6 | ||
|
|
ed13e6a41e | ||
|
|
7fe7d5ab4f | ||
|
|
4340f75304 | ||
|
|
0add626822 | ||
|
|
793ea05f4a | ||
|
|
638ea2d6fc | ||
|
|
c959f9c701 | ||
|
|
f8a303b0e5 | ||
|
|
ddda963f81 | ||
|
|
9bf50e5650 | ||
|
|
acc57ea799 | ||
|
|
1c8471c38f | ||
|
|
17208ca7fa | ||
|
|
1c16cb751f | ||
|
|
127612d213 | ||
|
|
4ad401f3fa | ||
|
|
888a65c1fb | ||
|
|
3d65178f37 | ||
|
|
891027f0c3 | ||
|
|
5f00675de4 | ||
|
|
be03613e30 | ||
|
|
d17e51df06 | ||
|
|
5ecf1431f0 | ||
|
|
28a9fa2486 | ||
|
|
7cf61e6a4b | ||
|
|
0d608c492d | ||
|
|
7bc553a5cc | ||
|
|
934946acfc | ||
|
|
3a9b824ce5 | ||
|
|
501b2b43ef | ||
|
|
aea253bc60 | ||
|
|
4fed32315c | ||
|
|
d19e60a40d | ||
|
|
e0c7d7daeb | ||
|
|
64ed69c56f | ||
|
|
2a962e1c9a | ||
|
|
74662776d4 | ||
|
|
0b2833f69c | ||
|
|
41b458fba7 | ||
|
|
f716daa483 | ||
|
|
415946eb0f | ||
|
|
65b79d2585 | ||
|
|
e976825342 | ||
|
|
b489a1f6b5 | ||
|
|
2f65459fcc | ||
|
|
f5af18738b | ||
|
|
b37b85333d | ||
|
|
76f2396764 | ||
|
|
547842e7f0 | ||
|
|
ebaea07286 | ||
|
|
0822de1971 | ||
|
|
954a144336 | ||
|
|
bf24da0d80 | ||
|
|
d743e757ec | ||
|
|
746a40bbfe | ||
|
|
d1cab4fbdd | ||
|
|
7a58a6a097 | ||
|
|
371cdf3250 | ||
|
|
1087ff48f0 | ||
|
|
15982ab6d2 | ||
|
|
0dc6ee2c44 | ||
|
|
f136a6f51f | ||
|
|
6ab13a6303 | ||
|
|
358f66482d | ||
|
|
0d3fa01be2 | ||
|
|
e0d1aac8a5 | ||
|
|
fc31f3d629 | ||
|
|
9564cba492 | ||
|
|
90eec6734f | ||
|
|
72e14bd6dd | ||
|
|
99bb8bb3f7 | ||
|
|
ff42c94174 | ||
|
|
20388f83f5 | ||
|
|
c97979873a | ||
|
|
d6955d4427 | ||
|
|
85706dc39d | ||
|
|
07166a55ee | ||
|
|
2dfa5ac804 | ||
|
|
8c66e2ff66 | ||
|
|
d761e3cf2c | ||
|
|
360ffb8e87 | ||
|
|
731b672875 | ||
|
|
d5a31daa41 | ||
|
|
554954d126 | ||
|
|
73477b5abf | ||
|
|
62803c19f5 | ||
|
|
643d873f47 | ||
|
|
b0d40403e1 | ||
|
|
12170acf46 | ||
|
|
38648855b0 | ||
|
|
96452a2e46 | ||
|
|
46eb054337 | ||
|
|
4a2050e220 | ||
|
|
3c68db8e47 | ||
|
|
9912c80d70 | ||
|
|
2f792396d7 | ||
|
|
6730b26b43 | ||
|
|
6e83d1f54e | ||
|
|
fb9db7fede | ||
|
|
7991032aeb | ||
|
|
0cbc857ea4 | ||
|
|
398c1d1ad7 | ||
|
|
94982dbab7 | ||
|
|
4dc2ab61c9 | ||
|
|
13d3afa56e | ||
|
|
3dd0e6d0b1 | ||
|
|
11db6ad574 | ||
|
|
ebcef256ab | ||
|
|
b12b06e917 | ||
|
|
a27c3039d0 | ||
|
|
0ee3370afc | ||
|
|
c2b5997437 | ||
|
|
f02a17805e | ||
|
|
a481733b40 | ||
|
|
cf0175ffce | ||
|
|
e5600ab99b | ||
|
|
257fd990d1 | ||
|
|
12a23162b3 | ||
|
|
0b11e78064 | ||
|
|
e8026e29b6 | ||
|
|
ee1a868913 | ||
|
|
488722e7c4 | ||
|
|
7df070d681 | ||
|
|
abf8cbeaea | ||
|
|
c0de580d46 | ||
|
|
144114bf40 | ||
|
|
c68fe1053a | ||
|
|
4d012a6d95 | ||
|
|
c1eedf6845 | ||
|
|
9722bb4d9e | ||
|
|
ad3514216d | ||
|
|
59fce30200 | ||
|
|
2e80658251 | ||
|
|
53e74c365b | ||
|
|
047709e911 | ||
|
|
7e355cbe1e | ||
|
|
3eab58816b | ||
|
|
c7c71137b2 | ||
|
|
ec34675019 | ||
|
|
85fb015b45 | ||
|
|
d40b1d31b5 | ||
|
|
5fd03f3297 | ||
|
|
a3a66be76e | ||
|
|
3bb3bc2982 | ||
|
|
a7ac16098a | ||
|
|
3b35ae870c | ||
|
|
d0abe5a919 | ||
|
|
26200c0f7e | ||
|
|
07bf9045fb | ||
|
|
e4a3746755 | ||
|
|
1772d23f8e | ||
|
|
e07b9605bc | ||
|
|
fc47e79cb6 | ||
|
|
2a92ee22da | ||
|
|
23dcf36ec9 | ||
|
|
b5f256937f | ||
|
|
cab1dcb696 | ||
|
|
25ea17a6fc | ||
|
|
4a2bbed157 | ||
|
|
7629f6d533 | ||
|
|
230ce9bfde | ||
|
|
2736633a60 | ||
|
|
1755e07af7 | ||
|
|
a610bb89a0 | ||
|
|
2040b7ecdf | ||
|
|
cc35cc6c4e | ||
|
|
9a82aadca7 | ||
|
|
23e185e674 | ||
|
|
971ee2d28a | ||
|
|
efd4169fa2 | ||
|
|
b52ad33031 | ||
|
|
5926008647 | ||
|
|
459af3acab | ||
|
|
cc50be971d | ||
|
|
3294557717 | ||
|
|
470349c902 | ||
|
|
bf06cad5d9 | ||
|
|
2e8de6bd88 | ||
|
|
7f04faf30d | ||
|
|
4fa891b55d | ||
|
|
254007a142 | ||
|
|
1b846e29c7 | ||
|
|
a2876b5cb4 | ||
|
|
5f8258109e | ||
|
|
6a4277a9a9 | ||
|
|
f4e001c91a | ||
|
|
3285f52dc8 | ||
|
|
400a5b4e1f | ||
|
|
42a4940671 | ||
|
|
ecc329fa2a | ||
|
|
5fc5e52f52 | ||
|
|
1d8e62fb01 | ||
|
|
09faa582e3 | ||
|
|
a85ba95b20 | ||
|
|
2050120098 | ||
|
|
b213b01200 | ||
|
|
ac1f242b6c | ||
|
|
ebbb729aea | ||
|
|
bbabec3f18 | ||
|
|
dded144313 | ||
|
|
3f59566729 | ||
|
|
e0420bae09 | ||
|
|
a3b452725b | ||
|
|
d5f0256f8b | ||
|
|
9cdf9847c2 | ||
|
|
fa85ec5cf5 | ||
|
|
0ce32cd4b5 | ||
|
|
756b84033a | ||
|
|
5a9b54df96 | ||
|
|
d7ba281c15 | ||
|
|
c6c87b97c2 | ||
|
|
2fa9dddea6 | ||
|
|
72d4a83af8 | ||
|
|
f4d9e4032f | ||
|
|
fcf502a686 | ||
|
|
6e494b93ce | ||
|
|
9458c1cc47 | ||
|
|
9190e95df9 | ||
|
|
e10aedccc6 | ||
|
|
a63d03810f | ||
|
|
d2c5e3f2b3 | ||
|
|
2ef4be21c8 | ||
|
|
2cbaa568b5 | ||
|
|
d8ac144923 | ||
|
|
606daab475 | ||
|
|
ec5829c401 | ||
|
|
d3a8597a93 | ||
|
|
29cf11fb6e | ||
|
|
6ca245306b | ||
|
|
4a9b4ad720 | ||
|
|
36689d1884 | ||
|
|
0243736003 | ||
|
|
450899ef4c | ||
|
|
c6c9ca6009 | ||
|
|
99ec400c2a | ||
|
|
da9b4d778b | ||
|
|
252e29c373 | ||
|
|
6266bcafee | ||
|
|
d90f79de0e | ||
|
|
790db8db53 | ||
|
|
38b1fbb261 | ||
|
|
cd7bb0200a | ||
|
|
05d9e0c1c8 | ||
|
|
b7be6ee00d | ||
|
|
604d4a1cb2 | ||
|
|
b68d54cdbc | ||
|
|
bc0182fa3e | ||
|
|
19bae10b45 | ||
|
|
4060febd7f | ||
|
|
9a4458ba33 | ||
|
|
40b65b2608 | ||
|
|
6c4c93b8d0 | ||
|
|
4c5df54e39 | ||
|
|
2ce6ac00cf | ||
|
|
98f3112158 | ||
|
|
9a27614b41 | ||
|
|
29abefbe61 | ||
|
|
81c8a2bb4b | ||
|
|
d187ff858c | ||
|
|
e57d6ec359 | ||
|
|
eb5c76210e | ||
|
|
fc22b75a06 | ||
|
|
43000abeff | ||
|
|
f7ab6f665d | ||
|
|
72bb7fc701 | ||
|
|
cdc263f796 | ||
|
|
ccb9dcc86b | ||
|
|
68d6671413 | ||
|
|
dd1c0c0b22 | ||
|
|
a46cfd3ff4 | ||
|
|
706d464ae6 | ||
|
|
b6d9f3facb | ||
|
|
06c6d62629 | ||
|
|
32b8fe40bb | ||
|
|
1e8be87026 | ||
|
|
cbc6244bc5 | ||
|
|
ac0fcc55a6 | ||
|
|
3d642460e7 | ||
|
|
82664003c0 | ||
|
|
b9a1cb74a1 | ||
|
|
dc1c1e8af9 | ||
|
|
83eac3f33a | ||
|
|
296f0844df | ||
|
|
e17b5f337d | ||
|
|
c36ad5f474 | ||
|
|
b7777add36 | ||
|
|
609383f93c | ||
|
|
a9e0cf77a0 | ||
|
|
86b58529fd | ||
|
|
2fee3793b4 | ||
|
|
03b773f45a | ||
|
|
8adcf95300 | ||
|
|
0b6df9efe7 | ||
|
|
01f31665b8 | ||
|
|
0d87f8cd62 | ||
|
|
52c1fb8dfe | ||
|
|
732578eb53 | ||
|
|
1124f2507d | ||
|
|
d37511f76b | ||
|
|
55d29d08a1 | ||
|
|
ae446e8f4a | ||
|
|
c56e9b2031 | ||
|
|
93978544c0 | ||
|
|
1b612cd5db | ||
|
|
3a1d69ca29 | ||
|
|
9af74629f6 | ||
|
|
59d85d42cf | ||
|
|
2c75ba5509 | ||
|
|
58628f9a9e | ||
|
|
da1ce01a6f | ||
|
|
654956223d | ||
|
|
382fa01301 | ||
|
|
572861be27 | ||
|
|
5a173df3da | ||
|
|
3ea069a8d3 | ||
|
|
25f6da5e89 | ||
|
|
566f75af82 | ||
|
|
a382dfd3bd | ||
|
|
823ee58332 | ||
|
|
55120a25db | ||
|
|
14faec3ce2 | ||
|
|
82fe6fbc62 | ||
|
|
c63087a563 | ||
|
|
ea0fc7619d | ||
|
|
f2ed1656b4 | ||
|
|
2f27d29247 | ||
|
|
ef6babf896 | ||
|
|
7f9570b95b | ||
|
|
d8d8a71a7a | ||
|
|
2ff3e3d1e4 | ||
|
|
73f4f518b8 | ||
|
|
6e9dbba130 | ||
|
|
706aa93ab5 | ||
|
|
54deed9a5a | ||
|
|
0e70ddcab3 | ||
|
|
f2bdb1fb87 | ||
|
|
ec9fd76c87 | ||
|
|
bacaa5eb9a | ||
|
|
9a297516ba | ||
|
|
e9bff53015 | ||
|
|
3078b180fe | ||
|
|
556997f9df | ||
|
|
d375dce9f5 | ||
|
|
d7266b25ba | ||
|
|
2a43ce1705 | ||
|
|
3324a6e6b3 | ||
|
|
46423e614d | ||
|
|
f7b73b2e01 | ||
|
|
c85e424279 | ||
|
|
b146c48e23 | ||
|
|
3176d69009 | ||
|
|
89f7d841ab | ||
|
|
7e2fceebca | ||
|
|
1e00c887ec | ||
|
|
561d3c68a0 | ||
|
|
03601cb794 | ||
|
|
3108b8b4d3 | ||
|
|
d1afe32762 | ||
|
|
603dd72b09 | ||
|
|
e81ba8924a | ||
|
|
8832ab45d9 | ||
|
|
87d6e17bc7 | ||
|
|
a5033cd79b | ||
|
|
44cbf3d605 | ||
|
|
fb6288791e | ||
|
|
2160f52cbf | ||
|
|
8825e621c9 | ||
|
|
e22abd73f2 | ||
|
|
f77d4d7fc0 | ||
|
|
8243133ca7 | ||
|
|
63a4345d2c | ||
|
|
56685a483d | ||
|
|
b23f793753 | ||
|
|
2b19e2fc1f | ||
|
|
703f8b8136 | ||
|
|
5b18968867 | ||
|
|
e8c4e1205a | ||
|
|
bf5c540357 | ||
|
|
c03383d3e5 | ||
|
|
eaaa287078 | ||
|
|
554defaf1a | ||
|
|
659fe52b7b | ||
|
|
0970077af9 | ||
|
|
814c88fbc1 | ||
|
|
3b24c8a0a4 | ||
|
|
e34c7e6796 | ||
|
|
8c608e9c1c | ||
|
|
283c3b70dd | ||
|
|
93599c2c48 | ||
|
|
080e625090 | ||
|
|
26696a741e | ||
|
|
a209e54b8f | ||
|
|
8921dadaa1 | ||
|
|
47232acbd8 | ||
|
|
cbad8ec2e4 | ||
|
|
800170b47d | ||
|
|
97c5cb3514 | ||
|
|
081afc0477 | ||
|
|
e807fc3be0 | ||
|
|
a1bd3389ed | ||
|
|
03a3b5a0b1 | ||
|
|
1ee2d9a5fa | ||
|
|
2e07fcd680 | ||
|
|
d3365d5a60 | ||
|
|
9dbf99d91a | ||
|
|
0154a7f528 | ||
|
|
add47bebc6 | ||
|
|
514b62223d | ||
|
|
7884ab6161 | ||
|
|
bc542c5304 | ||
|
|
d66ac4981e | ||
|
|
9b647a47d1 | ||
|
|
b67ffe9650 | ||
|
|
2c519b006d | ||
|
|
852429d163 | ||
|
|
ee9c6bbf75 | ||
|
|
d9ece94377 | ||
|
|
486fbce42b | ||
|
|
ed92026632 | ||
|
|
05e614feb7 | ||
|
|
14059afdf1 | ||
|
|
9b294eb94e | ||
|
|
96d42cf1cc | ||
|
|
4786a16696 | ||
|
|
14bb12125f | ||
|
|
07e8dafcea | ||
|
|
ab67a81f11 | ||
|
|
aa76f7e210 | ||
|
|
0c15463e41 | ||
|
|
5df1356295 | ||
|
|
95fc81c565 | ||
|
|
378e594f75 | ||
|
|
86c7fceb09 | ||
|
|
b5e20a3e37 | ||
|
|
75a30b1f98 | ||
|
|
c64a021af4 | ||
|
|
9b64635925 | ||
|
|
7b76be5360 | ||
|
|
2e2336ffce | ||
|
|
76d80ef516 | ||
|
|
287d80bd36 | ||
|
|
77072b3eaa | ||
|
|
c7833bb090 | ||
|
|
899024cef7 | ||
|
|
4da3edd42e | ||
|
|
6b59626817 | ||
|
|
7c02ae00c2 | ||
|
|
80e29a3627 | ||
|
|
26163a4f30 | ||
|
|
dbd88fc210 | ||
|
|
2de31e4cac | ||
|
|
1bff328895 | ||
|
|
facf78a5b6 | ||
|
|
6b19fcd859 | ||
|
|
ca784e3e1a | ||
|
|
314c8558d7 | ||
|
|
af30a7fe06 | ||
|
|
9ffd7d1970 | ||
|
|
cb906c80eb | ||
|
|
96ce0eb600 | ||
|
|
0e476c1f28 | ||
|
|
f2924988db | ||
|
|
671435e07f | ||
|
|
b17cfb9b65 | ||
|
|
0385f1aaf4 | ||
|
|
8611faf338 | ||
|
|
7e19911d3f | ||
|
|
c1f5153f6d | ||
|
|
2bd87ce771 | ||
|
|
de0547ede7 | ||
|
|
14589c2a59 | ||
|
|
f678b3804d | ||
|
|
720c298786 | ||
|
|
f721d2de15 | ||
|
|
11f07cb5ad | ||
|
|
37d7ab88dc | ||
|
|
6cde64072d | ||
|
|
6a60b0f591 | ||
|
|
339d9f05e4 | ||
|
|
4e4207457f | ||
|
|
46bb3e3046 | ||
|
|
34008e6aab | ||
|
|
d6b3ac850d | ||
|
|
9742200ff6 | ||
|
|
ec10857b84 | ||
|
|
353d4d161c | ||
|
|
bcd650f169 | ||
|
|
72d66dfcdd | ||
|
|
5e97df5058 | ||
|
|
059d131e2b | ||
|
|
8f7c207c7c | ||
|
|
b9e8935037 | ||
|
|
5f33f4ae8e | ||
|
|
adf0e8b1e6 | ||
|
|
7500f9b255 | ||
|
|
a8d433dd26 | ||
|
|
ecaf6fced0 | ||
|
|
31a7cac4a6 | ||
|
|
5eec736b07 | ||
|
|
cf4a8e2152 | ||
|
|
31bb969cce | ||
|
|
f4a7c7f6bf | ||
|
|
495069c868 | ||
|
|
dfe470475b | ||
|
|
de56e892aa | ||
|
|
e518c1f2f3 | ||
|
|
c5ea59d7d1 | ||
|
|
22eccbdbb6 | ||
|
|
58e85c85e4 | ||
|
|
6b89148487 | ||
|
|
ddb9e428ec | ||
|
|
b7fa353db2 | ||
|
|
87b5eadb7c | ||
|
|
60a09e59e8 | ||
|
|
6f8e9bf3a9 | ||
|
|
90b7b84337 | ||
|
|
088b5fc57f | ||
|
|
a4cd974912 | ||
|
|
65359dcc59 | ||
|
|
ac8b398c50 | ||
|
|
aac2417893 | ||
|
|
ad8892df10 | ||
|
|
edc7977c4e | ||
|
|
8bf8ac5076 | ||
|
|
c36cbd5140 | ||
|
|
ee96bc7185 | ||
|
|
f94f325636 | ||
|
|
6c1217dd93 | ||
|
|
edb792503b | ||
|
|
3a43859286 | ||
|
|
c55dd104d4 | ||
|
|
497d137fb8 | ||
|
|
df01c5c7a4 | ||
|
|
2d1135fba6 | ||
|
|
f54ed6f7dc | ||
|
|
b7efd896b6 | ||
|
|
46eb51bc30 | ||
|
|
500dbaabc3 | ||
|
|
594ec3d822 | ||
|
|
f280508209 | ||
|
|
480b88c776 | ||
|
|
a4e63905b1 | ||
|
|
5666127dbc | ||
|
|
c1c110ba65 | ||
|
|
eb2a839892 | ||
|
|
1c537a6d2e | ||
|
|
c12261a6ec | ||
|
|
5af7d6bff3 | ||
|
|
de0f4b0f5b | ||
|
|
966ab1152d | ||
|
|
74a4432688 | ||
|
|
115d0cdc07 | ||
|
|
d0ec616fba | ||
|
|
38cce2bb18 | ||
|
|
9cb7002b98 | ||
|
|
eb9c91c0a9 | ||
|
|
be07153efa | ||
|
|
627ec82e60 | ||
|
|
ccc34ca06c | ||
|
|
2b5dd0082d | ||
|
|
7b36b339aa | ||
|
|
b7eb663b82 | ||
|
|
1b28353be5 | ||
|
|
a07c030d02 | ||
|
|
339cccdf53 | ||
|
|
577126e99c | ||
|
|
125ea5ee4a | ||
|
|
3c5afc06d1 | ||
|
|
f87c15f4f9 | ||
|
|
fe5c0e2fe3 | ||
|
|
c8421cfd82 | ||
|
|
fbf99b8d65 | ||
|
|
57312c9b79 | ||
|
|
35d2539ef8 | ||
|
|
08a4f4552c | ||
|
|
6502d3669f | ||
|
|
53831e67a7 | ||
|
|
e742fc1206 | ||
|
|
4ef5ee23e6 | ||
|
|
4a8330fda0 | ||
|
|
b4096cee64 | ||
|
|
032302c358 | ||
|
|
a888e1cb65 | ||
|
|
c80b33b2ad | ||
|
|
f32239df1f | ||
|
|
22c1b541df | ||
|
|
78a59c95fe | ||
|
|
7583d48266 | ||
|
|
f1188aaeac | ||
|
|
4dac5c222f | ||
|
|
0145809a94 | ||
|
|
2e6b8810c0 | ||
|
|
d8abcdb5a1 | ||
|
|
65ecfa20dd | ||
|
|
aa5ab02166 | ||
|
|
7ddbbb50ff | ||
|
|
f2eb036119 | ||
|
|
8a8b96bf4b | ||
|
|
bdcda2d8f0 | ||
|
|
ef3f997d55 | ||
|
|
b41d380230 | ||
|
|
0210850e86 | ||
|
|
053223bf65 | ||
|
|
746b84cc0f | ||
|
|
f1ad883e00 | ||
|
|
191e0e8d5e | ||
|
|
55217e2181 | ||
|
|
7c8cd23c5f | ||
|
|
6aafb81702 | ||
|
|
0578422612 | ||
|
|
ad04da84c9 | ||
|
|
333b013f7f | ||
|
|
b3dc517565 | ||
|
|
70e4dabe89 | ||
|
|
d3443d6f2a | ||
|
|
a508f68044 | ||
|
|
f191b64bbc | ||
|
|
e9efe77839 | ||
|
|
d98c0d32f2 | ||
|
|
dfa2dcceb8 | ||
|
|
d441e7106b | ||
|
|
4cd92f979c | ||
|
|
d1a068e5b1 | ||
|
|
4d90846182 | ||
|
|
986f721938 | ||
|
|
7903246355 | ||
|
|
0252ae2be3 | ||
|
|
fa90e42a38 | ||
|
|
2d36109565 | ||
|
|
de8258171a | ||
|
|
2ed6224778 | ||
|
|
e1a0171094 | ||
|
|
395521f3d3 | ||
|
|
8c95a84ea4 | ||
|
|
75db19c789 | ||
|
|
f00d2b30bb | ||
|
|
c0c5ce2f9b | ||
|
|
ee9f9ae05e | ||
|
|
387649ded4 | ||
|
|
be12131d74 | ||
|
|
896ebdc9d7 | ||
|
|
bc58bd0b83 | ||
|
|
8d4c87876b | ||
|
|
cebc99ddc7 | ||
|
|
1b62203f18 | ||
|
|
06dd8c2cfd | ||
|
|
5da21ca4dc | ||
|
|
3e16ef33b0 | ||
|
|
2746a2d929 | ||
|
|
e31bacf7be | ||
|
|
911ae64931 | ||
|
|
99a0b35705 | ||
|
|
89bf8af878 | ||
|
|
f3744c991a | ||
|
|
dcee15c0f1 | ||
|
|
2321e9de05 | ||
|
|
73dcda460f | ||
|
|
0f8bc67a98 | ||
|
|
379d830123 | ||
|
|
bc8bc68b80 | ||
|
|
8c4df51a14 | ||
|
|
06d67d2384 | ||
|
|
cc8bb5fc54 | ||
|
|
8fb1e33d0f | ||
|
|
0dc946da63 | ||
|
|
26a23d3e56 | ||
|
|
766f4bc8fe | ||
|
|
3d008d5929 | ||
|
|
0546e26434 | ||
|
|
e6d8eedc00 | ||
|
|
13b37b0ba4 | ||
|
|
779c71b66d | ||
|
|
8e73d007f5 | ||
|
|
e376d638fb | ||
|
|
52982a88aa | ||
|
|
422c1d9c0d | ||
|
|
ccc8ad8700 | ||
|
|
6b0eb970d8 | ||
|
|
775e35865c | ||
|
|
49ce680d53 | ||
|
|
463f3d3a52 | ||
|
|
f6347f18b0 | ||
|
|
2e959fe300 | ||
|
|
56f771ba29 | ||
|
|
32e96215b4 | ||
|
|
86f800e11d | ||
|
|
4d371b2b16 | ||
|
|
7e97c2513f | ||
|
|
2bf5a150e6 | ||
|
|
18c87faaa5 | ||
|
|
fdeda388bf | ||
|
|
ea2c27c640 | ||
|
|
dfc04a590d | ||
|
|
fe5b364675 | ||
|
|
9b73c55559 | ||
|
|
0b38a0663d | ||
|
|
e5c0716293 | ||
|
|
54a3293cad | ||
|
|
818287a7ce | ||
|
|
59119cd898 | ||
|
|
817da34f7e | ||
|
|
8fa44fc3e6 | ||
|
|
c7e94151b2 | ||
|
|
729ba44297 | ||
|
|
2a2a6879c5 | ||
|
|
e7b773b031 | ||
|
|
57a225681c | ||
|
|
ea07a92366 | ||
|
|
76290e8ddb | ||
|
|
26d83b1ab7 | ||
|
|
2bba856206 | ||
|
|
bf3382a89e | ||
|
|
3162e25671 | ||
|
|
3d931b4fe2 | ||
|
|
fc770a383a | ||
|
|
62c385a9dd | ||
|
|
7c4ad1a5c4 | ||
|
|
ac524bb13a | ||
|
|
66fa9380b5 | ||
|
|
b64eb6ca13 | ||
|
|
9b2d8ac362 | ||
|
|
2a90bc1a9b | ||
|
|
d4b868d9bc | ||
|
|
b54f6710a7 | ||
|
|
6bb7caf155 | ||
|
|
202348f9d0 | ||
|
|
1a613de2f6 | ||
|
|
665df37703 | ||
|
|
acad5e4e3d | ||
|
|
6267c8469b | ||
|
|
5a2f791bdd | ||
|
|
286a00a1db | ||
|
|
11dd602b28 | ||
|
|
35988d659d | ||
|
|
be3449b3ce | ||
|
|
2d8fddc1e9 | ||
|
|
644d522d19 | ||
|
|
a8b0125da1 | ||
|
|
acccac516e | ||
|
|
d65214fa4e | ||
|
|
1d96fc8237 | ||
|
|
882a87ca19 | ||
|
|
1dbb8df95f | ||
|
|
f6c2c2edbd | ||
|
|
c4e4de36f6 | ||
|
|
67cbb2a7d3 | ||
|
|
a979daa8ea | ||
|
|
fb14f50ec1 | ||
|
|
6099fbafc1 | ||
|
|
6f2f828bce | ||
|
|
795d3122cc | ||
|
|
5080730728 | ||
|
|
f75a3a0e95 | ||
|
|
b75db7d1c6 | ||
|
|
b03069bdf6 | ||
|
|
1c71e56e75 | ||
|
|
9332d0dcc8 | ||
|
|
9ad37583e6 | ||
|
|
69975627e9 | ||
|
|
b74a489aba | ||
|
|
599b807726 | ||
|
|
6510ca8bdd | ||
|
|
be20a04e04 | ||
|
|
92e5536335 | ||
|
|
c2da2f7ecd | ||
|
|
130bd5937c | ||
|
|
54bfd380a8 | ||
|
|
f01d695e6c | ||
|
|
619b2465c1 | ||
|
|
cc18191a8e | ||
|
|
1f8e7c8aab | ||
|
|
671daea262 | ||
|
|
76533513c2 | ||
|
|
0d3988365b | ||
|
|
0966636803 | ||
|
|
7c3b30036e | ||
|
|
988901294d | ||
|
|
43b9fc6981 | ||
|
|
25f670faae | ||
|
|
d0068a036f | ||
|
|
fae014eb45 | ||
|
|
f0ea0be15d | ||
|
|
9650236b23 | ||
|
|
c0e2d7c62f | ||
|
|
cc072eb7cd | ||
|
|
613213f597 | ||
|
|
e25c25fcb5 | ||
|
|
52666d6fe5 | ||
|
|
56b3669411 | ||
|
|
e3b5b76cdd | ||
|
|
bbb28196e5 | ||
|
|
72d3a9042c | ||
|
|
f2853ffa8e | ||
|
|
fca2ba963d | ||
|
|
806779769e | ||
|
|
82aa0d1f7c | ||
|
|
72f1d34eca | ||
|
|
c267a75eef | ||
|
|
2fb755e0c9 | ||
|
|
cd096819d8 | ||
|
|
83543423e2 | ||
|
|
d0bb72a2aa | ||
|
|
8cc2a44268 | ||
|
|
4800dd3f95 | ||
|
|
2534310ce9 | ||
|
|
3a4fbc5e50 | ||
|
|
89a67ac719 | ||
|
|
21b84b1890 | ||
|
|
20935f678b | ||
|
|
c41b4130c6 | ||
|
|
f1b010af66 | ||
|
|
ec1133d6e1 | ||
|
|
8fcf1b78a4 | ||
|
|
21f9148155 | ||
|
|
d4f0593b37 |
@@ -16,11 +16,11 @@ stages:
|
|||||||
|
|
||||||
# Common variables
|
# Common variables
|
||||||
variables:
|
variables:
|
||||||
COMMON_MESON_FLAGS: "--fatal-meson-warnings --werror"
|
COMMON_MESON_FLAGS: "--fatal-meson-warnings -Dgtk:werror=true"
|
||||||
BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true -Dvulkan=yes"
|
BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true -Dvulkan=yes"
|
||||||
FEATURE_FLAGS: "-Dcloudproviders=true"
|
FEATURE_FLAGS: "-Dcloudproviders=true"
|
||||||
MESON_TEST_TIMEOUT_MULTIPLIER: 2
|
MESON_TEST_TIMEOUT_MULTIPLIER: 3
|
||||||
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v17"
|
FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v22"
|
||||||
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
|
FLATPAK_IMAGE: "registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master"
|
||||||
DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora-docs:v19"
|
DOCS_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora-docs:v19"
|
||||||
|
|
||||||
@@ -68,9 +68,11 @@ style-check-diff:
|
|||||||
fedora-x86_64:
|
fedora-x86_64:
|
||||||
extends: .build-fedora-default
|
extends: .build-fedora-default
|
||||||
stage: build
|
stage: build
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
|
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
|
||||||
script:
|
script:
|
||||||
|
- meson subprojects update
|
||||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
||||||
-Dprofiler=true
|
-Dprofiler=true
|
||||||
_build
|
_build
|
||||||
@@ -82,14 +84,38 @@ fedora-x86_64:
|
|||||||
release-build:
|
release-build:
|
||||||
extends: .build-fedora-default
|
extends: .build-fedora-default
|
||||||
stage: build
|
stage: build
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
EXTRA_MESON_FLAGS: "--buildtype=release"
|
EXTRA_MESON_FLAGS: "--buildtype=release"
|
||||||
script:
|
script:
|
||||||
|
- meson subprojects update
|
||||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
||||||
_build
|
_build
|
||||||
- ninja -C _build
|
- ninja -C _build
|
||||||
- .gitlab-ci/run-tests.sh _build x11
|
- .gitlab-ci/run-tests.sh _build x11
|
||||||
|
|
||||||
|
installed-tests:
|
||||||
|
extends: .build-fedora-default
|
||||||
|
stage: build
|
||||||
|
needs: []
|
||||||
|
variables:
|
||||||
|
EXTRA_MESON_FLAGS: "--prefix=/usr --libdir=/usr/lib64 -Dinstall-tests=true"
|
||||||
|
script:
|
||||||
|
- meson subprojects update
|
||||||
|
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS}
|
||||||
|
_build
|
||||||
|
- ninja -C _build
|
||||||
|
- sudo ninja -C _build install
|
||||||
|
- dbus-run-session xvfb-run -a -s "-screen 0 1024x768x24"
|
||||||
|
gnome-desktop-testing-runner
|
||||||
|
--report-directory=_build/installed-tests-report/failed/
|
||||||
|
--parallel=0
|
||||||
|
gtk-4.0
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- "_build/installed-tests-report/"
|
||||||
|
|
||||||
|
|
||||||
.mingw-defaults:
|
.mingw-defaults:
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
@@ -109,6 +135,7 @@ release-build:
|
|||||||
|
|
||||||
msys2-mingw64:
|
msys2-mingw64:
|
||||||
extends: .mingw-defaults
|
extends: .mingw-defaults
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
MSYSTEM: "MINGW64"
|
MSYSTEM: "MINGW64"
|
||||||
CHERE_INVOKING: "yes"
|
CHERE_INVOKING: "yes"
|
||||||
@@ -139,37 +166,44 @@ msys2-mingw64:
|
|||||||
|
|
||||||
flatpak-manual:demo:
|
flatpak-manual:demo:
|
||||||
extends: .flatpak-manual
|
extends: .flatpak-manual
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
APPID: org.gtk.Demo4
|
APPID: org.gtk.Demo4
|
||||||
|
|
||||||
flatpak-master:demo:
|
flatpak-master:demo:
|
||||||
extends: .flatpak-master
|
extends: .flatpak-master
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
APPID: org.gtk.Demo4
|
APPID: org.gtk.Demo4
|
||||||
|
|
||||||
flatpak-manual:widget-factory:
|
flatpak-manual:widget-factory:
|
||||||
extends: .flatpak-manual
|
extends: .flatpak-manual
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
APPID: org.gtk.WidgetFactory4
|
APPID: org.gtk.WidgetFactory4
|
||||||
|
|
||||||
flatpak-master:widget-factory:
|
flatpak-master:widget-factory:
|
||||||
extends: .flatpak-master
|
extends: .flatpak-master
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
APPID: org.gtk.WidgetFactory4
|
APPID: org.gtk.WidgetFactory4
|
||||||
|
|
||||||
flatpak-manual:icon-browser:
|
flatpak-manual:icon-browser:
|
||||||
extends: .flatpak-manual
|
extends: .flatpak-manual
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
APPID: org.gtk.IconBrowser4
|
APPID: org.gtk.IconBrowser4
|
||||||
|
|
||||||
flatpak-master:icon-browser:
|
flatpak-master:icon-browser:
|
||||||
extends: .flatpak-master
|
extends: .flatpak-master
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
APPID: org.gtk.IconBrowser4
|
APPID: org.gtk.IconBrowser4
|
||||||
|
|
||||||
static-scan:
|
static-scan:
|
||||||
image: $FEDORA_IMAGE
|
image: $FEDORA_IMAGE
|
||||||
stage: analysis
|
stage: analysis
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
EXTRA_MESON_FLAGS: "--buildtype=debug"
|
EXTRA_MESON_FLAGS: "--buildtype=debug"
|
||||||
script:
|
script:
|
||||||
@@ -180,9 +214,27 @@ static-scan:
|
|||||||
- _scan_build/meson-logs
|
- _scan_build/meson-logs
|
||||||
allow_failure: true
|
allow_failure: true
|
||||||
|
|
||||||
|
# Run tests with the address sanitizer. We need to turn off introspection,
|
||||||
|
# since it is incompatible with asan
|
||||||
|
asan-build:
|
||||||
|
image: $FEDORA_IMAGE
|
||||||
|
tags: [ asan ]
|
||||||
|
stage: analysis
|
||||||
|
needs: []
|
||||||
|
variables:
|
||||||
|
script:
|
||||||
|
- CC=clang meson --buildtype=debugoptimized -Db_sanitize=address -Db_lundef=false -Dintrospection=false _build
|
||||||
|
- ninja -C _build
|
||||||
|
- .gitlab-ci/run-tests.sh _build wayland
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- _build/meson-logs
|
||||||
|
allow_failure: true
|
||||||
|
|
||||||
reference:
|
reference:
|
||||||
image: $DOCS_IMAGE
|
image: $DOCS_IMAGE
|
||||||
stage: docs
|
stage: docs
|
||||||
|
needs: []
|
||||||
variables:
|
variables:
|
||||||
EXTRA_MESON_FLAGS: "--buildtype=release"
|
EXTRA_MESON_FLAGS: "--buildtype=release"
|
||||||
script:
|
script:
|
||||||
@@ -198,6 +250,7 @@ reference:
|
|||||||
|
|
||||||
pages:
|
pages:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
needs: ['reference']
|
||||||
script:
|
script:
|
||||||
- mv _reference/ public/
|
- mv _reference/ public/
|
||||||
artifacts:
|
artifacts:
|
||||||
|
|||||||
0
.gitlab-ci/.lock
Normal file
0
.gitlab-ci/.lock
Normal file
@@ -35,4 +35,13 @@ branch, as well as their available versions.
|
|||||||
- [ ] Add the new job to `.gitlab-ci.yml` referencing the image
|
- [ ] Add the new job to `.gitlab-ci.yml` referencing the image
|
||||||
- [ ] Open a merge request with your changes and let it run
|
- [ ] Open a merge request with your changes and let it run
|
||||||
|
|
||||||
|
### Checklist for Adding a new dependency to a CI image
|
||||||
|
|
||||||
|
Our images are layered, and the base (called fedora-base) contains
|
||||||
|
all the rpm payload. Therefore, adding a new dependency is a 2-step
|
||||||
|
process:
|
||||||
|
|
||||||
|
1. [ ] Build and upload fedora-base:$version+1
|
||||||
|
1. [ ] Build and upload fedora:$version+1 based on fedora-base:version+1
|
||||||
|
|
||||||
[registry]: https://gitlab.gnome.org/GNOME/gtk/container_registry
|
[registry]: https://gitlab.gnome.org/GNOME/gtk/container_registry
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ RUN dnf -y install \
|
|||||||
glib2-static \
|
glib2-static \
|
||||||
glibc-devel \
|
glibc-devel \
|
||||||
glibc-headers \
|
glibc-headers \
|
||||||
|
gnome-desktop-testing \
|
||||||
gobject-introspection-devel \
|
gobject-introspection-devel \
|
||||||
graphene-devel \
|
graphene-devel \
|
||||||
gstreamer1-devel \
|
gstreamer1-devel \
|
||||||
@@ -41,12 +42,14 @@ RUN dnf -y install \
|
|||||||
itstool \
|
itstool \
|
||||||
json-glib-devel \
|
json-glib-devel \
|
||||||
lcov \
|
lcov \
|
||||||
|
libasan \
|
||||||
libattr-devel \
|
libattr-devel \
|
||||||
libepoxy-devel \
|
libepoxy-devel \
|
||||||
libffi-devel \
|
libffi-devel \
|
||||||
libmount-devel \
|
libmount-devel \
|
||||||
librsvg2 \
|
librsvg2 \
|
||||||
libselinux-devel \
|
libselinux-devel \
|
||||||
|
libubsan \
|
||||||
libXcomposite-devel \
|
libXcomposite-devel \
|
||||||
libXcursor-devel \
|
libXcursor-devel \
|
||||||
libXcursor-devel \
|
libXcursor-devel \
|
||||||
@@ -73,7 +76,6 @@ RUN dnf -y install \
|
|||||||
python3-wheel \
|
python3-wheel \
|
||||||
redhat-rpm-config \
|
redhat-rpm-config \
|
||||||
sassc \
|
sassc \
|
||||||
sysprof-devel \
|
|
||||||
systemtap-sdt-devel \
|
systemtap-sdt-devel \
|
||||||
vulkan-devel \
|
vulkan-devel \
|
||||||
wayland-devel \
|
wayland-devel \
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v19
|
FROM registry.gitlab.gnome.org/gnome/gtk/fedora-base:v21
|
||||||
|
|
||||||
|
# Enable sudo for wheel users
|
||||||
|
RUN sed -i -e 's/# %wheel/%wheel/' -e '0,/%wheel/{s/%wheel/# %wheel/}' /etc/sudoers
|
||||||
|
|
||||||
ARG HOST_USER_ID=5555
|
ARG HOST_USER_ID=5555
|
||||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||||
RUN useradd -u $HOST_USER_ID -ms /bin/bash user
|
RUN useradd -u $HOST_USER_ID -G wheel -ms /bin/bash user
|
||||||
|
|
||||||
USER user
|
USER user
|
||||||
WORKDIR /home/user
|
WORKDIR /home/user
|
||||||
|
|||||||
@@ -7,14 +7,17 @@ srcdir=$( pwd )
|
|||||||
builddir=$1
|
builddir=$1
|
||||||
backend=$2
|
backend=$2
|
||||||
|
|
||||||
|
# Ignore memory leaks lower in dependencies
|
||||||
|
export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp
|
||||||
|
|
||||||
case "${backend}" in
|
case "${backend}" in
|
||||||
x11)
|
x11)
|
||||||
xvfb-run -a -s "-screen 0 1024x768x24" \
|
xvfb-run -a -s "-screen 0 1024x768x24 -noreset" \
|
||||||
meson test -C ${builddir} \
|
meson test -C ${builddir} \
|
||||||
|
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||||
--print-errorlogs \
|
--print-errorlogs \
|
||||||
--setup=${backend} \
|
--setup=${backend} \
|
||||||
--suite=gtk \
|
--suite=gtk \
|
||||||
--no-suite=gtk:a11y \
|
|
||||||
--no-suite=gsk-compare-broadway
|
--no-suite=gsk-compare-broadway
|
||||||
|
|
||||||
# Store the exit code for the CI run, but always
|
# Store the exit code for the CI run, but always
|
||||||
@@ -30,10 +33,10 @@ case "${backend}" in
|
|||||||
export WAYLAND_DISPLAY=wayland-5
|
export WAYLAND_DISPLAY=wayland-5
|
||||||
|
|
||||||
meson test -C ${builddir} \
|
meson test -C ${builddir} \
|
||||||
|
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||||
--print-errorlogs \
|
--print-errorlogs \
|
||||||
--setup=${backend} \
|
--setup=${backend} \
|
||||||
--suite=gtk \
|
--suite=gtk \
|
||||||
--no-suite=gtk:a11y \
|
|
||||||
--no-suite=gsk-compare-broadway
|
--no-suite=gsk-compare-broadway
|
||||||
|
|
||||||
exit_code=$?
|
exit_code=$?
|
||||||
@@ -48,10 +51,10 @@ case "${backend}" in
|
|||||||
export BROADWAY_DISPLAY=:5
|
export BROADWAY_DISPLAY=:5
|
||||||
|
|
||||||
meson test -C ${builddir} \
|
meson test -C ${builddir} \
|
||||||
|
--timeout-multiplier "${MESON_TEST_TIMEOUT_MULTIPLIER}" \
|
||||||
--print-errorlogs \
|
--print-errorlogs \
|
||||||
--setup=${backend} \
|
--setup=${backend} \
|
||||||
--suite=gtk \
|
--suite=gtk \
|
||||||
--no-suite=gtk:a11y \
|
|
||||||
--no-suite=gsk-compare-opengl
|
--no-suite=gsk-compare-opengl
|
||||||
|
|
||||||
# don't let Broadway failures fail the run, for now
|
# don't let Broadway failures fail the run, for now
|
||||||
|
|||||||
@@ -33,17 +33,29 @@ pacman --noconfirm -S --needed \
|
|||||||
mingw-w64-$MSYS2_ARCH-gst-plugins-bad \
|
mingw-w64-$MSYS2_ARCH-gst-plugins-bad \
|
||||||
mingw-w64-$MSYS2_ARCH-shared-mime-info
|
mingw-w64-$MSYS2_ARCH-shared-mime-info
|
||||||
|
|
||||||
# https://gitlab.gnome.org/GNOME/gtk/issues/2243
|
|
||||||
wget "https://gitlab.gnome.org/creiter/gitlab-ci-win32-runner-v2/raw/master/pango/mingw-w64-$MSYS2_ARCH-pango-git-1.44.7.90.ge48ae523-1-any.pkg.tar.zst"
|
|
||||||
pacman --noconfirm -U "mingw-w64-$MSYS2_ARCH-pango-git-1.44.7.90.ge48ae523-1-any.pkg.tar.zst"
|
|
||||||
|
|
||||||
# https://github.com/msys2/MINGW-packages/pull/6465
|
|
||||||
pacman --noconfirm -S --needed mingw-w64-$MSYS2_ARCH-brotli
|
|
||||||
|
|
||||||
mkdir -p _ccache
|
mkdir -p _ccache
|
||||||
export CCACHE_BASEDIR="$(pwd)"
|
export CCACHE_BASEDIR="$(pwd)"
|
||||||
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
export CCACHE_DIR="${CCACHE_BASEDIR}/_ccache"
|
||||||
|
|
||||||
|
# https://gitlab.gnome.org/GNOME/gtk/-/issues/2243
|
||||||
|
# https://gitlab.gnome.org/GNOME/gtk/-/issues/3002
|
||||||
|
|
||||||
|
if ! pkg-config --atleast-version=2.65.0 glib-2.0; then
|
||||||
|
git clone https://gitlab.gnome.org/GNOME/glib.git _glib
|
||||||
|
meson setup _glib_build _glib
|
||||||
|
meson compile -C _glib_build
|
||||||
|
meson install -C _glib_build
|
||||||
|
fi
|
||||||
|
pkg-config --modversion glib-2.0
|
||||||
|
|
||||||
|
if ! pkg-config --atleast-version=1.45.4 pango; then
|
||||||
|
git clone https://gitlab.gnome.org/GNOME/pango.git _pango
|
||||||
|
meson setup _pango_build _pango
|
||||||
|
meson compile -C _pango_build
|
||||||
|
meson install -C _pango_build
|
||||||
|
fi
|
||||||
|
pkg-config --modversion pango
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
ccache --zero-stats
|
ccache --zero-stats
|
||||||
ccache --show-stats
|
ccache --show-stats
|
||||||
@@ -56,7 +68,7 @@ meson \
|
|||||||
-Dwin32-backend=true \
|
-Dwin32-backend=true \
|
||||||
-Dvulkan=no \
|
-Dvulkan=no \
|
||||||
-Dintrospection=false \
|
-Dintrospection=false \
|
||||||
--werror \
|
-Dgtk:werror=true \
|
||||||
_build
|
_build
|
||||||
unset CCACHE_DISABLE
|
unset CCACHE_DISABLE
|
||||||
|
|
||||||
|
|||||||
139
NEWS
139
NEWS
@@ -1,3 +1,142 @@
|
|||||||
|
Overview of Changes in GTK 3.99.1
|
||||||
|
=================================
|
||||||
|
|
||||||
|
* GtkGridLayout: Rename left-/top-attach to column/row
|
||||||
|
|
||||||
|
* Drop GtkAccelLabel - it is no longer used
|
||||||
|
|
||||||
|
* GtkTextView:
|
||||||
|
- Fix redraw issues with selections
|
||||||
|
- Make insert-emoji replace the selection
|
||||||
|
|
||||||
|
* GtkTreeView:
|
||||||
|
- Fix selection handling in cell editables
|
||||||
|
|
||||||
|
* CSS:
|
||||||
|
- Hexadecimal colors can now specify alpha
|
||||||
|
|
||||||
|
* Documentation:
|
||||||
|
- Refresh the widget gallery
|
||||||
|
- Add images for new widgets to the gallery
|
||||||
|
- Fix many cross-references
|
||||||
|
|
||||||
|
* Demos:
|
||||||
|
- Numerous crash- and bug fixes
|
||||||
|
|
||||||
|
* Fix build with cups < 2.3
|
||||||
|
|
||||||
|
* win32:
|
||||||
|
- Default to the GL renderer when we can
|
||||||
|
|
||||||
|
* Translation updates:
|
||||||
|
Catalan
|
||||||
|
Polish
|
||||||
|
Romanian
|
||||||
|
Spanish
|
||||||
|
Ukrainian
|
||||||
|
|
||||||
|
|
||||||
|
Overview of Changes in GTK 3.99.0
|
||||||
|
=================================
|
||||||
|
|
||||||
|
* Remove the old accessibility implementation and
|
||||||
|
add the foundations for a new one that is based
|
||||||
|
on ARIA. The relevant widget api is GtkAccessible,
|
||||||
|
the backend implementations will use GtkATContext.
|
||||||
|
Currently, there is just a nascent test backend.
|
||||||
|
|
||||||
|
* Update the GTK headers to use char *, int, float and
|
||||||
|
double instead of the corresponding GLib types.
|
||||||
|
|
||||||
|
* Add GtkEditableLabel, a label that can be edited
|
||||||
|
|
||||||
|
* Add GtkBookmarkList, a list model for bookmarks
|
||||||
|
|
||||||
|
* Add GtkStringList, a list model for strings
|
||||||
|
|
||||||
|
* Add GtkBitset, and use it for representing selections
|
||||||
|
|
||||||
|
* GtkTreeView:
|
||||||
|
- Make cell editing work again
|
||||||
|
|
||||||
|
* GtkSpinButton:
|
||||||
|
- Make autosizing work again
|
||||||
|
|
||||||
|
* Printing:
|
||||||
|
- Use GtkDropDown in the print dialog
|
||||||
|
|
||||||
|
* GtkApplication
|
||||||
|
- Support opening files on OS X
|
||||||
|
|
||||||
|
* GtkFileChooser:
|
||||||
|
- Fix libcloudproviders support
|
||||||
|
- Turn GtkFileFilter into a GtkFilter
|
||||||
|
- Simplify the api
|
||||||
|
|
||||||
|
* GtkGridView, GtkListView:
|
||||||
|
- Improve scrolling behavior
|
||||||
|
- Autoscroll and autoexpand during DND
|
||||||
|
|
||||||
|
* GtkScrolledWindow:
|
||||||
|
- Make autoscrolling work again
|
||||||
|
|
||||||
|
* GtkFilterListModel:
|
||||||
|
- Add incremental filtering
|
||||||
|
- Add a boolean filter, GtkBoolFilter
|
||||||
|
|
||||||
|
* GtkSortListModel:
|
||||||
|
- Use timsort
|
||||||
|
- Add various tweaks that massively speed up sorting
|
||||||
|
- Add incremental sorting
|
||||||
|
|
||||||
|
* GtkWidget:
|
||||||
|
- Massively speed up action handling
|
||||||
|
|
||||||
|
* GtkEntry:
|
||||||
|
- Make entry completion work again
|
||||||
|
- Drop action support from GtkEntryCompletion
|
||||||
|
|
||||||
|
* Inspector:
|
||||||
|
- Improve list model support
|
||||||
|
- Add direct navigation between objects
|
||||||
|
- Show accessibility information
|
||||||
|
|
||||||
|
* GDK:
|
||||||
|
- Compress scroll events
|
||||||
|
- Keep a scroll history
|
||||||
|
- Clean up GdkDevice api
|
||||||
|
- Drop the master/slave device split
|
||||||
|
- Move axes to GdkDeviceTool
|
||||||
|
- Change monitor workarea to be per-backend API
|
||||||
|
- Improve frame clock accuracy
|
||||||
|
- Add a new macOS backend
|
||||||
|
- Add an ANGLE-based GLES renderer for Windows
|
||||||
|
|
||||||
|
* GSK:
|
||||||
|
- Use GL_ARB_framebuffer_object
|
||||||
|
|
||||||
|
* gtk-demo:
|
||||||
|
- Add incremental refill to the color grid
|
||||||
|
- Improve performance of the color grid
|
||||||
|
- Add an incrementally filtering word list
|
||||||
|
- Improve the sidebar
|
||||||
|
|
||||||
|
* Install print-editor as another demo
|
||||||
|
|
||||||
|
* Translation updates
|
||||||
|
Basque
|
||||||
|
Catalan
|
||||||
|
Chinese
|
||||||
|
Japanese
|
||||||
|
Kazakh
|
||||||
|
Lithuanian
|
||||||
|
Polish
|
||||||
|
Romanian
|
||||||
|
Spanish
|
||||||
|
Turkish
|
||||||
|
Ukrainian
|
||||||
|
|
||||||
|
|
||||||
Overview of Changes in GTK 3.98.5
|
Overview of Changes in GTK 3.98.5
|
||||||
=================================
|
=================================
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,6 @@ building for:
|
|||||||
- [Pango](https://download.gnome.org/sources/pango)
|
- [Pango](https://download.gnome.org/sources/pango)
|
||||||
- [Epoxy](https://github.com/anholt/libepoxy)
|
- [Epoxy](https://github.com/anholt/libepoxy)
|
||||||
- [Graphene](https://github.com/ebassi/graphene)
|
- [Graphene](https://github.com/ebassi/graphene)
|
||||||
- [ATK](https://download.gnome.org/sources/atk)
|
|
||||||
- [Xkb-common](https://github.com/xkbcommon/libxkbcommon)
|
- [Xkb-common](https://github.com/xkbcommon/libxkbcommon)
|
||||||
|
|
||||||
If you are building the X11 backend, you will also need:
|
If you are building the X11 backend, you will also need:
|
||||||
@@ -70,7 +69,6 @@ If you are building the X11 backend, you will also need:
|
|||||||
- xcursor
|
- xcursor
|
||||||
- xdamage
|
- xdamage
|
||||||
- xcomposite
|
- xcomposite
|
||||||
- [atk-bridge-2.0](https://download.gnome.org/sources/at-spi2-atk)
|
|
||||||
|
|
||||||
If you are building the Wayland backend, you will also need:
|
If you are building the Wayland backend, you will also need:
|
||||||
|
|
||||||
|
|||||||
@@ -1,29 +1,38 @@
|
|||||||
{
|
{
|
||||||
"app-id": "org.gtk.WidgetFactory4",
|
"app-id" : "org.gtk.WidgetFactory4",
|
||||||
"runtime": "org.gnome.Platform",
|
"runtime" : "org.gnome.Platform",
|
||||||
"runtime-version": "master",
|
"runtime-version" : "master",
|
||||||
"sdk": "org.gnome.Sdk",
|
"sdk" : "org.gnome.Sdk",
|
||||||
"command": "gtk4-widget-factory",
|
"command" : "gtk4-widget-factory",
|
||||||
"tags": ["devel", "development", "nightly"],
|
"tags" : [
|
||||||
"desktop-file-name-prefix": "(Development) ",
|
"devel",
|
||||||
"finish-args": [
|
"development",
|
||||||
|
"nightly"
|
||||||
|
],
|
||||||
|
"desktop-file-name-prefix" : "(Development) ",
|
||||||
|
"finish-args" : [
|
||||||
"--device=dri",
|
"--device=dri",
|
||||||
"--share=ipc",
|
"--share=ipc",
|
||||||
"--socket=fallback-x11",
|
"--socket=fallback-x11",
|
||||||
"--socket=wayland",
|
"--socket=wayland",
|
||||||
"--talk-name=org.gtk.vfs", "--talk-name=org.gtk.vfs.*"
|
"--talk-name=org.gtk.vfs",
|
||||||
|
"--talk-name=org.gtk.vfs.*"
|
||||||
],
|
],
|
||||||
"cleanup": [
|
"cleanup" : [
|
||||||
"/include",
|
"/include",
|
||||||
"/lib/pkgconfig", "/share/pkgconfig",
|
"/lib/pkgconfig",
|
||||||
|
"/share/pkgconfig",
|
||||||
"/share/aclocal",
|
"/share/aclocal",
|
||||||
"/man", "/share/man", "/share/gtk-doc",
|
"/man",
|
||||||
"*.la", ".a",
|
"/share/man",
|
||||||
|
"/share/gtk-doc",
|
||||||
|
"*.la",
|
||||||
|
".a",
|
||||||
"/lib/girepository-1.0",
|
"/lib/girepository-1.0",
|
||||||
"/share/gir-1.0",
|
"/share/gir-1.0",
|
||||||
"/share/doc"
|
"/share/doc"
|
||||||
],
|
],
|
||||||
"modules": [
|
"modules" : [
|
||||||
{
|
{
|
||||||
"name" : "wayland",
|
"name" : "wayland",
|
||||||
"buildsystem" : "autotools",
|
"buildsystem" : "autotools",
|
||||||
@@ -39,18 +48,18 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "graphene",
|
"name" : "graphene",
|
||||||
"buildsystem": "meson",
|
"buildsystem" : "meson",
|
||||||
"builddir": true,
|
"builddir" : true,
|
||||||
"config-opts": [
|
"config-opts" : [
|
||||||
"--libdir=/app/lib",
|
"--libdir=/app/lib",
|
||||||
"-Dtests=false",
|
"-Dtests=false",
|
||||||
"-Dbenchmarks=false"
|
"-Dbenchmarks=false"
|
||||||
],
|
],
|
||||||
"sources": [
|
"sources" : [
|
||||||
{
|
{
|
||||||
"type": "git",
|
"type" : "git",
|
||||||
"url": "https://github.com/ebassi/graphene.git"
|
"url" : "https://github.com/ebassi/graphene.git"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@@ -58,7 +67,7 @@
|
|||||||
"name" : "libsass",
|
"name" : "libsass",
|
||||||
"buildsystem" : "meson",
|
"buildsystem" : "meson",
|
||||||
"builddir" : true,
|
"builddir" : true,
|
||||||
"config-opts": [
|
"config-opts" : [
|
||||||
"--libdir=/app/lib"
|
"--libdir=/app/lib"
|
||||||
],
|
],
|
||||||
"sources" : [
|
"sources" : [
|
||||||
@@ -73,7 +82,7 @@
|
|||||||
"name" : "sassc",
|
"name" : "sassc",
|
||||||
"buildsystem" : "meson",
|
"buildsystem" : "meson",
|
||||||
"builddir" : true,
|
"builddir" : true,
|
||||||
"config-opts": [
|
"config-opts" : [
|
||||||
"--libdir=/app/lib"
|
"--libdir=/app/lib"
|
||||||
],
|
],
|
||||||
"sources" : [
|
"sources" : [
|
||||||
@@ -85,18 +94,23 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "gtk",
|
"name" : "gtk",
|
||||||
"buildsystem": "meson",
|
"buildsystem" : "meson",
|
||||||
"builddir": true,
|
"builddir" : true,
|
||||||
"config-opts": [
|
"config-opts" : [
|
||||||
"--libdir=/app/lib"
|
"--libdir=/app/lib"
|
||||||
],
|
],
|
||||||
"sources": [
|
"sources" : [
|
||||||
{
|
{
|
||||||
"type": "git",
|
"type" : "git",
|
||||||
"url": "https://gitlab.gnome.org/GNOME/gtk.git"
|
"url" : "https://gitlab.gnome.org/GNOME/gtk.git"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"build-options" : {
|
||||||
|
"env" : {
|
||||||
|
"DBUS_SESSION_BUS_ADDRESS" : "''"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,13 @@ if 'DESTDIR' not in os.environ:
|
|||||||
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
gtk_immodule_dir = os.path.join(gtk_moduledir, 'immodules')
|
||||||
|
|
||||||
print('Compiling GSettings schemas...')
|
print('Compiling GSettings schemas...')
|
||||||
subprocess.call(['glib-compile-schemas',
|
glib_compile_schemas = subprocess.check_output(['pkg-config',
|
||||||
|
'--variable=glib_compile_schemas',
|
||||||
|
'gio-2.0']).strip()
|
||||||
|
if not os.path.exists(glib_compile_schemas):
|
||||||
|
# pkg-config variables only available since GLib 2.62.0.
|
||||||
|
glib_compile_schemas = 'glib-compile-schemas'
|
||||||
|
subprocess.call([glib_compile_schemas,
|
||||||
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
os.path.join(gtk_datadir, 'glib-2.0', 'schemas')])
|
||||||
|
|
||||||
print('Updating icon cache...')
|
print('Updating icon cache...')
|
||||||
@@ -24,8 +30,14 @@ if 'DESTDIR' not in os.environ:
|
|||||||
|
|
||||||
print('Updating module cache for print backends...')
|
print('Updating module cache for print backends...')
|
||||||
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
os.makedirs(gtk_printmodule_dir, exist_ok=True)
|
||||||
subprocess.call(['gio-querymodules', gtk_printmodule_dir])
|
gio_querymodules = subprocess.check_output(['pkg-config',
|
||||||
|
'--variable=gio_querymodules',
|
||||||
|
'gio-2.0']).strip()
|
||||||
|
if not os.path.exists(gio_querymodules):
|
||||||
|
# pkg-config variables only available since GLib 2.62.0.
|
||||||
|
gio_querymodules = 'gio-querymodules'
|
||||||
|
subprocess.call([gio_querymodules, gtk_printmodule_dir])
|
||||||
|
|
||||||
print('Updating module cache for input methods...')
|
print('Updating module cache for input methods...')
|
||||||
os.makedirs(gtk_immodule_dir, exist_ok=True)
|
os.makedirs(gtk_immodule_dir, exist_ok=True)
|
||||||
subprocess.call(['gio-querymodules', gtk_immodule_dir])
|
subprocess.call([gio_querymodules, gtk_immodule_dir])
|
||||||
|
|||||||
@@ -81,11 +81,11 @@ constraint_editor_application_activate (GApplication *app)
|
|||||||
static void
|
static void
|
||||||
constraint_editor_application_open (GApplication *app,
|
constraint_editor_application_open (GApplication *app,
|
||||||
GFile **files,
|
GFile **files,
|
||||||
gint n_files,
|
int n_files,
|
||||||
const gchar *hint)
|
const char *hint)
|
||||||
{
|
{
|
||||||
ConstraintEditorWindow *win;
|
ConstraintEditorWindow *win;
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < n_files; i++)
|
for (i = 0; i < n_files; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ constraint_editor_window_load (ConstraintEditorWindow *self,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
open_response_cb (GtkNativeDialog *dialog,
|
open_response_cb (GtkNativeDialog *dialog,
|
||||||
gint response,
|
int response,
|
||||||
ConstraintEditorWindow *self)
|
ConstraintEditorWindow *self)
|
||||||
{
|
{
|
||||||
gtk_native_dialog_hide (dialog);
|
gtk_native_dialog_hide (dialog);
|
||||||
@@ -285,7 +285,7 @@ serialize_model (GListModel *list)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
save_response_cb (GtkNativeDialog *dialog,
|
save_response_cb (GtkNativeDialog *dialog,
|
||||||
gint response,
|
int response,
|
||||||
ConstraintEditorWindow *self)
|
ConstraintEditorWindow *self)
|
||||||
{
|
{
|
||||||
gtk_native_dialog_hide (dialog);
|
gtk_native_dialog_hide (dialog);
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
<property name="default-height">768</property>
|
<property name="default-height">768</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="header">
|
<object class="GtkHeaderBar" id="header">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child type="start">
|
<child type="start">
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="icon-name">document-open-symbolic</property>
|
<property name="icon-name">document-open-symbolic</property>
|
||||||
|
|||||||
@@ -13,8 +13,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Target</property>
|
<property name="label">Target</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||||
<signal name="changed" handler="update_button" swapped="yes"/>
|
<signal name="changed" handler="update_button" swapped="yes"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -32,8 +32,8 @@
|
|||||||
<object class="GtkComboBoxText" id="target_attr">
|
<object class="GtkComboBoxText" id="target_attr">
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -41,8 +41,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Relation</property>
|
<property name="label">Relation</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
<object class="GtkComboBoxText" id="relation">
|
<object class="GtkComboBoxText" id="relation">
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -59,8 +59,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Source</property>
|
<property name="label">Source</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -69,8 +69,8 @@
|
|||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||||
<signal name="changed" handler="update_button" swapped="yes"/>
|
<signal name="changed" handler="update_button" swapped="yes"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -79,8 +79,8 @@
|
|||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||||
<signal name="changed" handler="source_attr_changed" swapped="yes"/>
|
<signal name="changed" handler="source_attr_changed" swapped="yes"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -88,8 +88,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Multiplier</property>
|
<property name="label">Multiplier</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">4</property>
|
<property name="row">4</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -97,8 +97,8 @@
|
|||||||
<object class="GtkEntry" id="multiplier">
|
<object class="GtkEntry" id="multiplier">
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">4</property>
|
<property name="row">4</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -106,8 +106,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Constant</property>
|
<property name="label">Constant</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">5</property>
|
<property name="row">5</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -115,8 +115,8 @@
|
|||||||
<object class="GtkEntry" id="constant">
|
<object class="GtkEntry" id="constant">
|
||||||
<signal name="changed" handler="update_preview" swapped="yes"/>
|
<signal name="changed" handler="update_preview" swapped="yes"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">5</property>
|
<property name="row">5</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -124,16 +124,16 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Strength</property>
|
<property name="label">Strength</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">6</property>
|
<property name="row">6</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkComboBoxText" id="strength">
|
<object class="GtkComboBoxText" id="strength">
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">6</property>
|
<property name="row">6</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -141,8 +141,8 @@
|
|||||||
<object class="GtkLabel" id="preview">
|
<object class="GtkLabel" id="preview">
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">7</property>
|
<property name="row">7</property>
|
||||||
<property name="column-span">2</property>
|
<property name="column-span">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
<attributes>
|
<attributes>
|
||||||
@@ -155,8 +155,8 @@
|
|||||||
<property name="label">Create</property>
|
<property name="label">Create</property>
|
||||||
<signal name="clicked" handler="create_constraint"/>
|
<signal name="clicked" handler="create_constraint"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">8</property>
|
<property name="row">8</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -174,28 +174,25 @@ constraint_view_init (ConstraintView *self)
|
|||||||
manager = gtk_constraint_layout_new ();
|
manager = gtk_constraint_layout_new ();
|
||||||
gtk_widget_set_layout_manager (GTK_WIDGET (self), manager);
|
gtk_widget_set_layout_manager (GTK_WIDGET (self), manager);
|
||||||
|
|
||||||
all_children = gtk_widget_observe_children (GTK_WIDGET (self));
|
|
||||||
all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager));
|
|
||||||
guides = gtk_constraint_layout_observe_guides (GTK_CONSTRAINT_LAYOUT (manager));
|
guides = gtk_constraint_layout_observe_guides (GTK_CONSTRAINT_LAYOUT (manager));
|
||||||
|
|
||||||
|
all_constraints = gtk_constraint_layout_observe_constraints (GTK_CONSTRAINT_LAYOUT (manager));
|
||||||
filter = gtk_custom_filter_new (omit_internal, NULL, NULL);
|
filter = gtk_custom_filter_new (omit_internal, NULL, NULL);
|
||||||
constraints = (GListModel *)gtk_filter_list_model_new (all_constraints, filter);
|
constraints = (GListModel *)gtk_filter_list_model_new (all_constraints, filter);
|
||||||
g_object_unref (filter);
|
|
||||||
|
all_children = gtk_widget_observe_children (GTK_WIDGET (self));
|
||||||
filter = gtk_custom_filter_new (omit_internal, NULL, NULL);
|
filter = gtk_custom_filter_new (omit_internal, NULL, NULL);
|
||||||
children = (GListModel *)gtk_filter_list_model_new (all_children, filter);
|
children = (GListModel *)gtk_filter_list_model_new (all_children, filter);
|
||||||
g_object_unref (filter);
|
|
||||||
|
|
||||||
list = g_list_store_new (G_TYPE_LIST_MODEL);
|
list = g_list_store_new (G_TYPE_LIST_MODEL);
|
||||||
g_list_store_append (list, children);
|
g_list_store_append (list, children);
|
||||||
g_list_store_append (list, guides);
|
g_list_store_append (list, guides);
|
||||||
g_list_store_append (list, constraints);
|
g_list_store_append (list, constraints);
|
||||||
self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_TYPE_OBJECT, G_LIST_MODEL (list)));
|
|
||||||
g_object_unref (children);
|
g_object_unref (children);
|
||||||
g_object_unref (guides);
|
g_object_unref (guides);
|
||||||
g_object_unref (constraints);
|
g_object_unref (constraints);
|
||||||
g_object_unref (all_children);
|
|
||||||
g_object_unref (all_constraints);
|
|
||||||
g_object_unref (list);
|
|
||||||
|
|
||||||
|
self->model = G_LIST_MODEL (gtk_flatten_list_model_new (G_LIST_MODEL (list)));
|
||||||
|
|
||||||
controller = (GtkEventController *)gtk_gesture_drag_new ();
|
controller = (GtkEventController *)gtk_gesture_drag_new ();
|
||||||
g_signal_connect (controller, "drag-begin", G_CALLBACK (drag_begin), self);
|
g_signal_connect (controller, "drag-begin", G_CALLBACK (drag_begin), self);
|
||||||
|
|||||||
@@ -55,8 +55,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Name</property>
|
<property name="label">Name</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -64,8 +64,8 @@
|
|||||||
<object class="GtkEntry" id="name">
|
<object class="GtkEntry" id="name">
|
||||||
<property name="max-width-chars">20</property>
|
<property name="max-width-chars">20</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
<property name="column-span">2</property>
|
<property name="column-span">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
@@ -74,8 +74,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Min Size</property>
|
<property name="label">Min Size</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -84,8 +84,8 @@
|
|||||||
<property name="adjustment">min_width_adj</property>
|
<property name="adjustment">min_width_adj</property>
|
||||||
<property name="max-width-chars">5</property>
|
<property name="max-width-chars">5</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -94,8 +94,8 @@
|
|||||||
<property name="adjustment">min_height_adj</property>
|
<property name="adjustment">min_height_adj</property>
|
||||||
<property name="max-width-chars">5</property>
|
<property name="max-width-chars">5</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -103,8 +103,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Nat Size</property>
|
<property name="label">Nat Size</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -113,8 +113,8 @@
|
|||||||
<property name="adjustment">nat_width_adj</property>
|
<property name="adjustment">nat_width_adj</property>
|
||||||
<property name="max-width-chars">5</property>
|
<property name="max-width-chars">5</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -123,8 +123,8 @@
|
|||||||
<property name="adjustment">nat_height_adj</property>
|
<property name="adjustment">nat_height_adj</property>
|
||||||
<property name="max-width-chars">5</property>
|
<property name="max-width-chars">5</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -132,8 +132,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Max Size</property>
|
<property name="label">Max Size</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -142,8 +142,8 @@
|
|||||||
<property name="adjustment">max_width_adj</property>
|
<property name="adjustment">max_width_adj</property>
|
||||||
<property name="max-width-chars">5</property>
|
<property name="max-width-chars">5</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -152,8 +152,8 @@
|
|||||||
<property name="adjustment">max_height_adj</property>
|
<property name="adjustment">max_height_adj</property>
|
||||||
<property name="max-width-chars">5</property>
|
<property name="max-width-chars">5</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -161,16 +161,16 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label">Strength</property>
|
<property name="label">Strength</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">4</property>
|
<property name="row">4</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkComboBoxText" id="strength">
|
<object class="GtkComboBoxText" id="strength">
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">4</property>
|
<property name="row">4</property>
|
||||||
<property name="column-span">2</property>
|
<property name="column-span">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
@@ -180,8 +180,8 @@
|
|||||||
<property name="label">Create</property>
|
<property name="label">Create</property>
|
||||||
<signal name="clicked" handler="create_guide"/>
|
<signal name="clicked" handler="create_guide"/>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">5</property>
|
<property name="row">5</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ static void create_window (GApplication *app, const char *contents);
|
|||||||
static void
|
static void
|
||||||
show_action_dialog (GSimpleAction *action)
|
show_action_dialog (GSimpleAction *action)
|
||||||
{
|
{
|
||||||
const gchar *name;
|
const char *name;
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
|
||||||
name = g_action_get_name (G_ACTION (action));
|
name = g_action_get_name (G_ACTION (action));
|
||||||
@@ -58,9 +58,9 @@ show_action_infobar (GSimpleAction *action,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
DemoApplicationWindow *window = data;
|
DemoApplicationWindow *window = data;
|
||||||
gchar *text;
|
char *text;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
const gchar *value;
|
const char *value;
|
||||||
|
|
||||||
name = g_action_get_name (G_ACTION (action));
|
name = g_action_get_name (G_ACTION (action));
|
||||||
value = g_variant_get_string (parameter, NULL);
|
value = g_variant_get_string (parameter, NULL);
|
||||||
@@ -92,7 +92,7 @@ activate_new (GSimpleAction *action,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
open_response_cb (GtkNativeDialog *dialog,
|
open_response_cb (GtkNativeDialog *dialog,
|
||||||
gint response_id,
|
int response_id,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkFileChooserNative *native = user_data;
|
GtkFileChooserNative *native = user_data;
|
||||||
@@ -185,7 +185,7 @@ activate_about (GSimpleAction *action,
|
|||||||
{
|
{
|
||||||
GtkWidget *window = user_data;
|
GtkWidget *window = user_data;
|
||||||
|
|
||||||
const gchar *authors[] = {
|
const char *authors[] = {
|
||||||
"Peter Mattis",
|
"Peter Mattis",
|
||||||
"Spencer Kimball",
|
"Spencer Kimball",
|
||||||
"Josh MacDonald",
|
"Josh MacDonald",
|
||||||
@@ -193,7 +193,7 @@ activate_about (GSimpleAction *action,
|
|||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
const gchar *documentors[] = {
|
const char *documentors[] = {
|
||||||
"Owen Taylor",
|
"Owen Taylor",
|
||||||
"Tony Gale",
|
"Tony Gale",
|
||||||
"Matthias Clasen <mclasen@redhat.com>",
|
"Matthias Clasen <mclasen@redhat.com>",
|
||||||
@@ -244,9 +244,9 @@ static void
|
|||||||
update_statusbar (GtkTextBuffer *buffer,
|
update_statusbar (GtkTextBuffer *buffer,
|
||||||
DemoApplicationWindow *window)
|
DemoApplicationWindow *window)
|
||||||
{
|
{
|
||||||
gchar *msg;
|
char *msg;
|
||||||
gint row, col;
|
int row, col;
|
||||||
gint count;
|
int count;
|
||||||
GtkTextIter iter;
|
GtkTextIter iter;
|
||||||
|
|
||||||
/* clear any previous message, underflow is allowed */
|
/* clear any previous message, underflow is allowed */
|
||||||
|
|||||||
@@ -31,8 +31,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -70,8 +70,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -79,8 +79,8 @@
|
|||||||
<object class="GtkStatusbar" id="status">
|
<object class="GtkStatusbar" id="status">
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ static GtkWidget *placeholder;
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
on_name_appeared (GDBusConnection *connection,
|
on_name_appeared (GDBusConnection *connection,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
const gchar *name_owner,
|
const char *name_owner,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
name_seen = TRUE;
|
name_seen = TRUE;
|
||||||
@@ -25,7 +25,7 @@ on_name_appeared (GDBusConnection *connection,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
on_name_vanished (GDBusConnection *connection,
|
on_name_vanished (GDBusConnection *connection,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
if (!name_seen)
|
if (!name_seen)
|
||||||
@@ -55,7 +55,7 @@ do_application_demo (GtkWidget *toplevel)
|
|||||||
|
|
||||||
if (placeholder == NULL)
|
if (placeholder == NULL)
|
||||||
{
|
{
|
||||||
const gchar *command;
|
const char *command;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
|
|
||||||
if (g_file_test ("./gtk4-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
|
if (g_file_test ("./gtk4-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ static GtkWidget *progress_bar = NULL;
|
|||||||
static gboolean
|
static gboolean
|
||||||
apply_changes_gradually (gpointer data)
|
apply_changes_gradually (gpointer data)
|
||||||
{
|
{
|
||||||
gdouble fraction;
|
double fraction;
|
||||||
|
|
||||||
/* Work, work, work... */
|
/* Work, work, work... */
|
||||||
fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));
|
fraction = gtk_progress_bar_get_fraction (GTK_PROGRESS_BAR (progress_bar));
|
||||||
@@ -47,8 +47,8 @@ on_assistant_close_cancel (GtkWidget *widget, gpointer data)
|
|||||||
static void
|
static void
|
||||||
on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data)
|
on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data)
|
||||||
{
|
{
|
||||||
gint current_page, n_pages;
|
int current_page, n_pages;
|
||||||
gchar *title;
|
char *title;
|
||||||
|
|
||||||
current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (widget));
|
current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (widget));
|
||||||
n_pages = gtk_assistant_get_n_pages (GTK_ASSISTANT (widget));
|
n_pages = gtk_assistant_get_n_pages (GTK_ASSISTANT (widget));
|
||||||
@@ -70,8 +70,8 @@ on_entry_changed (GtkWidget *widget, gpointer data)
|
|||||||
{
|
{
|
||||||
GtkAssistant *assistant = GTK_ASSISTANT (data);
|
GtkAssistant *assistant = GTK_ASSISTANT (data);
|
||||||
GtkWidget *current_page;
|
GtkWidget *current_page;
|
||||||
gint page_number;
|
int page_number;
|
||||||
const gchar *text;
|
const char *text;
|
||||||
|
|
||||||
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);
|
||||||
|
|||||||
@@ -18,8 +18,8 @@
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -29,8 +29,8 @@
|
|||||||
<property name="has-frame">1</property>
|
<property name="has-frame">1</property>
|
||||||
<property name="min-content-width">150</property>
|
<property name="min-content-width">150</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -40,8 +40,8 @@
|
|||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<property name="stack">stack</property>
|
<property name="stack">stack</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -67,8 +67,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Duck</property>
|
<property name="label" translatable="yes">Duck</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Background</property>
|
<property name="label" translatable="yes">Background</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -87,8 +87,8 @@
|
|||||||
<class name="duck"/>
|
<class name="duck"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -98,8 +98,8 @@
|
|||||||
<class name="gradient"/>
|
<class name="gradient"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -108,8 +108,8 @@
|
|||||||
<property name="label" translatable="yes">
|
<property name="label" translatable="yes">
|
||||||
Blended picture</property>
|
Blended picture</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
<property name="column-span">2</property>
|
<property name="column-span">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
@@ -121,8 +121,8 @@ Blended picture</property>
|
|||||||
<class name="blend0"/>
|
<class name="blend0"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
<property name="column-span">2</property>
|
<property name="column-span">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
@@ -146,8 +146,8 @@ Blended picture</property>
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Red</property>
|
<property name="label" translatable="yes">Red</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -155,8 +155,8 @@ Blended picture</property>
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="label" translatable="yes">Blue</property>
|
<property name="label" translatable="yes">Blue</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -166,8 +166,8 @@ Blended picture</property>
|
|||||||
<class name="red"/>
|
<class name="red"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -177,8 +177,8 @@ Blended picture</property>
|
|||||||
<class name="blue"/>
|
<class name="blue"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -187,8 +187,8 @@ Blended picture</property>
|
|||||||
<property name="label" translatable="yes">
|
<property name="label" translatable="yes">
|
||||||
Blended picture</property>
|
Blended picture</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
<property name="column-span">2</property>
|
<property name="column-span">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
@@ -200,8 +200,8 @@ Blended picture</property>
|
|||||||
<class name="blend1"/>
|
<class name="blend1"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
<property name="column-span">2</property>
|
<property name="column-span">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
@@ -228,8 +228,8 @@ Blended picture</property>
|
|||||||
<class name="cyan"/>
|
<class name="cyan"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -239,8 +239,8 @@ Blended picture</property>
|
|||||||
<class name="magenta"/>
|
<class name="magenta"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -250,8 +250,8 @@ Blended picture</property>
|
|||||||
<class name="yellow"/>
|
<class name="yellow"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -262,8 +262,8 @@ Blended picture</property>
|
|||||||
<class name="blend2"/>
|
<class name="blend2"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -275,8 +275,8 @@ Blended picture</property>
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -288,8 +288,8 @@ Blended picture</property>
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -301,8 +301,8 @@ Blended picture</property>
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -314,8 +314,8 @@ Blended picture</property>
|
|||||||
<attribute name="weight" value="bold"></attribute>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -324,8 +324,8 @@ Blended picture</property>
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ create_icon_store (void)
|
|||||||
|
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GtkListStore *store;
|
GtkListStore *store;
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ set_sensitive (GtkCellLayout *cell_layout,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
gint *indices;
|
int *indices;
|
||||||
gboolean sensitive;
|
gboolean sensitive;
|
||||||
|
|
||||||
path = gtk_tree_model_get_path (tree_model, iter);
|
path = gtk_tree_model_get_path (tree_model, iter);
|
||||||
@@ -175,7 +175,7 @@ create_capital_store (void)
|
|||||||
|
|
||||||
GtkTreeIter iter, iter2;
|
GtkTreeIter iter, iter2;
|
||||||
GtkTreeStore *store;
|
GtkTreeStore *store;
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
store = gtk_tree_store_new (1, G_TYPE_STRING);
|
store = gtk_tree_store_new (1, G_TYPE_STRING);
|
||||||
|
|
||||||
|
|||||||
@@ -38,14 +38,14 @@ struct {
|
|||||||
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
|
||||||
static void
|
static void
|
||||||
update_css_for_blend_mode (GtkCssProvider *provider,
|
update_css_for_blend_mode (GtkCssProvider *provider,
|
||||||
const gchar *blend_mode)
|
const char *blend_mode)
|
||||||
{
|
{
|
||||||
GBytes *bytes;
|
GBytes *bytes;
|
||||||
gchar *css;
|
char *css;
|
||||||
|
|
||||||
bytes = g_resources_lookup_data ("/css_blendmodes/css_blendmodes.css", 0, NULL);
|
bytes = g_resources_lookup_data ("/css_blendmodes/css_blendmodes.css", 0, NULL);
|
||||||
|
|
||||||
css = g_strdup_printf ((gchar*) g_bytes_get_data (bytes, NULL),
|
css = g_strdup_printf ((char *) g_bytes_get_data (bytes, NULL),
|
||||||
blend_mode,
|
blend_mode,
|
||||||
blend_mode,
|
blend_mode,
|
||||||
blend_mode);
|
blend_mode);
|
||||||
@@ -62,7 +62,7 @@ row_activated (GtkListBox *listbox,
|
|||||||
GtkListBoxRow *row,
|
GtkListBoxRow *row,
|
||||||
GtkCssProvider *provider)
|
GtkCssProvider *provider)
|
||||||
{
|
{
|
||||||
const gchar *blend_mode;
|
const char *blend_mode;
|
||||||
|
|
||||||
blend_mode = blend_modes[gtk_list_box_row_get_index (row)].id;
|
blend_mode = blend_modes[gtk_list_box_row_get_index (row)].id;
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ setup_listbox (GtkBuilder *builder,
|
|||||||
{
|
{
|
||||||
GtkWidget *normal_row;
|
GtkWidget *normal_row;
|
||||||
GtkWidget *listbox;
|
GtkWidget *listbox;
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
normal_row = NULL;
|
normal_row = NULL;
|
||||||
listbox = gtk_list_box_new ();
|
listbox = gtk_list_box_new ();
|
||||||
|
|||||||
@@ -140,6 +140,7 @@
|
|||||||
</gresource>
|
</gresource>
|
||||||
<gresource prefix="/listview_colors">
|
<gresource prefix="/listview_colors">
|
||||||
<file compressed="true">color.names.txt</file>
|
<file compressed="true">color.names.txt</file>
|
||||||
|
<file>listview_colors.css</file>
|
||||||
</gresource>
|
</gresource>
|
||||||
<gresource prefix="/shortcuts">
|
<gresource prefix="/shortcuts">
|
||||||
<file>shortcuts.ui</file>
|
<file>shortcuts.ui</file>
|
||||||
|
|||||||
@@ -95,9 +95,6 @@
|
|||||||
<property name="program-name" translatable="yes">Builder demo</property>
|
<property name="program-name" translatable="yes">Builder demo</property>
|
||||||
<property name="logo-icon-name" translatable="yes">gtk3-demo</property>
|
<property name="logo-icon-name" translatable="yes">gtk3-demo</property>
|
||||||
<property name="modal">True</property>
|
<property name="modal">True</property>
|
||||||
<accessibility>
|
|
||||||
<relation target="window1" type="subwindow-of"/>
|
|
||||||
</accessibility>
|
|
||||||
</object>
|
</object>
|
||||||
<object class="GtkWindow" id="window1">
|
<object class="GtkWindow" id="window1">
|
||||||
<property name="default-height">250</property>
|
<property name="default-height">250</property>
|
||||||
@@ -113,11 +110,6 @@
|
|||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox" id="toolbar1">
|
<object class="GtkBox" id="toolbar1">
|
||||||
<child internal-child="accessible">
|
|
||||||
<object class="AtkObject" id="a11y-toolbar">
|
|
||||||
<property name="AtkObject::accessible-name">The toolbar</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="label" translatable="yes">New</property>
|
<property name="label" translatable="yes">New</property>
|
||||||
@@ -174,14 +166,6 @@
|
|||||||
<object class="GtkTreeView" id="treeview1">
|
<object class="GtkTreeView" id="treeview1">
|
||||||
<property name="model">liststore1</property>
|
<property name="model">liststore1</property>
|
||||||
<property name="tooltip-column">3</property>
|
<property name="tooltip-column">3</property>
|
||||||
<child internal-child="accessible">
|
|
||||||
<object class="AtkObject" id="a11y-treeview">
|
|
||||||
<property name="AtkObject::accessible-name">Name list</property>
|
|
||||||
<property name="AtkObject::accessible-description">
|
|
||||||
A list of person with name, surname and age columns
|
|
||||||
</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkTreeViewColumn" id="column1">
|
<object class="GtkTreeViewColumn" id="column1">
|
||||||
<property name="title">Name</property>
|
<property name="title">Name</property>
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ G_DEFINE_TYPE(DemoImage, demo_image, GTK_TYPE_WIDGET)
|
|||||||
static GdkPaintable *
|
static GdkPaintable *
|
||||||
get_image_paintable (GtkImage *image)
|
get_image_paintable (GtkImage *image)
|
||||||
{
|
{
|
||||||
const gchar *icon_name;
|
const char *icon_name;
|
||||||
GtkIconTheme *icon_theme;
|
GtkIconTheme *icon_theme;
|
||||||
GtkIconPaintable *icon;
|
GtkIconPaintable *icon;
|
||||||
|
|
||||||
|
|||||||
@@ -23,14 +23,12 @@
|
|||||||
#include "demotaggedentry.h"
|
#include "demotaggedentry.h"
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include <gtk/gtk-a11y.h>
|
|
||||||
|
|
||||||
struct _DemoTaggedEntry
|
struct _DemoTaggedEntry
|
||||||
{
|
{
|
||||||
GtkWidget parent_instance;
|
GtkWidget parent_instance;
|
||||||
|
|
||||||
GtkWidget *box;
|
GtkWidget *text;
|
||||||
GtkWidget *entry;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _DemoTaggedEntryClass
|
struct _DemoTaggedEntryClass
|
||||||
@@ -46,15 +44,10 @@ G_DEFINE_TYPE_WITH_CODE (DemoTaggedEntry, demo_tagged_entry, GTK_TYPE_WIDGET,
|
|||||||
static void
|
static void
|
||||||
demo_tagged_entry_init (DemoTaggedEntry *entry)
|
demo_tagged_entry_init (DemoTaggedEntry *entry)
|
||||||
{
|
{
|
||||||
entry->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
entry->text = gtk_text_new ();
|
||||||
gtk_widget_set_parent (entry->box, GTK_WIDGET (entry));
|
gtk_widget_set_hexpand (entry->text, TRUE);
|
||||||
|
gtk_widget_set_vexpand (entry->text, TRUE);
|
||||||
entry->entry = gtk_text_new ();
|
gtk_widget_set_parent (entry->text, GTK_WIDGET (entry));
|
||||||
gtk_widget_set_hexpand (entry->entry, TRUE);
|
|
||||||
gtk_widget_set_vexpand (entry->entry, TRUE);
|
|
||||||
gtk_widget_set_hexpand (entry->box, FALSE);
|
|
||||||
gtk_widget_set_vexpand (entry->box, FALSE);
|
|
||||||
gtk_box_append (GTK_BOX (entry->box), entry->entry);
|
|
||||||
gtk_editable_init_delegate (GTK_EDITABLE (entry));
|
gtk_editable_init_delegate (GTK_EDITABLE (entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -62,12 +55,15 @@ static void
|
|||||||
demo_tagged_entry_dispose (GObject *object)
|
demo_tagged_entry_dispose (GObject *object)
|
||||||
{
|
{
|
||||||
DemoTaggedEntry *entry = DEMO_TAGGED_ENTRY (object);
|
DemoTaggedEntry *entry = DEMO_TAGGED_ENTRY (object);
|
||||||
|
GtkWidget *child;
|
||||||
|
|
||||||
if (entry->entry)
|
if (entry->text)
|
||||||
gtk_editable_finish_delegate (GTK_EDITABLE (entry));
|
gtk_editable_finish_delegate (GTK_EDITABLE (entry));
|
||||||
|
|
||||||
g_clear_pointer (&entry->entry, gtk_widget_unparent);
|
while ((child = gtk_widget_get_first_child (GTK_WIDGET (entry))))
|
||||||
g_clear_pointer (&entry->box, gtk_widget_unparent);
|
gtk_widget_unparent (child);
|
||||||
|
|
||||||
|
entry->text = NULL;
|
||||||
|
|
||||||
G_OBJECT_CLASS (demo_tagged_entry_parent_class)->dispose (object);
|
G_OBJECT_CLASS (demo_tagged_entry_parent_class)->dispose (object);
|
||||||
}
|
}
|
||||||
@@ -101,7 +97,7 @@ demo_tagged_entry_grab_focus (GtkWidget *widget)
|
|||||||
{
|
{
|
||||||
DemoTaggedEntry *entry = DEMO_TAGGED_ENTRY (widget);
|
DemoTaggedEntry *entry = DEMO_TAGGED_ENTRY (widget);
|
||||||
|
|
||||||
return gtk_widget_grab_focus (entry->entry);
|
return gtk_widget_grab_focus (entry->text);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -118,15 +114,14 @@ demo_tagged_entry_class_init (DemoTaggedEntryClass *klass)
|
|||||||
|
|
||||||
gtk_editable_install_properties (object_class, 1);
|
gtk_editable_install_properties (object_class, 1);
|
||||||
|
|
||||||
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BIN_LAYOUT);
|
gtk_widget_class_set_layout_manager_type (widget_class, GTK_TYPE_BOX_LAYOUT);
|
||||||
gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_ENTRY_ACCESSIBLE);
|
|
||||||
gtk_widget_class_set_css_name (widget_class, "entry");
|
gtk_widget_class_set_css_name (widget_class, "entry");
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkEditable *
|
static GtkEditable *
|
||||||
demo_tagged_entry_get_delegate (GtkEditable *editable)
|
demo_tagged_entry_get_delegate (GtkEditable *editable)
|
||||||
{
|
{
|
||||||
return GTK_EDITABLE (DEMO_TAGGED_ENTRY (editable)->entry);
|
return GTK_EDITABLE (DEMO_TAGGED_ENTRY (editable)->text);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -147,7 +142,7 @@ demo_tagged_entry_add_tag (DemoTaggedEntry *entry,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
|
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
|
||||||
|
|
||||||
gtk_box_append (GTK_BOX (entry->box), tag);
|
gtk_widget_set_parent (tag, GTK_WIDGET (entry));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -157,10 +152,7 @@ demo_tagged_entry_insert_tag_after (DemoTaggedEntry *entry,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
|
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
|
||||||
|
|
||||||
if (sibling == NULL)
|
gtk_widget_insert_after (tag, GTK_WIDGET (entry), sibling);
|
||||||
gtk_box_append (GTK_BOX (entry->box), tag);
|
|
||||||
else
|
|
||||||
gtk_box_insert_child_after (GTK_BOX (entry->box), tag, sibling);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -169,7 +161,7 @@ demo_tagged_entry_remove_tag (DemoTaggedEntry *entry,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
|
g_return_if_fail (DEMO_IS_TAGGED_ENTRY (entry));
|
||||||
|
|
||||||
gtk_box_remove (GTK_BOX (entry->box), tag);
|
gtk_widget_unparent (tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct _DemoTaggedEntryTag
|
struct _DemoTaggedEntryTag
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ message_dialog_clicked (GtkButton *button,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
static gint i = 1;
|
static int i = 1;
|
||||||
|
|
||||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||||
|
|||||||
@@ -597,6 +597,83 @@ css_button_new (const char *class)
|
|||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GtkWidget parent_instance;
|
||||||
|
GdkRGBA color;
|
||||||
|
} ColorSwatch;
|
||||||
|
|
||||||
|
typedef struct
|
||||||
|
{
|
||||||
|
GtkWidgetClass parent_class;
|
||||||
|
} ColorSwatchClass;
|
||||||
|
|
||||||
|
G_DEFINE_TYPE (ColorSwatch, color_swatch, GTK_TYPE_WIDGET)
|
||||||
|
|
||||||
|
static GdkContentProvider *
|
||||||
|
color_swatch_drag_prepare (GtkDragSource *source,
|
||||||
|
double x,
|
||||||
|
double y,
|
||||||
|
ColorSwatch *swatch)
|
||||||
|
{
|
||||||
|
return gdk_content_provider_new_typed (GDK_TYPE_RGBA, &swatch->color);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
color_swatch_init (ColorSwatch *swatch)
|
||||||
|
{
|
||||||
|
GtkDragSource *source = gtk_drag_source_new ();
|
||||||
|
g_signal_connect (source, "prepare", G_CALLBACK (color_swatch_drag_prepare), swatch);
|
||||||
|
gtk_widget_add_controller (GTK_WIDGET (swatch), GTK_EVENT_CONTROLLER (source));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
color_swatch_snapshot (GtkWidget *widget,
|
||||||
|
GtkSnapshot *snapshot)
|
||||||
|
{
|
||||||
|
ColorSwatch *swatch = (ColorSwatch *)widget;
|
||||||
|
float w = gtk_widget_get_width (widget);
|
||||||
|
float h = gtk_widget_get_height (widget);
|
||||||
|
|
||||||
|
gtk_snapshot_append_color (snapshot, &swatch->color,
|
||||||
|
&GRAPHENE_RECT_INIT(0, 0, w, h));
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
color_swatch_measure (GtkWidget *widget,
|
||||||
|
GtkOrientation orientation,
|
||||||
|
int for_size,
|
||||||
|
int *minimum_size,
|
||||||
|
int *natural_size,
|
||||||
|
int *minimum_baseline,
|
||||||
|
int *natural_baseline)
|
||||||
|
{
|
||||||
|
if (orientation == GTK_ORIENTATION_HORIZONTAL)
|
||||||
|
*minimum_size = *natural_size = 48;
|
||||||
|
else
|
||||||
|
*minimum_size = *natural_size = 32;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
color_swatch_class_init (ColorSwatchClass *class)
|
||||||
|
{
|
||||||
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (class);
|
||||||
|
|
||||||
|
widget_class->snapshot = color_swatch_snapshot;
|
||||||
|
widget_class->measure = color_swatch_measure;
|
||||||
|
gtk_widget_class_set_css_name (widget_class, "colorswatch");
|
||||||
|
}
|
||||||
|
|
||||||
|
static GtkWidget *
|
||||||
|
color_swatch_new (const char *color)
|
||||||
|
{
|
||||||
|
ColorSwatch *swatch = g_object_new (color_swatch_get_type (), NULL);
|
||||||
|
|
||||||
|
gdk_rgba_parse (&swatch->color, color);
|
||||||
|
|
||||||
|
return GTK_WIDGET (swatch);
|
||||||
|
}
|
||||||
|
|
||||||
static GtkWidget *window = NULL;
|
static GtkWidget *window = NULL;
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@@ -670,18 +747,7 @@ do_dnd (GtkWidget *do_widget)
|
|||||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), box3);
|
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), box3);
|
||||||
|
|
||||||
for (i = 0; colors[i]; i++)
|
for (i = 0; colors[i]; i++)
|
||||||
{
|
gtk_box_append (GTK_BOX (box3), color_swatch_new (colors[i]));
|
||||||
GdkRGBA rgba;
|
|
||||||
GtkWidget *swatch;
|
|
||||||
|
|
||||||
gdk_rgba_parse (&rgba, colors[i]);
|
|
||||||
|
|
||||||
swatch = g_object_new (g_type_from_name ("GtkColorSwatch"),
|
|
||||||
"rgba", &rgba,
|
|
||||||
"selectable", FALSE,
|
|
||||||
NULL);
|
|
||||||
gtk_box_append (GTK_BOX (box3), swatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
gtk_box_append (GTK_BOX (box3), css_button_new ("rainbow1"));
|
gtk_box_append (GTK_BOX (box3), css_button_new ("rainbow1"));
|
||||||
gtk_box_append (GTK_BOX (box3), css_button_new ("rainbow2"));
|
gtk_box_append (GTK_BOX (box3), css_button_new ("rainbow2"));
|
||||||
|
|||||||
@@ -64,8 +64,8 @@ scribble_draw (GtkDrawingArea *da,
|
|||||||
/* Draw a rectangle on the screen */
|
/* Draw a rectangle on the screen */
|
||||||
static void
|
static void
|
||||||
draw_brush (GtkWidget *widget,
|
draw_brush (GtkWidget *widget,
|
||||||
gdouble x,
|
double x,
|
||||||
gdouble y)
|
double y)
|
||||||
{
|
{
|
||||||
GdkRectangle update_rect;
|
GdkRectangle update_rect;
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ strings_setup_item_full (GtkSignalListItemFactory *factory,
|
|||||||
gtk_label_set_xalign (GTK_LABEL (title), 0.0);
|
gtk_label_set_xalign (GTK_LABEL (title), 0.0);
|
||||||
description = gtk_label_new ("");
|
description = gtk_label_new ("");
|
||||||
gtk_label_set_xalign (GTK_LABEL (description), 0.0);
|
gtk_label_set_xalign (GTK_LABEL (description), 0.0);
|
||||||
gtk_style_context_add_class (gtk_widget_get_style_context (description), "dim-label");
|
gtk_widget_add_css_class (description, "dim-label");
|
||||||
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
box2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||||
@@ -254,7 +254,7 @@ do_dropdown (GtkWidget *do_widget)
|
|||||||
gtk_widget_set_margin_bottom (box, 10);
|
gtk_widget_set_margin_bottom (box, 10);
|
||||||
gtk_window_set_child (GTK_WINDOW (window), box);
|
gtk_window_set_child (GTK_WINDOW (window), box);
|
||||||
|
|
||||||
button = gtk_drop_down_new ();
|
button = gtk_drop_down_new (NULL, NULL);
|
||||||
|
|
||||||
model = G_LIST_MODEL (pango_cairo_font_map_get_default ());
|
model = G_LIST_MODEL (pango_cairo_font_map_get_default ());
|
||||||
gtk_drop_down_set_model (GTK_DROP_DOWN (button), model);
|
gtk_drop_down_set_model (GTK_DROP_DOWN (button), model);
|
||||||
|
|||||||
@@ -16,9 +16,9 @@
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
gint number;
|
int number;
|
||||||
gchar *product;
|
char *product;
|
||||||
gint yummy;
|
int yummy;
|
||||||
}
|
}
|
||||||
Item;
|
Item;
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ add_items (void)
|
|||||||
static GtkTreeModel *
|
static GtkTreeModel *
|
||||||
create_items_model (void)
|
create_items_model (void)
|
||||||
{
|
{
|
||||||
gint i = 0;
|
int i = 0;
|
||||||
GtkListStore *model;
|
GtkListStore *model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ static GtkTreeModel *
|
|||||||
create_numbers_model (void)
|
create_numbers_model (void)
|
||||||
{
|
{
|
||||||
#define N_NUMBERS 10
|
#define N_NUMBERS 10
|
||||||
gint i = 0;
|
int i = 0;
|
||||||
GtkListStore *model;
|
GtkListStore *model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ remove_item (GtkWidget *widget, gpointer data)
|
|||||||
|
|
||||||
if (gtk_tree_selection_get_selected (selection, NULL, &iter))
|
if (gtk_tree_selection_get_selected (selection, NULL, &iter))
|
||||||
{
|
{
|
||||||
gint i;
|
int i;
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
|
|
||||||
path = gtk_tree_model_get_path (model, &iter);
|
path = gtk_tree_model_get_path (model, &iter);
|
||||||
@@ -211,7 +211,7 @@ separator_row (GtkTreeModel *model,
|
|||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkTreePath *path;
|
GtkTreePath *path;
|
||||||
gint idx;
|
int idx;
|
||||||
|
|
||||||
path = gtk_tree_model_get_path (model, iter);
|
path = gtk_tree_model_get_path (model, iter);
|
||||||
idx = gtk_tree_path_get_indices (path)[0];
|
idx = gtk_tree_path_get_indices (path)[0];
|
||||||
@@ -224,7 +224,7 @@ separator_row (GtkTreeModel *model,
|
|||||||
static void
|
static void
|
||||||
editing_started (GtkCellRenderer *cell,
|
editing_started (GtkCellRenderer *cell,
|
||||||
GtkCellEditable *editable,
|
GtkCellEditable *editable,
|
||||||
const gchar *path,
|
const char *path,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable),
|
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable),
|
||||||
@@ -233,15 +233,15 @@ editing_started (GtkCellRenderer *cell,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
cell_edited (GtkCellRendererText *cell,
|
cell_edited (GtkCellRendererText *cell,
|
||||||
const gchar *path_string,
|
const char *path_string,
|
||||||
const gchar *new_text,
|
const char *new_text,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||||
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
|
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
|
int column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
|
||||||
|
|
||||||
gtk_tree_model_get_iter (model, &iter, path);
|
gtk_tree_model_get_iter (model, &iter, path);
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@ cell_edited (GtkCellRendererText *cell,
|
|||||||
{
|
{
|
||||||
case COLUMN_ITEM_NUMBER:
|
case COLUMN_ITEM_NUMBER:
|
||||||
{
|
{
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
i = gtk_tree_path_get_indices (path)[0];
|
i = gtk_tree_path_get_indices (path)[0];
|
||||||
g_array_index (articles, Item, i).number = atoi (new_text);
|
g_array_index (articles, Item, i).number = atoi (new_text);
|
||||||
@@ -261,8 +261,8 @@ cell_edited (GtkCellRendererText *cell,
|
|||||||
|
|
||||||
case COLUMN_ITEM_PRODUCT:
|
case COLUMN_ITEM_PRODUCT:
|
||||||
{
|
{
|
||||||
gint i;
|
int i;
|
||||||
gchar *old_text;
|
char *old_text;
|
||||||
|
|
||||||
gtk_tree_model_get (model, &iter, column, &old_text, -1);
|
gtk_tree_model_get (model, &iter, column, &old_text, -1);
|
||||||
g_free (old_text);
|
g_free (old_text);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
static GtkWidget *window = NULL;
|
static GtkWidget *window = NULL;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
response_cb (GtkDialog *dialog, gint response_id)
|
response_cb (GtkDialog *dialog, int response_id)
|
||||||
{
|
{
|
||||||
gtk_window_destroy (GTK_WINDOW (window));
|
gtk_window_destroy (GTK_WINDOW (window));
|
||||||
window = NULL;
|
window = NULL;
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ format_number (GtkTreeViewColumn *col,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
gint num;
|
int num;
|
||||||
gchar *text;
|
char *text;
|
||||||
|
|
||||||
gtk_tree_model_get (model, iter, GPOINTER_TO_INT (data), &num, -1);
|
gtk_tree_model_get (model, iter, GPOINTER_TO_INT (data), &num, -1);
|
||||||
text = g_strdup_printf ("%d", num);
|
text = g_strdup_printf ("%d", num);
|
||||||
@@ -35,11 +35,11 @@ static void
|
|||||||
filter_modify_func (GtkTreeModel *model,
|
filter_modify_func (GtkTreeModel *model,
|
||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
GValue *value,
|
GValue *value,
|
||||||
gint column,
|
int column,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkTreeModelFilter *filter_model = GTK_TREE_MODEL_FILTER (model);
|
GtkTreeModelFilter *filter_model = GTK_TREE_MODEL_FILTER (model);
|
||||||
gint width, height;
|
int width, height;
|
||||||
GtkTreeModel *child_model;
|
GtkTreeModel *child_model;
|
||||||
GtkTreeIter child_iter;
|
GtkTreeIter child_iter;
|
||||||
|
|
||||||
@@ -75,7 +75,7 @@ visible_func (GtkTreeModel *model,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
gint width;
|
int width;
|
||||||
|
|
||||||
gtk_tree_model_get (model, iter,
|
gtk_tree_model_get (model, iter,
|
||||||
WIDTH_COLUMN, &width,
|
WIDTH_COLUMN, &width,
|
||||||
|
|||||||
@@ -45,12 +45,9 @@
|
|||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"></attribute>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="treeview1"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -83,12 +80,9 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label1"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -133,12 +127,9 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label2"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -149,12 +140,9 @@
|
|||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"></attribute>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="treeview2"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -165,12 +153,9 @@
|
|||||||
<attributes>
|
<attributes>
|
||||||
<attribute name="weight" value="bold"></attribute>
|
<attribute name="weight" value="bold"></attribute>
|
||||||
</attributes>
|
</attributes>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="treeview3"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -197,12 +182,9 @@
|
|||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label3"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ set_widget_type (GtkFishbowl *fishbowl,
|
|||||||
widget_types[selected_widget_type].name);
|
widget_types[selected_widget_type].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
G_MODULE_EXPORT void
|
||||||
fishbowl_next_button_clicked_cb (GtkButton *source,
|
fishbowl_next_button_clicked_cb (GtkButton *source,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
@@ -224,7 +224,7 @@ fishbowl_next_button_clicked_cb (GtkButton *source,
|
|||||||
set_widget_type (fishbowl, new_index);
|
set_widget_type (fishbowl, new_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
G_MODULE_EXPORT void
|
||||||
fishbowl_prev_button_clicked_cb (GtkButton *source,
|
fishbowl_prev_button_clicked_cb (GtkButton *source,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
@@ -239,7 +239,7 @@ fishbowl_prev_button_clicked_cb (GtkButton *source,
|
|||||||
set_widget_type (fishbowl, new_index);
|
set_widget_type (fishbowl, new_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
G_MODULE_EXPORT void
|
||||||
fishbowl_changes_toggled_cb (GtkToggleButton *button,
|
fishbowl_changes_toggled_cb (GtkToggleButton *button,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
@@ -249,7 +249,7 @@ fishbowl_changes_toggled_cb (GtkToggleButton *button,
|
|||||||
gtk_button_set_icon_name (GTK_BUTTON (button), "changes-allow");
|
gtk_button_set_icon_name (GTK_BUTTON (button), "changes-allow");
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
G_MODULE_EXPORT char *
|
||||||
format_header_cb (GObject *object,
|
format_header_cb (GObject *object,
|
||||||
guint count,
|
guint count,
|
||||||
double fps)
|
double fps)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
<property name="default-height">400</property>
|
<property name="default-height">400</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="">
|
<object class="GtkHeaderBar" id="">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ draw_color (GtkDrawingArea *drawingarea,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
color_swatch_new (const gchar *color)
|
color_swatch_new (const char *color)
|
||||||
{
|
{
|
||||||
GtkWidget *button, *area;
|
GtkWidget *button, *area;
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ do_flowbox (GtkWidget *do_widget)
|
|||||||
{
|
{
|
||||||
static GtkWidget *window = NULL;
|
static GtkWidget *window = NULL;
|
||||||
GtkWidget *scrolled, *flowbox;
|
GtkWidget *scrolled, *flowbox;
|
||||||
const gchar *colors[] = {
|
const char *colors[] = {
|
||||||
"AliceBlue",
|
"AliceBlue",
|
||||||
"AntiqueWhite",
|
"AntiqueWhite",
|
||||||
"AntiqueWhite1",
|
"AntiqueWhite1",
|
||||||
@@ -716,7 +716,7 @@ do_flowbox (GtkWidget *do_widget)
|
|||||||
"YellowGreen",
|
"YellowGreen",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
<property name="title">Font Explorer</property>
|
<property name="title">Font Explorer</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar">
|
<object class="GtkHeaderBar">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton" id="reset">
|
<object class="GtkButton" id="reset">
|
||||||
<property name="receives-default">1</property>
|
<property name="receives-default">1</property>
|
||||||
|
|||||||
@@ -130,6 +130,10 @@ static const char *
|
|||||||
get_feature_display_name (unsigned int tag)
|
get_feature_display_name (unsigned int tag)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
static char buf[5] = { 0, };
|
||||||
|
|
||||||
|
if (tag == MAKE_TAG ('x', 'x', 'x', 'x'))
|
||||||
|
return _("Default");
|
||||||
|
|
||||||
for (i = 0; i < G_N_ELEMENTS (open_type_layout_features); i++)
|
for (i = 0; i < G_N_ELEMENTS (open_type_layout_features); i++)
|
||||||
{
|
{
|
||||||
@@ -137,7 +141,10 @@ get_feature_display_name (unsigned int tag)
|
|||||||
return g_dpgettext2 (NULL, "OpenType layout", open_type_layout_features[i].name);
|
return g_dpgettext2 (NULL, "OpenType layout", open_type_layout_features[i].name);
|
||||||
}
|
}
|
||||||
|
|
||||||
return NULL;
|
hb_tag_to_string (tag, buf);
|
||||||
|
g_warning ("unknown OpenType layout feature tag: %s", buf);
|
||||||
|
|
||||||
|
return buf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_display (void);
|
static void update_display (void);
|
||||||
@@ -295,7 +302,7 @@ update_display (void)
|
|||||||
GList *l;
|
GList *l;
|
||||||
PangoAttrList *attrs;
|
PangoAttrList *attrs;
|
||||||
PangoAttribute *attr;
|
PangoAttribute *attr;
|
||||||
gint ins, bound;
|
int ins, bound;
|
||||||
guint start, end;
|
guint start, end;
|
||||||
PangoLanguage *lang;
|
PangoLanguage *lang;
|
||||||
char *font_desc;
|
char *font_desc;
|
||||||
@@ -479,7 +486,7 @@ update_script_combo (void)
|
|||||||
{
|
{
|
||||||
GtkListStore *store;
|
GtkListStore *store;
|
||||||
hb_font_t *hb_font;
|
hb_font_t *hb_font;
|
||||||
gint i, j, k;
|
int i, j, k;
|
||||||
PangoFont *pango_font;
|
PangoFont *pango_font;
|
||||||
GHashTable *tags;
|
GHashTable *tags;
|
||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
@@ -593,7 +600,7 @@ update_script_combo (void)
|
|||||||
static void
|
static void
|
||||||
update_features (void)
|
update_features (void)
|
||||||
{
|
{
|
||||||
gint i, j;
|
int i, j;
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
guint script_index, lang_index;
|
guint script_index, lang_index;
|
||||||
@@ -728,8 +735,8 @@ static void
|
|||||||
entry_activated (GtkEntry *entry,
|
entry_activated (GtkEntry *entry,
|
||||||
GtkAdjustment *adjustment)
|
GtkAdjustment *adjustment)
|
||||||
{
|
{
|
||||||
gdouble value;
|
double value;
|
||||||
gchar *err = NULL;
|
char *err = NULL;
|
||||||
|
|
||||||
value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
|
value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
|
||||||
if (err != NULL)
|
if (err != NULL)
|
||||||
@@ -939,7 +946,7 @@ instance_changed (GtkComboBox *combo)
|
|||||||
{
|
{
|
||||||
Axis *axis;
|
Axis *axis;
|
||||||
Axis akey;
|
Axis akey;
|
||||||
gdouble value;
|
double value;
|
||||||
|
|
||||||
value = coords[ai[i].axis_index];
|
value = coords[ai[i].axis_index];
|
||||||
|
|
||||||
@@ -1285,8 +1292,7 @@ do_font_features (GtkWidget *do_widget)
|
|||||||
"palt",
|
"palt",
|
||||||
"twid",
|
"twid",
|
||||||
"qwid", NULL });
|
"qwid", NULL });
|
||||||
add_check_group (feature_list, _("Alternative Stylistic Sets"), (const char *[]){ "ss00",
|
add_check_group (feature_list, _("Alternative Stylistic Sets"), (const char *[]){ "ss01",
|
||||||
"ss01",
|
|
||||||
"ss02",
|
"ss02",
|
||||||
"ss03",
|
"ss03",
|
||||||
"ss04",
|
"ss04",
|
||||||
|
|||||||
@@ -36,11 +36,11 @@ adjustment_get_normalized_value (GtkAdjustment *adj)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
val_to_xy (GtkFontPlane *plane,
|
val_to_xy (GtkFontPlane *plane,
|
||||||
gint *x,
|
int *x,
|
||||||
gint *y)
|
int *y)
|
||||||
{
|
{
|
||||||
gdouble u, v;
|
double u, v;
|
||||||
gint width, height;
|
int width, height;
|
||||||
|
|
||||||
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
|
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
|
||||||
height = gtk_widget_get_allocated_height (GTK_WIDGET (plane));
|
height = gtk_widget_get_allocated_height (GTK_WIDGET (plane));
|
||||||
@@ -57,8 +57,8 @@ plane_snapshot (GtkWidget *widget,
|
|||||||
GtkSnapshot *snapshot)
|
GtkSnapshot *snapshot)
|
||||||
{
|
{
|
||||||
GtkFontPlane *plane = GTK_FONT_PLANE (widget);
|
GtkFontPlane *plane = GTK_FONT_PLANE (widget);
|
||||||
gint x, y;
|
int x, y;
|
||||||
gint width, height;
|
int width, height;
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
|
|
||||||
val_to_xy (plane, &x, &y);
|
val_to_xy (plane, &x, &y);
|
||||||
@@ -125,11 +125,11 @@ adjustment_set_normalized_value (GtkAdjustment *adj,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
update_value (GtkFontPlane *plane,
|
update_value (GtkFontPlane *plane,
|
||||||
gint x,
|
int x,
|
||||||
gint y)
|
int y)
|
||||||
{
|
{
|
||||||
GtkWidget *widget = GTK_WIDGET (plane);
|
GtkWidget *widget = GTK_WIDGET (plane);
|
||||||
gdouble u, v;
|
double u, v;
|
||||||
|
|
||||||
u = CLAMP (x * (1.0 / gtk_widget_get_allocated_width (widget)), 0, 1);
|
u = CLAMP (x * (1.0 / gtk_widget_get_allocated_width (widget)), 0, 1);
|
||||||
v = CLAMP (1 - y * (1.0 / gtk_widget_get_allocated_height (widget)), 0, 1);
|
v = CLAMP (1 - y * (1.0 / gtk_widget_get_allocated_height (widget)), 0, 1);
|
||||||
@@ -142,8 +142,8 @@ update_value (GtkFontPlane *plane,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
plane_drag_gesture_begin (GtkGestureDrag *gesture,
|
plane_drag_gesture_begin (GtkGestureDrag *gesture,
|
||||||
gdouble start_x,
|
double start_x,
|
||||||
gdouble start_y,
|
double start_y,
|
||||||
GtkFontPlane *plane)
|
GtkFontPlane *plane)
|
||||||
{
|
{
|
||||||
guint button;
|
guint button;
|
||||||
@@ -164,11 +164,11 @@ plane_drag_gesture_begin (GtkGestureDrag *gesture,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
plane_drag_gesture_update (GtkGestureDrag *gesture,
|
plane_drag_gesture_update (GtkGestureDrag *gesture,
|
||||||
gdouble offset_x,
|
double offset_x,
|
||||||
gdouble offset_y,
|
double offset_y,
|
||||||
GtkFontPlane *plane)
|
GtkFontPlane *plane)
|
||||||
{
|
{
|
||||||
gdouble start_x, start_y;
|
double start_x, start_y;
|
||||||
|
|
||||||
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
|
gtk_gesture_drag_get_start_point (GTK_GESTURE_DRAG (gesture),
|
||||||
&start_x, &start_y);
|
&start_x, &start_y);
|
||||||
@@ -177,8 +177,8 @@ plane_drag_gesture_update (GtkGestureDrag *gesture,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
plane_drag_gesture_end (GtkGestureDrag *gesture,
|
plane_drag_gesture_end (GtkGestureDrag *gesture,
|
||||||
gdouble offset_x,
|
double offset_x,
|
||||||
gdouble offset_y,
|
double offset_y,
|
||||||
GtkFontPlane *plane)
|
GtkFontPlane *plane)
|
||||||
{
|
{
|
||||||
set_cross_cursor (GTK_WIDGET (plane), FALSE);
|
set_cross_cursor (GTK_WIDGET (plane), FALSE);
|
||||||
|
|||||||
@@ -21,12 +21,6 @@ static PangoContext *context;
|
|||||||
|
|
||||||
static int scale = 10;
|
static int scale = 10;
|
||||||
|
|
||||||
static void
|
|
||||||
on_destroy (gpointer data)
|
|
||||||
{
|
|
||||||
window = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
update_image (void)
|
update_image (void)
|
||||||
{
|
{
|
||||||
@@ -251,9 +245,7 @@ do_fontrendering (GtkWidget *do_widget)
|
|||||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||||
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));
|
||||||
g_signal_connect (window, "destroy",
|
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||||
G_CALLBACK (on_destroy), NULL);
|
|
||||||
g_object_set_data_full (G_OBJECT (window), "builder", builder, g_object_unref);
|
|
||||||
font_button = GTK_WIDGET (gtk_builder_get_object (builder, "font_button"));
|
font_button = GTK_WIDGET (gtk_builder_get_object (builder, "font_button"));
|
||||||
up_button = GTK_WIDGET (gtk_builder_get_object (builder, "up_button"));
|
up_button = GTK_WIDGET (gtk_builder_get_object (builder, "up_button"));
|
||||||
down_button = GTK_WIDGET (gtk_builder_get_object (builder, "down_button"));
|
down_button = GTK_WIDGET (gtk_builder_get_object (builder, "down_button"));
|
||||||
@@ -276,6 +268,8 @@ do_fontrendering (GtkWidget *do_widget)
|
|||||||
g_signal_connect (show_extents, "notify::active", G_CALLBACK (update_image), NULL);
|
g_signal_connect (show_extents, "notify::active", G_CALLBACK (update_image), NULL);
|
||||||
|
|
||||||
update_image ();
|
update_image ();
|
||||||
|
|
||||||
|
g_object_unref (builder);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<object class="GtkEntry" id="entry">
|
<object class="GtkEntry" id="entry">
|
||||||
<property name="text">Fonts render</property>
|
<property name="text">Fonts render</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -41,16 +41,16 @@
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFontButton" id="font_button">
|
<object class="GtkFontButton" id="font_button">
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
<item translatable="yes" id="full">Full</item>
|
<item translatable="yes" id="full">Full</item>
|
||||||
</items>
|
</items>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">3</property>
|
<property name="column">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -92,8 +92,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">3</property>
|
<property name="column">3</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -109,8 +109,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">4</property>
|
<property name="column">4</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -126,8 +126,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">4</property>
|
<property name="column">4</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -138,8 +138,8 @@
|
|||||||
<class name="circular"/>
|
<class name="circular"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">5</property>
|
<property name="column">5</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -150,8 +150,8 @@
|
|||||||
<class name="circular"/>
|
<class name="circular"/>
|
||||||
</style>
|
</style>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">5</property>
|
<property name="column">5</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
<object class="GtkLabel">
|
<object class="GtkLabel">
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">6</property>
|
<property name="column">6</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -184,8 +184,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
<property name="column-span">7</property>
|
<property name="column-span">7</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
@@ -204,8 +204,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">4</property>
|
<property name="row">4</property>
|
||||||
<property name="column-span">7</property>
|
<property name="column-span">7</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@@ -9,8 +9,8 @@
|
|||||||
|
|
||||||
static GtkGesture *rotate = NULL;
|
static GtkGesture *rotate = NULL;
|
||||||
static GtkGesture *zoom = NULL;
|
static GtkGesture *zoom = NULL;
|
||||||
static gdouble swipe_x = 0;
|
static double swipe_x = 0;
|
||||||
static gdouble swipe_y = 0;
|
static double swipe_y = 0;
|
||||||
static gboolean long_pressed = FALSE;
|
static gboolean long_pressed = FALSE;
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -26,8 +26,8 @@ touchpad_swipe_gesture_begin (GtkGesture *gesture,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
swipe_gesture_swept (GtkGestureSwipe *gesture,
|
swipe_gesture_swept (GtkGestureSwipe *gesture,
|
||||||
gdouble velocity_x,
|
double velocity_x,
|
||||||
gdouble velocity_y,
|
double velocity_y,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
swipe_x = velocity_x / 10;
|
swipe_x = velocity_x / 10;
|
||||||
@@ -37,8 +37,8 @@ swipe_gesture_swept (GtkGestureSwipe *gesture,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
long_press_gesture_pressed (GtkGestureLongPress *gesture,
|
long_press_gesture_pressed (GtkGestureLongPress *gesture,
|
||||||
gdouble x,
|
double x,
|
||||||
gdouble y,
|
double y,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
long_pressed = TRUE;
|
long_pressed = TRUE;
|
||||||
@@ -56,8 +56,8 @@ long_press_gesture_end (GtkGesture *gesture,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
rotation_angle_changed (GtkGestureRotate *gesture,
|
rotation_angle_changed (GtkGestureRotate *gesture,
|
||||||
gdouble angle,
|
double angle,
|
||||||
gdouble delta,
|
double delta,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
gtk_widget_queue_draw (widget);
|
gtk_widget_queue_draw (widget);
|
||||||
@@ -65,7 +65,7 @@ rotation_angle_changed (GtkGestureRotate *gesture,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
zoom_scale_changed (GtkGestureZoom *gesture,
|
zoom_scale_changed (GtkGestureZoom *gesture,
|
||||||
gdouble scale,
|
double scale,
|
||||||
GtkWidget *widget)
|
GtkWidget *widget)
|
||||||
{
|
{
|
||||||
gtk_widget_queue_draw (widget);
|
gtk_widget_queue_draw (widget);
|
||||||
@@ -93,8 +93,8 @@ drawing_area_draw (GtkDrawingArea *area,
|
|||||||
{
|
{
|
||||||
cairo_pattern_t *pat;
|
cairo_pattern_t *pat;
|
||||||
cairo_matrix_t matrix;
|
cairo_matrix_t matrix;
|
||||||
gdouble angle, scale;
|
double angle, scale;
|
||||||
gdouble x_center, y_center;
|
double x_center, y_center;
|
||||||
|
|
||||||
gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center);
|
gtk_gesture_get_bounding_box_center (GTK_GESTURE (zoom), &x_center, &y_center);
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
precision highp float;
|
precision highp float;
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
float lerpVal = gl_FragCoord.y / 500.0f;
|
float lerpVal = gl_FragCoord.y / 500.0;
|
||||||
|
|
||||||
gl_FragColor = mix(vec4(1.0f, 0.85f, 0.35f, 1.0f), vec4(0.2f, 0.2f, 0.2f, 1.0f), lerpVal);
|
gl_FragColor = mix(vec4(1.0, 0.85, 0.35, 1.0), vec4(0.2, 0.2, 0.2, 1.0), lerpVal);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ gtk_fishbowl_measure (GtkWidget *widget,
|
|||||||
GHashTableIter iter;
|
GHashTableIter iter;
|
||||||
gpointer key, value;
|
gpointer key, value;
|
||||||
GtkFishbowlChild *child;
|
GtkFishbowlChild *child;
|
||||||
gint child_min, child_nat;
|
int child_min, child_nat;
|
||||||
|
|
||||||
*minimum = 0;
|
*minimum = 0;
|
||||||
*natural = 0;
|
*natural = 0;
|
||||||
|
|||||||
@@ -30,7 +30,6 @@ do_headerbar (GtkWidget *do_widget)
|
|||||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||||
|
|
||||||
header = gtk_header_bar_new ();
|
header = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
|
||||||
|
|
||||||
button = gtk_button_new ();
|
button = gtk_button_new ();
|
||||||
icon = g_themed_icon_new ("mail-send-receive-symbolic");
|
icon = g_themed_icon_new ("mail-send-receive-symbolic");
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ static void
|
|||||||
insert_link (GtkTextBuffer *buffer,
|
insert_link (GtkTextBuffer *buffer,
|
||||||
GtkTextIter *iter,
|
GtkTextIter *iter,
|
||||||
const char *text,
|
const char *text,
|
||||||
gint page)
|
int page)
|
||||||
{
|
{
|
||||||
GtkTextTag *tag;
|
GtkTextTag *tag;
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ insert_link (GtkTextBuffer *buffer,
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
show_page (GtkTextBuffer *buffer,
|
show_page (GtkTextBuffer *buffer,
|
||||||
gint page)
|
int page)
|
||||||
{
|
{
|
||||||
GtkTextIter iter;
|
GtkTextIter iter;
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ follow_if_link (GtkWidget *text_view,
|
|||||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||||
{
|
{
|
||||||
GtkTextTag *tag = tagp->data;
|
GtkTextTag *tag = tagp->data;
|
||||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
int page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||||
|
|
||||||
if (page != 0)
|
if (page != 0)
|
||||||
{
|
{
|
||||||
@@ -134,14 +134,14 @@ key_pressed (GtkEventController *controller,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void set_cursor_if_appropriate (GtkTextView *text_view,
|
static void set_cursor_if_appropriate (GtkTextView *text_view,
|
||||||
gint x,
|
int x,
|
||||||
gint y);
|
int y);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
released_cb (GtkGestureClick *gesture,
|
released_cb (GtkGestureClick *gesture,
|
||||||
guint n_press,
|
guint n_press,
|
||||||
gdouble x,
|
double x,
|
||||||
gdouble y,
|
double y,
|
||||||
GtkWidget *text_view)
|
GtkWidget *text_view)
|
||||||
{
|
{
|
||||||
GtkTextIter start, end, iter;
|
GtkTextIter start, end, iter;
|
||||||
@@ -168,8 +168,8 @@ released_cb (GtkGestureClick *gesture,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
motion_cb (GtkEventControllerMotion *controller,
|
motion_cb (GtkEventControllerMotion *controller,
|
||||||
gdouble x,
|
double x,
|
||||||
gdouble y,
|
double y,
|
||||||
GtkTextView *text_view)
|
GtkTextView *text_view)
|
||||||
{
|
{
|
||||||
set_cursor_if_appropriate (text_view, x, y);
|
set_cursor_if_appropriate (text_view, x, y);
|
||||||
@@ -183,8 +183,8 @@ static gboolean hovering_over_link = FALSE;
|
|||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
set_cursor_if_appropriate (GtkTextView *text_view,
|
set_cursor_if_appropriate (GtkTextView *text_view,
|
||||||
gint x,
|
int x,
|
||||||
gint y)
|
int y)
|
||||||
{
|
{
|
||||||
GSList *tags = NULL, *tagp = NULL;
|
GSList *tags = NULL, *tagp = NULL;
|
||||||
GtkTextIter iter;
|
GtkTextIter iter;
|
||||||
@@ -196,7 +196,7 @@ set_cursor_if_appropriate (GtkTextView *text_view,
|
|||||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||||
{
|
{
|
||||||
GtkTextTag *tag = tagp->data;
|
GtkTextTag *tag = tagp->data;
|
||||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
int page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||||
|
|
||||||
if (page != 0)
|
if (page != 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ set_widget_type (int type)
|
|||||||
tick_cb = gtk_widget_add_tick_callback (window, scroll_cb, NULL, NULL);
|
tick_cb = gtk_widget_add_tick_callback (window, scroll_cb, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
G_MODULE_EXPORT void
|
||||||
iconscroll_next_clicked_cb (GtkButton *source,
|
iconscroll_next_clicked_cb (GtkButton *source,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
@@ -235,7 +235,7 @@ iconscroll_next_clicked_cb (GtkButton *source,
|
|||||||
set_widget_type (new_index);
|
set_widget_type (new_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
G_MODULE_EXPORT void
|
||||||
iconscroll_prev_clicked_cb (GtkButton *source,
|
iconscroll_prev_clicked_cb (GtkButton *source,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
@@ -249,7 +249,7 @@ iconscroll_prev_clicked_cb (GtkButton *source,
|
|||||||
set_widget_type (new_index);
|
set_widget_type (new_index);
|
||||||
}
|
}
|
||||||
|
|
||||||
GtkWidget *
|
G_MODULE_EXPORT GtkWidget *
|
||||||
do_iconscroll (GtkWidget *do_widget)
|
do_iconscroll (GtkWidget *do_widget)
|
||||||
{
|
{
|
||||||
if (!window)
|
if (!window)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
<property name="default-height">500</property>
|
<property name="default-height">500</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar">
|
<object class="GtkHeaderBar">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ enum
|
|||||||
|
|
||||||
|
|
||||||
static GdkPixbuf *file_pixbuf, *folder_pixbuf;
|
static GdkPixbuf *file_pixbuf, *folder_pixbuf;
|
||||||
gchar *parent;
|
char *parent;
|
||||||
GtkWidget *up_button;
|
GtkWidget *up_button;
|
||||||
|
|
||||||
/* Loads the images for the demo and returns whether the operation succeeded */
|
/* Loads the images for the demo and returns whether the operation succeeded */
|
||||||
@@ -47,7 +47,7 @@ static void
|
|||||||
fill_store (GtkListStore *store)
|
fill_store (GtkListStore *store)
|
||||||
{
|
{
|
||||||
GDir *dir;
|
GDir *dir;
|
||||||
const gchar *name;
|
const char *name;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
/* First clear the store */
|
/* First clear the store */
|
||||||
@@ -62,7 +62,7 @@ fill_store (GtkListStore *store)
|
|||||||
name = g_dir_read_name (dir);
|
name = g_dir_read_name (dir);
|
||||||
while (name != NULL)
|
while (name != NULL)
|
||||||
{
|
{
|
||||||
gchar *path, *display_name;
|
char *path, *display_name;
|
||||||
gboolean is_dir;
|
gboolean is_dir;
|
||||||
|
|
||||||
/* We ignore hidden files that start with a '.' */
|
/* We ignore hidden files that start with a '.' */
|
||||||
@@ -90,14 +90,14 @@ fill_store (GtkListStore *store)
|
|||||||
g_dir_close (dir);
|
g_dir_close (dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static int
|
||||||
sort_func (GtkTreeModel *model,
|
sort_func (GtkTreeModel *model,
|
||||||
GtkTreeIter *a,
|
GtkTreeIter *a,
|
||||||
GtkTreeIter *b,
|
GtkTreeIter *b,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
gboolean is_dir_a, is_dir_b;
|
gboolean is_dir_a, is_dir_b;
|
||||||
gchar *name_a, *name_b;
|
char *name_a, *name_b;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/* We need this function because we want to sort
|
/* We need this function because we want to sort
|
||||||
@@ -158,7 +158,7 @@ item_activated (GtkIconView *icon_view,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkListStore *store;
|
GtkListStore *store;
|
||||||
gchar *path;
|
char *path;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gboolean is_dir;
|
gboolean is_dir;
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ up_clicked (GtkButton *item,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkListStore *store;
|
GtkListStore *store;
|
||||||
gchar *dir_name;
|
char *dir_name;
|
||||||
|
|
||||||
store = GTK_LIST_STORE (user_data);
|
store = GTK_LIST_STORE (user_data);
|
||||||
|
|
||||||
|
|||||||
@@ -19,8 +19,8 @@ static void
|
|||||||
fill_store (GtkListStore *store)
|
fill_store (GtkListStore *store)
|
||||||
{
|
{
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
const gchar *text[] = { "Red", "Green", "Blue", "Yellow" };
|
const char *text[] = { "Red", "Green", "Blue", "Yellow" };
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
/* First clear the store */
|
/* First clear the store */
|
||||||
gtk_list_store_clear (store);
|
gtk_list_store_clear (store);
|
||||||
@@ -49,7 +49,7 @@ set_cell_color (GtkCellLayout *cell_layout,
|
|||||||
GtkTreeIter *iter,
|
GtkTreeIter *iter,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
gchar *text;
|
char *text;
|
||||||
GdkRGBA color;
|
GdkRGBA color;
|
||||||
guint32 pixel = 0;
|
guint32 pixel = 0;
|
||||||
GdkPixbuf *pixbuf;
|
GdkPixbuf *pixbuf;
|
||||||
@@ -60,10 +60,10 @@ set_cell_color (GtkCellLayout *cell_layout,
|
|||||||
|
|
||||||
if (gdk_rgba_parse (&color, text))
|
if (gdk_rgba_parse (&color, text))
|
||||||
pixel =
|
pixel =
|
||||||
((gint)(color.red * 255)) << 24 |
|
((int)(color.red * 255)) << 24 |
|
||||||
((gint)(color.green * 255)) << 16 |
|
((int)(color.green * 255)) << 16 |
|
||||||
((gint)(color.blue * 255)) << 8 |
|
((int)(color.blue * 255)) << 8 |
|
||||||
((gint)(color.alpha * 255));
|
((int)(color.alpha * 255));
|
||||||
|
|
||||||
g_free (text);
|
g_free (text);
|
||||||
|
|
||||||
@@ -77,8 +77,8 @@ set_cell_color (GtkCellLayout *cell_layout,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
edited (GtkCellRendererText *cell,
|
edited (GtkCellRendererText *cell,
|
||||||
gchar *path_string,
|
char *path_string,
|
||||||
gchar *text,
|
char *text,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkTreeModel *model;
|
GtkTreeModel *model;
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ progressive_prepared_callback (GdkPixbufLoader *loader,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
progressive_updated_callback (GdkPixbufLoader *loader,
|
progressive_updated_callback (GdkPixbufLoader *loader,
|
||||||
gint x,
|
int x,
|
||||||
gint y,
|
int y,
|
||||||
gint width,
|
int width,
|
||||||
gint height,
|
int height,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *picture;
|
GtkWidget *picture;
|
||||||
@@ -58,7 +58,7 @@ progressive_updated_callback (GdkPixbufLoader *loader,
|
|||||||
gtk_picture_set_pixbuf (GTK_PICTURE (picture), pixbuf);
|
gtk_picture_set_pixbuf (GTK_PICTURE (picture), pixbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static int
|
||||||
progressive_timeout (gpointer data)
|
progressive_timeout (gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *picture;
|
GtkWidget *picture;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
on_bar_response (GtkInfoBar *info_bar,
|
on_bar_response (GtkInfoBar *info_bar,
|
||||||
gint response_id,
|
int response_id,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkWidget *dialog;
|
GtkWidget *dialog;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
response_cb (GtkWidget *dialog,
|
response_cb (GtkWidget *dialog,
|
||||||
gint response_id,
|
int response_id,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||||
@@ -17,7 +17,7 @@ response_cb (GtkWidget *dialog,
|
|||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
activate_link (GtkWidget *label,
|
activate_link (GtkWidget *label,
|
||||||
const gchar *uri,
|
const char *uri,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
if (g_strcmp0 (uri, "keynav") == 0)
|
if (g_strcmp0 (uri, "keynav") == 0)
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ spinner_timeout (gpointer data)
|
|||||||
static GtkTreeModel *
|
static GtkTreeModel *
|
||||||
create_model (void)
|
create_model (void)
|
||||||
{
|
{
|
||||||
gint i = 0;
|
int i = 0;
|
||||||
GtkListStore *store;
|
GtkListStore *store;
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,8 @@
|
|||||||
<property name="margin-end">8</property>
|
<property name="margin-end">8</property>
|
||||||
<property name="icon-name">image-missing</property>
|
<property name="icon-name">image-missing</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
<property name="row-span">5</property>
|
<property name="row-span">5</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
@@ -71,8 +71,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -84,12 +84,9 @@
|
|||||||
<property name="yalign">0</property>
|
<property name="yalign">0</property>
|
||||||
<property name="label" translatable="0">Message</property>
|
<property name="label" translatable="0">Message</property>
|
||||||
<property name="wrap">1</property>
|
<property name="wrap">1</property>
|
||||||
<accessibility>
|
|
||||||
<role type="static"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -114,8 +111,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -168,8 +165,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -184,27 +181,17 @@
|
|||||||
<property name="margin-bottom">2</property>
|
<property name="margin-bottom">2</property>
|
||||||
<property name="spacing">8</property>
|
<property name="spacing">8</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame" id="frame1">
|
<object class="GtkLabel" id="n_reshares_label">
|
||||||
<child>
|
<property name="label" translatable="0"><b>2</b>
|
||||||
<object class="GtkLabel" id="n_reshares_label">
|
|
||||||
<property name="label" translatable="0"><b>2</b>
|
|
||||||
Reshares</property>
|
Reshares</property>
|
||||||
<property name="use-markup">1</property>
|
<property name="use-markup">1</property>
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child type="label_item"/>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkFrame" id="frame2">
|
<object class="GtkLabel" id="n_favorites_label">
|
||||||
<child>
|
<property name="label" translatable="0"><b>2</b>
|
||||||
<object class="GtkLabel" id="n_favorites_label">
|
|
||||||
<property name="label" translatable="0"><b>2</b>
|
|
||||||
FAVORITES</property>
|
FAVORITES</property>
|
||||||
<property name="use-markup">1</property>
|
<property name="use-markup">1</property>
|
||||||
</object>
|
|
||||||
</child>
|
|
||||||
<child type="label_item"/>
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
@@ -234,8 +221,8 @@ FAVORITES</property>
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">4</property>
|
<property name="row">4</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -166,14 +166,6 @@ do_listview_applauncher (GtkWidget *do_widget)
|
|||||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
|
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
|
||||||
g_signal_connect (factory, "bind", G_CALLBACK (bind_listitem_cb), NULL);
|
g_signal_connect (factory, "bind", G_CALLBACK (bind_listitem_cb), NULL);
|
||||||
|
|
||||||
/* Create the list widget here.
|
|
||||||
*/
|
|
||||||
list = gtk_list_view_new_with_factory (factory);
|
|
||||||
/* We connect the activate signal here. It's the function we defined
|
|
||||||
* above for launching the selected application.
|
|
||||||
*/
|
|
||||||
g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
|
|
||||||
|
|
||||||
/* And of course we need to set the data model. Here we call the function
|
/* And of course we need to set the data model. Here we call the function
|
||||||
* we wrote above that gives us the list of applications. Then we set
|
* we wrote above that gives us the list of applications. Then we set
|
||||||
* it on the list widget.
|
* it on the list widget.
|
||||||
@@ -181,8 +173,15 @@ do_listview_applauncher (GtkWidget *do_widget)
|
|||||||
* to create as many listitems as it needs to show itself to the user.
|
* to create as many listitems as it needs to show itself to the user.
|
||||||
*/
|
*/
|
||||||
model = create_application_list ();
|
model = create_application_list ();
|
||||||
gtk_list_view_set_model (GTK_LIST_VIEW (list), model);
|
|
||||||
g_object_unref (model);
|
/* Create the list widget here.
|
||||||
|
*/
|
||||||
|
list = gtk_list_view_new_with_factory (model, factory);
|
||||||
|
|
||||||
|
/* We connect the activate signal here. It's the function we defined
|
||||||
|
* above for launching the selected application.
|
||||||
|
*/
|
||||||
|
g_signal_connect (list, "activate", G_CALLBACK (activate_cb), NULL);
|
||||||
|
|
||||||
/* List widgets should always be contained in a #GtkScrolledWindow,
|
/* List widgets should always be contained in a #GtkScrolledWindow,
|
||||||
* because otherwise they might get too large or they might not
|
* because otherwise they might get too large or they might not
|
||||||
|
|||||||
@@ -463,7 +463,6 @@ do_listview_clocks (GtkWidget *do_widget)
|
|||||||
GtkWidget *gridview, *sw;
|
GtkWidget *gridview, *sw;
|
||||||
GtkListItemFactory *factory;
|
GtkListItemFactory *factory;
|
||||||
GListModel *model;
|
GListModel *model;
|
||||||
GtkNoSelection *selection;
|
|
||||||
|
|
||||||
/* This is the normal window setup code every demo does */
|
/* This is the normal window setup code every demo does */
|
||||||
window = gtk_window_new ();
|
window = gtk_window_new ();
|
||||||
@@ -485,16 +484,12 @@ do_listview_clocks (GtkWidget *do_widget)
|
|||||||
factory = gtk_signal_list_item_factory_new ();
|
factory = gtk_signal_list_item_factory_new ();
|
||||||
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
|
g_signal_connect (factory, "setup", G_CALLBACK (setup_listitem_cb), NULL);
|
||||||
|
|
||||||
gridview = gtk_grid_view_new_with_factory (factory);
|
model = G_LIST_MODEL (gtk_no_selection_new (create_clocks_model ()));
|
||||||
|
gridview = gtk_grid_view_new_with_factory (model, factory);
|
||||||
gtk_scrollable_set_hscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
gtk_scrollable_set_hscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
||||||
gtk_scrollable_set_vscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
gtk_scrollable_set_vscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
||||||
|
|
||||||
model = create_clocks_model ();
|
|
||||||
selection = gtk_no_selection_new (model);
|
|
||||||
gtk_grid_view_set_model (GTK_GRID_VIEW (gridview), G_LIST_MODEL (selection));
|
|
||||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), gridview);
|
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), gridview);
|
||||||
g_object_unref (selection);
|
|
||||||
g_object_unref (model);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
|
|||||||
@@ -89,14 +89,14 @@ static GParamSpec *color_properties[N_COLOR_PROPS] = { NULL, };
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
rgb_to_hsv (GdkRGBA *rgba,
|
rgb_to_hsv (GdkRGBA *rgba,
|
||||||
gdouble *h_out,
|
double *h_out,
|
||||||
gdouble *s_out,
|
double *s_out,
|
||||||
gdouble *v_out)
|
double *v_out)
|
||||||
{
|
{
|
||||||
gdouble red, green, blue;
|
double red, green, blue;
|
||||||
gdouble h, s, v;
|
double h, s, v;
|
||||||
gdouble min, max;
|
double min, max;
|
||||||
gdouble delta;
|
double delta;
|
||||||
|
|
||||||
red = rgba->red;
|
red = rgba->red;
|
||||||
green = rgba->green;
|
green = rgba->green;
|
||||||
@@ -226,7 +226,7 @@ gtk_color_set_property (GObject *object,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case PROP_COLOR:
|
case PROP_COLOR:
|
||||||
self->color = *(GdkRGBA *) g_value_dup_boxed (value);
|
self->color = *(GdkRGBA *) g_value_get_boxed (value);
|
||||||
rgb_to_hsv (&self->color, &h, &s, &v);
|
rgb_to_hsv (&self->color, &h, &s, &v);
|
||||||
self->h = round (360 * h);
|
self->h = round (360 * h);
|
||||||
self->s = round (100 * s);
|
self->s = round (100 * s);
|
||||||
@@ -627,6 +627,23 @@ setup_listitem_cb (GtkListItemFactory *factory,
|
|||||||
gtk_expression_unref (color_expression);
|
gtk_expression_unref (color_expression);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
setup_selection_listitem_cb (GtkListItemFactory *factory,
|
||||||
|
GtkListItem *list_item)
|
||||||
|
{
|
||||||
|
GtkWidget *picture;
|
||||||
|
GtkExpression *color_expression, *expression;
|
||||||
|
|
||||||
|
expression = gtk_constant_expression_new (GTK_TYPE_LIST_ITEM, list_item);
|
||||||
|
color_expression = gtk_property_expression_new (GTK_TYPE_LIST_ITEM, expression, "item");
|
||||||
|
|
||||||
|
picture = gtk_picture_new ();
|
||||||
|
gtk_widget_set_size_request (picture, 8, 8);
|
||||||
|
gtk_expression_bind (color_expression, picture, "paintable", NULL);
|
||||||
|
|
||||||
|
gtk_list_item_set_child (list_item, picture);
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_title (gpointer item,
|
set_title (gpointer item,
|
||||||
const char *title)
|
const char *title)
|
||||||
@@ -645,9 +662,8 @@ create_color_grid (void)
|
|||||||
{
|
{
|
||||||
GtkWidget *gridview;
|
GtkWidget *gridview;
|
||||||
GtkListItemFactory *factory;
|
GtkListItemFactory *factory;
|
||||||
GListModel *model, *selection;
|
|
||||||
|
|
||||||
gridview = gtk_grid_view_new ();
|
gridview = gtk_grid_view_new (NULL);
|
||||||
gtk_scrollable_set_hscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
gtk_scrollable_set_hscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
||||||
gtk_scrollable_set_vscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
gtk_scrollable_set_vscroll_policy (GTK_SCROLLABLE (gridview), GTK_SCROLL_NATURAL);
|
||||||
|
|
||||||
@@ -659,13 +675,6 @@ create_color_grid (void)
|
|||||||
gtk_grid_view_set_max_columns (GTK_GRID_VIEW (gridview), 24);
|
gtk_grid_view_set_max_columns (GTK_GRID_VIEW (gridview), 24);
|
||||||
gtk_grid_view_set_enable_rubberband (GTK_GRID_VIEW (gridview), TRUE);
|
gtk_grid_view_set_enable_rubberband (GTK_GRID_VIEW (gridview), TRUE);
|
||||||
|
|
||||||
model = G_LIST_MODEL (gtk_sort_list_model_new (gtk_color_list_new (0), NULL));
|
|
||||||
|
|
||||||
selection = G_LIST_MODEL (gtk_multi_selection_new (model));
|
|
||||||
gtk_grid_view_set_model (GTK_GRID_VIEW (gridview), selection);
|
|
||||||
g_object_unref (selection);
|
|
||||||
g_object_unref (model);
|
|
||||||
|
|
||||||
return gridview;
|
return gridview;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -777,6 +786,63 @@ bind_number_item (GtkSignalListItemFactory *factory,
|
|||||||
g_free (string);
|
g_free (string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_selection_count (GListModel *model,
|
||||||
|
guint position,
|
||||||
|
guint removed,
|
||||||
|
guint added,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
char *text;
|
||||||
|
text = g_strdup_printf ("%u", g_list_model_get_n_items (model));
|
||||||
|
gtk_label_set_label (GTK_LABEL (data), text);
|
||||||
|
g_free (text);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_selection_average (GListModel *model,
|
||||||
|
guint position,
|
||||||
|
guint removed,
|
||||||
|
guint added,
|
||||||
|
gpointer data)
|
||||||
|
{
|
||||||
|
guint n = g_list_model_get_n_items (model);
|
||||||
|
GdkRGBA c = { 0, 0, 0, 1 };
|
||||||
|
guint i;
|
||||||
|
GtkColor *color;
|
||||||
|
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
color = g_list_model_get_item (model, i);
|
||||||
|
|
||||||
|
c.red += color->color.red;
|
||||||
|
c.green += color->color.green;
|
||||||
|
c.blue += color->color.blue;
|
||||||
|
|
||||||
|
g_object_unref (color);
|
||||||
|
}
|
||||||
|
|
||||||
|
color = gtk_color_new ("", c.red / n, c.green / n, c.blue / n);
|
||||||
|
gtk_picture_set_paintable (GTK_PICTURE (data), GDK_PAINTABLE (color));
|
||||||
|
g_object_unref (color);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
update_progress_cb (GtkSortListModel *model,
|
||||||
|
GParamSpec *pspec,
|
||||||
|
GtkProgressBar *progress)
|
||||||
|
{
|
||||||
|
guint total;
|
||||||
|
guint pending;
|
||||||
|
|
||||||
|
total = g_list_model_get_n_items (G_LIST_MODEL (model));
|
||||||
|
total = MAX (total, 1); /* avoid div by 0 below */
|
||||||
|
pending = gtk_sort_list_model_get_pending (model);
|
||||||
|
|
||||||
|
gtk_widget_set_visible (GTK_WIDGET (progress), pending != 0);
|
||||||
|
gtk_progress_bar_set_fraction (progress, (total - pending) / (double) total);
|
||||||
|
}
|
||||||
|
|
||||||
static GtkWidget *window = NULL;
|
static GtkWidget *window = NULL;
|
||||||
|
|
||||||
GtkWidget *
|
GtkWidget *
|
||||||
@@ -784,10 +850,11 @@ do_listview_colors (GtkWidget *do_widget)
|
|||||||
{
|
{
|
||||||
if (window == NULL)
|
if (window == NULL)
|
||||||
{
|
{
|
||||||
GtkWidget *header, *gridview, *sw, *box, *dropdown;
|
GtkMultiSelection *selection;
|
||||||
|
GtkSortListModel *sort_model;
|
||||||
|
GtkWidget *header, *overlay, *gridview, *sw, *box, *dropdown;
|
||||||
GtkListItemFactory *factory;
|
GtkListItemFactory *factory;
|
||||||
GListStore *factories;
|
GListStore *factories;
|
||||||
GListModel *model;
|
|
||||||
GtkSorter *sorter;
|
GtkSorter *sorter;
|
||||||
GtkSorter *multi_sorter;
|
GtkSorter *multi_sorter;
|
||||||
GListStore *sorters;
|
GListStore *sorters;
|
||||||
@@ -797,11 +864,31 @@ do_listview_colors (GtkWidget *do_widget)
|
|||||||
PangoAttrList *attrs;
|
PangoAttrList *attrs;
|
||||||
char *string;
|
char *string;
|
||||||
guint len;
|
guint len;
|
||||||
|
GtkWidget *selection_view;
|
||||||
|
GListModel *selection_filter;
|
||||||
|
GListModel *no_selection;
|
||||||
|
GtkWidget *grid;
|
||||||
|
GtkWidget *selection_size_label;
|
||||||
|
GtkWidget *selection_average_picture;
|
||||||
|
GtkWidget *selection_info_toggle;
|
||||||
|
GtkWidget *selection_info_revealer;
|
||||||
|
GtkWidget *progress;
|
||||||
|
GtkCssProvider *provider;
|
||||||
|
|
||||||
|
provider = gtk_css_provider_new ();
|
||||||
|
gtk_css_provider_load_from_resource (provider, "/listview_colors/listview_colors.css");
|
||||||
|
gtk_style_context_add_provider_for_display (gdk_display_get_default (),
|
||||||
|
GTK_STYLE_PROVIDER (provider),
|
||||||
|
800);
|
||||||
|
g_object_unref (provider);
|
||||||
|
|
||||||
|
sort_model = gtk_sort_list_model_new (gtk_color_list_new (0), NULL);
|
||||||
|
gtk_sort_list_model_set_incremental (sort_model, TRUE);
|
||||||
|
selection = gtk_multi_selection_new (G_LIST_MODEL (sort_model));
|
||||||
|
|
||||||
window = gtk_window_new ();
|
window = gtk_window_new ();
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Colors");
|
gtk_window_set_title (GTK_WINDOW (window), "Colors");
|
||||||
header = gtk_header_bar_new ();
|
header = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
|
||||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||||
|
|
||||||
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
gtk_window_set_default_size (GTK_WINDOW (window), 600, 400);
|
||||||
@@ -809,18 +896,95 @@ do_listview_colors (GtkWidget *do_widget)
|
|||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_display (do_widget));
|
||||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer*)&window);
|
g_object_add_weak_pointer (G_OBJECT (window), (gpointer*)&window);
|
||||||
|
|
||||||
|
overlay = gtk_overlay_new ();
|
||||||
|
gtk_window_set_child (GTK_WINDOW (window), overlay);
|
||||||
|
|
||||||
|
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||||
|
gtk_overlay_set_child (GTK_OVERLAY (overlay), box);
|
||||||
|
|
||||||
|
progress = gtk_progress_bar_new ();
|
||||||
|
gtk_widget_set_hexpand (progress, TRUE);
|
||||||
|
gtk_widget_set_valign (progress, GTK_ALIGN_START);
|
||||||
|
g_signal_connect (sort_model, "notify::pending", G_CALLBACK (update_progress_cb), progress);
|
||||||
|
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), progress);
|
||||||
|
|
||||||
|
selection_info_revealer = gtk_revealer_new ();
|
||||||
|
gtk_box_append (GTK_BOX (box), selection_info_revealer);
|
||||||
|
|
||||||
|
grid = gtk_grid_new ();
|
||||||
|
gtk_revealer_set_child (GTK_REVEALER (selection_info_revealer), grid);
|
||||||
|
gtk_widget_set_margin_start (grid, 10);
|
||||||
|
gtk_widget_set_margin_end (grid, 10);
|
||||||
|
gtk_widget_set_margin_top (grid, 10);
|
||||||
|
gtk_widget_set_margin_bottom (grid, 10);
|
||||||
|
gtk_grid_set_row_spacing (GTK_GRID (grid), 10);
|
||||||
|
gtk_grid_set_column_spacing (GTK_GRID (grid), 10);
|
||||||
|
|
||||||
|
label = gtk_label_new ("Selection");
|
||||||
|
gtk_widget_set_hexpand (label, TRUE);
|
||||||
|
gtk_widget_add_css_class (label, "title-3");
|
||||||
|
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 5, 1);
|
||||||
|
|
||||||
|
gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("Size:"), 0, 2, 1, 1);
|
||||||
|
|
||||||
|
selection_size_label = gtk_label_new ("0");
|
||||||
|
gtk_grid_attach (GTK_GRID (grid), selection_size_label, 1, 2, 1, 1);
|
||||||
|
|
||||||
|
gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("Average:"), 2, 2, 1, 1);
|
||||||
|
|
||||||
|
selection_average_picture = gtk_picture_new ();
|
||||||
|
gtk_widget_set_size_request (selection_average_picture, 32, 32);
|
||||||
|
gtk_grid_attach (GTK_GRID (grid), selection_average_picture, 3, 2, 1, 1);
|
||||||
|
|
||||||
|
label = gtk_label_new ("");
|
||||||
|
gtk_widget_set_hexpand (label, TRUE);
|
||||||
|
gtk_grid_attach (GTK_GRID (grid), label, 4, 2, 1, 1);
|
||||||
|
|
||||||
sw = gtk_scrolled_window_new ();
|
sw = gtk_scrolled_window_new ();
|
||||||
gtk_window_set_child (GTK_WINDOW (window), sw);
|
gtk_widget_set_hexpand (sw, TRUE);
|
||||||
|
|
||||||
|
gtk_grid_attach (GTK_GRID (grid), sw, 0, 1, 5, 1);
|
||||||
|
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sw),
|
||||||
|
GTK_POLICY_NEVER,
|
||||||
|
GTK_POLICY_AUTOMATIC);
|
||||||
|
|
||||||
|
factory = gtk_signal_list_item_factory_new ();
|
||||||
|
g_signal_connect (factory, "setup", G_CALLBACK (setup_selection_listitem_cb), NULL);
|
||||||
|
selection_view = gtk_grid_view_new_with_factory (NULL, factory);
|
||||||
|
gtk_widget_add_css_class (selection_view, "compact");
|
||||||
|
gtk_grid_view_set_max_columns (GTK_GRID_VIEW (selection_view), 200);
|
||||||
|
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), selection_view);
|
||||||
|
|
||||||
|
sw = gtk_scrolled_window_new ();
|
||||||
|
gtk_box_append (GTK_BOX (box), sw);
|
||||||
|
|
||||||
gridview = create_color_grid ();
|
gridview = create_color_grid ();
|
||||||
|
gtk_grid_view_set_model (GTK_GRID_VIEW (gridview), G_LIST_MODEL (selection));
|
||||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), gridview);
|
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), gridview);
|
||||||
model = gtk_grid_view_get_model (GTK_GRID_VIEW (gridview));
|
gtk_widget_set_hexpand (sw, TRUE);
|
||||||
g_object_get (model, "model", &model, NULL);
|
gtk_widget_set_vexpand (sw, TRUE);
|
||||||
|
|
||||||
|
selection_filter = G_LIST_MODEL (gtk_selection_filter_model_new (GTK_SELECTION_MODEL (selection)));
|
||||||
|
g_signal_connect (selection_filter, "items-changed", G_CALLBACK (update_selection_count), selection_size_label);
|
||||||
|
g_signal_connect (selection_filter, "items-changed", G_CALLBACK (update_selection_average), selection_average_picture);
|
||||||
|
|
||||||
|
no_selection = G_LIST_MODEL (gtk_no_selection_new (selection_filter));
|
||||||
|
gtk_grid_view_set_model (GTK_GRID_VIEW (selection_view), no_selection);
|
||||||
|
g_object_unref (no_selection);
|
||||||
|
|
||||||
|
selection_info_toggle = gtk_toggle_button_new ();
|
||||||
|
gtk_button_set_icon_name (GTK_BUTTON (selection_info_toggle), "emblem-important-symbolic");
|
||||||
|
gtk_widget_set_tooltip_text (selection_info_toggle, "Show selection info");
|
||||||
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), selection_info_toggle);
|
||||||
|
|
||||||
|
g_object_bind_property (selection_info_toggle, "active",
|
||||||
|
selection_info_revealer, "reveal-child",
|
||||||
|
G_BINDING_DEFAULT);
|
||||||
|
|
||||||
button = gtk_button_new_with_mnemonic ("_Refill");
|
button = gtk_button_new_with_mnemonic ("_Refill");
|
||||||
g_signal_connect (button, "clicked",
|
g_signal_connect (button, "clicked",
|
||||||
G_CALLBACK (refill),
|
G_CALLBACK (refill),
|
||||||
gtk_sort_list_model_get_model (GTK_SORT_LIST_MODEL (model)));
|
gtk_sort_list_model_get_model (sort_model));
|
||||||
|
|
||||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), button);
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), button);
|
||||||
|
|
||||||
@@ -835,15 +999,13 @@ do_listview_colors (GtkWidget *do_widget)
|
|||||||
gtk_label_set_width_chars (GTK_LABEL (label), len + 2);
|
gtk_label_set_width_chars (GTK_LABEL (label), len + 2);
|
||||||
gtk_label_set_xalign (GTK_LABEL (label), 1);
|
gtk_label_set_xalign (GTK_LABEL (label), 1);
|
||||||
|
|
||||||
g_signal_connect (gtk_grid_view_get_model (GTK_GRID_VIEW (gridview)),
|
g_signal_connect (selection, "items-changed", G_CALLBACK (items_changed_cb), label);
|
||||||
"items-changed", G_CALLBACK (items_changed_cb), label);
|
|
||||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), label);
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), label);
|
||||||
|
|
||||||
dropdown = gtk_drop_down_new ();
|
dropdown = gtk_drop_down_new_from_strings ((const char * const[]) { "8", "64", "512", "4096", "32768", "262144", "2097152", "16777216", NULL });
|
||||||
gtk_drop_down_set_from_strings (GTK_DROP_DOWN (dropdown), (const char *[]) { "8", "64", "512", "4096", "32768", "262144", "2097152", "16777216", NULL });
|
|
||||||
g_signal_connect (dropdown, "notify::selected",
|
g_signal_connect (dropdown, "notify::selected",
|
||||||
G_CALLBACK (limit_changed_cb),
|
G_CALLBACK (limit_changed_cb),
|
||||||
gtk_sort_list_model_get_model (GTK_SORT_LIST_MODEL (model)));
|
gtk_sort_list_model_get_model (sort_model));
|
||||||
g_signal_connect (dropdown, "notify::selected",
|
g_signal_connect (dropdown, "notify::selected",
|
||||||
G_CALLBACK (limit_changed_cb2),
|
G_CALLBACK (limit_changed_cb2),
|
||||||
label);
|
label);
|
||||||
@@ -918,24 +1080,19 @@ do_listview_colors (GtkWidget *do_widget)
|
|||||||
g_list_store_append (sorters, multi_sorter);
|
g_list_store_append (sorters, multi_sorter);
|
||||||
g_object_unref (multi_sorter);
|
g_object_unref (multi_sorter);
|
||||||
|
|
||||||
dropdown = gtk_drop_down_new ();
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
|
||||||
gtk_box_append (GTK_BOX (box), gtk_label_new ("Sort by:"));
|
|
||||||
gtk_box_append (GTK_BOX (box), dropdown);
|
|
||||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
|
|
||||||
|
|
||||||
expression = gtk_cclosure_expression_new (G_TYPE_STRING,
|
expression = gtk_cclosure_expression_new (G_TYPE_STRING,
|
||||||
NULL,
|
NULL,
|
||||||
0, NULL,
|
0, NULL,
|
||||||
(GCallback)get_title,
|
(GCallback)get_title,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
gtk_drop_down_set_expression (GTK_DROP_DOWN (dropdown), expression);
|
|
||||||
gtk_expression_unref (expression);
|
|
||||||
|
|
||||||
gtk_drop_down_set_model (GTK_DROP_DOWN (dropdown), G_LIST_MODEL (sorters));
|
dropdown = gtk_drop_down_new (G_LIST_MODEL (sorters), expression);
|
||||||
g_object_unref (sorters);
|
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
|
gtk_box_append (GTK_BOX (box), gtk_label_new ("Sort by:"));
|
||||||
|
gtk_box_append (GTK_BOX (box), dropdown);
|
||||||
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
|
||||||
|
|
||||||
g_object_bind_property (dropdown, "selected-item", model, "sorter", G_BINDING_SYNC_CREATE);
|
g_object_bind_property (dropdown, "selected-item", sort_model, "sorter", G_BINDING_SYNC_CREATE);
|
||||||
|
|
||||||
factories = g_list_store_new (GTK_TYPE_LIST_ITEM_FACTORY);
|
factories = g_list_store_new (GTK_TYPE_LIST_ITEM_FACTORY);
|
||||||
|
|
||||||
@@ -949,25 +1106,20 @@ do_listview_colors (GtkWidget *do_widget)
|
|||||||
set_title (factory, "Everything");
|
set_title (factory, "Everything");
|
||||||
g_list_store_append (factories, factory);
|
g_list_store_append (factories, factory);
|
||||||
|
|
||||||
dropdown = gtk_drop_down_new ();
|
|
||||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
|
||||||
gtk_box_append (GTK_BOX (box), gtk_label_new ("Show:"));
|
|
||||||
gtk_box_append (GTK_BOX (box), dropdown);
|
|
||||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
|
|
||||||
|
|
||||||
expression = gtk_cclosure_expression_new (G_TYPE_STRING,
|
expression = gtk_cclosure_expression_new (G_TYPE_STRING,
|
||||||
NULL,
|
NULL,
|
||||||
0, NULL,
|
0, NULL,
|
||||||
(GCallback)get_title,
|
(GCallback)get_title,
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
gtk_drop_down_set_expression (GTK_DROP_DOWN (dropdown), expression);
|
dropdown = gtk_drop_down_new (G_LIST_MODEL (factories), expression);
|
||||||
gtk_expression_unref (expression);
|
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 10);
|
||||||
|
gtk_box_append (GTK_BOX (box), gtk_label_new ("Show:"));
|
||||||
gtk_drop_down_set_model (GTK_DROP_DOWN (dropdown), G_LIST_MODEL (factories));
|
gtk_box_append (GTK_BOX (box), dropdown);
|
||||||
g_object_unref (factories);
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), box);
|
||||||
|
|
||||||
g_object_bind_property (dropdown, "selected-item", gridview, "factory", G_BINDING_SYNC_CREATE);
|
g_object_bind_property (dropdown, "selected-item", gridview, "factory", G_BINDING_SYNC_CREATE);
|
||||||
g_object_unref (model);
|
|
||||||
|
g_object_unref (selection);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
|
|||||||
3
demos/gtk-demo/listview_colors.css
Normal file
3
demos/gtk-demo/listview_colors.css
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
.view.compact > child {
|
||||||
|
padding: 1px;
|
||||||
|
}
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
list.viewswitcher {
|
listview.viewswitcher {
|
||||||
border: 1px solid gray;
|
border: 1px solid gray;
|
||||||
}
|
}
|
||||||
|
|
||||||
list.viewswitcher > row {
|
listview.viewswitcher > row {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
list.viewswitcher row:selected {
|
listview.viewswitcher row:selected {
|
||||||
background: gray;
|
background: gray;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,6 @@
|
|||||||
<property name="default-height">400</property>
|
<property name="default-height">400</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="">
|
<object class="GtkHeaderBar" id="">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="icon-name">go-up-symbolic</property>
|
<property name="icon-name">go-up-symbolic</property>
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
<property name="title" translatable="yes">Minesweeper</property>
|
<property name="title" translatable="yes">Minesweeper</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="">
|
<object class="GtkHeaderBar" id="">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="label">New Game</property>
|
<property name="label">New Game</property>
|
||||||
|
|||||||
@@ -214,8 +214,6 @@ transform_settings_to_keys (GBinding *binding,
|
|||||||
GtkSortListModel *sort_model;
|
GtkSortListModel *sort_model;
|
||||||
GtkFilterListModel *filter_model;
|
GtkFilterListModel *filter_model;
|
||||||
GtkFilter *filter;
|
GtkFilter *filter;
|
||||||
GtkNoSelection *selection_model;
|
|
||||||
GtkExpression *expression;
|
|
||||||
char **keys;
|
char **keys;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
@@ -243,24 +241,13 @@ transform_settings_to_keys (GBinding *binding,
|
|||||||
g_object_unref (settings);
|
g_object_unref (settings);
|
||||||
|
|
||||||
sort_model = gtk_sort_list_model_new (G_LIST_MODEL (store),
|
sort_model = gtk_sort_list_model_new (G_LIST_MODEL (store),
|
||||||
gtk_column_view_get_sorter (GTK_COLUMN_VIEW (data)));
|
g_object_ref (gtk_column_view_get_sorter (GTK_COLUMN_VIEW (data))));
|
||||||
g_object_unref (store);
|
|
||||||
|
|
||||||
expression = gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "name");
|
|
||||||
filter = gtk_string_filter_new ();
|
|
||||||
gtk_string_filter_set_expression (GTK_STRING_FILTER (filter), expression);
|
|
||||||
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (sort_model), filter);
|
|
||||||
gtk_expression_unref (expression);
|
|
||||||
g_object_unref (sort_model);
|
|
||||||
|
|
||||||
|
filter = gtk_string_filter_new (gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "name"));
|
||||||
g_set_object (¤t_filter, filter);
|
g_set_object (¤t_filter, filter);
|
||||||
|
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (sort_model), filter);
|
||||||
|
|
||||||
g_object_unref (filter);
|
g_value_take_object (to_value, gtk_no_selection_new (G_LIST_MODEL (filter_model)));
|
||||||
|
|
||||||
selection_model = gtk_no_selection_new (G_LIST_MODEL (filter_model));
|
|
||||||
g_object_unref (filter_model);
|
|
||||||
|
|
||||||
g_value_take_object (to_value, selection_model);
|
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -371,6 +358,8 @@ do_listview_settings (GtkWidget *do_widget)
|
|||||||
|
|
||||||
builder = gtk_builder_new ();
|
builder = gtk_builder_new ();
|
||||||
gtk_builder_set_scope (builder, scope);
|
gtk_builder_set_scope (builder, scope);
|
||||||
|
g_object_unref (scope);
|
||||||
|
|
||||||
gtk_builder_add_from_resource (builder, "/listview_settings/listview_settings.ui", NULL);
|
gtk_builder_add_from_resource (builder, "/listview_settings/listview_settings.ui", NULL);
|
||||||
|
|
||||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||||
@@ -407,8 +396,8 @@ do_listview_settings (GtkWidget *do_widget)
|
|||||||
g_object_unref (actions);
|
g_object_unref (actions);
|
||||||
|
|
||||||
model = create_settings_model (NULL, NULL);
|
model = create_settings_model (NULL, NULL);
|
||||||
treemodel = gtk_tree_list_model_new (FALSE,
|
treemodel = gtk_tree_list_model_new (model,
|
||||||
model,
|
FALSE,
|
||||||
TRUE,
|
TRUE,
|
||||||
create_settings_model,
|
create_settings_model,
|
||||||
NULL,
|
NULL,
|
||||||
@@ -422,8 +411,6 @@ do_listview_settings (GtkWidget *do_widget)
|
|||||||
columnview, NULL);
|
columnview, NULL);
|
||||||
gtk_list_view_set_model (GTK_LIST_VIEW (listview), G_LIST_MODEL (selection));
|
gtk_list_view_set_model (GTK_LIST_VIEW (listview), G_LIST_MODEL (selection));
|
||||||
g_object_unref (selection);
|
g_object_unref (selection);
|
||||||
g_object_unref (treemodel);
|
|
||||||
g_object_unref (model);
|
|
||||||
|
|
||||||
name_column = GTK_COLUMN_VIEW_COLUMN (gtk_builder_get_object (builder, "name_column"));
|
name_column = GTK_COLUMN_VIEW_COLUMN (gtk_builder_get_object (builder, "name_column"));
|
||||||
sorter = gtk_string_sorter_new (gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "name"));
|
sorter = gtk_string_sorter_new (gtk_property_expression_new (SETTINGS_TYPE_KEY, NULL, "name"));
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
<property name="default-height">480</property>
|
<property name="default-height">480</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar">
|
<object class="GtkHeaderBar">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child type="end">
|
<child type="end">
|
||||||
<object class="GtkToggleButton" id="search_button">
|
<object class="GtkToggleButton" id="search_button">
|
||||||
<property name="icon-name">system-search-symbolic</property>
|
<property name="icon-name">system-search-symbolic</property>
|
||||||
|
|||||||
@@ -194,8 +194,8 @@ create_weather_model (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
setup_widget (GtkListItem *list_item,
|
setup_widget (GtkSignalListItemFactory *factory,
|
||||||
gpointer unused)
|
GtkListItem *list_item)
|
||||||
{
|
{
|
||||||
GtkWidget *box, *child;
|
GtkWidget *box, *child;
|
||||||
|
|
||||||
@@ -218,8 +218,8 @@ setup_widget (GtkListItem *list_item,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
bind_widget (GtkListItem *list_item,
|
bind_widget (GtkSignalListItemFactory *factory,
|
||||||
gpointer unused)
|
GtkListItem *list_item)
|
||||||
{
|
{
|
||||||
GtkWidget *box, *child;
|
GtkWidget *box, *child;
|
||||||
GtkWeatherInfo *info;
|
GtkWeatherInfo *info;
|
||||||
@@ -281,19 +281,16 @@ GtkWidget *
|
|||||||
create_weather_view (void)
|
create_weather_view (void)
|
||||||
{
|
{
|
||||||
GtkWidget *listview;
|
GtkWidget *listview;
|
||||||
GListModel *model, *selection;
|
GListModel *model;
|
||||||
|
GtkListItemFactory *factory;
|
||||||
|
|
||||||
listview = gtk_list_view_new_with_factory (
|
factory = gtk_signal_list_item_factory_new ();
|
||||||
gtk_functions_list_item_factory_new (setup_widget,
|
g_signal_connect (factory, "setup", G_CALLBACK (setup_widget), NULL);
|
||||||
bind_widget,
|
g_signal_connect (factory, "bind", G_CALLBACK (bind_widget), NULL);
|
||||||
NULL, NULL));
|
model = G_LIST_MODEL (gtk_no_selection_new (create_weather_model ()));
|
||||||
|
listview = gtk_list_view_new_with_factory (model, factory);
|
||||||
gtk_orientable_set_orientation (GTK_ORIENTABLE (listview), GTK_ORIENTATION_HORIZONTAL);
|
gtk_orientable_set_orientation (GTK_ORIENTABLE (listview), GTK_ORIENTATION_HORIZONTAL);
|
||||||
gtk_list_view_set_show_separators (GTK_LIST_VIEW (listview), TRUE);
|
gtk_list_view_set_show_separators (GTK_LIST_VIEW (listview), TRUE);
|
||||||
model = create_weather_model ();
|
|
||||||
selection = G_LIST_MODEL (gtk_no_selection_new (model));
|
|
||||||
gtk_list_view_set_model (GTK_LIST_VIEW (listview), selection);
|
|
||||||
g_object_unref (selection);
|
|
||||||
g_object_unref (model);
|
|
||||||
|
|
||||||
return listview;
|
return listview;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,6 +65,7 @@ read_lines_cb (GObject *object,
|
|||||||
{
|
{
|
||||||
g_print ("Could not read data: %s\n", error->message);
|
g_print ("Could not read data: %s\n", error->message);
|
||||||
g_clear_error (&error);
|
g_clear_error (&error);
|
||||||
|
g_object_unref (stringlist);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -74,6 +75,7 @@ read_lines_cb (GObject *object,
|
|||||||
{
|
{
|
||||||
if (size)
|
if (size)
|
||||||
gtk_string_list_take (stringlist, g_utf8_make_valid (buffer, size));
|
gtk_string_list_take (stringlist, g_utf8_make_valid (buffer, size));
|
||||||
|
g_object_unref (stringlist);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,6 +123,7 @@ file_is_open_cb (GObject *file,
|
|||||||
{
|
{
|
||||||
g_print ("Could not open file: %s\n", error->message);
|
g_print ("Could not open file: %s\n", error->message);
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
|
g_object_unref (data);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,7 +137,7 @@ load_file (GtkStringList *list,
|
|||||||
GFile *file)
|
GFile *file)
|
||||||
{
|
{
|
||||||
gtk_string_list_splice (list, 0, g_list_model_get_n_items (G_LIST_MODEL (list)), NULL);
|
gtk_string_list_splice (list, 0, g_list_model_get_n_items (G_LIST_MODEL (list)), NULL);
|
||||||
g_file_read_async (file, G_PRIORITY_HIGH_IDLE, NULL, file_is_open_cb, list);
|
g_file_read_async (file, G_PRIORITY_HIGH_IDLE, NULL, file_is_open_cb, g_object_ref (list));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -157,10 +160,8 @@ do_listview_words (GtkWidget *do_widget)
|
|||||||
{
|
{
|
||||||
GtkWidget *header, *listview, *sw, *vbox, *search_entry, *open_button, *overlay;
|
GtkWidget *header, *listview, *sw, *vbox, *search_entry, *open_button, *overlay;
|
||||||
GtkFilterListModel *filter_model;
|
GtkFilterListModel *filter_model;
|
||||||
GtkNoSelection *selection;
|
|
||||||
GtkStringList *stringlist;
|
GtkStringList *stringlist;
|
||||||
GtkFilter *filter;
|
GtkFilter *filter;
|
||||||
GtkExpression *expression;
|
|
||||||
GFile *file;
|
GFile *file;
|
||||||
|
|
||||||
file = g_file_new_for_path ("/usr/share/dict/words");
|
file = g_file_new_for_path ("/usr/share/dict/words");
|
||||||
@@ -176,11 +177,9 @@ do_listview_words (GtkWidget *do_widget)
|
|||||||
stringlist = gtk_string_list_new ((const char **) words);
|
stringlist = gtk_string_list_new ((const char **) words);
|
||||||
g_strfreev (words);
|
g_strfreev (words);
|
||||||
}
|
}
|
||||||
|
g_object_unref (file);
|
||||||
|
|
||||||
filter = gtk_string_filter_new ();
|
filter = gtk_string_filter_new (gtk_property_expression_new (GTK_TYPE_STRING_OBJECT, NULL, "string"));
|
||||||
expression = gtk_property_expression_new (GTK_TYPE_STRING_OBJECT, NULL, "string");
|
|
||||||
gtk_string_filter_set_expression (GTK_STRING_FILTER (filter), expression);
|
|
||||||
gtk_expression_unref (expression);
|
|
||||||
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (stringlist), filter);
|
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (stringlist), filter);
|
||||||
gtk_filter_list_model_set_incremental (filter_model, TRUE);
|
gtk_filter_list_model_set_incremental (filter_model, TRUE);
|
||||||
|
|
||||||
@@ -215,21 +214,19 @@ do_listview_words (GtkWidget *do_widget)
|
|||||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), progress);
|
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), progress);
|
||||||
|
|
||||||
sw = gtk_scrolled_window_new ();
|
sw = gtk_scrolled_window_new ();
|
||||||
|
gtk_widget_set_vexpand (sw, TRUE);
|
||||||
gtk_overlay_set_child (GTK_OVERLAY (overlay), sw);
|
gtk_overlay_set_child (GTK_OVERLAY (overlay), sw);
|
||||||
|
|
||||||
listview = gtk_list_view_new_with_factory (
|
listview = gtk_list_view_new_with_factory (
|
||||||
|
G_LIST_MODEL (gtk_no_selection_new (G_LIST_MODEL (filter_model))),
|
||||||
gtk_builder_list_item_factory_new_from_bytes (NULL,
|
gtk_builder_list_item_factory_new_from_bytes (NULL,
|
||||||
g_bytes_new_static (factory_text, strlen (factory_text))));
|
g_bytes_new_static (factory_text, strlen (factory_text))));
|
||||||
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), listview);
|
gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), listview);
|
||||||
selection = gtk_no_selection_new (G_LIST_MODEL (filter_model));
|
|
||||||
gtk_list_view_set_model (GTK_LIST_VIEW (listview), G_LIST_MODEL (selection));
|
|
||||||
g_object_unref (selection);
|
|
||||||
|
|
||||||
g_signal_connect (filter_model, "items-changed", G_CALLBACK (update_title_cb), progress);
|
g_signal_connect (filter_model, "items-changed", G_CALLBACK (update_title_cb), progress);
|
||||||
g_signal_connect (filter_model, "notify::pending", G_CALLBACK (update_title_cb), progress);
|
g_signal_connect (filter_model, "notify::pending", G_CALLBACK (update_title_cb), progress);
|
||||||
update_title_cb (filter_model);
|
update_title_cb (filter_model);
|
||||||
|
|
||||||
g_object_unref (filter_model);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!gtk_widget_get_visible (window))
|
if (!gtk_widget_get_visible (window))
|
||||||
|
|||||||
@@ -13,11 +13,12 @@
|
|||||||
static GtkWidget *info_view;
|
static GtkWidget *info_view;
|
||||||
static GtkWidget *source_view;
|
static GtkWidget *source_view;
|
||||||
|
|
||||||
static gchar *current_file = NULL;
|
static char *current_file = NULL;
|
||||||
|
|
||||||
static GtkWidget *notebook;
|
static GtkWidget *notebook;
|
||||||
static GtkSingleSelection *selection;
|
static GtkSingleSelection *selection;
|
||||||
static GtkWidget *toplevel;
|
static GtkWidget *toplevel;
|
||||||
|
static char **search_needle;
|
||||||
|
|
||||||
typedef struct _GtkDemo GtkDemo;
|
typedef struct _GtkDemo GtkDemo;
|
||||||
struct _GtkDemo
|
struct _GtkDemo
|
||||||
@@ -140,15 +141,21 @@ activate_about (GSimpleAction *action,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkApplication *app = user_data;
|
GtkApplication *app = user_data;
|
||||||
const gchar *authors[] = {
|
const char *authors[] = {
|
||||||
"The GTK Team",
|
"The GTK Team",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
char *version;
|
char *version;
|
||||||
|
char *os_name;
|
||||||
|
char *os_version;
|
||||||
GString *s;
|
GString *s;
|
||||||
|
|
||||||
s = g_string_new ("");
|
s = g_string_new ("");
|
||||||
|
|
||||||
|
os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
|
||||||
|
os_version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
|
||||||
|
if (os_name && os_version)
|
||||||
|
g_string_append_printf (s, "OS\t%s %s\n\n", os_name, os_version);
|
||||||
g_string_append (s, "System libraries\n");
|
g_string_append (s, "System libraries\n");
|
||||||
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
|
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
|
||||||
glib_major_version,
|
glib_major_version,
|
||||||
@@ -183,6 +190,8 @@ activate_about (GSimpleAction *action,
|
|||||||
|
|
||||||
g_string_free (s, TRUE);
|
g_string_free (s, TRUE);
|
||||||
g_free (version);
|
g_free (version);
|
||||||
|
g_free (os_name);
|
||||||
|
g_free (os_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -225,377 +234,113 @@ activate_run (GSimpleAction *action,
|
|||||||
gtk_demo_run (demo, window);
|
gtk_demo_run (demo, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Stupid syntax highlighting.
|
static GBytes *
|
||||||
*
|
fontify_text (const char *format,
|
||||||
* No regex was used in the making of this highlighting.
|
const char *text)
|
||||||
* It should only work for simple cases. This is good, as
|
|
||||||
* that's all we should have in the demos.
|
|
||||||
*/
|
|
||||||
/* This code should not be used elsewhere, except perhaps as an example of how
|
|
||||||
* to iterate through a text buffer.
|
|
||||||
*/
|
|
||||||
enum {
|
|
||||||
STATE_NORMAL,
|
|
||||||
STATE_IN_COMMENT
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *tokens[] =
|
|
||||||
{
|
{
|
||||||
"/*",
|
GSubprocess *subprocess;
|
||||||
"\"",
|
GBytes *stdin_buf;
|
||||||
NULL
|
GBytes *stdout_buf = NULL;
|
||||||
};
|
GBytes *stderr_buf = NULL;
|
||||||
|
GError *error = NULL;
|
||||||
|
char *format_arg;
|
||||||
|
|
||||||
static const char *types[] =
|
format_arg = g_strconcat ("--syntax=", format, NULL);
|
||||||
{
|
subprocess = g_subprocess_new (G_SUBPROCESS_FLAGS_STDIN_PIPE |
|
||||||
"static",
|
G_SUBPROCESS_FLAGS_STDOUT_PIPE |
|
||||||
"const ",
|
G_SUBPROCESS_FLAGS_STDERR_PIPE,
|
||||||
"void",
|
&error,
|
||||||
"gint",
|
"highlight",
|
||||||
" int ",
|
format_arg,
|
||||||
" char ",
|
"--out-format=pango",
|
||||||
"gchar ",
|
NULL);
|
||||||
"gfloat",
|
g_free (format_arg);
|
||||||
"float",
|
|
||||||
"double",
|
|
||||||
"gint8",
|
|
||||||
"gint16",
|
|
||||||
"gint32",
|
|
||||||
"guint",
|
|
||||||
"guint8",
|
|
||||||
"guint16",
|
|
||||||
"guint32",
|
|
||||||
"guchar",
|
|
||||||
"glong",
|
|
||||||
"gboolean" ,
|
|
||||||
"gshort",
|
|
||||||
"gushort",
|
|
||||||
"gulong",
|
|
||||||
"gdouble",
|
|
||||||
"gldouble",
|
|
||||||
"gpointer",
|
|
||||||
"NULL",
|
|
||||||
"GList",
|
|
||||||
"GSList",
|
|
||||||
"FALSE",
|
|
||||||
"TRUE",
|
|
||||||
"FILE ",
|
|
||||||
"GtkColorSelection ",
|
|
||||||
"GtkWidget ",
|
|
||||||
"GtkButton ",
|
|
||||||
"GdkColor ",
|
|
||||||
"GdkRectangle ",
|
|
||||||
"GdkEventExpose ",
|
|
||||||
"GdkGC ",
|
|
||||||
"GdkPixbufLoader ",
|
|
||||||
"GdkPixbuf ",
|
|
||||||
"GError",
|
|
||||||
"size_t",
|
|
||||||
"GtkAboutDialog ",
|
|
||||||
"GtkAction ",
|
|
||||||
"GtkActionEntry ",
|
|
||||||
"GtkRadioActionEntry ",
|
|
||||||
"GtkIconFactory ",
|
|
||||||
"GtkTextBuffer ",
|
|
||||||
"GtkStatusbar ",
|
|
||||||
"GtkTextIter ",
|
|
||||||
"GtkTextMark ",
|
|
||||||
"GdkEventWindowState ",
|
|
||||||
"GtkActionGroup ",
|
|
||||||
"GtkUIManager ",
|
|
||||||
"GtkRadioAction ",
|
|
||||||
"GtkActionClass ",
|
|
||||||
"GtkToggleActionEntry ",
|
|
||||||
"GtkAssistant ",
|
|
||||||
"GtkBuilder ",
|
|
||||||
"GtkSizeGroup ",
|
|
||||||
"GtkTreeModel ",
|
|
||||||
"GtkTreeSelection ",
|
|
||||||
"GdkDisplay ",
|
|
||||||
"GdkScreen ",
|
|
||||||
"GdkSurface ",
|
|
||||||
"GdkEventButton ",
|
|
||||||
"GdkCursor ",
|
|
||||||
"GtkTreeIter ",
|
|
||||||
"GtkTreeViewColumn ",
|
|
||||||
"GdkDisplayManager ",
|
|
||||||
"GdkClipboard ",
|
|
||||||
"GtkIconSize ",
|
|
||||||
"GtkImage ",
|
|
||||||
"GdkDragContext ",
|
|
||||||
"GtkSelectionData ",
|
|
||||||
"GtkDialog ",
|
|
||||||
"GtkMenuItem ",
|
|
||||||
"GtkListStore ",
|
|
||||||
"GtkCellLayout ",
|
|
||||||
"GtkCellRenderer ",
|
|
||||||
"GtkTreePath ",
|
|
||||||
"GtkTreeStore ",
|
|
||||||
"GtkEntry ",
|
|
||||||
"GtkEditable ",
|
|
||||||
"GtkEditableInterface ",
|
|
||||||
"GdkPixmap ",
|
|
||||||
"GdkEventConfigure ",
|
|
||||||
"GdkEventMotion ",
|
|
||||||
"GdkModifierType ",
|
|
||||||
"GtkEntryCompletion ",
|
|
||||||
"GtkToolItem ",
|
|
||||||
"GDir ",
|
|
||||||
"GtkIconView ",
|
|
||||||
"GtkCellRendererText ",
|
|
||||||
"GtkContainer ",
|
|
||||||
"GtkPaned ",
|
|
||||||
"GtkPrintOperation ",
|
|
||||||
"GtkPrintContext ",
|
|
||||||
"cairo_t ",
|
|
||||||
"PangoLayout "
|
|
||||||
"PangoFontDescription ",
|
|
||||||
"PangoRenderer ",
|
|
||||||
"PangoMatrix ",
|
|
||||||
"PangoContext ",
|
|
||||||
"PangoLayout ",
|
|
||||||
"GtkToggleButton ",
|
|
||||||
"GString ",
|
|
||||||
"GtkIconSize ",
|
|
||||||
"GtkTreeView ",
|
|
||||||
"GtkTextTag ",
|
|
||||||
"GdkEvent ",
|
|
||||||
"GdkEventKey ",
|
|
||||||
"GtkTextView ",
|
|
||||||
"GdkBitmap ",
|
|
||||||
"GtkTextChildAnchor ",
|
|
||||||
"GArray ",
|
|
||||||
"GtkCellEditable ",
|
|
||||||
"GtkCellRendererToggle ",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
|
|
||||||
static const char *control[] =
|
if (!subprocess)
|
||||||
{
|
|
||||||
" if ",
|
|
||||||
" while ",
|
|
||||||
" else",
|
|
||||||
" do ",
|
|
||||||
" for ",
|
|
||||||
"?",
|
|
||||||
":",
|
|
||||||
"return ",
|
|
||||||
"goto ",
|
|
||||||
NULL
|
|
||||||
};
|
|
||||||
void
|
|
||||||
parse_chars (gchar *text,
|
|
||||||
gchar **end_ptr,
|
|
||||||
gint *state,
|
|
||||||
const char **tag,
|
|
||||||
gboolean start)
|
|
||||||
{
|
|
||||||
gint i;
|
|
||||||
gchar *next_token;
|
|
||||||
|
|
||||||
/* Handle comments first */
|
|
||||||
if (*state == STATE_IN_COMMENT)
|
|
||||||
{
|
{
|
||||||
*end_ptr = strstr (text, "*/");
|
if (g_error_matches (error, G_SPAWN_ERROR, G_SPAWN_ERROR_NOENT))
|
||||||
if (*end_ptr)
|
|
||||||
{
|
{
|
||||||
*end_ptr += 2;
|
static gboolean warned = FALSE;
|
||||||
*state = STATE_NORMAL;
|
|
||||||
*tag = "comment";
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
*tag = NULL;
|
if (!warned)
|
||||||
*end_ptr = NULL;
|
|
||||||
|
|
||||||
/* check for comment */
|
|
||||||
if (!strncmp (text, "/*", 2))
|
|
||||||
{
|
|
||||||
*end_ptr = strstr (text, "*/");
|
|
||||||
if (*end_ptr)
|
|
||||||
*end_ptr += 2;
|
|
||||||
else
|
|
||||||
*state = STATE_IN_COMMENT;
|
|
||||||
*tag = "comment";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check for preprocessor defines */
|
|
||||||
if (*text == '#' && start)
|
|
||||||
{
|
|
||||||
*end_ptr = NULL;
|
|
||||||
*tag = "preprocessor";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* functions */
|
|
||||||
if (start && * text != '\t' && *text != ' ' && *text != '{' && *text != '}')
|
|
||||||
{
|
|
||||||
if (strstr (text, "("))
|
|
||||||
{
|
|
||||||
*end_ptr = strstr (text, "(");
|
|
||||||
*tag = "function";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* check for types */
|
|
||||||
for (i = 0; types[i] != NULL; i++)
|
|
||||||
if (!strncmp (text, types[i], strlen (types[i])) ||
|
|
||||||
(start && types[i][0] == ' ' && !strncmp (text, types[i] + 1, strlen (types[i]) - 1)))
|
|
||||||
{
|
|
||||||
*end_ptr = text + strlen (types[i]);
|
|
||||||
*tag = "type";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check for control */
|
|
||||||
for (i = 0; control[i] != NULL; i++)
|
|
||||||
if (!strncmp (text, control[i], strlen (control[i])))
|
|
||||||
{
|
|
||||||
*end_ptr = text + strlen (control[i]);
|
|
||||||
*tag = "control";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* check for string */
|
|
||||||
if (text[0] == '"')
|
|
||||||
{
|
|
||||||
gint maybe_escape = FALSE;
|
|
||||||
|
|
||||||
*end_ptr = text + 1;
|
|
||||||
*tag = "string";
|
|
||||||
while (**end_ptr != '\000')
|
|
||||||
{
|
|
||||||
if (**end_ptr == '\"' && !maybe_escape)
|
|
||||||
{
|
{
|
||||||
*end_ptr += 1;
|
warned = TRUE;
|
||||||
return;
|
g_message ("For syntax highlighting, install the “highlight” program");
|
||||||
}
|
}
|
||||||
if (**end_ptr == '\\')
|
|
||||||
maybe_escape = TRUE;
|
|
||||||
else
|
|
||||||
maybe_escape = FALSE;
|
|
||||||
*end_ptr += 1;
|
|
||||||
}
|
}
|
||||||
return;
|
else
|
||||||
|
g_warning ("%s", error->message);
|
||||||
|
|
||||||
|
g_clear_error (&error);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* not at the start of a tag. Find the next one. */
|
stdin_buf = g_bytes_new_static (text, strlen (text));
|
||||||
for (i = 0; tokens[i] != NULL; i++)
|
|
||||||
|
if (!g_subprocess_communicate (subprocess,
|
||||||
|
stdin_buf,
|
||||||
|
NULL,
|
||||||
|
&stdout_buf,
|
||||||
|
&stderr_buf,
|
||||||
|
&error))
|
||||||
{
|
{
|
||||||
next_token = strstr (text, tokens[i]);
|
g_clear_pointer (&stdin_buf, g_bytes_unref);
|
||||||
if (next_token)
|
g_clear_pointer (&stdout_buf, g_bytes_unref);
|
||||||
{
|
g_clear_pointer (&stderr_buf, g_bytes_unref);
|
||||||
if (*end_ptr)
|
|
||||||
*end_ptr = (*end_ptr<next_token)?*end_ptr:next_token;
|
g_warning ("%s", error->message);
|
||||||
else
|
g_clear_error (&error);
|
||||||
*end_ptr = next_token;
|
|
||||||
}
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; types[i] != NULL; i++)
|
g_bytes_unref (stdin_buf);
|
||||||
|
|
||||||
|
if (g_subprocess_get_exit_status (subprocess) != 0)
|
||||||
{
|
{
|
||||||
next_token = strstr (text, types[i]);
|
if (stderr_buf)
|
||||||
if (next_token)
|
g_warning ("%s", (char *)g_bytes_get_data (stderr_buf, NULL));
|
||||||
{
|
|
||||||
if (*end_ptr)
|
g_clear_pointer (&stdout_buf, g_bytes_unref);
|
||||||
*end_ptr = (*end_ptr<next_token)?*end_ptr:next_token;
|
|
||||||
else
|
|
||||||
*end_ptr = next_token;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; control[i] != NULL; i++)
|
g_clear_pointer (&stderr_buf, g_bytes_unref);
|
||||||
{
|
|
||||||
next_token = strstr (text, control[i]);
|
g_object_unref (subprocess);
|
||||||
if (next_token)
|
|
||||||
{
|
return stdout_buf;
|
||||||
if (*end_ptr)
|
|
||||||
*end_ptr = (*end_ptr<next_token)?*end_ptr:next_token;
|
|
||||||
else
|
|
||||||
*end_ptr = next_token;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* While not as cool as c-mode, this will do as a quick attempt at highlighting */
|
|
||||||
void
|
void
|
||||||
fontify (GtkTextBuffer *source_buffer)
|
fontify (const char *format,
|
||||||
|
GtkTextBuffer *source_buffer)
|
||||||
{
|
{
|
||||||
GtkTextIter start_iter, next_iter, tmp_iter;
|
GtkTextIter start, end;
|
||||||
gint state;
|
char *text;
|
||||||
gchar *text;
|
GBytes *bytes;
|
||||||
gchar *start_ptr, *end_ptr;
|
|
||||||
const char *tag;
|
|
||||||
|
|
||||||
gtk_text_buffer_create_tag (source_buffer, "source",
|
gtk_text_buffer_get_bounds (source_buffer, &start, &end);
|
||||||
"font", "monospace",
|
text = gtk_text_buffer_get_text (source_buffer, &start, &end, TRUE);
|
||||||
NULL);
|
|
||||||
gtk_text_buffer_create_tag (source_buffer, "comment",
|
|
||||||
"foreground", "DodgerBlue",
|
|
||||||
NULL);
|
|
||||||
gtk_text_buffer_create_tag (source_buffer, "type",
|
|
||||||
"foreground", "ForestGreen",
|
|
||||||
NULL);
|
|
||||||
gtk_text_buffer_create_tag (source_buffer, "string",
|
|
||||||
"foreground", "RosyBrown",
|
|
||||||
"weight", PANGO_WEIGHT_BOLD,
|
|
||||||
NULL);
|
|
||||||
gtk_text_buffer_create_tag (source_buffer, "control",
|
|
||||||
"foreground", "purple",
|
|
||||||
NULL);
|
|
||||||
gtk_text_buffer_create_tag (source_buffer, "preprocessor",
|
|
||||||
"style", PANGO_STYLE_OBLIQUE,
|
|
||||||
"foreground", "burlywood4",
|
|
||||||
NULL);
|
|
||||||
gtk_text_buffer_create_tag (source_buffer, "function",
|
|
||||||
"weight", PANGO_WEIGHT_BOLD,
|
|
||||||
"foreground", "DarkGoldenrod4",
|
|
||||||
NULL);
|
|
||||||
|
|
||||||
gtk_text_buffer_get_bounds (source_buffer, &start_iter, &tmp_iter);
|
bytes = fontify_text (format, text);
|
||||||
gtk_text_buffer_apply_tag_by_name (source_buffer, "source", &start_iter, &tmp_iter);
|
if (bytes)
|
||||||
|
|
||||||
state = STATE_NORMAL;
|
|
||||||
|
|
||||||
gtk_text_buffer_get_iter_at_offset (source_buffer, &start_iter, 0);
|
|
||||||
|
|
||||||
next_iter = start_iter;
|
|
||||||
while (gtk_text_iter_forward_line (&next_iter))
|
|
||||||
{
|
{
|
||||||
gboolean start = TRUE;
|
char *markup;
|
||||||
start_ptr = text = gtk_text_iter_get_text (&start_iter, &next_iter);
|
gsize len;
|
||||||
|
|
||||||
do
|
markup = g_bytes_unref_to_data (bytes, &len);
|
||||||
{
|
gtk_text_buffer_delete (source_buffer, &start, &end);
|
||||||
parse_chars (start_ptr, &end_ptr, &state, &tag, start);
|
gtk_text_buffer_insert_markup (source_buffer, &start, markup, len);
|
||||||
|
g_free (markup);
|
||||||
start = FALSE;
|
|
||||||
if (end_ptr)
|
|
||||||
{
|
|
||||||
tmp_iter = start_iter;
|
|
||||||
gtk_text_iter_forward_chars (&tmp_iter, end_ptr - start_ptr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
tmp_iter = next_iter;
|
|
||||||
}
|
|
||||||
if (tag)
|
|
||||||
gtk_text_buffer_apply_tag_by_name (source_buffer, tag, &start_iter, &tmp_iter);
|
|
||||||
|
|
||||||
start_iter = tmp_iter;
|
|
||||||
start_ptr = end_ptr;
|
|
||||||
}
|
|
||||||
while (end_ptr);
|
|
||||||
|
|
||||||
g_free (text);
|
|
||||||
start_iter = next_iter;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_free (text);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
display_image (const char *resource)
|
display_image (const char *format,
|
||||||
|
const char *resource)
|
||||||
{
|
{
|
||||||
GtkWidget *sw, *image;
|
GtkWidget *sw, *image;
|
||||||
|
|
||||||
@@ -609,7 +354,8 @@ display_image (const char *resource)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
display_text (const char *resource)
|
display_text (const char *format,
|
||||||
|
const char *resource)
|
||||||
{
|
{
|
||||||
GtkTextBuffer *buffer;
|
GtkTextBuffer *buffer;
|
||||||
GtkWidget *textview, *sw;
|
GtkWidget *textview, *sw;
|
||||||
@@ -636,8 +382,10 @@ display_text (const char *resource)
|
|||||||
|
|
||||||
buffer = gtk_text_buffer_new (NULL);
|
buffer = gtk_text_buffer_new (NULL);
|
||||||
gtk_text_buffer_set_text (buffer, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
|
gtk_text_buffer_set_text (buffer, g_bytes_get_data (bytes, NULL), g_bytes_get_size (bytes));
|
||||||
if (g_str_has_suffix (resource, ".c"))
|
|
||||||
fontify (buffer);
|
if (format)
|
||||||
|
fontify (format, buffer);
|
||||||
|
|
||||||
gtk_text_view_set_buffer (GTK_TEXT_VIEW (textview), buffer);
|
gtk_text_view_set_buffer (GTK_TEXT_VIEW (textview), buffer);
|
||||||
|
|
||||||
g_bytes_unref (bytes);
|
g_bytes_unref (bytes);
|
||||||
@@ -652,7 +400,8 @@ display_text (const char *resource)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
display_video (const char *resource)
|
display_video (const char *format,
|
||||||
|
const char *resource)
|
||||||
{
|
{
|
||||||
GtkWidget *video;
|
GtkWidget *video;
|
||||||
|
|
||||||
@@ -679,25 +428,27 @@ display_nothing (const char *resource)
|
|||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
const char *extension;
|
const char *extension;
|
||||||
GtkWidget * (* display_func) (const char *resource);
|
const char *format;
|
||||||
|
GtkWidget * (* display_func) (const char *format,
|
||||||
|
const char *resource);
|
||||||
} display_funcs[] = {
|
} display_funcs[] = {
|
||||||
{ ".gif", display_image },
|
{ ".gif", NULL, display_image },
|
||||||
{ ".jpg", display_image },
|
{ ".jpg", NULL, display_image },
|
||||||
{ ".png", display_image },
|
{ ".png", NULL, display_image },
|
||||||
{ ".c", display_text },
|
{ ".c", "c", display_text },
|
||||||
{ ".css", display_text },
|
{ ".css", "css", display_text },
|
||||||
{ ".glsl", display_text },
|
{ ".glsl", NULL, display_text },
|
||||||
{ ".h", display_text },
|
{ ".h", "c", display_text },
|
||||||
{ ".txt", display_text },
|
{ ".txt", NULL, display_text },
|
||||||
{ ".ui", display_text },
|
{ ".ui", "xml", display_text },
|
||||||
{ ".webm", display_video }
|
{ ".webm", NULL, display_video }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
add_data_tab (const gchar *demoname)
|
add_data_tab (const char *demoname)
|
||||||
{
|
{
|
||||||
gchar *resource_dir, *resource_name;
|
char *resource_dir, *resource_name;
|
||||||
gchar **resources;
|
char **resources;
|
||||||
GtkWidget *widget, *label;
|
GtkWidget *widget, *label;
|
||||||
guint i, j;
|
guint i, j;
|
||||||
|
|
||||||
@@ -720,7 +471,7 @@ add_data_tab (const gchar *demoname)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (j < G_N_ELEMENTS(display_funcs))
|
if (j < G_N_ELEMENTS(display_funcs))
|
||||||
widget = display_funcs[j].display_func (resource_name);
|
widget = display_funcs[j].display_func (display_funcs[j].format, resource_name);
|
||||||
else
|
else
|
||||||
widget = display_nothing (resource_name);
|
widget = display_nothing (resource_name);
|
||||||
|
|
||||||
@@ -741,15 +492,15 @@ add_data_tab (const gchar *demoname)
|
|||||||
static void
|
static void
|
||||||
remove_data_tabs (void)
|
remove_data_tabs (void)
|
||||||
{
|
{
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
for (i = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) - 1; i > 1; i--)
|
for (i = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) - 1; i > 1; i--)
|
||||||
gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), i);
|
gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
load_file (const gchar *demoname,
|
load_file (const char *demoname,
|
||||||
const gchar *filename)
|
const char *filename)
|
||||||
{
|
{
|
||||||
GtkTextBuffer *info_buffer, *source_buffer;
|
GtkTextBuffer *info_buffer, *source_buffer;
|
||||||
GtkTextIter start, end;
|
GtkTextIter start, end;
|
||||||
@@ -757,9 +508,9 @@ load_file (const gchar *demoname,
|
|||||||
GError *err = NULL;
|
GError *err = NULL;
|
||||||
int state = 0;
|
int state = 0;
|
||||||
gboolean in_para = 0;
|
gboolean in_para = 0;
|
||||||
gchar **lines;
|
char **lines;
|
||||||
GBytes *bytes;
|
GBytes *bytes;
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
if (!g_strcmp0 (current_file, filename))
|
if (!g_strcmp0 (current_file, filename))
|
||||||
return;
|
return;
|
||||||
@@ -799,9 +550,9 @@ load_file (const gchar *demoname,
|
|||||||
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
|
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
|
||||||
for (i = 0; lines[i] != NULL; i++)
|
for (i = 0; lines[i] != NULL; i++)
|
||||||
{
|
{
|
||||||
gchar *p;
|
char *p;
|
||||||
gchar *q;
|
char *q;
|
||||||
gchar *r;
|
char *r;
|
||||||
|
|
||||||
/* Make sure \r is stripped at the end for the poor windows people */
|
/* Make sure \r is stripped at the end for the poor windows people */
|
||||||
lines[i] = g_strchomp (lines[i]);
|
lines[i] = g_strchomp (lines[i]);
|
||||||
@@ -915,7 +666,7 @@ load_file (const gchar *demoname,
|
|||||||
|
|
||||||
g_strfreev (lines);
|
g_strfreev (lines);
|
||||||
|
|
||||||
fontify (source_buffer);
|
fontify ("c", source_buffer);
|
||||||
|
|
||||||
gtk_text_buffer_end_irreversible_action (source_buffer);
|
gtk_text_buffer_end_irreversible_action (source_buffer);
|
||||||
gtk_text_view_set_buffer (GTK_TEXT_VIEW (source_view), source_buffer);
|
gtk_text_view_set_buffer (GTK_TEXT_VIEW (source_view), source_buffer);
|
||||||
@@ -945,7 +696,18 @@ selection_cb (GtkSingleSelection *sel,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkTreeListRow *row = gtk_single_selection_get_selected_item (sel);
|
GtkTreeListRow *row = gtk_single_selection_get_selected_item (sel);
|
||||||
GtkDemo *demo = gtk_tree_list_row_get_item (row);
|
GtkDemo *demo;
|
||||||
|
|
||||||
|
gtk_widget_set_sensitive (GTK_WIDGET (notebook), !!row);
|
||||||
|
|
||||||
|
if (!row)
|
||||||
|
{
|
||||||
|
gtk_window_set_title (GTK_WINDOW (toplevel), "No match");
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
demo = gtk_tree_list_row_get_item (row);
|
||||||
|
|
||||||
if (demo->filename)
|
if (demo->filename)
|
||||||
load_file (demo->name, demo->filename);
|
load_file (demo->name, demo->filename);
|
||||||
@@ -953,6 +715,84 @@ selection_cb (GtkSingleSelection *sel,
|
|||||||
gtk_window_set_title (GTK_WINDOW (toplevel), demo->title);
|
gtk_window_set_title (GTK_WINDOW (toplevel), demo->title);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
filter_demo (GtkDemo *demo)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* Show only if the name maches every needle */
|
||||||
|
for (i = 0; search_needle[i]; i++)
|
||||||
|
{
|
||||||
|
if (!demo->title)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
if (g_str_match_string (search_needle[i], demo->title, TRUE))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
demo_filter_by_name (GtkTreeListRow *row,
|
||||||
|
GtkFilterListModel *model)
|
||||||
|
{
|
||||||
|
GListModel *children;
|
||||||
|
GtkDemo *demo;
|
||||||
|
guint i, n;
|
||||||
|
|
||||||
|
/* Show all items if search is empty */
|
||||||
|
if (!search_needle || !search_needle[0] || !*search_needle[0])
|
||||||
|
return TRUE;
|
||||||
|
|
||||||
|
g_assert (GTK_IS_TREE_LIST_ROW (row));
|
||||||
|
g_assert (GTK_IS_FILTER_LIST_MODEL (model));
|
||||||
|
|
||||||
|
children = gtk_tree_list_row_get_children (row);
|
||||||
|
if (children)
|
||||||
|
{
|
||||||
|
n = g_list_model_get_n_items (children);
|
||||||
|
for (i = 0; i < n; i++)
|
||||||
|
{
|
||||||
|
demo = g_list_model_get_item (children, i);
|
||||||
|
g_assert (GTK_IS_DEMO (demo));
|
||||||
|
|
||||||
|
if (filter_demo (demo))
|
||||||
|
{
|
||||||
|
g_object_unref (demo);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
g_object_unref (demo);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
demo = gtk_tree_list_row_get_item (row);
|
||||||
|
g_assert (GTK_IS_DEMO (demo));
|
||||||
|
|
||||||
|
return filter_demo (demo);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
demo_search_changed_cb (GtkSearchEntry *entry,
|
||||||
|
GtkFilter *filter)
|
||||||
|
{
|
||||||
|
const char *text;
|
||||||
|
|
||||||
|
g_assert (GTK_IS_SEARCH_ENTRY (entry));
|
||||||
|
g_assert (GTK_IS_FILTER (filter));
|
||||||
|
|
||||||
|
text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||||
|
|
||||||
|
g_clear_pointer (&search_needle, g_strfreev);
|
||||||
|
|
||||||
|
if (text && *text)
|
||||||
|
search_needle = g_strsplit (text, " ", 0);
|
||||||
|
|
||||||
|
gtk_filter_changed (filter, GTK_FILTER_CHANGE_DIFFERENT);
|
||||||
|
}
|
||||||
|
|
||||||
static GListModel *
|
static GListModel *
|
||||||
create_demo_model (void)
|
create_demo_model (void)
|
||||||
{
|
{
|
||||||
@@ -1007,13 +847,25 @@ get_child_model (gpointer item,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
clear_search (GtkSearchBar *bar)
|
||||||
|
{
|
||||||
|
if (!gtk_search_bar_get_search_mode (bar))
|
||||||
|
{
|
||||||
|
GtkWidget *entry = gtk_search_bar_get_child (GTK_SEARCH_BAR (bar));
|
||||||
|
gtk_editable_set_text (GTK_EDITABLE (entry), "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
activate (GApplication *app)
|
activate (GApplication *app)
|
||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GListModel *listmodel;
|
GListModel *listmodel;
|
||||||
GtkTreeListModel *treemodel;
|
GtkTreeListModel *treemodel;
|
||||||
GtkWidget *window, *listview;
|
GtkWidget *window, *listview, *search_entry, *search_bar;
|
||||||
|
GtkFilterListModel *filter_model;
|
||||||
|
GtkFilter *filter;
|
||||||
|
|
||||||
static GActionEntry win_entries[] = {
|
static GActionEntry win_entries[] = {
|
||||||
{ "run", activate_run, NULL, NULL, NULL }
|
{ "run", activate_run, NULL, NULL, NULL }
|
||||||
@@ -1034,15 +886,24 @@ activate (GApplication *app)
|
|||||||
toplevel = GTK_WIDGET (window);
|
toplevel = GTK_WIDGET (window);
|
||||||
listview = GTK_WIDGET (gtk_builder_get_object (builder, "listview"));
|
listview = GTK_WIDGET (gtk_builder_get_object (builder, "listview"));
|
||||||
g_signal_connect (listview, "activate", G_CALLBACK (activate_cb), window);
|
g_signal_connect (listview, "activate", G_CALLBACK (activate_cb), window);
|
||||||
|
search_bar = GTK_WIDGET (gtk_builder_get_object (builder, "searchbar"));
|
||||||
|
g_signal_connect (search_bar, "notify::search-mode-enabled", G_CALLBACK (clear_search), NULL);
|
||||||
|
|
||||||
listmodel = create_demo_model ();
|
listmodel = create_demo_model ();
|
||||||
treemodel = gtk_tree_list_model_new (FALSE,
|
treemodel = gtk_tree_list_model_new (G_LIST_MODEL (listmodel),
|
||||||
G_LIST_MODEL (listmodel),
|
FALSE,
|
||||||
TRUE,
|
TRUE,
|
||||||
get_child_model,
|
get_child_model,
|
||||||
NULL,
|
NULL,
|
||||||
NULL);
|
NULL);
|
||||||
selection = gtk_single_selection_new (G_LIST_MODEL (treemodel));
|
filter_model = gtk_filter_list_model_new (G_LIST_MODEL (treemodel), NULL);
|
||||||
|
filter = gtk_custom_filter_new ((GtkCustomFilterFunc)demo_filter_by_name, filter_model, NULL);
|
||||||
|
gtk_filter_list_model_set_filter (filter_model, filter);
|
||||||
|
g_object_unref (filter);
|
||||||
|
search_entry = GTK_WIDGET (gtk_builder_get_object (builder, "search-entry"));
|
||||||
|
g_signal_connect (search_entry, "search-changed", G_CALLBACK (demo_search_changed_cb), filter);
|
||||||
|
|
||||||
|
selection = gtk_single_selection_new (G_LIST_MODEL (filter_model));
|
||||||
g_signal_connect (selection, "notify::selected-item", G_CALLBACK (selection_cb), NULL);
|
g_signal_connect (selection, "notify::selected-item", G_CALLBACK (selection_cb), NULL);
|
||||||
gtk_list_view_set_model (GTK_LIST_VIEW (listview), G_LIST_MODEL (selection));
|
gtk_list_view_set_model (GTK_LIST_VIEW (listview), G_LIST_MODEL (selection));
|
||||||
|
|
||||||
@@ -1080,12 +941,12 @@ list_demos (void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
static int
|
||||||
command_line (GApplication *app,
|
command_line (GApplication *app,
|
||||||
GApplicationCommandLine *cmdline)
|
GApplicationCommandLine *cmdline)
|
||||||
{
|
{
|
||||||
GVariantDict *options;
|
GVariantDict *options;
|
||||||
const gchar *name = NULL;
|
const char *name = NULL;
|
||||||
gboolean autoquit = FALSE;
|
gboolean autoquit = FALSE;
|
||||||
gboolean list = FALSE;
|
gboolean list = FALSE;
|
||||||
DemoData *d, *c;
|
DemoData *d, *c;
|
||||||
@@ -1139,7 +1000,6 @@ out:
|
|||||||
demo = (func) (window);
|
demo = (func) (window);
|
||||||
|
|
||||||
gtk_window_set_transient_for (GTK_WINDOW (demo), GTK_WINDOW (window));
|
gtk_window_set_transient_for (GTK_WINDOW (demo), GTK_WINDOW (window));
|
||||||
gtk_window_set_modal (GTK_WINDOW (demo), TRUE);
|
|
||||||
|
|
||||||
g_signal_connect_swapped (G_OBJECT (demo), "destroy", G_CALLBACK (g_application_quit), app);
|
g_signal_connect_swapped (G_OBJECT (demo), "destroy", G_CALLBACK (g_application_quit), app);
|
||||||
}
|
}
|
||||||
@@ -1189,8 +1049,8 @@ main (int argc, char **argv)
|
|||||||
{ "inspector", activate_inspector, NULL, NULL, NULL },
|
{ "inspector", activate_inspector, NULL, NULL, NULL },
|
||||||
};
|
};
|
||||||
struct {
|
struct {
|
||||||
const gchar *action_and_target;
|
const char *action_and_target;
|
||||||
const gchar *accelerators[2];
|
const char *accelerators[2];
|
||||||
} accels[] = {
|
} accels[] = {
|
||||||
{ "app.about", { "F1", NULL } },
|
{ "app.about", { "F1", NULL } },
|
||||||
{ "app.quit", { "<Control>q", NULL } },
|
{ "app.quit", { "<Control>q", NULL } },
|
||||||
|
|||||||
@@ -24,7 +24,6 @@
|
|||||||
<property name="default-height">600</property>
|
<property name="default-height">600</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="headerbar">
|
<object class="GtkHeaderBar" id="headerbar">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkButton">
|
<object class="GtkButton">
|
||||||
<property name="valign">center</property>
|
<property name="valign">center</property>
|
||||||
@@ -56,12 +55,29 @@
|
|||||||
<property name="hscrollbar-policy">never</property>
|
<property name="hscrollbar-policy">never</property>
|
||||||
<property name="min-content-width">150</property>
|
<property name="min-content-width">150</property>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkListView" id="listview">
|
<object class="GtkBox">
|
||||||
<property name="factory">
|
<property name="width-request">220</property>
|
||||||
<object class="GtkBuilderListItemFactory">
|
<property name="orientation">vertical</property>
|
||||||
<property name="resource">/ui/main-listitem.ui</property>
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkSearchBar" id="searchbar">
|
||||||
|
<property name="key-capture-widget">window</property>
|
||||||
|
<child>
|
||||||
|
<object class="GtkSearchEntry" id="search-entry"/>
|
||||||
|
</child>
|
||||||
</object>
|
</object>
|
||||||
</property>
|
</child>
|
||||||
|
|
||||||
|
<child>
|
||||||
|
<object class="GtkListView" id="listview">
|
||||||
|
<property name="factory">
|
||||||
|
<object class="GtkBuilderListItemFactory">
|
||||||
|
<property name="resource">/ui/main-listitem.ui</property>
|
||||||
|
</object>
|
||||||
|
</property>
|
||||||
|
</object>
|
||||||
|
</child>
|
||||||
|
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
</object>
|
</object>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ source_toggled (GtkToggleButton *button)
|
|||||||
{
|
{
|
||||||
GtkTextBuffer *buffer;
|
GtkTextBuffer *buffer;
|
||||||
GtkTextIter start, end;
|
GtkTextIter start, end;
|
||||||
gchar *markup;
|
char *markup;
|
||||||
|
|
||||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view2));
|
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view2));
|
||||||
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
gtk_text_buffer_get_bounds (buffer, &start, &end);
|
||||||
@@ -50,7 +50,7 @@ do_markup (GtkWidget *do_widget)
|
|||||||
GtkTextBuffer *buffer;
|
GtkTextBuffer *buffer;
|
||||||
GtkTextIter iter;
|
GtkTextIter iter;
|
||||||
GBytes *bytes;
|
GBytes *bytes;
|
||||||
const gchar *markup;
|
const char *markup;
|
||||||
GtkWidget *header;
|
GtkWidget *header;
|
||||||
GtkWidget *show_source;
|
GtkWidget *show_source;
|
||||||
|
|
||||||
@@ -69,7 +69,6 @@ do_markup (GtkWidget *do_widget)
|
|||||||
g_signal_connect (show_source, "toggled", G_CALLBACK (source_toggled), stack);
|
g_signal_connect (show_source, "toggled", G_CALLBACK (source_toggled), stack);
|
||||||
|
|
||||||
header = gtk_header_bar_new ();
|
header = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
|
||||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), show_source);
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), show_source);
|
||||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||||
|
|
||||||
@@ -103,7 +102,7 @@ do_markup (GtkWidget *do_widget)
|
|||||||
gtk_stack_add_named (GTK_STACK (stack), sw, "source");
|
gtk_stack_add_named (GTK_STACK (stack), sw, "source");
|
||||||
|
|
||||||
bytes = g_resources_lookup_data ("/markup/markup.txt", 0, NULL);
|
bytes = g_resources_lookup_data ("/markup/markup.txt", 0, NULL);
|
||||||
markup = (const gchar *)g_bytes_get_data (bytes, NULL);
|
markup = (const char *)g_bytes_get_data (bytes, NULL);
|
||||||
|
|
||||||
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
|
||||||
gtk_text_buffer_get_start_iter (buffer, &iter);
|
gtk_text_buffer_get_start_iter (buffer, &iter);
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
<property name="title" translatable="yes">Model Button</property>
|
<property name="title" translatable="yes">Model Button</property>
|
||||||
<property name="resizable">0</property>
|
<property name="resizable">0</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar">
|
<object class="GtkHeaderBar"/>
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
</object>
|
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
|
|||||||
@@ -31,6 +31,11 @@
|
|||||||
<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>
|
||||||
<releases>
|
<releases>
|
||||||
|
<release version="3.99.0" date="2020-07-30">
|
||||||
|
<description>
|
||||||
|
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
<release version="3.94.0" date="2018-06-25">
|
<release version="3.94.0" date="2018-06-25">
|
||||||
<description>
|
<description>
|
||||||
<p>A new developers snapshot towards GTK 4.0.</p>
|
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||||
|
|||||||
@@ -12,9 +12,9 @@ static void
|
|||||||
margin_changed (GtkAdjustment *adjustment,
|
margin_changed (GtkAdjustment *adjustment,
|
||||||
GtkTextView *text)
|
GtkTextView *text)
|
||||||
{
|
{
|
||||||
gint value;
|
int value;
|
||||||
|
|
||||||
value = (gint)gtk_adjustment_get_value (adjustment);
|
value = (int)gtk_adjustment_get_value (adjustment);
|
||||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text), value);
|
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text), value);
|
||||||
g_object_set (tag, "pixels-above-lines", value, NULL);
|
g_object_set (tag, "pixels-above-lines", value, NULL);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
#include <gtk/gtkunixprint.h>
|
#include <gtk/gtkunixprint.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
done_cb (GtkDialog *dialog, gint response, gpointer data)
|
done_cb (GtkDialog *dialog, int response, gpointer data)
|
||||||
{
|
{
|
||||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ typedef struct
|
|||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
GdkRGBA draw_color;
|
GdkRGBA draw_color;
|
||||||
GtkPadController *pad_controller;
|
GtkPadController *pad_controller;
|
||||||
gdouble brush_size;
|
double brush_size;
|
||||||
} DrawingArea;
|
} DrawingArea;
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
@@ -38,7 +38,7 @@ static GtkPadActionEntry pad_actions[] = {
|
|||||||
{ GTK_PAD_ACTION_STRIP, -1, -1, N_("Brush size"), "pad.brush_size" },
|
{ GTK_PAD_ACTION_STRIP, -1, -1, N_("Brush size"), "pad.brush_size" },
|
||||||
};
|
};
|
||||||
|
|
||||||
static const gchar *pad_colors[] = {
|
static const char *pad_colors[] = {
|
||||||
"black",
|
"black",
|
||||||
"pink",
|
"pink",
|
||||||
"green",
|
"green",
|
||||||
@@ -55,8 +55,8 @@ static void drawing_area_set_color (DrawingArea *area,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
drawing_area_ensure_surface (DrawingArea *area,
|
drawing_area_ensure_surface (DrawingArea *area,
|
||||||
gint width,
|
int width,
|
||||||
gint height)
|
int height)
|
||||||
{
|
{
|
||||||
if (!area->surface ||
|
if (!area->surface ||
|
||||||
cairo_image_surface_get_width (area->surface) != width ||
|
cairo_image_surface_get_width (area->surface) != width ||
|
||||||
@@ -154,7 +154,7 @@ on_pad_button_activate (GSimpleAction *action,
|
|||||||
GVariant *parameter,
|
GVariant *parameter,
|
||||||
DrawingArea *area)
|
DrawingArea *area)
|
||||||
{
|
{
|
||||||
const gchar *color = g_object_get_data (G_OBJECT (action), "color");
|
const char *color = g_object_get_data (G_OBJECT (action), "color");
|
||||||
GdkRGBA rgba;
|
GdkRGBA rgba;
|
||||||
|
|
||||||
gdk_rgba_parse (&rgba, color);
|
gdk_rgba_parse (&rgba, color);
|
||||||
@@ -166,7 +166,7 @@ on_pad_knob_change (GSimpleAction *action,
|
|||||||
GVariant *parameter,
|
GVariant *parameter,
|
||||||
DrawingArea *area)
|
DrawingArea *area)
|
||||||
{
|
{
|
||||||
gdouble value = g_variant_get_double (parameter);
|
double value = g_variant_get_double (parameter);
|
||||||
|
|
||||||
area->brush_size = value;
|
area->brush_size = value;
|
||||||
}
|
}
|
||||||
@@ -195,7 +195,7 @@ drawing_area_root (GtkWidget *widget)
|
|||||||
GSimpleActionGroup *action_group;
|
GSimpleActionGroup *action_group;
|
||||||
GSimpleAction *action;
|
GSimpleAction *action;
|
||||||
GtkWidget *toplevel;
|
GtkWidget *toplevel;
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
GTK_WIDGET_CLASS (drawing_area_parent_class)->root (widget);
|
GTK_WIDGET_CLASS (drawing_area_parent_class)->root (widget);
|
||||||
|
|
||||||
@@ -255,9 +255,9 @@ drawing_area_class_init (DrawingAreaClass *klass)
|
|||||||
static void
|
static void
|
||||||
drawing_area_apply_stroke (DrawingArea *area,
|
drawing_area_apply_stroke (DrawingArea *area,
|
||||||
GdkDeviceTool *tool,
|
GdkDeviceTool *tool,
|
||||||
gdouble x,
|
double x,
|
||||||
gdouble y,
|
double y,
|
||||||
gdouble pressure)
|
double pressure)
|
||||||
{
|
{
|
||||||
if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
|
if (gdk_device_tool_get_tool_type (tool) == GDK_DEVICE_TOOL_TYPE_ERASER)
|
||||||
{
|
{
|
||||||
@@ -281,8 +281,8 @@ drawing_area_apply_stroke (DrawingArea *area,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
stylus_gesture_down (GtkGestureStylus *gesture,
|
stylus_gesture_down (GtkGestureStylus *gesture,
|
||||||
gdouble x,
|
double x,
|
||||||
gdouble y,
|
double y,
|
||||||
DrawingArea *area)
|
DrawingArea *area)
|
||||||
{
|
{
|
||||||
cairo_new_path (area->cr);
|
cairo_new_path (area->cr);
|
||||||
@@ -290,13 +290,13 @@ stylus_gesture_down (GtkGestureStylus *gesture,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
stylus_gesture_motion (GtkGestureStylus *gesture,
|
stylus_gesture_motion (GtkGestureStylus *gesture,
|
||||||
gdouble x,
|
double x,
|
||||||
gdouble y,
|
double y,
|
||||||
DrawingArea *area)
|
DrawingArea *area)
|
||||||
{
|
{
|
||||||
GdkTimeCoord *backlog;
|
GdkTimeCoord *backlog;
|
||||||
GdkDeviceTool *tool;
|
GdkDeviceTool *tool;
|
||||||
gdouble pressure;
|
double pressure;
|
||||||
guint n_items;
|
guint n_items;
|
||||||
|
|
||||||
tool = gtk_gesture_stylus_get_device_tool (gesture);
|
tool = gtk_gesture_stylus_get_device_tool (gesture);
|
||||||
@@ -392,7 +392,6 @@ do_paint (GtkWidget *toplevel)
|
|||||||
gtk_window_set_child (GTK_WINDOW (window), draw_area);
|
gtk_window_set_child (GTK_WINDOW (window), draw_area);
|
||||||
|
|
||||||
headerbar = gtk_header_bar_new ();
|
headerbar = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (headerbar), TRUE);
|
|
||||||
|
|
||||||
colorbutton = gtk_color_button_new ();
|
colorbutton = gtk_color_button_new ();
|
||||||
g_signal_connect (colorbutton, "color-set",
|
g_signal_connect (colorbutton, "color-set",
|
||||||
|
|||||||
@@ -293,6 +293,7 @@ do_paintable_mediastream (GtkWidget *do_widget)
|
|||||||
gtk_widget_get_display (do_widget));
|
gtk_widget_get_display (do_widget));
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Nuclear MediaStream");
|
gtk_window_set_title (GTK_WINDOW (window), "Nuclear MediaStream");
|
||||||
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
|
gtk_window_set_default_size (GTK_WINDOW (window), 300, 200);
|
||||||
|
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||||
|
|
||||||
nuclear = gtk_nuclear_media_stream_new ();
|
nuclear = gtk_nuclear_media_stream_new ();
|
||||||
gtk_media_stream_set_loop (GTK_MEDIA_STREAM (nuclear), TRUE);
|
gtk_media_stream_set_loop (GTK_MEDIA_STREAM (nuclear), TRUE);
|
||||||
|
|||||||
@@ -47,9 +47,9 @@ toggle_shrink (GtkWidget *widget,
|
|||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
create_pane_options (GtkPaned *paned,
|
create_pane_options (GtkPaned *paned,
|
||||||
const gchar *frame_label,
|
const char *frame_label,
|
||||||
const gchar *label1,
|
const char *label1,
|
||||||
const gchar *label2)
|
const char *label2)
|
||||||
{
|
{
|
||||||
GtkWidget *child1, *child2;
|
GtkWidget *child1, *child2;
|
||||||
GtkWidget *frame;
|
GtkWidget *frame;
|
||||||
|
|||||||
@@ -276,7 +276,6 @@ do_peg_solitaire (GtkWidget *do_widget)
|
|||||||
g_signal_connect (restart, "clicked", G_CALLBACK (restart), NULL);
|
g_signal_connect (restart, "clicked", G_CALLBACK (restart), NULL);
|
||||||
|
|
||||||
header = gtk_header_bar_new ();
|
header = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
|
||||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart);
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart);
|
||||||
window = gtk_window_new ();
|
window = gtk_window_new ();
|
||||||
gtk_window_set_display (GTK_WINDOW (window),
|
gtk_window_set_display (GTK_WINDOW (window),
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ static GdkPixbuf *frame;
|
|||||||
|
|
||||||
/* Background image */
|
/* Background image */
|
||||||
static GdkPixbuf *background;
|
static GdkPixbuf *background;
|
||||||
static gint back_width, back_height;
|
static int back_width, back_height;
|
||||||
|
|
||||||
/* Images */
|
/* Images */
|
||||||
static GdkPixbuf *images[N_IMAGES];
|
static GdkPixbuf *images[N_IMAGES];
|
||||||
@@ -51,7 +51,7 @@ static GtkWidget *da;
|
|||||||
static gboolean
|
static gboolean
|
||||||
load_pixbufs (GError **error)
|
load_pixbufs (GError **error)
|
||||||
{
|
{
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
if (background)
|
if (background)
|
||||||
return TRUE; /* already loaded earlier */
|
return TRUE; /* already loaded earlier */
|
||||||
|
|||||||
@@ -14,13 +14,13 @@
|
|||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
gchar *resourcename;
|
char *resourcename;
|
||||||
gdouble font_size;
|
double font_size;
|
||||||
|
|
||||||
gint lines_per_page;
|
int lines_per_page;
|
||||||
gchar **lines;
|
char **lines;
|
||||||
gint num_lines;
|
int num_lines;
|
||||||
gint num_pages;
|
int num_pages;
|
||||||
} PrintData;
|
} PrintData;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -55,17 +55,17 @@ begin_print (GtkPrintOperation *operation,
|
|||||||
static void
|
static void
|
||||||
draw_page (GtkPrintOperation *operation,
|
draw_page (GtkPrintOperation *operation,
|
||||||
GtkPrintContext *context,
|
GtkPrintContext *context,
|
||||||
gint page_nr,
|
int page_nr,
|
||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
PrintData *data = (PrintData *)user_data;
|
PrintData *data = (PrintData *)user_data;
|
||||||
cairo_t *cr;
|
cairo_t *cr;
|
||||||
PangoLayout *layout;
|
PangoLayout *layout;
|
||||||
gint text_width, text_height;
|
int text_width, text_height;
|
||||||
gdouble width;
|
double width;
|
||||||
gint line, i;
|
int line, i;
|
||||||
PangoFontDescription *desc;
|
PangoFontDescription *desc;
|
||||||
gchar *page_str;
|
char *page_str;
|
||||||
|
|
||||||
cr = gtk_print_context_get_cairo_context (context);
|
cr = gtk_print_context_get_cairo_context (context);
|
||||||
width = gtk_print_context_get_width (context);
|
width = gtk_print_context_get_width (context);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
|
|
||||||
static gint count = 0;
|
static int count = 0;
|
||||||
static guint timeout = 0;
|
static guint timeout = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -25,7 +25,7 @@ static gboolean
|
|||||||
reveal_one (gpointer data)
|
reveal_one (gpointer data)
|
||||||
{
|
{
|
||||||
GtkWidget *window = data;
|
GtkWidget *window = data;
|
||||||
gchar *name;
|
char *name;
|
||||||
GtkRevealer *revealer;
|
GtkRevealer *revealer;
|
||||||
|
|
||||||
name = g_strdup_printf ("revealer%d", count);
|
name = g_strdup_printf ("revealer%d", count);
|
||||||
|
|||||||
@@ -19,8 +19,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -35,8 +35,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -51,8 +51,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">3</property>
|
<property name="column">3</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -66,8 +66,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -82,8 +82,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -98,8 +98,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -114,8 +114,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">4</property>
|
<property name="column">4</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -129,8 +129,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">4</property>
|
<property name="row">4</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -145,8 +145,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -33,12 +33,9 @@
|
|||||||
<object class="GtkLabel" id="label_plain">
|
<object class="GtkLabel" id="label_plain">
|
||||||
<property name="label">Plain</property>
|
<property name="label">Plain</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="scale_plain"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -48,12 +45,9 @@
|
|||||||
<property name="draw-value">0</property>
|
<property name="draw-value">0</property>
|
||||||
<property name="adjustment">adjustment1</property>
|
<property name="adjustment">adjustment1</property>
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label_plain"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -61,12 +55,9 @@
|
|||||||
<object class="GtkLabel" id="label_marks">
|
<object class="GtkLabel" id="label_marks">
|
||||||
<property name="label">Marks</property>
|
<property name="label">Marks</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="scale_marks"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -83,12 +74,9 @@
|
|||||||
<mark value="3" position="bottom"></mark>
|
<mark value="3" position="bottom"></mark>
|
||||||
<mark value="4" position="bottom"></mark>
|
<mark value="4" position="bottom"></mark>
|
||||||
</marks>
|
</marks>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label_marks"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -96,12 +84,9 @@
|
|||||||
<object class="GtkLabel" id="label_discrete">
|
<object class="GtkLabel" id="label_discrete">
|
||||||
<property name="label">Discrete</property>
|
<property name="label">Discrete</property>
|
||||||
<property name="xalign">0</property>
|
<property name="xalign">0</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="scale_discrete"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -112,9 +97,6 @@
|
|||||||
<property name="draw-value">0</property>
|
<property name="draw-value">0</property>
|
||||||
<property name="adjustment">adjustment3</property>
|
<property name="adjustment">adjustment3</property>
|
||||||
<property name="hexpand">1</property>
|
<property name="hexpand">1</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label_discrete"/>
|
|
||||||
</accessibility>
|
|
||||||
<marks>
|
<marks>
|
||||||
<mark value="0" position="bottom"></mark>
|
<mark value="0" position="bottom"></mark>
|
||||||
<mark value="1" position="bottom"></mark>
|
<mark value="1" position="bottom"></mark>
|
||||||
@@ -123,8 +105,8 @@
|
|||||||
<mark value="4" position="bottom"></mark>
|
<mark value="4" position="bottom"></mark>
|
||||||
</marks>
|
</marks>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ static void
|
|||||||
search_progress_done (GtkEntry *entry)
|
search_progress_done (GtkEntry *entry)
|
||||||
{
|
{
|
||||||
gtk_entry_set_progress_fraction (entry, 0.0);
|
gtk_entry_set_progress_fraction (entry, 0.0);
|
||||||
|
g_object_unref (entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@@ -54,9 +55,11 @@ finish_search (GtkButton *button)
|
|||||||
static gboolean
|
static gboolean
|
||||||
start_search_feedback (gpointer data)
|
start_search_feedback (gpointer data)
|
||||||
{
|
{
|
||||||
|
gtk_entry_set_progress_fraction (GTK_ENTRY (data), 0.1);
|
||||||
search_progress_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 100,
|
search_progress_id = g_timeout_add_full (G_PRIORITY_DEFAULT, 100,
|
||||||
(GSourceFunc)search_progress, data,
|
(GSourceFunc)search_progress, g_object_ref (data),
|
||||||
(GDestroyNotify)search_progress_done);
|
(GDestroyNotify)search_progress_done);
|
||||||
|
|
||||||
return G_SOURCE_REMOVE;
|
return G_SOURCE_REMOVE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,7 +126,7 @@ set_search_by (GSimpleAction *action,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
icon_press_cb (GtkEntry *entry,
|
icon_press_cb (GtkEntry *entry,
|
||||||
gint position,
|
int position,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
if (position == GTK_ENTRY_ICON_PRIMARY)
|
if (position == GTK_ENTRY_ICON_PRIMARY)
|
||||||
@@ -162,7 +165,8 @@ activate_cb (GtkEntry *entry,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
search_entry_destroyed (GtkWidget *widget)
|
search_entry_destroyed (gpointer data,
|
||||||
|
GObject *widget)
|
||||||
{
|
{
|
||||||
if (finish_search_id != 0)
|
if (finish_search_id != 0)
|
||||||
{
|
{
|
||||||
@@ -261,8 +265,8 @@ do_search_entry (GtkWidget *do_widget)
|
|||||||
gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
|
gtk_window_set_display (GTK_WINDOW (window), gtk_widget_get_display (do_widget));
|
||||||
gtk_window_set_title (GTK_WINDOW (window), "Search Entry");
|
gtk_window_set_title (GTK_WINDOW (window), "Search Entry");
|
||||||
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
|
||||||
g_signal_connect (window, "destroy",
|
|
||||||
G_CALLBACK (search_entry_destroyed), &window);
|
g_object_weak_ref (G_OBJECT (window), search_entry_destroyed, &window);
|
||||||
|
|
||||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||||
gtk_widget_set_margin_start (vbox, 5);
|
gtk_widget_set_margin_start (vbox, 5);
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
show_shortcuts (GtkWidget *window,
|
show_shortcuts (GtkWidget *window,
|
||||||
const gchar *id,
|
const char *id,
|
||||||
const gchar *view)
|
const char *view)
|
||||||
{
|
{
|
||||||
GtkBuilder *builder;
|
GtkBuilder *builder;
|
||||||
GtkWidget *overlay;
|
GtkWidget *overlay;
|
||||||
gchar *path;
|
char *path;
|
||||||
|
|
||||||
path = g_strdup_printf ("/shortcuts/%s.ui", id);
|
path = g_strdup_printf ("/shortcuts/%s.ui", id);
|
||||||
builder = gtk_builder_new_from_resource (path);
|
builder = gtk_builder_new_from_resource (path);
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ do_sidebar (GtkWidget *do_widget)
|
|||||||
GtkWidget *box;
|
GtkWidget *box;
|
||||||
GtkWidget *widget;
|
GtkWidget *widget;
|
||||||
GtkWidget *header;
|
GtkWidget *header;
|
||||||
const gchar* pages[] = {
|
const char * pages[] = {
|
||||||
"Welcome to GTK",
|
"Welcome to GTK",
|
||||||
"GtkStackSidebar Widget",
|
"GtkStackSidebar Widget",
|
||||||
"Automatic navigation",
|
"Automatic navigation",
|
||||||
@@ -30,7 +30,7 @@ do_sidebar (GtkWidget *do_widget)
|
|||||||
"Page 9",
|
"Page 9",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
const gchar *c = NULL;
|
const char *c = NULL;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
@@ -40,7 +40,6 @@ do_sidebar (GtkWidget *do_widget)
|
|||||||
gtk_widget_set_size_request (window, 500, 350);
|
gtk_widget_set_size_request (window, 500, 350);
|
||||||
|
|
||||||
header = gtk_header_bar_new ();
|
header = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR(header), TRUE);
|
|
||||||
gtk_window_set_titlebar (GTK_WINDOW(window), header);
|
gtk_window_set_titlebar (GTK_WINDOW(window), header);
|
||||||
gtk_window_set_title (GTK_WINDOW(window), "Stack Sidebar");
|
gtk_window_set_title (GTK_WINDOW(window), "Stack Sidebar");
|
||||||
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
g_object_add_weak_pointer (G_OBJECT (window), (gpointer *)&window);
|
||||||
|
|||||||
@@ -272,7 +272,7 @@ start_puzzle (GdkPaintable *paintable)
|
|||||||
|
|
||||||
/* Create a new grid */
|
/* Create a new grid */
|
||||||
grid = gtk_grid_new ();
|
grid = gtk_grid_new ();
|
||||||
gtk_widget_set_can_focus (grid, TRUE);
|
gtk_widget_set_focusable (grid, TRUE);
|
||||||
gtk_aspect_frame_set_child (GTK_ASPECT_FRAME (frame), grid);
|
gtk_aspect_frame_set_child (GTK_ASPECT_FRAME (frame), grid);
|
||||||
aspect_ratio = gdk_paintable_get_intrinsic_aspect_ratio (paintable);
|
aspect_ratio = gdk_paintable_get_intrinsic_aspect_ratio (paintable);
|
||||||
if (aspect_ratio == 0.0)
|
if (aspect_ratio == 0.0)
|
||||||
@@ -284,7 +284,7 @@ start_puzzle (GdkPaintable *paintable)
|
|||||||
* keys to move the puzzle */
|
* keys to move the puzzle */
|
||||||
controller = gtk_shortcut_controller_new ();
|
controller = gtk_shortcut_controller_new ();
|
||||||
gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER (controller),
|
gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER (controller),
|
||||||
GTK_SHORTCUT_SCOPE_GLOBAL);
|
GTK_SHORTCUT_SCOPE_LOCAL);
|
||||||
add_move_binding (GTK_SHORTCUT_CONTROLLER (controller),
|
add_move_binding (GTK_SHORTCUT_CONTROLLER (controller),
|
||||||
GDK_KEY_Left, GDK_KEY_KP_Left,
|
GDK_KEY_Left, GDK_KEY_KP_Left,
|
||||||
-1, 0);
|
-1, 0);
|
||||||
@@ -470,7 +470,6 @@ do_sliding_puzzle (GtkWidget *do_widget)
|
|||||||
g_signal_connect (restart, "clicked", G_CALLBACK (reshuffle), NULL);
|
g_signal_connect (restart, "clicked", G_CALLBACK (reshuffle), NULL);
|
||||||
|
|
||||||
header = gtk_header_bar_new ();
|
header = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
|
||||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart);
|
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart);
|
||||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), tweak);
|
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), tweak);
|
||||||
window = gtk_window_new ();
|
window = gtk_window_new ();
|
||||||
|
|||||||
@@ -11,13 +11,13 @@
|
|||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
gint
|
int
|
||||||
spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
||||||
gdouble *new_val)
|
double *new_val)
|
||||||
{
|
{
|
||||||
const gchar *buf;
|
const char *buf;
|
||||||
gchar *err;
|
char *err;
|
||||||
gdouble res;
|
double res;
|
||||||
|
|
||||||
buf = gtk_editable_get_text (GTK_EDITABLE (spin_button));
|
buf = gtk_editable_get_text (GTK_EDITABLE (spin_button));
|
||||||
res = strtol (buf, &err, 16);
|
res = strtol (buf, &err, 16);
|
||||||
@@ -28,19 +28,19 @@ spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
int
|
||||||
spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
||||||
{
|
{
|
||||||
GtkAdjustment *adjustment;
|
GtkAdjustment *adjustment;
|
||||||
gchar *buf;
|
char *buf;
|
||||||
gdouble val;
|
double val;
|
||||||
|
|
||||||
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
||||||
val = gtk_adjustment_get_value (adjustment);
|
val = gtk_adjustment_get_value (adjustment);
|
||||||
if (fabs (val) < 1e-5)
|
if (fabs (val) < 1e-5)
|
||||||
buf = g_strdup ("0x00");
|
buf = g_strdup ("0x00");
|
||||||
else
|
else
|
||||||
buf = g_strdup_printf ("0x%.2X", (gint) val);
|
buf = g_strdup_printf ("0x%.2X", (int) val);
|
||||||
if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (spin_button))))
|
if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (spin_button))))
|
||||||
gtk_editable_set_text (GTK_EDITABLE (spin_button), buf);
|
gtk_editable_set_text (GTK_EDITABLE (spin_button), buf);
|
||||||
g_free (buf);
|
g_free (buf);
|
||||||
@@ -48,17 +48,17 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
int
|
||||||
spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
||||||
gdouble *new_val)
|
double *new_val)
|
||||||
{
|
{
|
||||||
const gchar *text;
|
const char *text;
|
||||||
gchar **str;
|
char **str;
|
||||||
gboolean found = FALSE;
|
gboolean found = FALSE;
|
||||||
gint hours;
|
int hours;
|
||||||
gint minutes;
|
int minutes;
|
||||||
gchar *endh;
|
char *endh;
|
||||||
gchar *endm;
|
char *endm;
|
||||||
|
|
||||||
text = gtk_editable_get_text (GTK_EDITABLE (spin_button));
|
text = gtk_editable_get_text (GTK_EDITABLE (spin_button));
|
||||||
str = g_strsplit (text, ":", 2);
|
str = g_strsplit (text, ":", 2);
|
||||||
@@ -87,13 +87,13 @@ spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
int
|
||||||
spinbutton_time_spin_output (GtkSpinButton *spin_button)
|
spinbutton_time_spin_output (GtkSpinButton *spin_button)
|
||||||
{
|
{
|
||||||
GtkAdjustment *adjustment;
|
GtkAdjustment *adjustment;
|
||||||
gchar *buf;
|
char *buf;
|
||||||
gdouble hours;
|
double hours;
|
||||||
gdouble minutes;
|
double minutes;
|
||||||
|
|
||||||
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
||||||
hours = gtk_adjustment_get_value (adjustment) / 60.0;
|
hours = gtk_adjustment_get_value (adjustment) / 60.0;
|
||||||
@@ -121,12 +121,12 @@ static const char *month[12] = {
|
|||||||
"December"
|
"December"
|
||||||
};
|
};
|
||||||
|
|
||||||
gint
|
int
|
||||||
spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
||||||
gdouble *new_val)
|
double *new_val)
|
||||||
{
|
{
|
||||||
gint i;
|
int i;
|
||||||
gchar *tmp1, *tmp2;
|
char *tmp1, *tmp2;
|
||||||
gboolean found = FALSE;
|
gboolean found = FALSE;
|
||||||
|
|
||||||
for (i = 1; i <= 12; i++)
|
for (i = 1; i <= 12; i++)
|
||||||
@@ -145,17 +145,17 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
|||||||
*new_val = 0.0;
|
*new_val = 0.0;
|
||||||
return GTK_INPUT_ERROR;
|
return GTK_INPUT_ERROR;
|
||||||
}
|
}
|
||||||
*new_val = (gdouble) i;
|
*new_val = (double) i;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gint
|
int
|
||||||
spinbutton_month_spin_output (GtkSpinButton *spin_button)
|
spinbutton_month_spin_output (GtkSpinButton *spin_button)
|
||||||
{
|
{
|
||||||
GtkAdjustment *adjustment;
|
GtkAdjustment *adjustment;
|
||||||
gdouble value;
|
double value;
|
||||||
gint i;
|
int i;
|
||||||
|
|
||||||
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
||||||
value = gtk_adjustment_get_value (adjustment);
|
value = gtk_adjustment_get_value (adjustment);
|
||||||
|
|||||||
@@ -40,8 +40,8 @@
|
|||||||
<property name="mnemonic-widget">basic_spin</property>
|
<property name="mnemonic-widget">basic_spin</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -54,8 +54,8 @@
|
|||||||
<property name="digits">2</property>
|
<property name="digits">2</property>
|
||||||
<property name="numeric">1</property>
|
<property name="numeric">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -64,8 +64,8 @@
|
|||||||
<property name="width-chars">10</property>
|
<property name="width-chars">10</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -76,8 +76,8 @@
|
|||||||
<property name="mnemonic-widget">hex_spin</property>
|
<property name="mnemonic-widget">hex_spin</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -90,8 +90,8 @@
|
|||||||
<signal name="output" handler="spinbutton_hex_spin_output"/>
|
<signal name="output" handler="spinbutton_hex_spin_output"/>
|
||||||
<property name="wrap">1</property>
|
<property name="wrap">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -100,8 +100,8 @@
|
|||||||
<property name="width-chars">10</property>
|
<property name="width-chars">10</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -112,8 +112,8 @@
|
|||||||
<property name="mnemonic-widget">time_spin</property>
|
<property name="mnemonic-widget">time_spin</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -126,8 +126,8 @@
|
|||||||
<signal name="output" handler="spinbutton_time_spin_output"/>
|
<signal name="output" handler="spinbutton_time_spin_output"/>
|
||||||
<property name="wrap">1</property>
|
<property name="wrap">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -136,8 +136,8 @@
|
|||||||
<property name="width-chars">10</property>
|
<property name="width-chars">10</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -148,8 +148,8 @@
|
|||||||
<property name="mnemonic-widget">month_spin</property>
|
<property name="mnemonic-widget">month_spin</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -163,8 +163,8 @@
|
|||||||
<property name="wrap">1</property>
|
<property name="wrap">1</property>
|
||||||
<property name="update-policy">if-valid</property>
|
<property name="update-policy">if-valid</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -173,8 +173,8 @@
|
|||||||
<property name="width-chars">10</property>
|
<property name="width-chars">10</property>
|
||||||
<property name="xalign">1</property>
|
<property name="xalign">1</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">3</property>
|
<property name="row">3</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -10,8 +10,8 @@
|
|||||||
<property name="stack">stack</property>
|
<property name="stack">stack</property>
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">0</property>
|
<property name="row">0</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -59,8 +59,8 @@
|
|||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
<property name="resizable">0</property>
|
<property name="resizable">0</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="header">
|
<object class="GtkHeaderBar" id="header">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child type="start">
|
<child type="start">
|
||||||
<object class="GtkToggleButton" id="toggle">
|
<object class="GtkToggleButton" id="toggle">
|
||||||
<property name="label">Cycle</property>
|
<property name="label">Cycle</property>
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
typedef struct _TreeItem TreeItem;
|
typedef struct _TreeItem TreeItem;
|
||||||
struct _TreeItem
|
struct _TreeItem
|
||||||
{
|
{
|
||||||
const gchar *label;
|
const char *label;
|
||||||
gboolean alex;
|
gboolean alex;
|
||||||
gboolean havoc;
|
gboolean havoc;
|
||||||
gboolean tim;
|
gboolean tim;
|
||||||
@@ -222,7 +222,7 @@ create_model (void)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
item_toggled (GtkCellRendererToggle *cell,
|
item_toggled (GtkCellRendererToggle *cell,
|
||||||
gchar *path_str,
|
char *path_str,
|
||||||
gpointer data)
|
gpointer data)
|
||||||
{
|
{
|
||||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||||
@@ -230,7 +230,7 @@ item_toggled (GtkCellRendererToggle *cell,
|
|||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
gboolean toggle_item;
|
gboolean toggle_item;
|
||||||
|
|
||||||
gint *column;
|
int *column;
|
||||||
|
|
||||||
column = g_object_get_data (G_OBJECT (cell), "column");
|
column = g_object_get_data (G_OBJECT (cell), "column");
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ item_toggled (GtkCellRendererToggle *cell,
|
|||||||
static void
|
static void
|
||||||
add_columns (GtkTreeView *treeview)
|
add_columns (GtkTreeView *treeview)
|
||||||
{
|
{
|
||||||
gint col_offset;
|
int col_offset;
|
||||||
GtkCellRenderer *renderer;
|
GtkCellRenderer *renderer;
|
||||||
GtkTreeViewColumn *column;
|
GtkTreeViewColumn *column;
|
||||||
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
|
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
|
||||||
@@ -272,7 +272,7 @@ add_columns (GtkTreeView *treeview)
|
|||||||
/* alex column */
|
/* alex column */
|
||||||
renderer = gtk_cell_renderer_toggle_new ();
|
renderer = gtk_cell_renderer_toggle_new ();
|
||||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)ALEX_COLUMN);
|
g_object_set_data (G_OBJECT (renderer), "column", (int *)ALEX_COLUMN);
|
||||||
|
|
||||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ add_columns (GtkTreeView *treeview)
|
|||||||
/* havoc column */
|
/* havoc column */
|
||||||
renderer = gtk_cell_renderer_toggle_new ();
|
renderer = gtk_cell_renderer_toggle_new ();
|
||||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)HAVOC_COLUMN);
|
g_object_set_data (G_OBJECT (renderer), "column", (int *)HAVOC_COLUMN);
|
||||||
|
|
||||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||||
|
|
||||||
@@ -315,7 +315,7 @@ add_columns (GtkTreeView *treeview)
|
|||||||
/* tim column */
|
/* tim column */
|
||||||
renderer = gtk_cell_renderer_toggle_new ();
|
renderer = gtk_cell_renderer_toggle_new ();
|
||||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)TIM_COLUMN);
|
g_object_set_data (G_OBJECT (renderer), "column", (int *)TIM_COLUMN);
|
||||||
|
|
||||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||||
|
|
||||||
@@ -337,7 +337,7 @@ add_columns (GtkTreeView *treeview)
|
|||||||
/* owen column */
|
/* owen column */
|
||||||
renderer = gtk_cell_renderer_toggle_new ();
|
renderer = gtk_cell_renderer_toggle_new ();
|
||||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)OWEN_COLUMN);
|
g_object_set_data (G_OBJECT (renderer), "column", (int *)OWEN_COLUMN);
|
||||||
|
|
||||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||||
|
|
||||||
@@ -358,7 +358,7 @@ add_columns (GtkTreeView *treeview)
|
|||||||
/* dave column */
|
/* dave column */
|
||||||
renderer = gtk_cell_renderer_toggle_new ();
|
renderer = gtk_cell_renderer_toggle_new ();
|
||||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)DAVE_COLUMN);
|
g_object_set_data (G_OBJECT (renderer), "column", (int *)DAVE_COLUMN);
|
||||||
|
|
||||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||||
|
|
||||||
|
|||||||
@@ -73,7 +73,6 @@ do_video_player (GtkWidget *do_widget)
|
|||||||
gtk_window_set_child (GTK_WINDOW (window), video);
|
gtk_window_set_child (GTK_WINDOW (window), video);
|
||||||
|
|
||||||
title = gtk_header_bar_new ();
|
title = gtk_header_bar_new ();
|
||||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (title), TRUE);
|
|
||||||
gtk_window_set_titlebar (GTK_WINDOW (window), title);
|
gtk_window_set_titlebar (GTK_WINDOW (window), title);
|
||||||
|
|
||||||
open_button = gtk_button_new_with_mnemonic ("_Open");
|
open_button = gtk_button_new_with_mnemonic ("_Open");
|
||||||
|
|||||||
@@ -43,13 +43,15 @@ about_activated (GSimpleAction *action,
|
|||||||
gpointer user_data)
|
gpointer user_data)
|
||||||
{
|
{
|
||||||
GtkApplication *app = user_data;
|
GtkApplication *app = user_data;
|
||||||
const gchar *authors[] = {
|
const char *authors[] = {
|
||||||
"The GTK Team",
|
"The GTK Team",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
char *icon_theme;
|
char *icon_theme;
|
||||||
char *version;
|
char *version;
|
||||||
GString *s;
|
GString *s;
|
||||||
|
char *os_name;
|
||||||
|
char *os_version;
|
||||||
|
|
||||||
g_object_get (gtk_settings_get_default (),
|
g_object_get (gtk_settings_get_default (),
|
||||||
"gtk-icon-theme-name", &icon_theme,
|
"gtk-icon-theme-name", &icon_theme,
|
||||||
@@ -57,6 +59,10 @@ about_activated (GSimpleAction *action,
|
|||||||
|
|
||||||
s = g_string_new ("");
|
s = g_string_new ("");
|
||||||
|
|
||||||
|
os_name = g_get_os_info (G_OS_INFO_KEY_NAME);
|
||||||
|
os_version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
|
||||||
|
if (os_name && os_version)
|
||||||
|
g_string_append_printf (s, "OS\t%s %s\n\n", os_name, os_version);
|
||||||
g_string_append (s, "System libraries\n");
|
g_string_append (s, "System libraries\n");
|
||||||
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
|
g_string_append_printf (s, "\tGLib\t%d.%d.%d\n",
|
||||||
glib_major_version,
|
glib_major_version,
|
||||||
@@ -91,6 +97,8 @@ about_activated (GSimpleAction *action,
|
|||||||
g_string_free (s, TRUE);
|
g_string_free (s, TRUE);
|
||||||
g_free (version);
|
g_free (version);
|
||||||
g_free (icon_theme);
|
g_free (icon_theme);
|
||||||
|
g_free (os_name);
|
||||||
|
g_free (os_version);
|
||||||
}
|
}
|
||||||
|
|
||||||
static GActionEntry app_entries[] =
|
static GActionEntry app_entries[] =
|
||||||
@@ -103,7 +111,7 @@ static GActionEntry app_entries[] =
|
|||||||
static void
|
static void
|
||||||
icon_browser_app_startup (GApplication *app)
|
icon_browser_app_startup (GApplication *app)
|
||||||
{
|
{
|
||||||
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
|
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
|
||||||
|
|
||||||
G_APPLICATION_CLASS (icon_browser_app_parent_class)->startup (app);
|
G_APPLICATION_CLASS (icon_browser_app_parent_class)->startup (app);
|
||||||
|
|
||||||
|
|||||||
@@ -44,13 +44,13 @@ icon_browser_window_get_icon_theme (IconBrowserWindow *win)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
add_icon (IconBrowserWindow *win,
|
add_icon (IconBrowserWindow *win,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
const gchar *description,
|
const char *description,
|
||||||
const gchar *context)
|
const char *context)
|
||||||
{
|
{
|
||||||
GtkIconTheme *icon_theme = icon_browser_window_get_icon_theme (win);
|
GtkIconTheme *icon_theme = icon_browser_window_get_icon_theme (win);
|
||||||
gchar *regular_name;
|
char *regular_name;
|
||||||
gchar *symbolic_name;
|
char *symbolic_name;
|
||||||
IbIcon *icon;
|
IbIcon *icon;
|
||||||
|
|
||||||
regular_name = g_strdup (name);
|
regular_name = g_strdup (name);
|
||||||
@@ -77,9 +77,9 @@ add_icon (IconBrowserWindow *win,
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
add_context (IconBrowserWindow *win,
|
add_context (IconBrowserWindow *win,
|
||||||
const gchar *id,
|
const char *id,
|
||||||
const gchar *name,
|
const char *name,
|
||||||
const gchar *description)
|
const char *description)
|
||||||
{
|
{
|
||||||
IbContext *context;
|
IbContext *context;
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ copy_to_clipboard (GtkButton *button,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_image (GtkWidget *image, const gchar *name, gint size)
|
set_image (GtkWidget *image, const char *name, int size)
|
||||||
{
|
{
|
||||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), name);
|
gtk_image_set_from_icon_name (GTK_IMAGE (image), name);
|
||||||
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
||||||
@@ -219,7 +219,7 @@ item_activated (GtkGridView *view,
|
|||||||
static GdkPaintable *
|
static GdkPaintable *
|
||||||
get_image_paintable (GtkImage *image)
|
get_image_paintable (GtkImage *image)
|
||||||
{
|
{
|
||||||
const gchar *icon_name;
|
const char *icon_name;
|
||||||
GtkIconTheme *icon_theme;
|
GtkIconTheme *icon_theme;
|
||||||
GtkIconPaintable *icon;
|
GtkIconPaintable *icon;
|
||||||
int size;
|
int size;
|
||||||
|
|||||||
@@ -18,3 +18,19 @@ executable('gtk4-icon-browser',
|
|||||||
gui_app: true,
|
gui_app: true,
|
||||||
link_args: extra_demo_ldflags,
|
link_args: extra_demo_ldflags,
|
||||||
install: true)
|
install: true)
|
||||||
|
|
||||||
|
# icons
|
||||||
|
icontheme_dir = join_paths(gtk_datadir, 'icons/hicolor')
|
||||||
|
|
||||||
|
foreach size: ['scalable', 'symbolic']
|
||||||
|
install_subdir('data/' + size,
|
||||||
|
install_dir: icontheme_dir
|
||||||
|
)
|
||||||
|
endforeach
|
||||||
|
|
||||||
|
# desktop file
|
||||||
|
install_data('org.gtk.IconBrowser4.desktop', install_dir: gtk_applicationsdir)
|
||||||
|
|
||||||
|
# appdata
|
||||||
|
install_data('org.gtk.IconBrowser4.appdata.xml', install_dir: gtk_appdatadir)
|
||||||
|
|
||||||
|
|||||||
44
demos/icon-browser/org.gtk.IconBrowser4.appdata.xml
Normal file
44
demos/icon-browser/org.gtk.IconBrowser4.appdata.xml
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<component type="desktop">
|
||||||
|
<id>org.gtk.IconBrowser4.desktop</id>
|
||||||
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
|
<project_license>LGPL-2.0+</project_license>
|
||||||
|
<name>GTK Icon Browser</name>
|
||||||
|
<summary>Program to browse themed icons</summary>
|
||||||
|
<description>
|
||||||
|
<p>
|
||||||
|
GTK Icon Browser is a simple application to show themed icons that
|
||||||
|
are available on the system.
|
||||||
|
</p>
|
||||||
|
</description>
|
||||||
|
<screenshots>
|
||||||
|
<screenshot>
|
||||||
|
<image>https://static.gnome.org/appdata/gtk4-icon-browser/gtk-icon-browser1.png</image>
|
||||||
|
<caption>Icon Browser</caption>
|
||||||
|
</screenshot>
|
||||||
|
<screenshot>
|
||||||
|
<image>https://static.gnome.org/appdata/gtk4-icon-browser/gtk-icon-browser2.png</image>
|
||||||
|
<caption>Search</caption>
|
||||||
|
</screenshot>
|
||||||
|
</screenshots>
|
||||||
|
<kudos>
|
||||||
|
<kudo>HiDpiIcon</kudo>
|
||||||
|
<kudo>ModernToolkit</kudo>
|
||||||
|
</kudos>
|
||||||
|
<url type="homepage">https://www.gtk.org</url>
|
||||||
|
<translation type="gettext">gtk-4.0</translation>
|
||||||
|
<update_contact>matthias.clasen_at_gmail.com</update_contact>
|
||||||
|
<developer_name>Matthias Clasen and others</developer_name>
|
||||||
|
<releases>
|
||||||
|
<release version="3.99.0" date="2020-07-30">
|
||||||
|
<description>
|
||||||
|
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
<release version="3.94.0" date="2018-06-25">
|
||||||
|
<description>
|
||||||
|
<p>A new developers snapshot towards GTK 4.0.</p>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
|
</releases>
|
||||||
|
</component>
|
||||||
@@ -21,7 +21,6 @@
|
|||||||
<property name="default-height">768</property>
|
<property name="default-height">768</property>
|
||||||
<child type="titlebar">
|
<child type="titlebar">
|
||||||
<object class="GtkHeaderBar" id="header">
|
<object class="GtkHeaderBar" id="header">
|
||||||
<property name="show-title-buttons">1</property>
|
|
||||||
<child type="title">
|
<child type="title">
|
||||||
<object class="GtkBox">
|
<object class="GtkBox">
|
||||||
<style>
|
<style>
|
||||||
@@ -246,12 +245,9 @@
|
|||||||
<object class="GtkImage" id="image1">
|
<object class="GtkImage" id="image1">
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label1"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -259,12 +255,9 @@
|
|||||||
<object class="GtkImage" id="image2">
|
<object class="GtkImage" id="image2">
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label2"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -272,12 +265,9 @@
|
|||||||
<object class="GtkImage" id="image3">
|
<object class="GtkImage" id="image3">
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label3"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -285,12 +275,9 @@
|
|||||||
<object class="GtkImage" id="image4">
|
<object class="GtkImage" id="image4">
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label4"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">3</property>
|
<property name="column">3</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -298,12 +285,9 @@
|
|||||||
<object class="GtkImage" id="image5">
|
<object class="GtkImage" id="image5">
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label5"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">4</property>
|
<property name="column">4</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -311,12 +295,9 @@
|
|||||||
<object class="GtkImage" id="image6">
|
<object class="GtkImage" id="image6">
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label5"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">5</property>
|
<property name="column">5</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -324,12 +305,9 @@
|
|||||||
<object class="GtkImage" id="image7">
|
<object class="GtkImage" id="image7">
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label5"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">6</property>
|
<property name="column">6</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -337,12 +315,9 @@
|
|||||||
<object class="GtkImage" id="image8">
|
<object class="GtkImage" id="image8">
|
||||||
<property name="halign">center</property>
|
<property name="halign">center</property>
|
||||||
<property name="valign">end</property>
|
<property name="valign">end</property>
|
||||||
<accessibility>
|
|
||||||
<relation type="labelled-by" target="label6"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">7</property>
|
<property name="column">7</property>
|
||||||
<property name="top-attach">1</property>
|
<property name="row">1</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -354,12 +329,9 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="image1"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">0</property>
|
<property name="column">0</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -371,12 +343,9 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="image2"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">1</property>
|
<property name="column">1</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -388,12 +357,9 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="image3"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">2</property>
|
<property name="column">2</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -405,12 +371,9 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="image4"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">3</property>
|
<property name="column">3</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -422,12 +385,9 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="image5"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">4</property>
|
<property name="column">4</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -439,12 +399,9 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="image6"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">5</property>
|
<property name="column">5</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -456,12 +413,9 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="image7"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">6</property>
|
<property name="column">6</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@@ -473,12 +427,9 @@
|
|||||||
<style>
|
<style>
|
||||||
<class name="dim-label"/>
|
<class name="dim-label"/>
|
||||||
</style>
|
</style>
|
||||||
<accessibility>
|
|
||||||
<relation type="label-for" target="image8"/>
|
|
||||||
</accessibility>
|
|
||||||
<layout>
|
<layout>
|
||||||
<property name="left-attach">7</property>
|
<property name="column">7</property>
|
||||||
<property name="top-attach">2</property>
|
<property name="row">2</property>
|
||||||
</layout>
|
</layout>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user