Compare commits
1005 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b1038c5d19 | |||
| b16b44f1ae | |||
| 37c151ce0f | |||
| eb7ad4bbad | |||
| cdec487998 | |||
| 80d3c68615 | |||
| ed4b3f8033 | |||
| 451e7a5ad2 | |||
| 89360b26af | |||
| d3d4fe14c2 | |||
| 040175cd92 | |||
| 64b0c63190 | |||
| 8ff540eb4c | |||
| 9194b7388f | |||
| 6831d3e28e | |||
| 800f1c03d5 | |||
| 7a0355fcb1 | |||
| 15d58a868a | |||
| 61f21fc9e9 | |||
| 9e068d3a46 | |||
| 2aa136a19c | |||
| 1dfd514f7f | |||
| 08fbd012ec | |||
| 638508fa20 | |||
| ce6c7bae51 | |||
| 19f7b7ed40 | |||
| e3dba28666 | |||
| 88aa548965 | |||
| 17a9b13af2 | |||
| 1efa781a19 | |||
| 0a19d7ef08 | |||
| 926fb208ba | |||
| e76dee07c5 | |||
| 11a43cf554 | |||
| a7218da202 | |||
| ed362fcc5b | |||
| 17ec74da35 | |||
| 754d6d1a04 | |||
| ff53d5ba11 | |||
| 7233a70d47 | |||
| 12990b3520 | |||
| 95d807ab61 | |||
| 8a1a96a47e | |||
| c31916081f | |||
| 0a1e19f4e3 | |||
| 7d3f3b7ab8 | |||
| 432b741ab7 | |||
| 703f18ce66 | |||
| 4da82bde7b | |||
| feee281cf8 | |||
| 443fd4d63d | |||
| 4b346538e2 | |||
| 0ee58e9ef4 | |||
| bd56bc9055 | |||
| 3e7e862415 | |||
| 4eeb413047 | |||
| 661f3466c2 | |||
| e735554ced | |||
| 520ea7c39d | |||
| ffa345e4ab | |||
| e072d9b28b | |||
| 9f5b04e65c | |||
| d08310096c | |||
| 20d0d6fae2 | |||
| 6b9ac1043b | |||
| c5b4066714 | |||
| b09b2dd2cd | |||
| 72a0828101 | |||
| 7379c34a39 | |||
| 6cd1b9955b | |||
| a6a31827bc | |||
| 84939a612c | |||
| 394ea32e93 | |||
| 2bd36d490b | |||
| ad1bc75dd2 | |||
| 7505c1fd7c | |||
| 8780906b93 | |||
| 0ed2e970be | |||
| 58253d567f | |||
| c09c61769c | |||
| 9b5dc35650 | |||
| 3c9ada14fe | |||
| 6b4d6c3771 | |||
| b15f16e8db | |||
| e3b9dfef1c | |||
| 822c2aba36 | |||
| a11f9fea76 | |||
| f16c829190 | |||
| 16c820c2f0 | |||
| 72ae6daa1e | |||
| 35ba24d2e8 | |||
| 508cb6160c | |||
| b9a76ddd75 | |||
| 038190c5a8 | |||
| 2ae08e632c | |||
| 99eed078bd | |||
| 6720552afd | |||
| 6f01508aa8 | |||
| 632524f679 | |||
| 22e1827f84 | |||
| 3c39613d9c | |||
| 46ff9f891a | |||
| 97ff1b83dc | |||
| 9416856420 | |||
| c1459cc45b | |||
| 4fe8c037c7 | |||
| b1afe5ff23 | |||
| bbd4fb8798 | |||
| b3b29e37fd | |||
| f996ba6585 | |||
| 7ca36cd2d4 | |||
| 2a18f2150d | |||
| a65fd81106 | |||
| ff8217db40 | |||
| a3861bf9a0 | |||
| b86c1446a4 | |||
| 9ce58bdb0c | |||
| 9f252f0ceb | |||
| 7008a531bb | |||
| 458b8a6554 | |||
| 307cc69adb | |||
| ab6b5ae568 | |||
| 0e601c0a70 | |||
| 5425edff82 | |||
| 213c471bb7 | |||
| 9ae0fe7f3a | |||
| abe6876f7c | |||
| 53d74fd2dc | |||
| 3f0a830f3c | |||
| e0323fcdc2 | |||
| cd5cded430 | |||
| 54e4e6cd23 | |||
| 59852d3425 | |||
| d701a89281 | |||
| 5e095cd208 | |||
| d2bdf3d5a1 | |||
| e692385baa | |||
| 1e8df851e9 | |||
| 904db0a8f7 | |||
| 6b7cc8baa6 | |||
| 71fe843d99 | |||
| 552a681816 | |||
| 2f0016eb08 | |||
| f87291cac2 | |||
| 37c3ba2645 | |||
| ba05787a06 | |||
| 12b97ffd24 | |||
| 1ae60cb713 | |||
| 3371e3aa49 | |||
| baeae71d12 | |||
| f8be3229b1 | |||
| b9cfcf07e0 | |||
| eb649d8204 | |||
| 4a00f3bc9a | |||
| 0b17658a82 | |||
| 2486f46c0b | |||
| c03b7e4d45 | |||
| e7a8a4eb06 | |||
| 70fbf8dbb6 | |||
| 93a1b3027d | |||
| 1de7719e34 | |||
| f7f103a322 | |||
| 14be8f6b73 | |||
| 99a344f791 | |||
| 3419d9c04f | |||
| c297d45b8a | |||
| dce8d251c6 | |||
| 89ad7893ad | |||
| da6faf321c | |||
| c8b791a763 | |||
| 0eb728aa51 | |||
| 3300686bef | |||
| 0a96a483c6 | |||
| 5071367794 | |||
| 5ce05a8fd0 | |||
| be2a0971c2 | |||
| 25e9a54902 | |||
| df1c6b6b68 | |||
| 00c791fcf9 | |||
| a5e73820da | |||
| 7fa103717d | |||
| f8646b9733 | |||
| d110fddbce | |||
| b02db72e17 | |||
| e8f30c836d | |||
| 6eaadba008 | |||
| 4495bacfd1 | |||
| 234a21905c | |||
| 13213c710f | |||
| e165267924 | |||
| 00b25d5594 | |||
| 31fb5c287a | |||
| 416ec580dc | |||
| ee14be8ac1 | |||
| f27470aaf4 | |||
| 90eda2b17c | |||
| 68d43c8e5c | |||
| c9aef3fc4d | |||
| e8330c5eec | |||
| 531766fe64 | |||
| 25a53276e0 | |||
| 1149502767 | |||
| 33928a52c3 | |||
| b636df7784 | |||
| 005739371c | |||
| ec854fc503 | |||
| e75e975a38 | |||
| 2bf81b51d9 | |||
| 22211f29fb | |||
| 8991275fbd | |||
| f2d6a7b36a | |||
| e43eb951d6 | |||
| 5205fa0ff7 | |||
| 842af79e97 | |||
| 6b292af6ac | |||
| 1424dd9786 | |||
| 339d3e41b0 | |||
| 9a2f7338df | |||
| bdb127e54c | |||
| e5d23aaaaf | |||
| d662512c44 | |||
| 324af2f701 | |||
| de481a7b5e | |||
| c8018e267a | |||
| 4e264a74be | |||
| 4f49d83e43 | |||
| eaef24c527 | |||
| 777435c470 | |||
| fb325afc79 | |||
| 046190cb8a | |||
| 53592497a4 | |||
| cffa45d5ff | |||
| 14166b09b5 | |||
| 8a0035333a | |||
| 1f8e633fff | |||
| 6e6b4a851f | |||
| 7444b15d47 | |||
| dd625abfc1 | |||
| b6f6df9662 | |||
| aaa4e40a1f | |||
| 8ec254e2bb | |||
| 2a9911724f | |||
| a9b4ac3d59 | |||
| 9df7f0197d | |||
| f169d23cdb | |||
| fcd36e59b1 | |||
| 8196478b19 | |||
| e31bbb41d2 | |||
| 9c948909ac | |||
| 544b8d5a7f | |||
| 6ae5d9ac22 | |||
| 63c6af8d13 | |||
| 199a539ae7 | |||
| dc3d778e01 | |||
| 2154b8e745 | |||
| 9f93464ea4 | |||
| 5987bc5d71 | |||
| 298218b1d2 | |||
| fa7f6ad910 | |||
| b92b7f45b5 | |||
| 2bacc0d4ef | |||
| e4fb4b635c | |||
| 5432f73095 | |||
| 2f64651a3f | |||
| 0852d66f6e | |||
| f3e826f4d6 | |||
| 15eb3bbbf1 | |||
| 96f822434f | |||
| ace183f38f | |||
| 5bf030413b | |||
| 2a3dab5b94 | |||
| 96f0c26306 | |||
| 8cf41c1b66 | |||
| 027ca22def | |||
| bd55c5842e | |||
| c3ff175e3f | |||
| b22c7b8b77 | |||
| 83027c68f1 | |||
| 44931a66df | |||
| 36d986f33c | |||
| 5ac73be976 | |||
| a07a69e24e | |||
| 3e1f59af61 | |||
| da47ccaf3c | |||
| e9082fd9f3 | |||
| 61e88c7421 | |||
| de31bb59a1 | |||
| 07bb29153b | |||
| b35e5eeaf6 | |||
| c0a450e41b | |||
| 785b33f169 | |||
| af749dc1dc | |||
| 47982ae272 | |||
| 0020b735d9 | |||
| e05c1b0244 | |||
| d0b4f9eb29 | |||
| 03375b723a | |||
| e2beb6ec50 | |||
| ef32cff771 | |||
| 366b007024 | |||
| 40337aa1b3 | |||
| 0bb38b903e | |||
| 8acd9ffc76 | |||
| 23b29341ba | |||
| 6e52820fd2 | |||
| 173b1333ca | |||
| 784d6f8d0c | |||
| 3437f85aaf | |||
| 7916b95bc5 | |||
| 7b135c96e4 | |||
| e662438675 | |||
| aa2ca80817 | |||
| 9ccd514682 | |||
| 2c7afc0556 | |||
| 182cb81bdb | |||
| ceef86895f | |||
| 001d076e61 | |||
| 408dd37944 | |||
| 9287e0e7fb | |||
| 28eb1fce04 | |||
| 49427119ab | |||
| 05891b1238 | |||
| b14d99ad7a | |||
| 329638280c | |||
| 06365cdc38 | |||
| 1f808c479a | |||
| 7e8d61b92c | |||
| d01e664c79 | |||
| 858997d172 | |||
| f3d061e879 | |||
| e2c327e025 | |||
| 48910a6d8e | |||
| fbed55dff9 | |||
| 059917b83c | |||
| 163aa82d45 | |||
| ba25e08e7b | |||
| bc2c341d60 | |||
| 7e0266004e | |||
| 93d54ba10b | |||
| 5d07a66d1d | |||
| 8997dc6f31 | |||
| 9f72f4225d | |||
| f1003d6ae8 | |||
| b1327167e2 | |||
| 6719d3044d | |||
| c75fdda8dd | |||
| 170e8bd605 | |||
| 96ccb25f97 | |||
| c3c06e60dc | |||
| ecb8dda309 | |||
| f7975828bc | |||
| 5fdb897f06 | |||
| 8ab2e31b58 | |||
| 0d710b0353 | |||
| 06fe4f0205 | |||
| 910dd7a20a | |||
| 8d8990ccd7 | |||
| bf3ccaa1bf | |||
| eaa20f5cdf | |||
| d07e22dc03 | |||
| 1ec2d1d9f1 | |||
| f59cd392ba | |||
| 6bacb0b0ae | |||
| 530b571d89 | |||
| ce22ef18f9 | |||
| 591f6bd7a9 | |||
| 642503afb4 | |||
| fc0b0b14a8 | |||
| 2de4fc3ec0 | |||
| b2ac42e576 | |||
| b19d4b9006 | |||
| 2c28a0713d | |||
| b423f974db | |||
| 4a430820bd | |||
| 5153cdc01d | |||
| 1db5382c6d | |||
| 6e8c78714d | |||
| 457b6657bb | |||
| 1ddd8586dd | |||
| 5ea45bf57d | |||
| 4e978d6b7a | |||
| b4722b43a1 | |||
| fd95cc56b1 | |||
| d66121c61e | |||
| 35332eb3b0 | |||
| 586e7749d5 | |||
| 904835d4b1 | |||
| cb821d5df3 | |||
| ff056af249 | |||
| 9cce474106 | |||
| 9d84996fea | |||
| c2d77a1f37 | |||
| 54a0037c45 | |||
| 80b988ef6c | |||
| 844801580f | |||
| 28b05eea67 | |||
| ca1d4322a2 | |||
| c94ec4a204 | |||
| 778d884f70 | |||
| e8be45fabc | |||
| c90b0581dd | |||
| 43c0ea676d | |||
| bb4fbe3d8f | |||
| 7c4d8d49b6 | |||
| cac39526a9 | |||
| 4c45410d43 | |||
| 8e9218df03 | |||
| 541c478eeb | |||
| 78e3e42042 | |||
| 33045c3e0b | |||
| 7974751e24 | |||
| daa7d9072d | |||
| 90a34312d4 | |||
| 580863b112 | |||
| fb6a8f5fc1 | |||
| c2e2e2993b | |||
| 5763514ab8 | |||
| 4c5d8547be | |||
| 34987c0b5c | |||
| 3cd4eb0310 | |||
| a1e9ae5259 | |||
| e738a4d129 | |||
| 1ec950d14a | |||
| 92e20deca1 | |||
| cd0332aad5 | |||
| cdd33bbee6 | |||
| bca1f6b64f | |||
| 9b99b89807 | |||
| 62f96bfda6 | |||
| 2c62cde780 | |||
| aab10ea43b | |||
| 9428807c57 | |||
| 21e6e4c026 | |||
| bde4cbe377 | |||
| 0b7e74318b | |||
| e398f63bf6 | |||
| 2244eeb727 | |||
| c3af47f5d9 | |||
| 730154df7d | |||
| 2309e1dd38 | |||
| 90c7f4608a | |||
| 66102dacf1 | |||
| d84b60e5f9 | |||
| 9a03c8b4d8 | |||
| f02521c502 | |||
| c1247a7993 | |||
| b2a747b4d4 | |||
| c1ee2fd54a | |||
| 4c7b00fd20 | |||
| 3fba7f9dce | |||
| 7ca4a94768 | |||
| 1df0a5eab5 | |||
| 6a005c815e | |||
| cb09211ace | |||
| e430e0e2ff | |||
| 6ad1078595 | |||
| cd7e9dcc27 | |||
| 8752f613d7 | |||
| f54d3a3aca | |||
| db525ef213 | |||
| 3f00e42ec9 | |||
| d5fa5b9594 | |||
| 2e5fc35e51 | |||
| 6ff94f3637 | |||
| 80888d7111 | |||
| 48b46c8d08 | |||
| df457cadfc | |||
| 58e8f2332d | |||
| 376dc4d169 | |||
| dfd81f9c64 | |||
| 6d418134ee | |||
| 02646d74f4 | |||
| d62be573ad | |||
| 17eef48835 | |||
| 7ffea02eb4 | |||
| 0b75edc0e1 | |||
| d4bba7de88 | |||
| a8902da4bc | |||
| 8ff18b3d39 | |||
| 81fa63260e | |||
| 6d452f1eb8 | |||
| d51b8ff058 | |||
| b11263ae91 | |||
| 0eb1228902 | |||
| d8603864a9 | |||
| f9ee703af4 | |||
| a232107122 | |||
| 27834b04ae | |||
| cbe207a8de | |||
| 1cab5e03ca | |||
| f8c523fa72 | |||
| e17db0abde | |||
| cc9c45a47a | |||
| a9c3a33620 | |||
| f61d520ab1 | |||
| 7672e6c833 | |||
| faf61cd112 | |||
| 1308ecb0ae | |||
| 4f6096947e | |||
| dc18572a59 | |||
| 8493ebfe98 | |||
| 5870d9d72a | |||
| b5b836668a | |||
| c155ac98c8 | |||
| 600952e295 | |||
| 3b2adf5d1f | |||
| 56d99ab5cd | |||
| 29c9776daa | |||
| eb8e0910c3 | |||
| cfc44e09a0 | |||
| 92b50c5e2a | |||
| dabd09bc42 | |||
| d7e5f5b368 | |||
| 95209290c4 | |||
| 90197240d3 | |||
| 6555a2f661 | |||
| a197b202b8 | |||
| 84e58aa393 | |||
| e99d1605dc | |||
| bf988f8d07 | |||
| 245851a6bb | |||
| bb3dc16680 | |||
| fceac594ae | |||
| abeabc39e8 | |||
| fd58b116cf | |||
| a67893fe5a | |||
| 9259efb5d7 | |||
| 72f06abd13 | |||
| 923a245a80 | |||
| 38f1dbaba3 | |||
| 795ef5b4e3 | |||
| fd9c911c3a | |||
| a8c6ae6085 | |||
| 28e7a0a565 | |||
| 7088bd18e6 | |||
| ccac404f28 | |||
| 6822dce8fb | |||
| 5b2cdad19e | |||
| c7caa53917 | |||
| fa4be719d8 | |||
| 32f088e335 | |||
| cb81e3ee47 | |||
| 9eda683060 | |||
| cbb0ca4902 | |||
| 9403f44aef | |||
| dc4b7131f1 | |||
| bf6087f2da | |||
| 23f03ca1f2 | |||
| 54a4a18bcf | |||
| 9a0b70fc84 | |||
| 6431bdcf91 | |||
| 0f73e83f44 | |||
| 0264a64f29 | |||
| c893f79023 | |||
| 68e1c8d3e9 | |||
| cf7dc5b2bb | |||
| 068ec58287 | |||
| 2747dd5c9f | |||
| f6fc3073fb | |||
| 31db615885 | |||
| 3ac4c76b18 | |||
| 89b537bd8a | |||
| 7d5cfcf61d | |||
| 2e70b4c323 | |||
| fcab0943bf | |||
| c8fd6407a8 | |||
| 53f29ba427 | |||
| eb3f4b302f | |||
| 59df45f3f7 | |||
| 98011e6273 | |||
| f40965cc40 | |||
| ab9b094f80 | |||
| 4bc60c6110 | |||
| 48ace13635 | |||
| 908d996b4f | |||
| 4e263b4042 | |||
| f5134a833c | |||
| f7021e80a7 | |||
| 3e7d49a8d3 | |||
| 5a6533d8fb | |||
| 5a6a9dc149 | |||
| ad69899a9d | |||
| 3cf56817e7 | |||
| ff6df33b6a | |||
| e944514664 | |||
| 93bb3f7144 | |||
| 17d9ba362c | |||
| b685d2c00a | |||
| 1a55f59f23 | |||
| 29ced09dc4 | |||
| 458fcba457 | |||
| 5218dd6a34 | |||
| df792a088d | |||
| 94ef20ea36 | |||
| 87df17e4ce | |||
| 673a0463e0 | |||
| 0c81698911 | |||
| a10a295515 | |||
| 3b595f5720 | |||
| d14807b93d | |||
| 538a1a0461 | |||
| 067bd7019c | |||
| 4a4bfa0766 | |||
| e6d0560a82 | |||
| 4d0bab0c24 | |||
| b28da74e90 | |||
| ba3882de83 | |||
| 20cfa2e280 | |||
| a977094e18 | |||
| 09400b6bfe | |||
| bbe98d9f7c | |||
| ab681b0e05 | |||
| ef40f22632 | |||
| bea2dcef8f | |||
| cc13b47542 | |||
| 8c23ccd86e | |||
| 662a8a2885 | |||
| d4127fe0d4 | |||
| 22801f0d4d | |||
| e050288d07 | |||
| 93af53a2fc | |||
| e2a0ed4fcb | |||
| fb99f834e6 | |||
| a062b96051 | |||
| 5033fc62f2 | |||
| bdde072c06 | |||
| f7a4d968e9 | |||
| 252030ba59 | |||
| f24cf29326 | |||
| 9b1d593967 | |||
| 4e3ac8f52b | |||
| 7f10641fd9 | |||
| 3ef6be0d25 | |||
| 56595e7529 | |||
| 4b798e238f | |||
| 718faf68ac | |||
| 83dc9dabed | |||
| 051f7e4118 | |||
| cbeb096bb3 | |||
| bf7c51cc11 | |||
| 3803209330 | |||
| fb7d1095d1 | |||
| 45ec453b76 | |||
| e4d628b410 | |||
| e11d799460 | |||
| 6e38af4429 | |||
| a70635f760 | |||
| 2c91f15f6d | |||
| bad5ee7ed9 | |||
| 277aaab041 | |||
| 5ade831cd1 | |||
| 3b8a4340da | |||
| ae11b29ee7 | |||
| ac31979805 | |||
| 0b4d0f4d31 | |||
| 00bc9e6b85 | |||
| d75fd59ddf | |||
| 84a52e3bbd | |||
| 9687d69b5a | |||
| b18f9da807 | |||
| 6c13bbb441 | |||
| 4f128a4a21 | |||
| e62154c91f | |||
| 78f9940ddc | |||
| 0f6c5da28d | |||
| c7f10e570e | |||
| e19b49f5aa | |||
| ff13ee4b66 | |||
| fed7d3833f | |||
| 5c6be5c0cd | |||
| 06660874ee | |||
| 4675d74e42 | |||
| 3b3a5c2d53 | |||
| 385c5e0569 | |||
| 6ec96d2e98 | |||
| 6c8d47f585 | |||
| 1bc1b82256 | |||
| 89c0df6cb7 | |||
| c91dd2cb45 | |||
| 3408ff1dd7 | |||
| 7a46157edf | |||
| 01568dc915 | |||
| 6eb848f0e0 | |||
| e4578b15c3 | |||
| 8fab4ceebb | |||
| 826f237782 | |||
| 435992600f | |||
| 5d4b46b2d8 | |||
| 292cea7310 | |||
| 4d7f0f330b | |||
| 5bf51adcce | |||
| 5343ec3345 | |||
| c6cc02637e | |||
| 1576cced0f | |||
| c9ec1c6af1 | |||
| 32b9dd64db | |||
| 6f156dad7f | |||
| 103ef3c195 | |||
| 60ea97187a | |||
| fb7ef8f62c | |||
| d4f49a8cb9 | |||
| 951f821d6a | |||
| dfda88038e | |||
| 50c2b80c74 | |||
| 0d3df4fb1d | |||
| 4be675b0c9 | |||
| 0c25b4cfa8 | |||
| c2e5aed874 | |||
| 60a9e9d342 | |||
| 8010bc4596 | |||
| 33db28c288 | |||
| 7db490ef2a | |||
| 8b1301cecd | |||
| bc6953a081 | |||
| 4b71ed3f5e | |||
| 8fd51d761b | |||
| 66a0a8d53e | |||
| 265d9c8703 | |||
| eaf9f7e225 | |||
| 331069f378 | |||
| 9aa270f928 | |||
| 97d189d726 | |||
| 9e2829756f | |||
| b74a26b275 | |||
| 03d6d272f7 | |||
| 1a763c440f | |||
| 43598fc5f2 | |||
| a4b718da4e | |||
| 086a577fd1 | |||
| c5076675aa | |||
| 9d98707f66 | |||
| 179b39eb86 | |||
| 19e2ab76ce | |||
| 2fe23409fb | |||
| 1963ff2951 | |||
| 2b2d6bf747 | |||
| 7fd60ab570 | |||
| 25b90907ad | |||
| f005dfa5fb | |||
| 31d2b686d6 | |||
| 3e06a9b1d2 | |||
| 641c8f3252 | |||
| f020d77a23 | |||
| 81be6ff46b | |||
| b7f51a362e | |||
| b05408f854 | |||
| fe19ad7919 | |||
| 651b746747 | |||
| 3654c05cb3 | |||
| b6c8cf72cd | |||
| 8b57092958 | |||
| 4dc27ee4a6 | |||
| 90ff8ca797 | |||
| 7e15a13f48 | |||
| b2c5d77883 | |||
| 90dfca290c | |||
| a2dbc729f6 | |||
| 763321e274 | |||
| df223ae27b | |||
| 0616fe033d | |||
| 5a516f2a22 | |||
| 70e45aa229 | |||
| c00ec402c1 | |||
| 84095febed | |||
| 4c06c3bb19 | |||
| 34ff8f3afb | |||
| bf08bf667c | |||
| cd773e7cb3 | |||
| b3cabe638f | |||
| fafddde4bc | |||
| 412a593618 | |||
| d6be419050 | |||
| ceefe34027 | |||
| b25be8a42f | |||
| 3a4e647b2d | |||
| c67d426dc4 | |||
| a79b6fbf35 | |||
| 496bd5783c | |||
| 8ea80801b4 | |||
| f7aec64e6f | |||
| 8e0ad72875 | |||
| 703d69692f | |||
| f90c0ccaf0 | |||
| f78f8655a6 | |||
| 6edff8cd67 | |||
| 9266881691 | |||
| dfbde3da4f | |||
| c0c387020b | |||
| 3830e764d7 | |||
| 73d8f6a090 | |||
| 822d67295a | |||
| e7ef4a57ca | |||
| 11c91065cf | |||
| eefedccaee | |||
| 2ae3b46ee9 | |||
| ef9d7612f6 | |||
| 66669e0573 | |||
| aec3705717 | |||
| ec0fb44958 | |||
| 6c44f7bf07 | |||
| b2ae6ce8ff | |||
| 72fdf54e07 | |||
| 78ed520a5b | |||
| 29606af03e | |||
| 513eb11c7c | |||
| 2a6c08571f | |||
| 3276021a5b | |||
| b1fb049277 | |||
| 5acbfce264 | |||
| dc4f7515bd | |||
| 4e8dfdff2e | |||
| b670bf54f7 | |||
| 530dd5a940 | |||
| aee8a02fc8 | |||
| 0791363943 | |||
| fe35831112 | |||
| c2f25c0c2f | |||
| 78d71eb439 | |||
| c488e86caa | |||
| ad322c154c | |||
| 6f36d9865e | |||
| d70c9453ba | |||
| ff0909f366 | |||
| 7de62118a0 | |||
| 8742d42f32 | |||
| 4af0531e8c | |||
| 4232cbe33f | |||
| 2da445f918 | |||
| 5858b56acc | |||
| 7553649c47 | |||
| 7789d0e23f | |||
| dc36c21835 | |||
| 049f841900 | |||
| 948ab2767b | |||
| 3c28f6d891 | |||
| 6f6ed1e4af | |||
| e444d7315c | |||
| 5d1e006a95 | |||
| 6fcd5d5ab5 | |||
| e759358402 | |||
| 01bd7910ce | |||
| 79c60bb7fd | |||
| b3c332ad9c | |||
| 83982a28e7 | |||
| d1cd6aacba | |||
| 0e8850bf84 | |||
| d7fb33caf7 | |||
| 970d9dc06e | |||
| a1c75795bc | |||
| 63126a1b3e | |||
| cda9007f0f | |||
| 394955cceb | |||
| b1a257c0c3 | |||
| a106b54355 | |||
| 510e17d123 | |||
| 317dcddddb | |||
| df282a13bb | |||
| e37729756d | |||
| 3b8d9dbd28 | |||
| 03e7c7fab1 | |||
| b231a40106 | |||
| be30f78e62 | |||
| 89e5b8cd3a | |||
| e356d59a92 | |||
| 4be4799316 | |||
| 7dce9e426e | |||
| 4e88d5a7cf | |||
| fdd4630952 | |||
| a4ed6fde9d | |||
| dc86c744bf | |||
| 9fedcec82e | |||
| f6b11a5158 | |||
| 38dcc8f63b | |||
| 18b011a717 | |||
| 8fc360dac5 | |||
| 4313c47113 | |||
| b376d9617e | |||
| efbae75f3d | |||
| 3f7a7d4ca1 | |||
| 2c04e9441a | |||
| a3b9dba13c | |||
| 5e099e2606 | |||
| 041043eec1 | |||
| ec9038a8f2 | |||
| c7414db684 | |||
| 6d2c6b1257 | |||
| 9f829ebd4a | |||
| 8e14b21e52 | |||
| 46ba019522 | |||
| 3ef1dca51c | |||
| 2e55c9cf8c | |||
| 7427f4f311 | |||
| c0a63e6dd2 | |||
| 47230f191f | |||
| 0e72adf6dd | |||
| f5fda3ae58 | |||
| f4a00e7909 | |||
| e7db386018 | |||
| 2a697827e1 | |||
| b2c3e39c89 | |||
| 03882e1f96 | |||
| 9efc4e6777 | |||
| 7cd728a0ea | |||
| c3fb6ca747 | |||
| 3f7b401de0 | |||
| a411959c91 | |||
| f4ac74795c | |||
| b64a0273c5 | |||
| b799bc5ce1 | |||
| fdb39b095b | |||
| d9fa839097 | |||
| 35f8f05a63 | |||
| 810d567cc9 | |||
| c9d3f87e43 | |||
| 3d11973df8 | |||
| 57c8a643ff | |||
| 0ffb35c9e7 | |||
| d60097f8fe | |||
| 8f87555176 | |||
| 8cb45cdeae | |||
| 823714cf66 | |||
| cf2bcef814 | |||
| 29d033a8b3 | |||
| cf873f3426 | |||
| 527a8048b6 | |||
| 0c1f93cd7c | |||
| d86832ad5a | |||
| 8df045537e | |||
| 73d40c2e6e | |||
| 90376d6d6e | |||
| 6a359c54fb | |||
| 17b7aabfc1 | |||
| dcbecdac31 | |||
| fa75d7f480 | |||
| 5430c80361 | |||
| 37a2cae10e | |||
| 815e18e069 | |||
| c79acb418f | |||
| 303e20226c | |||
| 3c2312a2dd | |||
| 7eb7ee33ff | |||
| d4dcb43aa9 | |||
| a1bbd25e12 | |||
| c8f4f903c6 | |||
| b5bacb3be6 | |||
| a9c05193a7 | |||
| 2d4e1e248d | |||
| 77ce55b9ac | |||
| 06ff60aa35 | |||
| 341b2a3d39 | |||
| 7bc50b7466 | |||
| d9608a0357 | |||
| 92d86c4a9f | |||
| 382340c158 | |||
| a87966b2bf | |||
| 8a6d5a77bb | |||
| 97b5775c1f | |||
| 64ff12dbd7 | |||
| 02e295ec5d | |||
| 6ff057f36a | |||
| 54bf739e8f | |||
| d5327a61e6 | |||
| 0bca4a276a | |||
| 6056ca9265 | |||
| 73c212d89b | |||
| 6b970c6813 | |||
| e552adf05a | |||
| a1fc94f1f7 | |||
| b81cd8c929 | |||
| 838fc4fdf4 | |||
| 596be280c9 | |||
| b1d4d24c7b | |||
| 1baae1f288 | |||
| dae06d82ae | |||
| 549a3a81ae | |||
| ff4a33b69b | |||
| 68b4c061cf | |||
| dbd1180ce4 | |||
| df3b88483d | |||
| 60d2813247 | |||
| 995277f57d | |||
| e1ca83ddbd | |||
| f4202c5075 | |||
| 103b6a9205 | |||
| ceabe70a42 | |||
| 73faa9c84a | |||
| 1b278b0636 | |||
| 648a67085f | |||
| 9d80db29de | |||
| e73a40733f | |||
| 00f6d1c24b | |||
| 52c948e4e0 | |||
| 8628c573b5 | |||
| a43d13aa74 | |||
| 259f465e01 | |||
| 6fb50ccd0d | |||
| 7a39f2d49d | |||
| 96b7c5f575 | |||
| 90fb0caf28 | |||
| 3c95798cd3 | |||
| ec76f65d09 | |||
| 6be9e44786 | |||
| 9ce6e98487 | |||
| 4ca0a93324 | |||
| 3735c9d155 |
+36
-14
@@ -1,8 +1,9 @@
|
||||
stages:
|
||||
- style-check
|
||||
- build
|
||||
- deploy
|
||||
- analysis
|
||||
- docs
|
||||
- flatpak
|
||||
- deploy
|
||||
|
||||
.cache-paths: &cache-paths
|
||||
paths:
|
||||
@@ -26,14 +27,14 @@ variables:
|
||||
|
||||
style-check-diff:
|
||||
extends: .only-default
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v13
|
||||
stage: style-check
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v16
|
||||
stage: .pre
|
||||
allow_failure: true
|
||||
script:
|
||||
- .gitlab-ci/run-style-check-diff.sh
|
||||
|
||||
fedora-x86_64:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v13
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v16
|
||||
stage: build
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
|
||||
@@ -65,7 +66,7 @@ fedora-x86_64:
|
||||
<<: *cache-paths
|
||||
|
||||
release-build:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v13
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v16
|
||||
stage: build
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=release"
|
||||
@@ -166,18 +167,39 @@ flatpak-master:icon-browser:
|
||||
APPID: org.gtk.IconBrowser4
|
||||
<<: *flatpak-master
|
||||
|
||||
pages:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v13
|
||||
stage: deploy
|
||||
static-scan:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v16
|
||||
stage: analysis
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=debug"
|
||||
script:
|
||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} _scan_build
|
||||
- ninja -C _scan_build scan-build
|
||||
artifacts:
|
||||
paths:
|
||||
- _scan_build/meson-logs
|
||||
allow_failure: true
|
||||
|
||||
reference:
|
||||
image: registry.gitlab.gnome.org/gnome/gtk/fedora:v16
|
||||
stage: docs
|
||||
variables:
|
||||
EXTRA_MESON_FLAGS: "--buildtype=release"
|
||||
script:
|
||||
- meson ${COMMON_MESON_FLAGS} -Dgtk_doc=true _build
|
||||
- meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} -Dgtk_doc=true _build
|
||||
- ninja -C _build gdk4-doc gsk4-doc gtk4-doc
|
||||
- mkdir -p public/
|
||||
- mv _build/docs/reference/gdk/html/ public/gdk/
|
||||
- mv _build/docs/reference/gsk/html/ public/gsk/
|
||||
- mv _build/docs/reference/gtk/html/ public/gtk/
|
||||
- mkdir -p _reference/
|
||||
- mv _build/docs/reference/gdk/html/ _reference/gdk/
|
||||
- mv _build/docs/reference/gsk/html/ _reference/gsk/
|
||||
- mv _build/docs/reference/gtk/html/ _reference/gtk/
|
||||
artifacts:
|
||||
paths:
|
||||
- _reference
|
||||
|
||||
pages:
|
||||
stage: deploy
|
||||
script:
|
||||
- mv _reference/ public/
|
||||
artifacts:
|
||||
paths:
|
||||
- public
|
||||
|
||||
@@ -9,9 +9,11 @@ RUN dnf -y install \
|
||||
cairo-gobject-devel \
|
||||
ccache \
|
||||
clang \
|
||||
clang-analyzer \
|
||||
colord-devel \
|
||||
cups-devel \
|
||||
dbus-daemon \
|
||||
dbus-x11 \
|
||||
dejavu-sans-mono-fonts \
|
||||
desktop-file-utils \
|
||||
diffutils \
|
||||
@@ -80,7 +82,7 @@ RUN dnf -y install \
|
||||
xorg-x11-server-Xvfb \
|
||||
&& dnf clean all
|
||||
|
||||
RUN pip3 install meson==0.52.1
|
||||
RUN pip3 install meson==0.53.1
|
||||
|
||||
ARG HOST_USER_ID=5555
|
||||
ENV HOST_USER_ID ${HOST_USER_ID}
|
||||
|
||||
@@ -174,7 +174,7 @@ ul.images li {
|
||||
<div class="failures">
|
||||
<h4><a name="{{ suite_result.suite_name }}-failed">Failures</a></h4>
|
||||
<ul class="failed">
|
||||
{% for failure in suite_result.failures if failure.result in [ 'FAIL', 'UNEXPECTEDPASS' ] %}
|
||||
{% for failure in suite_result.failures if failure.result in [ 'ERROR', 'FAIL', 'UNEXPECTEDPASS' ] %}
|
||||
<li><a name="{{ failure.name }}">{{ failure.name }}</a> - result: <span class="result fail">{{ failure.result }}</span><br/>
|
||||
{% if failure.stdout %}
|
||||
Output: <pre>{{ failure.stdout }}</pre>
|
||||
@@ -207,24 +207,6 @@ ul.images li {
|
||||
</div>
|
||||
|
||||
<div class="successes">
|
||||
<h4><a name="{{ suite_result.suite_name }}-skipped">Skipped</a></h4>
|
||||
<ul>
|
||||
{% for success in suite_result.successes if success.result == 'SKIP' %}
|
||||
<li>{{ success.name }} - result: <span class="result skip">{{ success.result }}</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4><a name="{{ suite_result.suite_name }}-passed">Passed</a></h4>
|
||||
<ul class="passed">
|
||||
{% for success in suite_result.successes if success.result == 'OK' %}
|
||||
<li>{{ success.name }} - result: <span class="result pass">{{ success.result }}</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4><a name="{{ suite_result.suite_name }}-expected-fail">Expected failures</a></h4>
|
||||
<ul>
|
||||
{% for success in suite_result.successes if success.result == 'EXPECTEDFAIL' %}
|
||||
@@ -244,6 +226,24 @@ ul.images li {
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4><a name="{{ suite_result.suite_name }}-skipped">Skipped</a></h4>
|
||||
<ul>
|
||||
{% for success in suite_result.successes if success.result == 'SKIP' %}
|
||||
<li>{{ success.name }} - result: <span class="result skip">{{ success.result }}</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
||||
<h4><a name="{{ suite_result.suite_name }}-passed">Passed</a></h4>
|
||||
<ul class="passed">
|
||||
{% for success in suite_result.successes if success.result == 'OK' %}
|
||||
<li>{{ success.name }} - result: <span class="result pass">{{ success.result }}</li>
|
||||
{% else %}
|
||||
<li>None</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -331,7 +331,7 @@ for name, units in suites.items():
|
||||
print('Processing {} suite {}:'.format(project_name, suite_name))
|
||||
|
||||
def if_failed(unit):
|
||||
if unit['result'] in ['FAIL', 'UNEXPECTEDPASS', 'TIMEOUT']:
|
||||
if unit['result'] in ['FAIL', 'UNEXPECTEDPASS', 'TIMEOUT', 'ERROR',]:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ for name, units in suites.items():
|
||||
print('Processing suite {} (units: {})'.format(name, len(units)))
|
||||
|
||||
def if_failed(unit):
|
||||
if unit['result'] in ['FAIL', 'UNEXPECTEDPASS', 'TIMEOUT']:
|
||||
if unit['result'] in ['ERROR', 'FAIL', 'UNEXPECTEDPASS', 'TIMEOUT']:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
+19
-14
@@ -85,20 +85,25 @@ else
|
||||
base_version="v$base_version"
|
||||
fi
|
||||
|
||||
TAG="registry.gitlab.gnome.org/gnome/gtk/${base}:${base_version}"
|
||||
if [ ! -x "$(command -v docker)" ] || [ docker --help |& grep -q podman ]; then
|
||||
# Docker is actually implemented by podman, and its OCI output
|
||||
# is incompatible with some of the dockerd instances on GitLab
|
||||
# CI runners.
|
||||
echo "Using: Podman"
|
||||
format="--format docker"
|
||||
CMD="podman"
|
||||
else
|
||||
echo "Using: Docker"
|
||||
format=""
|
||||
CMD="sudo socker"
|
||||
fi
|
||||
|
||||
REGISTRY="registry.gitlab.gnome.org"
|
||||
TAG="${REGISTRY}/gnome/gtk/${base}:${base_version}"
|
||||
|
||||
if [ $build == 1 ]; then
|
||||
if docker --help |& grep -q podman; then
|
||||
# Docker is actually implemented by podman, and its OCI output
|
||||
# is incompatible with some of the dockerd instances on GitLab
|
||||
# CI runners.
|
||||
format="--format docker"
|
||||
else
|
||||
format=""
|
||||
fi
|
||||
|
||||
echo -e "\e[1;32mBUILDING\e[0m: ${base} as ${TAG}"
|
||||
sudo docker build \
|
||||
${CMD} build \
|
||||
${format} \
|
||||
--build-arg HOST_USER_ID="$UID" \
|
||||
--tag "${TAG}" \
|
||||
@@ -110,16 +115,16 @@ if [ $push == 1 ]; then
|
||||
echo -e "\e[1;32mPUSHING\e[0m: ${base} as ${TAG}"
|
||||
|
||||
if [ $no_login == 0 ]; then
|
||||
sudo docker login registry.gitlab.gnome.org
|
||||
${CMD} login ${REGISTRY}
|
||||
fi
|
||||
|
||||
sudo docker push $TAG
|
||||
${CMD} push ${TAG}
|
||||
exit $?
|
||||
fi
|
||||
|
||||
if [ $run == 1 ]; then
|
||||
echo -e "\e[1;32mRUNNING\e[0m: ${base} as ${TAG}"
|
||||
sudo docker run \
|
||||
${CMD} run \
|
||||
--rm \
|
||||
--volume "$(pwd)/..:/home/user/app" \
|
||||
--workdir "/home/user/app" \
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
set +e
|
||||
set -e
|
||||
|
||||
# We need to add a new remote for the upstream master, since this script could
|
||||
# be running in a personal fork of the repository which has out of date branches.
|
||||
@@ -13,8 +13,9 @@ git fetch upstream
|
||||
#
|
||||
# `${CI_MERGE_REQUEST_TARGET_BRANCH_NAME}` is only defined if we’re running in
|
||||
# a merge request pipeline; fall back to `${CI_DEFAULT_BRANCH}` otherwise.
|
||||
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}) <(git rev-list --first-parent HEAD) | head -1)
|
||||
newest_common_ancestor_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "upstream/${CI_MERGE_REQUEST_TARGET_BRANCH_NAME:-${CI_DEFAULT_BRANCH}}") <(git rev-list --first-parent HEAD) | head -1)
|
||||
git diff -U0 --no-color "${newest_common_ancestor_sha}" | .gitlab-ci/clang-format-diff.py -binary "clang-format" -p1
|
||||
exit_status=$?
|
||||
|
||||
# The style check is not infallible. The clang-format configuration cannot
|
||||
# perfectly describe GTK’s coding style: in particular, it cannot align
|
||||
@@ -32,3 +33,5 @@ echo " https://gitlab.gnome.org/GNOME/gtk/blob/master/docs/CODING-STYLE"
|
||||
echo "Warnings from this tool can be ignored in favour of the documented "
|
||||
echo "coding style, or in favour of matching the style of existing"
|
||||
echo "surrounding code."
|
||||
|
||||
exit ${exit_status}
|
||||
|
||||
@@ -1,3 +1,92 @@
|
||||
Overview of Changes in GTK 3.98.2
|
||||
=================================
|
||||
|
||||
* Introduce GtkShortcutController, and replace key bindings,
|
||||
mnemonics and accelerators by GtkShortcut
|
||||
|
||||
* Derive the HighContrast theme from Adwaita
|
||||
|
||||
* GtkMenuButton: Add a use-underline property
|
||||
|
||||
* GtkTreeView: Fix cell editing
|
||||
|
||||
* Add gdk_toplevel_inhibit_system_shortcuts
|
||||
|
||||
* gtk-demo: Fix issues in multiple demos
|
||||
|
||||
* Translation updates:
|
||||
Polish
|
||||
|
||||
|
||||
Overview of Changes in GTK 3.98.1
|
||||
=================================
|
||||
|
||||
* GtkFileChooser:
|
||||
- Remove filename/uri api
|
||||
- Drop extra-widget
|
||||
- Remove overwrite confirmation
|
||||
- Remove show-hidden property
|
||||
- Remove local-only property
|
||||
- Remove GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
|
||||
- The portal file chooser supports selecting folders
|
||||
|
||||
* GtkSpinner:
|
||||
- Rename active property to spinning
|
||||
|
||||
* GtkRevealer:
|
||||
- Fix size allocation at small scales
|
||||
|
||||
* GtkPopover:
|
||||
- Drop :relative-to, it is always the :parent now
|
||||
|
||||
* GtkWindow:
|
||||
- Drop window-type, it is always a regular toplevel
|
||||
|
||||
* GtkWidget:
|
||||
- Drop expand property
|
||||
- Drop margin property
|
||||
- Drop gtk_grab_add, gtk_device_grab_add
|
||||
|
||||
* GtkTextView:
|
||||
- Support overlines in GtkTextTag
|
||||
- Support visible spaces in GtkTextTag
|
||||
- Support hyphenation control in GtkTextTag
|
||||
|
||||
* Split GtkEventControllerFocus from GtkEventControllerKey
|
||||
|
||||
* DND:
|
||||
- Fix local DND to avoid serialization
|
||||
- Add new content provider constructors
|
||||
- Split GtkDropTargetAsync and GtkDropTarget
|
||||
- Group DND events into event sequences
|
||||
- Propagate DND events like motion events
|
||||
- Introduce GtkDropControllerMotion
|
||||
- Remove GtkSelectionData
|
||||
|
||||
* Performance:
|
||||
- Clean up profiler marks
|
||||
- Share GL programs between renderers
|
||||
|
||||
* GDK:
|
||||
- Drop gdk_surface_new_temp
|
||||
- Make GdkEvent an immutable boxed type, not an object
|
||||
- Remove GdkAtom and property- and selection-related apis
|
||||
- Introduce GdkPopup and GdkToplevel interfaces
|
||||
- Implement them in backend-specific surface subtypes
|
||||
- Rename gdk_surface_input_shape_combine_region to
|
||||
gdk_surface_set_input_region
|
||||
- Drop X11-only concepts such as sticky or keep-below
|
||||
|
||||
* OS X: Fix OpenGL extension detection
|
||||
|
||||
* Broadway: implement scaling
|
||||
|
||||
* Translation updates:
|
||||
Dutch
|
||||
Japanese
|
||||
Persian
|
||||
|
||||
|
||||
Overview of Changes in GTK 3.98.0
|
||||
=================================
|
||||
|
||||
|
||||
@@ -308,17 +308,17 @@ save_response_cb (GtkNativeDialog *dialog,
|
||||
&error);
|
||||
if (error != NULL)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *message_dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"Saving failed");
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
message_dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"Saving failed");
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog),
|
||||
"%s", error->message);
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
gtk_widget_show (dialog);
|
||||
g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
gtk_widget_show (message_dialog);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
@@ -601,7 +601,10 @@ create_widget_func (gpointer item,
|
||||
g_object_bind_property (item, "name",
|
||||
label, "label",
|
||||
G_BINDING_DEFAULT);
|
||||
g_object_set (label, "margin", 10, NULL);
|
||||
gtk_widget_set_margin_start (label, 10);
|
||||
gtk_widget_set_margin_end (label, 10);
|
||||
gtk_widget_set_margin_top (label, 10);
|
||||
gtk_widget_set_margin_bottom (label, 10);
|
||||
gtk_label_set_xalign (GTK_LABEL (label), 0.0);
|
||||
gtk_widget_set_hexpand (label, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (row), box);
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
<template class="ConstraintEditor" parent="GtkWidget">
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<child>
|
||||
|
||||
@@ -77,7 +77,7 @@ update_weak_position (ConstraintView *self,
|
||||
GTK_CONSTRAINT_RELATION_EQ,
|
||||
x,
|
||||
GTK_CONSTRAINT_STRENGTH_WEAK);
|
||||
g_object_set_data (G_OBJECT (constraint), "internal", "yes");
|
||||
g_object_set_data (G_OBJECT (constraint), "internal", (char *)"yes");
|
||||
gtk_constraint_layout_add_constraint (GTK_CONSTRAINT_LAYOUT (manager),
|
||||
constraint);
|
||||
g_object_set_data (G_OBJECT (child), "x-constraint", constraint);
|
||||
@@ -97,7 +97,7 @@ update_weak_position (ConstraintView *self,
|
||||
GTK_CONSTRAINT_RELATION_EQ,
|
||||
y,
|
||||
GTK_CONSTRAINT_STRENGTH_WEAK);
|
||||
g_object_set_data (G_OBJECT (constraint), "internal", "yes");
|
||||
g_object_set_data (G_OBJECT (constraint), "internal", (char *)"yes");
|
||||
gtk_constraint_layout_add_constraint (GTK_CONSTRAINT_LAYOUT (manager),
|
||||
constraint);
|
||||
g_object_set_data (G_OBJECT (child), "y-constraint", constraint);
|
||||
@@ -214,7 +214,7 @@ constraint_view_add_child (ConstraintView *view,
|
||||
|
||||
label = gtk_label_new (name);
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (frame), "child");
|
||||
gtk_widget_add_css_class (frame, "child");
|
||||
gtk_widget_set_name (frame, name);
|
||||
gtk_container_add (GTK_CONTAINER (frame), label);
|
||||
gtk_widget_set_parent (frame, GTK_WIDGET (view));
|
||||
@@ -257,8 +257,8 @@ constraint_view_add_guide (ConstraintView *view,
|
||||
G_BINDING_DEFAULT);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (frame), "guide");
|
||||
g_object_set_data (G_OBJECT (frame), "internal", "yes");
|
||||
gtk_widget_add_css_class (frame, "guide");
|
||||
g_object_set_data (G_OBJECT (frame), "internal", (char *)"yes");
|
||||
gtk_container_add (GTK_CONTAINER (frame), label);
|
||||
gtk_widget_insert_after (frame, GTK_WIDGET (view), NULL);
|
||||
|
||||
@@ -276,7 +276,7 @@ constraint_view_add_guide (ConstraintView *view,
|
||||
names[i].attr,
|
||||
1.0, 0.0,
|
||||
GTK_CONSTRAINT_STRENGTH_REQUIRED);
|
||||
g_object_set_data (G_OBJECT (constraint), "internal", "yes");
|
||||
g_object_set_data (G_OBJECT (constraint), "internal", (char *)"yes");
|
||||
gtk_constraint_layout_add_constraint (layout, constraint);
|
||||
g_object_set_data (G_OBJECT (guide), names[i].name, constraint);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ get_strength (const char *id)
|
||||
return strength;
|
||||
}
|
||||
|
||||
const char *
|
||||
static const char *
|
||||
get_strength_nick (GtkConstraintStrength strength)
|
||||
{
|
||||
GEnumClass *class = g_type_class_ref (GTK_TYPE_CONSTRAINT_STRENGTH);
|
||||
|
||||
@@ -45,7 +45,10 @@
|
||||
<template class="GuideEditor" parent="GtkWidget">
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<child>
|
||||
|
||||
@@ -13,6 +13,7 @@ constraint_editor_resources = gnome.compile_resources('constraint_editor_resourc
|
||||
|
||||
executable('gtk4-constraint-editor',
|
||||
constraint_editor_sources, constraint_editor_resources,
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
typedef GtkApplication DemoApplication;
|
||||
typedef GtkApplicationClass DemoApplicationClass;
|
||||
|
||||
static GType demo_application_get_type (void);
|
||||
G_DEFINE_TYPE (DemoApplication, demo_application, GTK_TYPE_APPLICATION)
|
||||
|
||||
typedef struct {
|
||||
@@ -25,6 +26,7 @@ typedef struct {
|
||||
} DemoApplicationWindow;
|
||||
typedef GtkApplicationWindowClass DemoApplicationWindowClass;
|
||||
|
||||
static GType demo_application_window_get_type (void);
|
||||
G_DEFINE_TYPE (DemoApplicationWindow, demo_application_window, GTK_TYPE_APPLICATION_WINDOW)
|
||||
|
||||
static void create_window (GApplication *app, const char *contents);
|
||||
@@ -428,7 +430,7 @@ demo_application_window_init (DemoApplicationWindow *window)
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (window));
|
||||
|
||||
popover = gtk_popover_menu_new_from_model (window->menubutton, window->toolmenu);
|
||||
popover = gtk_popover_menu_new_from_model (window->toolmenu);
|
||||
gtk_menu_button_set_popover (GTK_MENU_BUTTON (window->menubutton), popover);
|
||||
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (window),
|
||||
@@ -477,7 +479,7 @@ surface_state_changed (GtkWidget *widget)
|
||||
DemoApplicationWindow *window = (DemoApplicationWindow *)widget;
|
||||
GdkSurfaceState new_state;
|
||||
|
||||
new_state = gdk_surface_get_state (gtk_native_get_surface (GTK_NATIVE (widget)));
|
||||
new_state = gdk_toplevel_get_state (GDK_TOPLEVEL (gtk_native_get_surface (GTK_NATIVE (widget))));
|
||||
window->maximized = (new_state & GDK_SURFACE_STATE_MAXIMIZED) != 0;
|
||||
window->fullscreen = (new_state & GDK_SURFACE_STATE_FULLSCREEN) != 0;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
||||
<attribute name="action">app.quit</attribute>
|
||||
<attribute name="accel"><Primary>q</attribute>
|
||||
<attribute name="accel"><Control>q</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
|
||||
+18
-16
@@ -7,7 +7,6 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *assistant = NULL;
|
||||
static GtkWidget *progress_bar = NULL;
|
||||
|
||||
static gboolean
|
||||
@@ -27,8 +26,7 @@ apply_changes_gradually (gpointer data)
|
||||
else
|
||||
{
|
||||
/* Close automatically once changes are fully applied. */
|
||||
gtk_widget_destroy (assistant);
|
||||
assistant = NULL;
|
||||
gtk_widget_destroy (data);
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
||||
}
|
||||
@@ -37,16 +35,13 @@ static void
|
||||
on_assistant_apply (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
/* Start a timer to simulate changes taking a few seconds to apply. */
|
||||
g_timeout_add (100, apply_changes_gradually, NULL);
|
||||
g_timeout_add (100, apply_changes_gradually, widget);
|
||||
}
|
||||
|
||||
static void
|
||||
on_assistant_close_cancel (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
GtkWidget **assistant = (GtkWidget **) data;
|
||||
|
||||
gtk_widget_destroy (*assistant);
|
||||
*assistant = NULL;
|
||||
gtk_widget_destroy (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -94,7 +89,10 @@ create_page1 (GtkWidget *assistant)
|
||||
GtkWidget *box, *label, *entry;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
g_object_set (box, "margin", 12, NULL);
|
||||
gtk_widget_set_margin_start (box, 12);
|
||||
gtk_widget_set_margin_end (box, 12);
|
||||
gtk_widget_set_margin_top (box, 12);
|
||||
gtk_widget_set_margin_bottom (box, 12);
|
||||
|
||||
label = gtk_label_new ("You must fill out this entry to continue:");
|
||||
gtk_container_add (GTK_CONTAINER (box), label);
|
||||
@@ -117,7 +115,10 @@ create_page2 (GtkWidget *assistant)
|
||||
GtkWidget *box, *checkbutton;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 12);
|
||||
g_object_set (box, "margin", 12, NULL);
|
||||
gtk_widget_set_margin_start (box, 12);
|
||||
gtk_widget_set_margin_end (box, 12);
|
||||
gtk_widget_set_margin_top (box, 12);
|
||||
gtk_widget_set_margin_bottom (box, 12);
|
||||
|
||||
checkbutton = gtk_check_button_new_with_label ("This is optional data, you may continue "
|
||||
"even if you do not check this");
|
||||
@@ -167,6 +168,8 @@ create_page4 (GtkWidget *assistant)
|
||||
GtkWidget*
|
||||
do_assistant (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *assistant;
|
||||
|
||||
if (!assistant)
|
||||
{
|
||||
assistant = gtk_assistant_new ();
|
||||
@@ -175,6 +178,8 @@ do_assistant (GtkWidget *do_widget)
|
||||
|
||||
gtk_window_set_display (GTK_WINDOW (assistant),
|
||||
gtk_widget_get_display (do_widget));
|
||||
g_signal_connect (assistant, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &assistant);
|
||||
|
||||
create_page1 (assistant);
|
||||
create_page2 (assistant);
|
||||
@@ -182,9 +187,9 @@ do_assistant (GtkWidget *do_widget)
|
||||
create_page4 (assistant);
|
||||
|
||||
g_signal_connect (G_OBJECT (assistant), "cancel",
|
||||
G_CALLBACK (on_assistant_close_cancel), &assistant);
|
||||
G_CALLBACK (on_assistant_close_cancel), NULL);
|
||||
g_signal_connect (G_OBJECT (assistant), "close",
|
||||
G_CALLBACK (on_assistant_close_cancel), &assistant);
|
||||
G_CALLBACK (on_assistant_close_cancel), NULL);
|
||||
g_signal_connect (G_OBJECT (assistant), "apply",
|
||||
G_CALLBACK (on_assistant_apply), NULL);
|
||||
g_signal_connect (G_OBJECT (assistant), "prepare",
|
||||
@@ -194,10 +199,7 @@ do_assistant (GtkWidget *do_widget)
|
||||
if (!gtk_widget_get_visible (assistant))
|
||||
gtk_widget_show (assistant);
|
||||
else
|
||||
{
|
||||
gtk_widget_destroy (assistant);
|
||||
assistant = NULL;
|
||||
}
|
||||
gtk_widget_destroy (assistant);
|
||||
|
||||
return assistant;
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="min-content-width">150</property>
|
||||
|
||||
@@ -131,13 +131,11 @@ blur_overlay_child_update_style_classes (BlurOverlay *overlay,
|
||||
GtkAlign valign, halign;
|
||||
gboolean is_left, is_right, is_top, is_bottom;
|
||||
gboolean has_left, has_right, has_top, has_bottom;
|
||||
GtkStyleContext *context;
|
||||
|
||||
context = gtk_widget_get_style_context (child);
|
||||
has_left = gtk_style_context_has_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
has_right = gtk_style_context_has_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
has_top = gtk_style_context_has_class (context, GTK_STYLE_CLASS_TOP);
|
||||
has_bottom = gtk_style_context_has_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
has_left = gtk_widget_has_css_class (child, GTK_STYLE_CLASS_LEFT);
|
||||
has_right = gtk_widget_has_css_class (child, GTK_STYLE_CLASS_RIGHT);
|
||||
has_top = gtk_widget_has_css_class (child, GTK_STYLE_CLASS_TOP);
|
||||
has_bottom = gtk_widget_has_css_class (child, GTK_STYLE_CLASS_BOTTOM);
|
||||
|
||||
is_left = is_right = is_top = is_bottom = FALSE;
|
||||
|
||||
@@ -160,24 +158,24 @@ blur_overlay_child_update_style_classes (BlurOverlay *overlay,
|
||||
is_bottom = (child_allocation->y + child_allocation->height == height);
|
||||
|
||||
if (has_left && !is_left)
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
gtk_widget_remove_css_class (child, GTK_STYLE_CLASS_LEFT);
|
||||
else if (!has_left && is_left)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_LEFT);
|
||||
gtk_widget_add_css_class (child, GTK_STYLE_CLASS_LEFT);
|
||||
|
||||
if (has_right && !is_right)
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
gtk_widget_remove_css_class (child, GTK_STYLE_CLASS_RIGHT);
|
||||
else if (!has_right && is_right)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_RIGHT);
|
||||
gtk_widget_add_css_class (child, GTK_STYLE_CLASS_RIGHT);
|
||||
|
||||
if (has_top && !is_top)
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_TOP);
|
||||
gtk_widget_remove_css_class (child, GTK_STYLE_CLASS_TOP);
|
||||
else if (!has_top && is_top)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_TOP);
|
||||
gtk_widget_add_css_class (child, GTK_STYLE_CLASS_TOP);
|
||||
|
||||
if (has_bottom && !is_bottom)
|
||||
gtk_style_context_remove_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
gtk_widget_remove_css_class (child, GTK_STYLE_CLASS_BOTTOM);
|
||||
else if (!has_bottom && is_bottom)
|
||||
gtk_style_context_add_class (context, GTK_STYLE_CLASS_BOTTOM);
|
||||
gtk_widget_add_css_class (child, GTK_STYLE_CLASS_BOTTOM);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
+35
-45
@@ -15,7 +15,7 @@
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
void
|
||||
static void
|
||||
copy_button_clicked (GtkWidget *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
@@ -31,7 +31,7 @@ copy_button_clicked (GtkWidget *button,
|
||||
gdk_clipboard_set_text (clipboard, gtk_editable_get_text (GTK_EDITABLE (entry)));
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
paste_received (GObject *source_object,
|
||||
GAsyncResult *result,
|
||||
gpointer user_data)
|
||||
@@ -75,7 +75,7 @@ paste_received (GObject *source_object,
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
paste_button_clicked (GtkWidget *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
@@ -116,6 +116,9 @@ get_image_paintable (GtkImage *image)
|
||||
if (icon == NULL)
|
||||
return NULL;
|
||||
return GDK_PAINTABLE (icon);
|
||||
|
||||
case GTK_IMAGE_EMPTY:
|
||||
case GTK_IMAGE_GICON:
|
||||
default:
|
||||
g_warning ("Image storage type %d not handled",
|
||||
gtk_image_get_storage_type (image));
|
||||
@@ -152,43 +155,17 @@ prepare_drag (GtkDragSource *source,
|
||||
return gdk_content_provider_new_typed (GDK_TYPE_TEXTURE, paintable);
|
||||
}
|
||||
|
||||
static void
|
||||
got_texture (GObject *source,
|
||||
GAsyncResult *result,
|
||||
gpointer data)
|
||||
{
|
||||
GdkDrop *drop = GDK_DROP (source);
|
||||
GtkWidget *image = data;
|
||||
const GValue *value;
|
||||
GError *error = NULL;
|
||||
|
||||
value = gdk_drop_read_value_finish (drop, result, &error);
|
||||
if (value)
|
||||
{
|
||||
GdkTexture *texture = g_value_get_object (value);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (image), GDK_PAINTABLE (texture));
|
||||
}
|
||||
else
|
||||
{
|
||||
g_print ("Failed to get data: %s\n", error->message);
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
drag_drop (GtkDropTarget *dest,
|
||||
GdkDrop *drop,
|
||||
int x,
|
||||
int y,
|
||||
GtkWidget *widget)
|
||||
const GValue *value,
|
||||
double x,
|
||||
double y,
|
||||
GtkImage *image)
|
||||
{
|
||||
if (gdk_drop_has_value (drop, GDK_TYPE_TEXTURE))
|
||||
{
|
||||
gdk_drop_read_value_async (drop, GDK_TYPE_TEXTURE, G_PRIORITY_DEFAULT, NULL, got_texture, widget);
|
||||
return TRUE;
|
||||
}
|
||||
GdkTexture *texture = g_value_get_object (value);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (image), GDK_PAINTABLE (texture));
|
||||
|
||||
return FALSE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -248,7 +225,8 @@ pressed_cb (GtkGesture *gesture,
|
||||
item = g_menu_item_new (_("_Paste"), "clipboard.paste");
|
||||
g_menu_append_item (menu, item);
|
||||
|
||||
popover = gtk_popover_menu_new_from_model (image, G_MENU_MODEL (menu));
|
||||
popover = gtk_popover_menu_new_from_model (G_MENU_MODEL (menu));
|
||||
gtk_widget_set_parent (popover, image);
|
||||
|
||||
gtk_popover_set_pointing_to (GTK_POPOVER (popover), &(GdkRectangle) { x, y, 1, 1});
|
||||
gtk_popover_popup (GTK_POPOVER (popover));
|
||||
@@ -283,7 +261,10 @@ do_clipboard (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 8);
|
||||
gtk_widget_set_margin_end (vbox, 8);
|
||||
gtk_widget_set_margin_top (vbox, 8);
|
||||
gtk_widget_set_margin_bottom (vbox, 8);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
@@ -292,7 +273,10 @@ do_clipboard (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
g_object_set (hbox, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (hbox, 8);
|
||||
gtk_widget_set_margin_end (hbox, 8);
|
||||
gtk_widget_set_margin_top (hbox, 8);
|
||||
gtk_widget_set_margin_bottom (hbox, 8);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
/* Create the first entry */
|
||||
@@ -309,7 +293,10 @@ do_clipboard (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
g_object_set (hbox, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (hbox, 8);
|
||||
gtk_widget_set_margin_end (hbox, 8);
|
||||
gtk_widget_set_margin_top (hbox, 8);
|
||||
gtk_widget_set_margin_bottom (hbox, 8);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
/* Create the second entry */
|
||||
@@ -326,7 +313,10 @@ do_clipboard (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 4);
|
||||
g_object_set (hbox, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (hbox, 8);
|
||||
gtk_widget_set_margin_end (hbox, 8);
|
||||
gtk_widget_set_margin_top (hbox, 8);
|
||||
gtk_widget_set_margin_bottom (hbox, 8);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), hbox);
|
||||
|
||||
/* Create the first image */
|
||||
@@ -341,8 +331,8 @@ do_clipboard (GtkWidget *do_widget)
|
||||
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source));
|
||||
|
||||
/* accept drops on image */
|
||||
dest = gtk_drop_target_new (gdk_content_formats_new_for_gtype (GDK_TYPE_TEXTURE), GDK_ACTION_COPY);
|
||||
g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop), image);
|
||||
dest = gtk_drop_target_new (GDK_TYPE_TEXTURE, GDK_ACTION_COPY);
|
||||
g_signal_connect (dest, "drop", G_CALLBACK (drag_drop), image);
|
||||
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (dest));
|
||||
|
||||
/* context menu on image */
|
||||
@@ -370,8 +360,8 @@ do_clipboard (GtkWidget *do_widget)
|
||||
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source));
|
||||
|
||||
/* accept drops on image */
|
||||
dest = gtk_drop_target_new (gdk_content_formats_new_for_gtype (GDK_TYPE_TEXTURE), GDK_ACTION_COPY);
|
||||
g_signal_connect (dest, "drag-drop", G_CALLBACK (drag_drop), image);
|
||||
dest = gtk_drop_target_new (GDK_TYPE_TEXTURE, GDK_ACTION_COPY);
|
||||
g_signal_connect (dest, "drop", G_CALLBACK (drag_drop), image);
|
||||
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (dest));
|
||||
|
||||
/* context menu on image */
|
||||
|
||||
@@ -16,7 +16,7 @@ static GtkWidget *frame;
|
||||
/* draw callback for the drawing area
|
||||
*/
|
||||
static void
|
||||
draw_function (GtkDrawingArea *da,
|
||||
draw_function (GtkDrawingArea *drawing_area,
|
||||
cairo_t *cr,
|
||||
int width,
|
||||
int height,
|
||||
@@ -79,7 +79,10 @@ do_colorsel (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 12, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 12);
|
||||
gtk_widget_set_margin_end (vbox, 12);
|
||||
gtk_widget_set_margin_top (vbox, 12);
|
||||
gtk_widget_set_margin_bottom (vbox, 12);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
|
||||
+26
-10
@@ -19,7 +19,7 @@ enum
|
||||
static GtkTreeModel *
|
||||
create_icon_store (void)
|
||||
{
|
||||
const gchar *icon_names[6] = {
|
||||
const char *icon_names[6] = {
|
||||
"dialog-warning",
|
||||
"process-stop",
|
||||
"document-new",
|
||||
@@ -27,7 +27,7 @@ create_icon_store (void)
|
||||
NULL,
|
||||
"document-open"
|
||||
};
|
||||
const gchar *labels[6] = {
|
||||
const char *labels[6] = {
|
||||
N_("Warning"),
|
||||
N_("Stop"),
|
||||
N_("New"),
|
||||
@@ -111,8 +111,8 @@ static GtkTreeModel *
|
||||
create_capital_store (void)
|
||||
{
|
||||
struct {
|
||||
gchar *group;
|
||||
gchar *capital;
|
||||
const char *group;
|
||||
const char *capital;
|
||||
} capitals[] = {
|
||||
{ "A - B", NULL },
|
||||
{ NULL, "Albany" },
|
||||
@@ -234,7 +234,7 @@ typedef struct _MaskEntry MaskEntry;
|
||||
struct _MaskEntry
|
||||
{
|
||||
GtkEntry entry;
|
||||
gchar *mask;
|
||||
const char *mask;
|
||||
};
|
||||
|
||||
typedef struct _MaskEntryClass MaskEntryClass;
|
||||
@@ -246,6 +246,7 @@ struct _MaskEntryClass
|
||||
|
||||
static void mask_entry_editable_init (GtkEditableInterface *iface);
|
||||
|
||||
static GType mask_entry_get_type (void);
|
||||
G_DEFINE_TYPE_WITH_CODE (MaskEntry, mask_entry, GTK_TYPE_ENTRY,
|
||||
G_IMPLEMENT_INTERFACE (GTK_TYPE_EDITABLE,
|
||||
mask_entry_editable_init));
|
||||
@@ -319,7 +320,10 @@ do_combobox (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);
|
||||
g_object_set (vbox, "margin", 10, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 10);
|
||||
gtk_widget_set_margin_end (vbox, 10);
|
||||
gtk_widget_set_margin_top (vbox, 10);
|
||||
gtk_widget_set_margin_bottom (vbox, 10);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/* A combobox demonstrating cell renderers, separators and
|
||||
@@ -329,7 +333,10 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (box, 5);
|
||||
gtk_widget_set_margin_end (box, 5);
|
||||
gtk_widget_set_margin_top (box, 5);
|
||||
gtk_widget_set_margin_bottom (box, 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_icon_store ();
|
||||
@@ -370,7 +377,10 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (box, 5);
|
||||
gtk_widget_set_margin_end (box, 5);
|
||||
gtk_widget_set_margin_top (box, 5);
|
||||
gtk_widget_set_margin_bottom (box, 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
model = create_capital_store ();
|
||||
@@ -398,7 +408,10 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (box, 5);
|
||||
gtk_widget_set_margin_end (box, 5);
|
||||
gtk_widget_set_margin_top (box, 5);
|
||||
gtk_widget_set_margin_bottom (box, 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_text_new_with_entry ();
|
||||
@@ -416,7 +429,10 @@ do_combobox (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (box, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (box, 5);
|
||||
gtk_widget_set_margin_end (box, 5);
|
||||
gtk_widget_set_margin_top (box, 5);
|
||||
gtk_widget_set_margin_bottom (box, 5);
|
||||
gtk_container_add (GTK_CONTAINER (frame), box);
|
||||
|
||||
combo = gtk_combo_box_text_new ();
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
* These are the available blend modes.
|
||||
*/
|
||||
struct {
|
||||
gchar *name;
|
||||
gchar *id;
|
||||
const char *name;
|
||||
const char *id;
|
||||
} blend_modes[] =
|
||||
{
|
||||
{ "Color", "color" },
|
||||
|
||||
@@ -58,7 +58,7 @@ apply_css (GtkWidget *widget, GtkStyleProvider *provider)
|
||||
gtk_container_forall (GTK_CONTAINER (widget), (GtkCallback) apply_css, provider);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
static GtkWidget *
|
||||
create_toolbar (void)
|
||||
{
|
||||
GtkWidget *toolbar;
|
||||
|
||||
+148
-37
@@ -656,7 +656,10 @@
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">60</property>
|
||||
<property name="margin-start">60</property>
|
||||
<property name="margin-end">60</property>
|
||||
<property name="margin-top">60</property>
|
||||
<property name="margin-bottom">60</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="halign">center</property>
|
||||
<child>
|
||||
@@ -672,7 +675,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -729,7 +735,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -786,7 +795,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -856,7 +868,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -913,7 +928,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -970,7 +988,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1027,7 +1048,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1084,7 +1108,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1154,7 +1181,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1211,7 +1241,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1268,7 +1301,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1325,7 +1361,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1395,7 +1434,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1452,7 +1494,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1509,7 +1554,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1566,7 +1614,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1623,7 +1674,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1680,7 +1734,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1737,7 +1794,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1807,7 +1867,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1864,7 +1927,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1921,7 +1987,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -1978,7 +2047,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2035,7 +2107,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2092,7 +2167,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2149,7 +2227,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2206,7 +2287,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2263,7 +2347,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2320,7 +2407,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2377,7 +2467,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2434,7 +2527,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2491,7 +2587,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2548,7 +2647,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2605,7 +2707,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2675,7 +2780,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
@@ -2732,7 +2840,10 @@
|
||||
<property name="activatable">0</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
|
||||
@@ -104,6 +104,10 @@
|
||||
<file>gtkfishbowl.c</file>
|
||||
<file>gtkfishbowl.h</file>
|
||||
</gresource>
|
||||
<gresource prefix="/gears">
|
||||
<file>gtkgears.c</file>
|
||||
<file>gtkgears.h</file>
|
||||
</gresource>
|
||||
<gresource prefix="/iconscroll">
|
||||
<file>iconscroll.ui</file>
|
||||
</gresource>
|
||||
@@ -176,6 +180,7 @@
|
||||
<file>font_features.c</file>
|
||||
<file>fontplane.c</file>
|
||||
<file>fontrendering.c</file>
|
||||
<file>gears.c</file>
|
||||
<file>gestures.c</file>
|
||||
<file>glarea.c</file>
|
||||
<file>headerbar.c</file>
|
||||
@@ -199,9 +204,9 @@
|
||||
<file>paintable_mediastream.c</file>
|
||||
<file>panes.c</file>
|
||||
<file>password_entry.c</file>
|
||||
<file>peg_solitaire.c</file>
|
||||
<file>pickers.c</file>
|
||||
<file>pixbufs.c</file>
|
||||
<file>popover.c</file>
|
||||
<file>printing.c</file>
|
||||
<file>revealer.c</file>
|
||||
<file>rotated_text.c</file>
|
||||
@@ -209,6 +214,7 @@
|
||||
<file>search_entry.c</file>
|
||||
<file>search_entry2.c</file>
|
||||
<file>shortcuts.c</file>
|
||||
<file>shortcut_triggers.c</file>
|
||||
<file>sizegroup.c</file>
|
||||
<file>sidebar.c</file>
|
||||
<file>sliding_puzzle.c</file>
|
||||
@@ -238,9 +244,6 @@
|
||||
<file>messages.txt</file>
|
||||
<file>apple-red.png</file>
|
||||
</gresource>
|
||||
<gresource prefix="/popover">
|
||||
<file>popover.ui</file>
|
||||
</gresource>
|
||||
<gresource prefix="/glarea">
|
||||
<file>glarea-gl.fs.glsl</file>
|
||||
<file>glarea-gl.vs.glsl</file>
|
||||
|
||||
+10
-9
@@ -29,29 +29,29 @@
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_New</attribute>
|
||||
<attribute name="action">win.new</attribute>
|
||||
<attribute name="accel"><Primary>n</attribute>
|
||||
<attribute name="accel"><Control>n</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Open</attribute>
|
||||
<attribute name="action">win.open</attribute>
|
||||
<attribute name="accel"><Primary>o</attribute>
|
||||
<attribute name="accel"><Control>o</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Save</attribute>
|
||||
<attribute name="action">win.save</attribute>
|
||||
<attribute name="accel"><Primary>s</attribute>
|
||||
<attribute name="accel"><Control>s</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Save _As</attribute>
|
||||
<attribute name="action">win.save-as</attribute>
|
||||
<attribute name="accel"><Primary>q</attribute>
|
||||
<attribute name="accel"><Control>q</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
||||
<attribute name="action">win.quit</attribute>
|
||||
<attribute name="accel"><Primary><Shift>s</attribute>
|
||||
<attribute name="accel"><Control><Shift>s</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
@@ -61,17 +61,17 @@
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Copy</attribute>
|
||||
<attribute name="action">win.copy</attribute>
|
||||
<attribute name="accel"><Primary>c</attribute>
|
||||
<attribute name="accel"><Control>c</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Cut</attribute>
|
||||
<attribute name="action">win.cut</attribute>
|
||||
<attribute name="accel"><Primary>x</attribute>
|
||||
<attribute name="accel"><Control>x</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Paste</attribute>
|
||||
<attribute name="action">win.paste</attribute>
|
||||
<attribute name="accel"><Primary>v</attribute>
|
||||
<attribute name="accel"><Control>v</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
@@ -167,7 +167,8 @@
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="expand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="model">liststore1</property>
|
||||
|
||||
@@ -114,11 +114,17 @@ do_dialog (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
frame = gtk_frame_new ("Dialogs");
|
||||
g_object_set (frame, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (frame, 8);
|
||||
gtk_widget_set_margin_end (frame, 8);
|
||||
gtk_widget_set_margin_top (frame, 8);
|
||||
gtk_widget_set_margin_bottom (frame, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), frame);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 8);
|
||||
gtk_widget_set_margin_end (vbox, 8);
|
||||
gtk_widget_set_margin_top (vbox, 8);
|
||||
gtk_widget_set_margin_bottom (vbox, 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox);
|
||||
|
||||
/* Standard message dialog */
|
||||
|
||||
@@ -42,7 +42,7 @@ free_demo_widget (gpointer data)
|
||||
}
|
||||
|
||||
#define GTK_TYPE_DEMO_WIDGET (gtk_demo_widget_get_type ())
|
||||
|
||||
static GType gtk_demo_widget_get_type (void);
|
||||
G_DEFINE_BOXED_TYPE (GtkDemoWidget, gtk_demo_widget, copy_demo_widget, free_demo_widget)
|
||||
|
||||
static GtkDemoWidget *
|
||||
@@ -59,7 +59,7 @@ serialize_widget (GtkWidget *widget)
|
||||
}
|
||||
else if (GTK_IS_SPINNER (widget))
|
||||
{
|
||||
g_object_get (widget, "active", &demo->active, NULL);
|
||||
g_object_get (widget, "spinning", &demo->active, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -80,8 +80,8 @@ deserialize_widget (GtkDemoWidget *demo)
|
||||
}
|
||||
else if (demo->type == GTK_TYPE_SPINNER)
|
||||
{
|
||||
widget = g_object_new (demo->type, "active", demo->active, NULL);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "demo");
|
||||
widget = g_object_new (demo->type, "spinning", demo->active, NULL);
|
||||
gtk_widget_add_css_class (widget, "demo");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -114,7 +114,7 @@ new_spinner_cb (GtkWidget *button,
|
||||
GtkWidget *widget;
|
||||
|
||||
widget = gtk_spinner_new ();
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "demo");
|
||||
gtk_widget_add_css_class (widget, "demo");
|
||||
gtk_spinner_start (GTK_SPINNER (widget));
|
||||
gtk_fixed_put (fixed, widget, pos_x, pos_y);
|
||||
|
||||
@@ -240,8 +240,8 @@ edit_cb (GtkWidget *button, GtkWidget *child)
|
||||
{
|
||||
gboolean active;
|
||||
|
||||
g_object_get (child, "active", &active, NULL);
|
||||
g_object_set (child, "active", !active, NULL);
|
||||
g_object_get (child, "spinning", &active, NULL);
|
||||
g_object_set (child, "spinning", !active, NULL);
|
||||
}
|
||||
|
||||
if (button)
|
||||
@@ -271,7 +271,8 @@ pressed_cb (GtkGesture *gesture,
|
||||
pos_x = x;
|
||||
pos_y = y;
|
||||
|
||||
menu = gtk_popover_new (widget);
|
||||
menu = gtk_popover_new ();
|
||||
gtk_widget_set_parent (menu, widget);
|
||||
gtk_popover_set_has_arrow (GTK_POPOVER (menu), FALSE);
|
||||
gtk_popover_set_pointing_to (GTK_POPOVER (menu), &(GdkRectangle){ x, y, 1, 1});
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
|
||||
@@ -198,7 +198,10 @@ do_drawingarea (GtkWidget *do_widget)
|
||||
G_CALLBACK (close_window), NULL);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 16, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 16);
|
||||
gtk_widget_set_margin_end (vbox, 16);
|
||||
gtk_widget_set_margin_top (vbox, 16);
|
||||
gtk_widget_set_margin_bottom (vbox, 16);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
/*
|
||||
|
||||
@@ -275,6 +275,9 @@ cell_edited (GtkCellRendererText *cell,
|
||||
g_array_index (articles, Item, i).product, -1);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
@@ -353,7 +356,10 @@ do_editable_cells (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 5);
|
||||
gtk_widget_set_margin_end (vbox, 5);
|
||||
gtk_widget_set_margin_top (vbox, 5);
|
||||
gtk_widget_set_margin_bottom (vbox, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (vbox),
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
/* Creates a tree model containing the completions */
|
||||
GtkTreeModel *
|
||||
static GtkTreeModel *
|
||||
create_completion_model (void)
|
||||
{
|
||||
GtkListStore *store;
|
||||
@@ -55,7 +55,10 @@ do_entry_completion (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 5);
|
||||
gtk_widget_set_margin_end (vbox, 5);
|
||||
gtk_widget_set_margin_top (vbox, 5);
|
||||
gtk_widget_set_margin_bottom (vbox, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
||||
@@ -29,7 +29,10 @@ do_entry_undo (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 5);
|
||||
gtk_widget_set_margin_end (vbox, 5);
|
||||
gtk_widget_set_margin_top (vbox, 5);
|
||||
gtk_widget_set_margin_bottom (vbox, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
|
||||
@@ -31,7 +31,10 @@
|
||||
<property name="title" translatable="yes">Filter Model</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="column-homogeneous">1</property>
|
||||
@@ -53,7 +56,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="model">liststore1</property>
|
||||
<property name="headers-clickable">0</property>
|
||||
<child internal-child="selection">
|
||||
@@ -92,7 +94,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview2">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="headers-clickable">0</property>
|
||||
<property name="search-column">0</property>
|
||||
<child internal-child="selection">
|
||||
@@ -175,7 +176,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview3">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="headers-clickable">0</property>
|
||||
<property name="search-column">0</property>
|
||||
<child internal-child="selection">
|
||||
|
||||
@@ -37,6 +37,7 @@ get_random_icon_name (GtkIconTheme *theme)
|
||||
return icon_names[g_random_int_range(0, n_icon_names)];
|
||||
}
|
||||
|
||||
/* Can't be static because it's also used in iconscroll.c */
|
||||
GtkWidget *
|
||||
create_icon (void)
|
||||
{
|
||||
@@ -61,7 +62,7 @@ create_blurred_button (void)
|
||||
{
|
||||
GtkWidget *w = gtk_button_new ();
|
||||
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (w), "blurred-button");
|
||||
gtk_widget_add_css_class (w, "blurred-button");
|
||||
|
||||
return w;
|
||||
}
|
||||
@@ -158,7 +159,7 @@ static GtkWidget *
|
||||
create_menu_button (void)
|
||||
{
|
||||
GtkWidget *w = gtk_menu_button_new ();
|
||||
GtkWidget *popover = gtk_popover_new (NULL);
|
||||
GtkWidget *popover = gtk_popover_new ();
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (popover), gtk_button_new_with_label ("Hey!"));
|
||||
gtk_popover_set_autohide (GTK_POPOVER (popover), FALSE);
|
||||
|
||||
@@ -52,7 +52,7 @@ create_faces (void)
|
||||
/* Add a face */
|
||||
faces[i].face = gtk_frame_new (NULL);
|
||||
gtk_widget_set_size_request (faces[i].face, face_size, face_size);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (faces[i].face), faces[i].css_class);
|
||||
gtk_widget_add_css_class (faces[i].face, faces[i].css_class);
|
||||
gtk_container_add (GTK_CONTAINER (fixed), faces[i].face);
|
||||
|
||||
/* Set up the transformation for each face */
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
<property name="title">Font Explorer</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="reset">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="tooltip-text">Reset</property>
|
||||
<signal name="clicked" handler="font_features_reset_features" swapped="no"/>
|
||||
@@ -27,18 +26,19 @@
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkFontButton" id="font">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="font">Sans 12</property>
|
||||
<property name="level">family|style|size|variations|features</property>
|
||||
@@ -61,7 +61,6 @@
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="script_lang">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="margin-top">10</property>
|
||||
<signal name="changed" handler="font_features_script_changed" swapped="no"/>
|
||||
<child>
|
||||
@@ -109,7 +108,10 @@
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="spacing">20</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
|
||||
#define MAKE_TAG(a,b,c,d) (unsigned int)(((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
|
||||
|
||||
static GtkWidget *label;
|
||||
static GtkWidget *the_label;
|
||||
static GtkWidget *settings;
|
||||
static GtkWidget *description;
|
||||
static GtkWidget *font;
|
||||
static GtkWidget *script_lang;
|
||||
static GtkWidget *resetbutton;
|
||||
static GtkWidget *stack;
|
||||
static GtkWidget *entry;
|
||||
static GtkWidget *the_entry;
|
||||
static GtkWidget *variations_heading;
|
||||
static GtkWidget *variations_grid;
|
||||
static GtkWidget *instance_combo;
|
||||
@@ -301,9 +301,9 @@ update_display (void)
|
||||
char *font_desc;
|
||||
char *features;
|
||||
|
||||
text = gtk_editable_get_text (GTK_EDITABLE (entry));
|
||||
text = gtk_editable_get_text (GTK_EDITABLE (the_entry));
|
||||
|
||||
if (gtk_label_get_selection_bounds (GTK_LABEL (label), &ins, &bound))
|
||||
if (gtk_label_get_selection_bounds (GTK_LABEL (the_label), &ins, &bound))
|
||||
{
|
||||
start = g_utf8_offset_to_pointer (text, ins) - text;
|
||||
end = g_utf8_offset_to_pointer (text, bound) - text;
|
||||
@@ -409,8 +409,8 @@ update_display (void)
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (description), font_desc);
|
||||
gtk_label_set_text (GTK_LABEL (settings), features);
|
||||
gtk_label_set_text (GTK_LABEL (label), text);
|
||||
gtk_label_set_attributes (GTK_LABEL (label), attrs);
|
||||
gtk_label_set_text (GTK_LABEL (the_label), text);
|
||||
gtk_label_set_attributes (GTK_LABEL (the_label), attrs);
|
||||
|
||||
g_free (font_desc);
|
||||
pango_font_description_free (desc);
|
||||
@@ -548,7 +548,7 @@ update_script_combo (void)
|
||||
{
|
||||
const char *langname;
|
||||
char langbuf[5];
|
||||
GtkTreeIter iter;
|
||||
GtkTreeIter tree_iter;
|
||||
|
||||
if (pair->lang_tag == HB_OT_TAG_DEFAULT_LANGUAGE)
|
||||
langname = NC_("Language", "Default");
|
||||
@@ -563,7 +563,7 @@ update_script_combo (void)
|
||||
}
|
||||
}
|
||||
|
||||
gtk_list_store_insert_with_values (store, &iter, -1,
|
||||
gtk_list_store_insert_with_values (store, &tree_iter, -1,
|
||||
0, langname,
|
||||
1, pair->script_index,
|
||||
2, pair->lang_index,
|
||||
@@ -572,7 +572,7 @@ update_script_combo (void)
|
||||
if (pair->lang_tag == active)
|
||||
{
|
||||
have_active = TRUE;
|
||||
active_iter = iter;
|
||||
active_iter = tree_iter;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -751,7 +751,7 @@ add_font_variations (GString *s)
|
||||
GHashTableIter iter;
|
||||
Axis *axis;
|
||||
char buf[G_ASCII_DTOSTR_BUF_SIZE];
|
||||
char *sep = "";
|
||||
const char *sep = "";
|
||||
|
||||
g_hash_table_iter_init (&iter, axes);
|
||||
while (g_hash_table_iter_next (&iter, (gpointer *)NULL, (gpointer *)&axis))
|
||||
@@ -1129,7 +1129,7 @@ font_features_reset_features (void)
|
||||
{
|
||||
GList *l;
|
||||
|
||||
gtk_label_select_region (GTK_LABEL (label), 0, 0);
|
||||
gtk_label_select_region (GTK_LABEL (the_label), 0, 0);
|
||||
|
||||
g_list_free_full (ranges, free_range);
|
||||
ranges = NULL;
|
||||
@@ -1156,9 +1156,9 @@ static char *text;
|
||||
static void
|
||||
switch_to_entry (void)
|
||||
{
|
||||
text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (entry)));
|
||||
text = g_strdup (gtk_editable_get_text (GTK_EDITABLE (the_entry)));
|
||||
gtk_stack_set_visible_child_name (GTK_STACK (stack), "entry");
|
||||
gtk_widget_grab_focus (entry);
|
||||
gtk_widget_grab_focus (the_entry);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1217,20 +1217,20 @@ do_font_features (GtkWidget *do_widget)
|
||||
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
feature_list = GTK_WIDGET (gtk_builder_get_object (builder, "feature_list"));
|
||||
label = GTK_WIDGET (gtk_builder_get_object (builder, "label"));
|
||||
the_label = GTK_WIDGET (gtk_builder_get_object (builder, "label"));
|
||||
settings = GTK_WIDGET (gtk_builder_get_object (builder, "settings"));
|
||||
description = GTK_WIDGET (gtk_builder_get_object (builder, "description"));
|
||||
resetbutton = GTK_WIDGET (gtk_builder_get_object (builder, "reset"));
|
||||
font = GTK_WIDGET (gtk_builder_get_object (builder, "font"));
|
||||
script_lang = GTK_WIDGET (gtk_builder_get_object (builder, "script_lang"));
|
||||
stack = GTK_WIDGET (gtk_builder_get_object (builder, "stack"));
|
||||
entry = GTK_WIDGET (gtk_builder_get_object (builder, "entry"));
|
||||
the_entry = GTK_WIDGET (gtk_builder_get_object (builder, "entry"));
|
||||
edit_toggle = GTK_WIDGET (gtk_builder_get_object (builder, "edit_toggle"));
|
||||
|
||||
controller = gtk_event_controller_key_new ();
|
||||
g_object_set_data_full (G_OBJECT (entry), "controller", g_object_ref (controller), g_object_unref);
|
||||
g_signal_connect (controller, "key-pressed", G_CALLBACK (entry_key_press), entry);
|
||||
gtk_widget_add_controller (entry, controller);
|
||||
g_object_set_data_full (G_OBJECT (the_entry), "controller", g_object_ref (controller), g_object_unref);
|
||||
g_signal_connect (controller, "key-pressed", G_CALLBACK (entry_key_press), the_entry);
|
||||
gtk_widget_add_controller (the_entry, controller);
|
||||
|
||||
add_check_group (feature_list, _("Kerning"), (const char *[]){ "kern", NULL });
|
||||
add_check_group (feature_list, _("Ligatures"), (const char *[]){ "liga",
|
||||
|
||||
@@ -140,17 +140,6 @@ update_value (GtkFontPlane *plane,
|
||||
gtk_widget_queue_draw (widget);
|
||||
}
|
||||
|
||||
static void
|
||||
hold_action (GtkGestureLongPress *gesture,
|
||||
gdouble x,
|
||||
gdouble y,
|
||||
GtkFontPlane *plane)
|
||||
{
|
||||
gboolean handled;
|
||||
|
||||
g_signal_emit_by_name (plane, "popup-menu", &handled);
|
||||
}
|
||||
|
||||
static void
|
||||
plane_drag_gesture_begin (GtkGestureDrag *gesture,
|
||||
gdouble start_x,
|
||||
@@ -161,13 +150,6 @@ plane_drag_gesture_begin (GtkGestureDrag *gesture,
|
||||
|
||||
button = gtk_gesture_single_get_current_button (GTK_GESTURE_SINGLE (gesture));
|
||||
|
||||
if (button == GDK_BUTTON_SECONDARY)
|
||||
{
|
||||
gboolean handled;
|
||||
|
||||
g_signal_emit_by_name (plane, "popup-menu", &handled);
|
||||
}
|
||||
|
||||
if (button != GDK_BUTTON_PRIMARY)
|
||||
{
|
||||
gtk_gesture_set_state (GTK_GESTURE (gesture), GTK_EVENT_SEQUENCE_DENIED);
|
||||
@@ -207,8 +189,6 @@ gtk_font_plane_init (GtkFontPlane *plane)
|
||||
{
|
||||
GtkGesture *gesture;
|
||||
|
||||
gtk_widget_set_can_focus (GTK_WIDGET (plane), TRUE);
|
||||
|
||||
gesture = gtk_gesture_drag_new ();
|
||||
g_signal_connect (gesture, "drag-begin",
|
||||
G_CALLBACK (plane_drag_gesture_begin), plane);
|
||||
@@ -218,13 +198,6 @@ gtk_font_plane_init (GtkFontPlane *plane)
|
||||
G_CALLBACK (plane_drag_gesture_end), plane);
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), 0);
|
||||
gtk_widget_add_controller (GTK_WIDGET (plane), GTK_EVENT_CONTROLLER (gesture));
|
||||
|
||||
gesture = gtk_gesture_long_press_new ();
|
||||
g_signal_connect (gesture, "pressed",
|
||||
G_CALLBACK (hold_action), plane);
|
||||
gtk_gesture_single_set_touch_only (GTK_GESTURE_SINGLE (gesture),
|
||||
TRUE);
|
||||
gtk_widget_add_controller (GTK_WIDGET (plane), GTK_EVENT_CONTROLLER (gesture));
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
@@ -43,7 +43,6 @@ update_image (void)
|
||||
cairo_font_options_t *fopt;
|
||||
cairo_hint_style_t hintstyle;
|
||||
cairo_hint_metrics_t hintmetrics;
|
||||
int i;
|
||||
|
||||
if (!context)
|
||||
context = gtk_widget_create_pango_context (image);
|
||||
@@ -116,6 +115,7 @@ update_image (void)
|
||||
|
||||
if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (show_grid)))
|
||||
{
|
||||
int i;
|
||||
cairo_set_source_rgba (cr, 0.2, 0, 0, 0.2);
|
||||
for (i = 1; i < ink.height + 20; i++)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,137 @@
|
||||
/* OpenGL/Gears
|
||||
*
|
||||
* This is a classic OpenGL demo, running in a GtkGLArea.
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "gtkgears.h"
|
||||
|
||||
/************************************************************************
|
||||
* DEMO CODE *
|
||||
************************************************************************/
|
||||
|
||||
static void
|
||||
on_axis_value_change (GtkAdjustment *adjustment,
|
||||
gpointer data)
|
||||
{
|
||||
GtkGears *gears = GTK_GEARS (data);
|
||||
int axis = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (adjustment), "axis"));
|
||||
|
||||
gtk_gears_set_axis (gears, axis, gtk_adjustment_get_value (adjustment));
|
||||
}
|
||||
|
||||
|
||||
static GtkWidget *
|
||||
create_axis_slider (GtkGears *gears,
|
||||
int axis)
|
||||
{
|
||||
GtkWidget *box, *label, *slider;
|
||||
GtkAdjustment *adj;
|
||||
const char *text;
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
|
||||
|
||||
switch (axis)
|
||||
{
|
||||
case GTK_GEARS_X_AXIS:
|
||||
text = "X";
|
||||
break;
|
||||
|
||||
case GTK_GEARS_Y_AXIS:
|
||||
text = "Y";
|
||||
break;
|
||||
|
||||
case GTK_GEARS_Z_AXIS:
|
||||
text = "Z";
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
|
||||
label = gtk_label_new (text);
|
||||
gtk_container_add (GTK_CONTAINER (box), label);
|
||||
gtk_widget_show (label);
|
||||
|
||||
adj = gtk_adjustment_new (gtk_gears_get_axis (gears, axis), 0.0, 360.0, 1.0, 12.0, 0.0);
|
||||
g_object_set_data (G_OBJECT (adj), "axis", GINT_TO_POINTER (axis));
|
||||
g_signal_connect (adj, "value-changed",
|
||||
G_CALLBACK (on_axis_value_change),
|
||||
gears);
|
||||
slider = gtk_scale_new (GTK_ORIENTATION_VERTICAL, adj);
|
||||
gtk_scale_set_draw_value (GTK_SCALE (slider), FALSE);
|
||||
gtk_container_add (GTK_CONTAINER (box), slider);
|
||||
gtk_widget_set_vexpand (slider, TRUE);
|
||||
gtk_widget_show (slider);
|
||||
|
||||
gtk_widget_show (box);
|
||||
|
||||
return box;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_gears (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *box, *hbox, *fps_label, *gears, *overlay, *frame;
|
||||
int i;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Gears");
|
||||
gtk_window_set_resizable (GTK_WINDOW (window), TRUE);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 640, 640);
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
overlay = gtk_overlay_new ();
|
||||
gtk_widget_set_margin_start (overlay, 12);
|
||||
gtk_widget_set_margin_end (overlay, 12);
|
||||
gtk_widget_set_margin_top (overlay, 12);
|
||||
gtk_widget_set_margin_bottom (overlay, 12);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (window), overlay);
|
||||
|
||||
frame = gtk_frame_new (NULL);
|
||||
gtk_widget_set_halign (frame, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (frame, GTK_ALIGN_START);
|
||||
gtk_widget_add_css_class (frame, "app-notification");
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), frame);
|
||||
|
||||
fps_label = gtk_label_new ("");
|
||||
gtk_widget_set_halign (fps_label, GTK_ALIGN_START);
|
||||
gtk_container_add (GTK_CONTAINER (frame), fps_label);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
|
||||
gtk_box_set_spacing (GTK_BOX (box), 6);
|
||||
gtk_container_add (GTK_CONTAINER (overlay), box);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE);
|
||||
gtk_box_set_spacing (GTK_BOX (box), 6);
|
||||
gtk_container_add (GTK_CONTAINER (box), hbox);
|
||||
|
||||
gears = gtk_gears_new ();
|
||||
gtk_widget_set_hexpand (gears, TRUE);
|
||||
gtk_widget_set_vexpand (gears, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (hbox), gears);
|
||||
|
||||
for (i = 0; i < GTK_GEARS_N_AXIS; i++)
|
||||
gtk_container_add (GTK_CONTAINER (hbox), create_axis_slider (GTK_GEARS (gears), i));
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, FALSE);
|
||||
gtk_box_set_spacing (GTK_BOX (hbox), 6);
|
||||
gtk_container_add (GTK_CONTAINER (box), hbox);
|
||||
|
||||
gtk_gears_set_fps_label (GTK_GEARS (gears), GTK_LABEL (fps_label));
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -17,9 +17,9 @@ typedef struct _Demo Demo;
|
||||
|
||||
struct _Demo
|
||||
{
|
||||
gchar *name;
|
||||
gchar *title;
|
||||
gchar *filename;
|
||||
const char *name;
|
||||
const char *title;
|
||||
const char *filename;
|
||||
GDoDemoFunc func;
|
||||
Demo *children;
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* OpenGL Area
|
||||
/* OpenGL/OpenGL Area
|
||||
*
|
||||
* GtkGLArea is a widget that allows custom drawing using OpenGL calls.
|
||||
*/
|
||||
@@ -383,7 +383,7 @@ close_window (GtkWidget *widget)
|
||||
rotation_angles[Z_AXIS] = 0.0;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
static GtkWidget *
|
||||
create_glarea_window (GtkWidget *do_widget)
|
||||
{
|
||||
GtkWidget *window, *box, *button, *controls;
|
||||
@@ -396,7 +396,10 @@ create_glarea_window (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (close_window), NULL);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, FALSE);
|
||||
g_object_set (box, "margin", 12, NULL);
|
||||
gtk_widget_set_margin_start (box, 12);
|
||||
gtk_widget_set_margin_end (box, 12);
|
||||
gtk_widget_set_margin_top (box, 12);
|
||||
gtk_widget_set_margin_bottom (box, 12);
|
||||
gtk_box_set_spacing (GTK_BOX (box), 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ do_headerbar (GtkWidget *do_widget)
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (box), "linked");
|
||||
gtk_widget_add_css_class (box, "linked");
|
||||
button = gtk_button_new ();
|
||||
gtk_container_add (GTK_CONTAINER (button), gtk_image_new_from_icon_name ("pan-start-symbolic"));
|
||||
gtk_container_add (GTK_CONTAINER (box), button);
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
static void
|
||||
insert_link (GtkTextBuffer *buffer,
|
||||
GtkTextIter *iter,
|
||||
gchar *text,
|
||||
const char *text,
|
||||
gint page)
|
||||
{
|
||||
GtkTextTag *tag;
|
||||
|
||||
@@ -52,7 +52,10 @@ populate_icons (void)
|
||||
|
||||
grid = gtk_grid_new ();
|
||||
gtk_widget_set_halign (grid, GTK_ALIGN_CENTER);
|
||||
g_object_set (grid, "margin", 10, NULL);
|
||||
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);
|
||||
|
||||
|
||||
@@ -342,7 +342,10 @@ do_images (GtkWidget *do_widget)
|
||||
G_CALLBACK (cleanup_callback), NULL);
|
||||
|
||||
base_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (base_vbox, "margin", 16, NULL);
|
||||
gtk_widget_set_margin_start (base_vbox, 16);
|
||||
gtk_widget_set_margin_end (base_vbox, 16);
|
||||
gtk_widget_set_margin_top (base_vbox, 16);
|
||||
gtk_widget_set_margin_bottom (base_vbox, 16);
|
||||
gtk_container_add (GTK_CONTAINER (window), base_vbox);
|
||||
|
||||
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 16);
|
||||
|
||||
@@ -61,7 +61,10 @@ do_infobar (GtkWidget *do_widget)
|
||||
g_signal_connect (window, "destroy", G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 8);
|
||||
gtk_widget_set_margin_end (vbox, 8);
|
||||
gtk_widget_set_margin_top (vbox, 8);
|
||||
gtk_widget_set_margin_bottom (vbox, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
bar = gtk_info_bar_new ();
|
||||
@@ -134,7 +137,10 @@ do_infobar (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox2, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (vbox2, 8);
|
||||
gtk_widget_set_margin_end (vbox2, 8);
|
||||
gtk_widget_set_margin_top (vbox2, 8);
|
||||
gtk_widget_set_margin_bottom (vbox2, 8);
|
||||
gtk_container_add (GTK_CONTAINER (frame), vbox2);
|
||||
|
||||
/* Standard message dialog */
|
||||
|
||||
+19
-18
@@ -16,10 +16,9 @@ typedef struct
|
||||
{
|
||||
const gboolean fixed;
|
||||
const guint number;
|
||||
const gchar *severity;
|
||||
const gchar *description;
|
||||
}
|
||||
Bug;
|
||||
const char *severity;
|
||||
const char *description;
|
||||
} Bug;
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -34,7 +33,7 @@ enum
|
||||
NUM_COLUMNS
|
||||
};
|
||||
|
||||
static Bug data[] =
|
||||
static Bug bugs[] =
|
||||
{
|
||||
{ FALSE, 60482, "Normal", "scrollable notebooks and hidden tabs" },
|
||||
{ FALSE, 60620, "Critical", "gdk_surface_clear_area (gdksurface-win32.c) is not thread-safe" },
|
||||
@@ -98,9 +97,9 @@ create_model (void)
|
||||
G_TYPE_BOOLEAN);
|
||||
|
||||
/* add data to the list store */
|
||||
for (i = 0; i < G_N_ELEMENTS (data); i++)
|
||||
for (i = 0; i < G_N_ELEMENTS (bugs); i++)
|
||||
{
|
||||
gchar *icon_name;
|
||||
const char *icon_name;
|
||||
gboolean sensitive;
|
||||
|
||||
if (i == 1 || i == 3)
|
||||
@@ -113,10 +112,10 @@ create_model (void)
|
||||
sensitive = TRUE;
|
||||
gtk_list_store_append (store, &iter);
|
||||
gtk_list_store_set (store, &iter,
|
||||
COLUMN_FIXED, data[i].fixed,
|
||||
COLUMN_NUMBER, data[i].number,
|
||||
COLUMN_SEVERITY, data[i].severity,
|
||||
COLUMN_DESCRIPTION, data[i].description,
|
||||
COLUMN_FIXED, bugs[i].fixed,
|
||||
COLUMN_NUMBER, bugs[i].number,
|
||||
COLUMN_SEVERITY, bugs[i].severity,
|
||||
COLUMN_DESCRIPTION, bugs[i].description,
|
||||
COLUMN_PULSE, 0,
|
||||
COLUMN_ICON, icon_name,
|
||||
COLUMN_ACTIVE, FALSE,
|
||||
@@ -129,23 +128,23 @@ create_model (void)
|
||||
|
||||
static void
|
||||
fixed_toggled (GtkCellRendererToggle *cell,
|
||||
gchar *path_str,
|
||||
char *path_str,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model = (GtkTreeModel *)data;
|
||||
GtkTreeModel *tree_model = (GtkTreeModel *)data;
|
||||
GtkTreeIter iter;
|
||||
GtkTreePath *path = gtk_tree_path_new_from_string (path_str);
|
||||
gboolean fixed;
|
||||
|
||||
/* get toggled iter */
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
gtk_tree_model_get (model, &iter, COLUMN_FIXED, &fixed, -1);
|
||||
gtk_tree_model_get_iter (tree_model, &iter, path);
|
||||
gtk_tree_model_get (tree_model, &iter, COLUMN_FIXED, &fixed, -1);
|
||||
|
||||
/* do something with the value */
|
||||
fixed ^= 1;
|
||||
|
||||
/* set new value */
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter, COLUMN_FIXED, fixed, -1);
|
||||
gtk_list_store_set (GTK_LIST_STORE (tree_model), &iter, COLUMN_FIXED, fixed, -1);
|
||||
|
||||
/* clean up */
|
||||
gtk_tree_path_free (path);
|
||||
@@ -156,7 +155,6 @@ add_columns (GtkTreeView *treeview)
|
||||
{
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
|
||||
|
||||
/* column for fixed toggles */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
@@ -264,7 +262,10 @@ do_list_store (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 8);
|
||||
gtk_widget_set_margin_end (vbox, 8);
|
||||
gtk_widget_set_margin_top (vbox, 8);
|
||||
gtk_widget_set_margin_bottom (vbox, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new ("This is the bug list (note: not based on real data, it would be nice to have a nice ODBC interface to bugzilla or so, though).");
|
||||
|
||||
@@ -38,7 +38,6 @@
|
||||
<property name="baseline-position">top</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button2">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="valign">baseline</property>
|
||||
<property name="relief">none</property>
|
||||
@@ -109,7 +108,6 @@
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="resent_by_button">
|
||||
<property name="label" translatable="0">reshareer</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<property name="uri">http://www.gtk.org</property>
|
||||
@@ -127,7 +125,6 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="expand_button">
|
||||
<property name="label" translatable="yes">Expand</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<signal name="clicked" handler="expand_clicked" swapped="yes"/>
|
||||
@@ -140,7 +137,6 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="reply-button">
|
||||
<property name="label" translatable="yes">Reply</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
</object>
|
||||
@@ -148,7 +144,6 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="reshare-button">
|
||||
<property name="label" translatable="yes">Reshare</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<signal name="clicked" handler="reshare_clicked" swapped="yes"/>
|
||||
@@ -157,7 +152,6 @@
|
||||
<child>
|
||||
<object class="GtkButton" id="favorite-buttton">
|
||||
<property name="label" translatable="yes">Favorite</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<signal name="clicked" handler="favorite_clicked" swapped="yes"/>
|
||||
@@ -165,7 +159,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="more-button">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="menu-model">menu1</property>
|
||||
<property name="relief">none</property>
|
||||
@@ -231,7 +224,6 @@ FAVORITES</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button5">
|
||||
<property name="label" translatable="yes">Details</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="relief">none</property>
|
||||
<style>
|
||||
|
||||
+14
-12
@@ -205,14 +205,14 @@ enum {
|
||||
STATE_IN_COMMENT
|
||||
};
|
||||
|
||||
static gchar *tokens[] =
|
||||
static const char *tokens[] =
|
||||
{
|
||||
"/*",
|
||||
"\"",
|
||||
NULL
|
||||
};
|
||||
|
||||
static gchar *types[] =
|
||||
static const char *types[] =
|
||||
{
|
||||
"static",
|
||||
"const ",
|
||||
@@ -310,7 +310,6 @@ static gchar *types[] =
|
||||
"GtkIconView ",
|
||||
"GtkCellRendererText ",
|
||||
"GtkContainer ",
|
||||
"GtkAccelGroup ",
|
||||
"GtkPaned ",
|
||||
"GtkPrintOperation ",
|
||||
"GtkPrintContext ",
|
||||
@@ -337,7 +336,7 @@ static gchar *types[] =
|
||||
NULL
|
||||
};
|
||||
|
||||
static gchar *control[] =
|
||||
static const char *control[] =
|
||||
{
|
||||
" if ",
|
||||
" while ",
|
||||
@@ -351,11 +350,11 @@ static gchar *control[] =
|
||||
NULL
|
||||
};
|
||||
void
|
||||
parse_chars (gchar *text,
|
||||
gchar **end_ptr,
|
||||
gint *state,
|
||||
gchar **tag,
|
||||
gboolean start)
|
||||
parse_chars (gchar *text,
|
||||
gchar **end_ptr,
|
||||
gint *state,
|
||||
const char **tag,
|
||||
gboolean start)
|
||||
{
|
||||
gint i;
|
||||
gchar *next_token;
|
||||
@@ -494,7 +493,7 @@ fontify (GtkTextBuffer *source_buffer)
|
||||
gint state;
|
||||
gchar *text;
|
||||
gchar *start_ptr, *end_ptr;
|
||||
gchar *tag;
|
||||
const char *tag;
|
||||
|
||||
gtk_text_buffer_create_tag (source_buffer, "source",
|
||||
"font", "monospace",
|
||||
@@ -868,7 +867,7 @@ load_file (const gchar *demoname,
|
||||
|
||||
p = lines[i];
|
||||
state++;
|
||||
/* Fall through */
|
||||
G_GNUC_FALLTHROUGH;
|
||||
|
||||
case 3:
|
||||
/* Reading program body */
|
||||
@@ -876,6 +875,9 @@ load_file (const gchar *demoname,
|
||||
if (lines[i+1] != NULL)
|
||||
gtk_text_buffer_insert (source_buffer, &start, "\n", 1);
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -975,7 +977,7 @@ startup (GApplication *app)
|
||||
{
|
||||
GtkBuilder *builder;
|
||||
GMenuModel *appmenu;
|
||||
gchar *ids[] = { "appmenu", NULL };
|
||||
const char *ids[] = { "appmenu", NULL };
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_objects_from_resource (builder, "/ui/appmenu.ui", ids, NULL);
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="valign">center</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="action-name">win.run</property>
|
||||
<style>
|
||||
<class name="text-button"/>
|
||||
@@ -62,12 +61,10 @@
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="width-request">120</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="min-content-width">150</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="model">treestore</property>
|
||||
<property name="headers-visible">0</property>
|
||||
<child internal-child="selection">
|
||||
@@ -99,20 +96,18 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="scrollable">1</property>
|
||||
<property name="enable-popup">1</property>
|
||||
<property name="show-border">0</property>
|
||||
<property name="expand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="tab-expand">1</property>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="can-focus">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="info-textview">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="left-margin">20</property>
|
||||
<property name="right-margin">20</property>
|
||||
<property name="top-margin">20</property>
|
||||
@@ -140,10 +135,8 @@
|
||||
<property name="tab-expand">1</property>
|
||||
<property name="child">
|
||||
<object class="GtkScrolledWindow" id="source-scrolledwindow">
|
||||
<property name="can-focus">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="source-textview">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="left-margin">20</property>
|
||||
<property name="right-margin">20</property>
|
||||
<property name="top-margin">20</property>
|
||||
|
||||
@@ -78,7 +78,7 @@ do_markup (GtkWidget *do_widget)
|
||||
|
||||
view = gtk_text_view_new ();
|
||||
gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE);
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD);
|
||||
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (view), GTK_WRAP_WORD_CHAR);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (view), 10);
|
||||
gtk_text_view_set_right_margin (GTK_TEXT_VIEW (view), 10);
|
||||
|
||||
|
||||
@@ -14,3 +14,7 @@ Superscripts and subscripts: 𝜀<span rise="-6000" size="x-small" font_desc="it
|
||||
OpenType font features: <span font_desc="sans regular" font_features="dlig=0">feast</span> versus <span font_desc="sans regular" font_features="dlig=1">feast</span>
|
||||
|
||||
Shortcuts: <tt>Monospace</tt> – <b>Bold</b> – <i>Italic</i> – <big>Big</big> – <small>Small</small> – <u>Underlined</u> – <s>Strikethrough</s> – Super<sup>script</sup> – Sub<sub>script</sub>
|
||||
|
||||
<span allow_breaks="false">A</span> hyphenation algorithm is a set of rules, especially one codified for implementation in a computer program, that decides at which points a word can be broken over two lines with a hyphen. For example, a hyphenation algorithm might decide that impeachment can be broken as <span allow_breaks="false">impeach‧ment</span> or <span allow_breaks="false">im‧peachment</span> but not <span allow_breaks="false">impe‧achment.</span>
|
||||
|
||||
<span insert_hyphens="false">one/two three/four five/six seven/eight nine/ten</span>
|
||||
|
||||
+12
-12
@@ -5,7 +5,7 @@
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_New</attribute>
|
||||
<attribute name="action">app.new</attribute>
|
||||
<attribute name="accel"><Primary>n</attribute>
|
||||
<attribute name="accel"><Control>n</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Open</attribute>
|
||||
@@ -14,19 +14,19 @@
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Save</attribute>
|
||||
<attribute name="action">app.save</attribute>
|
||||
<attribute name="accel"><Primary>s</attribute>
|
||||
<attribute name="accel"><Control>s</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Save _As...</attribute>
|
||||
<attribute name="action">app.save-as</attribute>
|
||||
<attribute name="accel"><Primary>s</attribute>
|
||||
<attribute name="accel"><Control>s</attribute>
|
||||
</item>
|
||||
</section>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Quit</attribute>
|
||||
<attribute name="action">app.quit</attribute>
|
||||
<attribute name="accel"><Primary>q</attribute>
|
||||
<attribute name="accel"><Control>q</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</menu>
|
||||
@@ -45,19 +45,19 @@
|
||||
<attribute name="label" translatable="yes">_Red</attribute>
|
||||
<attribute name="action">app.color</attribute>
|
||||
<attribute name="target">red</attribute>
|
||||
<attribute name="accel"><Primary>r</attribute>
|
||||
<attribute name="accel"><Control>r</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Green</attribute>
|
||||
<attribute name="action">app.color</attribute>
|
||||
<attribute name="target">green</attribute>
|
||||
<attribute name="accel"><Primary>g</attribute>
|
||||
<attribute name="accel"><Control>g</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Blue</attribute>
|
||||
<attribute name="action">app.color</attribute>
|
||||
<attribute name="target">blue</attribute>
|
||||
<attribute name="accel"><Primary>b</attribute>
|
||||
<attribute name="accel"><Control>b</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
@@ -68,26 +68,26 @@
|
||||
<attribute name="label" translatable="yes">_Square</attribute>
|
||||
<attribute name="action">win.shape</attribute>
|
||||
<attribute name="target">square</attribute>
|
||||
<attribute name="accel"><Primary>s</attribute>
|
||||
<attribute name="accel"><Control>s</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Rectangle</attribute>
|
||||
<attribute name="action">win.shape</attribute>
|
||||
<attribute name="target">rectangle</attribute>
|
||||
<attribute name="accel"><Primary>r</attribute>
|
||||
<attribute name="accel"><Control>r</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Oval</attribute>
|
||||
<attribute name="action">win.shape</attribute>
|
||||
<attribute name="target">oval</attribute>
|
||||
<attribute name="accel"><Primary>o</attribute>
|
||||
<attribute name="accel"><Control>o</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_Bold</attribute>
|
||||
<attribute name="action">win.bold</attribute>
|
||||
<attribute name="accel"><Primary><Shift>b</attribute>
|
||||
<attribute name="accel"><Control><Shift>b</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
@@ -96,7 +96,7 @@
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">_About</attribute>
|
||||
<attribute name="action">win.about</attribute>
|
||||
<attribute name="accel"><Primary>a</attribute>
|
||||
<attribute name="accel"><Control>a</attribute>
|
||||
</item>
|
||||
</submenu>
|
||||
</menu>
|
||||
|
||||
@@ -28,6 +28,7 @@ demos = files([
|
||||
'fishbowl.c',
|
||||
'fixed.c',
|
||||
'fontrendering.c',
|
||||
'gears.c',
|
||||
'gestures.c',
|
||||
'glarea.c',
|
||||
'headerbar.c',
|
||||
@@ -51,9 +52,9 @@ demos = files([
|
||||
'paintable_mediastream.c',
|
||||
'panes.c',
|
||||
'password_entry.c',
|
||||
'peg_solitaire.c',
|
||||
'pickers.c',
|
||||
'pixbufs.c',
|
||||
'popover.c',
|
||||
'printing.c',
|
||||
'revealer.c',
|
||||
'rotated_text.c',
|
||||
@@ -61,6 +62,7 @@ demos = files([
|
||||
'search_entry.c',
|
||||
'search_entry2.c',
|
||||
'shortcuts.c',
|
||||
'shortcut_triggers.c',
|
||||
'sidebar.c',
|
||||
'sizegroup.c',
|
||||
'sliding_puzzle.c',
|
||||
@@ -111,9 +113,16 @@ gtkdemo_resources = gnome.compile_resources('gtkdemo_resources',
|
||||
'demo.gresource.xml',
|
||||
source_dir: '.')
|
||||
|
||||
demo_cflags = []
|
||||
foreach flag: common_cflags
|
||||
if flag not in ['-Werror=missing-prototypes', '-Werror=missing-declarations', '-fvisibility=hidden']
|
||||
demo_cflags += flag
|
||||
endif
|
||||
endforeach
|
||||
|
||||
executable('gtk4-demo',
|
||||
demos, demos_h, extra_demo_sources, gtkdemo_resources,
|
||||
c_args: gtkdemo_args,
|
||||
c_args: gtkdemo_args + demo_cflags,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
@@ -122,7 +131,7 @@ executable('gtk4-demo',
|
||||
|
||||
executable('gtk4-demo-application',
|
||||
'application.c', gtkdemo_resources,
|
||||
c_args: gtkdemo_args,
|
||||
c_args: gtkdemo_args + common_cflags,
|
||||
dependencies: gtkdemo_deps,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="resizable">0</property>
|
||||
<child type="titlebar">
|
||||
<object class="GtkHeaderBar">
|
||||
<property name="show-title-buttons">1</property>
|
||||
@@ -10,32 +11,40 @@
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">80</property>
|
||||
<property name="margin-start">80</property>
|
||||
<property name="margin-end">80</property>
|
||||
<property name="margin-top">80</property>
|
||||
<property name="margin-bottom">80</property>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="popover">thing_a</property>
|
||||
<property name="label">Color</property>
|
||||
<property name="label">_Color</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="popover">thing_b</property>
|
||||
<property name="label">Flavors</property>
|
||||
<property name="label">_Flavors</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton">
|
||||
<property name="popover">thing_c</property>
|
||||
<property name="label">Tools</property>
|
||||
<property name="label">_Tools</property>
|
||||
<property name="use-underline">1</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="thing_a">
|
||||
<style>
|
||||
<class name="menu"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
@@ -62,11 +71,12 @@
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="thing_b">
|
||||
<style>
|
||||
<class name="menu"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="action-name">win.chocolate</property>
|
||||
@@ -92,11 +102,12 @@
|
||||
</child>
|
||||
</object>
|
||||
<object class="GtkPopover" id="thing_c">
|
||||
<style>
|
||||
<class name="menu"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="margin">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkModelButton">
|
||||
<property name="text">Hammer</property>
|
||||
|
||||
@@ -56,23 +56,25 @@ do_overlay (GtkWidget *do_widget)
|
||||
}
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||
gtk_widget_set_can_target (vbox, FALSE);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||
gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (vbox, GTK_ALIGN_START);
|
||||
|
||||
label = gtk_label_new ("<span foreground='blue' weight='ultrabold' font='40'>Numbers</span>");
|
||||
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
|
||||
gtk_widget_set_can_target (label, FALSE);
|
||||
gtk_widget_set_margin_top (label, 8);
|
||||
gtk_widget_set_margin_bottom (label, 50);
|
||||
gtk_widget_set_margin_bottom (label, 8);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), label);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 10);
|
||||
gtk_overlay_add_overlay (GTK_OVERLAY (overlay), vbox);
|
||||
gtk_widget_set_halign (vbox, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (vbox, GTK_ALIGN_CENTER);
|
||||
|
||||
gtk_entry_set_placeholder_text (GTK_ENTRY (entry), "Your Lucky Number");
|
||||
gtk_widget_set_margin_top (entry, 50);
|
||||
gtk_widget_set_margin_top (entry, 8);
|
||||
gtk_widget_set_margin_bottom (entry, 8);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), entry);
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ static const gchar *pad_colors[] = {
|
||||
"orange"
|
||||
};
|
||||
|
||||
static GType drawing_area_get_type (void);
|
||||
G_DEFINE_TYPE (DrawingArea, drawing_area, GTK_TYPE_WIDGET)
|
||||
|
||||
static void drawing_area_set_color (DrawingArea *area,
|
||||
@@ -340,7 +341,7 @@ drawing_area_init (DrawingArea *area)
|
||||
area->draw_color = (GdkRGBA) { 0, 0, 0, 1 };
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
static GtkWidget *
|
||||
drawing_area_new (void)
|
||||
{
|
||||
return g_object_new (drawing_area_get_type (), NULL);
|
||||
|
||||
+11
-5
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
void
|
||||
static void
|
||||
toggle_resize (GtkWidget *widget,
|
||||
GtkWidget *child)
|
||||
{
|
||||
@@ -47,7 +47,7 @@ toggle_resize (GtkWidget *widget,
|
||||
g_object_unref (child);
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
toggle_shrink (GtkWidget *widget,
|
||||
GtkWidget *child)
|
||||
{
|
||||
@@ -81,7 +81,7 @@ toggle_shrink (GtkWidget *widget,
|
||||
g_object_unref (child);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
static GtkWidget *
|
||||
create_pane_options (GtkPaned *paned,
|
||||
const gchar *frame_label,
|
||||
const gchar *label1,
|
||||
@@ -97,7 +97,10 @@ create_pane_options (GtkPaned *paned,
|
||||
child2 = gtk_paned_get_child2 (paned);
|
||||
|
||||
frame = gtk_frame_new (frame_label);
|
||||
g_object_set (frame, "margin", 4, NULL);
|
||||
gtk_widget_set_margin_start (frame, 4);
|
||||
gtk_widget_set_margin_end (frame, 4);
|
||||
gtk_widget_set_margin_top (frame, 4);
|
||||
gtk_widget_set_margin_bottom (frame, 4);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@@ -159,7 +162,10 @@ do_panes (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL);
|
||||
g_object_set (vpaned, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (vpaned, 5);
|
||||
gtk_widget_set_margin_end (vpaned, 5);
|
||||
gtk_widget_set_margin_top (vpaned, 5);
|
||||
gtk_widget_set_margin_bottom (vpaned, 5);
|
||||
gtk_container_add (GTK_CONTAINER (vbox), vpaned);
|
||||
|
||||
hpaned = gtk_paned_new (GTK_ORIENTATION_HORIZONTAL);
|
||||
|
||||
@@ -49,7 +49,10 @@ do_password_entry (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
g_object_set (box, "margin", 18, NULL);
|
||||
gtk_widget_set_margin_start (box, 18);
|
||||
gtk_widget_set_margin_end (box, 18);
|
||||
gtk_widget_set_margin_top (box, 18);
|
||||
gtk_widget_set_margin_bottom (box, 18);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
entry = gtk_password_entry_new ();
|
||||
@@ -71,7 +74,7 @@ do_password_entry (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (box), entry2);
|
||||
|
||||
button = gtk_button_new_with_mnemonic ("_Done");
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (button), "suggested-action");
|
||||
gtk_widget_add_css_class (button, "suggested-action");
|
||||
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
||||
gtk_widget_set_sensitive (button, FALSE);
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
@@ -0,0 +1,356 @@
|
||||
/* Peg Solitaire
|
||||
*
|
||||
* This demo demonstrates how to use drag'n'drop to implement peg solitaire.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
/* Create an object for the pegs that get moved around in the game.
|
||||
*
|
||||
* We implement the GdkPaintable interface for them, so we can use GtkPicture
|
||||
* objects for the wholes we put the pegs into.
|
||||
*/
|
||||
#define SOLITAIRE_TYPE_PEG (solitaire_peg_get_type ())
|
||||
G_DECLARE_FINAL_TYPE (SolitairePeg, solitaire_peg, SOLITAIRE, PEG, GObject)
|
||||
|
||||
/* Declare the struct. */
|
||||
struct _SolitairePeg
|
||||
{
|
||||
GObject parent_instance;
|
||||
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
struct _SolitairePegClass
|
||||
{
|
||||
GObjectClass parent_class;
|
||||
};
|
||||
|
||||
/* Here, we implement the functionality required by the GdkPaintable interface */
|
||||
static void
|
||||
solitaire_peg_snapshot (GdkPaintable *paintable,
|
||||
GdkSnapshot *snapshot,
|
||||
double width,
|
||||
double height)
|
||||
{
|
||||
/* The snapshot function is the only function we need to implement.
|
||||
* It does the actual drawing of the paintable.
|
||||
*/
|
||||
gtk_snapshot_append_color (snapshot,
|
||||
&(GdkRGBA) { 0.6, 0.3, 0.0, 1.0 },
|
||||
&GRAPHENE_RECT_INIT (0, 0, width, height));
|
||||
}
|
||||
|
||||
static GdkPaintableFlags
|
||||
solitaire_peg_get_flags (GdkPaintable *paintable)
|
||||
{
|
||||
/* The flags are very useful to let GTK know that this image
|
||||
* is never going to change.
|
||||
* This allows many optimizations and should therefore always
|
||||
* be set.
|
||||
*/
|
||||
return GDK_PAINTABLE_STATIC_CONTENTS | GDK_PAINTABLE_STATIC_SIZE;
|
||||
}
|
||||
|
||||
static void
|
||||
solitaire_peg_paintable_init (GdkPaintableInterface *iface)
|
||||
{
|
||||
iface->snapshot = solitaire_peg_snapshot;
|
||||
iface->get_flags = solitaire_peg_get_flags;
|
||||
}
|
||||
|
||||
/* When defining the GType, we need to implement the GdkPaintable interface */
|
||||
G_DEFINE_TYPE_WITH_CODE (SolitairePeg, solitaire_peg, G_TYPE_OBJECT,
|
||||
G_IMPLEMENT_INTERFACE (GDK_TYPE_PAINTABLE,
|
||||
solitaire_peg_paintable_init))
|
||||
|
||||
/* Here's the boilerplate for the GObject declaration.
|
||||
* We don't need to do anything special here, because we keep no
|
||||
* data of our own.
|
||||
*/
|
||||
static void
|
||||
solitaire_peg_class_init (SolitairePegClass *klass)
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
solitaire_peg_init (SolitairePeg *peg)
|
||||
{
|
||||
}
|
||||
|
||||
/* Add a little setter for the peg's position.
|
||||
* We want to track those so that we can check for legal moves
|
||||
* during drag'n'drop operations.
|
||||
*/
|
||||
static void
|
||||
solitaire_peg_set_position (SolitairePeg *peg,
|
||||
guint x,
|
||||
guint y)
|
||||
{
|
||||
peg->x = x;
|
||||
peg->y = y;
|
||||
}
|
||||
|
||||
/* And finally, we add a simple constructor.
|
||||
*/
|
||||
static SolitairePeg *
|
||||
solitaire_peg_new (void)
|
||||
{
|
||||
return g_object_new (SOLITAIRE_TYPE_PEG, NULL);
|
||||
}
|
||||
|
||||
/*** DRAG AND DROP ***/
|
||||
|
||||
/* The user tries to start a drag operation.
|
||||
* We check if the image contains a peg, and if so, we return the
|
||||
* peg as the content to be dragged.
|
||||
*/
|
||||
static GdkContentProvider *
|
||||
drag_prepare (GtkDragSource *source,
|
||||
double x,
|
||||
double y,
|
||||
GtkWidget *image)
|
||||
{
|
||||
GdkPaintable *paintable = gtk_image_get_paintable (GTK_IMAGE (image));
|
||||
|
||||
if (!SOLITAIRE_IS_PEG (paintable))
|
||||
return NULL;
|
||||
|
||||
return gdk_content_provider_new_typed (SOLITAIRE_TYPE_PEG, paintable);
|
||||
}
|
||||
|
||||
/* This notifies us that the drag has begun.
|
||||
* We can now set up the icon and the widget for the ongoing drag.
|
||||
*/
|
||||
static void
|
||||
drag_begin (GtkDragSource *source,
|
||||
GdkDrag *drag,
|
||||
GtkWidget *image)
|
||||
{
|
||||
GdkPaintable *paintable = gtk_image_get_paintable (GTK_IMAGE (image));
|
||||
|
||||
/* We guaranteed in the drag_prepare function above that we
|
||||
* only start a drag if a peg is available.
|
||||
* So let's make sure we did not screw that up.
|
||||
*/
|
||||
g_assert (SOLITAIRE_IS_PEG (paintable));
|
||||
|
||||
/* We use the peg as the drag icon.
|
||||
*/
|
||||
gtk_drag_source_set_icon (source, paintable, -2, -2);
|
||||
|
||||
/* We also attach it to the drag operation as custom user data,
|
||||
* so that we can get it back later if the drag fails.
|
||||
*/
|
||||
g_object_set_data (G_OBJECT (drag), "the peg", paintable);
|
||||
|
||||
/* Because we are busy dragging the peg, we want to unset it
|
||||
* on the image.
|
||||
*/
|
||||
gtk_image_clear (GTK_IMAGE (image));
|
||||
}
|
||||
|
||||
/* Thie is called once a drag operation has ended (successfully or not).
|
||||
* We want to undo what we did in drag_begin() above and react
|
||||
* to a potential move of the peg.
|
||||
*/
|
||||
static void
|
||||
drag_end (GtkDragSource *source,
|
||||
GdkDrag *drag,
|
||||
gboolean delete_data,
|
||||
GtkWidget *image)
|
||||
{
|
||||
SolitairePeg *peg;
|
||||
|
||||
/* If the drag was successful, we should now delete the peg.
|
||||
* We did this in drag_begin() above to prepare for the drag, so
|
||||
* there's no need to do anything anymore.
|
||||
*/
|
||||
if (delete_data)
|
||||
return;
|
||||
|
||||
/* However, if the drag did not succeed, we need to undo what
|
||||
* we did in drag_begin() and reinsert the peg here.
|
||||
* Because we used it as the drag data
|
||||
*/
|
||||
peg = g_object_get_data (G_OBJECT (drag), "the peg");
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (image), GDK_PAINTABLE (peg));
|
||||
}
|
||||
|
||||
/* Whenever a new drop operation starts, we need to check if we can
|
||||
* accept it.
|
||||
* The default check unfortunately is not good enough, because it only
|
||||
* checks the data type. But we also need to check if our image can
|
||||
* even accept data.
|
||||
*/
|
||||
static gboolean
|
||||
drop_accept (GtkDropTarget *target,
|
||||
GdkDrop *drop,
|
||||
GtkWidget *image)
|
||||
{
|
||||
/* First, check the drop is actually trying to drop a peg */
|
||||
if (!gdk_content_formats_contain_gtype (gdk_drop_get_formats (drop), SOLITAIRE_TYPE_PEG))
|
||||
return FALSE;
|
||||
|
||||
/* If the image already contains a peg, we cannot accept another one */
|
||||
if (SOLITAIRE_IS_PEG (gtk_image_get_paintable (GTK_IMAGE (image))))
|
||||
return FALSE;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
drop_drop (GtkDropTarget *target,
|
||||
const GValue *value,
|
||||
double x,
|
||||
double y,
|
||||
GtkWidget *image)
|
||||
{
|
||||
GtkGrid *grid;
|
||||
SolitairePeg *peg;
|
||||
int image_x, image_y;
|
||||
GtkWidget *jumped;
|
||||
|
||||
grid = GTK_GRID (gtk_widget_get_parent (image));
|
||||
/* The value contains the data in the type we demanded.
|
||||
* We demanded a SolitairePeg, so that's what we get.
|
||||
*/
|
||||
peg = g_value_get_object (value);
|
||||
|
||||
/* Make sure this was a legal move. */
|
||||
/* First, figure out the image's position in the grid. */
|
||||
gtk_grid_query_child (grid,
|
||||
image,
|
||||
&image_x, &image_y,
|
||||
NULL, NULL);
|
||||
|
||||
/* If the peg was not moved 2 spaces horizontally or vertically,
|
||||
* this was not a valid jump. Reject it.
|
||||
*/
|
||||
if (!((ABS (image_x - peg->x) == 2 && image_y == peg->y) ||
|
||||
(ABS (image_y - peg->y) == 2 && image_x == peg->x)))
|
||||
return FALSE;
|
||||
|
||||
/* Get the widget that was jumped over
|
||||
*/
|
||||
jumped = gtk_grid_get_child_at (grid,
|
||||
(image_x + peg->x) / 2,
|
||||
(image_y + peg->y) / 2);
|
||||
/* If the jumped widget does not have a peg in it, this move
|
||||
* isn't valid.
|
||||
*/
|
||||
if (!SOLITAIRE_IS_PEG (gtk_image_get_paintable (GTK_IMAGE (jumped))))
|
||||
return FALSE;
|
||||
|
||||
/* Finally, we know it's a legal move. */
|
||||
|
||||
/* Clear the peg of the jumped-over image */
|
||||
gtk_image_clear (GTK_IMAGE (jumped));
|
||||
|
||||
/* Add the peg to this image */
|
||||
solitaire_peg_set_position (peg, image_x, image_y);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (image), GDK_PAINTABLE (peg));
|
||||
|
||||
/* Success! */
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_peg_solitaire (GtkWidget *do_widget)
|
||||
{
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *header;
|
||||
GtkWidget *restart;
|
||||
GtkWidget *grid;
|
||||
GtkWidget *image;
|
||||
int x, y;
|
||||
GtkDragSource *source;
|
||||
GtkDropTarget *target;
|
||||
|
||||
restart = gtk_button_new_from_icon_name ("view-refresh-symbolic");
|
||||
g_signal_connect (restart, "clicked", G_CALLBACK (restart), NULL);
|
||||
|
||||
header = gtk_header_bar_new ();
|
||||
gtk_header_bar_set_title (GTK_HEADER_BAR (header), "Peg Solitaire");
|
||||
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), TRUE);
|
||||
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), restart);
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Sliding Puzzle");
|
||||
gtk_window_set_titlebar (GTK_WINDOW (window), header);
|
||||
gtk_window_set_default_size (GTK_WINDOW (window), 400, 300);
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
grid = gtk_grid_new ();
|
||||
gtk_widget_set_halign (grid, GTK_ALIGN_CENTER);
|
||||
gtk_widget_set_valign (grid, GTK_ALIGN_CENTER);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (grid), 6);
|
||||
gtk_grid_set_row_homogeneous (GTK_GRID (grid), TRUE);
|
||||
gtk_grid_set_column_homogeneous (GTK_GRID (grid), TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (window), grid);
|
||||
|
||||
for (x = 0; x < 7; x++)
|
||||
{
|
||||
for (y = 0; y < 7; y++)
|
||||
{
|
||||
if ((x < 2 || x >= 5) && (y < 2 || y >= 5))
|
||||
continue;
|
||||
|
||||
image = gtk_image_new ();
|
||||
if (x != 3 || y != 3)
|
||||
{
|
||||
SolitairePeg *peg = solitaire_peg_new ();
|
||||
solitaire_peg_set_position (peg, x, y);
|
||||
gtk_image_set_from_paintable (GTK_IMAGE (image), GDK_PAINTABLE (peg));
|
||||
}
|
||||
|
||||
gtk_grid_attach (GTK_GRID (grid), image, x, y, 1, 1);
|
||||
|
||||
/* Set up the drag source.
|
||||
* This is rather straightforward: Set the supported actions
|
||||
* (in our case, pegs can only be moved) and connect all the
|
||||
* relevant signals.
|
||||
* And because all drag'n'drop handling is done via event controllers,
|
||||
* we need to add the controller to the widget.
|
||||
*/
|
||||
source = gtk_drag_source_new ();
|
||||
gtk_drag_source_set_actions (source, GDK_ACTION_MOVE);
|
||||
g_signal_connect (source, "prepare", G_CALLBACK (drag_prepare), image);
|
||||
g_signal_connect (source, "drag-begin", G_CALLBACK (drag_begin), image);
|
||||
g_signal_connect (source, "drag-end", G_CALLBACK (drag_end), image);
|
||||
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (source));
|
||||
|
||||
/* Set up the drop target.
|
||||
* This is more involved, because the game logic goes here.
|
||||
*/
|
||||
|
||||
/* First we specify the data we accept: pegs.
|
||||
* And we only want moves.
|
||||
*/
|
||||
target = gtk_drop_target_new (SOLITAIRE_TYPE_PEG, GDK_ACTION_MOVE);
|
||||
/* Then we connect our signals.
|
||||
*/
|
||||
g_signal_connect (target, "accept", G_CALLBACK (drop_accept), image);
|
||||
g_signal_connect (target, "drop", G_CALLBACK (drop_drop), image);
|
||||
/* Finally, like above, we add it to the widget.
|
||||
*/
|
||||
gtk_widget_add_controller (image, GTK_EVENT_CONTROLLER (target));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -23,7 +23,10 @@ do_pickers (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
g_object_set (table, "margin", 20, NULL);
|
||||
gtk_widget_set_margin_start (table, 20);
|
||||
gtk_widget_set_margin_end (table, 20);
|
||||
gtk_widget_set_margin_top (table, 20);
|
||||
gtk_widget_set_margin_bottom (table, 20);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 3);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (window), table);
|
||||
|
||||
@@ -1,185 +0,0 @@
|
||||
/* Popovers
|
||||
*
|
||||
* A bubble-like window containing contextual information or options.
|
||||
* GtkPopovers can be attached to any widget, and will be displayed
|
||||
* within the same window, but on top of all its content.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static void
|
||||
toggle_changed_cb (GtkToggleButton *button,
|
||||
GtkWidget *popover)
|
||||
{
|
||||
gtk_widget_set_visible (popover,
|
||||
gtk_toggle_button_get_active (button));
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_popover (GtkWidget *parent,
|
||||
GtkWidget *child,
|
||||
GtkPositionType pos)
|
||||
{
|
||||
GtkWidget *popover;
|
||||
|
||||
popover = gtk_popover_new (parent);
|
||||
gtk_popover_set_position (GTK_POPOVER (popover), pos);
|
||||
gtk_container_add (GTK_CONTAINER (popover), child);
|
||||
g_object_set (child, "margin", 6, NULL);
|
||||
gtk_widget_show (child);
|
||||
|
||||
return popover;
|
||||
}
|
||||
|
||||
static GtkWidget *
|
||||
create_complex_popover (GtkWidget *parent,
|
||||
GtkPositionType pos)
|
||||
{
|
||||
GtkWidget *popover, *window, *content;
|
||||
GtkBuilder *builder;
|
||||
|
||||
builder = gtk_builder_new ();
|
||||
gtk_builder_add_from_resource (builder, "/popover/popover.ui", NULL);
|
||||
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
|
||||
content = gtk_bin_get_child (GTK_BIN (window));
|
||||
g_object_ref (content);
|
||||
gtk_container_remove (GTK_CONTAINER (gtk_widget_get_parent (content)),
|
||||
content);
|
||||
gtk_widget_destroy (window);
|
||||
g_object_unref (builder);
|
||||
|
||||
popover = create_popover (parent, content, GTK_POS_BOTTOM);
|
||||
g_object_unref (content);
|
||||
|
||||
return popover;
|
||||
}
|
||||
|
||||
static void
|
||||
entry_size_allocate_cb (GtkEntry *entry,
|
||||
int width,
|
||||
int height,
|
||||
int baseline,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkEntryIconPosition popover_pos;
|
||||
GtkPopover *popover = user_data;
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
if (gtk_widget_is_visible (GTK_WIDGET (popover)))
|
||||
{
|
||||
popover_pos =
|
||||
GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (entry),
|
||||
"popover-icon-pos"));
|
||||
gtk_entry_get_icon_area (entry, popover_pos, &rect);
|
||||
gtk_popover_set_pointing_to (GTK_POPOVER (popover), &rect);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
entry_icon_press_cb (GtkEntry *entry,
|
||||
GtkEntryIconPosition icon_pos,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *popover = user_data;
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
gtk_entry_get_icon_area (entry, icon_pos, &rect);
|
||||
gtk_popover_set_pointing_to (GTK_POPOVER (popover), &rect);
|
||||
gtk_widget_show (popover);
|
||||
|
||||
g_object_set_data (G_OBJECT (entry), "popover-icon-pos",
|
||||
GUINT_TO_POINTER (icon_pos));
|
||||
}
|
||||
|
||||
static void
|
||||
day_selected_cb (GtkCalendar *calendar,
|
||||
gpointer user_data)
|
||||
{
|
||||
cairo_rectangle_int_t rect;
|
||||
GtkWidget *popover;
|
||||
GdkEvent *event;
|
||||
gdouble x, y;
|
||||
GtkWidget *widget;
|
||||
GtkPopoverHolder *holder = GTK_POPOVER_HOLDER (user_data);
|
||||
|
||||
event = gtk_get_current_event ();
|
||||
|
||||
if (gdk_event_get_event_type (event) != GDK_BUTTON_PRESS)
|
||||
return;
|
||||
|
||||
gdk_event_get_position (event, &x, &y);
|
||||
widget = gtk_native_get_for_surface (gdk_event_get_surface (event));
|
||||
gtk_widget_translate_coordinates (widget,
|
||||
GTK_WIDGET (calendar),
|
||||
x, y,
|
||||
&rect.x, &rect.y);
|
||||
rect.width = rect.height = 1;
|
||||
|
||||
popover = create_popover (GTK_WIDGET (holder),
|
||||
gtk_entry_new (),
|
||||
GTK_POS_BOTTOM);
|
||||
gtk_popover_set_pointing_to (GTK_POPOVER (popover), &rect);
|
||||
|
||||
gtk_widget_show (popover);
|
||||
|
||||
gdk_event_unref (event);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
do_popover (GtkWidget *do_widget)
|
||||
{
|
||||
static GtkWidget *window = NULL;
|
||||
GtkWidget *popover, *box, *widget;
|
||||
GtkWidget *entry;
|
||||
GtkWidget *calendar;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Popovers");
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 24);
|
||||
g_object_set (box, "margin", 24, NULL);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
widget = gtk_toggle_button_new_with_label ("Button");
|
||||
popover = create_popover (widget,
|
||||
gtk_label_new ("This popover does not grab input"),
|
||||
GTK_POS_TOP);
|
||||
gtk_popover_set_autohide (GTK_POPOVER (popover), FALSE);
|
||||
g_signal_connect (widget, "toggled",
|
||||
G_CALLBACK (toggle_changed_cb), popover);
|
||||
gtk_container_add (GTK_CONTAINER (box), widget);
|
||||
|
||||
entry = gtk_entry_new ();
|
||||
widget = gtk_popover_holder_new ();
|
||||
gtk_popover_holder_set_child (GTK_POPOVER_HOLDER (widget), entry);
|
||||
popover = create_complex_popover (widget, GTK_POS_TOP);
|
||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_PRIMARY, "edit-find");
|
||||
gtk_entry_set_icon_from_icon_name (GTK_ENTRY (entry),
|
||||
GTK_ENTRY_ICON_SECONDARY, "edit-clear");
|
||||
|
||||
g_signal_connect (widget, "icon-press",
|
||||
G_CALLBACK (entry_icon_press_cb), popover);
|
||||
g_signal_connect (widget, "size-allocate",
|
||||
G_CALLBACK (entry_size_allocate_cb), popover);
|
||||
gtk_container_add (GTK_CONTAINER (box), widget);
|
||||
|
||||
calendar = gtk_calendar_new ();
|
||||
widget = gtk_popover_holder_new ();
|
||||
gtk_popover_holder_set_child (GTK_POPOVER_HOLDER (widget), calendar);
|
||||
g_signal_connect (calendar, "day-selected",
|
||||
G_CALLBACK (day_selected_cb), widget);
|
||||
gtk_container_add (GTK_CONTAINER (box), widget);
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkListStore" id="liststore1">
|
||||
<columns>
|
||||
<column type="gchararray"/>
|
||||
</columns>
|
||||
<data>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 1</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 2</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 3</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 4</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 5</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 6</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 7</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 8</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 9</col>
|
||||
</row>
|
||||
<row>
|
||||
<col id="0" translatable="yes">Item 10</col>
|
||||
</row>
|
||||
</data>
|
||||
</object>
|
||||
<object class="GtkWindow" id="window">
|
||||
<child>
|
||||
<object class="GtkBox" id="box">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="entry1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="primary-icon-name">edit-find</property>
|
||||
<property name="secondary-icon-name">edit-clear</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="max-content-height">100</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="model">liststore1</property>
|
||||
<property name="headers-visible">0</property>
|
||||
<property name="enable-search">0</property>
|
||||
<property name="search-column">2</property>
|
||||
<child internal-child="selection">
|
||||
<object class="GtkTreeSelection" id="treeview-selection1"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTreeViewColumn" id="column1">
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderer1"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
||||
@@ -28,26 +28,23 @@ fancy_shape_renderer (cairo_t *cr,
|
||||
(double) attr->ink_rect.width / PANGO_SCALE,
|
||||
(double) attr->ink_rect.height / PANGO_SCALE);
|
||||
|
||||
switch (GPOINTER_TO_UINT (attr->data))
|
||||
if (GPOINTER_TO_UINT (attr->data) == 0x2665) /* U+2665 BLACK HEART SUIT */
|
||||
{
|
||||
case 0x2665: /* U+2665 BLACK HEART SUIT */
|
||||
{
|
||||
cairo_move_to (cr, .5, .0);
|
||||
cairo_line_to (cr, .9, -.4);
|
||||
cairo_curve_to (cr, 1.1, -.8, .5, -.9, .5, -.5);
|
||||
cairo_curve_to (cr, .5, -.9, -.1, -.8, .1, -.4);
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
break;
|
||||
cairo_move_to (cr, .5, .0);
|
||||
cairo_line_to (cr, .9, -.4);
|
||||
cairo_curve_to (cr, 1.1, -.8, .5, -.9, .5, -.5);
|
||||
cairo_curve_to (cr, .5, -.9, -.1, -.8, .1, -.4);
|
||||
cairo_close_path (cr);
|
||||
}
|
||||
|
||||
if (!do_path) {
|
||||
cairo_set_source_rgb (cr, 1., 0., 0.);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
if (!do_path)
|
||||
{
|
||||
cairo_set_source_rgb (cr, 1., 0., 0.);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
}
|
||||
|
||||
PangoAttrList *
|
||||
static PangoAttrList *
|
||||
create_fancy_attr_list_for_layout (PangoLayout *layout)
|
||||
{
|
||||
PangoAttrList *attrs;
|
||||
@@ -145,13 +142,13 @@ rotated_text_draw (GtkDrawingArea *da,
|
||||
/* Draw the layout N_WORDS times in a circle */
|
||||
for (i = 0; i < N_WORDS; i++)
|
||||
{
|
||||
int width, height;
|
||||
int layout_width, layout_height;
|
||||
|
||||
/* Inform Pango to re-layout the text with the new transformation matrix */
|
||||
pango_cairo_update_layout (cr, layout);
|
||||
|
||||
pango_layout_get_pixel_size (layout, &width, &height);
|
||||
cairo_move_to (cr, - width / 2, - RADIUS * .9);
|
||||
pango_layout_get_pixel_size (layout, &layout_width, &layout_height);
|
||||
cairo_move_to (cr, - layout_width / 2, - RADIUS * .9);
|
||||
pango_cairo_show_layout (cr, layout);
|
||||
|
||||
/* Rotate for the next turn */
|
||||
@@ -193,8 +190,7 @@ do_rotated_text (GtkWidget *do_widget)
|
||||
/* Add a drawing area */
|
||||
drawing_area = gtk_drawing_area_new ();
|
||||
gtk_container_add (GTK_CONTAINER (box), drawing_area);
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (drawing_area),
|
||||
GTK_STYLE_CLASS_VIEW);
|
||||
gtk_widget_add_css_class (drawing_area, GTK_STYLE_CLASS_VIEW);
|
||||
|
||||
gtk_drawing_area_set_draw_func (GTK_DRAWING_AREA (drawing_area),
|
||||
rotated_text_draw,
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label_plain">
|
||||
<property name="label">Plain</property>
|
||||
@@ -40,7 +43,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale_plain">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="width-request">200</property>
|
||||
<property name="draw-value">0</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
@@ -69,7 +71,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale_marks">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="width-request">200</property>
|
||||
<property name="draw-value">0</property>
|
||||
<property name="adjustment">adjustment2</property>
|
||||
@@ -105,7 +106,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale_discrete">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="width-request">200</property>
|
||||
<property name="round-digits">0</property>
|
||||
<property name="draw-value">0</property>
|
||||
|
||||
@@ -185,13 +185,13 @@ text_changed (GObject *object,
|
||||
gpointer data)
|
||||
{
|
||||
GtkEntry *entry = GTK_ENTRY (object);
|
||||
GActionMap *actions = data;
|
||||
GActionMap *action_map = data;
|
||||
GAction *action;
|
||||
gboolean has_text;
|
||||
|
||||
has_text = gtk_entry_get_text_length (entry) > 0;
|
||||
|
||||
action = g_action_map_lookup_action (actions, "clear");
|
||||
action = g_action_map_lookup_action (action_map, "clear");
|
||||
g_simple_action_set_enabled (G_SIMPLE_ACTION (action), has_text);
|
||||
}
|
||||
|
||||
@@ -216,11 +216,18 @@ entry_add_to_context_menu (GtkEntry *entry)
|
||||
};
|
||||
GMenuModel *submenu;
|
||||
GMenuItem *item;
|
||||
GAction *action;
|
||||
GVariant *value;
|
||||
|
||||
actions = g_simple_action_group_new ();
|
||||
g_action_map_add_action_entries (G_ACTION_MAP (actions), entries, G_N_ELEMENTS(entries), entry);
|
||||
gtk_widget_insert_action_group (GTK_WIDGET (entry), "search", G_ACTION_GROUP (actions));
|
||||
|
||||
action = g_action_map_lookup_action (G_ACTION_MAP (actions), "search-by");
|
||||
value = g_variant_ref_sink (g_variant_new_string ("name"));
|
||||
set_search_by (G_SIMPLE_ACTION (action), value, entry);
|
||||
g_variant_unref (value);
|
||||
|
||||
menu = g_menu_new ();
|
||||
item = g_menu_item_new (_("C_lear"), "search.clear");
|
||||
g_menu_item_set_attribute (item, "touch-icon", "s", "edit-clear-symbolic");
|
||||
@@ -258,7 +265,10 @@ do_search_entry (GtkWidget *do_widget)
|
||||
G_CALLBACK (search_entry_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 5);
|
||||
gtk_widget_set_margin_end (vbox, 5);
|
||||
gtk_widget_set_margin_top (vbox, 5);
|
||||
gtk_widget_set_margin_bottom (vbox, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
label = gtk_label_new (NULL);
|
||||
@@ -294,10 +304,6 @@ do_search_entry (GtkWidget *do_widget)
|
||||
gtk_widget_show (cancel_button);
|
||||
|
||||
/* Set up the search icon */
|
||||
GVariant *value = g_variant_ref_sink (g_variant_new_string ("name"));
|
||||
set_search_by (NULL, value, entry);
|
||||
g_variant_unref (value);
|
||||
|
||||
gtk_entry_set_icon_activatable (GTK_ENTRY (entry), GTK_ENTRY_ICON_PRIMARY, TRUE);
|
||||
gtk_entry_set_icon_sensitive (GTK_ENTRY (entry), GTK_ENTRY_ICON_PRIMARY, TRUE);
|
||||
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
/* Shortcuts
|
||||
*
|
||||
* GtkShortcut is the abstraction used by GTK to handle shortcuts from
|
||||
* keyboard or other input devices.
|
||||
*
|
||||
* Shortcut triggers can be used to weave complex sequences of key
|
||||
* presses into sophisticated mechanisms to activate shortcuts.
|
||||
*
|
||||
* This demo code shows creative ways to do that.
|
||||
*/
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static gboolean
|
||||
shortcut_activated (GtkWidget *widget,
|
||||
GVariant *unused,
|
||||
gpointer row)
|
||||
{
|
||||
g_print ("activated %s\n", gtk_label_get_label (row));
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static GtkShortcutTrigger *
|
||||
create_ctrl_g (void)
|
||||
{
|
||||
return gtk_keyval_trigger_new (GDK_KEY_g, GDK_CONTROL_MASK);
|
||||
}
|
||||
|
||||
static GtkShortcutTrigger *
|
||||
create_x (void)
|
||||
{
|
||||
return gtk_keyval_trigger_new (GDK_KEY_x, 0);
|
||||
}
|
||||
|
||||
struct {
|
||||
const char *description;
|
||||
GtkShortcutTrigger * (* create_trigger_func) (void);
|
||||
} shortcuts[] = {
|
||||
{ "Press Ctrl-G", create_ctrl_g },
|
||||
{ "Press X", create_x },
|
||||
};
|
||||
|
||||
GtkWidget *
|
||||
do_shortcut_triggers (GtkWidget *do_widget)
|
||||
{
|
||||
guint i;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
GtkWidget *list;
|
||||
GtkEventController *controller;
|
||||
|
||||
window = gtk_window_new ();
|
||||
gtk_window_set_display (GTK_WINDOW (window),
|
||||
gtk_widget_get_display (do_widget));
|
||||
gtk_window_set_title (GTK_WINDOW (window), "Shortcuts");
|
||||
|
||||
g_signal_connect (window, "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
list = gtk_list_box_new ();
|
||||
gtk_widget_set_margin_top (list, 6);
|
||||
gtk_widget_set_margin_bottom (list, 6);
|
||||
gtk_widget_set_margin_start (list, 6);
|
||||
gtk_widget_set_margin_end (list, 6);
|
||||
gtk_container_add (GTK_CONTAINER (window), list);
|
||||
|
||||
for (i = 0; i < G_N_ELEMENTS (shortcuts); i++)
|
||||
{
|
||||
GtkShortcut *shortcut;
|
||||
GtkWidget *row;
|
||||
|
||||
row = gtk_label_new (shortcuts[i].description);
|
||||
gtk_container_add (GTK_CONTAINER (list), row);
|
||||
|
||||
controller = gtk_shortcut_controller_new ();
|
||||
gtk_shortcut_controller_set_scope (GTK_SHORTCUT_CONTROLLER (controller), GTK_SHORTCUT_SCOPE_GLOBAL);
|
||||
gtk_widget_add_controller (row, controller);
|
||||
|
||||
shortcut = gtk_shortcut_new (shortcuts[i].create_trigger_func(),
|
||||
gtk_callback_action_new (shortcut_activated, row, NULL));
|
||||
gtk_shortcut_controller_add_shortcut (GTK_SHORTCUT_CONTROLLER (controller), shortcut);
|
||||
}
|
||||
}
|
||||
|
||||
if (!gtk_widget_get_visible (window))
|
||||
gtk_widget_show (window);
|
||||
else
|
||||
gtk_widget_destroy (window);
|
||||
|
||||
return window;
|
||||
}
|
||||
@@ -5,7 +5,10 @@
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">50</property>
|
||||
<property name="margin-start">50</property>
|
||||
<property name="margin-end">50</property>
|
||||
<property name="margin-top">50</property>
|
||||
<property name="margin-end">50</property>
|
||||
<property name="spacing">10</property>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
|
||||
@@ -63,7 +63,7 @@ do_sidebar (GtkWidget *do_widget)
|
||||
if (i == 0)
|
||||
{
|
||||
widget = gtk_image_new_from_icon_name ("org.gtk.Demo4");
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (widget), "icon-dropshadow");
|
||||
gtk_widget_add_css_class (widget, "icon-dropshadow");
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (widget), 256);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -108,7 +108,10 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 5);
|
||||
gtk_widget_set_margin_end (vbox, 5);
|
||||
gtk_widget_set_margin_top (vbox, 5);
|
||||
gtk_widget_set_margin_bottom (vbox, 5);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
|
||||
@@ -119,7 +122,10 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
g_object_set (table, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (table, 5);
|
||||
gtk_widget_set_margin_end (table, 5);
|
||||
gtk_widget_set_margin_top (table, 5);
|
||||
gtk_widget_set_margin_bottom (table, 5);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 5);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
@@ -132,7 +138,10 @@ do_sizegroup (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (vbox), frame);
|
||||
|
||||
table = gtk_grid_new ();
|
||||
g_object_set (table, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (table, 5);
|
||||
gtk_widget_set_margin_end (table, 5);
|
||||
gtk_widget_set_margin_top (table, 5);
|
||||
gtk_widget_set_margin_bottom (table, 5);
|
||||
gtk_grid_set_row_spacing (GTK_GRID (table), 5);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (table), 10);
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
@@ -160,47 +160,13 @@ check_solved (GtkWidget *grid)
|
||||
}
|
||||
|
||||
static gboolean
|
||||
puzzle_key_pressed (GtkEventControllerKey *controller,
|
||||
guint keyval,
|
||||
guint keycode,
|
||||
GdkModifierType state,
|
||||
GtkWidget *grid)
|
||||
puzzle_key_pressed (GtkWidget *grid,
|
||||
GVariant *args,
|
||||
gpointer unused)
|
||||
{
|
||||
int dx, dy;
|
||||
|
||||
dx = 0;
|
||||
dy = 0;
|
||||
|
||||
switch (keyval)
|
||||
{
|
||||
case GDK_KEY_KP_Left:
|
||||
case GDK_KEY_Left:
|
||||
/* left */
|
||||
dx = -1;
|
||||
break;
|
||||
|
||||
case GDK_KEY_KP_Up:
|
||||
case GDK_KEY_Up:
|
||||
/* up */
|
||||
dy = -1;
|
||||
break;
|
||||
|
||||
case GDK_KEY_KP_Right:
|
||||
case GDK_KEY_Right:
|
||||
/* right */
|
||||
dx = 1;
|
||||
break;
|
||||
|
||||
case GDK_KEY_KP_Down:
|
||||
case GDK_KEY_Down:
|
||||
/* down */
|
||||
dy = 1;
|
||||
break;
|
||||
|
||||
default:
|
||||
/* We return FALSE here because we didn't handle the key that was pressed */
|
||||
return FALSE;
|
||||
}
|
||||
g_variant_get (args, "(ii)", &dx, &dy);
|
||||
|
||||
if (!move_puzzle (grid, dx, dy))
|
||||
{
|
||||
@@ -277,7 +243,24 @@ puzzle_button_pressed (GtkGestureClick *gesture,
|
||||
}
|
||||
|
||||
static void
|
||||
start_puzzle (GdkPaintable *puzzle)
|
||||
add_move_binding (GtkShortcutController *controller,
|
||||
guint keyval,
|
||||
guint kp_keyval,
|
||||
int dx,
|
||||
int dy)
|
||||
{
|
||||
GtkShortcut *shortcut;
|
||||
|
||||
shortcut = gtk_shortcut_new_with_arguments (
|
||||
gtk_alternative_trigger_new (gtk_keyval_trigger_new (keyval, 0),
|
||||
gtk_keyval_trigger_new (kp_keyval, 0)),
|
||||
gtk_callback_action_new (puzzle_key_pressed, NULL, NULL),
|
||||
"(ii)", dx, dy);
|
||||
gtk_shortcut_controller_add_shortcut (controller, shortcut);
|
||||
}
|
||||
|
||||
static void
|
||||
start_puzzle (GdkPaintable *paintable)
|
||||
{
|
||||
GtkWidget *picture, *grid;
|
||||
GtkEventController *controller;
|
||||
@@ -293,17 +276,26 @@ start_puzzle (GdkPaintable *puzzle)
|
||||
grid = gtk_grid_new ();
|
||||
gtk_widget_set_can_focus (grid, TRUE);
|
||||
gtk_container_add (GTK_CONTAINER (frame), grid);
|
||||
aspect_ratio = gdk_paintable_get_intrinsic_aspect_ratio (puzzle);
|
||||
aspect_ratio = gdk_paintable_get_intrinsic_aspect_ratio (paintable);
|
||||
if (aspect_ratio == 0.0)
|
||||
aspect_ratio = 1.0;
|
||||
gtk_aspect_frame_set (GTK_ASPECT_FRAME (frame), 0.5, 0.5, aspect_ratio, FALSE);
|
||||
|
||||
/* Add a key event controller so people can use the arrow
|
||||
/* Add shortcuts so people can use the arrow
|
||||
* keys to move the puzzle */
|
||||
controller = gtk_event_controller_key_new ();
|
||||
g_signal_connect (controller, "key-pressed",
|
||||
G_CALLBACK (puzzle_key_pressed),
|
||||
grid);
|
||||
controller = gtk_shortcut_controller_new ();
|
||||
add_move_binding (GTK_SHORTCUT_CONTROLLER (controller),
|
||||
GDK_KEY_Left, GDK_KEY_KP_Left,
|
||||
-1, 0);
|
||||
add_move_binding (GTK_SHORTCUT_CONTROLLER (controller),
|
||||
GDK_KEY_Right, GDK_KEY_KP_Right,
|
||||
1, 0);
|
||||
add_move_binding (GTK_SHORTCUT_CONTROLLER (controller),
|
||||
GDK_KEY_Up, GDK_KEY_KP_Up,
|
||||
0, -1);
|
||||
add_move_binding (GTK_SHORTCUT_CONTROLLER (controller),
|
||||
GDK_KEY_Down, GDK_KEY_KP_Down,
|
||||
0, 1);
|
||||
gtk_widget_add_controller (GTK_WIDGET (grid), controller);
|
||||
|
||||
controller = GTK_EVENT_CONTROLLER (gtk_gesture_click_new ());
|
||||
@@ -332,7 +324,7 @@ start_puzzle (GdkPaintable *puzzle)
|
||||
if (x == pos_x && y == pos_y)
|
||||
piece = NULL;
|
||||
else
|
||||
piece = gtk_puzzle_piece_new (puzzle,
|
||||
piece = gtk_puzzle_piece_new (paintable,
|
||||
x, y,
|
||||
width, height);
|
||||
picture = gtk_picture_new_for_paintable (piece);
|
||||
@@ -390,7 +382,7 @@ reconfigure (void)
|
||||
}
|
||||
|
||||
static void
|
||||
add_choice (GtkWidget *choices,
|
||||
add_choice (GtkWidget *container,
|
||||
GdkPaintable *paintable)
|
||||
{
|
||||
GtkWidget *icon;
|
||||
@@ -398,7 +390,7 @@ add_choice (GtkWidget *choices,
|
||||
icon = gtk_image_new_from_paintable (paintable);
|
||||
gtk_image_set_icon_size (GTK_IMAGE (icon), GTK_ICON_SIZE_LARGE);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (choices), icon);
|
||||
gtk_container_add (GTK_CONTAINER (container), icon);
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
@@ -421,10 +413,13 @@ do_sliding_puzzle (GtkWidget *do_widget)
|
||||
tweaks = gtk_grid_new ();
|
||||
gtk_grid_set_row_spacing (GTK_GRID (tweaks), 10);
|
||||
gtk_grid_set_column_spacing (GTK_GRID (tweaks), 10);
|
||||
g_object_set (tweaks, "margin", 10, NULL);
|
||||
gtk_widget_set_margin_start (tweaks, 10);
|
||||
gtk_widget_set_margin_end (tweaks, 10);
|
||||
gtk_widget_set_margin_top (tweaks, 10);
|
||||
gtk_widget_set_margin_bottom (tweaks, 10);
|
||||
|
||||
choices = gtk_flow_box_new ();
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (choices), GTK_STYLE_CLASS_VIEW);
|
||||
gtk_widget_add_css_class (choices, GTK_STYLE_CLASS_VIEW);
|
||||
add_choice (choices, puzzle);
|
||||
add_choice (choices, gtk_nuclear_animation_new ());
|
||||
media = gtk_media_file_new_for_resource ("/images/gtk-logo.webm");
|
||||
@@ -448,7 +443,7 @@ do_sliding_puzzle (GtkWidget *do_widget)
|
||||
gtk_grid_attach (GTK_GRID (tweaks), apply, 1, 2, 1, 1);
|
||||
g_signal_connect (apply, "clicked", G_CALLBACK (reconfigure), NULL);
|
||||
|
||||
popover = gtk_popover_new (NULL);
|
||||
popover = gtk_popover_new ();
|
||||
gtk_container_add (GTK_CONTAINER (popover), tweaks);
|
||||
|
||||
tweak = gtk_menu_button_new ();
|
||||
|
||||
@@ -106,7 +106,7 @@ spinbutton_time_spin_output (GtkSpinButton *spin_button)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static gchar *month[12] = {
|
||||
static const char *month[12] = {
|
||||
"January",
|
||||
"February",
|
||||
"March",
|
||||
|
||||
@@ -27,7 +27,10 @@
|
||||
<property name="title" translatable="yes">Spin Button</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<child>
|
||||
|
||||
@@ -52,7 +52,10 @@ do_spinner (GtkWidget *do_widget)
|
||||
content_area = gtk_dialog_get_content_area (GTK_DIALOG (window));
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 5);
|
||||
g_object_set (vbox, "margin", 5, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 5);
|
||||
gtk_widget_set_margin_end (vbox, 5);
|
||||
gtk_widget_set_margin_top (vbox, 5);
|
||||
gtk_widget_set_margin_bottom (vbox, 5);
|
||||
gtk_container_add (GTK_CONTAINER (content_area), vbox);
|
||||
|
||||
/* Sensitive */
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="transition-type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkStackPage">
|
||||
@@ -38,7 +37,6 @@
|
||||
<property name="child">
|
||||
<object class="GtkCheckButton">
|
||||
<property name="label" translatable="yes">Page 2</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
</object>
|
||||
@@ -53,7 +51,7 @@
|
||||
<object class="GtkSpinner">
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="active">1</property>
|
||||
<property name="spinning">1</property>
|
||||
</object>
|
||||
</property>
|
||||
</object>
|
||||
|
||||
@@ -25,7 +25,7 @@ add_tag (GtkButton *button, DemoTaggedEntry *entry)
|
||||
DemoTaggedEntryTag *tag;
|
||||
|
||||
tag = demo_tagged_entry_tag_new ("Blue");
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (GTK_WIDGET (tag)), "blue");
|
||||
gtk_widget_add_css_class (GTK_WIDGET (tag), "blue");
|
||||
demo_tagged_entry_tag_set_has_close_button (tag, TRUE);
|
||||
g_signal_connect (tag, "button-clicked", G_CALLBACK (closed_cb), entry);
|
||||
|
||||
@@ -76,7 +76,10 @@ do_tagged_entry (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
|
||||
g_object_set (box, "margin", 18, NULL);
|
||||
gtk_widget_set_margin_start (box, 18);
|
||||
gtk_widget_set_margin_end (box, 18);
|
||||
gtk_widget_set_margin_top (box, 18);
|
||||
gtk_widget_set_margin_bottom (box, 18);
|
||||
gtk_container_add (GTK_CONTAINER (window), box);
|
||||
|
||||
entry = demo_tagged_entry_new ();
|
||||
@@ -95,7 +98,7 @@ do_tagged_entry (GtkWidget *do_widget)
|
||||
gtk_container_add (GTK_CONTAINER (box2), button);
|
||||
|
||||
button = gtk_button_new_with_mnemonic ("_Done");
|
||||
gtk_style_context_add_class (gtk_widget_get_style_context (button), "suggested-action");
|
||||
gtk_widget_add_css_class (button, "suggested-action");
|
||||
g_signal_connect_swapped (button, "clicked", G_CALLBACK (gtk_widget_destroy), window);
|
||||
gtk_header_bar_pack_end (GTK_HEADER_BAR (header), button);
|
||||
|
||||
|
||||
@@ -12,7 +12,10 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
@@ -25,21 +28,18 @@
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">Hi, I am a button</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">And I'm another button</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">This is a button party!</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
<interface>
|
||||
<object class="GtkGrid" id="grid">
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
@@ -14,21 +17,18 @@
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">Hi, I am a button</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">And I'm another button</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton">
|
||||
<property name="label" translatable="yes">This is a button party!</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -33,7 +33,10 @@ do_transparent (GtkWidget *do_widget)
|
||||
|
||||
button = gtk_button_new_with_label ("Don't click this button!");
|
||||
label = gtk_bin_get_child (GTK_BIN (button));
|
||||
g_object_set (label, "margin", 50, NULL);
|
||||
gtk_widget_set_margin_start (label, 50);
|
||||
gtk_widget_set_margin_end (label, 50);
|
||||
gtk_widget_set_margin_top (label, 50);
|
||||
gtk_widget_set_margin_bottom (label, 50);
|
||||
|
||||
gtk_widget_set_opacity (button, 0.7);
|
||||
gtk_widget_set_halign (button, GTK_ALIGN_FILL);
|
||||
@@ -43,7 +46,10 @@ do_transparent (GtkWidget *do_widget)
|
||||
|
||||
button = gtk_button_new_with_label ("Maybe this one?");
|
||||
label = gtk_bin_get_child (GTK_BIN (button));
|
||||
g_object_set (label, "margin", 50, NULL);
|
||||
gtk_widget_set_margin_start (label, 50);
|
||||
gtk_widget_set_margin_end (label, 50);
|
||||
gtk_widget_set_margin_top (label, 50);
|
||||
gtk_widget_set_margin_bottom (label, 50);
|
||||
|
||||
gtk_widget_set_opacity (button, 0.7);
|
||||
gtk_widget_set_halign (button, GTK_ALIGN_FILL);
|
||||
|
||||
@@ -398,7 +398,10 @@ do_tree_store (GtkWidget *do_widget)
|
||||
G_CALLBACK (gtk_widget_destroyed), &window);
|
||||
|
||||
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 8);
|
||||
g_object_set (vbox, "margin", 8, NULL);
|
||||
gtk_widget_set_margin_start (vbox, 8);
|
||||
gtk_widget_set_margin_end (vbox, 8);
|
||||
gtk_widget_set_margin_top (vbox, 8);
|
||||
gtk_widget_set_margin_bottom (vbox, 8);
|
||||
gtk_container_add (GTK_CONTAINER (window), vbox);
|
||||
|
||||
gtk_container_add (GTK_CONTAINER (vbox),
|
||||
|
||||
@@ -48,9 +48,9 @@ static void
|
||||
fullscreen_clicked_cb (GtkWidget *button,
|
||||
gpointer unused)
|
||||
{
|
||||
GtkWidget *window = GTK_WIDGET (gtk_widget_get_root (button));
|
||||
GtkWidget *widget_window = GTK_WIDGET (gtk_widget_get_root (button));
|
||||
|
||||
gtk_window_fullscreen (GTK_WINDOW (window));
|
||||
gtk_window_fullscreen (GTK_WINDOW (widget_window));
|
||||
}
|
||||
|
||||
GtkWidget *
|
||||
|
||||
@@ -201,7 +201,10 @@ add_context (IconBrowserWindow *win,
|
||||
gtk_label_set_xalign (GTK_LABEL (row), 0);
|
||||
g_object_set_data (G_OBJECT (row), "context", c);
|
||||
gtk_widget_show (row);
|
||||
g_object_set (row, "margin", 10, NULL);
|
||||
gtk_widget_set_margin_start (row, 10);
|
||||
gtk_widget_set_margin_end (row, 10);
|
||||
gtk_widget_set_margin_top (row, 10);
|
||||
gtk_widget_set_margin_bottom (row, 10);
|
||||
|
||||
gtk_list_box_insert (GTK_LIST_BOX (win->context_list), row, -1);
|
||||
|
||||
@@ -380,6 +383,8 @@ get_image_paintable (GtkImage *image)
|
||||
if (icon == NULL)
|
||||
return NULL;
|
||||
return GDK_PAINTABLE (icon);
|
||||
case GTK_IMAGE_GICON:
|
||||
case GTK_IMAGE_EMPTY:
|
||||
default:
|
||||
g_warning ("Image storage type %d not handled",
|
||||
gtk_image_get_storage_type (image));
|
||||
|
||||
@@ -11,6 +11,7 @@ iconbrowser_resources = gnome.compile_resources('iconbrowser_resources',
|
||||
|
||||
executable('gtk4-icon-browser',
|
||||
iconbrowser_sources, iconbrowser_resources,
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
|
||||
@@ -77,7 +77,8 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="sw">
|
||||
<property name="expand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<child>
|
||||
<object class="GtkIconView" id="list">
|
||||
@@ -124,7 +125,10 @@
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="row-spacing">18</property>
|
||||
<property name="column-spacing">18</property>
|
||||
<property name="halign">center</property>
|
||||
@@ -375,13 +379,19 @@
|
||||
<property name="label" translatable="yes">Copy to Clipboard</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<signal name="clicked" handler="copy_to_clipboard"/>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="description">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="wrap">1</property>
|
||||
<property name="max-width-chars">60</property>
|
||||
<property name="valign">start</property>
|
||||
|
||||
@@ -13,7 +13,9 @@ executable('gtk4-node-editor',
|
||||
node_editor_sources, node_editor_resources,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
c_args: ['-DNODE_EDITOR_SOURCE_DIR="@0@/../../testsuite/gsk/compare/"'.format(meson.current_source_dir())],
|
||||
c_args: [
|
||||
'-DNODE_EDITOR_SOURCE_DIR="@0@/../../testsuite/gsk/compare/"'.format(meson.current_source_dir())
|
||||
] + common_cflags,
|
||||
gui_app: true,
|
||||
link_args: extra_demo_ldflags,
|
||||
install: false)
|
||||
|
||||
@@ -425,17 +425,17 @@ save_response_cb (GtkWidget *dialog,
|
||||
&error);
|
||||
if (error != NULL)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
GtkWidget *message_dialog;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"Saving failed");
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
|
||||
message_dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_root (GTK_WIDGET (self))),
|
||||
GTK_DIALOG_MODAL|GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
GTK_MESSAGE_INFO,
|
||||
GTK_BUTTONS_OK,
|
||||
"Saving failed");
|
||||
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (message_dialog),
|
||||
"%s", error->message);
|
||||
g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
gtk_widget_show (dialog);
|
||||
g_signal_connect (message_dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL);
|
||||
gtk_widget_show (message_dialog);
|
||||
g_error_free (error);
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,8 @@
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<property name="expand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="text_view">
|
||||
<property name="wrap-mode">word</property>
|
||||
@@ -156,7 +157,8 @@
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="expand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<property name="min-content-height">100</property>
|
||||
<property name="min-content-width">100</property>
|
||||
<child>
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Primary>q</property>
|
||||
<property name="accelerator"><Control>q</property>
|
||||
<property name="title">Quit</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Primary>d</property>
|
||||
<property name="accelerator"><Control>d</property>
|
||||
<property name="title">Switch to dark theme</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -31,7 +31,7 @@
|
||||
<property name="view">page2</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Primary>s</property>
|
||||
<property name="accelerator"><Control>s</property>
|
||||
<property name="title">Search</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -43,7 +43,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Primary>b</property>
|
||||
<property name="accelerator"><Control>b</property>
|
||||
<property name="title">Set background</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -55,19 +55,19 @@
|
||||
<property name="view">page3</property>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Primary>o</property>
|
||||
<property name="accelerator"><Control>o</property>
|
||||
<property name="title">Open a file</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Primary>r</property>
|
||||
<property name="accelerator"><Control>r</property>
|
||||
<property name="title">Start recording</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkShortcutsShortcut">
|
||||
<property name="accelerator"><Primary>l</property>
|
||||
<property name="accelerator"><Control>l</property>
|
||||
<property name="title">Lock or unlock</property>
|
||||
</object>
|
||||
</child>
|
||||
|
||||
@@ -6,6 +6,7 @@ widgetfactory_resources = gnome.compile_resources('widgetfactory_resources',
|
||||
|
||||
executable('gtk4-widget-factory',
|
||||
'widget-factory.c', widgetfactory_resources,
|
||||
c_args: common_cflags,
|
||||
dependencies: libgtk_dep,
|
||||
include_directories: confinc,
|
||||
gui_app: true,
|
||||
|
||||
@@ -25,16 +25,83 @@
|
||||
#include <glib/gi18n.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static char *current_theme;
|
||||
|
||||
static void
|
||||
change_dark_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
gboolean prefer_dark = g_variant_get_boolean (state);
|
||||
char *theme;
|
||||
const char *new_theme = NULL;
|
||||
|
||||
g_object_get (G_OBJECT (settings),
|
||||
"gtk-theme-name", &theme,
|
||||
NULL);
|
||||
|
||||
if (prefer_dark)
|
||||
{
|
||||
if (strcmp (theme, "Adwaita") == 0)
|
||||
new_theme = "Adwaita-dark";
|
||||
else if (strcmp (theme, "HighContrastInverse") == 0)
|
||||
new_theme = "HighContrast";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (strcmp (theme, "Adwaita-dark") == 0)
|
||||
new_theme = "Adwaita";
|
||||
else if (strcmp (theme, "HighContrast") == 0)
|
||||
new_theme = "HighContrastInverse";
|
||||
}
|
||||
|
||||
if (new_theme)
|
||||
g_object_set (G_OBJECT (settings),
|
||||
"gtk-theme-name", new_theme,
|
||||
NULL);
|
||||
|
||||
g_simple_action_set_state (action, state);
|
||||
|
||||
g_free (theme);
|
||||
}
|
||||
|
||||
static void
|
||||
change_theme_state (GSimpleAction *action,
|
||||
GVariant *state,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
const char *s;
|
||||
const char *theme;
|
||||
|
||||
s = g_variant_get_string (state, NULL);
|
||||
|
||||
if (strcmp (s, "adwaita") == 0)
|
||||
{
|
||||
theme = "Adwaita";
|
||||
}
|
||||
else if (strcmp (s, "adwaita-dark") == 0)
|
||||
{
|
||||
theme = "Adwaita-dark";
|
||||
}
|
||||
else if (strcmp (s, "highcontrast") == 0)
|
||||
{
|
||||
theme = "HighContrast";
|
||||
}
|
||||
else if (strcmp (s, "highcontrast-inverse") == 0)
|
||||
{
|
||||
theme = "HighContrastInverse";
|
||||
}
|
||||
else if (strcmp (s, "current") == 0)
|
||||
{
|
||||
theme = current_theme;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
||||
g_object_set (G_OBJECT (settings),
|
||||
"gtk-application-prefer-dark-theme",
|
||||
g_variant_get_boolean (state),
|
||||
"gtk-theme-name", theme,
|
||||
NULL);
|
||||
|
||||
g_simple_action_set_state (action, state);
|
||||
@@ -391,24 +458,17 @@ on_entry_icon_release (GtkEntry *entry,
|
||||
|
||||
#define EPSILON (1e-10)
|
||||
|
||||
static gboolean
|
||||
on_scale_button_query_tooltip (GtkWidget *button,
|
||||
gint x,
|
||||
gint y,
|
||||
gboolean keyboard_mode,
|
||||
GtkTooltip *tooltip,
|
||||
gpointer user_data)
|
||||
static void
|
||||
on_scale_button_value_changed (GtkScaleButton *button,
|
||||
gdouble value,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkScaleButton *scale_button = GTK_SCALE_BUTTON (button);
|
||||
GtkAdjustment *adjustment;
|
||||
gdouble val;
|
||||
gchar *str;
|
||||
AtkImage *image;
|
||||
|
||||
image = ATK_IMAGE (gtk_widget_get_accessible (button));
|
||||
|
||||
adjustment = gtk_scale_button_get_adjustment (scale_button);
|
||||
val = gtk_scale_button_get_value (scale_button);
|
||||
adjustment = gtk_scale_button_get_adjustment (button);
|
||||
val = gtk_scale_button_get_value (button);
|
||||
|
||||
if (val < (gtk_adjustment_get_lower (adjustment) + EPSILON))
|
||||
{
|
||||
@@ -427,32 +487,21 @@ on_scale_button_query_tooltip (GtkWidget *button,
|
||||
str = g_strdup_printf (C_("volume percentage", "%d %%"), percent);
|
||||
}
|
||||
|
||||
gtk_tooltip_set_text (tooltip, str);
|
||||
atk_image_set_image_description (image, str);
|
||||
gtk_widget_set_tooltip_text (GTK_WIDGET (button), str);
|
||||
atk_object_set_description (gtk_widget_get_accessible (GTK_WIDGET (button)), str);
|
||||
|
||||
g_free (str);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
on_scale_button_value_changed (GtkScaleButton *button,
|
||||
gdouble value,
|
||||
gpointer user_data)
|
||||
{
|
||||
gtk_widget_trigger_tooltip_query (GTK_WIDGET (button));
|
||||
}
|
||||
|
||||
static void
|
||||
on_record_button_toggled (GtkToggleButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkStyleContext *context;
|
||||
|
||||
context = gtk_widget_get_style_context (GTK_WIDGET (button));
|
||||
if (gtk_toggle_button_get_active (button))
|
||||
gtk_style_context_remove_class (context, "destructive-action");
|
||||
gtk_widget_remove_css_class (GTK_WIDGET (button), "destructive-action");
|
||||
else
|
||||
gtk_style_context_add_class (context, "destructive-action");
|
||||
gtk_widget_add_css_class (GTK_WIDGET (button), "destructive-action");
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -796,7 +845,10 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
|
||||
"halign", GTK_ALIGN_START,
|
||||
"valign", GTK_ALIGN_CENTER,
|
||||
"hexpand", TRUE,
|
||||
"margin", 6,
|
||||
"margin-start", 6,
|
||||
"margin-end", 6,
|
||||
"margin-top", 6,
|
||||
"margin-bottom", 6,
|
||||
"xalign", 0.0,
|
||||
NULL);
|
||||
gtk_container_add (GTK_CONTAINER (row), label);
|
||||
@@ -806,7 +858,10 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
|
||||
"selectable", FALSE,
|
||||
"halign", GTK_ALIGN_END,
|
||||
"valign", GTK_ALIGN_CENTER,
|
||||
"margin", 6,
|
||||
"margin-start", 6,
|
||||
"margin-end", 6,
|
||||
"margin-top", 6,
|
||||
"margin-bottom", 6,
|
||||
"height-request", 24,
|
||||
NULL);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
@@ -906,7 +961,10 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
g_object_set (label,
|
||||
"halign", GTK_ALIGN_START,
|
||||
"valign", GTK_ALIGN_CENTER,
|
||||
"margin", 6,
|
||||
"margin-start", 6,
|
||||
"margin-end", 6,
|
||||
"margin-top", 6,
|
||||
"margin-bottom", 6,
|
||||
"hexpand", TRUE,
|
||||
"xalign", 0.0,
|
||||
NULL);
|
||||
@@ -917,7 +975,10 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
"selectable", FALSE,
|
||||
"halign", GTK_ALIGN_END,
|
||||
"valign", GTK_ALIGN_CENTER,
|
||||
"margin", 6,
|
||||
"margin-start", 6,
|
||||
"margin-end", 6,
|
||||
"margin-top", 6,
|
||||
"margin-bottom", 6,
|
||||
"height-request", 24,
|
||||
NULL);
|
||||
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||
@@ -1063,6 +1124,7 @@ typedef struct
|
||||
|
||||
typedef GtkTextViewClass MyTextViewClass;
|
||||
|
||||
static GType my_text_view_get_type (void);
|
||||
G_DEFINE_TYPE (MyTextView, my_text_view, GTK_TYPE_TEXT_VIEW)
|
||||
|
||||
static void
|
||||
@@ -1434,6 +1496,7 @@ struct _GTestPermissionClass
|
||||
GPermissionClass parent_class;
|
||||
};
|
||||
|
||||
static GType g_test_permission_get_type (void);
|
||||
G_DEFINE_TYPE (GTestPermission, g_test_permission, G_TYPE_PERMISSION)
|
||||
|
||||
static void
|
||||
@@ -1472,7 +1535,7 @@ acquire_async (GPermission *permission,
|
||||
g_object_unref (task);
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
acquire_finish (GPermission *permission,
|
||||
GAsyncResult *res,
|
||||
GError **error)
|
||||
@@ -1501,7 +1564,7 @@ release_async (GPermission *permission,
|
||||
g_object_unref (task);
|
||||
}
|
||||
|
||||
gboolean
|
||||
static gboolean
|
||||
release_finish (GPermission *permission,
|
||||
GAsyncResult *result,
|
||||
GError **error)
|
||||
@@ -1630,9 +1693,10 @@ static void
|
||||
set_up_context_popover (GtkWidget *widget,
|
||||
GMenuModel *model)
|
||||
{
|
||||
GtkWidget *popover = gtk_popover_menu_new_from_model (widget, model);
|
||||
GtkWidget *popover = gtk_popover_menu_new_from_model (model);
|
||||
GtkGesture *gesture;
|
||||
|
||||
gtk_widget_set_parent (popover, widget);
|
||||
gtk_popover_set_has_arrow (GTK_POPOVER (popover), FALSE);
|
||||
gesture = gtk_gesture_click_new ();
|
||||
gtk_gesture_single_set_button (GTK_GESTURE_SINGLE (gesture), GDK_BUTTON_SECONDARY);
|
||||
@@ -1656,7 +1720,8 @@ activate (GApplication *app)
|
||||
GtkCssProvider *provider;
|
||||
GMenuModel *model;
|
||||
static GActionEntry win_entries[] = {
|
||||
{ "dark", NULL, NULL, "false", change_theme_state },
|
||||
{ "dark", NULL, NULL, "false", change_dark_state },
|
||||
{ "theme", NULL, "s", "'current'", change_theme_state },
|
||||
{ "transition", NULL, NULL, "false", change_transition_state },
|
||||
{ "search", activate_search, NULL, NULL, NULL },
|
||||
{ "delete", activate_delete, NULL, NULL, NULL },
|
||||
@@ -1671,23 +1736,27 @@ activate (GApplication *app)
|
||||
const gchar *accelerators[2];
|
||||
} accels[] = {
|
||||
{ "app.about", { "F1", NULL } },
|
||||
{ "app.quit", { "<Primary>q", NULL } },
|
||||
{ "app.open-in", { "<Primary>n", NULL } },
|
||||
{ "app.cut", { "<Primary>x", NULL } },
|
||||
{ "app.copy", { "<Primary>c", NULL } },
|
||||
{ "app.paste", { "<Primary>v", NULL } },
|
||||
{ "win.dark", { "<Primary>d", NULL } },
|
||||
{ "win.search", { "<Primary>s", NULL } },
|
||||
{ "app.quit", { "<Control>q", NULL } },
|
||||
{ "app.open-in", { "<Control>n", NULL } },
|
||||
{ "app.cut", { "<Control>x", NULL } },
|
||||
{ "app.copy", { "<Control>c", NULL } },
|
||||
{ "app.paste", { "<Control>v", NULL } },
|
||||
{ "win.dark", { "<Control>d", NULL } },
|
||||
{ "win.search", { "<Control>s", NULL } },
|
||||
{ "win.delete", { "Delete", NULL } },
|
||||
{ "win.background", { "<Primary>b", NULL } },
|
||||
{ "win.open", { "<Primary>o", NULL } },
|
||||
{ "win.record", { "<Primary>r", NULL } },
|
||||
{ "win.lock", { "<Primary>l", NULL } },
|
||||
{ "win.background", { "<Control>b", NULL } },
|
||||
{ "win.open", { "<Control>o", NULL } },
|
||||
{ "win.record", { "<Control>r", NULL } },
|
||||
{ "win.lock", { "<Control>l", NULL } },
|
||||
};
|
||||
gint i;
|
||||
GPermission *permission;
|
||||
GAction *action;
|
||||
|
||||
g_object_get (gtk_settings_get_default (),
|
||||
"gtk-theme-name", ¤t_theme,
|
||||
NULL);
|
||||
|
||||
g_type_ensure (my_text_view_get_type ());
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
@@ -1702,7 +1771,6 @@ activate (GApplication *app)
|
||||
gtk_builder_cscope_add_callback_symbols (GTK_BUILDER_CSCOPE (scope),
|
||||
"on_entry_icon_release", (GCallback)on_entry_icon_release,
|
||||
"on_scale_button_value_changed", (GCallback)on_scale_button_value_changed,
|
||||
"on_scale_button_query_tooltip", (GCallback)on_scale_button_query_tooltip,
|
||||
"on_record_button_toggled", (GCallback)on_record_button_toggled,
|
||||
"on_page_combo_changed", (GCallback)on_page_combo_changed,
|
||||
"on_range_from_changed", (GCallback)on_range_from_changed,
|
||||
|
||||
@@ -6,10 +6,36 @@
|
||||
<attribute name="label" translatable="yes">Get Busy</attribute>
|
||||
<attribute name="action">win.busy</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Dark Theme</attribute>
|
||||
<attribute name="action">win.dark</attribute>
|
||||
</item>
|
||||
<submenu>
|
||||
<attribute name="label" translatable="yes">Style</attribute>
|
||||
<section>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Current</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">current</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Adwaita</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">adwaita</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Adwaita dark</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">adwaita-dark</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">High contrast</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">highcontrast</attribute>
|
||||
</item>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">High contrast inverse</attribute>
|
||||
<attribute name="action">win.theme</attribute>
|
||||
<attribute name="target">highcontrast-inverse</attribute>
|
||||
</item>
|
||||
</section>
|
||||
</submenu>
|
||||
<item>
|
||||
<attribute name="label" translatable="yes">Slide Pages</attribute>
|
||||
<attribute name="action">win.transition</attribute>
|
||||
@@ -428,7 +454,10 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="box1">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="toplevel_stack">
|
||||
<property name="transition-duration">1000</property>
|
||||
@@ -505,7 +534,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button224">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="icon-name">window-close-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -596,14 +624,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton1">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="checkbutton2">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">1</property>
|
||||
@@ -614,7 +640,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkCheckButton" id="checkbutton3">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="inconsistent">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">2</property>
|
||||
@@ -625,7 +650,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkCheckButton" id="checkbutton4">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
@@ -637,7 +661,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkCheckButton" id="checkbutton5">
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">4</property>
|
||||
@@ -649,7 +672,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="label" translatable="yes">checkbutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="inconsistent">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
<property name="top-attach">5</property>
|
||||
@@ -659,7 +681,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="radiobutton1">
|
||||
<property name="label" translatable="yes">radiobutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
@@ -670,8 +691,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="radiobutton2">
|
||||
<property name="label" translatable="yes">radiobutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="group">radiobutton1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
@@ -683,8 +702,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkRadioButton" id="radiobutton3">
|
||||
<property name="label" translatable="yes">radiobutton</property>
|
||||
<property name="inconsistent">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="group">radiobutton1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
@@ -696,8 +713,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkRadioButton" id="radiobutton4">
|
||||
<property name="label" translatable="yes">radiobutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
<property name="top-attach">3</property>
|
||||
@@ -708,8 +723,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkRadioButton" id="radiobutton5">
|
||||
<property name="label" translatable="yes">radiobutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="group">radiobutton3</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
@@ -722,8 +735,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="label" translatable="yes">radiobutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="inconsistent">1</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="active">1</property>
|
||||
<property name="group">radiobutton3</property>
|
||||
<layout>
|
||||
<property name="left-attach">1</property>
|
||||
@@ -733,7 +744,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="spinner1">
|
||||
<property name="active">1</property>
|
||||
<property name="spinning">1</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
</layout>
|
||||
@@ -749,7 +760,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinner" id="spinner3">
|
||||
<property name="active">1</property>
|
||||
<property name="spinning">1</property>
|
||||
<property name="sensitive">0</property>
|
||||
<layout>
|
||||
<property name="left-attach">2</property>
|
||||
@@ -782,7 +793,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="togglebutton1">
|
||||
<property name="label" translatable="yes">togglebutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -790,14 +800,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkToggleButton" id="togglebutton2">
|
||||
<property name="label" translatable="yes">togglebutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleButton" id="togglebutton3">
|
||||
<property name="label" translatable="yes">togglebutton</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
@@ -806,7 +814,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkToggleButton" id="togglebutton4">
|
||||
<property name="label" translatable="yes">togglebutton</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="active">1</property>
|
||||
</object>
|
||||
@@ -838,14 +845,12 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFontButton" id="fontbutton1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="level">family|style|size|features|variations</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="colorbutton1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="rgba">#31316867a09f</property>
|
||||
<property name="use-alpha">1</property>
|
||||
@@ -857,7 +862,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkLinkButton" id="linkbutton1">
|
||||
<property name="label" translatable="yes">link button</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="receives-default">1</property>
|
||||
<property name="has-tooltip">1</property>
|
||||
<property name="relief">none</property>
|
||||
@@ -936,7 +940,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="homogeneous">1</property>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="restrict-to-fill-level">0</property>
|
||||
<property name="fill-level">75</property>
|
||||
@@ -946,7 +949,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale2">
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="restrict-to-fill-level">0</property>
|
||||
<property name="fill-level">75</property>
|
||||
@@ -959,7 +961,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale5">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="draw-value">0</property>
|
||||
<property name="has-origin">0</property>
|
||||
<property name="round-digits">0</property>
|
||||
@@ -1007,7 +1008,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkScale" id="scale3">
|
||||
<property name="height-request">100</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="restrict-to-fill-level">0</property>
|
||||
@@ -1020,7 +1020,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<object class="GtkScale" id="scale4">
|
||||
<property name="height-request">100</property>
|
||||
<property name="sensitive">0</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="restrict-to-fill-level">0</property>
|
||||
@@ -1113,13 +1112,11 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow1">
|
||||
<property name="width-request">150</property>
|
||||
<property name="can-focus">1</property>
|
||||
<property name="vscrollbar-policy">always</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkTreeView" id="treeview1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="model">liststore1</property>
|
||||
<property name="headers-clickable">0</property>
|
||||
<property name="search-column">0</property>
|
||||
@@ -1190,12 +1187,10 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="textview1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="buffer">textbuffer1</property>
|
||||
<property name="wrap-mode">2</property>
|
||||
<property name="left-margin">10</property>
|
||||
@@ -1217,7 +1212,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<property name="homogeneous">1</property>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook1">
|
||||
<property name="can-focus">1</property>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
<property name="child">
|
||||
@@ -1265,7 +1259,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook2">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="tab-pos">right</property>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
@@ -1315,7 +1308,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook3">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="tab-pos">bottom</property>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
@@ -1365,7 +1357,6 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkNotebook" id="notebook4">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="tab-pos">left</property>
|
||||
<child>
|
||||
<object class="GtkNotebookPage">
|
||||
@@ -1438,7 +1429,10 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="page2box">
|
||||
<property name="spacing">20</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="page2note">
|
||||
<property name="hexpand">1</property>
|
||||
@@ -1516,7 +1510,6 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="value">.5</property>
|
||||
<property name="halign">center</property>
|
||||
<signal name="query-tooltip" handler="on_scale_button_query_tooltip" swapped="no"/>
|
||||
<signal name="value-changed" handler="on_scale_button_value_changed" swapped="no"/>
|
||||
<layout>
|
||||
<property name="left-attach">0</property>
|
||||
@@ -1550,7 +1543,6 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="hscrollbar-policy">never</property>
|
||||
<child>
|
||||
<object class="GtkTextView" id="tvo">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="buffer">textbuffer2</property>
|
||||
<property name="left-margin">10</property>
|
||||
<property name="right-margin">10</property>
|
||||
@@ -1629,7 +1621,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="label" translatable="yes">Row 1</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -1657,7 +1652,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="label" translatable="yes">Row 2</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -1687,7 +1685,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="label" translatable="yes">Row 3</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -1716,7 +1717,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="label" translatable="yes">Row 4</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -1742,7 +1746,11 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="label" translatable="yes">Row 5</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -1771,7 +1779,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="label" translatable="yes">Row 6</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<property name="hexpand">1</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -1882,7 +1893,6 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<child>
|
||||
<object class="MyTextView" id="text3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="buffer">textbuffer1</property>
|
||||
<property name="wrap-mode">2</property>
|
||||
<property name="left-margin">10</property>
|
||||
@@ -1909,10 +1919,12 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="spacing">10</property>
|
||||
<property name="expand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkFrame" id="panedframe1">
|
||||
<property name="expand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkPaned">
|
||||
<style>
|
||||
@@ -1934,7 +1946,8 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="panedframe2">
|
||||
<property name="expand">1</property>
|
||||
<property name="hexpand">1</property>
|
||||
<property name="vexpand">1</property>
|
||||
<child>
|
||||
<object class="GtkPaned">
|
||||
<property name="orientation">vertical</property>
|
||||
@@ -1980,20 +1993,17 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkExpander" id="expander1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="expanded">1</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow" id="scrolledwindow3">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="shadow-type">in</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="height-request">226</property>
|
||||
<child>
|
||||
<object class="GtkIconView" id="iconview1">
|
||||
<property name="can-focus">1</property>
|
||||
<property name="selection-mode">multiple</property>
|
||||
<property name="model">iconsmodel</property>
|
||||
<child>
|
||||
@@ -2287,7 +2297,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
@@ -2312,7 +2325,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="spacing">10</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
@@ -2394,7 +2410,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
@@ -2426,7 +2445,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<property name="child">
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<style>
|
||||
@@ -2512,7 +2534,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin-start">6</property>
|
||||
<property name="margin-end">6</property>
|
||||
<property name="margin-top">6</property>
|
||||
<property name="margin-bottom">6</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="orientation">vertical</property>
|
||||
@@ -2558,7 +2583,10 @@ microphone-sensitivity-medium-symbolic</property>
|
||||
<object class="GtkBox" id="totem_like_osd">
|
||||
<property name="visible">0</property>
|
||||
<property name="opacity">0.9</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="valign">end</property>
|
||||
<style>
|
||||
<class name="osd"/>
|
||||
@@ -2885,7 +2913,10 @@ bad things might happen.</property>
|
||||
<object class="GtkBox">
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<property name="label" translatable="yes">To free the princess, you have to slay the dragon.</property>
|
||||
<accessibility>
|
||||
<role type="static"/>
|
||||
@@ -2924,7 +2955,10 @@ bad things might happen.</property>
|
||||
<object class="GtkGrid">
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="margin">20</property>
|
||||
<property name="margin-start">20</property>
|
||||
<property name="margin-end">20</property>
|
||||
<property name="margin-top">20</property>
|
||||
<property name="margin-bottom">20</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="halign">end</property>
|
||||
@@ -3046,7 +3080,10 @@ bad things might happen.</property>
|
||||
<object class="GtkFlowBox" id="selection_flowbox">
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="min-children-per-line">3</property>
|
||||
<property name="max-children-per-line">9</property>
|
||||
</object>
|
||||
@@ -3073,7 +3110,10 @@ bad things might happen.</property>
|
||||
<object class="GtkPopover" id="open_popover">
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="margin">10</property>
|
||||
<property name="margin-start">10</property>
|
||||
<property name="margin-end">10</property>
|
||||
<property name="margin-top">10</property>
|
||||
<property name="margin-bottom">10</property>
|
||||
<property name="row-spacing">10</property>
|
||||
<property name="column-spacing">10</property>
|
||||
<child>
|
||||
|
||||
@@ -31,6 +31,10 @@
|
||||
<xi:include href="xml/rgba_colors.xml" />
|
||||
<xi:include href="xml/cursors.xml" />
|
||||
<xi:include href="xml/gdksurface.xml" />
|
||||
<xi:include href="xml/gdktoplevel.xml" />
|
||||
<xi:include href="xml/gdktoplevellayout.xml" />
|
||||
<xi:include href="xml/gdkpopup.xml" />
|
||||
<xi:include href="xml/gdkpopuplayout.xml" />
|
||||
<xi:include href="xml/gdkframeclock.xml" />
|
||||
<xi:include href="xml/gdkframetimings.xml" />
|
||||
<xi:include href="xml/gdkdrawcontext.xml" />
|
||||
|
||||
@@ -98,7 +98,10 @@ gdk_display_get_monitor_at_surface
|
||||
gdk_display_get_clipboard
|
||||
gdk_display_get_primary_clipboard
|
||||
gdk_display_get_setting
|
||||
gdk_display_get_keymap
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_display_map_keyval
|
||||
gdk_display_map_keycode
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DISPLAY
|
||||
@@ -168,7 +171,6 @@ gdk_rgba_get_type
|
||||
<TITLE>GdkSurface</TITLE>
|
||||
<FILE>gdksurface</FILE>
|
||||
GdkSurface
|
||||
GdkSurfaceType
|
||||
GdkSurfaceHints
|
||||
GdkGeometry
|
||||
GdkGravity
|
||||
@@ -177,46 +179,17 @@ GdkSurfaceTypeHint
|
||||
GdkSurfaceState
|
||||
gdk_surface_new_toplevel
|
||||
gdk_surface_new_popup
|
||||
gdk_surface_get_parent
|
||||
gdk_surface_destroy
|
||||
gdk_surface_get_surface_type
|
||||
gdk_surface_get_display
|
||||
gdk_surface_show
|
||||
gdk_surface_show_unraised
|
||||
gdk_surface_hide
|
||||
gdk_surface_is_destroyed
|
||||
gdk_surface_is_visible
|
||||
gdk_surface_get_display
|
||||
gdk_surface_hide
|
||||
gdk_surface_is_viewable
|
||||
gdk_surface_get_state
|
||||
gdk_surface_minimize
|
||||
gdk_surface_unminimize
|
||||
gdk_surface_stick
|
||||
gdk_surface_unstick
|
||||
gdk_surface_maximize
|
||||
gdk_surface_unmaximize
|
||||
gdk_surface_fullscreen
|
||||
gdk_surface_fullscreen_on_monitor
|
||||
gdk_surface_unfullscreen
|
||||
GdkFullscreenMode
|
||||
gdk_surface_get_fullscreen_mode
|
||||
gdk_surface_set_fullscreen_mode
|
||||
gdk_surface_set_keep_above
|
||||
gdk_surface_set_keep_below
|
||||
gdk_surface_set_opacity
|
||||
gdk_surface_resize
|
||||
gdk_surface_present_popup
|
||||
gdk_surface_get_popup_rect_anchor
|
||||
gdk_surface_get_popup_surface_anchor
|
||||
gdk_surface_raise
|
||||
gdk_surface_lower
|
||||
gdk_surface_restack
|
||||
gdk_surface_focus
|
||||
gdk_surface_register_dnd
|
||||
gdk_surface_get_mapped
|
||||
gdk_surface_get_width
|
||||
gdk_surface_get_height
|
||||
gdk_surface_translate_coordinates
|
||||
gdk_surface_begin_resize_drag
|
||||
gdk_surface_begin_resize_drag_for_device
|
||||
gdk_surface_begin_move_drag
|
||||
gdk_surface_begin_move_drag_for_device
|
||||
gdk_surface_show_window_menu
|
||||
gdk_surface_constrain_size
|
||||
gdk_surface_beep
|
||||
gdk_surface_get_scale_factor
|
||||
@@ -232,36 +205,17 @@ gdk_surface_thaw_updates
|
||||
gdk_surface_get_frame_clock
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_surface_set_accept_focus
|
||||
gdk_surface_get_accept_focus
|
||||
gdk_surface_set_focus_on_map
|
||||
gdk_surface_get_focus_on_map
|
||||
gdk_surface_input_shape_combine_region
|
||||
gdk_surface_set_title
|
||||
GDK_PARENT_RELATIVE
|
||||
gdk_surface_set_cursor
|
||||
gdk_surface_get_cursor
|
||||
gdk_surface_set_geometry_hints
|
||||
gdk_surface_set_device_cursor
|
||||
gdk_surface_get_device_cursor
|
||||
gdk_surface_set_input_region
|
||||
gdk_surface_get_width
|
||||
gdk_surface_get_height
|
||||
gdk_surface_set_icon_list
|
||||
gdk_surface_set_modal_hint
|
||||
gdk_surface_get_modal_hint
|
||||
gdk_surface_set_type_hint
|
||||
gdk_surface_get_type_hint
|
||||
gdk_surface_set_shadow_width
|
||||
gdk_surface_get_position
|
||||
gdk_surface_get_device_position
|
||||
GdkModifierType
|
||||
GdkModifierIntent
|
||||
gdk_surface_set_icon_name
|
||||
gdk_surface_set_transient_for
|
||||
gdk_surface_set_startup_id
|
||||
gdk_surface_set_decorations
|
||||
gdk_surface_get_decorations
|
||||
GdkWMDecoration
|
||||
gdk_surface_set_functions
|
||||
GdkWMFunction
|
||||
GDK_MODIFIER_MASK
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_surface_get_support_multidevice
|
||||
@@ -386,49 +340,16 @@ gdk_rectangle_get_type
|
||||
<SECTION>
|
||||
<TITLE>Keyboard Handling</TITLE>
|
||||
<FILE>keys</FILE>
|
||||
GdkKeymap
|
||||
GdkKeymapKey
|
||||
gdk_keymap_lookup_key
|
||||
gdk_keymap_translate_keyboard_state
|
||||
gdk_keymap_get_entries_for_keyval
|
||||
gdk_keymap_get_entries_for_keycode
|
||||
gdk_keymap_get_direction
|
||||
gdk_keymap_have_bidi_layouts
|
||||
gdk_keymap_get_caps_lock_state
|
||||
gdk_keymap_get_num_lock_state
|
||||
gdk_keymap_get_scroll_lock_state
|
||||
gdk_keymap_get_modifier_state
|
||||
gdk_keymap_add_virtual_modifiers
|
||||
gdk_keymap_map_virtual_modifiers
|
||||
gdk_keymap_get_modifier_mask
|
||||
gdk_keymap_get_display
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_name
|
||||
gdk_keyval_from_name
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_convert_case
|
||||
gdk_keyval_to_upper
|
||||
gdk_keyval_to_lower
|
||||
gdk_keyval_is_upper
|
||||
gdk_keyval_is_lower
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_keyval_to_unicode
|
||||
gdk_unicode_to_keyval
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_KEYMAP
|
||||
GDK_IS_KEYMAP
|
||||
GDK_TYPE_KEYMAP
|
||||
GDK_KEYMAP_CLASS
|
||||
GDK_IS_KEYMAP_CLASS
|
||||
GDK_KEYMAP_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GdkKeymapClass
|
||||
gdk_keymap_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -436,7 +357,6 @@ gdk_keymap_get_type
|
||||
<FILE>gdkdevice</FILE>
|
||||
GdkDevice
|
||||
GdkInputSource
|
||||
GdkInputMode
|
||||
GdkAxisUse
|
||||
GdkAxisFlags
|
||||
GdkDeviceToolType
|
||||
@@ -448,8 +368,6 @@ gdk_device_get_name
|
||||
gdk_device_get_vendor_id
|
||||
gdk_device_get_product_id
|
||||
gdk_device_get_source
|
||||
gdk_device_set_mode
|
||||
gdk_device_get_mode
|
||||
gdk_device_set_key
|
||||
gdk_device_get_key
|
||||
gdk_device_set_axis_use
|
||||
@@ -463,6 +381,8 @@ gdk_device_get_n_axes
|
||||
gdk_device_get_n_keys
|
||||
gdk_device_get_axes
|
||||
gdk_device_get_seat
|
||||
gdk_device_get_num_touches
|
||||
gdk_device_get_device_tool
|
||||
|
||||
<SUBSECTION>
|
||||
gdk_device_get_state
|
||||
@@ -530,8 +450,6 @@ gdk_device_pad_get_type
|
||||
<FILE>gdkseat</FILE>
|
||||
GdkSeat
|
||||
GdkSeatCapabilities
|
||||
GdkGrabStatus
|
||||
GdkSeatGrabPrepareFunc
|
||||
gdk_seat_get_display
|
||||
gdk_seat_get_capabilities
|
||||
gdk_seat_get_pointer
|
||||
@@ -593,9 +511,13 @@ gdk_scroll_event_get_deltas
|
||||
gdk_scroll_event_is_stop
|
||||
gdk_key_event_get_keyval
|
||||
gdk_key_event_get_keycode
|
||||
gdk_key_event_get_scancode
|
||||
gdk_key_event_get_group
|
||||
gdk_key_event_get_consumed_modifiers
|
||||
gdk_key_event_get_layout
|
||||
gdk_key_event_get_level
|
||||
gdk_key_event_is_modifier
|
||||
GdkEventMatch
|
||||
gdk_key_event_matches
|
||||
gdk_key_event_get_match
|
||||
gdk_focus_event_get_in
|
||||
gdk_touch_event_get_emulating_pointer
|
||||
gdk_crossing_event_get_mode
|
||||
@@ -659,8 +581,6 @@ gdk_paintable_get_type
|
||||
<TITLE>GdkPopupLayout</TITLE>
|
||||
GdkPopupLayout
|
||||
GdkAnchorHints
|
||||
GDK_TYPE_POPUP_LAYOUT
|
||||
gdk_popup_layout_get_type
|
||||
gdk_popup_layout_new
|
||||
gdk_popup_layout_ref
|
||||
gdk_popup_layout_unref
|
||||
@@ -676,6 +596,73 @@ gdk_popup_layout_set_anchor_hints
|
||||
gdk_popup_layout_get_anchor_hints
|
||||
gdk_popup_layout_set_offset
|
||||
gdk_popup_layout_get_offset
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_POPUP_LAYOUT
|
||||
gdk_popup_layout_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdkpopup</FILE>
|
||||
<TITLE>GdkPopup</TITLE>
|
||||
GdkPopup
|
||||
gdk_popup_present
|
||||
gdk_popup_get_surface_anchor
|
||||
gdk_popup_get_rect_anchor
|
||||
gdk_popup_get_parent
|
||||
gdk_popup_get_position_x
|
||||
gdk_popup_get_position_y
|
||||
gdk_popup_get_autohide
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_POPUP
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdktoplevellayout</FILE>
|
||||
<TITLE>GdkToplevelLayout</TITLE>
|
||||
GdkToplevelLayout
|
||||
gdk_toplevel_layout_new
|
||||
gdk_toplevel_layout_ref
|
||||
gdk_toplevel_layout_unref
|
||||
gdk_toplevel_layout_copy
|
||||
gdk_toplevel_layout_equal
|
||||
gdk_toplevel_layout_set_maximized
|
||||
gdk_toplevel_layout_get_maximized
|
||||
gdk_toplevel_layout_set_fullscreen
|
||||
gdk_toplevel_layout_get_fullscreen
|
||||
gdk_toplevel_layout_get_fullscreen_monitor
|
||||
gdk_toplevel_layout_get_min_width
|
||||
gdk_toplevel_layout_get_min_height
|
||||
gdk_toplevel_layout_set_resizable
|
||||
gdk_toplevel_layout_get_resizable
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_TOPLEVEL_LAYOUT
|
||||
gdk_toplevel_layout_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gdktoplevel</FILE>
|
||||
<TITLE>GdkToplevel</TITLE>
|
||||
GdkToplevel
|
||||
GdkFullscreenMode
|
||||
gdk_toplevel_present
|
||||
gdk_toplevel_minimize
|
||||
gdk_toplevel_lower
|
||||
gdk_toplevel_focus
|
||||
gdk_toplevel_get_state
|
||||
gdk_toplevel_set_title
|
||||
gdk_toplevel_set_startup_id
|
||||
gdk_toplevel_set_transient_for
|
||||
gdk_toplevel_set_modal
|
||||
gdk_toplevel_set_icon_list
|
||||
gdk_toplevel_show_window_menu
|
||||
gdk_toplevel_set_decorated
|
||||
gdk_toplevel_set_deletable
|
||||
gdk_toplevel_supports_edge_constraints
|
||||
gdk_toplevel_inhibit_system_shortcuts
|
||||
gdk_toplevel_restore_system_shortcuts
|
||||
<SUBSECTION Standard>
|
||||
GDK_TYPE_TOPLEVEL
|
||||
gdk_toplevel_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -747,10 +734,12 @@ GdkDragAction
|
||||
GDK_ACTION_ALL
|
||||
|
||||
gdk_drag_get_display
|
||||
gdk_drag_get_content
|
||||
gdk_drag_get_actions
|
||||
gdk_drag_get_selected_action
|
||||
gdk_drag_get_formats
|
||||
gdk_drag_get_device
|
||||
gdk_drag_get_surface
|
||||
gdk_drag_get_drag_surface
|
||||
gdk_drag_set_hotspot
|
||||
|
||||
@@ -770,8 +759,6 @@ gdk_drop_read_async
|
||||
gdk_drop_read_finish
|
||||
gdk_drop_read_value_async
|
||||
gdk_drop_read_value_finish
|
||||
gdk_drop_read_text_async
|
||||
gdk_drop_read_text_finish
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GDK_DRAG
|
||||
@@ -994,6 +981,7 @@ gdk_wayland_surface_get_type
|
||||
<TITLE>Application launching</TITLE>
|
||||
<FILE>gdkapplaunchcontext</FILE>
|
||||
GdkAppLaunchContext
|
||||
gdk_app_launch_context_get_display
|
||||
gdk_app_launch_context_set_desktop
|
||||
gdk_app_launch_context_set_timestamp
|
||||
gdk_app_launch_context_set_icon
|
||||
|
||||
@@ -11,18 +11,22 @@ gdk_device_tool_get_type
|
||||
gdk_display_get_type
|
||||
gdk_display_manager_get_type
|
||||
gdk_drag_get_type
|
||||
gdk_drag_surface_get_type
|
||||
gdk_drop_get_type
|
||||
gdk_event_get_type
|
||||
gdk_frame_clock_get_type
|
||||
gdk_gl_context_get_type
|
||||
gdk_gl_texture_get_type
|
||||
gdk_keymap_get_type
|
||||
gdk_memory_texture_get_type
|
||||
gdk_monitor_get_type
|
||||
gdk_paintable_get_type
|
||||
gdk_popup_get_type
|
||||
gdk_popup_layout_get_type
|
||||
gdk_rgba_get_type
|
||||
gdk_seat_get_type
|
||||
gdk_snapshot_get_type
|
||||
gdk_surface_get_type
|
||||
gdk_texture_get_type
|
||||
gdk_toplevel_get_type
|
||||
gdk_toplevel_layout_get_type
|
||||
gdk_vulkan_context_get_type
|
||||
|
||||
@@ -336,6 +336,16 @@
|
||||
<xi:include href="xml/gtkgesturezoom.xml" />
|
||||
<xi:include href="xml/gtkgesturestylus.xml" />
|
||||
<xi:include href="xml/gtkpadcontroller.xml" />
|
||||
<xi:include href="xml/gtkshortcutcontroller.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
<title>Keyboard shortcuts</title>
|
||||
<xi:include href="xml/gtkaccelgroup.xml" />
|
||||
<xi:include href="xml/gtkshortcut.xml" />
|
||||
<xi:include href="xml/gtkshortcuttrigger.xml" />
|
||||
<xi:include href="xml/gtkshortcutaction.xml" />
|
||||
<xi:include href="xml/gtkshortcutmanager.xml" />
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
@@ -343,6 +353,7 @@
|
||||
<xi:include href="xml/gtkdragsource.xml"/>
|
||||
<xi:include href="xml/gtkdragicon.xml"/>
|
||||
<xi:include href="xml/gtkdroptarget.xml"/>
|
||||
<xi:include href="xml/gtkdroptargetasync.xml"/>
|
||||
</chapter>
|
||||
|
||||
</part>
|
||||
@@ -351,10 +362,7 @@
|
||||
<title>GTK Core Reference</title>
|
||||
<xi:include href="xml/gtkmain.xml" />
|
||||
<xi:include href="xml/gtkfeatures.xml" />
|
||||
<xi:include href="xml/gtkaccelgroup.xml" />
|
||||
<xi:include href="xml/gtkaccelmap.xml" />
|
||||
<xi:include href="xml/gtksettings.xml" />
|
||||
<xi:include href="xml/gtkbindings.xml" />
|
||||
<xi:include href="xml/gtkenums.xml" />
|
||||
<xi:include href="xml/gtktesting.xml" />
|
||||
<xi:include href="xml/filesystem.xml" />
|
||||
|
||||
@@ -53,26 +53,6 @@ gtk_about_dialog_get_type
|
||||
<SECTION>
|
||||
<FILE>gtkaccelgroup</FILE>
|
||||
<TITLE>Keyboard Accelerators</TITLE>
|
||||
GtkAccelGroup
|
||||
GtkAccelGroupClass
|
||||
gtk_accel_group_new
|
||||
GtkAccelFlags
|
||||
gtk_accel_group_connect
|
||||
gtk_accel_group_connect_by_path
|
||||
GtkAccelGroupActivate
|
||||
GtkAccelGroupFindFunc
|
||||
gtk_accel_group_disconnect
|
||||
gtk_accel_group_disconnect_key
|
||||
gtk_accel_group_activate
|
||||
gtk_accel_group_lock
|
||||
gtk_accel_group_unlock
|
||||
gtk_accel_group_get_is_locked
|
||||
gtk_accel_group_from_accel_closure
|
||||
gtk_accel_group_get_modifier_mask
|
||||
gtk_accel_groups_activate
|
||||
gtk_accel_groups_from_object
|
||||
gtk_accel_group_find
|
||||
GtkAccelKey
|
||||
gtk_accelerator_valid
|
||||
gtk_accelerator_parse
|
||||
gtk_accelerator_name
|
||||
@@ -80,54 +60,7 @@ gtk_accelerator_get_label
|
||||
gtk_accelerator_parse_with_keycode
|
||||
gtk_accelerator_name_with_keycode
|
||||
gtk_accelerator_get_label_with_keycode
|
||||
gtk_accelerator_set_default_mod_mask
|
||||
gtk_accelerator_get_default_mod_mask
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_ACCEL_GROUP
|
||||
GTK_ACCEL_GROUP
|
||||
GTK_IS_ACCEL_GROUP
|
||||
GTK_ACCEL_GROUP_CLASS
|
||||
GTK_IS_ACCEL_GROUP_CLASS
|
||||
GTK_ACCEL_GROUP_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
GTK_ACCEL_GROUP_GET_PRIVATE
|
||||
GtkAccelGroupPrivate
|
||||
GtkAccelGroupEntry
|
||||
gtk_accel_group_query
|
||||
gtk_accel_group_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkaccelmap</FILE>
|
||||
<TITLE>Accelerator Maps</TITLE>
|
||||
GtkAccelMap
|
||||
GtkAccelMapForeach
|
||||
gtk_accel_map_add_entry
|
||||
gtk_accel_map_lookup_entry
|
||||
gtk_accel_map_change_entry
|
||||
gtk_accel_map_load
|
||||
gtk_accel_map_save
|
||||
gtk_accel_map_foreach
|
||||
gtk_accel_map_load_fd
|
||||
gtk_accel_map_save_fd
|
||||
gtk_accel_map_load_scanner
|
||||
gtk_accel_map_add_filter
|
||||
gtk_accel_map_foreach_unfiltered
|
||||
gtk_accel_map_get
|
||||
gtk_accel_map_lock_path
|
||||
gtk_accel_map_unlock_path
|
||||
<SUBSECTION Standard>
|
||||
GTK_ACCEL_MAP
|
||||
GTK_TYPE_ACCEL_MAP
|
||||
GTK_IS_ACCEL_MAP
|
||||
GTK_ACCEL_MAP_CLASS
|
||||
GTK_IS_ACCEL_MAP_CLASS
|
||||
GTK_ACCEL_MAP_GET_CLASS
|
||||
GtkAccelMapClass
|
||||
<SUBSECTION Private>
|
||||
gtk_accel_map_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
@@ -135,10 +68,6 @@ gtk_accel_map_get_type
|
||||
<TITLE>GtkAccelLabel</TITLE>
|
||||
GtkAccelLabel
|
||||
gtk_accel_label_new
|
||||
gtk_accel_label_set_accel_closure
|
||||
gtk_accel_label_get_accel_closure
|
||||
gtk_accel_label_get_accel_widget
|
||||
gtk_accel_label_set_accel_widget
|
||||
gtk_accel_label_get_accel_width
|
||||
gtk_accel_label_set_accel
|
||||
gtk_accel_label_get_accel
|
||||
@@ -616,11 +545,9 @@ gtk_button_get_type
|
||||
<FILE>gtkcalendar</FILE>
|
||||
<TITLE>GtkCalendar</TITLE>
|
||||
GtkCalendar
|
||||
GtkCalendarDisplayOptions
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_calendar_new
|
||||
gtk_calendar_select_month
|
||||
gtk_calendar_select_day
|
||||
gtk_calendar_mark_day
|
||||
gtk_calendar_unmark_day
|
||||
@@ -628,8 +555,6 @@ gtk_calendar_get_day_is_marked
|
||||
gtk_calendar_clear_marks
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_calendar_get_display_options
|
||||
gtk_calendar_set_display_options
|
||||
gtk_calendar_get_date
|
||||
|
||||
<SUBSECTION Standard>
|
||||
@@ -674,6 +599,8 @@ gtk_color_button_new
|
||||
gtk_color_button_new_with_rgba
|
||||
gtk_color_button_set_title
|
||||
gtk_color_button_get_title
|
||||
gtk_color_button_set_modal
|
||||
gtk_color_button_get_modal
|
||||
<SUBSECTION Standard>
|
||||
GTK_COLOR_BUTTON
|
||||
GTK_IS_COLOR_BUTTON
|
||||
@@ -1123,7 +1050,6 @@ GtkExpanderPrivate
|
||||
<TITLE>GtkFileChooser</TITLE>
|
||||
GtkFileChooser
|
||||
GtkFileChooserAction
|
||||
GtkFileChooserConfirmation
|
||||
GTK_FILE_CHOOSER_ERROR
|
||||
GtkFileChooserError
|
||||
gtk_file_chooser_set_action
|
||||
@@ -1231,6 +1157,8 @@ gtk_file_chooser_button_get_title
|
||||
gtk_file_chooser_button_set_title
|
||||
gtk_file_chooser_button_get_width_chars
|
||||
gtk_file_chooser_button_set_width_chars
|
||||
gtk_file_chooser_button_get_modal
|
||||
gtk_file_chooser_button_set_modal
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_FILE_CHOOSER_BUTTON
|
||||
@@ -1321,6 +1249,7 @@ GtkFlattenListModel
|
||||
gtk_flatten_list_model_new
|
||||
gtk_flatten_list_model_set_model
|
||||
gtk_flatten_list_model_get_model
|
||||
gtk_flatten_list_model_get_model_for_item
|
||||
<SUBSECTION Standard>
|
||||
GTK_FLATTEN_LIST_MODEL
|
||||
GTK_IS_FLATTEN_LIST_MODEL
|
||||
@@ -1344,6 +1273,8 @@ gtk_font_button_set_use_size
|
||||
gtk_font_button_get_use_size
|
||||
gtk_font_button_set_title
|
||||
gtk_font_button_get_title
|
||||
gtk_font_button_set_modal
|
||||
gtk_font_button_get_modal
|
||||
<SUBSECTION Standard>
|
||||
GTK_FONT_BUTTON
|
||||
GTK_IS_FONT_BUTTON
|
||||
@@ -2373,6 +2304,12 @@ GtkSettingsValue
|
||||
gtk_settings_get_default
|
||||
gtk_settings_get_for_display
|
||||
gtk_settings_reset_property
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_theme_get_dark_variant
|
||||
gtk_theme_get_light_variant
|
||||
gtk_theme_get_available_themes
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GtkSettingsClass
|
||||
GTK_IS_SETTINGS
|
||||
@@ -2505,6 +2442,8 @@ GtkSpinner
|
||||
gtk_spinner_new
|
||||
gtk_spinner_start
|
||||
gtk_spinner_stop
|
||||
gtk_spinner_set_spinning
|
||||
gtk_spinner_get_spinning
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_SPINNER
|
||||
@@ -2529,7 +2468,6 @@ gtk_statusbar_push
|
||||
gtk_statusbar_pop
|
||||
gtk_statusbar_remove
|
||||
gtk_statusbar_remove_all
|
||||
gtk_statusbar_get_message_area
|
||||
<SUBSECTION Standard>
|
||||
GTK_STATUSBAR
|
||||
GTK_IS_STATUSBAR
|
||||
@@ -2601,7 +2539,6 @@ gtk_text_buffer_backspace
|
||||
gtk_text_buffer_set_text
|
||||
gtk_text_buffer_get_text
|
||||
gtk_text_buffer_get_slice
|
||||
gtk_text_buffer_insert_texture
|
||||
gtk_text_buffer_insert_child_anchor
|
||||
gtk_text_buffer_create_child_anchor
|
||||
gtk_text_buffer_create_mark
|
||||
@@ -2686,7 +2623,6 @@ gtk_text_iter_get_slice
|
||||
gtk_text_iter_get_text
|
||||
gtk_text_iter_get_visible_slice
|
||||
gtk_text_iter_get_visible_text
|
||||
gtk_text_iter_get_texture
|
||||
gtk_text_iter_get_marks
|
||||
gtk_text_iter_get_toggled_tags
|
||||
gtk_text_iter_get_child_anchor
|
||||
@@ -4040,12 +3976,10 @@ gtk_widget_add_tick_callback
|
||||
gtk_widget_remove_tick_callback
|
||||
gtk_widget_size_allocate
|
||||
gtk_widget_allocate
|
||||
gtk_widget_add_accelerator
|
||||
gtk_widget_remove_accelerator
|
||||
gtk_widget_set_accel_path
|
||||
gtk_widget_list_accel_closures
|
||||
gtk_widget_class_add_shortcut
|
||||
gtk_widget_class_add_binding
|
||||
gtk_widget_class_add_binding_signal
|
||||
gtk_widget_can_activate_accel
|
||||
gtk_widget_event
|
||||
gtk_widget_activate
|
||||
gtk_widget_is_focus
|
||||
gtk_widget_grab_focus
|
||||
@@ -4065,7 +3999,6 @@ GtkTextDirection
|
||||
gtk_widget_get_direction
|
||||
gtk_widget_set_default_direction
|
||||
gtk_widget_get_default_direction
|
||||
gtk_widget_input_shape_combine_region
|
||||
gtk_widget_create_pango_context
|
||||
gtk_widget_get_pango_context
|
||||
gtk_widget_set_font_options
|
||||
@@ -4099,8 +4032,6 @@ gtk_widget_get_tooltip_markup
|
||||
gtk_widget_set_tooltip_markup
|
||||
gtk_widget_get_tooltip_text
|
||||
gtk_widget_set_tooltip_text
|
||||
gtk_widget_get_tooltip_window
|
||||
gtk_widget_set_tooltip_window
|
||||
gtk_widget_get_has_tooltip
|
||||
gtk_widget_set_has_tooltip
|
||||
gtk_widget_trigger_tooltip_query
|
||||
@@ -4143,7 +4074,6 @@ gtk_widget_get_support_multidevice
|
||||
gtk_widget_get_realized
|
||||
gtk_widget_get_mapped
|
||||
gtk_widget_device_is_shadowed
|
||||
gtk_widget_get_modifier_mask
|
||||
gtk_widget_get_opacity
|
||||
gtk_widget_set_opacity
|
||||
gtk_widget_get_overflow
|
||||
@@ -4263,25 +4193,17 @@ gtk_window_new
|
||||
gtk_window_set_title
|
||||
gtk_window_set_resizable
|
||||
gtk_window_get_resizable
|
||||
gtk_window_add_accel_group
|
||||
gtk_window_remove_accel_group
|
||||
gtk_window_set_modal
|
||||
gtk_window_set_default_size
|
||||
gtk_window_set_hide_on_close
|
||||
gtk_window_get_hide_on_close
|
||||
gtk_window_set_transient_for
|
||||
gtk_window_set_attached_to
|
||||
gtk_window_set_destroy_with_parent
|
||||
gtk_window_set_display
|
||||
gtk_window_is_active
|
||||
gtk_window_is_maximized
|
||||
gtk_window_get_toplevels
|
||||
gtk_window_list_toplevels
|
||||
gtk_window_add_mnemonic
|
||||
gtk_window_remove_mnemonic
|
||||
gtk_window_mnemonic_activate
|
||||
gtk_window_activate_key
|
||||
gtk_window_propagate_key_event
|
||||
gtk_window_get_focus
|
||||
gtk_window_set_focus
|
||||
gtk_window_get_default_widget
|
||||
@@ -4291,23 +4213,13 @@ gtk_window_present_with_time
|
||||
gtk_window_close
|
||||
gtk_window_minimize
|
||||
gtk_window_unminimize
|
||||
gtk_window_stick
|
||||
gtk_window_unstick
|
||||
gtk_window_maximize
|
||||
gtk_window_unmaximize
|
||||
gtk_window_fullscreen
|
||||
gtk_window_fullscreen_on_monitor
|
||||
gtk_window_unfullscreen
|
||||
gtk_window_set_keep_above
|
||||
gtk_window_set_keep_below
|
||||
gtk_window_begin_resize_drag
|
||||
gtk_window_begin_move_drag
|
||||
gtk_window_set_decorated
|
||||
gtk_window_set_deletable
|
||||
gtk_window_set_mnemonic_modifier
|
||||
gtk_window_set_type_hint
|
||||
gtk_window_set_accept_focus
|
||||
gtk_window_set_focus_on_map
|
||||
gtk_window_set_startup_id
|
||||
gtk_window_get_decorated
|
||||
gtk_window_get_deletable
|
||||
@@ -4315,15 +4227,10 @@ gtk_window_get_default_icon_name
|
||||
gtk_window_get_default_size
|
||||
gtk_window_get_destroy_with_parent
|
||||
gtk_window_get_icon_name
|
||||
gtk_window_get_mnemonic_modifier
|
||||
gtk_window_get_modal
|
||||
gtk_window_get_size
|
||||
gtk_window_get_title
|
||||
gtk_window_get_transient_for
|
||||
gtk_window_get_attached_to
|
||||
gtk_window_get_type_hint
|
||||
gtk_window_get_accept_focus
|
||||
gtk_window_get_focus_on_map
|
||||
gtk_window_get_group
|
||||
gtk_window_has_group
|
||||
gtk_window_resize
|
||||
@@ -4367,8 +4274,7 @@ gtk_window_group_new
|
||||
gtk_window_group_add_window
|
||||
gtk_window_group_remove_window
|
||||
gtk_window_group_list_windows
|
||||
gtk_window_group_get_current_grab
|
||||
gtk_window_group_get_current_device_grab
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_IS_WINDOW_GROUP
|
||||
GTK_IS_WINDOW_GROUP_CLASS
|
||||
@@ -4390,22 +4296,9 @@ gtk_get_locale_direction
|
||||
gtk_init
|
||||
gtk_init_check
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_grab_add
|
||||
gtk_grab_get_current
|
||||
gtk_grab_remove
|
||||
gtk_device_grab_add
|
||||
gtk_device_grab_remove
|
||||
|
||||
<SUBSECTION>
|
||||
GTK_PRIORITY_RESIZE
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_get_current_event
|
||||
gtk_get_current_event_time
|
||||
gtk_get_current_event_state
|
||||
gtk_get_current_event_device
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_init_abi_check
|
||||
gtk_init_check_abi_check
|
||||
@@ -4550,10 +4443,8 @@ gtk_style_context_get_margin
|
||||
gtk_style_context_lookup_color
|
||||
gtk_style_context_remove_provider
|
||||
gtk_style_context_remove_provider_for_display
|
||||
gtk_style_context_reset_widgets
|
||||
gtk_style_context_restore
|
||||
gtk_style_context_save
|
||||
gtk_style_context_set_parent
|
||||
gtk_style_context_add_class
|
||||
gtk_style_context_remove_class
|
||||
gtk_style_context_has_class
|
||||
@@ -4642,26 +4533,6 @@ gtk_css_provider_error_quark
|
||||
gtk_css_section_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkbindings</FILE>
|
||||
<TITLE>Bindings</TITLE>
|
||||
GtkBindingSet
|
||||
gtk_binding_set_new
|
||||
gtk_binding_set_by_class
|
||||
gtk_binding_set_find
|
||||
gtk_bindings_activate
|
||||
gtk_bindings_activate_event
|
||||
gtk_binding_set_activate
|
||||
gtk_binding_entry_add_action
|
||||
gtk_binding_entry_add_action_variant
|
||||
GtkBindingCallback
|
||||
gtk_binding_entry_add_callback
|
||||
gtk_binding_entry_add_signal
|
||||
gtk_binding_entry_add_signal_from_string
|
||||
gtk_binding_entry_skip
|
||||
gtk_binding_entry_remove
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkenums</FILE>
|
||||
<TITLE>Standard Enumerations</TITLE>
|
||||
@@ -4706,8 +4577,6 @@ gtk_icon_theme_set_theme_name
|
||||
gtk_icon_theme_get_theme_name
|
||||
gtk_icon_theme_has_icon
|
||||
gtk_icon_theme_lookup_icon
|
||||
gtk_icon_theme_choose_icon_async
|
||||
gtk_icon_theme_choose_icon_finish
|
||||
gtk_icon_theme_lookup_by_gicon
|
||||
gtk_icon_theme_get_icon_names
|
||||
gtk_icon_theme_get_icon_sizes
|
||||
@@ -5248,7 +5117,9 @@ gtk_mount_operation_set_parent
|
||||
gtk_mount_operation_get_parent
|
||||
gtk_mount_operation_set_display
|
||||
gtk_mount_operation_get_display
|
||||
gtk_show_uri_on_window
|
||||
gtk_show_uri_full
|
||||
gtk_show_uri_full_finish
|
||||
gtk_show_uri
|
||||
<SUBSECTION Standard>
|
||||
GTK_IS_MOUNT_OPERATION
|
||||
GTK_IS_MOUNT_OPERATION_CLASS
|
||||
@@ -5478,6 +5349,8 @@ gtk_app_chooser_button_get_show_dialog_item
|
||||
gtk_app_chooser_button_set_show_dialog_item
|
||||
gtk_app_chooser_button_get_heading
|
||||
gtk_app_chooser_button_set_heading
|
||||
gtk_app_chooser_button_get_modal
|
||||
gtk_app_chooser_button_set_modal
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_APP_CHOOSER_BUTTON
|
||||
@@ -5881,8 +5754,6 @@ GtkPopover
|
||||
gtk_popover_new
|
||||
gtk_popover_popup
|
||||
gtk_popover_popdown
|
||||
gtk_popover_set_relative_to
|
||||
gtk_popover_get_relative_to
|
||||
gtk_popover_set_pointing_to
|
||||
gtk_popover_get_pointing_to
|
||||
gtk_popover_set_position
|
||||
@@ -5951,10 +5822,15 @@ gtk_event_controller_set_propagation_phase
|
||||
GtkPropagationLimit
|
||||
gtk_event_controller_get_propagation_limit
|
||||
gtk_event_controller_set_propagation_limit
|
||||
gtk_event_controller_handle_event
|
||||
gtk_event_controller_get_widget
|
||||
gtk_event_controller_reset
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_event_controller_get_current_event
|
||||
gtk_event_controller_get_current_event_device
|
||||
gtk_event_controller_get_current_event_state
|
||||
gtk_event_controller_get_current_event_time
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_EVENT_CONTROLLER
|
||||
GTK_EVENT_CONTROLLER
|
||||
@@ -6091,6 +5967,152 @@ GTK_EVENT_CONTROLLER_MOTION_GET_CLASS
|
||||
gtk_event_controller_motion_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkshortcuttrigger</FILE>
|
||||
<TITLE>GtkShortcutTrigger</TITLE>
|
||||
GtkShortcutTrigger
|
||||
GtkNeverTrigger
|
||||
|
||||
gtk_shortcut_trigger_trigger
|
||||
gtk_shortcut_trigger_hash
|
||||
gtk_shortcut_trigger_equal
|
||||
gtk_shortcut_trigger_compare
|
||||
gtk_shortcut_trigger_to_string
|
||||
gtk_shortcut_trigger_print
|
||||
gtk_shortcut_trigger_to_label
|
||||
gtk_shortcut_trigger_print_label
|
||||
gtk_shortcut_trigger_parse_string
|
||||
|
||||
<SUBSECTION>
|
||||
GtkKeyvalTrigger
|
||||
gtk_keyval_trigger_new
|
||||
gtk_keyval_trigger_get_modifiers
|
||||
gtk_keyval_trigger_get_keyval
|
||||
|
||||
<SUBSECTION>
|
||||
GtkMnemonicTrigger
|
||||
gtk_mnemonic_trigger_new
|
||||
gtk_mnemonic_trigger_get_keyval
|
||||
|
||||
<SUBSECTION>
|
||||
GtkAlternativeTrigger
|
||||
gtk_alternative_trigger_new
|
||||
gtk_alternative_trigger_get_first
|
||||
|
||||
<SUBSECTION>
|
||||
GtkNeverTrigger
|
||||
gtk_never_trigger_get
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_shortcut_trigger_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkshortcutaction</FILE>
|
||||
<TITLE>GtkShortcutAction</TITLE>
|
||||
GtkShortcutAction
|
||||
gtk_shortcut_action_to_string
|
||||
gtk_shortcut_action_print
|
||||
gtk_shortcut_action_parse_string
|
||||
gtk_shortcut_action_activate
|
||||
|
||||
<SUBSECTION>
|
||||
GtkNothingAction
|
||||
gtk_nothing_action_get
|
||||
|
||||
<SUBSECTION>
|
||||
GtkCallbackAction
|
||||
gtk_callback_action_new
|
||||
|
||||
<SUBSECTION>
|
||||
GtkMnemonicAction
|
||||
gtk_mnemonic_action_get
|
||||
|
||||
<SUBSECTION>
|
||||
GtkActivateAction
|
||||
gtk_activate_action_get
|
||||
|
||||
<SUBSECTION>
|
||||
GtkSignalAction
|
||||
gtk_signal_action_new
|
||||
gtk_signal_action_get_signal_name
|
||||
|
||||
<SUBSECTION>
|
||||
GtkNamedAction
|
||||
gtk_named_action_new
|
||||
gtk_named_action_get_action_name
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_shortcut_action_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkshortcut</FILE>
|
||||
<TITLE>GtkShortcut</TITLE>
|
||||
GtkShortcut
|
||||
gtk_shortcut_new
|
||||
gtk_shortcut_new_with_arguments
|
||||
gtk_shortcut_get_trigger
|
||||
gtk_shortcut_set_trigger
|
||||
gtk_shortcut_get_action
|
||||
gtk_shortcut_set_action
|
||||
gtk_shortcut_get_arguments
|
||||
gtk_shortcut_set_arguments
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_SHORTCUT
|
||||
GTK_SHORTCUT
|
||||
GTK_SHORTCUT_CLASS
|
||||
GTK_IS_SHORTCUT
|
||||
GTK_IS_SHORTCUT_CLASS
|
||||
GTK_SHORTCUT_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_shortcut_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkshortcutmanager</FILE>
|
||||
<TITLE>GtkShortcutManager</TITLE>
|
||||
GtkShortcutManager
|
||||
GtkShortcutManagerInterface
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkshortcutcontroller</FILE>
|
||||
<TITLE>GtkShortcutController</TITLE>
|
||||
GtkShortcutController
|
||||
gtk_shortcut_controller_new
|
||||
gtk_shortcut_controller_new_with_model
|
||||
GtkShortcutScope
|
||||
GtkShortcutManager
|
||||
GtkShortcutManagerInterface
|
||||
gtk_shortcut_controller_set_mnemonics_modifiers
|
||||
gtk_shortcut_controller_get_mnemonics_modifiers
|
||||
gtk_shortcut_controller_set_scope
|
||||
gtk_shortcut_controller_get_scope
|
||||
gtk_shortcut_controller_add_shortcut
|
||||
gtk_shortcut_controller_remove_shortcut
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_SHORTCUT_CONTROLLER
|
||||
GTK_SHORTCUT_CONTROLLER
|
||||
GTK_SHORTCUT_CONTROLLER_CLASS
|
||||
GTK_IS_SHORTCUT_CONTROLLER
|
||||
GTK_IS_SHORTCUT_CONTROLLER_CLASS
|
||||
GTK_SHORTCUT_CONTROLLER_GET_CLASS
|
||||
GTK_TYPE_SHORTCUT_MANAGER
|
||||
GTK_SHORTCUT_MANAGER
|
||||
GTK_SHORTCUT_MANAGER_CLASS
|
||||
GTK_IS_SHORTCUT_MANAGER
|
||||
GTK_IS_SHORTCUT_MANAGER_CLASS
|
||||
GTK_SHORTCUT_MANAGER_GET_CLASS
|
||||
|
||||
<SUBSECTION Private>
|
||||
gtk_shortcut_controller_get_type
|
||||
gtk_shortcut_manager_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkeventcontrollerkey</FILE>
|
||||
<TITLE>GtkEventControllerKey</TITLE>
|
||||
@@ -6118,8 +6140,6 @@ gtk_event_controller_key_get_type
|
||||
<TITLE>GtkEventControllerFocus</TITLE>
|
||||
GtkEventControllerFocus
|
||||
gtk_event_controller_focus_new
|
||||
gtk_event_controller_focus_get_focus_origin
|
||||
gtk_event_controller_focus_get_focus_target
|
||||
gtk_event_controller_focus_contains_focus
|
||||
gtk_event_controller_focus_is_focus
|
||||
|
||||
@@ -6822,14 +6842,16 @@ gtk_drag_source_get_type
|
||||
<FILE>gtkdroptarget</FILE>
|
||||
GtkDropTarget
|
||||
gtk_drop_target_new
|
||||
gtk_drop_target_set_formats
|
||||
gtk_drop_target_set_gtypes
|
||||
gtk_drop_target_get_gtypes
|
||||
gtk_drop_target_get_formats
|
||||
gtk_drop_target_set_actions
|
||||
gtk_drop_target_get_actions
|
||||
gtk_drop_target_set_preload
|
||||
gtk_drop_target_get_preload
|
||||
gtk_drop_target_get_drop
|
||||
gtk_drop_target_find_mimetype
|
||||
gtk_drag_highlight
|
||||
gtk_drag_unhighlight
|
||||
gtk_drop_target_get_value
|
||||
gtk_drop_target_reject
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_DROP_TARGET
|
||||
@@ -6842,6 +6864,27 @@ GTK_DROP_TARGET_GET_CLASS
|
||||
gtk_drop_target_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkdroptargetasync</FILE>
|
||||
GtkDropTargetAsync
|
||||
gtk_drop_target_async_new
|
||||
gtk_drop_target_async_set_formats
|
||||
gtk_drop_target_async_get_formats
|
||||
gtk_drop_target_async_set_actions
|
||||
gtk_drop_target_async_get_actions
|
||||
gtk_drop_target_async_reject_drop
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_DROP_TARGET_ASYNC
|
||||
GTK_DROP_TARGET_ASYNC
|
||||
GTK_DROP_TARGET_ASYNC_CLASS
|
||||
GTK_IS_DROP_TARGET_ASYNC
|
||||
GTK_IS_DROP_TARGET_ASYNC_CLASS
|
||||
GTK_DROP_TARGET_ASYNC_GET_CLASS
|
||||
<SUBSECTION Private>
|
||||
gtk_drop_target_async_get_type
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>gtkdropcontrollermotion</FILE>
|
||||
<TITLE>GtkDropControllerMotion</TITLE>
|
||||
@@ -6866,9 +6909,14 @@ gtk_drop_controller_motion_get_type
|
||||
<SECTION>
|
||||
<FILE>gtkdragicon</FILE>
|
||||
GtkDragIcon
|
||||
gtk_drag_icon_new_for_drag
|
||||
gtk_drag_icon_get_for_drag
|
||||
gtk_drag_icon_set_child
|
||||
gtk_drag_icon_get_child
|
||||
gtk_drag_icon_set_from_paintable
|
||||
|
||||
<SUBSECTION>
|
||||
gtk_drag_icon_create_widget_for_value
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GTK_TYPE_DRAG_ICON
|
||||
GTK_DRAG_ICON
|
||||
|
||||
@@ -2,9 +2,7 @@
|
||||
#include <gtk/gtkunixprint.h>
|
||||
|
||||
gtk_about_dialog_get_type
|
||||
gtk_accel_group_get_type
|
||||
gtk_accel_label_get_type
|
||||
gtk_accel_map_get_type
|
||||
gtk_accessible_get_type
|
||||
gtk_actionable_get_type
|
||||
gtk_action_bar_get_type
|
||||
@@ -165,7 +163,10 @@ gtk_search_entry_get_type
|
||||
gtk_selection_model_get_type
|
||||
gtk_separator_get_type
|
||||
gtk_settings_get_type
|
||||
gtk_shortcut_get_type
|
||||
gtk_shortcut_controller_get_type
|
||||
gtk_shortcut_label_get_type
|
||||
gtk_shortcut_manager_get_type
|
||||
gtk_shortcuts_window_get_type
|
||||
gtk_shortcuts_section_get_type
|
||||
gtk_shortcuts_group_get_type
|
||||
|
||||
@@ -63,25 +63,19 @@
|
||||
GDK translates these raw windowing system events into #GdkEvents.
|
||||
Typical input events are:
|
||||
<simplelist>
|
||||
<member>#GdkEventButton</member>
|
||||
<member>#GdkEventMotion</member>
|
||||
<member>#GdkEventCrossing</member>
|
||||
<member>#GdkEventKey</member>
|
||||
<member>#GdkEventFocus</member>
|
||||
<member>#GdkEventTouch</member>
|
||||
<member>button clicks</member>
|
||||
<member>pointer motion</member>
|
||||
<member>key presses</member>
|
||||
<member>focus changes</member>
|
||||
<member>touch events</member>
|
||||
</simplelist>
|
||||
These are all represented as #GdkEvents, but you can differentiate
|
||||
between different events by looking at their type, using
|
||||
gdk_event_get_event_type().
|
||||
</para>
|
||||
<para>
|
||||
Additionally, GDK/GTK synthesizes other signals to let know whether
|
||||
grabs (system-wide or in-app) are taking input away:
|
||||
<simplelist>
|
||||
<member>#GdkEventGrabBroken</member>
|
||||
<member>#GtkWidget::grab-notify</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<para>
|
||||
When GTK creates a GdkSurface, it connects to the ::event signal
|
||||
on it, which receives all of these input events. Surfaces have
|
||||
When GTK creates a GdkSurface, it connects to the #GdkSurface::event
|
||||
signal on it, which receives all of these input events. Surfaces have
|
||||
have signals and properties, e.g. to deal with window management
|
||||
related events.
|
||||
</para>
|
||||
@@ -96,14 +90,11 @@
|
||||
</para>
|
||||
<orderedlist>
|
||||
<listitem><para>
|
||||
Compress enter/leave notify events. If the event passed build an
|
||||
enter/leave pair together with the next event (peeked from GDK), both
|
||||
events are thrown away. This is to avoid a backlog of (de-)highlighting
|
||||
widgets crossed by the pointer.
|
||||
Find the widget which got the event.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Find the widget which got the event. If the widget can’t be determined
|
||||
the event is thrown away unless it belongs to a INCR transaction.
|
||||
Generate crossing (i.e. enter and leave) events when the focus or hover
|
||||
location change from one widget to another.
|
||||
</para></listitem>
|
||||
<listitem><para>
|
||||
Then the event is pushed onto a stack so you can query the currently
|
||||
@@ -137,24 +128,6 @@
|
||||
</para></listitem>
|
||||
</orderedlist>
|
||||
|
||||
<para>
|
||||
When a GDK backend produces an input event, it is tied to a #GdkDevice and
|
||||
a #GdkSurface, which in turn represents a windowing system surface in the
|
||||
backend. If a widget has grabbed the current input device, or all input
|
||||
devices, the event is propagated to that #GtkWidget. Otherwise, it is
|
||||
propagated to the the #GtkRoot which owns the #GdkSurface receiving the event.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Grabs are implemented for each input device, and globally. A grab for a
|
||||
specific input device (gtk_device_grab_add()), is sent events in
|
||||
preference to a global grab (gtk_grab_add()). Input grabs only have effect
|
||||
within the #GtkWindowGroup containing the #GtkWidget which registered the
|
||||
event’s #GdkSurface. If this #GtkWidget is a child of the grab widget, the
|
||||
event is propagated to the child — this is the basis for propagating
|
||||
events within modal dialogs.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
An event is propagated down and up the widget hierarchy in three phases
|
||||
(see #GtkPropagationPhase) towards a target widget.
|
||||
@@ -219,71 +192,75 @@
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Grabs</title>
|
||||
|
||||
<para>
|
||||
Grabs are a method to claim all input events from a device,
|
||||
they happen either implicitly on pointer and touch devices,
|
||||
or explicitly. Implicit grabs happen on user interaction, when
|
||||
a #GdkEventButtonPress happens, all events from then on, until
|
||||
after the corresponding #GdkEventButtonRelease, will be reported
|
||||
to the widget that got the first event. Likewise, on touch events,
|
||||
every #GdkEventSequence will deliver only events to the widget
|
||||
that received its %GDK_TOUCH_BEGIN event.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Explicit grabs happen programatically (both activation and
|
||||
deactivation), and can be either system-wide (GDK grabs) or
|
||||
application-wide (GTK grabs). On the windowing platforms that
|
||||
support it, GDK grabs will prevent any interaction with any other
|
||||
application/window/widget than the grabbing one, whereas GTK grabs
|
||||
will be effective only within the application (across all its
|
||||
windows), still allowing for interaction with other applications.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
But one important aspect of grabs is that they may potentially
|
||||
happen at any point somewhere else, even while the pointer/touch
|
||||
device is already grabbed. This makes it necessary for widgets to
|
||||
handle the cancellation of any ongoing interaction. Depending on
|
||||
whether a GTK or GDK grab is causing this, the widget will
|
||||
respectively receive a #GtkWidget::grab-notify signal, or a
|
||||
#GdkEventGrabBroken event.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
On gestures, these signals are handled automatically, causing the
|
||||
gesture to cancel all tracked pointer/touch events, and signal
|
||||
the end of recognition.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
<title>Keyboard input</title>
|
||||
|
||||
<para>
|
||||
Every #GtkWindow maintains a single focus location (in
|
||||
the ::focus-widget property). The focus widget is the
|
||||
target widget for key events sent to the window. Only
|
||||
widgets which have ::can-focus set to %TRUE can become
|
||||
the focus. Typically these are input controls such as
|
||||
entries or text fields, but e.g. buttons can take the
|
||||
focus too.
|
||||
Every #GtkWindow maintains a single focus location (in the
|
||||
#GtkWindow:focus-widget property). The focus widget is the target
|
||||
widget for key events sent to the window. Only widgets which have
|
||||
#GtkWidget:can-focus set to %TRUE can become the focus. Typically
|
||||
these are input controls such as entries or text fields, but e.g.
|
||||
buttons can take the focus too.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Input widgets can be given the focus by clicking on them,
|
||||
but focus can also be moved around with certain key
|
||||
events (this is known as “keyboard navigation”). GTK
|
||||
reserves the Tab key to move the focus to the next location,
|
||||
and Shift-Tab to move it back to the previous one. In addition
|
||||
many containers allow “directional navigation” with the
|
||||
arrow keys.
|
||||
Input widgets can be given the focus by clicking on them, but focus
|
||||
can also be moved around with certain key events (this is known as
|
||||
“keyboard navigation”). GTK reserves the Tab key to move the focus
|
||||
to the next location, and Shift-Tab to move it back to the previous
|
||||
one. In addition many containers allow “directional navigation” with
|
||||
the arrow keys.
|
||||
</para>
|
||||
|
||||
<!-- mnemonics, accelerators, bindings -->
|
||||
<para>
|
||||
Many widgets can be “activated” to trigger and action. E.g., you can
|
||||
activate a button or switch by clicking on them, but you can also
|
||||
activate them with the keyboard, by using the Enter or Space keys.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Apart from keyboard navigation, activation and directly typing into
|
||||
entries or text views, GTK widgets can use key events for activating
|
||||
“shortcuts”. Shortcuts generally act as a quick way to move the focus
|
||||
around or to activate a widget that does not currently have the focus.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
GTK has traditionally supported different kinds of shortcuts:
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
<term>Mnmemonics</term>
|
||||
<listitem><para>
|
||||
Mnemonics are usually triggered using Alt as a modifier for a letter.
|
||||
They are used in places where a label is associated with a control,
|
||||
and are indicated by underlining the letter in the label. As a special
|
||||
case, inside menus (i.e. inside #GtkPopoverMenu), mnemonics can be
|
||||
trigered without the modifier.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Key bindings</term>
|
||||
<listitem><para>
|
||||
Key bindings are specific to individual widgets, such as Ctrl-C or
|
||||
Ctrl-V in an entry copy to or paste from the clipboard. They are only
|
||||
triggered when the widget has focus.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
<varlistentry>
|
||||
<term>Accelerators</term>
|
||||
<listitem><para>
|
||||
Accelerators are any other shortcuts that can be activated regardless
|
||||
of where the focus is, and typically trigger global actions, such as
|
||||
Ctrl-Q to quit an application.
|
||||
</para></listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
</para>
|
||||
<para>
|
||||
Under the hood, all shortcuts are represented as instances of #GtkShortcut,
|
||||
and they are managed by #GtkShortcutController.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2 id="event-controllers-and-gestures">
|
||||
@@ -330,6 +307,13 @@
|
||||
</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Shortcuts are handled by #GtkShortcutController, which is
|
||||
a complex event handler that can either activate shortcuts
|
||||
itself, or propagate them to another controller, depending
|
||||
on its #GtkShortcutController:scope.
|
||||
</para>
|
||||
</refsect2>
|
||||
|
||||
<refsect2>
|
||||
|
||||
@@ -291,11 +291,16 @@
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Stop accessing GdkEvent fields</title>
|
||||
<title>Adapt to GdkEvent API changes</title>
|
||||
<para>
|
||||
Direct access to GdkEvent structs is no longer possible in GTK 4. Some
|
||||
frequently-used fields already had accessors in GTK 3, and the remaining
|
||||
fields have gained accessors in GTK 4.
|
||||
Direct access to GdkEvent structs is no longer possible in
|
||||
GTK 4. Some frequently-used fields already had accessors
|
||||
in GTK 3, and the remaining fields have gained accessors
|
||||
in GTK 4.
|
||||
</para>
|
||||
<para>
|
||||
GdkEvent is now a strictly read-only boxed type, and you
|
||||
can no longer change any of its fields.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -324,10 +329,60 @@
|
||||
GTK 4 no longer provides the gdk_device_grab() or gdk_seat_grab() apis.
|
||||
</para>
|
||||
<para>
|
||||
If you need to dismiss a popup when the user clicks outside (a common
|
||||
If you need to dismiss a popup when the user clicks outside (the most common
|
||||
use for grabs), you can use the GdkSurface #GdkSurface:autohide property instead.
|
||||
GtkPopover also has a #GtkPopover:autohide property.
|
||||
</para>
|
||||
<para>
|
||||
If you need to prevent the user from interacting with a window
|
||||
while a dialog is open, use #GtkDialog::modal.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Stop using gtk_get_current_... APIs</title>
|
||||
<para>
|
||||
The function gtk_get_current_event() and its variants have been
|
||||
replaced by equivalent event controller APIs:
|
||||
gtk_event_controller_get_current_event(), etc.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Adapt to surface API changes</title>
|
||||
<para>
|
||||
In GTK 4, the two roles of a standalone toplevel window
|
||||
and of a popup that is placed relative to a parent window
|
||||
have been separated out into two interfaces, #GdkToplevel
|
||||
and #GtkPopup.
|
||||
</para>
|
||||
<para>
|
||||
Surfaces implementing these interfaces are created with
|
||||
gdk_surface_new_toplevel() and gdk_surface_new_popup(),
|
||||
respectively, and they are presented on screen using
|
||||
gtk_toplevel_present() and gdk_popup_present(). The
|
||||
present() functions take parameters in the form of an
|
||||
auxiliary layout struct, #GdkPopupLayout or
|
||||
#GdkToplevelLayout.
|
||||
</para>
|
||||
<para>
|
||||
If your code is dealing directly with surfaces, you may
|
||||
have to change it to call the API in these interfaces,
|
||||
depending on whether the surface you are dealing with
|
||||
is a toplevel or a popup.
|
||||
</para>
|
||||
<para>
|
||||
As part of this reorganization, X11-only concepts such
|
||||
as sticky or keep-below have been removed. If you need
|
||||
to use them on your X11 windows, you will have to set
|
||||
the corresponding X11 properties (as specified in the
|
||||
EWMH) yourself.
|
||||
</para>
|
||||
<para>
|
||||
A number of minor API cleanups have happened in GdkSurface
|
||||
as well. For example, gdk_surface_input_shape_combine_region()
|
||||
has been renamed to gdk_surface_set_input_region().
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
@@ -351,8 +406,29 @@
|
||||
<section>
|
||||
<title>Adapt to GdkKeymap API changes</title>
|
||||
<para>
|
||||
The way to get a keymap has changed slightly. gdk_keymap_get_for_display() has
|
||||
been renamed to gdk_display_get_keymap().
|
||||
GdkKeymap no longer exists as an independent object.
|
||||
</para>
|
||||
<para>
|
||||
If you need access to keymap state, it is now exposed as properties
|
||||
on the #GdkDevice representing the keyboard: #GdkDevice:direction,
|
||||
#GdkDevice:has-bidi-layouts, #GdkDevice:caps-lock-state,
|
||||
#GdkDevice:num-lock-state, #GdkDevice:scroll-lock-state and
|
||||
#GdkDevice:modifier-state.
|
||||
To obtain the keyboard device, you can use
|
||||
<literal>gdk_seat_get_keyboard (gdk_display_get_default_seat (display))</literal>.
|
||||
</para>
|
||||
<para>
|
||||
If you need access to translated keys for event handling, #GdkEvent
|
||||
now includes all of the translated key state, including consumed
|
||||
modifiers, group and shift level, so there should be no need to
|
||||
do manually call gdk_keymap_translate_keyboard_state() (which has
|
||||
been removed).
|
||||
</para>
|
||||
<para>
|
||||
If you need to do forward or backward mapping between key codes
|
||||
and key values, use gdk_display_map_keycode() and gdk_display_map_keyval(),
|
||||
which is the replacement for gdk_keymap_get_entries_for_keycode()
|
||||
and gdk_keymap_get_entries_for_keycode().
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -371,6 +447,54 @@
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Adapt to changes in keyboard modifier handling</title>
|
||||
<para>
|
||||
GTK 3 has the idea that use of modifiers may differ between different
|
||||
platforms, and has a #GdkModifierIntent api to let platforms provide
|
||||
hint about how modifiers are expected to be used. It also promoted
|
||||
the use of <Primary> instead of <Control> to specify
|
||||
accelerators that adapt to platform conventions.
|
||||
</para>
|
||||
<para>
|
||||
In GTK 4, the meaning of modifiers has been fixed, and backends are
|
||||
expected to map the platform conventions to the existing modifiers.
|
||||
The expected use of modifiers in GTK 4 is:
|
||||
<simplelist>
|
||||
<member>GDK_CONTROL_MASK - Primary accelerators</member>
|
||||
<member>GDK_ALT_MASK - Mnemonics</member>
|
||||
<member>GDK_SHIFT_MASK - Extending selections</member>
|
||||
<member>GDK_CONTROL_MASK - Modifying selections</member>
|
||||
<member>GDK_CONTROL_MASK|GDK_ALT_MASK - Prevent text input</member>
|
||||
</simplelist>
|
||||
</para>
|
||||
<para>
|
||||
Consequently, #GdkModifierIntent and related APIs have been removed,
|
||||
and <Control> is preferred over <Primary> in accelerators.
|
||||
</para>
|
||||
<para>
|
||||
A related change is that GTK 4 no longer supports the use of archaic
|
||||
X11 'real' modifiers with the names Mod1,..., Mod5, and %GDK_MOD1_MASK
|
||||
has been renamed to %GDK_ALT_MASK.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Focus handling changes</title>
|
||||
<para>
|
||||
The semantics of the #GtkWidget:can-focus property have changed.
|
||||
In GTK 3, this property only meant that the widget itself would not
|
||||
accept keyboard input, but its children still might (in the case of
|
||||
containers). In GTK 4, if :can-focus is %FALSE, the focus cannot enter
|
||||
the widget or any of its descendents, and the default value has changed
|
||||
from %FALSE to %TRUE.
|
||||
</para>
|
||||
<para>
|
||||
The recommended way to influence focus behavior of custom widgets
|
||||
in GTK 4 is to override the focus() and grab_focus() vfuncs.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Stop using GtkEventBox</title>
|
||||
<para>
|
||||
@@ -511,6 +635,14 @@
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Don't use -gtk-outline-...-radius in your CSS</title>
|
||||
<para>
|
||||
These non-standard properties have been removed from GTK
|
||||
CSS. Just use regular border radius.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Use gtk_widget_measure</title>
|
||||
<para>
|
||||
@@ -717,8 +849,8 @@
|
||||
<title>Adapt to changes in GtkOverlay API</title>
|
||||
<para>
|
||||
The GtkOverlay::pass-through child property has been replaced by the
|
||||
GtkWidget::can-pick property. Note that they have the opposite sense:
|
||||
pass-through == !can-pick.
|
||||
GtkWidget::can-target property. Note that they have the opposite sense:
|
||||
pass-through == !can-target.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
@@ -754,15 +886,6 @@
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Stop using tabular menus</title>
|
||||
<para>
|
||||
Tabular menus were rarely used and complicated the menu code,
|
||||
so they have been removed. If you need complex layout in menu-like
|
||||
popups, consider using a #GtkPopover instead.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Stop using gtk_menu_set_display()</title>
|
||||
<para>
|
||||
@@ -889,6 +1012,13 @@
|
||||
can only be constructed from menu models, so the porting effort involves
|
||||
switching to menu models and actions.
|
||||
</para>
|
||||
<para>
|
||||
Tabular menus were rarely used and complicated the menu code,
|
||||
so they have not been brought over to #GtkPopoverMenu. If you need
|
||||
complex layout in menu-like popups, consider directly using a
|
||||
#GtkPopover instead.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Since menus are gone, GtkMenuButton also lost its ability to show menus,
|
||||
and needs to be used with popovers in GTK 4.
|
||||
@@ -947,6 +1077,19 @@
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Adapt to GtkIconTheme API changes</title>
|
||||
<para>
|
||||
gtk_icon_theme_lookup_icon() returns a #GtkIconPaintable
|
||||
object now, instead of a #GtkIconInfo. It always returns
|
||||
a paintable in the requested size, and never fails.
|
||||
</para>
|
||||
<para>
|
||||
A number of no-longer-relevant lookup flags and API
|
||||
variants have been removed.
|
||||
</para>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<title>Update to GtkFileChooser API changes</title>
|
||||
<para>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user