mirror of
https://github.com/gryf/wmaker.git
synced 2026-05-03 23:00:53 +02:00
Compare commits
843 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1f03c13f4d | |||
| 8e84264036 | |||
| 4b4abf4c50 | |||
| a631e3060e | |||
| 6c5c3e6181 | |||
| 329f82f6e7 | |||
| 60a900be28 | |||
| c7c736e283 | |||
| 752a949492 | |||
| be495bedbc | |||
| 412b3eace2 | |||
| 0aeba6064b | |||
| ec115fedf7 | |||
| 29177f94ed | |||
| ae050ceb40 | |||
| b27b44db72 | |||
| c6f029c946 | |||
| 66bf19c1e0 | |||
| 073235ada4 | |||
| 1b8eb63376 | |||
| 75a8299d18 | |||
| cc0a652ea8 | |||
| 80079cd343 | |||
| 955c6793a6 | |||
| 189679b49c | |||
| e45a3bc07d | |||
| bc16a03722 | |||
| 260415eb42 | |||
| c8174a4b2e | |||
| 2901b418ad | |||
| ae6b03e50f | |||
| 128ba2ddc7 | |||
| 7ca96b9ed6 | |||
| 839061a25a | |||
| 1e63c590b6 | |||
| 92e1e9fb0b | |||
| ddf0b20367 | |||
| d303317a31 | |||
| c620b354b5 | |||
| ebac2bbcd8 | |||
| 3281349f8d | |||
| 3f5280987e | |||
| 6d0953bc22 | |||
| ef1a504898 | |||
| 474b23344a | |||
| 77db6dc649 | |||
| b09ac30233 | |||
| 6e14b6142b | |||
| 7778df2fc5 | |||
| 156841f80e | |||
| c82e6dad5c | |||
| 95c68fe26d | |||
| 77c3b95fd5 | |||
| b662d0827c | |||
| a542934e67 | |||
| d2b2c3238b | |||
| d37a3162e0 | |||
| 9ddacfc29b | |||
| 7e21785710 | |||
| 7cfdf6bd68 | |||
| 72942267aa | |||
| ac19c4bc07 | |||
| 14bd13b1be | |||
| afe13d3e72 | |||
| e356ef8c05 | |||
| 3d993a7323 | |||
| a4a6e65ca9 | |||
| 4392fdc291 | |||
| 67e2f5e1ca | |||
| 3579c85af1 | |||
| 896bbce2e5 | |||
| 8f1ee27595 | |||
| 541947e9ef | |||
| 7bb7d0f4d6 | |||
| da676c9e9e | |||
| 4edf589a5b | |||
| 709eec4bce | |||
| b179803c11 | |||
| 5cd40deb20 | |||
| 9db1ea580d | |||
| 9e56f58742 | |||
| 4b946f69e2 | |||
| d55be193b8 | |||
| e5b227fe8d | |||
| d947095881 | |||
| 93b049356f | |||
| 75f353bef4 | |||
| 2264ed9de6 | |||
| d0aa2cefcd | |||
| a52d13c8b8 | |||
| 215b6ee2e6 | |||
| ab45c6c6c2 | |||
| 3344f2b040 | |||
| ecef2b2890 | |||
| 802cbc0d75 | |||
| 157d1ba85f | |||
| 91e7f37074 | |||
| 18a539b372 | |||
| eae9200c5d | |||
| 25cb9d208a | |||
| 23471b2e21 | |||
| 258ffc8b97 | |||
| 86b7ec1a58 | |||
| 9831e3f72a | |||
| 0a55facac0 | |||
| 0ecf7d3540 | |||
| 4576b5bf1e | |||
| 0526ddfc54 | |||
| 4c52232ee7 | |||
| 43edd37ee2 | |||
| e95aea2e30 | |||
| 038a3588d6 | |||
| 0b2fd6a8c8 | |||
| 3e991badf7 | |||
| ac6d284269 | |||
| 83b94b1616 | |||
| d045ffcf7d | |||
| 6c69dc32a0 | |||
| 3b1c00ad06 | |||
| dd6fe27858 | |||
| 45f3f5d0ae | |||
| 7185af15cf | |||
| 80e8dd43f7 | |||
| a383074c99 | |||
| 52a623729d | |||
| d4ee17f0b5 | |||
| 7475bc5d0a | |||
| 35f87b5592 | |||
| 5e37d13eb6 | |||
| 4b1aee3e79 | |||
| 0ccc5bbde7 | |||
| 59a686d22e | |||
| 26d46f6e16 | |||
| ceafbf0629 | |||
| cf178d011b | |||
| 682c2767c2 | |||
| 0e00c6b605 | |||
| e9717ed719 | |||
| 9e59d19507 | |||
| 94f98dcd25 | |||
| 6c7266c338 | |||
| b4bd6d0cad | |||
| c7f7c10d7c | |||
| d831766572 | |||
| e2ecfbfd54 | |||
| a8ec32d41a | |||
| 1215680b6d | |||
| 77df89396c | |||
| c8883fdbb0 | |||
| 3cc5808dcd | |||
| 8ca89f0141 | |||
| 76fa91d21e | |||
| d2d5297a1e | |||
| 7b317a5fba | |||
| 9f8dc6f5dc | |||
| bc56db0776 | |||
| 15d06ff064 | |||
| 2dd98666f1 | |||
| d1a7db8aea | |||
| 64a8ecb390 | |||
| a9e336256b | |||
| e9b20b51e9 | |||
| 1d8b38b6e0 | |||
| 82ad19d420 | |||
| 492b22d975 | |||
| 62405fbb75 | |||
| f1fef40f0d | |||
| 2fb9308a67 | |||
| d902477efd | |||
| 5ee19c2308 | |||
| fabd4252ab | |||
| 630e9292c2 | |||
| 14d1b8197a | |||
| 4d658341d2 | |||
| ac75047aef | |||
| 6d6f9f6ff5 | |||
| 370adc94e7 | |||
| 532acdc443 | |||
| d7d38aa443 | |||
| a6209cc89b | |||
| 01bd523cee | |||
| 45ab72a78a | |||
| 437b76812d | |||
| e3ee459a78 | |||
| d70b546f2e | |||
| 812930b7cd | |||
| 2a14004fc3 | |||
| 04e9f33437 | |||
| 150816c687 | |||
| ddacfa5d63 | |||
| 0718297e9a | |||
| 9cc16182d3 | |||
| f6165d6e80 | |||
| 10c36d244e | |||
| 515eb652c7 | |||
| 8ed92efa3c | |||
| cc839f8bc5 | |||
| 48d4820dee | |||
| d4f5f3ec7f | |||
| 83f7fa43ce | |||
| 55a816bdbc | |||
| 7639fa1c15 | |||
| 93b411f258 | |||
| 326a67e18f | |||
| c089c6aea4 | |||
| 66b0ee3c4d | |||
| a6c8577eb4 | |||
| 094001a53d | |||
| deba131857 | |||
| a9bc9751a2 | |||
| 58b6728743 | |||
| 894d096d6e | |||
| a41b0aa21d | |||
| d4cc033379 | |||
| 308b9f4975 | |||
| 1d1c904126 | |||
| ca4ae5068b | |||
| 26491867a3 | |||
| dce34e926b | |||
| a0b283a60f | |||
| 671db45007 | |||
| 0c6ad643c8 | |||
| 5076b6f496 | |||
| 54c8535365 | |||
| 24f5b32469 | |||
| 85169642ca | |||
| 9f9ef6417e | |||
| fb2a6d2e61 | |||
| 8219c36488 | |||
| bd38778bef | |||
| 1e45ff2305 | |||
| 7e1cdf2d59 | |||
| 43f0474013 | |||
| a079544647 | |||
| 03ec24502d | |||
| 5c90ed9d2d | |||
| 735651df55 | |||
| bfab769065 | |||
| c060477d57 | |||
| 75f133285f | |||
| a6ec6a30a3 | |||
| 6afa419b01 | |||
| a2bf67f54c | |||
| 351e05dca9 | |||
| ae78e88eef | |||
| f049635fa5 | |||
| 4221e30bd2 | |||
| 71558f4ce3 | |||
| 4b61081353 | |||
| 4138c57631 | |||
| 0bbb122b94 | |||
| 0e274dc979 | |||
| 4dfb0dd059 | |||
| bcb53700d6 | |||
| e5f7ef23a6 | |||
| 70f89fd9c5 | |||
| 19202fd2db | |||
| aadd694a6b | |||
| fbec3a728f | |||
| 944bb49997 | |||
| 0ac6827a9b | |||
| f030ab7664 | |||
| 2a8fc1df9a | |||
| 296456f361 | |||
| f2cd2c9f03 | |||
| d125f80dee | |||
| 8e47ca8e62 | |||
| 29cf48b934 | |||
| 816fa00625 | |||
| 6ebec0bb9f | |||
| 7c50721747 | |||
| 4559cbbccc | |||
| e828e1c074 | |||
| 97a9300aa4 | |||
| fd56152202 | |||
| 58862300f9 | |||
| 1612d2f345 | |||
| 920c6d16b1 | |||
| 8aecba27d1 | |||
| fc63d72032 | |||
| eb2a9d97a2 | |||
| 9abe4165d1 | |||
| 82ab2d2d06 | |||
| bbf24d1d39 | |||
| 224cb403a7 | |||
| 1cd8fea423 | |||
| a98680cd14 | |||
| 7d423a3a0f | |||
| 033d2d9a6f | |||
| 6e2075f3df | |||
| 5d2fd7bf7e | |||
| f6742662ec | |||
| 583f66ec4e | |||
| cd23e77fd1 | |||
| 230a501d36 | |||
| 3022edd060 | |||
| 1713a88656 | |||
| 00a25db9ea | |||
| c678580621 | |||
| 44bc9cc264 | |||
| dfa92906c0 | |||
| 27dc5efd2e | |||
| 86659be668 | |||
| e314f10909 | |||
| 54a24ab6f7 | |||
| a17d131da3 | |||
| 6320bb6219 | |||
| f9bc310fa6 | |||
| 58249c2b9b | |||
| bb716a4ca1 | |||
| 91f8e21668 | |||
| 5f18f60fd2 | |||
| a215869067 | |||
| 909deea70c | |||
| 984a992d0e | |||
| e82d86813e | |||
| d9bc96e497 | |||
| a7baed6cf7 | |||
| a12f0d453a | |||
| 41193bdacd | |||
| a7f8e990db | |||
| b59273f199 | |||
| be922384ac | |||
| 31f16b65a3 | |||
| 3665410377 | |||
| 4477ae4da4 | |||
| 9330a021e5 | |||
| 41ab926090 | |||
| b32ccee5cb | |||
| 6734646265 | |||
| 6a044fe5ae | |||
| 6dd1498f7c | |||
| 090b761fde | |||
| 49db946aa2 | |||
| a2cc89dd3d | |||
| de09ac5dad | |||
| 3dce639aae | |||
| 00dffbe317 | |||
| 7759d06851 | |||
| bf644338e4 | |||
| 95561fba08 | |||
| a0b223263e | |||
| 2555413838 | |||
| 3e3f06a7be | |||
| 1f80c82091 | |||
| fb5f6c30c0 | |||
| 972d85610a | |||
| f0f95165e4 | |||
| f895b906a4 | |||
| 5ab9b7c6be | |||
| 1e490f8233 | |||
| ba3df2599d | |||
| c803218ed1 | |||
| 6c6853ea30 | |||
| b48b503eb1 | |||
| 1c8b680e3d | |||
| 5eeaf6b890 | |||
| f9236c8d20 | |||
| 26bb94a8e7 | |||
| b185d46286 | |||
| 8f29bdc690 | |||
| e2cfed3377 | |||
| 4665972175 | |||
| 8606ae9a83 | |||
| 070f0ad8f4 | |||
| 2913ac0f09 | |||
| dae63b5e96 | |||
| 738a78b3e2 | |||
| 1dace5699f | |||
| 5a95631091 | |||
| 2427200c3e | |||
| d6c1ac3ecf | |||
| 9b5eaa3d3e | |||
| 2beb5f2c52 | |||
| f1809a7786 | |||
| 8b919b0d33 | |||
| d13b78bdde | |||
| 6668715402 | |||
| 100745d356 | |||
| 7c89ca2551 | |||
| 0c737bc834 | |||
| b3f8d0997b | |||
| 673ea18020 | |||
| c89ec25c80 | |||
| 569fbff07c | |||
| 36879de261 | |||
| bfd88e07e6 | |||
| 81b89f6a4c | |||
| 6cfc71d40a | |||
| ccc676a2bf | |||
| 2dbd778ed4 | |||
| f63635dd17 | |||
| 97702618de | |||
| b68a1994c2 | |||
| fe459fbab3 | |||
| 5f2dac318c | |||
| bfda22ef1a | |||
| 46daa76f77 | |||
| 02cc702029 | |||
| 6f195b18fc | |||
| 101ef6f28e | |||
| 5a5595f76c | |||
| 1a5abe9d84 | |||
| d364afff02 | |||
| 273d17a0be | |||
| d6f754e747 | |||
| b07075aed3 | |||
| ad4545b1d8 | |||
| ee36395ddf | |||
| ff865c31f0 | |||
| adc1687f98 | |||
| ac0690b324 | |||
| c261f8ec35 | |||
| e037ae3684 | |||
| 83f0b764e6 | |||
| 3140c09240 | |||
| 8fba9945e0 | |||
| 30cd22859a | |||
| e13cfcd093 | |||
| c2a03a3de5 | |||
| db6b50e6c1 | |||
| fa8121ee61 | |||
| f6320d4fa5 | |||
| cea5f6107c | |||
| 5d643a67dd | |||
| 9087222d1e | |||
| dede386b3d | |||
| b2b2ebad4c | |||
| d4a0b2f115 | |||
| 2411298ff6 | |||
| cdaa7a4520 | |||
| 7df224440b | |||
| 01ad3ead5d | |||
| 6fa1c0c009 | |||
| ac92f1a844 | |||
| 21d3fadebb | |||
| 3986629590 | |||
| c052addd1d | |||
| 6e4698fe11 | |||
| 3617e4c20c | |||
| f3fdf0b8dd | |||
| 9328ba5b3c | |||
| c9fbcda0b0 | |||
| eadb7f3ab2 | |||
| 9e7987713f | |||
| 62d62eebf1 | |||
| 160f879cce | |||
| 28da4c98e3 | |||
| 17a47af160 | |||
| 014a315f3a | |||
| e2f8525728 | |||
| 002d415d02 | |||
| 92bc458fac | |||
| 6f3dbfeaba | |||
| 3426f8110b | |||
| f9b2cf9747 | |||
| ad590811f6 | |||
| d48a37060c | |||
| 23417d9934 | |||
| 5561199c87 | |||
| 6429847494 | |||
| b7a1528833 | |||
| 2ea6162629 | |||
| 5a730d63b2 | |||
| fd31b29d0d | |||
| ebf2801f4a | |||
| 8b46f16205 | |||
| 2da2045efa | |||
| 67e9e7e554 | |||
| 4f18b3e1f4 | |||
| cb1760dc0b | |||
| 9f7e51e66d | |||
| bf6f81434b | |||
| af892d7dd6 | |||
| 7fa14a0137 | |||
| 51d36afc8f | |||
| 84727563f9 | |||
| c7c0b43629 | |||
| ac33bb9d1b | |||
| 563cda28d3 | |||
| 65802d3402 | |||
| 9de5a27dbc | |||
| 42e4069541 | |||
| e5632a9120 | |||
| c3ad2513a9 | |||
| 7277787110 | |||
| 2f33b3c2bc | |||
| fd19456d66 | |||
| 688c2277d7 | |||
| 755ce07d76 | |||
| fc6ed78654 | |||
| c11b08d42b | |||
| f7e1f5d5f4 | |||
| 4660e5b1eb | |||
| f58cf6a8cd | |||
| 15ae70b159 | |||
| 88393f4a6c | |||
| 1f74d4698c | |||
| 97189ce2cc | |||
| 2fec5f9f28 | |||
| 7a2eb68aa4 | |||
| 8a822004ee | |||
| 54db8d6c43 | |||
| e11800652e | |||
| b2c5078987 | |||
| 9c4b19d8aa | |||
| b281587397 | |||
| 7e42fedcbb | |||
| c84e787a24 | |||
| 2db044993b | |||
| 49e94f9747 | |||
| 16e92d89aa | |||
| fc437783f9 | |||
| fee129b181 | |||
| e545b2abf9 | |||
| b6f48ee9b8 | |||
| cc23912efc | |||
| d9ea6f0e25 | |||
| fa821810cf | |||
| 443a08ea16 | |||
| 791fdd1eff | |||
| e666cfc6a5 | |||
| ae7e228aa4 | |||
| 0dfb42caae | |||
| 6691a653a7 | |||
| 325dc85891 | |||
| eb1c06d704 | |||
| 177c5095e9 | |||
| ae9cb306ef | |||
| 35068ba2d2 | |||
| 1c191f0e66 | |||
| b35cc42205 | |||
| 73420b3d2d | |||
| 280615f8a1 | |||
| 1b1cb99e36 | |||
| 08b27e5edd | |||
| 9bd400db67 | |||
| c68431c612 | |||
| 5714dce424 | |||
| b295a2029e | |||
| 67da339ccb | |||
| 945f4d2389 | |||
| b64d9e6be0 | |||
| 9ab2203456 | |||
| d28edde23e | |||
| 79a95d7173 | |||
| 1df08cc492 | |||
| bae28b2fae | |||
| d6d165c29d | |||
| 0a009143c3 | |||
| 8088dc1eab | |||
| 4d0585ede2 | |||
| 81e51182e5 | |||
| 42acb5d34c | |||
| 6aad540b88 | |||
| ea2b5f0641 | |||
| 28b0169147 | |||
| fa5f8d9937 | |||
| ea42641033 | |||
| 5ecb96cbf4 | |||
| 14d1d3f141 | |||
| 976083f5b9 | |||
| 997b3e5d91 | |||
| fd1dd9c7ea | |||
| a8f6abc9ea | |||
| 8276ff1331 | |||
| 1a068faa49 | |||
| c3ba9aeba3 | |||
| 5881d1a8ba | |||
| bed5ebea89 | |||
| edc12fad9f | |||
| af2aba6f95 | |||
| 784f6794e5 | |||
| 8fa16bef00 | |||
| 1c1909d5fe | |||
| e14fad1162 | |||
| 0bab67f9be | |||
| 6ef010d974 | |||
| 9d9b6d3fcf | |||
| ba3e575971 | |||
| 3d6da4b210 | |||
| f2f1bcb209 | |||
| 495e82fc9a | |||
| ea39621f91 | |||
| e03088ebe2 | |||
| bc4f3352b6 | |||
| c8ea949b1a | |||
| 6ef343ed87 | |||
| 032f6587d9 | |||
| a93570e5be | |||
| d72e6d415a | |||
| 04404bf47c | |||
| ae07899122 | |||
| 15db368291 | |||
| ba8cd2abe4 | |||
| 8d09af51b8 | |||
| 2086eefb7e | |||
| 842e145e0a | |||
| b4cf94aacd | |||
| 2ebfcd9c5c | |||
| 1cef020eb3 | |||
| 30fe0fb05f | |||
| d1c9f791d8 | |||
| 0c09d1f40d | |||
| 1ba9a8bcf5 | |||
| cfba824ed4 | |||
| 5cb1df5e27 | |||
| b3ec1ac8f4 | |||
| 22e62c0637 | |||
| 04de317dde | |||
| 438accb312 | |||
| 355a2e6906 | |||
| c743c4b77b | |||
| f6c9410ee7 | |||
| 709a6dc203 | |||
| d3414d335f | |||
| 6749e38693 | |||
| b6270f5a92 | |||
| 794a8f408a | |||
| 324e338087 | |||
| efdb29762d | |||
| 0277a99d08 | |||
| d309aa65d4 | |||
| 2bf380cd27 | |||
| 5293a5ae41 | |||
| d9996e6e93 | |||
| a9a0d2ac85 | |||
| 2429d5e196 | |||
| 58854cab9b | |||
| 740c812476 | |||
| 56acd42e43 | |||
| d42960ad35 | |||
| bdeb635194 | |||
| d543decee6 | |||
| f222a319b1 | |||
| bf6bc120a5 | |||
| 1b0b2d7b1b | |||
| bd49dbc2f5 | |||
| b944a4beb2 | |||
| 2cfb2b5276 | |||
| 80e00c3521 | |||
| 6efbb812b0 | |||
| bb544439f4 | |||
| c72f013136 | |||
| d6abbafeef | |||
| 609b3c29a6 | |||
| 6000af3828 | |||
| b266808331 | |||
| 3d2948e1a0 | |||
| d458304610 | |||
| d12b647069 | |||
| 796b557c3a | |||
| c7843e3f3b | |||
| 85a3fb13cc | |||
| 78690de103 | |||
| 2c6c7d51c9 | |||
| f956609a43 | |||
| 200b0d4098 | |||
| 99b1e26412 | |||
| 33d711ce6a | |||
| 5c9438115b | |||
| 67b4302ef8 | |||
| 35fe34ac85 | |||
| e78e485fb3 | |||
| 7962bfa612 | |||
| 94136ad29a | |||
| a65536f500 | |||
| a5a23f966e | |||
| e3769a0b09 | |||
| 1dc7dc4309 | |||
| 8abf7762cb | |||
| 3ed8cb6ffa | |||
| 31c00a8749 | |||
| a887b44977 | |||
| d2101b287a | |||
| 6ef4b06cca | |||
| d89b1f5ca3 | |||
| 034edb19e3 | |||
| 9b67b36276 | |||
| e1146e56e0 | |||
| 7d6ecb51f6 | |||
| be1c2a01dc | |||
| c6e323e75d | |||
| 0e884f793a | |||
| f9b14d7824 | |||
| ee617cb291 | |||
| b3c20610e9 | |||
| 1d1c5f77c7 | |||
| b5e89127ca | |||
| 7ce2636f63 | |||
| 10b890e920 | |||
| 4799df5506 | |||
| 723f217355 | |||
| 1d0f02f5ca | |||
| bbd42b3a20 | |||
| ff77b6b2e5 | |||
| 3bf2978e63 | |||
| 59106395c0 | |||
| e09df40f78 | |||
| 4b0838e93a | |||
| 781fd777eb | |||
| 03385c3d78 | |||
| e5efbe0cf2 | |||
| 149f6b0390 | |||
| 30e1fad926 | |||
| 11fe8bd860 | |||
| fa4d50a0ca | |||
| 0c938a3c0c | |||
| be4849448f | |||
| af1bcde13a | |||
| 34d82e5462 | |||
| de00154fa1 | |||
| d9438e65ef | |||
| 4bed8d14d7 | |||
| ad84a2dc8f | |||
| 41745d98d4 | |||
| 519302223c | |||
| ea8f18aff1 | |||
| c10469264d | |||
| 47ac986b53 | |||
| 12babda9e7 | |||
| 80f18f60d2 | |||
| 10371836ed | |||
| a24efec61f | |||
| 6397f3403a | |||
| 8ed6eacd06 | |||
| 54feb499cb | |||
| d83b5de644 | |||
| 3dea732ccb | |||
| 243a1924fa | |||
| 1bd9621709 | |||
| 8b78681a7f | |||
| 7bf2565316 | |||
| 7542451a04 | |||
| aa8ade1ef1 | |||
| 1b00071c26 | |||
| 63733c9133 | |||
| c5d4c27a90 | |||
| b80118fb41 | |||
| 4f050ebab9 | |||
| 88352b7274 | |||
| 3a15750ad5 | |||
| d1e1521a88 | |||
| 8c1f59a40f | |||
| 2b65b0416e | |||
| 2ed24561ff | |||
| 6e8639c47d | |||
| 877c26b467 | |||
| 285a926539 | |||
| 65e5f452ec | |||
| d726eaf617 | |||
| ac3212b001 | |||
| 7013b72dce | |||
| de5ef8c4f1 | |||
| 38463df102 | |||
| e27bab9f36 | |||
| 694e66e30d | |||
| a6d7ac8cb9 | |||
| 421e9f942c | |||
| 39357e4f90 | |||
| e16c6fbf2a | |||
| 38d160cb8c | |||
| 572af55c9f | |||
| 3d9c059591 | |||
| 810796b390 | |||
| 00f3ab0eaa | |||
| 894d3e89bf | |||
| f60f14b7bd | |||
| 0c659c1618 | |||
| 082de93ca0 | |||
| 01fbeab1d4 | |||
| 155e1f1fe1 | |||
| 662b83769a | |||
| 40139e208b | |||
| 7cb948098a | |||
| 33855a7a12 | |||
| 34f35ee534 | |||
| 3846609072 | |||
| 7e40a61d16 | |||
| 14dc8dd415 | |||
| 1b183633e1 | |||
| c3c8a0654c | |||
| 753f44ca83 | |||
| 03a7771c86 | |||
| 60d9fc5bb7 | |||
| 17c3404bef | |||
| 68e550b924 | |||
| 48ce9d046e | |||
| 0acbec36ac | |||
| 4a2e202af8 | |||
| a47f07cfc3 | |||
| fc35dfd277 | |||
| 74dc2d2cc0 | |||
| efe0da4618 | |||
| 8522283d68 | |||
| d02d362295 | |||
| e73c3e84de | |||
| 454c7bec5d | |||
| c0d4c16336 | |||
| 4bb93d3dab | |||
| 6ac27ba842 | |||
| 7d09b2c04f | |||
| 3de5b8fb42 | |||
| ff8fc10a65 | |||
| 484c880fd0 | |||
| 1748a18380 | |||
| 461214d870 | |||
| cb3702559a | |||
| e3dcadde30 | |||
| 1485233292 | |||
| 870a73ff32 | |||
| 65f8cb7a4b | |||
| a307b9f867 | |||
| d3f9c2cd75 | |||
| 4546065276 | |||
| 47ec274760 | |||
| da940a1e4d | |||
| b20a58d592 | |||
| 9937566ec4 | |||
| 81e2b42746 | |||
| 3d7e271d3b | |||
| 4d82f9efde | |||
| 12fa7b2203 | |||
| 38b58112ac | |||
| a8f0b68eaf | |||
| df49061865 | |||
| 5f6f73e178 | |||
| 5b42f6d090 | |||
| 334e2cc5f4 | |||
| 1497bc354b | |||
| 0d0169a413 | |||
| f40095ac9e | |||
| 39f6130a28 | |||
| 36b9f6cb23 | |||
| 7082561a42 | |||
| 10e0bdf39b | |||
| 88d9deea83 | |||
| bec572ea8b | |||
| a392c30b0d | |||
| 0399d70868 | |||
| 09761a75f0 | |||
| 2a3c11e202 | |||
| 118beb2c60 |
+51
-3
@@ -30,6 +30,12 @@ m4/ltversion.m4
|
|||||||
m4/lt~obsolete.m4
|
m4/lt~obsolete.m4
|
||||||
|
|
||||||
src/wconfig.h
|
src/wconfig.h
|
||||||
|
WINGs/WINGs/WINGsP.h
|
||||||
|
wrlib/wraster.h
|
||||||
|
|
||||||
|
# These files are generated by scripts
|
||||||
|
INSTALL-WMAKER
|
||||||
|
README.i18n
|
||||||
|
|
||||||
# These files are compilation stuff
|
# These files are compilation stuff
|
||||||
*.lo
|
*.lo
|
||||||
@@ -58,7 +64,6 @@ util/wmsetup
|
|||||||
util/wxcopy
|
util/wxcopy
|
||||||
util/wxpaste
|
util/wxpaste
|
||||||
|
|
||||||
wrlib/get-wraster-flags
|
|
||||||
wrlib/tests/testdraw
|
wrlib/tests/testdraw
|
||||||
wrlib/tests/testgrad
|
wrlib/tests/testgrad
|
||||||
wrlib/tests/testrot
|
wrlib/tests/testrot
|
||||||
@@ -74,8 +79,6 @@ WINGs/Tests/testmywidget
|
|||||||
WINGs/Tests/wmfile
|
WINGs/Tests/wmfile
|
||||||
WINGs/Tests/wmquery
|
WINGs/Tests/wmquery
|
||||||
WINGs/Tests/wtest
|
WINGs/Tests/wtest
|
||||||
WINGs/get-wings-flags
|
|
||||||
WINGs/get-wutil-flags
|
|
||||||
|
|
||||||
WPrefs.app/WPrefs
|
WPrefs.app/WPrefs
|
||||||
|
|
||||||
@@ -84,11 +87,56 @@ wrlib/wrlib.pc
|
|||||||
WINGs/WINGs.pc
|
WINGs/WINGs.pc
|
||||||
WINGs/WUtil.pc
|
WINGs/WUtil.pc
|
||||||
|
|
||||||
|
wrlib/libwraster.map
|
||||||
|
|
||||||
|
WindowMaker/appearance.menu
|
||||||
|
WindowMaker/menu
|
||||||
|
WindowMaker/menu.bg
|
||||||
|
WindowMaker/menu.fi
|
||||||
|
WindowMaker/menu.fy
|
||||||
|
WindowMaker/menu.hu
|
||||||
|
WindowMaker/menu.ko
|
||||||
|
WindowMaker/menu.nl
|
||||||
|
WindowMaker/menu.ro
|
||||||
|
WindowMaker/menu.sk
|
||||||
|
WindowMaker/menu.zh_TW
|
||||||
|
WindowMaker/plmenu
|
||||||
|
WindowMaker/plmenu.bg
|
||||||
|
WindowMaker/plmenu.es
|
||||||
|
WindowMaker/plmenu.fi
|
||||||
|
WindowMaker/plmenu.fy
|
||||||
|
WindowMaker/plmenu.ja
|
||||||
|
WindowMaker/plmenu.ko
|
||||||
|
WindowMaker/plmenu.nl
|
||||||
|
WindowMaker/plmenu.pl
|
||||||
|
WindowMaker/plmenu.ro
|
||||||
|
WindowMaker/plmenu.sk
|
||||||
|
WindowMaker/plmenu.zh_CN
|
||||||
|
WindowMaker/plmenu.zh_TW
|
||||||
|
WindowMaker/wmmacros
|
||||||
|
|
||||||
|
|
||||||
WindowMaker/Defaults/WMRootMenu
|
WindowMaker/Defaults/WMRootMenu
|
||||||
WindowMaker/Defaults/WMState
|
WindowMaker/Defaults/WMState
|
||||||
WindowMaker/Defaults/WMWindowAttributes
|
WindowMaker/Defaults/WMWindowAttributes
|
||||||
WindowMaker/Defaults/WindowMaker
|
WindowMaker/Defaults/WindowMaker
|
||||||
WindowMaker/IconSets/Default.iconset
|
WindowMaker/IconSets/Default.iconset
|
||||||
|
|
||||||
|
WPrefs.app/WPrefs.desktop
|
||||||
|
|
||||||
|
# These files are generated by the i18n process
|
||||||
|
/po/WindowMaker.pot
|
||||||
|
/po/*.mo
|
||||||
|
/WINGs/po/WINGs.pot
|
||||||
|
/WINGs/po/*.mo
|
||||||
|
/WPrefs.app/po/WPrefs.pot
|
||||||
|
/WPrefs.app/po/*.mo
|
||||||
|
/util/po/*.pot
|
||||||
|
/util/po/*.mo
|
||||||
|
/wrlib/po/*.pot
|
||||||
|
/wrlib/po/*.mo
|
||||||
|
|
||||||
# Some text editors generate backup files
|
# Some text editors generate backup files
|
||||||
*~
|
*~
|
||||||
|
|
||||||
|
.pc
|
||||||
|
|||||||
@@ -4,12 +4,7 @@
|
|||||||
|
|
||||||
|
|
||||||
If you find a bug please fill this form and send it to
|
If you find a bug please fill this form and send it to
|
||||||
wmaker-dev@lists.windowmaker.org Please, USE THIS FORM!!!
|
wmaker-dev@googlegroups.com Please, USE THIS FORM!!!
|
||||||
|
|
||||||
You can also report a bug in the WWW bug tracker at
|
|
||||||
http://bugs.windowmaker.org/projects/wmaker/issues or by sending this report to
|
|
||||||
bugs@windowmaker.org
|
|
||||||
|
|
||||||
|
|
||||||
0. Before reporting this bug I already:
|
0. Before reporting this bug I already:
|
||||||
[ ] read the NEWS, README and INSTALL files
|
[ ] read the NEWS, README and INSTALL files
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ Summary of Contents:
|
|||||||
1.2 Where can I get Window Maker?
|
1.2 Where can I get Window Maker?
|
||||||
1.3 Where are the mailing list archives?
|
1.3 Where are the mailing list archives?
|
||||||
1.4 Where is more documentation on configuring Window Maker?
|
1.4 Where is more documentation on configuring Window Maker?
|
||||||
1.5 What is an App Icon?
|
1.5 What is an appicon?
|
||||||
1.6 How can I get a question added to the FAQ?
|
1.6 How can I get a question added to the FAQ?
|
||||||
1.7 How do I report bugs?
|
1.7 How do I report bugs?
|
||||||
1.8 Is there an anonymous cvs server?
|
1.8 Is there an anonymous cvs server?
|
||||||
@@ -60,6 +60,7 @@ Summary of Contents:
|
|||||||
fonts.
|
fonts.
|
||||||
3.10 When I set the root background with wmsetbg by hand it works,
|
3.10 When I set the root background with wmsetbg by hand it works,
|
||||||
but when I do that from the configuration files it doesn't!
|
but when I do that from the configuration files it doesn't!
|
||||||
|
3.11 When I run GNOME application they have no title bar.
|
||||||
|
|
||||||
4 - Configuration
|
4 - Configuration
|
||||||
4.1 What are those files inside my ~/GNUstep directory?
|
4.1 What are those files inside my ~/GNUstep directory?
|
||||||
@@ -133,7 +134,7 @@ Introduction:
|
|||||||
|
|
||||||
1.1 What is Window Maker?
|
1.1 What is Window Maker?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Window Maker is an elegant X11 window manger that emulates the
|
Window Maker is an elegant X11 window manager that emulates the
|
||||||
OpenStep desktop with some noticeable enhancements. Look at
|
OpenStep desktop with some noticeable enhancements. Look at
|
||||||
http://wm.current.nu/themes/my-themes.html and
|
http://wm.current.nu/themes/my-themes.html and
|
||||||
http://wm.current.nu/themes/screenshots.html
|
http://wm.current.nu/themes/screenshots.html
|
||||||
@@ -332,7 +333,7 @@ Window Maker distribution.
|
|||||||
|
|
||||||
The author Anthony Quinn <southgat@frontiernet.net> has released a
|
The author Anthony Quinn <southgat@frontiernet.net> has released a
|
||||||
version that works with Window Maker >= 0.15.x. It is available from
|
version that works with Window Maker >= 0.15.x. It is available from
|
||||||
it's home page at http://www.frontiernet.net/~southgat/wmsound/
|
its home page at http://www.frontiernet.net/~southgat/wmsound/
|
||||||
or on Largo's site at http://wm.current.nu/files.html#wmsound
|
or on Largo's site at http://wm.current.nu/files.html#wmsound
|
||||||
for your convenience.
|
for your convenience.
|
||||||
|
|
||||||
@@ -345,10 +346,13 @@ The same is true for CDE.
|
|||||||
|
|
||||||
Now, answering the question: Yes, you can use WindowMaker in these
|
Now, answering the question: Yes, you can use WindowMaker in these
|
||||||
environments. To use Window Maker with GNOME, you don't need to do
|
environments. To use Window Maker with GNOME, you don't need to do
|
||||||
anything special. To use it with CDE, read the answer for "How do I switch
|
anything special, although you may want to look at the "When I run
|
||||||
|
GNOME application they have no title bar" below.
|
||||||
|
|
||||||
|
To use it with CDE, read the answer for "How do I switch
|
||||||
CDE's window manager to use Window Maker?"
|
CDE's window manager to use Window Maker?"
|
||||||
|
|
||||||
To use it with KDE, read it's documentation to get rid of kwm (and possibly
|
To use it with KDE, read its documentation to get rid of kwm (and possibly
|
||||||
kpanel) and replace it with wmaker. Then, start WPrefs.app, go to "Mouse
|
kpanel) and replace it with wmaker. Then, start WPrefs.app, go to "Mouse
|
||||||
Preferences" and set the "Disable mouse actions" check box. You will
|
Preferences" and set the "Disable mouse actions" check box. You will
|
||||||
need to restart Window Maker to make this change take effect. The
|
need to restart Window Maker to make this change take effect. The
|
||||||
@@ -503,7 +507,7 @@ exec wmaker
|
|||||||
Things to try if it doesn't work: (somewhat fuzzy and random)
|
Things to try if it doesn't work: (somewhat fuzzy and random)
|
||||||
|
|
||||||
This should do it although I did have problems sometimes initially which I
|
This should do it although I did have problems sometimes initially which I
|
||||||
fixed by randomly trying absolute pathes for wmaker in .xsession/.xinitrc and/or
|
fixed by randomly trying absolute paths for wmaker in .xsession/.xinitrc and/or
|
||||||
making the dtprofile/.xinitrc/etc executable. It helps logging in on the console
|
making the dtprofile/.xinitrc/etc executable. It helps logging in on the console
|
||||||
(select from CDE login screen) and start X manually using 'X'.
|
(select from CDE login screen) and start X manually using 'X'.
|
||||||
If it works that way it should work when logging into the CDE environment.
|
If it works that way it should work when logging into the CDE environment.
|
||||||
@@ -624,7 +628,7 @@ the last app started by .xinitrc is closed.
|
|||||||
the X server will be closed, and your session will end.
|
the X server will be closed, and your session will end.
|
||||||
|
|
||||||
|
|
||||||
3.3 How do I "dock" AppIcons on the Clip?
|
3.3 How do I "dock" appicons on the Clip?
|
||||||
-----------------------------------------
|
-----------------------------------------
|
||||||
Just drag icons near it like you would for the dock. Note that if you place
|
Just drag icons near it like you would for the dock. Note that if you place
|
||||||
the clip near the dock, you may have problems docking appicons in either.
|
the clip near the dock, you may have problems docking appicons in either.
|
||||||
@@ -670,7 +674,7 @@ David Reviejo <dreviejo@arrakis.es> best summed up this answer:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
3.7 How do I "undock" AppIcons?
|
3.7 How do I "undock" appicons?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
If the program is not running, just drag the icon to the middle of your
|
If the program is not running, just drag the icon to the middle of your
|
||||||
desktop (away from the dock and clip) and watch it disappear.
|
desktop (away from the dock and clip) and watch it disappear.
|
||||||
@@ -724,6 +728,25 @@ These directories will be listed under the "Search Path" section of WPrefs.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
3.11 When I run GNOME application they have no title bar.
|
||||||
|
----------------------------------
|
||||||
|
|
||||||
|
The GNOME toolkit decided to behave in its own way, so it draws its own title bar
|
||||||
|
with buttons, and asks Window Maker to not draw anything (title bar, resize bar,
|
||||||
|
close and miniaturise button, ...).
|
||||||
|
|
||||||
|
The workaround is, for each application, to ask for Window Maker's window menu
|
||||||
|
(that is likely <Ctrl>+<Escape> if you did not change it), get the Attributes,
|
||||||
|
and click on the greyed "Disable titlebar" until it is white (the same can be
|
||||||
|
done for other decoration attributes).
|
||||||
|
|
||||||
|
If you use a lot of GNOME applications, you may want to ask Window Maker to just
|
||||||
|
ignore the no-titlebar-and-all for all windows at once, which is done from
|
||||||
|
WPrefs by going to the "Expert" panel and checking the "Ignore decoration hints
|
||||||
|
for GTK applications" button.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-=-=-=-=-=-=-=-
|
-=-=-=-=-=-=-=-
|
||||||
Configuration:
|
Configuration:
|
||||||
-=-=-=-=-=-=-=-
|
-=-=-=-=-=-=-=-
|
||||||
@@ -815,7 +838,7 @@ AlwaysUserIcon=Yes;
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
4.6 How do I get a Tile background for my AppIcons (those things in
|
4.6 How do I get a Tile background for my appicons (those things in
|
||||||
the dock)?
|
the dock)?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
You need to change 1 line to your ~/GNUstep/Defaults/WindowMaker file.
|
You need to change 1 line to your ~/GNUstep/Defaults/WindowMaker file.
|
||||||
@@ -845,9 +868,9 @@ Application Icon'' Option then Save, Apply and close the dialog.
|
|||||||
|
|
||||||
This should allow you do dock the program normally.
|
This should allow you do dock the program normally.
|
||||||
|
|
||||||
Emulate Appicon does exactly the same thing as dockit, a small app
|
Emulate AppIcon does exactly the same thing as dockit, a small app
|
||||||
distributed with ancient versions of Window Maker before the Attribute
|
distributed with ancient versions of Window Maker before the Attribute
|
||||||
Editor existed (now deprecated for the obvious reason). If Emulate Appicon
|
Editor existed (now deprecated for the obvious reason). If Emulate AppIcon
|
||||||
does not work, dockit will not work either. Such applications violate the
|
does not work, dockit will not work either. Such applications violate the
|
||||||
ICCCM (Inter-Client Communication Conventions Manual) and are considered
|
ICCCM (Inter-Client Communication Conventions Manual) and are considered
|
||||||
badly coded for not setting the instance.class hints.
|
badly coded for not setting the instance.class hints.
|
||||||
@@ -875,7 +898,7 @@ NoAppIcon=Yes;
|
|||||||
|
|
||||||
4.9 How do I set a pixmap background?
|
4.9 How do I set a pixmap background?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Here is the in depth explanation straight from the NEWS file:
|
Here is the in-depth explanation straight from the NEWS file:
|
||||||
|
|
||||||
wmsetbg now accepts the following options:
|
wmsetbg now accepts the following options:
|
||||||
usage: wmsetbg [-options] image
|
usage: wmsetbg [-options] image
|
||||||
@@ -1260,7 +1283,7 @@ WM_NORMAL_HINTS(WM_SIZE_HINTS):
|
|||||||
user specified size: 400 by 300
|
user specified size: 400 by 300
|
||||||
program specified minimum size: 400 by 300
|
program specified minimum size: 400 by 300
|
||||||
|
|
||||||
Now, when scilab opens it's window, Window Maker nicely does exactly what it
|
Now, when scilab opens its window, Window Maker nicely does exactly what it
|
||||||
is told, that is, map the window at position 136679205, 1074468360 which
|
is told, that is, map the window at position 136679205, 1074468360 which
|
||||||
obviously falls outside the screen no matter how big is your monitor ;)
|
obviously falls outside the screen no matter how big is your monitor ;)
|
||||||
|
|
||||||
@@ -1453,7 +1476,7 @@ Themes:
|
|||||||
8.1 What exactly are themes?
|
8.1 What exactly are themes?
|
||||||
----------------------------------
|
----------------------------------
|
||||||
Themes are a great aspect of Window Maker allowing a user to simply
|
Themes are a great aspect of Window Maker allowing a user to simply
|
||||||
save the entire 'look' of their desktop in a Archive to distribute freely among
|
save the entire 'look' of their desktop in an archive to distribute freely among
|
||||||
friends, fellow users and/or the whole net in general. :)
|
friends, fellow users and/or the whole net in general. :)
|
||||||
|
|
||||||
See the theme-HOWTO at http://wm.current.nu/themes/theme-HOWTO.html
|
See the theme-HOWTO at http://wm.current.nu/themes/theme-HOWTO.html
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
|
|
||||||
If I18N support does not work for you, check these:
|
|
||||||
|
|
||||||
- the LANG environment variable is set to your locale, and
|
|
||||||
the locale is supported by your OS's locale or X's locale
|
|
||||||
emulation. you can display all supported locales by
|
|
||||||
executing "locale -a" command if it available. and you
|
|
||||||
can check if your locale is supported by X's locale emulation.
|
|
||||||
See "/usr/X11R6/lib/X11/locale/locale.alias"
|
|
||||||
|
|
||||||
- Check if you're using appropriate fonts for the locale you
|
|
||||||
chose. If you're using a font set that has a different
|
|
||||||
encoding than the one used by Xlib or libc, bad things can
|
|
||||||
happen. Try specifically putting the encoding in the LANG
|
|
||||||
variable, like ru_RU.KOI8-R. Again, see
|
|
||||||
"/usr/X11R6/lib/X11/locale/locale.alias"
|
|
||||||
|
|
||||||
- if your OS doesn't support any locale or if your OS doesn't
|
|
||||||
support a locale for your language, you can use X Window System's
|
|
||||||
locale emulation feature instead of OS's locale. To use this
|
|
||||||
feature, add this option to the configure, "--with-x-locale".
|
|
||||||
if your OS is commercial one, such as Solaris, IRIX, AIX, ...
|
|
||||||
you perhaps don't have to use X's locale emulation.
|
|
||||||
But if your OS is Linux or NetBSD or..., it is possible that
|
|
||||||
your locale is not supported so far. then use "--with-x-locale".
|
|
||||||
|
|
||||||
Note: to use X's locale emulation, your Xlib has to be
|
|
||||||
compiled so that the locale emulation is enabled.
|
|
||||||
Linux RedHat5.0's default Xlib is not compiled
|
|
||||||
like that. (RH4.x are ok). Recompiled Xlib for
|
|
||||||
RH5.0 where you can use locale emulation is available
|
|
||||||
here:
|
|
||||||
ftp://ftp.linux.or.jp/pub/RPM/glibc
|
|
||||||
|
|
||||||
- the fonts you're using support your locale. if your font
|
|
||||||
setting on $HOME/GNUstep/Defaults/WindowMaker is like..
|
|
||||||
|
|
||||||
WindowTitleFont = "Trebuchet MS:bold:pixelsize=12";
|
|
||||||
MenuTitleFont = "Trebuchet MS:bold:pixelsize=12";
|
|
||||||
......................................................
|
|
||||||
|
|
||||||
then you can't display Asian language (ja, ko, ch) characters using
|
|
||||||
Trebuchet MS. A font that is guaranteed to work for any language is
|
|
||||||
sans (or sans-serif). sans is not a font itself, but an alias which
|
|
||||||
points to multiple fonts and will load the first in that list that
|
|
||||||
has the ability to show glyphs in your language. If you don't know
|
|
||||||
a font that is suited for you language you can always set all your
|
|
||||||
fonts to something like:
|
|
||||||
|
|
||||||
"sans:pixelsize=12"
|
|
||||||
|
|
||||||
However, please note that if your font is something like:
|
|
||||||
|
|
||||||
"Trebuchet MS,sans serif:pixelsize=12"
|
|
||||||
|
|
||||||
this will not be able to display Asian languages if any of the
|
|
||||||
previous fonts before sans are installed. This is because unlike
|
|
||||||
the proper font pickup that sans guarantees for your language,
|
|
||||||
this construct only allows a font fallback mechanism, which tries
|
|
||||||
all the fonts in the list in order, until it finds one that is
|
|
||||||
available, even if it doesn't support your language.
|
|
||||||
|
|
||||||
Also you need to change font settings in style files in
|
|
||||||
the "$HOME/Library/WindowMaker/Style" directory.
|
|
||||||
|
|
||||||
- the LC_CTYPE environment variable is unset or it has the correct
|
|
||||||
value. If you don't know what is the correct value, unset it.
|
|
||||||
|
|
||||||
|
|
||||||
-437
@@ -1,437 +0,0 @@
|
|||||||
|
|
||||||
Installation Instructions for Window Maker
|
|
||||||
|
|
||||||
The latest version of Window Maker (-crm) can be found in the
|
|
||||||
git repository at
|
|
||||||
|
|
||||||
http://repo.or.cz/w/wmaker-crm.git
|
|
||||||
|
|
||||||
|
|
||||||
SUPPORTED PLATFORMS
|
|
||||||
===================
|
|
||||||
|
|
||||||
- Intel GNU/Linux Systems in general
|
|
||||||
|
|
||||||
Patches to make it work on other platforms are welcome.
|
|
||||||
|
|
||||||
|
|
||||||
REQUIREMENTS:
|
|
||||||
=============
|
|
||||||
|
|
||||||
The following software is required to use Window Maker:
|
|
||||||
|
|
||||||
- X11R6.x
|
|
||||||
Window Maker can be compiled in older versions of X, like X11R5
|
|
||||||
(Solaris) or X11R4 (OpenWindows) but it will not work 100% correctly.
|
|
||||||
In such servers there will not be application icons and you'll have
|
|
||||||
trouble using the dock. Upgrading the client libraries (Xlib, Xt etc)
|
|
||||||
will help if you can't upgrade the server.
|
|
||||||
|
|
||||||
The following is required to build Window Maker:
|
|
||||||
|
|
||||||
- Basic obvious stuff
|
|
||||||
gcc (or some other ANSI C compiler)
|
|
||||||
glibc development files (usually glibc-devel in Linux distributions)
|
|
||||||
X development files (XFree86-devel or something similar)
|
|
||||||
|
|
||||||
- autoconf, automake and libtool
|
|
||||||
autoconf 2.54
|
|
||||||
automake 1.4
|
|
||||||
libtool 1.4.2
|
|
||||||
|
|
||||||
- Xft2
|
|
||||||
and its dependencies (such as freetype2 and fontconfig)
|
|
||||||
You will also need the development files for it (xft2-devel)
|
|
||||||
|
|
||||||
|
|
||||||
OPTIONAL:
|
|
||||||
=========
|
|
||||||
|
|
||||||
These libraries are not required to make Window Maker work, but they
|
|
||||||
are supported in case you want to use them. Version numbers are those
|
|
||||||
that I have (and therefore, guaranteed to work), but other versions
|
|
||||||
might work too.
|
|
||||||
|
|
||||||
|
|
||||||
- libXPM 4.7 or newer
|
|
||||||
Older versions may not work!!!
|
|
||||||
Available at ftp://sunsite.unc.edu/pub/Linux/libs/X/
|
|
||||||
|
|
||||||
There is built-in support for XPM files, but it will not
|
|
||||||
load images in some uncommon encodings.
|
|
||||||
|
|
||||||
- libpng 0.96 or newer and zlib
|
|
||||||
For PNG image support.
|
|
||||||
http://www.cdrom.com/pub/png/
|
|
||||||
|
|
||||||
- libtiff 3.4 or newer
|
|
||||||
For TIFF image support.
|
|
||||||
You can get it at ftp://ftp.sgi.com/graphics/tiff
|
|
||||||
|
|
||||||
- libjpeg 6.0.1 or newer
|
|
||||||
For JPEG image support
|
|
||||||
http://www.ijg.org/
|
|
||||||
|
|
||||||
- libgif 2.2 or libungif
|
|
||||||
For GIF image support
|
|
||||||
ftp://prtr-13.ucsc.edu/pub/libungif/
|
|
||||||
|
|
||||||
- GNU xgettext
|
|
||||||
If you want to use translated messages, you will need GNU gettext.
|
|
||||||
Other versions of gettext are not compatible and will not work.
|
|
||||||
Get the GNU version from ftp://ftp.gnu.org
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CONFIGURE OPTIONS:
|
|
||||||
==================
|
|
||||||
|
|
||||||
If you downloaded the cvs or git versions, type
|
|
||||||
|
|
||||||
./autogen.sh
|
|
||||||
|
|
||||||
to generate the config files.
|
|
||||||
|
|
||||||
These options can be passed to the configure script to enable/disable
|
|
||||||
some Window Maker features. Example:
|
|
||||||
|
|
||||||
./configure --enable-modelock --disable-gif
|
|
||||||
|
|
||||||
will configure Window Maker with modelock supported and disable gif support.
|
|
||||||
Normally, you won't need any of them.
|
|
||||||
|
|
||||||
To get a list of other options, run ./configure --help
|
|
||||||
|
|
||||||
--with-libs-from
|
|
||||||
specify additional paths for libraries to be searched.
|
|
||||||
The -L flag must precede each path, like:
|
|
||||||
--with-libs-from="-L/opt/libs -L/usr/local/lib"
|
|
||||||
|
|
||||||
--with-incs-from
|
|
||||||
specify additional paths for header files to be searched.
|
|
||||||
The -I flag must precede each paths, like:
|
|
||||||
--with-incs-from="-I/opt/headers -I/usr/local/include"
|
|
||||||
|
|
||||||
--disable-shm
|
|
||||||
disable use of the MIT shared memory extension. This will slow down
|
|
||||||
texture generation a little bit, but in some cases it seems to be
|
|
||||||
necessary due to a bug that manifests as messed icons and textures.
|
|
||||||
|
|
||||||
--disable-motif
|
|
||||||
disable support for mwm window manager hints
|
|
||||||
|
|
||||||
--enable-modelock
|
|
||||||
XKB language status lock support. If you don't know what it is you
|
|
||||||
probably don't need it.
|
|
||||||
|
|
||||||
--disable-xpm
|
|
||||||
disables use of the XPM library even if it is available on your
|
|
||||||
system.
|
|
||||||
|
|
||||||
--disable-png
|
|
||||||
disables use of PNG library
|
|
||||||
|
|
||||||
--disable-tiff
|
|
||||||
disable use of TIFF library
|
|
||||||
|
|
||||||
--disable-gif
|
|
||||||
disable use of GIF library
|
|
||||||
|
|
||||||
--disable-jpeg
|
|
||||||
disable use of JPEG library
|
|
||||||
|
|
||||||
--disable-shape
|
|
||||||
disables shaped windows (for oclock, xeyes etc.)
|
|
||||||
|
|
||||||
|
|
||||||
PLATFORM SPECIFIC NOTES:
|
|
||||||
========================
|
|
||||||
|
|
||||||
- GNU/Linux in general
|
|
||||||
Make sure you have /usr/local/lib in /etc/ld.so.conf and that you
|
|
||||||
run ldconfig after installing.
|
|
||||||
Uninstall any packaged version of Window Maker before installing a new
|
|
||||||
version.
|
|
||||||
|
|
||||||
- RedHat GNU/Linux
|
|
||||||
RedHat systems have several annoying problems. If you use it,
|
|
||||||
be sure to follow the steps below or Window Maker will not work:
|
|
||||||
|
|
||||||
* if you installed the Window Maker that comes with RedHat, uninstall
|
|
||||||
it before upgrading;
|
|
||||||
|
|
||||||
* make sure you don't have the LANG and LINGUAS environment variables
|
|
||||||
set to en_RN;
|
|
||||||
|
|
||||||
* make sure you have /usr/local/bin in your PATH environment
|
|
||||||
variable;
|
|
||||||
|
|
||||||
* make sure you have /usr/local/lib in /etc/ld.so.conf before running
|
|
||||||
ldconfig;
|
|
||||||
|
|
||||||
- PowerPC MkLinux
|
|
||||||
You will need to have the latest version of Xpmac. Older versions
|
|
||||||
seem to have bugs that cause the system to hang.
|
|
||||||
|
|
||||||
- Debian GNU/Linux
|
|
||||||
If you want JPEG and TIFF support, make sure you have libtiff-dev
|
|
||||||
and libjpeg-dev installed.
|
|
||||||
|
|
||||||
- SuSE GNU/Linux
|
|
||||||
If you installed the Window Maker package from SuSE,
|
|
||||||
uninstall it before trying to compile wmaker or you
|
|
||||||
might have problems.
|
|
||||||
|
|
||||||
- MetroX (unknown version)
|
|
||||||
MetroX has a bug that corrupts pixmaps that are set as window
|
|
||||||
backgrounds. If you use MetroX and has weird problems with
|
|
||||||
textures, do not use textures in title bars. Or use a different
|
|
||||||
X server.
|
|
||||||
|
|
||||||
INSTALLATION:
|
|
||||||
=============
|
|
||||||
|
|
||||||
Build Window Maker
|
|
||||||
------------------
|
|
||||||
For a quick start, type the following in your shell prompt:
|
|
||||||
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
|
|
||||||
then, login as root and type:
|
|
||||||
|
|
||||||
make install
|
|
||||||
ldconfig
|
|
||||||
|
|
||||||
or if you want to strip the debugging symbols from the binaries and make them
|
|
||||||
smaller, you can instead type:
|
|
||||||
|
|
||||||
make install-strip
|
|
||||||
ldconfig
|
|
||||||
|
|
||||||
This will build and install Window Maker with default parameters.
|
|
||||||
|
|
||||||
If you want to customize some compile-time options, you can do the
|
|
||||||
following.
|
|
||||||
|
|
||||||
1. (optional) Look at the CONFIGURE OPTIONS section above for the
|
|
||||||
options available. Also run:
|
|
||||||
|
|
||||||
./configure --help
|
|
||||||
|
|
||||||
to get a complete listing of other options that are available.
|
|
||||||
|
|
||||||
2. Run configure with the options you want. For example, if you
|
|
||||||
want to use the --enable-modelock option, type:
|
|
||||||
|
|
||||||
./configure --enable-modelock
|
|
||||||
|
|
||||||
3. (optional) Edit src/wconfig.h with your favorite text editor
|
|
||||||
and browse through it for some options you might want to change.
|
|
||||||
|
|
||||||
4. Compile. Just type:
|
|
||||||
|
|
||||||
make
|
|
||||||
|
|
||||||
5. Login as root (if you can't do that, read the "I don't have the
|
|
||||||
root password :-(" section) and install Window Maker in your system:
|
|
||||||
su root
|
|
||||||
make install
|
|
||||||
|
|
||||||
|
|
||||||
User specific configuration
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
These instructions do not need to be followed when upgrading Window Maker
|
|
||||||
from an older version, unless stated differently in the NEWS file.
|
|
||||||
|
|
||||||
Every user on your system that wishes to run Window Maker must do the
|
|
||||||
following:
|
|
||||||
|
|
||||||
1. Install Window Maker configuration files in your home directory.
|
|
||||||
Type:
|
|
||||||
wmaker.inst
|
|
||||||
|
|
||||||
wmaker.inst will install Window Maker configuration files and will
|
|
||||||
setup X to automatically launch Window Maker at startup.
|
|
||||||
|
|
||||||
That's it!
|
|
||||||
|
|
||||||
You can type "man wmaker" to get some general help for configuration
|
|
||||||
and other stuff.
|
|
||||||
|
|
||||||
Read the User Guide for a more in-depth explanation of Window Maker.
|
|
||||||
|
|
||||||
You might want to take a look at the FAQ too.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Installing the extras package
|
|
||||||
-----------------------------
|
|
||||||
|
|
||||||
Unpack WindowMaker-extra-<version-number>.tar.gz in /usr/local/share
|
|
||||||
|
|
||||||
You can get the file at http://windowmaker.org/pub/source/release/. This file
|
|
||||||
is optional and only have a few icons, and themes. Look for the latest
|
|
||||||
<version-number> available. Also there is a WindowMaker-extra.readme to
|
|
||||||
instruct you where that package should go.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
I don't have the root password :(
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
If you can't get superuser privileges (can't be root) you can install
|
|
||||||
wmaker in your own home directory. For that, supply the --prefix option
|
|
||||||
when running configure in step 2 of building Window Maker. You will
|
|
||||||
also need to supply the --with-gnustepdir option, to specify the path for
|
|
||||||
WPrefs.app Example:
|
|
||||||
|
|
||||||
./configure --prefix=/home/jshmoe --with-gnustepdir=/home/jshmoe/GNUstep/Applications
|
|
||||||
|
|
||||||
|
|
||||||
Then make /home/jshmoe/bin be included in your search PATH, add
|
|
||||||
/home/jshmoe/lib to your LD_LIBRARY_PATH environment variable and run
|
|
||||||
bin/wmaker.inst
|
|
||||||
|
|
||||||
Of course, /home/jshmoe is supposed to be replaced with your actual home
|
|
||||||
directory path.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UPGRADING
|
|
||||||
=========
|
|
||||||
|
|
||||||
If you are upgrading from an older version of Window Maker:
|
|
||||||
|
|
||||||
1. Configure and build Window Maker as always
|
|
||||||
2. Install Window Maker (but do not run wmaker.inst)
|
|
||||||
3. Read the NEWS file and update your configuration files if necessary.
|
|
||||||
|
|
||||||
|
|
||||||
TROUBLESHOOTING
|
|
||||||
===============
|
|
||||||
|
|
||||||
When you have some trouble during configuration (while running configure),
|
|
||||||
like not being able to use a graphic format library you think you have
|
|
||||||
installed, look at the config.log file for clues of the problem.
|
|
||||||
|
|
||||||
|
|
||||||
== Error with loading fonts, even if they exist.
|
|
||||||
|
|
||||||
Try rebuilding without NLS support.
|
|
||||||
|
|
||||||
== Error when configuring
|
|
||||||
|
|
||||||
ltconfig: unrecognized option `--no-reexec'
|
|
||||||
Try `ltconfig --help' for more information.
|
|
||||||
configure: error: libtool configure failed
|
|
||||||
|
|
||||||
remove the --no-reexec option from aclocal.m4 and reconfigure
|
|
||||||
Also make sure the autoconf and automake versions you have installed are:
|
|
||||||
autoconf 2.13
|
|
||||||
automake 1.4
|
|
||||||
libtool 1.3
|
|
||||||
|
|
||||||
Note that it must not be libtool 1.2b, it must be libtool 1.3,
|
|
||||||
from the GNU sites.
|
|
||||||
|
|
||||||
== configure doesn't detect libtiff, or other graphic libraries.
|
|
||||||
|
|
||||||
Delete config.cache, then rerun configure adding the following options to
|
|
||||||
configure (among the other options you use):
|
|
||||||
--with-libs-from="-L/usr/local/lib"
|
|
||||||
--with-incs-from="-I/usr/local/include -I/usr/local/include/tiff"
|
|
||||||
Put the paths where your graphic libs and their corresponding header files are
|
|
||||||
located. You can put multiple paths in any of these options, as the example
|
|
||||||
of --with-incs-from shows. Just put a space between them.
|
|
||||||
|
|
||||||
|
|
||||||
== configure doesn't detect libXpm.
|
|
||||||
|
|
||||||
* Check if you have a symbolic link from libXpm.so.4.9 to libXpm.so
|
|
||||||
|
|
||||||
|
|
||||||
== Segmentation fault on startup
|
|
||||||
|
|
||||||
* Check if the version of libXPM you have is at least 4.7
|
|
||||||
|
|
||||||
* Check if you have an updated version of ~/GNUstep/Defaults/WindowMaker
|
|
||||||
|
|
||||||
If you're not sure, try renaming ~/GNUstep to ~/GNUtmp and then run wmaker.inst
|
|
||||||
|
|
||||||
== "...: your machine is misconfigured. gethostname() returned (none)"
|
|
||||||
|
|
||||||
* the hostname of your machine is set to something invalid, that starts
|
|
||||||
with a parenthesis. Do a man hostname for info about how to set it.
|
|
||||||
|
|
||||||
|
|
||||||
== The root menu contains only 2 entries. ("XTerm" and "Exit...")
|
|
||||||
|
|
||||||
* Window Maker could not read your menu definition file
|
|
||||||
you should check wmaker's output for an error, it may be
|
|
||||||
visible in the console or in the .xsession-errors file.
|
|
||||||
|
|
||||||
|
|
||||||
== checking lex output file root... configure: error: cannot find output from true; giving up
|
|
||||||
|
|
||||||
* Read the REQUIREMENTS section of this file.
|
|
||||||
|
|
||||||
|
|
||||||
LOCALES/INTERNATIONALIZATION
|
|
||||||
============================
|
|
||||||
|
|
||||||
Window Maker has national language support. To enable national language
|
|
||||||
support, you must compile Window Maker with some additional parameters.
|
|
||||||
|
|
||||||
|
|
||||||
0 - You must have the GNU gettext package installed. It can be
|
|
||||||
obtained at ftp://prep.ai.mit.edu/pub/gnu/gettext-nnn.tar.gz
|
|
||||||
|
|
||||||
Steps 1 to 3 can be skipped if you use the Install script.
|
|
||||||
|
|
||||||
1 - You have to select the languages you want to support. Set the
|
|
||||||
LINGUAS to the list of locales you want. English is always
|
|
||||||
supported. Example:
|
|
||||||
|
|
||||||
setenv LINGUAS "pt ja de"
|
|
||||||
in csh
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
export LINGUAS;LINGUAS="pt ja de"
|
|
||||||
in sh
|
|
||||||
|
|
||||||
The list of supported locales can be found in po/README.
|
|
||||||
English is the default language.
|
|
||||||
|
|
||||||
Read po/README if you wish to translate and maintain locale files
|
|
||||||
for other languages.
|
|
||||||
|
|
||||||
2 - Additionally, if your language uses multi-byte characters, such
|
|
||||||
as Japanese or Korean, you must set the MultiByteText option to YES
|
|
||||||
in ~/GNUstep/Defaults/WMGLOBAL
|
|
||||||
|
|
||||||
3 - Configure, build and install Window Maker normally.
|
|
||||||
|
|
||||||
4 - To select a particular locale at run-time you must set the LANG
|
|
||||||
environment variable to the locale you want. For example, if you want to set
|
|
||||||
the Portuguese locale, you must run
|
|
||||||
|
|
||||||
setenv LANG pt
|
|
||||||
|
|
||||||
in csh or
|
|
||||||
|
|
||||||
export LANG; LANG=pt
|
|
||||||
|
|
||||||
in Bourne sh and similar
|
|
||||||
|
|
||||||
Note: If you have the LC_CTYPE environment variable set, you must
|
|
||||||
unset it before running wmaker.
|
|
||||||
|
|
||||||
For menu definition files, Window Maker searches for them in the
|
|
||||||
following order (for Brazilian Portuguese, in this case):
|
|
||||||
|
|
||||||
menu.pt_BR
|
|
||||||
menu.pt
|
|
||||||
menu
|
|
||||||
+111
-15
@@ -12,31 +12,54 @@ config-paths.h: Makefile
|
|||||||
@echo "Generating $@"
|
@echo "Generating $@"
|
||||||
@echo '/* this is a generated file - do not edit */' > $@
|
@echo '/* this is a generated file - do not edit */' > $@
|
||||||
@echo '' >> $@
|
@echo '' >> $@
|
||||||
@echo '/* gettext domain used for menu translations */' >> $@
|
@echo '/* define where the translations are stored */' >> $@
|
||||||
@if test -z "$(menutextdomain)"; then \
|
@echo '#define LOCALEDIR "$(localedir)"' >> $@
|
||||||
echo '/* #undef MENU_TEXTDOMAIN "$(menutextdomain)" */' >> $@; \
|
|
||||||
else \
|
|
||||||
echo '#define MENU_TEXTDOMAIN "$(menutextdomain)"' >> $@; \
|
|
||||||
fi
|
|
||||||
@echo '' >> $@
|
@echo '' >> $@
|
||||||
@echo '/* define an extra path for pixmaps */' >> $@
|
@echo '/* define an extra path for pixmaps */' >> $@
|
||||||
@echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
|
@echo '#define PIXMAPDIR "$(pixmapdir)"' >> $@
|
||||||
@echo '' >> $@
|
@echo '' >> $@
|
||||||
@echo '/* where shared data is stored */' >> $@
|
@echo '/* where shared data is stored */' >> $@
|
||||||
@echo '#define PKGDATADIR "$(datadir)/WindowMaker"' >> $@
|
@echo '#define PKGDATADIR "$(datadir)/$(PACKAGE_TARNAME)"' >> $@
|
||||||
@echo '' >> $@
|
@echo '' >> $@
|
||||||
@echo '/* where the configuration is stored */' >> $@
|
@echo '/* where the global defaults are stored */' >> $@
|
||||||
@echo '#define SYSCONFDIR "$(sysconfdir)"' >> $@
|
@echo '#define PKGCONFDIR "$(pkgconfdir)"' >> $@
|
||||||
|
@echo '' >> $@
|
||||||
|
@echo '/* where the user data root is located */' >> $@
|
||||||
|
@echo '#define GSUSER_SUBDIR "GNUstep"' >> $@
|
||||||
|
@echo '' >> $@
|
||||||
|
@echo '/* where the user defaults are stored */' >> $@
|
||||||
|
@echo '#define DEFAULTS_SUBDIR "Defaults"' >> $@
|
||||||
|
@echo '' >> $@
|
||||||
|
@echo '/* where the user data are stored */' >> $@
|
||||||
|
@echo '#define USERDATA_SUBDIR "Library"' >> $@
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib WPrefs.app doc test
|
# Improve coverage in 'make distcheck' by checking that translations work
|
||||||
|
AM_DISTCHECK_CONFIGURE_FLAGS = --enable-silent-rules LINGUAS='*'
|
||||||
|
|
||||||
EXTRA_DIST = TODO BUGS BUGFORM FAQ FAQ.I18N INSTALL \
|
|
||||||
INSTALL-WMAKER README.definable-cursor \
|
SUBDIRS = wrlib WINGs src util po WindowMaker wmlib WPrefs.app doc
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS) test
|
||||||
|
|
||||||
|
EXTRA_DIST = TODO BUGS BUGFORM FAQ INSTALL \
|
||||||
|
INSTALL-WMAKER README.i18n README.definable-cursor \
|
||||||
The-perfect-Window-Maker-patch.txt \
|
The-perfect-Window-Maker-patch.txt \
|
||||||
README COPYING.WTFPL autogen.sh \
|
README COPYING.WTFPL autogen.sh \
|
||||||
email-clients.txt checkpatch.pl
|
email-clients.txt checkpatch.pl update-changelog.pl \
|
||||||
|
script/check-cmdline-options-doc.sh \
|
||||||
|
script/check-translation-sources.sh \
|
||||||
|
script/check-wmaker-loaddef-callbacks.sh \
|
||||||
|
script/generate-html-from-man.sh \
|
||||||
|
script/generate-mapfile-from-header.sh \
|
||||||
|
script/generate-po-from-template.sh \
|
||||||
|
script/generate-txt-from-texi.sh \
|
||||||
|
script/nested-func-to-macro.sh \
|
||||||
|
script/replace-ac-keywords.sh \
|
||||||
|
script/replace-generated-content.sh
|
||||||
|
|
||||||
|
|
||||||
|
.PHONY: coverage-reset coverage
|
||||||
|
|
||||||
if USE_LCOV
|
if USE_LCOV
|
||||||
coverage-reset:
|
coverage-reset:
|
||||||
@@ -48,6 +71,79 @@ coverage:
|
|||||||
-mkdir -p coverage @lcov_output_directory@
|
-mkdir -p coverage @lcov_output_directory@
|
||||||
lcov --compat-libtool --capture --directory . --output-file coverage/coverage.info
|
lcov --compat-libtool --capture --directory . --output-file coverage/coverage.info
|
||||||
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
|
genhtml --output-directory @lcov_output_directory@ coverage/coverage.info
|
||||||
|
|
||||||
.PHONY: coverage-reset coverage
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Section for the I18N processing
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# make update-lang PO=<lang>
|
||||||
|
# ==========================
|
||||||
|
# Update the PO files against the POT file in all the translation sub-directories
|
||||||
|
#
|
||||||
|
# We do not use an automatic recursive target from Automake (AM_EXTRA_RECURSIVE_TARGETS)
|
||||||
|
# because we want to check only once that the variable PO was defined; the added bonus
|
||||||
|
# being that we do not process all directories but only the related ones, which is
|
||||||
|
# faster and a lot less verbose
|
||||||
|
|
||||||
|
update-lang:
|
||||||
|
if HAVE_XGETTEXT
|
||||||
|
@if echo "$(PO)" | grep -v '^[a-z][a-z]\(_[A-Z][A-Z]\)\?$$' > /dev/null ; then \
|
||||||
|
echo "Error: invalid value \"$(PO)\" for update-lang, use PO=<lang>" >&2 ; exit 1 ; \
|
||||||
|
fi ; \
|
||||||
|
for subdir in $(SUBDIRS_PO); do \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) update-lang || exit $$?); \
|
||||||
|
done
|
||||||
|
|
||||||
|
SUBDIRS_PO = wrlib/po WINGs/po po util/po WPrefs.app/po
|
||||||
|
else
|
||||||
|
@echo "Error: the program 'xgettext' was not found by configure, it is mandatory for this operation" >&2 ; exit 1
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: update-lang
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Section related to generating HTML content for the website
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
if WITH_WEB_REPO
|
||||||
|
|
||||||
|
SUBDIRS_WEB = doc
|
||||||
|
|
||||||
|
website:
|
||||||
|
@for subdir in $(SUBDIRS_WEB); do \
|
||||||
|
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) website || exit $$?); \
|
||||||
|
done
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: website
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Section for the automated checks
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
# Create a 'silent-rule' for our make check the same way automake does
|
||||||
|
AM_V_CHKOPTS = $(am__v_CHKOPTS_$(V))
|
||||||
|
am__v_CHKOPTS_ = $(am__v_CHKOPTS_$(AM_DEFAULT_VERBOSITY))
|
||||||
|
am__v_CHKOPTS_0 = @echo " CHK $@" ;
|
||||||
|
am__v_CHKOPTS_1 =
|
||||||
|
|
||||||
|
check-local: configure-documentation
|
||||||
|
|
||||||
|
configure-documentation:
|
||||||
|
$(AM_V_CHKOPTS)$(top_srcdir)/script/check-cmdline-options-doc.sh \
|
||||||
|
--program "$(top_srcdir)/configure" --text-doc "$(top_srcdir)/INSTALL-WMAKER" \
|
||||||
|
--ignore-prg 'with-PACKAGE,without-PACKAGE # only template names from Autoconf' \
|
||||||
|
--ignore-prg 'program-prefix,program-suffix,program-transform-name # in INSTALL' \
|
||||||
|
--ignore-prg 'version,quiet,srcdir,build,host,cache-file,no-create # in INSTALL' \
|
||||||
|
--ignore-prg 'enable-silent-rules,disable-silent-rules # should be in INSTALL' \
|
||||||
|
--ignore-prg 'enable-dependency-tracking,disable-dependency-tracking # in INSTALL' \
|
||||||
|
--ignore-prg 'enable-shared,enable-static # should be in INSTALL' \
|
||||||
|
--ignore-prg 'disable-option-checking,enable-fast-install # should be in INSTALL' \
|
||||||
|
--ignore-prg 'disable-libtool-lock,with-pic,with-gnu-ld,with-sysroot # for libtool' \
|
||||||
|
--ignore-prg 'runstatedir #new in autoconf 2.70, backported in Debian' \
|
||||||
|
--ignore-prg 'with-aix-soname #new in libtool 2.4.4' \
|
||||||
|
--ignore-prg 'with-x # no use, it would not work without X'
|
||||||
|
|
||||||
|
.PHONY: configure-documentation
|
||||||
|
|||||||
@@ -1,7 +1,398 @@
|
|||||||
|
|
||||||
NEWS for veteran Window Maker users
|
NEWS for veteran Window Maker users
|
||||||
-----------------------------------
|
-----------------------------------
|
||||||
|
|
||||||
|
-- 0.96.0
|
||||||
|
|
||||||
|
Hot Corners feature
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
Screen corners can be assigned an external command to be
|
||||||
|
executed when the mouse pointer is entering those areas.
|
||||||
|
In WPrefs, "Hot Corner Shortcut Preferences" can be used
|
||||||
|
for configuration or by manually adding a "HotCorners" key
|
||||||
|
and value to "YES" in the ~/GNUstep/Defaults/WindowMaker file.
|
||||||
|
Hot Corners feature is disabled by default.
|
||||||
|
Actions are specified by the "HotCornerActions" and are defined
|
||||||
|
as a four entries list ("top left action", "top right action",
|
||||||
|
"bottom left action", "bottom right action").
|
||||||
|
A screen corner area is a cube shape defined by the "HotCornerEdge"
|
||||||
|
which is a number of pixels from 2 (by default) to 10.
|
||||||
|
To lower the risk of triggering that feature accidentally a
|
||||||
|
"HotCornerDelay" key can be used which is the time before the action
|
||||||
|
is triggered while the pointer is in one of the screen corner.
|
||||||
|
Default value is 250 ms.
|
||||||
|
|
||||||
|
|
||||||
|
Screenshot capture feature
|
||||||
|
--------------------------
|
||||||
|
|
||||||
|
In WPrefs "Keyboard Shortcut Preferences" tab, three new actions can
|
||||||
|
be configured: "Capture a portion of the screen", "Capture a window",
|
||||||
|
"Capture the entire screen". The file is saved in
|
||||||
|
~/GNUstep/Library/WindowMaker/Screenshots directory under a filename
|
||||||
|
format "screenshot_%Y-%m-%d_at_%H:%M:%S" followed by the extension.
|
||||||
|
Which can be png or jpg based on WRaster dependencies.
|
||||||
|
|
||||||
|
|
||||||
|
libXRes is now an optional dependency
|
||||||
|
-------------------------------------
|
||||||
|
|
||||||
|
XRes the resource extension for the X protocol is used to find the
|
||||||
|
underlying processes (and PIDs) responsible for displaying the windows.
|
||||||
|
|
||||||
|
|
||||||
|
Support for _NET_WM_FULLSCREEN_MONITORS hint
|
||||||
|
--------------------------------------------
|
||||||
|
|
||||||
|
That hint allows applications that support it to be set as fullscreen on multiple heads.
|
||||||
|
It depends on Xinerama extension support.
|
||||||
|
|
||||||
|
|
||||||
|
Keep dock on primary head
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
To keep the dock on the primary head in a multi-head setup, set the option
|
||||||
|
"KeepDockOnPrimaryHead" in ~/GNUstep/Defaults/WindowMaker to "YES" or click
|
||||||
|
"Keep dock on primary head" under the WPrefs "Expert User Preferences" tab.
|
||||||
|
|
||||||
|
|
||||||
|
-- 0.95.9
|
||||||
|
|
||||||
|
Configurable SwitchPanel
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
SwitchPanel is now more configurable: you can configure the switch panel icon
|
||||||
|
size by setting the "SwitchPanelIconSize" option to your preferred value in
|
||||||
|
~/GNUstep/Defaults/WindowMaker. The font size used in this panel now is also
|
||||||
|
sensible to changes in the system font.
|
||||||
|
|
||||||
|
|
||||||
|
New user configuration directory environment variable
|
||||||
|
-----------------------------------------------------
|
||||||
|
|
||||||
|
In previous versions, the GNUstep directory used to store a user's Window Maker
|
||||||
|
configuration files was specified by the GNUSTEP_USER_ROOT environment variable,
|
||||||
|
which defaulted to ~/GNUstep. However, this environment variable was deprecated
|
||||||
|
in gnustep-make v2. Therefore, it has been replaced by the WMAKER_USER_ROOT
|
||||||
|
environment variable.
|
||||||
|
|
||||||
|
|
||||||
|
libXmu is now an optional dependency
|
||||||
|
------------------------------------
|
||||||
|
|
||||||
|
If the library is not found, compilation work, the only limitation will arise
|
||||||
|
when trying to install the standard colormap on displays which are not TrueColor.
|
||||||
|
Please note that if you have the library but not the headers, configure will
|
||||||
|
still stop; there is no user option to explicitly disable the library use.
|
||||||
|
|
||||||
|
|
||||||
|
-- 0.95.8
|
||||||
|
|
||||||
|
Move pointer with maximized windows
|
||||||
|
-----------------------------------
|
||||||
|
|
||||||
|
Implementation for moving mouse pointer within the maximized window.
|
||||||
|
|
||||||
|
Mouse pointer can be now moved together with window if keyboard was used for
|
||||||
|
arrange maximized windows on screen. This feature can be turned on in WPrefs.app
|
||||||
|
in Expert tab by selecting "Move mouse pointer with half maximized windows.", or
|
||||||
|
setting "PointerWithHalfMaxWindows" to "Yes" on ~/GNUstep/Defaults/WindowMaker
|
||||||
|
file.
|
||||||
|
|
||||||
|
|
||||||
|
Alternative way for traverse half-maximized windows
|
||||||
|
---------------------------------------------------
|
||||||
|
|
||||||
|
For now, there could be three possible state of the window while using
|
||||||
|
half-maximized feature. Unmaximized window have its state saved during that
|
||||||
|
process, which was use to unmaximize it. For example, if there is a window,
|
||||||
|
which is maximized on the half left side of the screen, and while requesting
|
||||||
|
left-half-maximized, it become unmaximized with size and dimension restored to
|
||||||
|
original state.
|
||||||
|
|
||||||
|
By setting "AlternativeHalfMaximized" option to "Yes"
|
||||||
|
~/GNUstep/Defaults/WindowMaker config file (or by using WPrefs.app and option
|
||||||
|
"Alternative transitions between states for half maximized windows."), there
|
||||||
|
would be slightly different change in window "traverse". Given layout depicted
|
||||||
|
below:
|
||||||
|
|
||||||
|
┌┬────────────────────┬┐
|
||||||
|
├┘ ┌───────┐ ├┤
|
||||||
|
│ ├───────┤ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ └───────┘ └┤
|
||||||
|
├┬┐ │
|
||||||
|
└┴┴────────────────────┘
|
||||||
|
|
||||||
|
Window can be moved using keyboard shortcut right-half-maximize:
|
||||||
|
|
||||||
|
┌┬─────────┬──────────┬┐
|
||||||
|
├┘ ├──────────┼┤
|
||||||
|
│ │ ├┤
|
||||||
|
│ │ ├┤
|
||||||
|
│ │ ├┤
|
||||||
|
│ │ ├┤
|
||||||
|
├┬┐ └──────────┘│
|
||||||
|
└┴┴────────────────────┘
|
||||||
|
|
||||||
|
Further invoking right-half-maximize will do nothing. Note, that window always
|
||||||
|
can be unmaximzied using appropriate keyboard shortcut or by selecting
|
||||||
|
"Unmaximize" from window menu.
|
||||||
|
|
||||||
|
Going to opposite direction by invoking left-half-maximize, will make the window
|
||||||
|
maximized in both, vertical and horizontal directions:
|
||||||
|
|
||||||
|
┌─────────────────────┬┐
|
||||||
|
├─────────────────────┼┤
|
||||||
|
│ ├┤
|
||||||
|
│ ├┤
|
||||||
|
│ ├┤
|
||||||
|
│ ├┤
|
||||||
|
├┬┬───────────────────┘│
|
||||||
|
└┴┴────────────────────┘
|
||||||
|
|
||||||
|
Further invoking left-half-maximize, will make the window maximized in half left
|
||||||
|
side od the screen:
|
||||||
|
|
||||||
|
┌──────────┬──────────┬┐
|
||||||
|
├──────────┤ ├┤
|
||||||
|
│ │ ├┤
|
||||||
|
│ │ ├┤
|
||||||
|
│ │ ├┤
|
||||||
|
│ │ └┤
|
||||||
|
├┬┬────────┘ │
|
||||||
|
└┴┴────────────────────┘
|
||||||
|
|
||||||
|
And again, further invoking left-half-maximize, will do nothing in this mode.
|
||||||
|
|
||||||
|
This change affects all possible half-maximized window state also quarters.
|
||||||
|
Issuing bottom-left-corner will take lower left quarter of the screen (nothing
|
||||||
|
is new so far):
|
||||||
|
|
||||||
|
┌┬────────────────────┬┐
|
||||||
|
├┘ ├┤
|
||||||
|
│ ├┤
|
||||||
|
├──────────┐ ├┤
|
||||||
|
├──────────┤ ├┤
|
||||||
|
│ │ └┤
|
||||||
|
├┬┬────────┘ │
|
||||||
|
└┴┴────────────────────┘
|
||||||
|
|
||||||
|
Issuing bottom-right-corner again will change window state to bottom half
|
||||||
|
maximized:
|
||||||
|
|
||||||
|
┌┬────────────────────┬┐
|
||||||
|
├┘ ├┤
|
||||||
|
│ ├┤
|
||||||
|
├─────────────────────┼┤
|
||||||
|
├─────────────────────┼┤
|
||||||
|
│ ├┤
|
||||||
|
├┬┬───────────────────┘│
|
||||||
|
└┴┴────────────────────┘
|
||||||
|
|
||||||
|
Invoking bottom-right-corner again:
|
||||||
|
|
||||||
|
┌┬────────────────────┬┐
|
||||||
|
├┘ ├┤
|
||||||
|
│ ├┤
|
||||||
|
│ ┌──────────┼┤
|
||||||
|
│ ├──────────┼┤
|
||||||
|
│ │ ├┤
|
||||||
|
├┬┐ └──────────┘│
|
||||||
|
└┴┴────────────────────┘
|
||||||
|
|
||||||
|
Issuing bottom-right-corner again will have no effect.
|
||||||
|
|
||||||
|
|
||||||
|
Move half-maximized windows between the screens
|
||||||
|
-----------------------------------------------
|
||||||
|
|
||||||
|
New option was introduced to allow change of behaviour of half-maximize windows
|
||||||
|
in multiple displays environment. In such environment it is more natural that
|
||||||
|
half maximized windows would travel from one screen to another. Now it is
|
||||||
|
possible to make that happen by setting an option
|
||||||
|
"MoveHalfMaximizedWindowsBetweenScreens" to "Yes" in
|
||||||
|
~/GNUstep/Defaults/WindowMaker config file, or by checking "Allow move
|
||||||
|
half-maximized windows between multiple screens." in 'Expert User Preferences"
|
||||||
|
tab in WPrefs.app.
|
||||||
|
|
||||||
|
For example, given there are two screens in layout where one display is on the
|
||||||
|
left and second display is on the right with window on first screen:
|
||||||
|
|
||||||
|
┌┬────────────────┬─────────────────┬┐
|
||||||
|
├┘ ┌───────┐ │ ├┤
|
||||||
|
│ ├───────┤ │ ├┤
|
||||||
|
│ │ │ │ ├┤
|
||||||
|
│ │ │ │ ├┤
|
||||||
|
│ └───────┘ │ └┤
|
||||||
|
├┬┐ ├┬┬┐ │
|
||||||
|
└┴┴───────────────┴┴┴┴───────────────┘
|
||||||
|
|
||||||
|
It can be right-half-maximized (using previously defined key combination), so it
|
||||||
|
become:
|
||||||
|
|
||||||
|
┌┬───────┬────────┬─────────────────┬┐
|
||||||
|
├┘ ├────────┤ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ └┤
|
||||||
|
├┬┐ └────────┼┬┬┐ │
|
||||||
|
└┴┴───────────────┴┴┴┴───────────────┘
|
||||||
|
|
||||||
|
In this example there is an assumption that WindowMaker is configured, that
|
||||||
|
maximized windows wont cover mini icons nor dock.
|
||||||
|
|
||||||
|
Without setting new option to true, issuing another right-half-maximize will
|
||||||
|
restore window dimensions and position to the original state (like on the first
|
||||||
|
figure). With new option set to true it will move window to second screen like:
|
||||||
|
|
||||||
|
┌┬────────────────┬────────┬────────┬┐
|
||||||
|
├┘ ├────────┤ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ └┤
|
||||||
|
├┬┐ ├┬┬┬─────┘ │
|
||||||
|
└┴┴───────────────┴┴┴┴───────────────┘
|
||||||
|
|
||||||
|
Another activation of right-half-maxmimize:
|
||||||
|
|
||||||
|
┌┬────────────────┬────────┬────────┬┐
|
||||||
|
├┘ │ ├────────┼┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
├┬┐ ├┬┬┐ └────────┘│
|
||||||
|
└┴┴───────────────┴┴┴┴───────────────┘
|
||||||
|
|
||||||
|
And final activation of right-half-maxmimize:
|
||||||
|
|
||||||
|
┌┬────────────────┬───────┬─────────┬┐
|
||||||
|
├┘ ├───────┤ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ │ │ ├┤
|
||||||
|
│ ├───────┘ ├┤
|
||||||
|
│ │ └┤
|
||||||
|
├┬┐ ├┬┬┐ │
|
||||||
|
└┴┴───────────────┴┴┴┴───────────────┘
|
||||||
|
|
||||||
|
Where window is restored its size (but not position, since it it on different
|
||||||
|
head now). Moving window in directions like left-half-maximize,
|
||||||
|
top-half-maximize and bottom-half-maximize will behave in similar way depending
|
||||||
|
on the layout of displays.
|
||||||
|
|
||||||
|
Note, that only windows that are half-maximized vertically or horizontally can
|
||||||
|
be moved to another screen due to the fact, that direction of movement of
|
||||||
|
quarter-maximized windows is ambiguous. As for vertical/horizontal-maximize,
|
||||||
|
since doesn't move the window but only stretch it vertically/horizontally this
|
||||||
|
feature also doesn't apply.
|
||||||
|
|
||||||
|
|
||||||
|
Snapping a window to the top
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
You can now choose whether snapping a window to the top edge of the screen
|
||||||
|
maximizes it to the top half (the previous and default behavior) or to the
|
||||||
|
full screen by setting "SnapToTopMaximizesFullscreen" to "NO" or "YES",
|
||||||
|
respectively. This setting can also be changed by unchecking or checking
|
||||||
|
"Snapping a window to the top maximizes it to the full screen" in the
|
||||||
|
"Expert User Preferences" tab in WPrefs.app.
|
||||||
|
|
||||||
|
Global defaults directory configuration
|
||||||
|
---------------------------------------
|
||||||
|
|
||||||
|
You can now configure the global defaults directory, where the system
|
||||||
|
WindowMaker, WMRootMenu, etc. files are stored, by running
|
||||||
|
./configure --with-defsdatadir=/path/to/defaults
|
||||||
|
at build time. The previous method, which only partially worked, involved
|
||||||
|
defining the GLOBAL_DEFAULTS_SUBDIR macro. This is no longer available.
|
||||||
|
Note that the default location is ${sysconfdir}/WindowMaker.
|
||||||
|
|
||||||
|
-- 0.95.7
|
||||||
|
|
||||||
|
Window snapping
|
||||||
|
---------------
|
||||||
|
|
||||||
|
You can now "snap" a window, i.e., maximize it to a side or corner of the
|
||||||
|
screen, by dragging it to that side or corner. It is enabled by setting
|
||||||
|
"WindowSnapping = YES" in ~/GNUstep/Defaults/WindowMaker or selecting "Maximize
|
||||||
|
(snap) a window to edge or corner by dragging." under "Expert User Preferences"
|
||||||
|
in WPrefs.app.
|
||||||
|
|
||||||
|
Note that if "Switch workspaces while dragging windows" is selected under
|
||||||
|
"Workspace Preferences" in WPrefs.app, or if "DontLinkWorkspaces = NO" in
|
||||||
|
~/GNUstep/Defaults/WindowMaker, then you may only snap a window to the top or
|
||||||
|
bottom of the screen.
|
||||||
|
|
||||||
|
You may set the distance (in pixels) from the edge or corner of the screen at
|
||||||
|
which a window will begin snapping using "SnapEdgeDetect" and "SnapCornerDetect"
|
||||||
|
in ~/GNUstep/Defaults/WindowMaker or setting "Distance from edge/corner to begin
|
||||||
|
window snap." under "Expert User Preferences" in WPrefs.app. (The defaults are
|
||||||
|
1 pixel and 10 pixels, respectively).
|
||||||
|
|
||||||
|
|
||||||
|
Dragging maximized windows
|
||||||
|
--------------------------
|
||||||
|
You can now control the behavior when a maximized window is dragged by setting
|
||||||
|
the "DragMaximizedWindow" option in ~/GNUstep/Defaults/WindowMaker or by
|
||||||
|
selecting an option from the "When dragging a maximized window..." pop-up button
|
||||||
|
under "Window Handling Preferences" in WPrefs.app.
|
||||||
|
|
||||||
|
There are four choices:
|
||||||
|
* "Move" ("...change position (normal behavior)" in WPrefs.app) is the default
|
||||||
|
and traditional behavior. A maximized window is moved when dragged and
|
||||||
|
remains maximized, i.e., it keeps its maximized geometry and can later be
|
||||||
|
unmaximized.
|
||||||
|
* "RestoreGeometry" ("...restore unmaximized geometry") is the behavior standard
|
||||||
|
in desktop environments like GNOME, Cinnamon, and Unity. A maximized window
|
||||||
|
is moved when dragged and is completely unmaximized, i.e., its unmaximized
|
||||||
|
geometry is restored.
|
||||||
|
* "Unmaximize" ("...consider the window unmaximized") causes a maximized window
|
||||||
|
to be moved when dragged and remains partially maximized, i.e., it keeps its
|
||||||
|
maximized geometry, but is consider to be unmaximized. In particular, it can
|
||||||
|
be immediately re-maximized.
|
||||||
|
* "NoMove" ("...do not move the window") prevents a maximized window from being
|
||||||
|
moved when dragged.
|
||||||
|
|
||||||
|
Note that, to accomodate this option in the "Window Handling Preferences" tab in
|
||||||
|
WPrefs.app, the option to "Open dialogs in the same workspace as their owners"
|
||||||
|
(which sets the "OpenTransientOnOwnerWorkspace" option from
|
||||||
|
~/GNUstep/Defaults/WindowMaker) has been moved to "Expert User Preferences".
|
||||||
|
|
||||||
|
|
||||||
|
Mini-Previews instead of Apercus
|
||||||
|
--------------------------------
|
||||||
|
|
||||||
|
Since the original name was not really clear because it is a French word that
|
||||||
|
is rarely used by British people, it was decided to change it to the more usual
|
||||||
|
Mini-Preview name. The setting is configurable with WPrefs in the Icon
|
||||||
|
Preferences tab, the size is now expressed in pixels directly.
|
||||||
|
|
||||||
|
|
||||||
|
Ignore Decoration Hints from GNOME applications
|
||||||
|
-----------------------------------------------
|
||||||
|
|
||||||
|
The GNOME applications ask Window Maker to get no title bar and no resize bar to
|
||||||
|
their windows by using "Hints". You can re-add them using the Attribute dialog
|
||||||
|
in the Window menu, but if you are using many GNOME applications you may want to
|
||||||
|
tell Window Maker to just ignore them. This is done with the new setting called
|
||||||
|
"IgnoreGtkHints", which is available in the "Expert" panel in WPrefs.
|
||||||
|
|
||||||
|
|
||||||
|
Cooperative Window Manager Replacement
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
The ICCCM defines a protocol for window managers to ask to replace the currently
|
||||||
|
running one; Window Maker now supports it. You can ask Window Maker to take the
|
||||||
|
place of current one by running "wmaker --replace", or any other window manager
|
||||||
|
can ask Window Maker to leave the place for them when started the same way.
|
||||||
|
Please note that this feature must be explicitely enabled at compile time because
|
||||||
|
by default it is not compiled in ("configure --enable-wmreplace").
|
||||||
|
|
||||||
|
|
||||||
--- 0.95.6
|
--- 0.95.6
|
||||||
|
|
||||||
More image format supported
|
More image format supported
|
||||||
@@ -12,6 +403,33 @@ can now load WebP images. It can also make use of the ImageMagick library
|
|||||||
to support a lot more formats, like SVG, BMP, TGA...
|
to support a lot more formats, like SVG, BMP, TGA...
|
||||||
|
|
||||||
|
|
||||||
|
Mini-window apercu
|
||||||
|
------------------
|
||||||
|
|
||||||
|
A small preview of window contents can be enabled from WPrefs,
|
||||||
|
in Miscellaneous Ergonomic Preferences, check miniwindow apercus.
|
||||||
|
Apercu size can be configured using the ApercuSize variable with
|
||||||
|
|
||||||
|
$ wdwrite WindowMaker ApercuSize 4
|
||||||
|
|
||||||
|
in multiples of the icon size (in this case the apercu size will be four
|
||||||
|
times the icon size).
|
||||||
|
|
||||||
|
The default size is 2 (twice the icon size).
|
||||||
|
|
||||||
|
|
||||||
|
Support for up to 9-buttons mouse
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
The action for the newly supported buttons can be configured from WPrefs.
|
||||||
|
|
||||||
|
|
||||||
|
wmiv, an image viewer application
|
||||||
|
---------------------------------
|
||||||
|
|
||||||
|
wmiv is a quick image viewer using wrlib to be run from the command line.
|
||||||
|
|
||||||
|
|
||||||
--- 0.95.5
|
--- 0.95.5
|
||||||
|
|
||||||
Support for generated menus in proplist format
|
Support for generated menus in proplist format
|
||||||
@@ -1280,7 +1698,7 @@ raising/lowering there is a time threshold before raising/lowering.
|
|||||||
The thresholds can be changed in wconfig.h by changing one or both of
|
The thresholds can be changed in wconfig.h by changing one or both of
|
||||||
AUTO_LOWER_DELAY and AUTO_RAISE_DELAY (expressed in milliseconds).
|
AUTO_LOWER_DELAY and AUTO_RAISE_DELAY (expressed in milliseconds).
|
||||||
For example if you set AUTO_RAISE_DELAY to 0, then the Clip will be raised as
|
For example if you set AUTO_RAISE_DELAY to 0, then the Clip will be raised as
|
||||||
soon as the mouse pointer enters it's area. Setting AUTO_RAISE_DELAY to a very
|
soon as the mouse pointer enters its area. Setting AUTO_RAISE_DELAY to a very
|
||||||
big value, will make the Clip to practically do not auto raise unless clicked,
|
big value, will make the Clip to practically do not auto raise unless clicked,
|
||||||
but to be automatically lowered after AUTO_LOWER_DELAY (ms) when leaved.
|
but to be automatically lowered after AUTO_LOWER_DELAY (ms) when leaved.
|
||||||
|
|
||||||
@@ -2209,7 +2627,7 @@ The OPEN_MENU command now supports the following syntax:
|
|||||||
// it in current position
|
// it in current position
|
||||||
OPEN_MENU file.menu
|
OPEN_MENU file.menu
|
||||||
2. Pipe menu handling.
|
2. Pipe menu handling.
|
||||||
// opens command and uses it's stdout to construct menu.
|
// opens command and uses its stdout to construct menu.
|
||||||
// Command's output must be a valid menu description.
|
// Command's output must be a valid menu description.
|
||||||
OPEN_MENU | command
|
OPEN_MENU | command
|
||||||
3. Directory handling.
|
3. Directory handling.
|
||||||
@@ -2812,7 +3230,7 @@ when they are first mapped
|
|||||||
titlebar gradients are in a single piece now
|
titlebar gradients are in a single piece now
|
||||||
|
|
||||||
the WMDock file was merged into the WMState file. You can insert this
|
the WMDock file was merged into the WMState file. You can insert this
|
||||||
file in WMState and set it's key to Dock. For example, if your WMDock
|
file in WMState and set its key to Dock. For example, if your WMDock
|
||||||
contains:
|
contains:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -129,8 +129,8 @@ HELP ME!!!
|
|||||||
==========
|
==========
|
||||||
|
|
||||||
There is a mailing list for discussing Window Maker at
|
There is a mailing list for discussing Window Maker at
|
||||||
wmaker-user@lists.windowmaker.org To subscribe to it, send a message to
|
wmaker-user@googlegroups.com. To subscribe to it, visit
|
||||||
wmaker-user-subscribe@lists.windowmaker.org
|
https://groups.google.com/forum/#!forum/wmaker-user
|
||||||
|
|
||||||
If you got a problem, ask there (after reading the docs, of course). The people
|
If you got a problem, ask there (after reading the docs, of course). The people
|
||||||
there is more likely to be able to answer your questions than we are. For bug
|
there is more likely to be able to answer your questions than we are. For bug
|
||||||
@@ -178,7 +178,7 @@ Running multiple instances of Window Maker
|
|||||||
|
|
||||||
It is not a good idea to run more than one instance of Window Maker
|
It is not a good idea to run more than one instance of Window Maker
|
||||||
from the same user (so that wmaker will use the same configuration files) at the
|
from the same user (so that wmaker will use the same configuration files) at the
|
||||||
same time. You might get unexpected behavior when Window Maker updates it's
|
same time. You might get unexpected behavior when Window Maker updates its
|
||||||
configuration files.
|
configuration files.
|
||||||
|
|
||||||
If you really desire to do this, try running Window Maker with the command line
|
If you really desire to do this, try running Window Maker with the command line
|
||||||
@@ -201,14 +201,15 @@ while keeping a nice appearance and good functionality, follow the items bellow:
|
|||||||
- edit wconfig.h and disable the NUMLOCK_HACK and the features you don't use
|
- edit wconfig.h and disable the NUMLOCK_HACK and the features you don't use
|
||||||
anyway (keep in mind that some of the #defines might not work, as they are not
|
anyway (keep in mind that some of the #defines might not work, as they are not
|
||||||
fully supported). Make sure to always keep NumLock and ScrollLock turned off.
|
fully supported). Make sure to always keep NumLock and ScrollLock turned off.
|
||||||
- turn on DisableAnimations. You can also #undefine ANIMATIONS in wconfig.h
|
- turn on DisableAnimations. You can also specify --disable-animation at compile
|
||||||
|
time to the configure script.
|
||||||
- strip down the default IconPath and PixmapPath entries to contain only
|
- strip down the default IconPath and PixmapPath entries to contain only
|
||||||
the paths that you really have in your system.
|
the paths that you really have in your system.
|
||||||
- do not use large images in the root background
|
- do not use large images in the root background
|
||||||
- remove support for image formats you don't use
|
- remove support for image formats you don't use
|
||||||
- to reduce memory usage, disable the icon cache, by setting the RIMAGE_CACHE
|
- to reduce memory usage, disable the icon cache, by setting the RIMAGE_CACHE
|
||||||
environment variable to 0. If you want to increase performance at the cost of
|
environment variable to 0. If you want to increase performance at the cost of
|
||||||
memory usage, set it's value to a value like the number of different icons you
|
memory usage, set its value to a value like the number of different icons you
|
||||||
use. Also, disable anti-aliased text support in ~/GNUstep/Defaults/WMGLOBAL.
|
use. Also, disable anti-aliased text support in ~/GNUstep/Defaults/WMGLOBAL.
|
||||||
|
|
||||||
|
|
||||||
@@ -310,5 +311,5 @@ project. The name of people who have helped with localization (translation) can
|
|||||||
be found in po/README and Window Maker/README
|
be found in po/README and Window Maker/README
|
||||||
|
|
||||||
If you have any comments, fixes and bug reports (filled BUGFORMs) send them
|
If you have any comments, fixes and bug reports (filled BUGFORMs) send them
|
||||||
to wmaker-dev@lists.windowmaker.org
|
to wmaker-dev@googlegroups.com
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,11 @@ This does not only enable debugging information, which you may need when
|
|||||||
testing your work, it also enables a number of extra compiler warning
|
testing your work, it also enables a number of extra compiler warning
|
||||||
which help keeping safer code.
|
which help keeping safer code.
|
||||||
|
|
||||||
|
You will probably want also to run this in the end, because it does some
|
||||||
|
checks on the source tree:
|
||||||
|
|
||||||
|
make check
|
||||||
|
|
||||||
__________________________
|
__________________________
|
||||||
Producing a patch with git
|
Producing a patch with git
|
||||||
--------------------------
|
--------------------------
|
||||||
@@ -129,7 +134,7 @@ Sending the patch to the mailing list
|
|||||||
|
|
||||||
Send your patches to:
|
Send your patches to:
|
||||||
|
|
||||||
wmaker-dev@lists.windowmaker.org
|
wmaker-dev@googlegroups.com
|
||||||
|
|
||||||
Please do not send patches to any individual developer unless you have a very
|
Please do not send patches to any individual developer unless you have a very
|
||||||
good reason to avoid more people being able to comment (and improve) on your
|
good reason to avoid more people being able to comment (and improve) on your
|
||||||
@@ -142,7 +147,7 @@ you, otherwise you may face the problems below. Doing this is really easy:
|
|||||||
# (of course, replace smtp.example.com with your ISP's)
|
# (of course, replace smtp.example.com with your ISP's)
|
||||||
git config --global sendemail.smtpserver "smtp.example.com"
|
git config --global sendemail.smtpserver "smtp.example.com"
|
||||||
git config --global sendemail.validate true
|
git config --global sendemail.validate true
|
||||||
git config sendemail.to "Window Maker Devel <wmaker-dev@lists.windowmaker.org>"
|
git config sendemail.to "Window Maker Devel <wmaker-dev@googlegroups.com>"
|
||||||
|
|
||||||
# If you're sending more than 1 patch, you may be interested in having an
|
# If you're sending more than 1 patch, you may be interested in having an
|
||||||
# introduction mail for the batch:
|
# introduction mail for the batch:
|
||||||
|
|||||||
+7
-1
@@ -1,3 +1,9 @@
|
|||||||
|
Changes since wmaker 0.96.0:
|
||||||
|
............................
|
||||||
|
|
||||||
|
- added W_KeycodeToKeysym to replace XKeycodeToKeysym/XkbKeycodeToKeysym calls
|
||||||
|
|
||||||
|
|
||||||
Changes since wmaker 0.92.0:
|
Changes since wmaker 0.92.0:
|
||||||
............................
|
............................
|
||||||
|
|
||||||
@@ -134,7 +140,7 @@ Changes since wmaker 0.64.0:
|
|||||||
- Moved all internal handlers (timer, idle and input) to handlers.c
|
- Moved all internal handlers (timer, idle and input) to handlers.c
|
||||||
- simplified wevent.c and wutil.c.
|
- simplified wevent.c and wutil.c.
|
||||||
- fixed handling of input with poll (was broken)
|
- fixed handling of input with poll (was broken)
|
||||||
- fixed mem leak that occured when input handling was done with poll
|
- fixed mem leak that occurred when input handling was done with poll
|
||||||
- simpler and more straightforward event handling for timer, idle, input
|
- simpler and more straightforward event handling for timer, idle, input
|
||||||
and X events (also fixed some problems the old handling logic had)
|
and X events (also fixed some problems the old handling logic had)
|
||||||
- moved timer, idle and input handler definitions and prototypes from
|
- moved timer, idle and input handler definitions and prototypes from
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ noinst_PROGRAMS = fontl puzzle colorpick
|
|||||||
|
|
||||||
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||||
$(top_builddir)/WINGs/libWUtil.la \
|
$(top_builddir)/WINGs/libWUtil.la \
|
||||||
@XFTLIBS@ @INTLIBS@
|
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
||||||
|
|
||||||
colorpick_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
colorpick_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ void showSelectedColor(void *self, void *cdata)
|
|||||||
{
|
{
|
||||||
WMColorPanel *panel = (WMColorPanel *) self;
|
WMColorPanel *panel = (WMColorPanel *) self;
|
||||||
|
|
||||||
|
(void) cdata;
|
||||||
printf("Selected Color: %s\n", WMGetColorRGBDescription(WMGetColorPanelColor(panel)));
|
printf("Selected Color: %s\n", WMGetColorRGBDescription(WMGetColorPanelColor(panel)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -23,8 +23,10 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
|
#include <inttypes.h>
|
||||||
|
#include <stdnoreturn.h>
|
||||||
|
|
||||||
void wAbort()
|
noreturn void wAbort(void)
|
||||||
{
|
{
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
@@ -35,12 +37,14 @@ void show(WMWidget * self, void *data)
|
|||||||
void *d;
|
void *d;
|
||||||
WMLabel *l = (WMLabel *) data;
|
WMLabel *l = (WMLabel *) data;
|
||||||
d = WMGetHangedData(self);
|
d = WMGetHangedData(self);
|
||||||
sprintf(buf, "%i - 0x%x - 0%o", (int)d, (int)d, (int)d);
|
sprintf(buf, "%"PRIiPTR" - 0x%"PRIxPTR" - 0%"PRIoPTR, (intptr_t) d, (intptr_t) d, (intptr_t) d);
|
||||||
WMSetLabelText(l, buf);
|
WMSetLabelText(l, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void quit(WMWidget * self, void *data)
|
noreturn void quit(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
|
(void) data;
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -155,6 +155,9 @@ static void resizeObserver(void *self, WMNotification * notif)
|
|||||||
WMSize size = WMGetViewSize(WMWidgetView(win));
|
WMSize size = WMGetViewSize(WMWidgetView(win));
|
||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
|
(void) self;
|
||||||
|
(void) notif;
|
||||||
|
|
||||||
WinSize = size.width;
|
WinSize = size.width;
|
||||||
for (y = 0; y < Size; y++) {
|
for (y = 0; y < Size; y++) {
|
||||||
for (x = 0; x < Size; x++) {
|
for (x = 0; x < Size; x++) {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ include_HEADERS = wtableview.h wtabledelegates.h
|
|||||||
|
|
||||||
lib_LTLIBRARIES = libExtraWINGs.la
|
lib_LTLIBRARIES = libExtraWINGs.la
|
||||||
|
|
||||||
noinst_PROGRAMS = test
|
noinst_PROGRAMS = tableview
|
||||||
|
|
||||||
EXTRA_DIST =
|
EXTRA_DIST =
|
||||||
|
|
||||||
@@ -25,6 +25,6 @@ AM_CPPFLAGS = -I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs \
|
|||||||
|
|
||||||
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||||
$(top_builddir)/WINGs/libWUtil.la \
|
$(top_builddir)/WINGs/libWUtil.la \
|
||||||
@XFTLIBS@ @INTLIBS@
|
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
||||||
|
|
||||||
test_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
tableview_LDADD = wtableview.o wtabledelegates.o $(LDADD)
|
||||||
|
|||||||
@@ -19,13 +19,18 @@ static char *options[] = {
|
|||||||
|
|
||||||
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
|
int numberOfRows(WMTableViewDelegate * self, WMTableView * table)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
|
(void) table;
|
||||||
|
|
||||||
return 20;
|
return 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
|
/*WMTableView *table = (WMTableView*)WMGetTableColumnTableView(column); */
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (col1[0] == 0) {
|
if (col1[0] == 0) {
|
||||||
for (i = 0; i < 20; i++) {
|
for (i = 0; i < 20; i++) {
|
||||||
char buf[128];
|
char buf[128];
|
||||||
@@ -44,6 +49,8 @@ void *valueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row)
|
|||||||
|
|
||||||
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
|
void setValueForCell(WMTableViewDelegate * self, WMTableColumn * column, int row, void *data)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
|
|
||||||
if ((uintptr_t)WMGetTableColumnId(column) == 1)
|
if ((uintptr_t)WMGetTableColumnId(column) == 1)
|
||||||
col1[row] = data;
|
col1[row] = data;
|
||||||
else
|
else
|
||||||
@@ -59,6 +66,7 @@ static WMTableViewDelegate delegate = {
|
|||||||
|
|
||||||
void clickedTable(WMWidget * w, void *self)
|
void clickedTable(WMWidget * w, void *self)
|
||||||
{
|
{
|
||||||
|
(void) w;
|
||||||
int row = WMGetTableViewClickedRow((WMTableView *) self);
|
int row = WMGetTableViewClickedRow((WMTableView *) self);
|
||||||
|
|
||||||
WMEditTableViewRow(self, row);
|
WMEditTableViewRow(self, row);
|
||||||
@@ -2,6 +2,8 @@
|
|||||||
#include <WINGs/WINGsP.h>
|
#include <WINGs/WINGsP.h>
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
#include "wtableview.h"
|
#include "wtableview.h"
|
||||||
|
|
||||||
@@ -274,7 +276,7 @@ static void adjustScrollers(WMTableView * table)
|
|||||||
prop = 1.0;
|
prop = 1.0;
|
||||||
} else {
|
} else {
|
||||||
oprop = WMGetScrollerKnobProportion(table->hscroll);
|
oprop = WMGetScrollerKnobProportion(table->hscroll);
|
||||||
if (oprop == 0.0)
|
if (fabs(oprop) <= DBL_EPSILON)
|
||||||
oprop = 1.0;
|
oprop = 1.0;
|
||||||
ovalue = WMGetScrollerValue(table->hscroll);
|
ovalue = WMGetScrollerValue(table->hscroll);
|
||||||
|
|
||||||
@@ -290,7 +292,7 @@ static void adjustScrollers(WMTableView * table)
|
|||||||
prop = 1.0;
|
prop = 1.0;
|
||||||
} else {
|
} else {
|
||||||
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
oprop = WMGetScrollerKnobProportion(table->vscroll);
|
||||||
if (oprop == 0.0)
|
if (fabs(oprop) <= DBL_EPSILON)
|
||||||
oprop = 1.0;
|
oprop = 1.0;
|
||||||
ovalue = WMGetScrollerValue(table->vscroll);
|
ovalue = WMGetScrollerValue(table->vscroll);
|
||||||
|
|
||||||
@@ -332,7 +334,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
case WSIncrementWheel:
|
case WSIncrementWheel:
|
||||||
case WSIncrementLine:
|
case WSIncrementLine:
|
||||||
value += (float)table->rowHeight / size;
|
value += (float)table->rowHeight / size;
|
||||||
if (value > 1.0)
|
if (value > (float)1.0)
|
||||||
value = 1.0;
|
value = 1.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -344,7 +346,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
case WSDecrementPage:
|
case WSDecrementPage:
|
||||||
value -= vpsize / size;
|
value -= vpsize / size;
|
||||||
if (value < 0.0)
|
if (value < (float)0.0)
|
||||||
value = 0.0;
|
value = 0.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -352,7 +354,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
case WSIncrementPage:
|
case WSIncrementPage:
|
||||||
value += vpsize / size;
|
value += vpsize / size;
|
||||||
if (value > 1.0)
|
if (value > (float)1.0)
|
||||||
value = 1.0;
|
value = 1.0;
|
||||||
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
WMSetScrollerParameters(self, value, WMGetScrollerKnobProportion(self));
|
||||||
repaintTable(table);
|
repaintTable(table);
|
||||||
@@ -398,6 +400,7 @@ static void doScroll(WMWidget * self, void *data)
|
|||||||
|
|
||||||
static void splitterHandler(XEvent * event, void *data)
|
static void splitterHandler(XEvent * event, void *data)
|
||||||
{
|
{
|
||||||
|
(void) event;
|
||||||
WMTableColumn *column = (WMTableColumn *) data;
|
WMTableColumn *column = (WMTableColumn *) data;
|
||||||
WMTableView *table = column->table;
|
WMTableView *table = column->table;
|
||||||
int done = 0;
|
int done = 0;
|
||||||
@@ -451,6 +454,8 @@ static void splitterHandler(XEvent * event, void *data)
|
|||||||
|
|
||||||
static void realizeTable(void *data, WMNotification * notif)
|
static void realizeTable(void *data, WMNotification * notif)
|
||||||
{
|
{
|
||||||
|
(void) notif;
|
||||||
|
|
||||||
repaintTable(data);
|
repaintTable(data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -790,7 +795,6 @@ void WMSetTableViewRowHeight(WMTableView * table, int height)
|
|||||||
|
|
||||||
void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
||||||
{
|
{
|
||||||
WMScroller *scroller;
|
|
||||||
WMRange range;
|
WMRange range;
|
||||||
WMRect rect;
|
WMRect rect;
|
||||||
int newY, tmp;
|
int newY, tmp;
|
||||||
@@ -798,7 +802,6 @@ void WMScrollTableViewRowToVisible(WMTableView * table, int row)
|
|||||||
rect = getVisibleRect(table);
|
rect = getVisibleRect(table);
|
||||||
range = rowsInRect(table, rect);
|
range = rowsInRect(table, rect);
|
||||||
|
|
||||||
scroller = table->vscroll;
|
|
||||||
|
|
||||||
if (row < range.position) {
|
if (row < range.position) {
|
||||||
newY = row * table->rowHeight - rect.size.height / 2;
|
newY = row * table->rowHeight - rect.size.height / 2;
|
||||||
@@ -1157,6 +1160,8 @@ static void handleEvents(XEvent * event, void *data)
|
|||||||
|
|
||||||
static void handleResize(W_ViewDelegate * self, WMView * view)
|
static void handleResize(W_ViewDelegate * self, WMView * view)
|
||||||
{
|
{
|
||||||
|
(void) self;
|
||||||
|
|
||||||
reorganizeInterior(view->self);
|
reorganizeInterior(view->self);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1167,7 +1172,8 @@ static void reorganizeInterior(WMTableView * table)
|
|||||||
WMSize size = getTotalSize(table);
|
WMSize size = getTotalSize(table);
|
||||||
WMView *view = table->view;
|
WMView *view = table->view;
|
||||||
int vw, vh;
|
int vw, vh;
|
||||||
int hsThickness, vsThickness;
|
int hsThickness = 0;
|
||||||
|
int vsThickness = 0;
|
||||||
|
|
||||||
if (table->vscroll)
|
if (table->vscroll)
|
||||||
vsThickness = WMWidgetWidth(table->vscroll);
|
vsThickness = WMWidgetWidth(table->vscroll);
|
||||||
|
|||||||
+11
-29
@@ -3,20 +3,19 @@
|
|||||||
AUTOMAKE_OPTIONS =
|
AUTOMAKE_OPTIONS =
|
||||||
|
|
||||||
SUBDIRS = WINGs . po Documentation Resources
|
SUBDIRS = WINGs . po Documentation Resources
|
||||||
|
DIST_SUBDIRS = $(SUBDIRS) Tests Examples Extras
|
||||||
|
|
||||||
libWINGs_la_LDFLAGS = -version-info @WINGS_VERSION@
|
libWINGs_la_LDFLAGS = -version-info @WINGS_VERSION@
|
||||||
libWUtil_la_LDFLAGS = -version-info @WUTIL_VERSION@
|
libWUtil_la_LDFLAGS = -version-info @WUTIL_VERSION@
|
||||||
|
|
||||||
bin_SCRIPTS = get-wings-flags get-wutil-flags
|
|
||||||
|
|
||||||
lib_LTLIBRARIES = libWUtil.la libWINGs.la
|
lib_LTLIBRARIES = libWUtil.la libWINGs.la
|
||||||
|
|
||||||
|
|
||||||
LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
LDADD= libWUtil.la libWINGs.la $(top_builddir)/wrlib/libwraster.la @INTLIBS@
|
||||||
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFTLIBS@ @FCLIBS@ @LIBM@
|
libWINGs_la_LIBADD = libWUtil.la $(top_builddir)/wrlib/libwraster.la @XLIBS@ @XFT_LIBS@ @FCLIBS@ @LIBM@ @PANGO_LIBS@
|
||||||
libWUtil_la_LIBADD = @LIBBSD@
|
libWUtil_la_LIBADD = @LIBBSD@
|
||||||
|
|
||||||
EXTRA_DIST = BUGS make-rgb Examples Extras Tests get-wings-flags.in get-wutil-flags.in
|
EXTRA_DIST = BUGS make-rgb Examples Extras Tests
|
||||||
|
|
||||||
|
|
||||||
# wbutton.c
|
# wbutton.c
|
||||||
@@ -88,16 +87,17 @@ libWUtil_la_SOURCES = \
|
|||||||
wutil.c
|
wutil.c
|
||||||
|
|
||||||
|
|
||||||
AM_CFLAGS =
|
AM_CFLAGS = @PANGO_CFLAGS@
|
||||||
|
|
||||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\" -DRESOURCE_PATH=\"$(datadir)/WINGs\" \
|
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(datadir)/WINGs\" \
|
||||||
-I$(top_srcdir)/WINGs/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
-I$(top_srcdir)/WINGs/WINGs -I$(top_builddir)/WINGs/WINGs \
|
||||||
@XFTFLAGS@ @HEADER_SEARCH_PATH@
|
-I$(top_builddir)/wrlib -I$(top_srcdir)/src \
|
||||||
|
@XFT_CFLAGS@ @HEADER_SEARCH_PATH@
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = WINGs.pc WUtil.pc
|
pkgconfig_DATA = WINGs.pc WUtil.pc
|
||||||
|
|
||||||
DISTCLEANFILES = $(pkgconfig_DATA) get-wings-flags get-wutil-flags
|
DISTCLEANFILES = $(pkgconfig_DATA)
|
||||||
|
|
||||||
WINGs.pc: Makefile
|
WINGs.pc: Makefile
|
||||||
@echo "Generating $@"
|
@echo "Generating $@"
|
||||||
@@ -106,18 +106,8 @@ WINGs.pc: Makefile
|
|||||||
@echo 'Version: $(VERSION)' >> $@
|
@echo 'Version: $(VERSION)' >> $@
|
||||||
@echo 'Requires: wrlib WUtil' >> $@
|
@echo 'Requires: wrlib WUtil' >> $@
|
||||||
@echo 'Libs: $(lib_search_path) -lWINGs' >> $@
|
@echo 'Libs: $(lib_search_path) -lWINGs' >> $@
|
||||||
@echo 'Libs.private: $(XFTLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
|
@echo 'Libs.private: $(XFT_LIBS) $(PANGOLIBS) $(XLIBS) -lm $(INTLIBS)' >> $@
|
||||||
@echo 'Cflags: $(inc_search_path)' >> $@
|
@echo 'Cflags: $(inc_search_path) @PANGO_CFLAGS@' >> $@
|
||||||
|
|
||||||
get-wings-flags: get-wings-flags.in Makefile
|
|
||||||
@echo "Generating $@"
|
|
||||||
@$(SED) -e 's#$${inc_search_path}#$(inc_search_path)#;' \
|
|
||||||
-e 's#$${lib_search_path}#$(lib_search_path)#;' \
|
|
||||||
-e 's#$${GFXLIBS}#$(GFXLIBS)#;' \
|
|
||||||
-e 's#$${XFTLIBS}#$(XFTLIBS)#;' \
|
|
||||||
-e 's#$${INTLIBS}#$(INTLIBS)#;' \
|
|
||||||
-e 's#$${XLIBS}#$(XLIBS)#;' < $(abs_srcdir)/get-wings-flags.in > $@
|
|
||||||
@chmod 755 $@
|
|
||||||
|
|
||||||
WUtil.pc: Makefile
|
WUtil.pc: Makefile
|
||||||
@echo "Generating $@"
|
@echo "Generating $@"
|
||||||
@@ -127,11 +117,3 @@ WUtil.pc: Makefile
|
|||||||
@echo 'Libs: -L$(libdir) -lWUtil' >> $@
|
@echo 'Libs: -L$(libdir) -lWUtil' >> $@
|
||||||
@echo 'Libs.private: $(INTLIBS)' >> $@
|
@echo 'Libs.private: $(INTLIBS)' >> $@
|
||||||
@echo 'Cflags: -I$(includedir)' >> $@
|
@echo 'Cflags: -I$(includedir)' >> $@
|
||||||
|
|
||||||
get-wutil-flags: get-wutil-flags.in Makefile
|
|
||||||
@echo "Generating $@"
|
|
||||||
@$(SED) -e 's#$${includedir}#$(includedir)#;' \
|
|
||||||
-e 's#$${libdir}#$(libdir)#;' \
|
|
||||||
-e 's#$${INTLIBS}#$(INTLIBS)#;' < $(abs_srcdir)/get-wutil-flags.in > $@
|
|
||||||
@chmod 755 $@
|
|
||||||
|
|
||||||
|
|||||||
+57
-10
@@ -1,7 +1,9 @@
|
|||||||
** API and ABI modifications since wmaker 0.92.0
|
** API and ABI modifications since wmaker 0.96.0
|
||||||
|
----------------------------------------------------
|
||||||
|
|
||||||
** libWINGs **
|
** libWINGs **
|
||||||
<WINGsP.h>
|
<WINGsP.h>
|
||||||
|
W_KeycodeToKeysym ADDED
|
||||||
struct W_DragDestinationInfo: new members added SIZE CHANGE
|
struct W_DragDestinationInfo: new members added SIZE CHANGE
|
||||||
|
|
||||||
<WINGs.h>
|
<WINGs.h>
|
||||||
@@ -155,6 +157,41 @@ wshellquote ADDED
|
|||||||
|
|
||||||
----------------------------------------------------
|
----------------------------------------------------
|
||||||
|
|
||||||
|
*** Fri May 15 18:44:50 CEST 2015 - Christophe
|
||||||
|
|
||||||
|
New Tri-state type for WMButton
|
||||||
|
-------------------------------
|
||||||
|
|
||||||
|
A new check-box type button is available with state On/Off/Tri, the later being
|
||||||
|
generally used to express "leave as-is". The states are cycled through as user
|
||||||
|
click on the button. It is created with:
|
||||||
|
btn = WMCreateButton(parent_widget, WBTTriState);
|
||||||
|
|
||||||
|
There are is this case 3 possible values for WMSetButtonSelected/WMGetButtonSelected:
|
||||||
|
- 0 and 1, the legacy checked/unchecked states
|
||||||
|
- the new -1, when in the 3rd state
|
||||||
|
|
||||||
|
|
||||||
|
*** Sun Dec 7 10:52:21 CET 2014 - David
|
||||||
|
|
||||||
|
Support for pixmap in the background of Widget
|
||||||
|
----------------------------------------------
|
||||||
|
|
||||||
|
The new function WMSetWidgetBackgroundPixmap was introduced to specify a pixmap
|
||||||
|
that will be displayed as the background of a widget instead of the usual plain
|
||||||
|
color. The dual WMGetWidgetBackgroundPixmap is provided too.
|
||||||
|
|
||||||
|
|
||||||
|
*** Sun Nov 2 13:04:14 CET 2014 - David
|
||||||
|
|
||||||
|
Get the text of a button
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
It was assumed that there was no need to retrieve the text from a button because
|
||||||
|
it is generally a static constant text, but there are some cases where this can
|
||||||
|
be useful, so the new function WMGetButtonText was added to the API.
|
||||||
|
|
||||||
|
|
||||||
*** Thu May 9 18:24:03 CEST 2013 - Christophe
|
*** Thu May 9 18:24:03 CEST 2013 - Christophe
|
||||||
|
|
||||||
Const-correctness API changes for WRaster, WUtils and WINGs
|
Const-correctness API changes for WRaster, WUtils and WINGs
|
||||||
@@ -172,14 +209,24 @@ This function now returns 'const char *' because its result must *not* be
|
|||||||
modified, so it may generate a const related warning in old code.
|
modified, so it may generate a const related warning in old code.
|
||||||
|
|
||||||
|
|
||||||
|
*** Fri Mar 7 00:39:28 CET 2014 - David
|
||||||
|
|
||||||
|
New function WMCreateScaledBlendedPixmapFromFile
|
||||||
|
------------------------------------------------
|
||||||
|
|
||||||
|
This function can load an image from a file and if it is bigger than the
|
||||||
|
specified width/height then it will be scaled down to fit the size while
|
||||||
|
keeping the aspect ratio of the original image.
|
||||||
|
|
||||||
|
|
||||||
*** Mon Oct 14 19:42:42 EEST 2002 - Dan
|
*** Mon Oct 14 19:42:42 EEST 2002 - Dan
|
||||||
|
|
||||||
Double buffering
|
Double buffering
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
To avoid flickering caused by redrawing the widgets on Expose events, a
|
To avoid flickering caused by redrawing the widgets on Expose events, a
|
||||||
double buffering tehnique was implemented for most of the widgets.
|
double buffering technique was implemented for most of the widgets.
|
||||||
This flickering effect has gotten more vizible with the introduction
|
This flickering effect has gotten more visible with the introduction
|
||||||
of antialiased fonts. If with normal text one can redraw the text over the
|
of antialiased fonts. If with normal text one can redraw the text over the
|
||||||
old one over and over again without any degradation of the text (new pixels
|
old one over and over again without any degradation of the text (new pixels
|
||||||
simply overwrite old pixels), with antialiased text the situation is
|
simply overwrite old pixels), with antialiased text the situation is
|
||||||
@@ -191,7 +238,7 @@ The double buffer is implemented to solve this issue.
|
|||||||
This is a change that that will be automatically available for any WINGs
|
This is a change that that will be automatically available for any WINGs
|
||||||
applications and will require no change in the existing code.
|
applications and will require no change in the existing code.
|
||||||
However there is an exception from this in case of WMList if you delegate
|
However there is an exception from this in case of WMList if you delegate
|
||||||
the drawing of items to userspace (read below for the compelte details).
|
the drawing of items to userspace (read below for the complete details).
|
||||||
|
|
||||||
|
|
||||||
*** Mon Oct 14 22:07:42 EEST 2002 - Dan
|
*** Mon Oct 14 22:07:42 EEST 2002 - Dan
|
||||||
@@ -199,10 +246,10 @@ the drawing of items to userspace (read below for the compelte details).
|
|||||||
WMList change
|
WMList change
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
In case of WMList there is the posibility to delegate the drawing of the
|
In case of WMList there is the possibility to delegate the drawing of the
|
||||||
list items to the application that is linked with WINGs, and this code will
|
list items to the application that is linked with WINGs, and this code will
|
||||||
not be inside the WINGs library, but in userland. Since we use the double
|
not be inside the WINGs library, but in userland. Since we use the double
|
||||||
buffering tehnique in this case too (to allow all widgets based on WMList
|
buffering technique in this case too (to allow all widgets based on WMList
|
||||||
and the ones that draw their list items by themselves to benefit from the
|
and the ones that draw their list items by themselves to benefit from the
|
||||||
double buffering advantage automatically), we no longer pass the window to
|
double buffering advantage automatically), we no longer pass the window to
|
||||||
the user code doing item drawing, but instead pass this pixmap in which we
|
the user code doing item drawing, but instead pass this pixmap in which we
|
||||||
@@ -231,7 +278,7 @@ This change is required to support extending WMFont to allow it to handle
|
|||||||
antialiased fonts through the XFree86 Xft2 extension.
|
antialiased fonts through the XFree86 Xft2 extension.
|
||||||
|
|
||||||
This also has the advantage of hiding low level X11 details and use WINGs
|
This also has the advantage of hiding low level X11 details and use WINGs
|
||||||
internat objects instead.
|
internal objects instead.
|
||||||
|
|
||||||
To fix your old code to work with the new WINGs API you need to replace the
|
To fix your old code to work with the new WINGs API you need to replace the
|
||||||
GC passed to WMDraw***String() in your code with a WMColor*.
|
GC passed to WMDraw***String() in your code with a WMColor*.
|
||||||
@@ -298,7 +345,7 @@ WMSendConnectionData() can return 3 values: -1, 0, 1
|
|||||||
|
|
||||||
-1 - means that the connection has died. you should stop sending data and
|
-1 - means that the connection has died. you should stop sending data and
|
||||||
close the connection ASAP.
|
close the connection ASAP.
|
||||||
1 - means that the data was succesfully sent
|
1 - means that the data was successfully sent
|
||||||
0 - means that the data (or part of it) was not sent. however, it was saved
|
0 - means that the data (or part of it) was not sent. however, it was saved
|
||||||
in a queue and the library will try to send it later when possible.
|
in a queue and the library will try to send it later when possible.
|
||||||
|
|
||||||
@@ -307,14 +354,14 @@ on, until the return value of such a send call will be 0.
|
|||||||
After it returns 0 you can continue sending, however, the data will not be
|
After it returns 0 you can continue sending, however, the data will not be
|
||||||
sent over the connection because the operating system cannot accept any more
|
sent over the connection because the operating system cannot accept any more
|
||||||
data for the moment. Instead it will be queued inside the library, making your
|
data for the moment. Instead it will be queued inside the library, making your
|
||||||
program's memory footprint increase. If the ammount of data you need to
|
program's memory footprint increase. If the amount of data you need to
|
||||||
send is limited and not too big, this shouldn't be a problem, because your
|
send is limited and not too big, this shouldn't be a problem, because your
|
||||||
data will be queued and sent when the operating system will notify the
|
data will be queued and sent when the operating system will notify the
|
||||||
library that sending is possible again.
|
library that sending is possible again.
|
||||||
If this is the case you can just ignore the output of WMSendConnectionData()
|
If this is the case you can just ignore the output of WMSendConnectionData()
|
||||||
and not set a callback for canResumeSending.
|
and not set a callback for canResumeSending.
|
||||||
|
|
||||||
However, if the ammount of data you have to send is undetermined and you
|
However, if the amount of data you have to send is undetermined and you
|
||||||
also want to keep a small memory footprint for your program (so that it
|
also want to keep a small memory footprint for your program (so that it
|
||||||
won't grow until it uses all your available memory ;) ), you will have to
|
won't grow until it uses all your available memory ;) ), you will have to
|
||||||
stop sending data over the connection as soon as WMSendConnectionData()
|
stop sending data over the connection as soon as WMSendConnectionData()
|
||||||
|
|||||||
+6
-6
@@ -8,25 +8,25 @@
|
|||||||
kojima@windowmaker.info
|
kojima@windowmaker.info
|
||||||
|
|
||||||
|
|
||||||
WINGs is a small widget set with the N*XTSTEP look and feel. It's API
|
WINGs is a small widget set with the N*XTSTEP look and feel. Its API
|
||||||
is inspired in OpenStep and it's implementation borrows some ideas
|
is inspired in OpenStep and its implementation borrows some ideas
|
||||||
from Tk. It has a reasonable set of widgets, sufficient for building
|
from Tk. It has a reasonable set of widgets, sufficient for building
|
||||||
small applications (like a CDPlayer or hacking something like rxvt). It
|
small applications (like a CDPlayer or hacking something like rxvt). It
|
||||||
also has other functions that are usefull for applications, like a
|
also has other functions that are usefull for applications, like a
|
||||||
User Defaults alike configuration manager and a notification system.
|
User Defaults alike configuration manager and a notification system.
|
||||||
|
|
||||||
The library is limited and it's design is a little sloppy,
|
The library is limited and its design is a little sloppy,
|
||||||
so it's not intended to build large or complex applications, like
|
so it's not intended to build large or complex applications, like
|
||||||
anything more complex than a CDPlayer. GNUstep should be used for such
|
anything more complex than a CDPlayer. GNUstep should be used for such
|
||||||
applications.
|
applications.
|
||||||
|
|
||||||
Since WINGs is written in C and is sort of low-level it is small
|
Since WINGs is written in C and is sort of low-level it is small
|
||||||
and faster than say, Motif or even Athena. Knowing Xlib will help you to
|
and faster than say, Motif or even Athena. Knowing Xlib will help you to
|
||||||
workaround some of it's limitations, although you'll probably be able to
|
workaround some of its limitations, although you'll probably be able to
|
||||||
write something like a trivial tic-tac-toe game without knowing much Xlib.
|
write something like a trivial tic-tac-toe game without knowing much Xlib.
|
||||||
|
|
||||||
Some of it's functions are designed to support the Window Maker window
|
Some of its functions are designed to support the Window Maker window
|
||||||
manager (see http://windowmaker.info) In fact, it's primary role is to
|
manager (see http://windowmaker.info) In fact, its primary role is to
|
||||||
support Window Maker. All other uses of it are just an added bonus.
|
support Window Maker. All other uses of it are just an added bonus.
|
||||||
|
|
||||||
It will help you to understand the API if you read the ApplicationKit
|
It will help you to understand the API if you read the ApplicationKit
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ noinst_PROGRAMS = wtest wmquery wmfile testmywidget
|
|||||||
|
|
||||||
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
LDADD= $(top_builddir)/WINGs/libWINGs.la $(top_builddir)/wrlib/libwraster.la \
|
||||||
$(top_builddir)/WINGs/libWUtil.la \
|
$(top_builddir)/WINGs/libWUtil.la \
|
||||||
@XFTLIBS@ @INTLIBS@ @XLIBS@
|
@XFT_LIBS@ @INTLIBS@ @XLIBS@
|
||||||
|
|
||||||
|
|
||||||
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
testmywidget_SOURCES = testmywidget.c mywidget.c mywidget.h
|
||||||
@@ -17,4 +17,5 @@ wtest_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
|||||||
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
|
EXTRA_DIST = logo.xpm upbtn.xpm wm.html wm.png
|
||||||
|
|
||||||
AM_CPPFLAGS = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
AM_CPPFLAGS = -I$(top_srcdir)/WINGs -I$(top_srcdir)/wrlib -I$(top_srcdir)/src \
|
||||||
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFTFLAGS@ @HEADER_SEARCH_PATH@
|
-DRESOURCE_PATH=\"$(datadir)/WINGs\" @XFT_CFLAGS@ @HEADER_SEARCH_PATH@ \
|
||||||
|
@PANGO_CFLAGS@
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ static W_Class myWidgetClass = 0;
|
|||||||
*/
|
*/
|
||||||
W_Class InitMyWidget(WMScreen * scr)
|
W_Class InitMyWidget(WMScreen * scr)
|
||||||
{
|
{
|
||||||
|
(void)scr;
|
||||||
/* register our widget with WINGs and get our widget class ID */
|
/* register our widget with WINGs and get our widget class ID */
|
||||||
if (!myWidgetClass) {
|
if (!myWidgetClass) {
|
||||||
myWidgetClass = W_RegisterUserWidget();
|
myWidgetClass = W_RegisterUserWidget();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "mywidget.h"
|
#include "mywidget.h"
|
||||||
|
|
||||||
void wAbort()
|
_Noreturn void wAbort(void)
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,14 +19,14 @@
|
|||||||
|
|
||||||
#include "logo.xpm"
|
#include "logo.xpm"
|
||||||
|
|
||||||
void wAbort()
|
_Noreturn void wAbort(void)
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ProgName;
|
char *ProgName;
|
||||||
|
|
||||||
void usage(void)
|
_Noreturn void usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage:\n"
|
"usage:\n"
|
||||||
@@ -53,13 +53,10 @@ int main(int argc, char **argv)
|
|||||||
WMPixmap *pixmap;
|
WMPixmap *pixmap;
|
||||||
WMOpenPanel *oPanel;
|
WMOpenPanel *oPanel;
|
||||||
WMSavePanel *sPanel;
|
WMSavePanel *sPanel;
|
||||||
/* RImage *image; */
|
|
||||||
char *title = NULL;
|
char *title = NULL;
|
||||||
char *initial = "/";
|
char *initial = "/";
|
||||||
int ch;
|
int ch;
|
||||||
int panelType = OPEN_PANEL_TYPE;
|
int panelType = OPEN_PANEL_TYPE;
|
||||||
extern char *optarg;
|
|
||||||
extern int optind;
|
|
||||||
|
|
||||||
if (!dpy) {
|
if (!dpy) {
|
||||||
puts("could not open display");
|
puts("could not open display");
|
||||||
@@ -96,14 +93,14 @@ int main(int argc, char **argv)
|
|||||||
if (panelType == SAVE_PANEL_TYPE) {
|
if (panelType == SAVE_PANEL_TYPE) {
|
||||||
sPanel = WMGetSavePanel(scr);
|
sPanel = WMGetSavePanel(scr);
|
||||||
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
|
if (WMRunModalFilePanelForDirectory(sPanel, NULL, initial,
|
||||||
/*title */ NULL, NULL) == True)
|
title, NULL) == True)
|
||||||
printf("%s\n", WMGetFilePanelFileName(sPanel));
|
printf("%s\n", WMGetFilePanelFileName(sPanel));
|
||||||
else
|
else
|
||||||
printf("\n");
|
printf("\n");
|
||||||
} else {
|
} else {
|
||||||
oPanel = WMGetOpenPanel(scr);
|
oPanel = WMGetOpenPanel(scr);
|
||||||
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
|
if (WMRunModalFilePanelForDirectory(oPanel, NULL, initial,
|
||||||
/*title */ NULL, NULL) == True)
|
title, NULL) == True)
|
||||||
printf("%s\n", WMGetFilePanelFileName(oPanel));
|
printf("%s\n", WMGetFilePanelFileName(oPanel));
|
||||||
else
|
else
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
|||||||
@@ -11,14 +11,14 @@
|
|||||||
|
|
||||||
#include "logo.xpm"
|
#include "logo.xpm"
|
||||||
|
|
||||||
void wAbort()
|
_Noreturn void wAbort(void)
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ProgName;
|
char *ProgName;
|
||||||
|
|
||||||
void usage(void)
|
_Noreturn void usage(void)
|
||||||
{
|
{
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"usage:\n"
|
"usage:\n"
|
||||||
@@ -45,8 +45,6 @@ int main(int argc, char **argv)
|
|||||||
char *initial = NULL;
|
char *initial = NULL;
|
||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
int ch;
|
int ch;
|
||||||
extern char *optarg;
|
|
||||||
extern int optind;
|
|
||||||
|
|
||||||
WMInitializeApplication("WMQuery", &argc, argv);
|
WMInitializeApplication("WMQuery", &argc, argv);
|
||||||
|
|
||||||
|
|||||||
+19
-3
@@ -14,7 +14,7 @@
|
|||||||
* This will be called when the application will be terminated because
|
* This will be called when the application will be terminated because
|
||||||
* of a fatal error (only for memory allocation failures ATM).
|
* of a fatal error (only for memory allocation failures ATM).
|
||||||
*/
|
*/
|
||||||
void wAbort()
|
_Noreturn void wAbort(void)
|
||||||
{
|
{
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
@@ -25,6 +25,7 @@ int windowCount = 0;
|
|||||||
|
|
||||||
void closeAction(WMWidget * self, void *data)
|
void closeAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
|
(void)data;
|
||||||
WMDestroyWidget(self);
|
WMDestroyWidget(self);
|
||||||
windowCount--;
|
windowCount--;
|
||||||
printf("window closed, window count = %d\n", windowCount);
|
printf("window closed, window count = %d\n", windowCount);
|
||||||
@@ -165,10 +166,13 @@ void testBox(WMScreen * scr)
|
|||||||
|
|
||||||
static void singleClick(WMWidget * self, void *data)
|
static void singleClick(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
|
(void)self;
|
||||||
|
(void)data;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void doubleClick(WMWidget * self, void *data)
|
static void doubleClick(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
|
(void)data;
|
||||||
WMSelectAllListItems((WMList *) self);
|
WMSelectAllListItems((WMList *) self);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -480,6 +484,7 @@ void testColorPanel(WMScreen * scr)
|
|||||||
|
|
||||||
void sliderCallback(WMWidget * w, void *data)
|
void sliderCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
|
(void)data;
|
||||||
printf("SLIDER == %i\n", WMGetSliderValue(w));
|
printf("SLIDER == %i\n", WMGetSliderValue(w));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -516,7 +521,7 @@ void testSlider(WMScreen * scr)
|
|||||||
void testTextField(WMScreen * scr)
|
void testTextField(WMScreen * scr)
|
||||||
{
|
{
|
||||||
WMWindow *win;
|
WMWindow *win;
|
||||||
WMTextField *field, *field2;
|
WMTextField *field, *field2, *field3;
|
||||||
|
|
||||||
windowCount++;
|
windowCount++;
|
||||||
|
|
||||||
@@ -535,6 +540,11 @@ void testTextField(WMScreen * scr)
|
|||||||
WMMoveWidget(field2, 20, 50);
|
WMMoveWidget(field2, 20, 50);
|
||||||
WMSetTextFieldAlignment(field2, WARight);
|
WMSetTextFieldAlignment(field2, WARight);
|
||||||
|
|
||||||
|
field3 = WMCreateTextField(win);
|
||||||
|
WMResizeWidget(field3, 200, 20);
|
||||||
|
WMMoveWidget(field3, 20, 80);
|
||||||
|
WMSetTextFieldAlignment(field3, WACenter);
|
||||||
|
|
||||||
WMRealizeWidget(win);
|
WMRealizeWidget(win);
|
||||||
WMMapSubwidgets(win);
|
WMMapSubwidgets(win);
|
||||||
WMMapWidget(win);
|
WMMapWidget(win);
|
||||||
@@ -749,6 +759,8 @@ void testTabView(WMScreen * scr)
|
|||||||
|
|
||||||
void splitViewConstrainProc(WMSplitView * sPtr, int indView, int *minSize, int *maxSize)
|
void splitViewConstrainProc(WMSplitView * sPtr, int indView, int *minSize, int *maxSize)
|
||||||
{
|
{
|
||||||
|
(void)sPtr;
|
||||||
|
|
||||||
switch (indView) {
|
switch (indView) {
|
||||||
case 0:
|
case 0:
|
||||||
*minSize = 20;
|
*minSize = 20;
|
||||||
@@ -782,6 +794,7 @@ static void resizeSplitView(XEvent * event, void *data)
|
|||||||
|
|
||||||
void appendSubviewButtonAction(WMWidget * self, void *data)
|
void appendSubviewButtonAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
|
(void)self;
|
||||||
WMSplitView *sPtr = (WMSplitView *) data;
|
WMSplitView *sPtr = (WMSplitView *) data;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
WMLabel *label = WMCreateLabel(sPtr);
|
WMLabel *label = WMCreateLabel(sPtr);
|
||||||
@@ -796,6 +809,7 @@ void appendSubviewButtonAction(WMWidget * self, void *data)
|
|||||||
|
|
||||||
void removeSubviewButtonAction(WMWidget * self, void *data)
|
void removeSubviewButtonAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
|
(void)self;
|
||||||
WMSplitView *sPtr = (WMSplitView *) data;
|
WMSplitView *sPtr = (WMSplitView *) data;
|
||||||
int count = WMGetSplitViewSubviewsCount(sPtr);
|
int count = WMGetSplitViewSubviewsCount(sPtr);
|
||||||
|
|
||||||
@@ -808,12 +822,14 @@ void removeSubviewButtonAction(WMWidget * self, void *data)
|
|||||||
|
|
||||||
void orientationButtonAction(WMWidget * self, void *data)
|
void orientationButtonAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
|
(void)self;
|
||||||
WMSplitView *sPtr = (WMSplitView *) data;
|
WMSplitView *sPtr = (WMSplitView *) data;
|
||||||
WMSetSplitViewVertical(sPtr, !WMGetSplitViewVertical(sPtr));
|
WMSetSplitViewVertical(sPtr, !WMGetSplitViewVertical(sPtr));
|
||||||
}
|
}
|
||||||
|
|
||||||
void adjustSubviewsButtonAction(WMWidget * self, void *data)
|
void adjustSubviewsButtonAction(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
|
(void)self;
|
||||||
WMAdjustSplitViewSubviews((WMSplitView *) data);
|
WMAdjustSplitViewSubviews((WMSplitView *) data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -902,7 +918,7 @@ void testSplitView(WMScreen * scr)
|
|||||||
WMMapWidget(win);
|
WMMapWidget(win);
|
||||||
}
|
}
|
||||||
|
|
||||||
void testUD()
|
void testUD(void)
|
||||||
{
|
{
|
||||||
WMUserDefaults *defs;
|
WMUserDefaults *defs;
|
||||||
char str[32];
|
char str[32];
|
||||||
|
|||||||
+11
-1
@@ -5,4 +5,14 @@ AUTOMAKE_OPTIONS =
|
|||||||
# is this a kluge? if so, how should i do it?
|
# is this a kluge? if so, how should i do it?
|
||||||
includedir = @includedir@/WINGs
|
includedir = @includedir@/WINGs
|
||||||
|
|
||||||
include_HEADERS = WINGs.h WUtil.h WINGsP.h
|
BUILT_SOURCES = WINGsP.h
|
||||||
|
CLEANFILES = WINGsP.h
|
||||||
|
include_HEADERS = WINGs.h WUtil.h
|
||||||
|
nodist_include_HEADERS = WINGsP.h
|
||||||
|
EXTRA_DIST = WINGsP.h.in
|
||||||
|
|
||||||
|
WINGsP.h: WINGsP.h.in $(top_builddir)/config.h
|
||||||
|
$(AM_V_GEN)$(top_srcdir)/script/replace-ac-keywords.sh \
|
||||||
|
--header "$(top_builddir)/config.h" \
|
||||||
|
--filter "USE_PANGO" \
|
||||||
|
-o $@ $<
|
||||||
|
|||||||
+40
-17
@@ -26,7 +26,7 @@
|
|||||||
#include <WINGs/WUtil.h>
|
#include <WINGs/WUtil.h>
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
#define WINGS_H_VERSION 20140612
|
#define WINGS_H_VERSION 20230226
|
||||||
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
@@ -127,7 +127,8 @@ typedef enum {
|
|||||||
WBTRadio = 5,
|
WBTRadio = 5,
|
||||||
WBTMomentaryChange = 6,
|
WBTMomentaryChange = 6,
|
||||||
WBTOnOff = 7,
|
WBTOnOff = 7,
|
||||||
WBTMomentaryLight = 8
|
WBTMomentaryLight = 8,
|
||||||
|
WBTTriState = 9
|
||||||
} WMButtonType;
|
} WMButtonType;
|
||||||
|
|
||||||
/* button behaviour masks */
|
/* button behaviour masks */
|
||||||
@@ -735,7 +736,7 @@ Bool WMRequestSelection(WMView *view, Atom selection, Atom target,
|
|||||||
void *cdata);
|
void *cdata);
|
||||||
|
|
||||||
|
|
||||||
extern char *WMSelectionOwnerDidChangeNotification;
|
extern const char *WMSelectionOwnerDidChangeNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/dragcommon.c ]---------------------------------------------- */
|
/* ---[ WINGs/dragcommon.c ]---------------------------------------------- */
|
||||||
|
|
||||||
@@ -794,6 +795,8 @@ char* WMGetFontName(WMFont *font);
|
|||||||
|
|
||||||
unsigned int WMFontHeight(WMFont *font);
|
unsigned int WMFontHeight(WMFont *font);
|
||||||
|
|
||||||
|
void WMGetScaleBaseFromSystemFont(WMScreen *scrPtr, int *alphabetWidth, int *fontHeight);
|
||||||
|
|
||||||
void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font);
|
void WMSetWidgetDefaultFont(WMScreen *scr, WMFont *font);
|
||||||
|
|
||||||
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
|
void WMSetWidgetDefaultBoldFont(WMScreen *scr, WMFont *font);
|
||||||
@@ -930,6 +933,10 @@ void WMSetWidgetBackgroundColor(WMWidget *w, WMColor *color);
|
|||||||
|
|
||||||
WMColor* WMGetWidgetBackgroundColor(WMWidget *w);
|
WMColor* WMGetWidgetBackgroundColor(WMWidget *w);
|
||||||
|
|
||||||
|
void WMSetWidgetBackgroundPixmap(WMWidget *w, WMPixmap *pix);
|
||||||
|
|
||||||
|
WMPixmap *WMGetWidgetBackgroundPixmap(WMWidget *w);
|
||||||
|
|
||||||
void WMMapSubwidgets(WMWidget *w);
|
void WMMapSubwidgets(WMWidget *w);
|
||||||
|
|
||||||
void WMUnmapSubwidgets(WMWidget *w);
|
void WMUnmapSubwidgets(WMWidget *w);
|
||||||
@@ -970,11 +977,11 @@ WMPoint WMGetViewScreenPosition(WMView *view);
|
|||||||
WMWidget* WMWidgetOfView(WMView *view);
|
WMWidget* WMWidgetOfView(WMView *view);
|
||||||
|
|
||||||
/* notifications */
|
/* notifications */
|
||||||
extern char *WMViewSizeDidChangeNotification;
|
extern const char *WMViewSizeDidChangeNotification;
|
||||||
|
|
||||||
extern char *WMViewFocusDidChangeNotification;
|
extern const char *WMViewFocusDidChangeNotification;
|
||||||
|
|
||||||
extern char *WMViewRealizedNotification;
|
extern const char *WMViewRealizedNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wballoon.c ]------------------------------------------------ */
|
/* ---[ WINGs/wballoon.c ]------------------------------------------------ */
|
||||||
|
|
||||||
@@ -1069,6 +1076,9 @@ void WMSetButtonTextAlignment(WMButton *bPtr, WMAlignment alignment);
|
|||||||
|
|
||||||
void WMSetButtonText(WMButton *bPtr, const char *text);
|
void WMSetButtonText(WMButton *bPtr, const char *text);
|
||||||
|
|
||||||
|
/* Returns direct pointer to internal data, do not modify! */
|
||||||
|
const char *WMGetButtonText(WMButton *bPtr);
|
||||||
|
|
||||||
void WMSetButtonAltText(WMButton *bPtr, const char *text);
|
void WMSetButtonAltText(WMButton *bPtr, const char *text);
|
||||||
|
|
||||||
void WMSetButtonTextColor(WMButton *bPtr, WMColor *color);
|
void WMSetButtonTextColor(WMButton *bPtr, WMColor *color);
|
||||||
@@ -1180,9 +1190,9 @@ void WMSetTextFieldDelegate(WMTextField *tPtr, WMTextFieldDelegate *delegate);
|
|||||||
|
|
||||||
WMTextFieldDelegate* WMGetTextFieldDelegate(WMTextField *tPtr);
|
WMTextFieldDelegate* WMGetTextFieldDelegate(WMTextField *tPtr);
|
||||||
|
|
||||||
extern char *WMTextDidChangeNotification;
|
extern const char *WMTextDidChangeNotification;
|
||||||
extern char *WMTextDidBeginEditingNotification;
|
extern const char *WMTextDidBeginEditingNotification;
|
||||||
extern char *WMTextDidEndEditingNotification;
|
extern const char *WMTextDidEndEditingNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wscroller.c ]----------------------------------------------- */
|
/* ---[ WINGs/wscroller.c ]----------------------------------------------- */
|
||||||
|
|
||||||
@@ -1202,7 +1212,7 @@ void WMSetScrollerAction(WMScroller *sPtr, WMAction *action, void *clientData);
|
|||||||
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
void WMSetScrollerArrowsPosition(WMScroller *sPtr,
|
||||||
WMScrollArrowPosition position);
|
WMScrollArrowPosition position);
|
||||||
|
|
||||||
extern char *WMScrollerDidScrollNotification;
|
extern const char *WMScrollerDidScrollNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wlist.c ]--------------------------------------------------- */
|
/* ---[ WINGs/wlist.c ]--------------------------------------------------- */
|
||||||
|
|
||||||
@@ -1281,8 +1291,8 @@ Bool WMListAllowsMultipleSelection(WMList *lPtr);
|
|||||||
Bool WMListAllowsEmptySelection(WMList *lPtr);
|
Bool WMListAllowsEmptySelection(WMList *lPtr);
|
||||||
|
|
||||||
|
|
||||||
extern char *WMListDidScrollNotification;
|
extern const char *WMListDidScrollNotification;
|
||||||
extern char *WMListSelectionDidChangeNotification;
|
extern const char *WMListSelectionDidChangeNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wbrowser.c ]------------------------------------------------ */
|
/* ---[ WINGs/wbrowser.c ]------------------------------------------------ */
|
||||||
|
|
||||||
@@ -1314,7 +1324,7 @@ void WMSortBrowserColumnWithComparer(WMBrowser *bPtr, int column,
|
|||||||
WMCompareDataProc *func);
|
WMCompareDataProc *func);
|
||||||
|
|
||||||
/* Don't free the returned string. */
|
/* Don't free the returned string. */
|
||||||
char* WMSetBrowserPath(WMBrowser *bPtr, char *path);
|
const char* WMSetBrowserPath(WMBrowser *bPtr, const char *path);
|
||||||
|
|
||||||
/* free the returned string */
|
/* free the returned string */
|
||||||
char* WMGetBrowserPath(WMBrowser *bPtr);
|
char* WMGetBrowserPath(WMBrowser *bPtr);
|
||||||
@@ -1452,6 +1462,10 @@ void WMSetPopUpButtonEnabled(WMPopUpButton *bPtr, Bool flag);
|
|||||||
|
|
||||||
Bool WMGetPopUpButtonEnabled(WMPopUpButton *bPtr);
|
Bool WMGetPopUpButtonEnabled(WMPopUpButton *bPtr);
|
||||||
|
|
||||||
|
int WMSelectPopUpButtonPreviousItem(WMPopUpButton *bPtr);
|
||||||
|
|
||||||
|
int WMSelectPopUpButtonNextItem(WMPopUpButton *bPtr);
|
||||||
|
|
||||||
/* ---[ WINGs/wprogressindicator.c ]------------------------------------- */
|
/* ---[ WINGs/wprogressindicator.c ]------------------------------------- */
|
||||||
|
|
||||||
WMProgressIndicator* WMCreateProgressIndicator(WMWidget *parent);
|
WMProgressIndicator* WMCreateProgressIndicator(WMWidget *parent);
|
||||||
@@ -1486,7 +1500,7 @@ void WMSetColorPanelPickerMode(WMColorPanel *panel, WMColorPanelMode mode);
|
|||||||
|
|
||||||
void WMSetColorPanelAction(WMColorPanel *panel, WMAction2 *action, void *data);
|
void WMSetColorPanelAction(WMColorPanel *panel, WMAction2 *action, void *data);
|
||||||
|
|
||||||
extern char *WMColorPanelColorChangedNotification;
|
extern const char *WMColorPanelColorChangedNotification;
|
||||||
|
|
||||||
/* ---[ WINGs/wcolorwell.c ]---------------------------------------------- */
|
/* ---[ WINGs/wcolorwell.c ]---------------------------------------------- */
|
||||||
|
|
||||||
@@ -1499,7 +1513,7 @@ WMColor* WMGetColorWellColor(WMColorWell *cPtr);
|
|||||||
void WSetColorWellBordered(WMColorWell *cPtr, Bool flag);
|
void WSetColorWellBordered(WMColorWell *cPtr, Bool flag);
|
||||||
|
|
||||||
|
|
||||||
extern char *WMColorWellDidChangeNotification;
|
extern const char *WMColorWellDidChangeNotification;
|
||||||
|
|
||||||
|
|
||||||
/* ---[ WINGs/wscrollview.c ]--------------------------------------------- */
|
/* ---[ WINGs/wscrollview.c ]--------------------------------------------- */
|
||||||
@@ -1519,6 +1533,8 @@ void WMSetScrollViewRelief(WMScrollView *sPtr, WMReliefType type);
|
|||||||
|
|
||||||
WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr);
|
WMRect WMGetScrollViewVisibleRect(WMScrollView *sPtr);
|
||||||
|
|
||||||
|
void WMScrollViewScrollPoint(WMScrollView * sPtr, WMPoint point);
|
||||||
|
|
||||||
WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr);
|
WMScroller* WMGetScrollViewHorizontalScroller(WMScrollView *sPtr);
|
||||||
|
|
||||||
WMScroller* WMGetScrollViewVerticalScroller(WMScrollView *sPtr);
|
WMScroller* WMGetScrollViewVerticalScroller(WMScrollView *sPtr);
|
||||||
@@ -1831,10 +1847,17 @@ WMAlertPanel* WMCreateAlertPanel(WMScreen *app, WMWindow *owner, const char *tit
|
|||||||
const char *msg, const char *defaultButton,
|
const char *msg, const char *defaultButton,
|
||||||
const char *alternateButton, const char *otherButton);
|
const char *alternateButton, const char *otherButton);
|
||||||
|
|
||||||
|
WMAlertPanel* WMCreateScaledAlertPanel(WMScreen *app, WMWindow *owner, const char *title,
|
||||||
|
const char *msg, const char *defaultButton,
|
||||||
|
const char *alternateButton, const char *otherButton);
|
||||||
|
|
||||||
WMInputPanel* WMCreateInputPanel(WMScreen *app, WMWindow *owner, const char *title,
|
WMInputPanel* WMCreateInputPanel(WMScreen *app, WMWindow *owner, const char *title,
|
||||||
const char *msg, const char *defaultText, const char *okButton,
|
const char *msg, const char *defaultText, const char *okButton,
|
||||||
const char *cancelButton);
|
const char *cancelButton);
|
||||||
|
|
||||||
|
WMInputPanel* WMCreateScaledInputPanel(WMScreen *app, WMWindow *owner, const char *title,
|
||||||
|
const char *msg, const char *defaultText, const char *okButton,
|
||||||
|
const char *cancelButton);
|
||||||
|
|
||||||
WMGenericPanel* WMCreateGenericPanel(WMScreen *scrPtr, WMWindow *owner,
|
WMGenericPanel* WMCreateGenericPanel(WMScreen *scrPtr, WMWindow *owner,
|
||||||
const char *title, const char *defaultButton,
|
const char *title, const char *defaultButton,
|
||||||
@@ -1859,7 +1882,7 @@ void WMSetFilePanelCanChooseFiles(WMFilePanel *panel, Bool flag);
|
|||||||
|
|
||||||
void WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag);
|
void WMSetFilePanelAutoCompletion(WMFilePanel *panel, Bool flag);
|
||||||
|
|
||||||
void WMSetFilePanelDirectory(WMFilePanel *panel, char *path);
|
void WMSetFilePanelDirectory(WMFilePanel *panel, const char *path);
|
||||||
|
|
||||||
/* you can free the returned string */
|
/* you can free the returned string */
|
||||||
char* WMGetFilePanelFileName(WMFilePanel *panel);
|
char* WMGetFilePanelFileName(WMFilePanel *panel);
|
||||||
@@ -1867,7 +1890,7 @@ char* WMGetFilePanelFileName(WMFilePanel *panel);
|
|||||||
void WMFreeFilePanel(WMFilePanel *panel);
|
void WMFreeFilePanel(WMFilePanel *panel);
|
||||||
|
|
||||||
int WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
|
int WMRunModalFilePanelForDirectory(WMFilePanel *panel, WMWindow *owner,
|
||||||
char *path, const char *name, char **fileTypes);
|
const char *path, const char *name, char **fileTypes);
|
||||||
|
|
||||||
void WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view);
|
void WMSetFilePanelAccessoryView(WMFilePanel *panel, WMView *view);
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
#include <X11/Xutil.h>
|
#include <X11/Xutil.h>
|
||||||
|
|
||||||
|
@USE_PANGO@#include <pango/pango.h>
|
||||||
|
|
||||||
#include <WINGs/WINGs.h>
|
#include <WINGs/WINGs.h>
|
||||||
|
|
||||||
@@ -40,7 +41,7 @@ typedef struct _WINGsConfiguration {
|
|||||||
unsigned mouseWheelDown;
|
unsigned mouseWheelDown;
|
||||||
} _WINGsConfiguration;
|
} _WINGsConfiguration;
|
||||||
|
|
||||||
extern char *_WINGS_progname;
|
extern const char *_WINGS_progname;
|
||||||
extern _WINGsConfiguration WINGsConfiguration;
|
extern _WINGsConfiguration WINGsConfiguration;
|
||||||
extern struct W_Application WMApplication;
|
extern struct W_Application WMApplication;
|
||||||
|
|
||||||
@@ -265,6 +266,16 @@ typedef struct W_Screen {
|
|||||||
struct W_View *modalView;
|
struct W_View *modalView;
|
||||||
unsigned modalLoop:1;
|
unsigned modalLoop:1;
|
||||||
unsigned ignoreNextDoubleClick:1;
|
unsigned ignoreNextDoubleClick:1;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* New stuff in Window Maker 0.95.7
|
||||||
|
* Added at the end of the structure to avoid breaking binary compatibility
|
||||||
|
* with previous versions of the toolkit
|
||||||
|
*/
|
||||||
|
W_Pixmap *tristateButtonImageOn;
|
||||||
|
W_Pixmap *tristateButtonImageOff;
|
||||||
|
W_Pixmap *tristateButtonImageTri;
|
||||||
|
|
||||||
} W_Screen;
|
} W_Screen;
|
||||||
|
|
||||||
#define W_DRAWABLE(scr) (scr)->rcontext->drawable
|
#define W_DRAWABLE(scr) (scr)->rcontext->drawable
|
||||||
@@ -445,6 +456,8 @@ typedef struct W_Font {
|
|||||||
short y;
|
short y;
|
||||||
short refCount;
|
short refCount;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
|
@USE_PANGO@ PangoLayout *layout;
|
||||||
} W_Font;
|
} W_Font;
|
||||||
|
|
||||||
#define W_FONTID(f) (f)->font->fid
|
#define W_FONTID(f) (f)->font->fid
|
||||||
@@ -481,6 +494,8 @@ void W_SetPreeditPositon(W_View *view, int x, int y);
|
|||||||
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
|
int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer,
|
||||||
int buflen, KeySym *keysym, Status *status);
|
int buflen, KeySym *keysym, Status *status);
|
||||||
|
|
||||||
|
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index);
|
||||||
|
|
||||||
|
|
||||||
/* ---[ wmisc.c ]--------------------------------------------------------- */
|
/* ---[ wmisc.c ]--------------------------------------------------------- */
|
||||||
|
|
||||||
@@ -565,6 +580,8 @@ struct W_View {
|
|||||||
void *hangedData; /* data holder for user program */
|
void *hangedData; /* data holder for user program */
|
||||||
|
|
||||||
WMColor *backColor;
|
WMColor *backColor;
|
||||||
|
WMPixmap *backImage;
|
||||||
|
|
||||||
|
|
||||||
Cursor cursor;
|
Cursor cursor;
|
||||||
|
|
||||||
@@ -657,6 +674,8 @@ void W_ResizeView(W_View *view, unsigned int width, unsigned int height);
|
|||||||
|
|
||||||
void W_SetViewBackgroundColor(W_View *view, WMColor *color);
|
void W_SetViewBackgroundColor(W_View *view, WMColor *color);
|
||||||
|
|
||||||
|
void W_SetViewBackgroundPixmap(W_View *view, WMPixmap *pix);
|
||||||
|
|
||||||
void W_SetViewCursor(W_View *view, Cursor cursor);
|
void W_SetViewCursor(W_View *view, Cursor cursor);
|
||||||
|
|
||||||
void W_SetFocusOfTopLevel(W_View *toplevel, W_View *view);
|
void W_SetFocusOfTopLevel(W_View *toplevel, W_View *view);
|
||||||
+12
-1
@@ -193,6 +193,16 @@ typedef void WMNotificationObserverAction(void *observerData,
|
|||||||
sizeof(array) / sizeof(array[0]); \
|
sizeof(array) / sizeof(array[0]); \
|
||||||
})
|
})
|
||||||
|
|
||||||
|
/* These macros can be used to adjust the location and size pixel values in
|
||||||
|
* the panel layouts so that they match the configured size of the system
|
||||||
|
* font (useful with high DPI screens, where you have to increase this size).
|
||||||
|
* The macros require two local variables to be set:
|
||||||
|
* wmScaleWidth: the width of the alphabet in the current system font
|
||||||
|
* wmScaleHeight: the height of the current system font
|
||||||
|
* Use the WMGetScaleBaseFromSystemFont function to set these values.
|
||||||
|
*/
|
||||||
|
#define WMScaleX(value) ((int)((double)value / 177.0 * (double)wmScaleWidth + 0.5))
|
||||||
|
#define WMScaleY(value) ((int)((double)value / 15.0 * (double)wmScaleHeight + 0.5))
|
||||||
|
|
||||||
/* ---[ WINGs/memory.c ]-------------------------------------------------- */
|
/* ---[ WINGs/memory.c ]-------------------------------------------------- */
|
||||||
|
|
||||||
@@ -239,7 +249,7 @@ char* wexpandpath(const char *path);
|
|||||||
int wcopy_file(const char *toPath, const char *srcFile, const char *destFile);
|
int wcopy_file(const char *toPath, const char *srcFile, const char *destFile);
|
||||||
|
|
||||||
/* don't free the returned string */
|
/* don't free the returned string */
|
||||||
char* wgethomedir(void);
|
const char* wgethomedir(void);
|
||||||
|
|
||||||
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
|
/* ---[ WINGs/proplist.c ]------------------------------------------------ */
|
||||||
|
|
||||||
@@ -854,6 +864,7 @@ Bool WMWritePropListToFile(WMPropList *plist, const char *path);
|
|||||||
|
|
||||||
/* don't free the returned string */
|
/* don't free the returned string */
|
||||||
const char* wusergnusteppath(void);
|
const char* wusergnusteppath(void);
|
||||||
|
const char* wuserdatapath(void);
|
||||||
|
|
||||||
/* Free the returned string when you no longer need it */
|
/* Free the returned string when you no longer need it */
|
||||||
char* wdefaultspathfordomain(const char *domain);
|
char* wdefaultspathfordomain(const char *domain);
|
||||||
|
|||||||
+6
-6
@@ -126,11 +126,11 @@ void WMAddToArray(WMArray * array, void *item)
|
|||||||
|
|
||||||
void WMInsertInArray(WMArray * array, int index, void *item)
|
void WMInsertInArray(WMArray * array, int index, void *item)
|
||||||
{
|
{
|
||||||
wassertr(array && index >= 0 && index <= array->itemCount);
|
|
||||||
|
|
||||||
if (array == NULL)
|
if (array == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
wassertr(index >= 0 && index <= array->itemCount);
|
||||||
|
|
||||||
if (array->itemCount >= array->allocSize) {
|
if (array->itemCount >= array->allocSize) {
|
||||||
array->allocSize += RESIZE_INCREMENT;
|
array->allocSize += RESIZE_INCREMENT;
|
||||||
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
|
array->items = wrealloc(array->items, sizeof(void *) * array->allocSize);
|
||||||
@@ -148,11 +148,11 @@ void *WMReplaceInArray(WMArray * array, int index, void *item)
|
|||||||
{
|
{
|
||||||
void *old;
|
void *old;
|
||||||
|
|
||||||
wassertrv(array && index >= 0 && index <= array->itemCount, NULL);
|
|
||||||
|
|
||||||
if (array == NULL)
|
if (array == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
wassertrv(index >= 0 && index <= array->itemCount, NULL);
|
||||||
|
|
||||||
/* is it really useful to perform append if index == array->itemCount ? -Dan */
|
/* is it really useful to perform append if index == array->itemCount ? -Dan */
|
||||||
if (index == array->itemCount) {
|
if (index == array->itemCount) {
|
||||||
WMAddToArray(array, item);
|
WMAddToArray(array, item);
|
||||||
@@ -167,11 +167,11 @@ void *WMReplaceInArray(WMArray * array, int index, void *item)
|
|||||||
|
|
||||||
int WMDeleteFromArray(WMArray * array, int index)
|
int WMDeleteFromArray(WMArray * array, int index)
|
||||||
{
|
{
|
||||||
wassertrv(array && index >= 0 && index < array->itemCount, 0);
|
|
||||||
|
|
||||||
if (array == NULL)
|
if (array == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
wassertrv(index >= 0 && index < array->itemCount, 0);
|
||||||
|
|
||||||
if (array->destructor) {
|
if (array->destructor) {
|
||||||
array->destructor(array->items[index]);
|
array->destructor(array->items[index]);
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-29
@@ -420,10 +420,8 @@ void WMInsertInBag(WMBag * self, int index, void *item)
|
|||||||
self->count++;
|
self->count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
int WMRemoveFromBag(WMBag * self, void *item)
|
static int treeDeleteNode(WMBag * self, W_Node *ptr)
|
||||||
{
|
{
|
||||||
W_Node *ptr = treeFind(self->root, self->nil, item);
|
|
||||||
|
|
||||||
if (ptr != self->nil) {
|
if (ptr != self->nil) {
|
||||||
W_Node *tmp;
|
W_Node *tmp;
|
||||||
|
|
||||||
@@ -439,11 +437,15 @@ int WMRemoveFromBag(WMBag * self, void *item)
|
|||||||
if (self->destructor)
|
if (self->destructor)
|
||||||
self->destructor(ptr->data);
|
self->destructor(ptr->data);
|
||||||
wfree(ptr);
|
wfree(ptr);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int WMRemoveFromBag(WMBag * self, void *item)
|
||||||
|
{
|
||||||
|
W_Node *ptr = treeFind(self->root, self->nil, item);
|
||||||
|
return treeDeleteNode(self, ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
int WMEraseFromBag(WMBag * self, int index)
|
int WMEraseFromBag(WMBag * self, int index)
|
||||||
@@ -470,29 +472,7 @@ int WMEraseFromBag(WMBag * self, int index)
|
|||||||
int WMDeleteFromBag(WMBag * self, int index)
|
int WMDeleteFromBag(WMBag * self, int index)
|
||||||
{
|
{
|
||||||
W_Node *ptr = treeSearch(self->root, self->nil, index);
|
W_Node *ptr = treeSearch(self->root, self->nil, index);
|
||||||
|
return treeDeleteNode(self, ptr);
|
||||||
if (ptr != self->nil) {
|
|
||||||
W_Node *tmp;
|
|
||||||
|
|
||||||
self->count--;
|
|
||||||
|
|
||||||
tmp = treeSuccessor(ptr, self->nil);
|
|
||||||
while (tmp != self->nil) {
|
|
||||||
tmp->index--;
|
|
||||||
tmp = treeSuccessor(tmp, self->nil);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr = rbTreeDelete(self, ptr);
|
|
||||||
if (self->destructor)
|
|
||||||
self->destructor(ptr->data);
|
|
||||||
wfree(ptr);
|
|
||||||
|
|
||||||
wassertrv(self->count == 0 || self->root->index >= 0, 1);
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
} else {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void *WMGetFromBag(WMBag * self, int index)
|
void *WMGetFromBag(WMBag * self, int index)
|
||||||
|
|||||||
+4
-3
@@ -1,3 +1,4 @@
|
|||||||
|
#include "wconfig.h"
|
||||||
|
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
|
||||||
@@ -56,7 +57,7 @@ WMDragOperationType W_ActionToOperation(WMScreen * scr, Atom action)
|
|||||||
} else {
|
} else {
|
||||||
char *tmp = XGetAtomName(scr->display, action);
|
char *tmp = XGetAtomName(scr->display, action);
|
||||||
|
|
||||||
wwarning("unknown XDND action %s ", tmp);
|
wwarning(_("unknown XDND action %s"), tmp);
|
||||||
XFree(tmp);
|
XFree(tmp);
|
||||||
|
|
||||||
return WDOperationCopy;
|
return WDOperationCopy;
|
||||||
@@ -138,7 +139,7 @@ W_SendDnDClientMessage(Display * dpy, Window win, Atom message,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!windowExists(dpy, win)) {
|
if (!windowExists(dpy, win)) {
|
||||||
wwarning("xdnd message target %lu does no longer exist.", win);
|
wwarning(_("target %lu for XDND message no longer exists"), win);
|
||||||
return False; /* message not sent */
|
return False; /* message not sent */
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,7 +217,7 @@ void W_HandleDNDClientMessage(WMView * toplevel, XClientMessageEvent * event)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
wwarning("received dnd enter msg with unsupported version %i", XDND_SOURCE_VERSION(info));
|
wwarning(_("unsupported version %i for XDND enter message"), XDND_SOURCE_VERSION(info));
|
||||||
W_DragDestinationCancelDropOnEnter(toplevel, info);
|
W_DragDestinationCancelDropOnEnter(toplevel, info);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,9 +19,7 @@
|
|||||||
#define XDND_REQUIRED_TYPES(dragInfo) dragInfo->destInfo->requiredTypes
|
#define XDND_REQUIRED_TYPES(dragInfo) dragInfo->destInfo->requiredTypes
|
||||||
#define XDND_SOURCE_ACTION(dragInfo) dragInfo->sourceAction
|
#define XDND_SOURCE_ACTION(dragInfo) dragInfo->sourceAction
|
||||||
#define XDND_DEST_ACTION(dragInfo) dragInfo->destinationAction
|
#define XDND_DEST_ACTION(dragInfo) dragInfo->destinationAction
|
||||||
#define XDND_SOURCE_OPERATIONS(dragInfo) dragInfo->destInfo->sourceOperations
|
|
||||||
#define XDND_DROP_DATAS(dragInfo) dragInfo->destInfo->dropDatas
|
#define XDND_DROP_DATAS(dragInfo) dragInfo->destInfo->dropDatas
|
||||||
#define XDND_DROP_DATA_COUNT(dragInfo) dragInfo->destInfo->dropDataCount
|
|
||||||
#define XDND_DEST_VIEW_IS_REGISTERED(dragInfo) ((dragInfo->destInfo) != NULL)\
|
#define XDND_DEST_VIEW_IS_REGISTERED(dragInfo) ((dragInfo->destInfo) != NULL)\
|
||||||
&& ((dragInfo->destInfo->destView->dragDestinationProcs) != NULL)
|
&& ((dragInfo->destInfo->destView->dragDestinationProcs) != NULL)
|
||||||
|
|
||||||
@@ -601,7 +599,7 @@ static void dragSourceResponseTimeOut(void *destView)
|
|||||||
W_DragDestinationInfoClear(info);
|
W_DragDestinationInfoClear(info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void W_DragDestinationStopTimer()
|
void W_DragDestinationStopTimer(void)
|
||||||
{
|
{
|
||||||
if (dndDestinationTimer != NULL) {
|
if (dndDestinationTimer != NULL) {
|
||||||
WMDeleteTimerHandler(dndDestinationTimer);
|
WMDeleteTimerHandler(dndDestinationTimer);
|
||||||
|
|||||||
+5
-5
@@ -160,7 +160,7 @@ static void selectionLost(WMView * view, Atom selection, void *cdata)
|
|||||||
(void) selection;
|
(void) selection;
|
||||||
(void) cdata;
|
(void) cdata;
|
||||||
|
|
||||||
wwarning("DND selection lost during drag operation...");
|
wwarning(_("XDND selection lost during drag operation..."));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void selectionDone(WMView * view, Atom selection, Atom target, void *cdata)
|
static void selectionDone(WMView * view, Atom selection, Atom target, void *cdata)
|
||||||
@@ -755,7 +755,7 @@ static void storeDestinationProtocolVersion(WMDraggingInfo * info)
|
|||||||
XFree(winXdndVersion);
|
XFree(winXdndVersion);
|
||||||
} else {
|
} else {
|
||||||
XDND_DEST_VERSION(info) = 0;
|
XDND_DEST_VERSION(info) = 0;
|
||||||
wwarning("failed to read XDND version of drop target");
|
wwarning(_("could not get XDND version for target of drop"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -771,7 +771,7 @@ static void initMotionProcess(WMView * view, WMDraggingInfo * info, XEvent * eve
|
|||||||
XDND_TIMESTAMP(info) = event->xmotion.time;
|
XDND_TIMESTAMP(info) = event->xmotion.time;
|
||||||
|
|
||||||
if (!WMCreateSelectionHandler(view, scr->xdndSelectionAtom, CurrentTime, XDND_SELECTION_PROCS(info), NULL)) {
|
if (!WMCreateSelectionHandler(view, scr->xdndSelectionAtom, CurrentTime, XDND_SELECTION_PROCS(info), NULL)) {
|
||||||
wwarning("could not get ownership or DND selection");
|
wwarning(_("could not get ownership of XDND selection"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1067,7 +1067,7 @@ static void dragSourceResponseTimeOut(void *source)
|
|||||||
WMView *view = (WMView *) source;
|
WMView *view = (WMView *) source;
|
||||||
WMDraggingInfo *info = &(W_VIEW_SCREEN(view)->dragInfo);
|
WMDraggingInfo *info = &(W_VIEW_SCREEN(view)->dragInfo);
|
||||||
|
|
||||||
wwarning("delay for drag destination response expired");
|
wwarning(_("delay for drag destination response expired"));
|
||||||
sendLeaveMessage(info);
|
sendLeaveMessage(info);
|
||||||
|
|
||||||
recolorCursor(info, False);
|
recolorCursor(info, False);
|
||||||
@@ -1080,7 +1080,7 @@ static void dragSourceResponseTimeOut(void *source)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void W_DragSourceStopTimer()
|
void W_DragSourceStopTimer(void)
|
||||||
{
|
{
|
||||||
if (dndSourceTimer != NULL) {
|
if (dndSourceTimer != NULL) {
|
||||||
WMDeleteTimerHandler(dndSourceTimer);
|
WMDeleteTimerHandler(dndSourceTimer);
|
||||||
|
|||||||
+90
-48
@@ -23,7 +23,9 @@
|
|||||||
|
|
||||||
#include "WUtil.h"
|
#include "WUtil.h"
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
#include <fcntl.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -37,7 +39,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
char *wgethomedir()
|
const char *wgethomedir(void)
|
||||||
{
|
{
|
||||||
static char *home = NULL;
|
static char *home = NULL;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
@@ -46,11 +48,7 @@ char *wgethomedir()
|
|||||||
if (home)
|
if (home)
|
||||||
return home;
|
return home;
|
||||||
|
|
||||||
#ifdef HAVE_SECURE_GETENV
|
tmp = GETENV("HOME");
|
||||||
tmp = secure_getenv("HOME");
|
|
||||||
#else
|
|
||||||
tmp = getenv("HOME");
|
|
||||||
#endif
|
|
||||||
if (tmp) {
|
if (tmp) {
|
||||||
home = wstrdup(tmp);
|
home = wstrdup(tmp);
|
||||||
return home;
|
return home;
|
||||||
@@ -422,60 +420,104 @@ char *wfindfileinarray(WMPropList *array, const char *file)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wcopy_file(const char *dir, const char *src_file, const char *dest_file)
|
int wcopy_file(const char *dest_dir, const char *src_file, const char *dest_file)
|
||||||
{
|
{
|
||||||
FILE *src, *dst;
|
char *path_dst;
|
||||||
size_t nread, nwritten;
|
int fd_src, fd_dst;
|
||||||
char *dstpath;
|
struct stat stat_src;
|
||||||
struct stat st;
|
mode_t permission_dst;
|
||||||
char buf[4096];
|
const size_t buffer_size = 2 * 1024 * 1024; /* 4MB is a decent start choice to allow the OS to take advantage of modern disk's performance */
|
||||||
|
char *buffer; /* The buffer is not created on the stack to avoid possible stack overflow as our buffer is big */
|
||||||
|
|
||||||
/* only to a directory */
|
try_again_src:
|
||||||
if (stat(dir, &st) != 0 || !S_ISDIR(st.st_mode))
|
fd_src = open(src_file, O_RDONLY | O_NOFOLLOW);
|
||||||
return -1;
|
if (fd_src == -1) {
|
||||||
/* only copy files */
|
if (errno == EINTR)
|
||||||
if (stat(src_file, &st) != 0 || !S_ISREG(st.st_mode))
|
goto try_again_src;
|
||||||
return -1;
|
werror(_("Could not open input file \"%s\": %s"), src_file, strerror(errno));
|
||||||
|
|
||||||
do {
|
|
||||||
src = fopen(src_file, "rb");
|
|
||||||
} while ((src == NULL) && (errno == EINTR));
|
|
||||||
if (src == NULL) {
|
|
||||||
werror(_("Could not open input file \"%s\""), src_file);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dstpath = wstrconcat(dir, dest_file);
|
/* Only accept to copy regular files */
|
||||||
do {
|
if (fstat(fd_src, &stat_src) != 0 || !S_ISREG(stat_src.st_mode)) {
|
||||||
dst = fopen(dstpath, "wb");
|
close(fd_src);
|
||||||
} while ((dst == NULL) && (errno == EINTR));
|
|
||||||
if (dst == NULL) {
|
|
||||||
werror(_("Could not create target file \"%s\""), dstpath);
|
|
||||||
wfree(dstpath);
|
|
||||||
fclose(src);
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
path_dst = wstrconcat(dest_dir, dest_file);
|
||||||
nread = fread(buf, 1, sizeof(buf), src);
|
try_again_dst:
|
||||||
if (ferror(src))
|
fd_dst = open(path_dst, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IWUSR);
|
||||||
break;
|
if (fd_dst == -1) {
|
||||||
|
if (errno == EINTR)
|
||||||
|
goto try_again_dst;
|
||||||
|
werror(_("Could not create target file \"%s\": %s"), path_dst, strerror(errno));
|
||||||
|
wfree(path_dst);
|
||||||
|
close(fd_src);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
nwritten = fwrite(buf, 1, nread, dst);
|
buffer = malloc(buffer_size); /* Don't use wmalloc to avoid the memset(0) we don't need */
|
||||||
if (ferror(dst) || feof(src) || nread != nwritten)
|
if (buffer == NULL) {
|
||||||
break;
|
werror(_("could not allocate memory for the copy buffer"));
|
||||||
|
close(fd_dst);
|
||||||
|
goto cleanup_and_return_failure;
|
||||||
|
}
|
||||||
|
|
||||||
} while (1);
|
for (;;) {
|
||||||
|
ssize_t size_data;
|
||||||
|
const char *write_ptr;
|
||||||
|
size_t write_remain;
|
||||||
|
|
||||||
if (ferror(src) || ferror(dst))
|
try_again_read:
|
||||||
unlink(dstpath);
|
size_data = read(fd_src, buffer, buffer_size);
|
||||||
|
if (size_data == 0)
|
||||||
|
break; /* End of File have been reached */
|
||||||
|
if (size_data < 0) {
|
||||||
|
if (errno == EINTR)
|
||||||
|
goto try_again_read;
|
||||||
|
werror(_("could not read from file \"%s\": %s"), src_file, strerror(errno));
|
||||||
|
close(fd_dst);
|
||||||
|
goto cleanup_and_return_failure;
|
||||||
|
}
|
||||||
|
|
||||||
fclose(src);
|
write_ptr = buffer;
|
||||||
fchmod(fileno(dst), st.st_mode);
|
write_remain = size_data;
|
||||||
fsync(fileno(dst));
|
while (write_remain > 0) {
|
||||||
if (fclose(dst))
|
ssize_t write_done;
|
||||||
wwarning("error occured during fclose(\"%s\")", dstpath);
|
|
||||||
wfree(dstpath);
|
try_again_write:
|
||||||
|
write_done = write(fd_dst, write_ptr, write_remain);
|
||||||
|
if (write_done < 0) {
|
||||||
|
if (errno == EINTR)
|
||||||
|
goto try_again_write;
|
||||||
|
werror(_("could not write data to file \"%s\": %s"), path_dst, strerror(errno));
|
||||||
|
close(fd_dst);
|
||||||
|
goto cleanup_and_return_failure;
|
||||||
|
}
|
||||||
|
write_ptr += write_done;
|
||||||
|
write_remain -= write_done;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Keep only the permission-related part of the field: */
|
||||||
|
permission_dst = stat_src.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
|
||||||
|
if (fchmod(fd_dst, permission_dst) != 0)
|
||||||
|
wwarning(_("could not set permission 0%03o on file \"%s\": %s"),
|
||||||
|
permission_dst, path_dst, strerror(errno));
|
||||||
|
|
||||||
|
if (close(fd_dst) != 0) {
|
||||||
|
werror(_("could not close the file \"%s\": %s"), path_dst, strerror(errno));
|
||||||
|
cleanup_and_return_failure:
|
||||||
|
free(buffer);
|
||||||
|
close(fd_src);
|
||||||
|
unlink(path_dst);
|
||||||
|
wfree(path_dst);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
free(buffer);
|
||||||
|
wfree(path_dst);
|
||||||
|
close(fd_src);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
WCFLAGS="${inc_search_path}"
|
|
||||||
WLFLAGS="${lib_search_path}"
|
|
||||||
WLIBS="-lWINGs -lWUtil -lwraster ${GFXLIBS} ${XFTLIBS} ${XLIBS} -lm ${INTLIBS}"
|
|
||||||
|
|
||||||
usage="Usage: get-wings-flags [--cflags] [--ldflags] [--libs]"
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
echo "${usage}" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
while test $# -gt 0; do
|
|
||||||
case $1 in
|
|
||||||
--cflags)
|
|
||||||
echo $WCFLAGS
|
|
||||||
;;
|
|
||||||
--ldflags|--lflags)
|
|
||||||
echo $WLFLAGS
|
|
||||||
;;
|
|
||||||
--libs)
|
|
||||||
echo $WLIBS
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "${usage}" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
WCFLAGS="-I${includedir}"
|
|
||||||
WLFLAGS="-L${libdir}"
|
|
||||||
WLIBS="-lWUtil ${INTLIBS}"
|
|
||||||
|
|
||||||
usage="Usage: get-wutil-flags [--cflags] [--ldflags] [--libs]"
|
|
||||||
|
|
||||||
if test $# -eq 0; then
|
|
||||||
echo "${usage}" 1>&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
while test $# -gt 0; do
|
|
||||||
case $1 in
|
|
||||||
--cflags)
|
|
||||||
echo $WCFLAGS
|
|
||||||
;;
|
|
||||||
--ldflags|--lflags)
|
|
||||||
echo $WLFLAGS
|
|
||||||
;;
|
|
||||||
--libs)
|
|
||||||
echo $WLIBS
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "${usage}" 1>&2
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
+19
-31
@@ -154,7 +154,7 @@ unsigned WMCountHashTable(WMHashTable * table)
|
|||||||
return table->itemCount;
|
return table->itemCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *WMHashGet(WMHashTable * table, const void *key)
|
static HashItem *hashGetItem(WMHashTable *table, const void *key)
|
||||||
{
|
{
|
||||||
unsigned h;
|
unsigned h;
|
||||||
HashItem *item;
|
HashItem *item;
|
||||||
@@ -177,44 +177,32 @@ void *WMHashGet(WMHashTable * table, const void *key)
|
|||||||
item = item->next;
|
item = item->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (item)
|
return item;
|
||||||
return (void *)item->data;
|
}
|
||||||
else
|
|
||||||
|
void *WMHashGet(WMHashTable * table, const void *key)
|
||||||
|
{
|
||||||
|
HashItem *item;
|
||||||
|
|
||||||
|
item = hashGetItem(table, key);
|
||||||
|
if (!item)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
return (void *)item->data;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMHashGetItemAndKey(WMHashTable * table, const void *key, void **retItem, void **retKey)
|
Bool WMHashGetItemAndKey(WMHashTable * table, const void *key, void **retItem, void **retKey)
|
||||||
{
|
{
|
||||||
unsigned h;
|
|
||||||
HashItem *item;
|
HashItem *item;
|
||||||
|
|
||||||
h = HASH(table, key);
|
item = hashGetItem(table, key);
|
||||||
item = table->table[h];
|
if (!item)
|
||||||
|
|
||||||
if (table->callbacks.keyIsEqual) {
|
|
||||||
while (item) {
|
|
||||||
if ((*table->callbacks.keyIsEqual) (key, item->key)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
item = item->next;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
while (item) {
|
|
||||||
if (key == item->key) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
item = item->next;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (item) {
|
|
||||||
if (retKey)
|
|
||||||
*retKey = (void *)item->key;
|
|
||||||
if (retItem)
|
|
||||||
*retItem = (void *)item->data;
|
|
||||||
return True;
|
|
||||||
} else {
|
|
||||||
return False;
|
return False;
|
||||||
}
|
|
||||||
|
if (retKey)
|
||||||
|
*retKey = (void *)item->key;
|
||||||
|
if (retItem)
|
||||||
|
*retItem = (void *)item->data;
|
||||||
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
void *WMHashInsert(WMHashTable * table, const void *key, const void *data)
|
void *WMHashInsert(WMHashTable * table, const void *key, const void *data)
|
||||||
|
|||||||
+2
-1
@@ -107,7 +107,8 @@ void *wmalloc(size_t size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
memset(tmp, 0, size);
|
if (tmp != NULL)
|
||||||
|
memset(tmp, 0, size);
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+9
-9
@@ -377,7 +377,7 @@ found_end_squote:
|
|||||||
if (limit-- > 0)
|
if (limit-- > 0)
|
||||||
goto restart_token_split;
|
goto restart_token_split;
|
||||||
|
|
||||||
WMenuParserError(parser, _("too many nested macro expansion, breaking loop") );
|
WMenuParserError(parser, _("too many nested macro expansions, breaking loop"));
|
||||||
|
|
||||||
while (isnamechr(*parser->rd))
|
while (isnamechr(*parser->rd))
|
||||||
parser->rd++;
|
parser->rd++;
|
||||||
@@ -436,7 +436,7 @@ static void menu_parser_get_directive(WMenuParser parser)
|
|||||||
menu_parser_condition_end(parser);
|
menu_parser_condition_end(parser);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
WMenuParserError(parser, _("unknow directive '#%s'"), command);
|
WMenuParserError(parser, _("unknown directive '#%s'"), command);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,7 +500,7 @@ found_end_define_fname:
|
|||||||
count++;
|
count++;
|
||||||
|
|
||||||
if (count > MAX_NESTED_INCLUDES) {
|
if (count > MAX_NESTED_INCLUDES) {
|
||||||
WMenuParserError(parser, _("too many nested includes") );
|
WMenuParserError(parser, _("too many nested #include's"));
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -536,7 +536,7 @@ found_end_define_fname:
|
|||||||
while (*src != '\0') {
|
while (*src != '\0') {
|
||||||
idx = 0;
|
idx = 0;
|
||||||
if (*src == '~') {
|
if (*src == '~') {
|
||||||
char *home = wgethomedir();
|
const char *home = wgethomedir();
|
||||||
while (*home != '\0') {
|
while (*home != '\0') {
|
||||||
if (idx < sizeof(buffer) - 2)
|
if (idx < sizeof(buffer) - 2)
|
||||||
buffer[idx++] = *home;
|
buffer[idx++] = *home;
|
||||||
@@ -565,7 +565,7 @@ found_end_define_fname:
|
|||||||
src++;
|
src++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WMenuParserError(parser, _("could not find file \"%s\" for include"), req_filename);
|
WMenuParserError(parser, _("could not find file \"%s\" for #include"), req_filename);
|
||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -612,10 +612,10 @@ static void menu_parser_condition_ifmacro(WMenuParser parser, Bool check_exists)
|
|||||||
macro = menu_parser_find_macro(parser, macro_name);
|
macro = menu_parser_find_macro(parser, macro_name);
|
||||||
parser->cond.stack[0].skip =
|
parser->cond.stack[0].skip =
|
||||||
((check_exists) && (macro == NULL)) ||
|
((check_exists) && (macro == NULL)) ||
|
||||||
((!check_exists) && (macro != NULL)) ;
|
((!check_exists) && (macro != NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
strcpy(parser->cond.stack[0].name, cmd_name);
|
strncpy(parser->cond.stack[0].name, cmd_name, sizeof(parser->cond.stack[0].name) - 1);
|
||||||
parser->cond.stack[0].line = parser->line_number;
|
parser->cond.stack[0].line = parser->line_number;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -623,7 +623,7 @@ static void menu_parser_condition_ifmacro(WMenuParser parser, Bool check_exists)
|
|||||||
static void menu_parser_condition_else(WMenuParser parser)
|
static void menu_parser_condition_else(WMenuParser parser)
|
||||||
{
|
{
|
||||||
if (parser->cond.depth <= 0) {
|
if (parser->cond.depth <= 0) {
|
||||||
WMenuParserError(parser, _("found #%s but have no matching #if"), "else" );
|
WMenuParserError(parser, _("found #%s but has no matching #if"), "else");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -640,7 +640,7 @@ static void menu_parser_condition_end(WMenuParser parser)
|
|||||||
int idx;
|
int idx;
|
||||||
|
|
||||||
if (parser->cond.depth <= 0) {
|
if (parser->cond.depth <= 0) {
|
||||||
WMenuParserError(parser, _("found #%s but have no matching #if"), "endif" );
|
WMenuParserError(parser, _("found #%s but has no matching #if"), "endif");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -167,6 +167,7 @@ void menu_parser_define_macro(WMenuParser parser)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
macro = wmalloc(sizeof(*macro));
|
macro = wmalloc(sizeof(*macro));
|
||||||
|
memset(arg_name, 0, MAX_MACRO_ARG_COUNT * sizeof(char *));
|
||||||
|
|
||||||
/* Isolate name of macro */
|
/* Isolate name of macro */
|
||||||
idx = 0;
|
idx = 0;
|
||||||
@@ -206,7 +207,7 @@ void menu_parser_define_macro(WMenuParser parser)
|
|||||||
arg_names_buf[idx] = '\0';
|
arg_names_buf[idx] = '\0';
|
||||||
if (idx < sizeof(arg_names_buf) - 1) idx++;
|
if (idx < sizeof(arg_names_buf) - 1) idx++;
|
||||||
} else {
|
} else {
|
||||||
WMenuParserError(parser, _("invalid characted '%c' in arg-list for macro \"%s\" while expecting parameter name"),
|
WMenuParserError(parser, _("invalid character '%c' in arg-list for macro \"%s\" while expecting parameter name"),
|
||||||
*parser->rd, macro->name);
|
*parser->rd, macro->name);
|
||||||
wfree(macro);
|
wfree(macro);
|
||||||
*parser->rd = '\0'; // fake end-of-line to avoid warnings from remaining line content
|
*parser->rd = '\0'; // fake end-of-line to avoid warnings from remaining line content
|
||||||
@@ -217,7 +218,7 @@ void menu_parser_define_macro(WMenuParser parser)
|
|||||||
if (*parser->rd == ')') break;
|
if (*parser->rd == ')') break;
|
||||||
|
|
||||||
if (*parser->rd != ',') {
|
if (*parser->rd != ',') {
|
||||||
WMenuParserError(parser, _("invalid characted '%c' in arg-list for macro \"%s\" while expecting ',' or ')'"),
|
WMenuParserError(parser, _("invalid character '%c' in arg-list for macro \"%s\" while expecting ',' or ')'"),
|
||||||
*parser->rd, macro->name);
|
*parser->rd, macro->name);
|
||||||
wfree(macro);
|
wfree(macro);
|
||||||
*parser->rd = '\0'; // fake end-of-line to avoid warnings from remaining line content
|
*parser->rd = '\0'; // fake end-of-line to avoid warnings from remaining line content
|
||||||
@@ -279,7 +280,8 @@ WParserMacro *menu_parser_find_macro(WMenuParser parser, const char *name)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
return macro;
|
return macro;
|
||||||
check_next_macro: ;
|
check_next_macro:
|
||||||
|
;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@@ -391,6 +393,8 @@ void menu_parser_expand_macro(WMenuParser parser, WParserMacro *macro)
|
|||||||
unsigned int size;
|
unsigned int size;
|
||||||
int i, space_left;
|
int i, space_left;
|
||||||
|
|
||||||
|
memset(arg_value, 0, MAX_MACRO_ARG_COUNT * sizeof(char *));
|
||||||
|
|
||||||
/* Skip the name of the macro, this was not done by caller */
|
/* Skip the name of the macro, this was not done by caller */
|
||||||
for (i = 0; macro->name[i] != '\0'; i++)
|
for (i = 0; macro->name[i] != '\0'; i++)
|
||||||
parser->rd++;
|
parser->rd++;
|
||||||
@@ -692,7 +696,7 @@ static void w_create_macro(WMenuParser parser, const char *name, WParserMacroFun
|
|||||||
WParserMacro *macro;
|
WParserMacro *macro;
|
||||||
|
|
||||||
macro = wmalloc(sizeof(*macro));
|
macro = wmalloc(sizeof(*macro));
|
||||||
strcpy(macro->name, name);
|
strncpy(macro->name, name, sizeof(macro->name) - 1);
|
||||||
macro->function = handler;
|
macro->function = handler;
|
||||||
macro->arg_count = -1;
|
macro->arg_count = -1;
|
||||||
macro->next = parser->macros;
|
macro->next = parser->macros;
|
||||||
|
|||||||
+92
-17
@@ -1,50 +1,125 @@
|
|||||||
nlsdir = $(NLSDIR)
|
DOMAIN = WINGs
|
||||||
|
|
||||||
CATALOGS = @WINGSMOFILES@
|
CATALOGS = @WINGSMOFILES@
|
||||||
|
|
||||||
CLEANFILES = $(CATALOGS) WINGs.pot
|
CLEANFILES = $(CATALOGS) $(DOMAIN).pot
|
||||||
|
|
||||||
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po hu.po nl.po sk.po
|
EXTRA_DIST = bg.po ca.po cs.po de.po fr.po fy.po hu.po nl.po sk.po sr.po
|
||||||
|
|
||||||
|
# WUtil files:
|
||||||
POTFILES = \
|
POTFILES = \
|
||||||
|
$(top_srcdir)/WINGs/array.c \
|
||||||
|
$(top_srcdir)/WINGs/bagtree.c \
|
||||||
|
$(top_srcdir)/WINGs/data.c \
|
||||||
$(top_srcdir)/WINGs/error.c \
|
$(top_srcdir)/WINGs/error.c \
|
||||||
$(top_srcdir)/WINGs/findfile.c \
|
$(top_srcdir)/WINGs/findfile.c \
|
||||||
|
$(top_srcdir)/WINGs/handlers.c \
|
||||||
|
$(top_srcdir)/WINGs/hashtable.c \
|
||||||
|
$(top_srcdir)/WINGs/memory.c \
|
||||||
|
$(top_srcdir)/WINGs/menuparser.c \
|
||||||
|
$(top_srcdir)/WINGs/menuparser_macros.c \
|
||||||
|
$(top_srcdir)/WINGs/misc.c \
|
||||||
|
$(top_srcdir)/WINGs/notification.c \
|
||||||
$(top_srcdir)/WINGs/proplist.c \
|
$(top_srcdir)/WINGs/proplist.c \
|
||||||
|
$(top_srcdir)/WINGs/string.c \
|
||||||
|
$(top_srcdir)/WINGs/tree.c \
|
||||||
$(top_srcdir)/WINGs/userdefaults.c \
|
$(top_srcdir)/WINGs/userdefaults.c \
|
||||||
|
$(top_srcdir)/WINGs/usleep.c \
|
||||||
|
$(top_srcdir)/WINGs/wapplication.c \
|
||||||
|
$(top_srcdir)/WINGs/wutil.c
|
||||||
|
|
||||||
|
# WINGs files:
|
||||||
|
POTFILES += \
|
||||||
|
$(top_srcdir)/WINGs/configuration.c \
|
||||||
|
$(top_srcdir)/WINGs/dragcommon.c \
|
||||||
|
$(top_srcdir)/WINGs/dragdestination.c \
|
||||||
|
$(top_srcdir)/WINGs/dragsource.c \
|
||||||
|
$(top_srcdir)/WINGs/selection.c \
|
||||||
|
$(top_srcdir)/WINGs/wappresource.c \
|
||||||
|
$(top_srcdir)/WINGs/wballoon.c \
|
||||||
|
$(top_srcdir)/WINGs/wbox.c \
|
||||||
|
$(top_srcdir)/WINGs/wbrowser.c \
|
||||||
|
$(top_srcdir)/WINGs/wbutton.c \
|
||||||
$(top_srcdir)/WINGs/wcolor.c \
|
$(top_srcdir)/WINGs/wcolor.c \
|
||||||
$(top_srcdir)/WINGs/wcolorpanel.c \
|
$(top_srcdir)/WINGs/wcolorpanel.c \
|
||||||
|
$(top_srcdir)/WINGs/wcolorwell.c \
|
||||||
|
$(top_srcdir)/WINGs/wevent.c \
|
||||||
$(top_srcdir)/WINGs/wfilepanel.c \
|
$(top_srcdir)/WINGs/wfilepanel.c \
|
||||||
|
$(top_srcdir)/WINGs/wframe.c \
|
||||||
$(top_srcdir)/WINGs/wfont.c \
|
$(top_srcdir)/WINGs/wfont.c \
|
||||||
$(top_srcdir)/WINGs/wfontpanel.c \
|
$(top_srcdir)/WINGs/wfontpanel.c \
|
||||||
$(top_srcdir)/WINGs/widgets.c \
|
$(top_srcdir)/WINGs/widgets.c \
|
||||||
$(top_srcdir)/WINGs/wruler.c
|
$(top_srcdir)/WINGs/winputmethod.c \
|
||||||
|
$(top_srcdir)/WINGs/wlabel.c \
|
||||||
|
$(top_srcdir)/WINGs/wlist.c \
|
||||||
|
$(top_srcdir)/WINGs/wmenuitem.c \
|
||||||
|
$(top_srcdir)/WINGs/wmisc.c \
|
||||||
|
$(top_srcdir)/WINGs/wpanel.c \
|
||||||
|
$(top_srcdir)/WINGs/wpixmap.c \
|
||||||
|
$(top_srcdir)/WINGs/wpopupbutton.c \
|
||||||
|
$(top_srcdir)/WINGs/wprogressindicator.c \
|
||||||
|
$(top_srcdir)/WINGs/wruler.c \
|
||||||
|
$(top_srcdir)/WINGs/wscroller.c \
|
||||||
|
$(top_srcdir)/WINGs/wscrollview.c \
|
||||||
|
$(top_srcdir)/WINGs/wslider.c \
|
||||||
|
$(top_srcdir)/WINGs/wsplitview.c \
|
||||||
|
$(top_srcdir)/WINGs/wtabview.c \
|
||||||
|
$(top_srcdir)/WINGs/wtext.c \
|
||||||
|
$(top_srcdir)/WINGs/wtextfield.c \
|
||||||
|
$(top_srcdir)/WINGs/wview.c \
|
||||||
|
$(top_srcdir)/WINGs/wwindow.c
|
||||||
|
|
||||||
SUFFIXES = .po .mo
|
SUFFIXES = .po .mo
|
||||||
|
|
||||||
.po.mo:
|
.po.mo:
|
||||||
msgfmt -c -o $@ $<
|
$(AM_V_GEN)$(MSGFMT) -c -o $@ $<
|
||||||
|
|
||||||
|
|
||||||
all-local: $(CATALOGS)
|
all-local: $(CATALOGS)
|
||||||
|
|
||||||
WINGs.pot: $(POTFILES)
|
|
||||||
xgettext --default-domain=WINGs \
|
.PHONY: update-lang
|
||||||
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
|
|
||||||
if cmp -s WINGs.po WINGs.pot; then \
|
if HAVE_XGETTEXT
|
||||||
rm -f WINGs.po; \
|
update-lang: $(DOMAIN).pot
|
||||||
|
$(AM_V_GEN)$(top_srcdir)/script/generate-po-from-template.sh \
|
||||||
|
-n "$(PACKAGE_NAME)" -v "$(PACKAGE_VERSION)" -b "$(PACKAGE_BUGREPORT)" \
|
||||||
|
-t "$(DOMAIN).pot" "$(srcdir)/$(PO).po"
|
||||||
|
|
||||||
|
$(DOMAIN).pot: $(POTFILES)
|
||||||
|
$(AM_V_GEN)$(XGETTEXT) --default-domain=$(DOMAIN) \
|
||||||
|
--add-comments --keyword=_ --keyword=N_ $(POTFILES)
|
||||||
|
@if cmp -s $(DOMAIN).po $(DOMAIN).pot; then \
|
||||||
|
rm -f $(DOMAIN).po; \
|
||||||
else \
|
else \
|
||||||
mv -f WINGs.po WINGs.pot; \
|
mv -f $(DOMAIN).po $(DOMAIN).pot; \
|
||||||
fi
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
install-data-local: $(CATALOGS)
|
install-data-local: $(CATALOGS)
|
||||||
$(mkinstalldirs) $(DESTDIR)$(nlsdir)
|
$(mkinstalldirs) $(DESTDIR)$(localedir)
|
||||||
chmod 755 $(DESTDIR)$(nlsdir)
|
|
||||||
for n in $(CATALOGS) __DuMmY ; do \
|
for n in $(CATALOGS) __DuMmY ; do \
|
||||||
if test "$$n" -a "$$n" != "__DuMmY" ; then \
|
if test "$$n" -a "$$n" != "__DuMmY" ; then \
|
||||||
l=`basename $$n .mo`; \
|
l=`basename $$n .mo`; \
|
||||||
$(mkinstalldirs) $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
|
$(mkinstalldirs) $(DESTDIR)$(localedir)/$$l/LC_MESSAGES; \
|
||||||
chmod 755 $(DESTDIR)$(nlsdir)/$$l; \
|
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(localedir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
|
||||||
chmod 755 $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES; \
|
|
||||||
$(INSTALL_DATA) -m 644 $$n $(DESTDIR)$(nlsdir)/$$l/LC_MESSAGES/WINGs.mo; \
|
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
|
||||||
|
uninstall-local:
|
||||||
|
for n in $(CATALOGS) ; do \
|
||||||
|
l=`basename $$n .mo`; \
|
||||||
|
rm -f $(DESTDIR)$(localedir)/$$l/LC_MESSAGES/$(DOMAIN).mo; \
|
||||||
|
done
|
||||||
|
|
||||||
|
# Create a 'silent rule' for our make check the same way automake does
|
||||||
|
AM_V_CHKTRANS = $(am__v_CHKTRANS_$(V))
|
||||||
|
am__v_CHKTRANS_ = $(am__v_CHKTRANS_$(AM_DEFAULT_VERBOSITY))
|
||||||
|
am__v_CHKTRANS_0 = @echo " CHK translations" ;
|
||||||
|
am__v_CHKTRANS_1 =
|
||||||
|
|
||||||
|
# 'make check' will make sure the tranlation sources are in line with the compiled source
|
||||||
|
check-local:
|
||||||
|
$(AM_V_CHKTRANS)$(top_srcdir)/script/check-translation-sources.sh \
|
||||||
|
"$(srcdir)" -s "$(top_srcdir)/WINGs/Makefile.am"
|
||||||
|
|||||||
+2
-6
@@ -1,9 +1,3 @@
|
|||||||
|
|
||||||
Instructions for translating po files can be found in the po/README directory
|
|
||||||
in the top of the WindowMaker source tree.
|
|
||||||
|
|
||||||
All files are in UTF-8
|
|
||||||
|
|
||||||
File Language Note Current Maintainer
|
File Language Note Current Maintainer
|
||||||
------------------------------------------------------------------------------
|
------------------------------------------------------------------------------
|
||||||
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
|
ca.po Catalan Ernest Adrogué <eadrogue@gmx.net>
|
||||||
@@ -14,6 +8,8 @@ fr.po French Emmanuel Benoit <tseeker@neptune.fr>
|
|||||||
sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
|
sk.po Slovak Jan 'judas' Tomka <judas@linux.sk>
|
||||||
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
|
bg.po Bulgarian Anton Zinoviev <zinoviev@debian.org>
|
||||||
nl.po Dutch Alwin <translations@ziggo.nl>
|
nl.po Dutch Alwin <translations@ziggo.nl>
|
||||||
|
fy.po Frisian Alwin <translations@ziggo.nl>
|
||||||
|
sr.po Serbian Strahinya Radich <sr@strahinja.org>
|
||||||
|
|
||||||
Notes
|
Notes
|
||||||
-----
|
-----
|
||||||
|
|||||||
+2
-1
@@ -9,6 +9,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2003-02-09 12:10+0200\n"
|
"PO-Revision-Date: 2003-02-09 12:10+0200\n"
|
||||||
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
"Last-Translator: Anton Zinoviev <zinoviev@debian.org>\n"
|
||||||
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
|
||||||
|
"Language: bg\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -545,7 +546,7 @@ msgstr "\"%s\" е директория."
|
|||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:829
|
#: ../../WINGs/wfilepanel.c:829
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occured browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "Настъпи грешка при показване на \"%s\"."
|
msgstr "Настъпи грешка при показване на \"%s\"."
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:833
|
#: ../../WINGs/wfilepanel.c:833
|
||||||
|
|||||||
+2
-1
@@ -14,6 +14,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2003-09-16 23:16+0200\n"
|
"PO-Revision-Date: 2003-09-16 23:16+0200\n"
|
||||||
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
"Last-Translator: Ernest Adrogué <eadrogue@gmx.net>\n"
|
||||||
"Language-Team: Catalan <ca@dodds.net>\n"
|
"Language-Team: Catalan <ca@dodds.net>\n"
|
||||||
|
"Language: ca\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -557,7 +558,7 @@ msgstr "\"%s\" és un directori."
|
|||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:832
|
#: ../../WINGs/wfilepanel.c:832
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occured browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "S'ha produït un error mentre s'explorava \"%s\"."
|
msgstr "S'ha produït un error mentre s'explorava \"%s\"."
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:836
|
#: ../../WINGs/wfilepanel.c:836
|
||||||
|
|||||||
+6
-5
@@ -12,6 +12,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2001-10-11 22:00+0100\n"
|
"PO-Revision-Date: 2001-10-11 22:00+0100\n"
|
||||||
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
"Last-Translator: Jiří Hnídek <jiri.hnidek@vslib.cz>\n"
|
||||||
"Language-Team: Czech <cz@li.org>\n"
|
"Language-Team: Czech <cz@li.org>\n"
|
||||||
|
"Language: cs\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: unknown\n"
|
"Content-Transfer-Encoding: unknown\n"
|
||||||
@@ -22,8 +23,8 @@ msgid "Bad address-service-protocol combination"
|
|||||||
msgstr "Nesprávná kombinace adresa-služba-protokol"
|
msgstr "Nesprávná kombinace adresa-služba-protokol"
|
||||||
|
|
||||||
#: ../../WINGs/dragsource.c:541
|
#: ../../WINGs/dragsource.c:541
|
||||||
msgid "DND selection lost during drag operation..."
|
msgid "XDND selection lost during drag operation..."
|
||||||
msgstr "DND výběr se ztratil během opere táhnutí..."
|
msgstr "XDND výběr se ztratil během opere táhnutí..."
|
||||||
|
|
||||||
#: ../../WINGs/dragsource.c:610
|
#: ../../WINGs/dragsource.c:610
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -31,8 +32,8 @@ msgid "drag & drop timed out while waiting for response from 0x%x\n"
|
|||||||
msgstr "čas pro drag & drop vypršel během čekání na odpoveď z 0x%x\n"
|
msgstr "čas pro drag & drop vypršel během čekání na odpoveď z 0x%x\n"
|
||||||
|
|
||||||
#: ../../WINGs/dragsource.c:728
|
#: ../../WINGs/dragsource.c:728
|
||||||
msgid "could not get ownership or DND selection"
|
msgid "could not get ownership of XDND selection"
|
||||||
msgstr "nemožné získat vlastnictví nebo DND výběr"
|
msgstr "nemožné získat vlastnictví nebo XDND výběr"
|
||||||
|
|
||||||
#: ../../WINGs/dragsource.c:898
|
#: ../../WINGs/dragsource.c:898
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -489,7 +490,7 @@ msgstr "'%s' je adresář."
|
|||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:821
|
#: ../../WINGs/wfilepanel.c:821
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occured browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "Při prohlížení '%s' nastala chyba."
|
msgstr "Při prohlížení '%s' nastala chyba."
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:825
|
#: ../../WINGs/wfilepanel.c:825
|
||||||
|
|||||||
+2
-1
@@ -15,6 +15,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2004-11-05 23:48+0100\n"
|
"PO-Revision-Date: 2004-11-05 23:48+0100\n"
|
||||||
"Last-Translator: shlomme@gmx.net\n"
|
"Last-Translator: shlomme@gmx.net\n"
|
||||||
"Language-Team: German\n"
|
"Language-Team: German\n"
|
||||||
|
"Language: de\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -553,7 +554,7 @@ msgstr "'%s' ist ein Verzeichnis."
|
|||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:832
|
#: ../../WINGs/wfilepanel.c:832
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occured browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "Fehler beim Lesen von '%s'."
|
msgstr "Fehler beim Lesen von '%s'."
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:836
|
#: ../../WINGs/wfilepanel.c:836
|
||||||
|
|||||||
+2
-1
@@ -10,6 +10,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2002-01-09 21:20+0100\n"
|
"PO-Revision-Date: 2002-01-09 21:20+0100\n"
|
||||||
"Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n"
|
"Last-Translator: Emmanuel Benoit <tseeker@neptune.fr>\n"
|
||||||
"Language-Team: Français <fr@li.org>\n"
|
"Language-Team: Français <fr@li.org>\n"
|
||||||
|
"Language: fr\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: unknown\n"
|
"Content-Transfer-Encoding: unknown\n"
|
||||||
@@ -559,7 +560,7 @@ msgstr "'%s' est un répertoire."
|
|||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:832
|
#: ../../WINGs/wfilepanel.c:832
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occured browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "Une erreur s'est produite pendant le parcours de '%s'."
|
msgstr "Une erreur s'est produite pendant le parcours de '%s'."
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:836
|
#: ../../WINGs/wfilepanel.c:836
|
||||||
|
|||||||
+835
@@ -0,0 +1,835 @@
|
|||||||
|
# Translation into Western Frisian for Window Maker
|
||||||
|
# Copyright (C) 2015-2019 Window Maker Developers Team
|
||||||
|
# This file is distributed under the same license as the windowmaker package.
|
||||||
|
# Original by Alwin <translations@ziggo.nl>, 2015.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: wmaker-0.95.7+\n"
|
||||||
|
"Report-Msgid-Bugs-To: \n"
|
||||||
|
"POT-Creation-Date: 2016-01-21 16:19+0100\n"
|
||||||
|
"PO-Revision-Date: 2016-01-21 00:00+0000\n"
|
||||||
|
"Last-Translator: Alwin <translations@ziggo.nl>\n"
|
||||||
|
"Language-Team: Western Frisian\n"
|
||||||
|
"Language: fy\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:106
|
||||||
|
msgid "fatal: "
|
||||||
|
msgstr "ûnwerstelber: "
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:112
|
||||||
|
msgid "error: "
|
||||||
|
msgstr "flater: "
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:118
|
||||||
|
msgid "warning: "
|
||||||
|
msgstr "warskôging: "
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:63
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get password entry for UID %i"
|
||||||
|
msgstr "koe accountgegevens foar UID %i net krije"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:93
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get password entry for user %s"
|
||||||
|
msgstr "koe accountgegevens foar brûker %s net krije"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:212
|
||||||
|
#, c-format
|
||||||
|
msgid "could not expand %s"
|
||||||
|
msgstr "koe %s net útwurkje"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:441
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not open input file \"%s\": %s"
|
||||||
|
msgstr "Koe ynfierbestân \"%s\" net iepenje: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:457
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not create target file \"%s\": %s"
|
||||||
|
msgstr "Koe doelbestân \"%s\" net oanmeitsje: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:465
|
||||||
|
msgid "could not allocate memory for the copy buffer"
|
||||||
|
msgstr "koe ûnthâld foar de kopybuffer net tawize"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:482
|
||||||
|
#, c-format
|
||||||
|
msgid "could not read from file \"%s\": %s"
|
||||||
|
msgstr "koe bestân \"%s\" net ynlêze: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:497
|
||||||
|
#, c-format
|
||||||
|
msgid "could not write data to file \"%s\": %s"
|
||||||
|
msgstr "koe gjin data skriuwe nei bestân \"%s\": %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:509
|
||||||
|
#, c-format
|
||||||
|
msgid "could not set permission 0%03o on file \"%s\": %s"
|
||||||
|
msgstr "koe tastimming 0%03o net ynstelle op bestân \"%s\": %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:513
|
||||||
|
#, c-format
|
||||||
|
msgid "could not close the file \"%s\": %s"
|
||||||
|
msgstr "koe bestân \"%s\" net ôfslute: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:110
|
||||||
|
#, c-format
|
||||||
|
msgid " included from file \"%s\" at line %d"
|
||||||
|
msgstr " ynfoege út bestân \"%s\" op rigel %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:142
|
||||||
|
#, c-format
|
||||||
|
msgid "missing #endif to match #%s at line %d"
|
||||||
|
msgstr "ûntbrekkende #endif behearrend by #%s op rigel %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:200
|
||||||
|
msgid "multiple SHORTCUT definition not valid"
|
||||||
|
msgstr "meartallige SHORTCUT-bepalingen net jildich"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:253
|
||||||
|
msgid "premature end of file while expecting a new line after '\\'"
|
||||||
|
msgstr "foartidich bestânsein, ferwachte in nije rigel nei '\\'"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:279
|
||||||
|
#, c-format
|
||||||
|
msgid "reached end of file while searching '*/' for comment started at line %d"
|
||||||
|
msgstr ""
|
||||||
|
"bestânsein berikt by sykjen nei '*/' foar kommentaar begûnen op rigel %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:344
|
||||||
|
msgid "missing closing double-quote before end-of-line"
|
||||||
|
msgstr "ûntbrekkend slutend dûbeld oanhelteken foar rigelein"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:362
|
||||||
|
msgid "missing closing simple-quote before end-of-line"
|
||||||
|
msgstr "ûntbrekkend slutend inkeld oanhelteken foar rigelein"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:380
|
||||||
|
msgid "too many nested macro expansions, breaking loop"
|
||||||
|
msgstr "te folle neske makro-útwurkingen, syklus ôfbrutsen"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:439
|
||||||
|
#, c-format
|
||||||
|
msgid "unknown directive '#%s'"
|
||||||
|
msgstr "ûnbekende oanwizing '#%s'"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:444
|
||||||
|
#, c-format
|
||||||
|
msgid "extra text after '#' command is ignored: \"%.16s...\""
|
||||||
|
msgstr "ekstra tekst nei #-kommando wurdt negearre: \"%.16s...\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:459
|
||||||
|
msgid "no file name found for #include"
|
||||||
|
msgstr "gjin bestânsnamme fûn foar #include"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:471
|
||||||
|
msgid "file name must be enclosed in brackets or double-quotes for #define"
|
||||||
|
msgstr ""
|
||||||
|
"bestânsnamme moat omsletten wurde mei heakjes of dûbelde oanheltekens foar "
|
||||||
|
"#define"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:485
|
||||||
|
#, c-format
|
||||||
|
msgid "missing closing '%c' in filename specification"
|
||||||
|
msgstr "ûntbrekkende slutende '%c' yn bestânsnammeopjefte"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:503
|
||||||
|
msgid "too many nested #include's"
|
||||||
|
msgstr "te folle neske #include's"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:568
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find file \"%s\" for #include"
|
||||||
|
msgstr "koe bestân \"%s\" net fine foar #include"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:589
|
||||||
|
#, c-format
|
||||||
|
msgid "missing macro name argument to #%s"
|
||||||
|
msgstr "ûntbrekkend makronamme-argumint by #%s"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:600
|
||||||
|
msgid "too many nested #if sequences"
|
||||||
|
msgstr "te folle neske #if-rigen"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:626 ../../WINGs/menuparser.c:643
|
||||||
|
#, c-format
|
||||||
|
msgid "found #%s but has no matching #if"
|
||||||
|
msgstr "#%s fûn, mar hat gjin bybehearrende #if"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:166
|
||||||
|
msgid "no macro name found for #define"
|
||||||
|
msgstr "gjin makronamme fûn foar #define"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:187
|
||||||
|
#, c-format
|
||||||
|
msgid "premature end of file while reading arg-list for macro \"%s\""
|
||||||
|
msgstr "foartidich bestânsein by ynlêzen arg.-list foar makro \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:194
|
||||||
|
#, c-format
|
||||||
|
msgid "too many parameters for macro \"%s\" definition"
|
||||||
|
msgstr "te folle parameters foar bepaling makro \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:209
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"invalid character '%c' in arg-list for macro \"%s\" while expecting "
|
||||||
|
"parameter name"
|
||||||
|
msgstr ""
|
||||||
|
"ûnjildich letterteken '%c' yn arg.-list foar makro \"%s\", ferwachte "
|
||||||
|
"parameternamme"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:220
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"invalid character '%c' in arg-list for macro \"%s\" while expecting ',' or "
|
||||||
|
"')'"
|
||||||
|
msgstr ""
|
||||||
|
"ûnjildich letterteken '%c' yn arg.-list foar makro \"%s\", ferwachte ',' of "
|
||||||
|
"')'"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:253
|
||||||
|
#, c-format
|
||||||
|
msgid "macro \"%s\" already defined, ignoring redefinition"
|
||||||
|
msgstr "makro \"%s\" al definiearre, negearret werdefiniearjen"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:346
|
||||||
|
#, c-format
|
||||||
|
msgid "more content than supported for the macro \"%s\""
|
||||||
|
msgstr "mear ynhâld as stipe foar makro \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:455
|
||||||
|
#, c-format
|
||||||
|
msgid "expansion for macro \"%s\" too big, line truncated"
|
||||||
|
msgstr "útwurking foar makro \"%s\" te grut, rigel ynkoarte"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:467
|
||||||
|
#, c-format
|
||||||
|
msgid "macro \"%s\" needs parenthesis for arguments"
|
||||||
|
msgstr "makro \"%s\" hat heakjes nedich foar arguminten"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:498
|
||||||
|
msgid "missing closing quote or double-quote before end-of-line"
|
||||||
|
msgstr "ûntbrekkend slutend of dûbeld oanhelteken foar rigelein"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:521
|
||||||
|
#, c-format
|
||||||
|
msgid "too many arguments for macro \"%s\", expected only %d"
|
||||||
|
msgstr "te folle arguminten foar makro \"%s\", ferwachte allinnich %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:530
|
||||||
|
#, c-format
|
||||||
|
msgid "premature end of line while searching for arguments to macro \"%s\""
|
||||||
|
msgstr "foartidich rigelein by sykjen nei arguminten by makro \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:536
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough arguments for macro \"%s\", expected %d but got only %d"
|
||||||
|
msgstr ""
|
||||||
|
"ûnfoldwaande arguminten foar makro \"%s\", ferwachte %d, mar krige allinnich "
|
||||||
|
"%d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:541
|
||||||
|
#, c-format
|
||||||
|
msgid "too much data in parameter list of macro \"%s\", truncated"
|
||||||
|
msgstr "te folle data yn parameterlist fan makro \"%s\", ynkoarte"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:561
|
||||||
|
#, c-format
|
||||||
|
msgid "size of value for macro '%s' is too big, truncated"
|
||||||
|
msgstr "wearde foar makro '%s' is te lang, ynkoarte"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:642 ../../WINGs/menuparser_macros.c:668
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine %s"
|
||||||
|
msgstr "koe %s net fêststelle"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:78
|
||||||
|
#, c-format
|
||||||
|
msgid "syntax error in %s %s, line %i: %s"
|
||||||
|
msgstr "syntaksflater yn %s %s, rigel %i: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:134
|
||||||
|
msgid "Only string or data is supported for a proplist dictionary key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:167 ../../WINGs/proplist.c:217
|
||||||
|
#: ../../WINGs/proplist.c:382 ../../WINGs/proplist.c:458
|
||||||
|
#: ../../WINGs/proplist.c:1048 ../../WINGs/proplist.c:1098
|
||||||
|
#: ../../WINGs/proplist.c:1246 ../../WINGs/proplist.c:1314
|
||||||
|
#: ../../WINGs/proplist.c:1419 ../../WINGs/proplist.c:1463
|
||||||
|
msgid "Used proplist functions on non-WMPropLists objects"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:635
|
||||||
|
msgid "unterminated PropList string"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:673
|
||||||
|
msgid "unterminated PropList data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:681
|
||||||
|
msgid "unterminated PropList data (missing hexdigit)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:693 ../../WINGs/proplist.c:698
|
||||||
|
msgid "non hexdigit character in PropList data"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:730
|
||||||
|
msgid "unterminated PropList array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:738
|
||||||
|
msgid "missing or unterminated PropList array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:748
|
||||||
|
msgid "could not get PropList array element"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:775
|
||||||
|
msgid "unterminated PropList dictionary"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:792
|
||||||
|
msgid "missing PropList dictionary key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:794
|
||||||
|
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:802
|
||||||
|
msgid "error parsing PropList dictionary key"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:810
|
||||||
|
msgid "missing = in PropList dictionary entry"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:818
|
||||||
|
msgid "error parsing PropList dictionary entry value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:826
|
||||||
|
msgid "missing ; in PropList dictionary entry"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:885
|
||||||
|
msgid ""
|
||||||
|
"was expecting a string, data, array or dictionary. If it's a string, try "
|
||||||
|
"enclosing it with \"."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:888
|
||||||
|
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||||
|
msgstr "Kommentaar is net tastean binnen domeinbestannen fan WindowMaker."
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1483 ../../WINGs/proplist.c:1548
|
||||||
|
#: ../../WINGs/proplist.c:1612
|
||||||
|
msgid "extra data after end of property list"
|
||||||
|
msgstr "ekstra data nei ein fan 'property list'"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1523
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get size for file '%s'"
|
||||||
|
msgstr "koe grutte foar bestân '%s' net krije"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1531
|
||||||
|
#, c-format
|
||||||
|
msgid "error reading from file '%s'"
|
||||||
|
msgstr "flater by ynlêzen bestân '%s'"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1578
|
||||||
|
#, c-format
|
||||||
|
msgid "%s:could not open menu file"
|
||||||
|
msgstr "%s:koe menubestân net iepenje"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1660
|
||||||
|
#, c-format
|
||||||
|
msgid "mkstemp (%s) failed"
|
||||||
|
msgstr "oanmeitsjen unyk tydlik bestân (%s) mislearre"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1670
|
||||||
|
#, c-format
|
||||||
|
msgid "mktemp (%s) failed"
|
||||||
|
msgstr "oanmeitsjen tydlik bestân (%s) mislearre"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1677
|
||||||
|
#, c-format
|
||||||
|
msgid "open (%s) failed"
|
||||||
|
msgstr "iepenjen (%s) mislearre"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1684
|
||||||
|
#, c-format
|
||||||
|
msgid "writing to file: %s failed"
|
||||||
|
msgstr "skriuwen nei bestân: %s mislearre"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1693
|
||||||
|
#, c-format
|
||||||
|
msgid "fclose (%s) failed"
|
||||||
|
msgstr "ôfsluten stream (%s) mislearre"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1701
|
||||||
|
#, c-format
|
||||||
|
msgid "rename ('%s' to '%s') failed"
|
||||||
|
msgstr "omneamen ('%s' nei '%s') mislearre"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1772
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not create component %s"
|
||||||
|
msgstr "Koe komponint %s net oanmeitsje"
|
||||||
|
|
||||||
|
#: ../../WINGs/userdefaults.c:72
|
||||||
|
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
|
||||||
|
msgstr "fariabele WMAKER_USER_ROOT, definiearre mei ûnjildich paad, net brûkt"
|
||||||
|
|
||||||
|
#. something happened with the file. just overwrite it
|
||||||
|
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot read domain from file '%s' when syncing"
|
||||||
|
msgstr "kin domeinbestân '%s' net ynlêze by syngronisearjen"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:60
|
||||||
|
#, c-format
|
||||||
|
msgid "unknown XDND action %s"
|
||||||
|
msgstr "ûnbekende XDND-aksje %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:142
|
||||||
|
#, c-format
|
||||||
|
msgid "target %lu for XDND message no longer exists"
|
||||||
|
msgstr "doel %lu foar XDND-berjocht bestiet net mear"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:220
|
||||||
|
#, c-format
|
||||||
|
msgid "unsupported version %i for XDND enter message"
|
||||||
|
msgstr "net-stipe ferzje %i foar XDND-berjocht by binnen gean"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:163
|
||||||
|
msgid "XDND selection lost during drag operation..."
|
||||||
|
msgstr "XDND-seleksje ferlern ûnder fersleephanneling..."
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:758
|
||||||
|
msgid "could not get XDND version for target of drop"
|
||||||
|
msgstr "koe XDND-ferzje net krije foar doel fan ferslepen"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:774
|
||||||
|
msgid "could not get ownership of XDND selection"
|
||||||
|
msgstr "koe eigendom fan XDND-seleksje net krije"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:1070
|
||||||
|
msgid "delay for drag destination response expired"
|
||||||
|
msgstr "wachttiid foar antwurd fersleepbestimming ferstrutsen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:204 ../../WINGs/wcolor.c:214 ../../WINGs/wcolor.c:250
|
||||||
|
#: ../../WINGs/wcolor.c:288
|
||||||
|
#, c-format
|
||||||
|
msgid "could not allocate %s color"
|
||||||
|
msgstr "koe kleur %s net tawize"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:204
|
||||||
|
msgid "white"
|
||||||
|
msgstr "wyt"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:214
|
||||||
|
msgid "black"
|
||||||
|
msgstr "swart"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:250
|
||||||
|
msgid "gray"
|
||||||
|
msgstr "griis"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:288
|
||||||
|
msgid "dark gray"
|
||||||
|
msgstr "donkergriis"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:393
|
||||||
|
msgid "Colors"
|
||||||
|
msgstr "Kleuren"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:568 ../../WINGs/wcolorpanel.c:2720
|
||||||
|
msgid "Brightness"
|
||||||
|
msgstr "Helderens"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:570 ../../WINGs/wcolorpanel.c:644
|
||||||
|
#: ../../WINGs/wcolorpanel.c:675 ../../WINGs/wcolorpanel.c:706
|
||||||
|
#: ../../WINGs/wcolorpanel.c:781 ../../WINGs/wcolorpanel.c:812
|
||||||
|
#: ../../WINGs/wcolorpanel.c:844 ../../WINGs/wcolorpanel.c:877
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2016 ../../WINGs/wcolorpanel.c:2722
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2756 ../../WINGs/wcolorpanel.c:2790
|
||||||
|
msgid "Color Panel: Could not allocate memory"
|
||||||
|
msgstr "Kleurepaniel: Koe gjin ûnthâld tawize"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:642
|
||||||
|
msgid "Red"
|
||||||
|
msgstr "Read"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:673
|
||||||
|
msgid "Green"
|
||||||
|
msgstr "Grien"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:704
|
||||||
|
msgid "Blue"
|
||||||
|
msgstr "Blau"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:718
|
||||||
|
msgid "Decimal"
|
||||||
|
msgstr "Desimaal"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:726
|
||||||
|
msgid "Hexadecimal"
|
||||||
|
msgstr "Heksadesimaal"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:779
|
||||||
|
msgid "Cyan"
|
||||||
|
msgstr "Cyaan"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:810
|
||||||
|
msgid "Magenta"
|
||||||
|
msgstr "Magenta"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:842
|
||||||
|
msgid "Yellow"
|
||||||
|
msgstr "Giel"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:875
|
||||||
|
msgid "Black"
|
||||||
|
msgstr "Swart"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:950
|
||||||
|
msgid "Spectrum"
|
||||||
|
msgstr "Spektrum"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:976
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr "Palet"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:981
|
||||||
|
msgid "New from File..."
|
||||||
|
msgstr "Nij út bestân..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:982 ../../WINGs/wcolorpanel.c:1027
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1042
|
||||||
|
msgid "Rename..."
|
||||||
|
msgstr "Omneame..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:983 ../../WINGs/wcolorpanel.c:1028
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1043 ../../WINGs/wcolorpanel.c:3180
|
||||||
|
msgid "Remove"
|
||||||
|
msgstr "Ferwiderje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:984
|
||||||
|
msgid "Copy"
|
||||||
|
msgstr "Kopiearje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:985
|
||||||
|
msgid "New from Clipboard"
|
||||||
|
msgstr "Nij fan klamboerd"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1004
|
||||||
|
msgid "X11-Colors"
|
||||||
|
msgstr "X11-kleuren"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1021
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Kleur"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1026
|
||||||
|
msgid "Add..."
|
||||||
|
msgstr "Tafoegje..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1036
|
||||||
|
msgid "List"
|
||||||
|
msgstr "List"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1041
|
||||||
|
msgid "New..."
|
||||||
|
msgstr "Nij..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1170
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"Color Panel: Could not create directory %s needed to store configurations"
|
||||||
|
msgstr ""
|
||||||
|
"Kleurepaniel: Koe map %s, nedich om ynstellingen te bewarjen, net oanmeitsje"
|
||||||
|
|
||||||
|
#. Delete the file, it doesn't belong here
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1176 ../../WINGs/wcolorpanel.c:3073
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3077
|
||||||
|
msgid "File Error"
|
||||||
|
msgstr "Bestânsflater"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1177
|
||||||
|
msgid "Could not create ColorPanel configuration directory"
|
||||||
|
msgstr "Koe ynstellingemap Kleurepaniel net oanmeitsje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1178 ../../WINGs/wcolorpanel.c:3074
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3079 ../../WINGs/wcolorpanel.c:3104
|
||||||
|
#: ../../WINGs/wfilepanel.c:227 ../../WINGs/wfilepanel.c:596
|
||||||
|
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
||||||
|
#: ../../WINGs/wfilepanel.c:883 ../../WINGs/wfontpanel.c:532
|
||||||
|
msgid "OK"
|
||||||
|
msgstr "OK"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1184
|
||||||
|
msgid "Color Panel: Could not find file"
|
||||||
|
msgstr "Kleurepaniel: Koe bestân net fine"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1380 ../../WINGs/wcolorpanel.c:1441
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1501
|
||||||
|
msgid "Color Panel: X failed request"
|
||||||
|
msgstr "Kleurepaniel: X-oanfraach mislearre"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2754
|
||||||
|
msgid "Saturation"
|
||||||
|
msgstr "Fersêding"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2788
|
||||||
|
msgid "Hue"
|
||||||
|
msgstr "Tint"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3012
|
||||||
|
msgid "Open Palette"
|
||||||
|
msgstr "Iepenje palet"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3074
|
||||||
|
msgid "Invalid file format !"
|
||||||
|
msgstr "Unjildige bestânsfoarm!"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3076
|
||||||
|
#, c-format
|
||||||
|
msgid "can't remove file %s"
|
||||||
|
msgstr "kin bestân %s net ferwiderje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3078
|
||||||
|
msgid "Couldn't remove file from Configuration Directory !"
|
||||||
|
msgstr "Koe bestân net ferwiderje út ynstellingemap!"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3103
|
||||||
|
msgid "Rename"
|
||||||
|
msgstr "Omneame"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3103
|
||||||
|
msgid "Rename palette to:"
|
||||||
|
msgstr "Neam palet om nei:"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3104 ../../WINGs/wfilepanel.c:236
|
||||||
|
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Annulearje"
|
||||||
|
|
||||||
|
#. Careful, this palette exists already
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3120 ../../WINGs/wfilepanel.c:715
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Warskôging"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3121
|
||||||
|
msgid ""
|
||||||
|
"Palette already exists !\n"
|
||||||
|
"\n"
|
||||||
|
"Overwrite ?"
|
||||||
|
msgstr ""
|
||||||
|
"Palet bestiet al!\n"
|
||||||
|
"\n"
|
||||||
|
"Oerskriuwe?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3121 ../../WINGs/wcolorpanel.c:3180
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Nee"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3121 ../../WINGs/wcolorpanel.c:3180
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Ja"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3152
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't rename palette %s to %s"
|
||||||
|
msgstr "Koe palet %s net omneame nei %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3175
|
||||||
|
msgid "This will permanently remove the palette "
|
||||||
|
msgstr "Dit sil it palet "
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3177
|
||||||
|
msgid ""
|
||||||
|
".\n"
|
||||||
|
"\n"
|
||||||
|
"Are you sure you want to remove this palette ?"
|
||||||
|
msgstr ""
|
||||||
|
" definityf ferwiderje.\n"
|
||||||
|
"\n"
|
||||||
|
"Binne jo wis dat jo dit palet ferwiderje wolle?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3199
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't remove palette %s"
|
||||||
|
msgstr "Koe palet %s net ferwiderje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3499
|
||||||
|
msgid "Color Panel: Color unspecified"
|
||||||
|
msgstr "Kleurepaniel: Kleur net opjûn"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:216
|
||||||
|
msgid "Name:"
|
||||||
|
msgstr "Namme:"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:306 ../../WINGs/wfilepanel.c:364
|
||||||
|
msgid "Open"
|
||||||
|
msgstr "Iepenje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:322 ../../WINGs/wfilepanel.c:370
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Bewarje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:506
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not open directory %s\n"
|
||||||
|
msgstr "WINGs: Koe map %s net iepenje\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:526
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not stat %s\n"
|
||||||
|
msgstr "WINGs: Koe status %s net fêststelle\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:596 ../../WINGs/wfilepanel.c:883
|
||||||
|
#: ../../WINGs/wfontpanel.c:531
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Flater"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:610
|
||||||
|
msgid "Create Directory"
|
||||||
|
msgstr "Map oanmeitsje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:611
|
||||||
|
msgid "Enter directory name"
|
||||||
|
msgstr "Fier mapnamme yn"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:639
|
||||||
|
#, c-format
|
||||||
|
msgid "Can not create %s: %s"
|
||||||
|
msgstr "Kin %s net oanmeitsje: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:705
|
||||||
|
#, c-format
|
||||||
|
msgid "Can not find %s: %s"
|
||||||
|
msgstr "Kin %s net fine: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:711
|
||||||
|
#, c-format
|
||||||
|
msgid "Delete %s %s?"
|
||||||
|
msgstr "%s %s ferwiderje?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:712
|
||||||
|
msgid "directory"
|
||||||
|
msgstr "Map"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:712
|
||||||
|
msgid "file"
|
||||||
|
msgstr "Bestân"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:719
|
||||||
|
#, c-format
|
||||||
|
msgid "Removing %s failed: %s"
|
||||||
|
msgstr "Ferwiderjen %s mislearre: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:751
|
||||||
|
#, c-format
|
||||||
|
msgid "An error occurred browsing '%s'."
|
||||||
|
msgstr "Der trede in flater op by blêdzjen troch '%s'."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:754
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' is not a directory."
|
||||||
|
msgstr "'%s' is gjin map."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:883
|
||||||
|
msgid "File does not exist."
|
||||||
|
msgstr "Bestân bestiet net."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:43
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid font: %s. Trying '%s'"
|
||||||
|
msgstr "ûnjildich lettertype: %s. Probearret '%s'"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:260 ../../WINGs/wfont.c:278
|
||||||
|
#, c-format
|
||||||
|
msgid "could not load font: %s."
|
||||||
|
msgstr "koe lettertype net lade: %s."
|
||||||
|
|
||||||
|
#. WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr));
|
||||||
|
#: ../../WINGs/wfontpanel.c:184
|
||||||
|
msgid "Font Panel"
|
||||||
|
msgstr "Lettertypen"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:220
|
||||||
|
msgid "The quick brown fox jumps over the lazy dog"
|
||||||
|
msgstr "De rappe brune foks springt oer de loaie hûn"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:226
|
||||||
|
msgid "Family"
|
||||||
|
msgstr "Famylje"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:237
|
||||||
|
msgid "Typeface"
|
||||||
|
msgstr "Lettertype"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:248
|
||||||
|
msgid "Size"
|
||||||
|
msgstr "Grutte"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:267
|
||||||
|
msgid "Set"
|
||||||
|
msgstr "Ynstelle"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:273
|
||||||
|
msgid "Revert"
|
||||||
|
msgstr "Werstelle"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:532
|
||||||
|
msgid "Could not init font config library\n"
|
||||||
|
msgstr "Koe biblioteek 'lettertype ynstelle' net inisjalisearje\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:446
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not load widget images file: %s"
|
||||||
|
msgstr "WINGs: Koe ôfbyldingebestân bestjoeringseleminten net lade: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:542
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not open display %s"
|
||||||
|
msgstr "WINGs: Koe skerm %s net iepenje"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:771
|
||||||
|
msgid ""
|
||||||
|
"could not load any fonts. Make sure your font installation and locale "
|
||||||
|
"settings are correct."
|
||||||
|
msgstr ""
|
||||||
|
"koe gjin lettertypen lade. Soargje derfoar dat jo ynstallearre lettertypen "
|
||||||
|
"en lokalisaasjeynstellingen korrekt binne."
|
||||||
|
|
||||||
|
#: ../../WINGs/winputmethod.c:65
|
||||||
|
msgid "could not add destroy callback for XIM input method"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: ../../WINGs/wruler.c:175
|
||||||
|
msgid "0 inches"
|
||||||
|
msgstr "0 inch"
|
||||||
|
|
||||||
|
#: ../../WINGs/wtextfield.c:494
|
||||||
|
msgid "only left alignment is supported in textfields"
|
||||||
|
msgstr "allinnich lofts rjochtsjen wurdt stipe yn tekstfjilden"
|
||||||
|
|
||||||
|
#: ../../WINGs/wwindow.c:160
|
||||||
|
msgid "window title conversion error... using STRING encoding"
|
||||||
|
msgstr "finstertitelomsettingsflater... brûkt STRING-kodearring"
|
||||||
|
|
||||||
|
#: ../../WINGs/wwindow.c:181
|
||||||
|
msgid "icon title conversion error... using STRING encoding"
|
||||||
|
msgstr "ikoantitelomsettingsflater... brûkt STRING-kodearring"
|
||||||
+4
-4
@@ -11,7 +11,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2014-02-18 00:25+0100\n"
|
"PO-Revision-Date: 2014-02-18 00:25+0100\n"
|
||||||
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
|
"Last-Translator: BALATON Zoltán <balaton@eik.bme.hu>\n"
|
||||||
"Language-Team: Hungarian\n"
|
"Language-Team: Hungarian\n"
|
||||||
"Language: \n"
|
"Language: hu\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -197,8 +197,8 @@ msgid "Could not create component %s"
|
|||||||
msgstr "Nem sikerült létrehozni a %s elemet"
|
msgstr "Nem sikerült létrehozni a %s elemet"
|
||||||
|
|
||||||
#: ../../../wmaker-crm/WINGs/userdefaults.c:65
|
#: ../../../wmaker-crm/WINGs/userdefaults.c:65
|
||||||
msgid "variable GNUSTEP_USER_ROOT defined with invalid path, not used"
|
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
|
||||||
msgstr "A GNUSTEP_USER_ROOT változó be van állítva, de rossz értékre. Nem használom"
|
msgstr "A WMAKER_USER_ROOT változó be van állítva, de rossz értékre. Nem használom"
|
||||||
|
|
||||||
#. something happened with the file. just overwrite it
|
#. something happened with the file. just overwrite it
|
||||||
#: ../../../wmaker-crm/WINGs/userdefaults.c:196
|
#: ../../../wmaker-crm/WINGs/userdefaults.c:196
|
||||||
@@ -537,7 +537,7 @@ msgstr "Hiba \"%s\" törlésekor: %s"
|
|||||||
|
|
||||||
#: ../../../wmaker-crm/WINGs/wfilepanel.c:749
|
#: ../../../wmaker-crm/WINGs/wfilepanel.c:749
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occured browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "Hiba történt a '%s' olvasásakor."
|
msgstr "Hiba történt a '%s' olvasásakor."
|
||||||
|
|
||||||
#: ../../../wmaker-crm/WINGs/wfilepanel.c:752
|
#: ../../../wmaker-crm/WINGs/wfilepanel.c:752
|
||||||
|
|||||||
+395
-106
@@ -1,14 +1,14 @@
|
|||||||
# New translation into Dutch for Window Maker
|
# New translation into Dutch for Window Maker
|
||||||
# Copyright (C) 2014 Window Maker Developers Team
|
# Copyright (C) 2014-2019 Window Maker Developers Team
|
||||||
# This file is distributed under the same license as the windowmaker package.
|
# This file is distributed under the same license as the windowmaker package.
|
||||||
# Original by Alwin <translations@ziggo.nl>, 2014.
|
# Original by Alwin <translations@ziggo.nl>, 2014.
|
||||||
#
|
#
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: wmaker-0.95.5-473-gb431dcc3\n"
|
"Project-Id-Version: wmaker-0.95.6+\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2014-06-20 10:55+0200\n"
|
"POT-Creation-Date: 2015-05-18 08:07+0200\n"
|
||||||
"PO-Revision-Date: 2014-06-20 00:00+0200\n"
|
"PO-Revision-Date: 2015-05-18 00:00+0000\n"
|
||||||
"Last-Translator: Alwin <translations@ziggo.nl>\n"
|
"Last-Translator: Alwin <translations@ziggo.nl>\n"
|
||||||
"Language-Team: Dutch\n"
|
"Language-Team: Dutch\n"
|
||||||
"Language: nl\n"
|
"Language: nl\n"
|
||||||
@@ -28,30 +28,226 @@ msgstr "fout: "
|
|||||||
msgid "warning: "
|
msgid "warning: "
|
||||||
msgstr "waarschuwing: "
|
msgstr "waarschuwing: "
|
||||||
|
|
||||||
#: ../../WINGs/findfile.c:61
|
#: ../../WINGs/findfile.c:63
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not get password entry for UID %i"
|
msgid "could not get password entry for UID %i"
|
||||||
msgstr "kon accountgegevens voor UID %i niet krijgen"
|
msgstr "kon accountgegevens voor UID %i niet krijgen"
|
||||||
|
|
||||||
#: ../../WINGs/findfile.c:91
|
#: ../../WINGs/findfile.c:93
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not get password entry for user %s"
|
msgid "could not get password entry for user %s"
|
||||||
msgstr "kon accountgegevens voor gebruiker %s niet krijgen"
|
msgstr "kon accountgegevens voor gebruiker %s niet krijgen"
|
||||||
|
|
||||||
#: ../../WINGs/findfile.c:210
|
#: ../../WINGs/findfile.c:212
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not expand %s"
|
msgid "could not expand %s"
|
||||||
msgstr "kon %s niet uitwerken"
|
msgstr "kon %s niet uitwerken"
|
||||||
|
|
||||||
#: ../../WINGs/findfile.c:444
|
#: ../../WINGs/findfile.c:441
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not open input file \"%s\""
|
msgid "Could not open input file \"%s\": %s"
|
||||||
msgstr "Kon invoerbestand \"%s\" niet openen"
|
msgstr "Kon invoerbestand \"%s\" niet openen: %s"
|
||||||
|
|
||||||
#: ../../WINGs/findfile.c:453
|
#: ../../WINGs/findfile.c:457
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not create target file \"%s\""
|
msgid "Could not create target file \"%s\": %s"
|
||||||
msgstr "Kon doelbestand \"%s\" niet aanmaken"
|
msgstr "Kon doelbestand \"%s\" niet aanmaken: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:465
|
||||||
|
msgid "could not allocate memory for the copy buffer"
|
||||||
|
msgstr "kon geheugen voor de kopiebuffer niet toewijzen"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:482
|
||||||
|
#, c-format
|
||||||
|
msgid "could not read from file \"%s\": %s"
|
||||||
|
msgstr "kon bestand \"%s\" niet inlezen: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:497
|
||||||
|
#, c-format
|
||||||
|
msgid "could not write data to file \"%s\": %s"
|
||||||
|
msgstr "kon geen data schrijven naar bestand \"%s\": %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:509
|
||||||
|
#, c-format
|
||||||
|
msgid "could not set permission 0%03o on file \"%s\": %s"
|
||||||
|
msgstr "kon toestemming 0%03o niet instellen op bestand \"%s\": %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:513
|
||||||
|
#, c-format
|
||||||
|
msgid "could not close the file \"%s\": %s"
|
||||||
|
msgstr "kon bestand \"%s\" niet afsluiten: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:110
|
||||||
|
#, c-format
|
||||||
|
msgid " included from file \"%s\" at line %d"
|
||||||
|
msgstr " ingevoegd uit bestand \"%s\" op regel %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:142
|
||||||
|
#, c-format
|
||||||
|
msgid "missing #endif to match #%s at line %d"
|
||||||
|
msgstr "ontbrekende #endif behorend bij #%s op regel %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:200
|
||||||
|
msgid "multiple SHORTCUT definition not valid"
|
||||||
|
msgstr "meervoudige SHORTCUT-bepalingen niet geldig"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:253
|
||||||
|
msgid "premature end of file while expecting a new line after '\\'"
|
||||||
|
msgstr "voortijdig bestandseinde, verwachtte 'n nieuwe regel na '\\'"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:279
|
||||||
|
#, c-format
|
||||||
|
msgid "reached end of file while searching '*/' for comment started at line %d"
|
||||||
|
msgstr ""
|
||||||
|
"bestandseinde bereikt bij zoeken naar '*/' voor commentaar begonnen op regel "
|
||||||
|
"%d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:344
|
||||||
|
msgid "missing closing double-quote before end-of-line"
|
||||||
|
msgstr "ontbrekend sluitend dubbel aanhalingsteken voor regeleinde"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:362
|
||||||
|
msgid "missing closing simple-quote before end-of-line"
|
||||||
|
msgstr "ontbrekend sluitend enkel aanhalingsteken voor regeleinde"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:380
|
||||||
|
msgid "too many nested macro expansions, breaking loop"
|
||||||
|
msgstr "te veel geneste macro-uitwerkingen, cyclus afgebroken"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:439
|
||||||
|
#, c-format
|
||||||
|
msgid "unknown directive '#%s'"
|
||||||
|
msgstr "onbekende aanwijzing '#%s'"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:444
|
||||||
|
#, c-format
|
||||||
|
msgid "extra text after '#' command is ignored: \"%.16s...\""
|
||||||
|
msgstr "extra tekst na #-commando wordt genegeerd: \"%.16s...\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:459
|
||||||
|
msgid "no file name found for #include"
|
||||||
|
msgstr "geen bestandsnaam gevonden voor #include"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:471
|
||||||
|
msgid "file name must be enclosed in brackets or double-quotes for #define"
|
||||||
|
msgstr ""
|
||||||
|
"bestandsnaam moet omsloten worden met haakjes of dubbele aanhalingstekens "
|
||||||
|
"voor #define"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:485
|
||||||
|
#, c-format
|
||||||
|
msgid "missing closing '%c' in filename specification"
|
||||||
|
msgstr "ontbrekende sluitende '%c' in bestandsnaamopgave"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:503
|
||||||
|
msgid "too many nested #include's"
|
||||||
|
msgstr "te veel geneste #include's"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:568
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find file \"%s\" for #include"
|
||||||
|
msgstr "kon bestand \"%s\" niet vinden voor #include"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:589
|
||||||
|
#, c-format
|
||||||
|
msgid "missing macro name argument to #%s"
|
||||||
|
msgstr "ontbrekend macronaamargument bij #%s"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:600
|
||||||
|
msgid "too many nested #if sequences"
|
||||||
|
msgstr "te veel geneste #if-reeksen"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:626 ../../WINGs/menuparser.c:643
|
||||||
|
#, c-format
|
||||||
|
msgid "found #%s but has no matching #if"
|
||||||
|
msgstr "#%s gevonden, maar heeft geen bijbehorende #if"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:166
|
||||||
|
msgid "no macro name found for #define"
|
||||||
|
msgstr "geen macronaam gevonden voor #define"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:187
|
||||||
|
#, c-format
|
||||||
|
msgid "premature end of file while reading arg-list for macro \"%s\""
|
||||||
|
msgstr "voortijdig bestandseinde bij inlezen arg.-lijst voor macro \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:194
|
||||||
|
#, c-format
|
||||||
|
msgid "too many parameters for macro \"%s\" definition"
|
||||||
|
msgstr "te veel parameters voor bepaling macro \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:209
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"invalid character '%c' in arg-list for macro \"%s\" while expecting "
|
||||||
|
"parameter name"
|
||||||
|
msgstr ""
|
||||||
|
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte "
|
||||||
|
"parameternaam"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:220
|
||||||
|
#, c-format
|
||||||
|
msgid ""
|
||||||
|
"invalid character '%c' in arg-list for macro \"%s\" while expecting ',' or "
|
||||||
|
"')'"
|
||||||
|
msgstr ""
|
||||||
|
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte ',' of "
|
||||||
|
"')'"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:253
|
||||||
|
#, c-format
|
||||||
|
msgid "macro \"%s\" already defined, ignoring redefinition"
|
||||||
|
msgstr "macro \"%s\" al gedefinieerd, negeert herdefiniëren"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:346
|
||||||
|
#, c-format
|
||||||
|
msgid "more content than supported for the macro \"%s\""
|
||||||
|
msgstr "meer inhoud dan ondersteund voor macro \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:455
|
||||||
|
#, c-format
|
||||||
|
msgid "expansion for macro \"%s\" too big, line truncated"
|
||||||
|
msgstr "uitwerking voor macro \"%s\" te groot, regel ingekort"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:467
|
||||||
|
#, c-format
|
||||||
|
msgid "macro \"%s\" needs parenthesis for arguments"
|
||||||
|
msgstr "macro \"%s\" heeft haakjes nodig voor argumenten"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:498
|
||||||
|
msgid "missing closing quote or double-quote before end-of-line"
|
||||||
|
msgstr "ontbrekend sluitend of dubbel aanhalingsteken voor regeleinde"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:521
|
||||||
|
#, c-format
|
||||||
|
msgid "too many arguments for macro \"%s\", expected only %d"
|
||||||
|
msgstr "te veel argumenten voor macro \"%s\", verwachtte alleen %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:530
|
||||||
|
#, c-format
|
||||||
|
msgid "premature end of line while searching for arguments to macro \"%s\""
|
||||||
|
msgstr "voortijdig regeleinde bij zoeken naar argumenten bij macro \"%s\""
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:536
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough arguments for macro \"%s\", expected %d but got only %d"
|
||||||
|
msgstr ""
|
||||||
|
"onvoldoende argumenten voor macro \"%s\", verwachtte %d, maar kreeg alleen %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:541
|
||||||
|
#, c-format
|
||||||
|
msgid "too much data in parameter list of macro \"%s\", truncated"
|
||||||
|
msgstr "te veel data in parameterlijst van macro \"%s\", ingekort"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:561
|
||||||
|
#, c-format
|
||||||
|
msgid "size of value for macro '%s' is too big, truncated"
|
||||||
|
msgstr "waarde voor macro '%s' is te lang, ingekort"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:642 ../../WINGs/menuparser_macros.c:668
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine %s"
|
||||||
|
msgstr "kon %s niet vaststellen"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:78
|
#: ../../WINGs/proplist.c:78
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -65,8 +261,8 @@ msgstr ""
|
|||||||
#: ../../WINGs/proplist.c:167 ../../WINGs/proplist.c:217
|
#: ../../WINGs/proplist.c:167 ../../WINGs/proplist.c:217
|
||||||
#: ../../WINGs/proplist.c:382 ../../WINGs/proplist.c:458
|
#: ../../WINGs/proplist.c:382 ../../WINGs/proplist.c:458
|
||||||
#: ../../WINGs/proplist.c:1048 ../../WINGs/proplist.c:1098
|
#: ../../WINGs/proplist.c:1048 ../../WINGs/proplist.c:1098
|
||||||
#: ../../WINGs/proplist.c:1245 ../../WINGs/proplist.c:1313
|
#: ../../WINGs/proplist.c:1246 ../../WINGs/proplist.c:1314
|
||||||
#: ../../WINGs/proplist.c:1418 ../../WINGs/proplist.c:1462
|
#: ../../WINGs/proplist.c:1419 ../../WINGs/proplist.c:1463
|
||||||
msgid "Used proplist functions on non-WMPropLists objects"
|
msgid "Used proplist functions on non-WMPropLists objects"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -137,71 +333,102 @@ msgstr ""
|
|||||||
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||||
msgstr "Commentaar is niet toegestaan binnen domeinbestanden van WindowMaker."
|
msgstr "Commentaar is niet toegestaan binnen domeinbestanden van WindowMaker."
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1482 ../../WINGs/proplist.c:1547
|
#: ../../WINGs/proplist.c:1483 ../../WINGs/proplist.c:1548
|
||||||
#: ../../WINGs/proplist.c:1604
|
#: ../../WINGs/proplist.c:1612
|
||||||
msgid "extra data after end of property list"
|
msgid "extra data after end of property list"
|
||||||
msgstr "extra data na einde van 'property list'"
|
msgstr "extra data na einde van 'property list'"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1522
|
#: ../../WINGs/proplist.c:1523
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not get size for file '%s'"
|
msgid "could not get size for file '%s'"
|
||||||
msgstr "kon grootte voor bestand '%s' niet krijgen"
|
msgstr "kon grootte voor bestand '%s' niet krijgen"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1530
|
#: ../../WINGs/proplist.c:1531
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "error reading from file '%s'"
|
msgid "error reading from file '%s'"
|
||||||
msgstr "fout bij lezen uit bestand '%s'"
|
msgstr "fout bij inlezen bestand '%s'"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1575
|
#: ../../WINGs/proplist.c:1578
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s:could not open menu file"
|
msgid "%s:could not open menu file"
|
||||||
msgstr "%s:kon menubestand niet openen"
|
msgstr "%s:kon menubestand niet openen"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1642
|
#: ../../WINGs/proplist.c:1660
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "mkstemp (%s) failed"
|
msgid "mkstemp (%s) failed"
|
||||||
msgstr "aanmaken uniek tijdelijk bestand (%s) mislukt"
|
msgstr "aanmaken uniek tijdelijk bestand (%s) mislukt"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1653
|
#: ../../WINGs/proplist.c:1670
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "mktemp (%s) failed"
|
msgid "mktemp (%s) failed"
|
||||||
msgstr "aanmaken tijdelijk bestand (%s) mislukt"
|
msgstr "aanmaken tijdelijk bestand (%s) mislukt"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1660
|
#: ../../WINGs/proplist.c:1677
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "open (%s) failed"
|
msgid "open (%s) failed"
|
||||||
msgstr "openen (%s) mislukt"
|
msgstr "openen (%s) mislukt"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1667
|
#: ../../WINGs/proplist.c:1684
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "writing to file: %s failed"
|
msgid "writing to file: %s failed"
|
||||||
msgstr "schrijven naar bestand: %s mislukt"
|
msgstr "schrijven naar bestand: %s mislukt"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1676
|
#: ../../WINGs/proplist.c:1693
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "fclose (%s) failed"
|
msgid "fclose (%s) failed"
|
||||||
msgstr "afsluiten stream (%s) mislukt"
|
msgstr "afsluiten stream (%s) mislukt"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1684
|
#: ../../WINGs/proplist.c:1701
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "rename ('%s' to '%s') failed"
|
msgid "rename ('%s' to '%s') failed"
|
||||||
msgstr "hernoemen ('%s' naar '%s') mislukt"
|
msgstr "hernoemen ('%s' naar '%s') mislukt"
|
||||||
|
|
||||||
#: ../../WINGs/proplist.c:1755
|
#: ../../WINGs/proplist.c:1772
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Could not create component %s"
|
msgid "Could not create component %s"
|
||||||
msgstr "Kon component %s niet aanmaken"
|
msgstr "Kon component %s niet aanmaken"
|
||||||
|
|
||||||
#: ../../WINGs/userdefaults.c:72
|
#: ../../WINGs/userdefaults.c:72
|
||||||
msgid "variable GNUSTEP_USER_ROOT defined with invalid path, not used"
|
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"variabele GNUSTEP_USER_ROOT, gedefinieerd met ongeldig pad, niet gebruikt"
|
"variabele WMAKER_USER_ROOT, gedefinieerd met ongeldig pad, niet gebruikt"
|
||||||
|
|
||||||
#. something happened with the file. just overwrite it
|
#. something happened with the file. just overwrite it
|
||||||
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225
|
#: ../../WINGs/userdefaults.c:210 ../../WINGs/userdefaults.c:225
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "cannot read domain from file '%s' when syncing"
|
msgid "cannot read domain from file '%s' when syncing"
|
||||||
msgstr "kan domein niet lezen uit bestand '%s' bij synchroniseren"
|
msgstr "kan domeinbestand '%s' niet inlezen bij synchroniseren"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:60
|
||||||
|
#, c-format
|
||||||
|
msgid "unknown XDND action %s"
|
||||||
|
msgstr "onbekende XDND-actie %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:142
|
||||||
|
#, c-format
|
||||||
|
msgid "target %lu for XDND message no longer exists"
|
||||||
|
msgstr "doel %lu voor XDND-bericht bestaat niet meer"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:220
|
||||||
|
#, c-format
|
||||||
|
msgid "unsupported version %i for XDND enter message"
|
||||||
|
msgstr "niet-ondersteunde versie %i voor XDND-bericht bij binnengaan"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:163
|
||||||
|
msgid "XDND selection lost during drag operation..."
|
||||||
|
msgstr "XDND-selectie verloren tijdens versleephandeling..."
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:758
|
||||||
|
msgid "could not get XDND version for target of drop"
|
||||||
|
msgstr "kon XDND-versie niet krijgen voor doel van verslepen"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:774
|
||||||
|
msgid "could not get ownership of XDND selection"
|
||||||
|
msgstr "kon eigendom van XDND-selectie niet krijgen"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:1070
|
||||||
|
msgid "delay for drag destination response expired"
|
||||||
|
msgstr "wachttijd voor antwoord versleepbestemming verstreken"
|
||||||
|
|
||||||
#: ../../WINGs/wcolor.c:204 ../../WINGs/wcolor.c:214 ../../WINGs/wcolor.c:250
|
#: ../../WINGs/wcolor.c:204 ../../WINGs/wcolor.c:214 ../../WINGs/wcolor.c:250
|
||||||
#: ../../WINGs/wcolor.c:288
|
#: ../../WINGs/wcolor.c:288
|
||||||
@@ -225,102 +452,110 @@ msgstr "grijs"
|
|||||||
msgid "dark gray"
|
msgid "dark gray"
|
||||||
msgstr "donkergrijs"
|
msgstr "donkergrijs"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:399
|
#: ../../WINGs/wcolorpanel.c:393
|
||||||
msgid "Colors"
|
msgid "Colors"
|
||||||
msgstr "Kleuren"
|
msgstr "Kleuren"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:574 ../../WINGs/wcolorpanel.c:2726
|
#: ../../WINGs/wcolorpanel.c:568 ../../WINGs/wcolorpanel.c:2720
|
||||||
msgid "Brightness"
|
msgid "Brightness"
|
||||||
msgstr "Helderheid"
|
msgstr "Helderheid"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:576 ../../WINGs/wcolorpanel.c:650
|
#: ../../WINGs/wcolorpanel.c:570 ../../WINGs/wcolorpanel.c:644
|
||||||
#: ../../WINGs/wcolorpanel.c:681 ../../WINGs/wcolorpanel.c:712
|
#: ../../WINGs/wcolorpanel.c:675 ../../WINGs/wcolorpanel.c:706
|
||||||
#: ../../WINGs/wcolorpanel.c:787 ../../WINGs/wcolorpanel.c:818
|
#: ../../WINGs/wcolorpanel.c:781 ../../WINGs/wcolorpanel.c:812
|
||||||
#: ../../WINGs/wcolorpanel.c:850 ../../WINGs/wcolorpanel.c:883
|
#: ../../WINGs/wcolorpanel.c:844 ../../WINGs/wcolorpanel.c:877
|
||||||
#: ../../WINGs/wcolorpanel.c:2022 ../../WINGs/wcolorpanel.c:2728
|
#: ../../WINGs/wcolorpanel.c:2016 ../../WINGs/wcolorpanel.c:2722
|
||||||
#: ../../WINGs/wcolorpanel.c:2762 ../../WINGs/wcolorpanel.c:2796
|
#: ../../WINGs/wcolorpanel.c:2756 ../../WINGs/wcolorpanel.c:2790
|
||||||
msgid "Color Panel: Could not allocate memory"
|
msgid "Color Panel: Could not allocate memory"
|
||||||
msgstr "Kleurenpaneel: Kon geen geheugen toewijzen"
|
msgstr "Kleurenpaneel: Kon geen geheugen toewijzen"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:648
|
#: ../../WINGs/wcolorpanel.c:642
|
||||||
msgid "Red"
|
msgid "Red"
|
||||||
msgstr "Rood"
|
msgstr "Rood"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:679
|
#: ../../WINGs/wcolorpanel.c:673
|
||||||
msgid "Green"
|
msgid "Green"
|
||||||
msgstr "Groen"
|
msgstr "Groen"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:710
|
#: ../../WINGs/wcolorpanel.c:704
|
||||||
msgid "Blue"
|
msgid "Blue"
|
||||||
msgstr "Blauw"
|
msgstr "Blauw"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:785
|
#: ../../WINGs/wcolorpanel.c:718
|
||||||
|
msgid "Decimal"
|
||||||
|
msgstr "Decimaal"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:726
|
||||||
|
msgid "Hexadecimal"
|
||||||
|
msgstr "Hexadecimaal"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:779
|
||||||
msgid "Cyan"
|
msgid "Cyan"
|
||||||
msgstr "Cyaan"
|
msgstr "Cyaan"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:816
|
#: ../../WINGs/wcolorpanel.c:810
|
||||||
msgid "Magenta"
|
msgid "Magenta"
|
||||||
msgstr "Magenta"
|
msgstr "Magenta"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:848
|
#: ../../WINGs/wcolorpanel.c:842
|
||||||
msgid "Yellow"
|
msgid "Yellow"
|
||||||
msgstr "Geel"
|
msgstr "Geel"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:881
|
#: ../../WINGs/wcolorpanel.c:875
|
||||||
msgid "Black"
|
msgid "Black"
|
||||||
msgstr "Zwart"
|
msgstr "Zwart"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:956
|
#: ../../WINGs/wcolorpanel.c:950
|
||||||
msgid "Spectrum"
|
msgid "Spectrum"
|
||||||
msgstr "Spectrum"
|
msgstr "Spectrum"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:982
|
#: ../../WINGs/wcolorpanel.c:976
|
||||||
msgid "Palette"
|
msgid "Palette"
|
||||||
msgstr "Palet"
|
msgstr "Palet"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:987
|
#: ../../WINGs/wcolorpanel.c:981
|
||||||
msgid "New from File..."
|
msgid "New from File..."
|
||||||
msgstr "Nieuw uit bestand..."
|
msgstr "Nieuw uit bestand..."
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:988 ../../WINGs/wcolorpanel.c:1033
|
#: ../../WINGs/wcolorpanel.c:982 ../../WINGs/wcolorpanel.c:1027
|
||||||
#: ../../WINGs/wcolorpanel.c:1048
|
#: ../../WINGs/wcolorpanel.c:1042
|
||||||
msgid "Rename..."
|
msgid "Rename..."
|
||||||
msgstr "Hernoemen..."
|
msgstr "Hernoemen..."
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:989 ../../WINGs/wcolorpanel.c:1034
|
#: ../../WINGs/wcolorpanel.c:983 ../../WINGs/wcolorpanel.c:1028
|
||||||
#: ../../WINGs/wcolorpanel.c:1049 ../../WINGs/wcolorpanel.c:3188
|
#: ../../WINGs/wcolorpanel.c:1043 ../../WINGs/wcolorpanel.c:3180
|
||||||
msgid "Remove"
|
msgid "Remove"
|
||||||
msgstr "Verwijderen"
|
msgstr "Verwijderen"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:990
|
#: ../../WINGs/wcolorpanel.c:984
|
||||||
msgid "Copy"
|
msgid "Copy"
|
||||||
msgstr "Kopiëren"
|
msgstr "Kopiëren"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:991
|
#: ../../WINGs/wcolorpanel.c:985
|
||||||
msgid "New from Clipboard"
|
msgid "New from Clipboard"
|
||||||
msgstr "Nieuw van klembord"
|
msgstr "Nieuw van klembord"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1010
|
#: ../../WINGs/wcolorpanel.c:1004
|
||||||
msgid "X11-Colors"
|
msgid "X11-Colors"
|
||||||
msgstr "X11-kleuren"
|
msgstr "X11-kleuren"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1027
|
#: ../../WINGs/wcolorpanel.c:1021
|
||||||
msgid "Color"
|
msgid "Color"
|
||||||
msgstr "Kleur"
|
msgstr "Kleur"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1032
|
#: ../../WINGs/wcolorpanel.c:1026
|
||||||
msgid "Add..."
|
msgid "Add..."
|
||||||
msgstr "Toevoegen..."
|
msgstr "Toevoegen..."
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1042
|
#: ../../WINGs/wcolorpanel.c:1036
|
||||||
msgid "List"
|
msgid "List"
|
||||||
msgstr "Lijst"
|
msgstr "Lijst"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1047
|
#: ../../WINGs/wcolorpanel.c:1041
|
||||||
msgid "New..."
|
msgid "New..."
|
||||||
msgstr "Nieuw..."
|
msgstr "Nieuw..."
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1176
|
#: ../../WINGs/wcolorpanel.c:1170
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid ""
|
msgid ""
|
||||||
"Color Panel: Could not create directory %s needed to store configurations"
|
"Color Panel: Could not create directory %s needed to store configurations"
|
||||||
@@ -328,76 +563,76 @@ msgstr ""
|
|||||||
"Kleurenpaneel: Kon map %s, nodig om instellingen op te slaan, niet aanmaken"
|
"Kleurenpaneel: Kon map %s, nodig om instellingen op te slaan, niet aanmaken"
|
||||||
|
|
||||||
#. Delete the file, it doesn't belong here
|
#. Delete the file, it doesn't belong here
|
||||||
#: ../../WINGs/wcolorpanel.c:1182 ../../WINGs/wcolorpanel.c:3081
|
#: ../../WINGs/wcolorpanel.c:1176 ../../WINGs/wcolorpanel.c:3073
|
||||||
#: ../../WINGs/wcolorpanel.c:3085
|
#: ../../WINGs/wcolorpanel.c:3077
|
||||||
msgid "File Error"
|
msgid "File Error"
|
||||||
msgstr "Bestandsfout"
|
msgstr "Bestandsfout"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1183
|
#: ../../WINGs/wcolorpanel.c:1177
|
||||||
msgid "Could not create ColorPanel configuration directory"
|
msgid "Could not create ColorPanel configuration directory"
|
||||||
msgstr "Kon instellingenmap Kleurenpaneel niet aanmaken"
|
msgstr "Kon instellingenmap Kleurenpaneel niet aanmaken"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1184 ../../WINGs/wcolorpanel.c:3082
|
#: ../../WINGs/wcolorpanel.c:1178 ../../WINGs/wcolorpanel.c:3074
|
||||||
#: ../../WINGs/wcolorpanel.c:3087 ../../WINGs/wcolorpanel.c:3112
|
#: ../../WINGs/wcolorpanel.c:3079 ../../WINGs/wcolorpanel.c:3104
|
||||||
#: ../../WINGs/wfilepanel.c:227 ../../WINGs/wfilepanel.c:596
|
#: ../../WINGs/wfilepanel.c:227 ../../WINGs/wfilepanel.c:596
|
||||||
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
||||||
#: ../../WINGs/wfilepanel.c:883 ../../WINGs/wfontpanel.c:534
|
#: ../../WINGs/wfilepanel.c:883 ../../WINGs/wfontpanel.c:532
|
||||||
msgid "OK"
|
msgid "OK"
|
||||||
msgstr "OK"
|
msgstr "OK"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1190
|
#: ../../WINGs/wcolorpanel.c:1184
|
||||||
msgid "Color Panel: Could not find file"
|
msgid "Color Panel: Could not find file"
|
||||||
msgstr "Kleurenpaneel: Kon bestand niet vinden"
|
msgstr "Kleurenpaneel: Kon bestand niet vinden"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:1386 ../../WINGs/wcolorpanel.c:1447
|
#: ../../WINGs/wcolorpanel.c:1380 ../../WINGs/wcolorpanel.c:1441
|
||||||
#: ../../WINGs/wcolorpanel.c:1507
|
#: ../../WINGs/wcolorpanel.c:1501
|
||||||
msgid "Color Panel: X failed request"
|
msgid "Color Panel: X failed request"
|
||||||
msgstr "Kleurenpaneel: X-aanvraag mislukt"
|
msgstr "Kleurenpaneel: X-aanvraag mislukt"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:2760
|
#: ../../WINGs/wcolorpanel.c:2754
|
||||||
msgid "Saturation"
|
msgid "Saturation"
|
||||||
msgstr "Verzadiging"
|
msgstr "Verzadiging"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:2794
|
#: ../../WINGs/wcolorpanel.c:2788
|
||||||
msgid "Hue"
|
msgid "Hue"
|
||||||
msgstr "Tint"
|
msgstr "Tint"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3020
|
#: ../../WINGs/wcolorpanel.c:3012
|
||||||
msgid "Open Palette"
|
msgid "Open Palette"
|
||||||
msgstr "Open palet"
|
msgstr "Open palet"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3082
|
#: ../../WINGs/wcolorpanel.c:3074
|
||||||
msgid "Invalid file format !"
|
msgid "Invalid file format !"
|
||||||
msgstr "Ongeldige bestandsvorm!"
|
msgstr "Ongeldige bestandsvorm!"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3084
|
#: ../../WINGs/wcolorpanel.c:3076
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "can't remove file %s"
|
msgid "can't remove file %s"
|
||||||
msgstr "kan bestand %s niet verwijderen"
|
msgstr "kan bestand %s niet verwijderen"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3086
|
#: ../../WINGs/wcolorpanel.c:3078
|
||||||
msgid "Couldn't remove file from Configuration Directory !"
|
msgid "Couldn't remove file from Configuration Directory !"
|
||||||
msgstr "Kon bestand niet verwijderen uit instellingenmap!"
|
msgstr "Kon bestand niet verwijderen uit instellingenmap!"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3111
|
#: ../../WINGs/wcolorpanel.c:3103
|
||||||
msgid "Rename"
|
msgid "Rename"
|
||||||
msgstr "Hernoemen"
|
msgstr "Hernoemen"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3111
|
#: ../../WINGs/wcolorpanel.c:3103
|
||||||
msgid "Rename palette to:"
|
msgid "Rename palette to:"
|
||||||
msgstr "Hernoem palet naar:"
|
msgstr "Hernoem palet naar:"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3112 ../../WINGs/wfilepanel.c:236
|
#: ../../WINGs/wcolorpanel.c:3104 ../../WINGs/wfilepanel.c:236
|
||||||
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
||||||
msgid "Cancel"
|
msgid "Cancel"
|
||||||
msgstr "Annuleren"
|
msgstr "Annuleren"
|
||||||
|
|
||||||
#. Careful, this palette exists already
|
#. Careful, this palette exists already
|
||||||
#: ../../WINGs/wcolorpanel.c:3128 ../../WINGs/wfilepanel.c:715
|
#: ../../WINGs/wcolorpanel.c:3120 ../../WINGs/wfilepanel.c:715
|
||||||
msgid "Warning"
|
msgid "Warning"
|
||||||
msgstr "Waarschuwing"
|
msgstr "Waarschuwing"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3129
|
#: ../../WINGs/wcolorpanel.c:3121
|
||||||
msgid ""
|
msgid ""
|
||||||
"Palette already exists !\n"
|
"Palette already exists !\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -407,24 +642,24 @@ msgstr ""
|
|||||||
"\n"
|
"\n"
|
||||||
"Overschrijven?"
|
"Overschrijven?"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3129 ../../WINGs/wcolorpanel.c:3188
|
#: ../../WINGs/wcolorpanel.c:3121 ../../WINGs/wcolorpanel.c:3180
|
||||||
msgid "No"
|
msgid "No"
|
||||||
msgstr "Nee"
|
msgstr "Nee"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3129 ../../WINGs/wcolorpanel.c:3188
|
#: ../../WINGs/wcolorpanel.c:3121 ../../WINGs/wcolorpanel.c:3180
|
||||||
msgid "Yes"
|
msgid "Yes"
|
||||||
msgstr "Ja"
|
msgstr "Ja"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3160
|
#: ../../WINGs/wcolorpanel.c:3152
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Couldn't rename palette %s to %s"
|
msgid "Couldn't rename palette %s to %s"
|
||||||
msgstr "Kon palet %s niet hernoemen naar %s"
|
msgstr "Kon palet %s niet hernoemen naar %s"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3183
|
#: ../../WINGs/wcolorpanel.c:3175
|
||||||
msgid "This will permanently remove the palette "
|
msgid "This will permanently remove the palette "
|
||||||
msgstr "Dit zal 't palet "
|
msgstr "Dit zal 't palet "
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3185
|
#: ../../WINGs/wcolorpanel.c:3177
|
||||||
msgid ""
|
msgid ""
|
||||||
".\n"
|
".\n"
|
||||||
"\n"
|
"\n"
|
||||||
@@ -434,12 +669,12 @@ msgstr ""
|
|||||||
"\n"
|
"\n"
|
||||||
"Weet u zeker dat u dit palet wilt verwijderen?"
|
"Weet u zeker dat u dit palet wilt verwijderen?"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3207
|
#: ../../WINGs/wcolorpanel.c:3199
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Couldn't remove palette %s"
|
msgid "Couldn't remove palette %s"
|
||||||
msgstr "Kon palet %s niet verwijderen"
|
msgstr "Kon palet %s niet verwijderen"
|
||||||
|
|
||||||
#: ../../WINGs/wcolorpanel.c:3497
|
#: ../../WINGs/wcolorpanel.c:3499
|
||||||
msgid "Color Panel: Color unspecified"
|
msgid "Color Panel: Color unspecified"
|
||||||
msgstr "Kleurenpaneel: Kleur niet opgegeven"
|
msgstr "Kleurenpaneel: Kleur niet opgegeven"
|
||||||
|
|
||||||
@@ -458,15 +693,15 @@ msgstr "Opslaan"
|
|||||||
#: ../../WINGs/wfilepanel.c:506
|
#: ../../WINGs/wfilepanel.c:506
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "WINGs: could not open directory %s\n"
|
msgid "WINGs: could not open directory %s\n"
|
||||||
msgstr "WINGs: kon map %s niet openen\n"
|
msgstr "WINGs: Kon map %s niet openen\n"
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:526
|
#: ../../WINGs/wfilepanel.c:526
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "WINGs: could not stat %s\n"
|
msgid "WINGs: could not stat %s\n"
|
||||||
msgstr "WINGs: kon status %s niet vaststellen\n"
|
msgstr "WINGs: Kon status %s niet vaststellen\n"
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:596 ../../WINGs/wfilepanel.c:883
|
#: ../../WINGs/wfilepanel.c:596 ../../WINGs/wfilepanel.c:883
|
||||||
#: ../../WINGs/wfontpanel.c:533
|
#: ../../WINGs/wfontpanel.c:531
|
||||||
msgid "Error"
|
msgid "Error"
|
||||||
msgstr "Fout"
|
msgstr "Fout"
|
||||||
|
|
||||||
@@ -508,8 +743,8 @@ msgstr "Verwijderen %s mislukt: %s"
|
|||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:751
|
#: ../../WINGs/wfilepanel.c:751
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occured browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "'n Fout trad op bij bladeren door '%s'."
|
msgstr "Er trad 'n fout op bij bladeren door '%s'."
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:754
|
#: ../../WINGs/wfilepanel.c:754
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -520,55 +755,60 @@ msgstr "'%s' is geen map."
|
|||||||
msgid "File does not exist."
|
msgid "File does not exist."
|
||||||
msgstr "Bestand bestaat niet."
|
msgstr "Bestand bestaat niet."
|
||||||
|
|
||||||
#: ../../WINGs/wfont.c:37
|
#: ../../WINGs/wfont.c:43
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "invalid font: %s. Trying '%s'"
|
msgid "invalid font: %s. Trying '%s'"
|
||||||
msgstr "ongeldig lettertype: %s. Probeert '%s'"
|
msgstr "ongeldig lettertype: %s. Probeert '%s'"
|
||||||
|
|
||||||
#: ../../WINGs/wfont.c:227 ../../WINGs/wfont.c:245
|
#: ../../WINGs/wfont.c:260 ../../WINGs/wfont.c:278
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "could not load font: %s."
|
msgid "could not load font: %s."
|
||||||
msgstr "kon lettertype niet laden: %s."
|
msgstr "kon lettertype niet laden: %s."
|
||||||
|
|
||||||
#. WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr));
|
#. WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr));
|
||||||
#: ../../WINGs/wfontpanel.c:186
|
#: ../../WINGs/wfontpanel.c:184
|
||||||
msgid "Font Panel"
|
msgid "Font Panel"
|
||||||
msgstr "Lettertypen"
|
msgstr "Lettertypen"
|
||||||
|
|
||||||
#: ../../WINGs/wfontpanel.c:222
|
#: ../../WINGs/wfontpanel.c:220
|
||||||
msgid "The quick brown fox jumps over the lazy dog"
|
msgid "The quick brown fox jumps over the lazy dog"
|
||||||
msgstr "De snelle bruine vos springt over de luie hond"
|
msgstr "De snelle bruine vos springt over de luie hond"
|
||||||
|
|
||||||
#: ../../WINGs/wfontpanel.c:228
|
#: ../../WINGs/wfontpanel.c:226
|
||||||
msgid "Family"
|
msgid "Family"
|
||||||
msgstr "Familie"
|
msgstr "Familie"
|
||||||
|
|
||||||
#: ../../WINGs/wfontpanel.c:239
|
#: ../../WINGs/wfontpanel.c:237
|
||||||
msgid "Typeface"
|
msgid "Typeface"
|
||||||
msgstr "Lettertype"
|
msgstr "Lettertype"
|
||||||
|
|
||||||
#: ../../WINGs/wfontpanel.c:250
|
#: ../../WINGs/wfontpanel.c:248
|
||||||
msgid "Size"
|
msgid "Size"
|
||||||
msgstr "Grootte"
|
msgstr "Grootte"
|
||||||
|
|
||||||
#: ../../WINGs/wfontpanel.c:269
|
#: ../../WINGs/wfontpanel.c:267
|
||||||
msgid "Set"
|
msgid "Set"
|
||||||
msgstr "Instellen"
|
msgstr "Instellen"
|
||||||
|
|
||||||
#: ../../WINGs/wfontpanel.c:275
|
#: ../../WINGs/wfontpanel.c:273
|
||||||
msgid "Revert"
|
msgid "Revert"
|
||||||
msgstr "Herstellen"
|
msgstr "Herstellen"
|
||||||
|
|
||||||
#: ../../WINGs/wfontpanel.c:534
|
#: ../../WINGs/wfontpanel.c:532
|
||||||
msgid "Could not init font config library\n"
|
msgid "Could not init font config library\n"
|
||||||
msgstr "Kon bibliotheek 'lettertype instellen' niet initialiseren\n"
|
msgstr "Kon bibliotheek 'lettertype instellen' niet initialiseren\n"
|
||||||
|
|
||||||
#: ../../WINGs/widgets.c:389
|
#: ../../WINGs/widgets.c:446
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "WINGs: could not load widget images file: %s"
|
msgid "WINGs: could not load widget images file: %s"
|
||||||
msgstr "WINGs: kon afbeeldingenbestand besturingselementen niet laden: %s"
|
msgstr "WINGs: Kon afbeeldingenbestand besturingselementen niet laden: %s"
|
||||||
|
|
||||||
#: ../../WINGs/widgets.c:724
|
#: ../../WINGs/widgets.c:542
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not open display %s"
|
||||||
|
msgstr "WINGs: Kon scherm %s niet openen"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:771
|
||||||
msgid ""
|
msgid ""
|
||||||
"could not load any fonts. Make sure your font installation and locale "
|
"could not load any fonts. Make sure your font installation and locale "
|
||||||
"settings are correct."
|
"settings are correct."
|
||||||
@@ -576,6 +816,55 @@ msgstr ""
|
|||||||
"kon geen lettertypen laden. Zorg ervoor dat uw geïnstalleerde lettertypen en "
|
"kon geen lettertypen laden. Zorg ervoor dat uw geïnstalleerde lettertypen en "
|
||||||
"lokalisatie-instellingen juist zijn."
|
"lokalisatie-instellingen juist zijn."
|
||||||
|
|
||||||
|
#: ../../WINGs/winputmethod.c:65
|
||||||
|
msgid "could not add destroy callback for XIM input method"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: ../../WINGs/wruler.c:175
|
#: ../../WINGs/wruler.c:175
|
||||||
msgid "0 inches"
|
msgid "0 inches"
|
||||||
msgstr "0 inch"
|
msgstr "0 inch"
|
||||||
|
|
||||||
|
#: ../../WINGs/wtextfield.c:494
|
||||||
|
msgid "only left alignment is supported in textfields"
|
||||||
|
msgstr "alleen links uitlijnen wordt ondersteund in tekstvelden"
|
||||||
|
|
||||||
|
#: ../../WINGs/wwindow.c:160
|
||||||
|
msgid "window title conversion error... using STRING encoding"
|
||||||
|
msgstr "venstertitelomzettingsfout... gebruikt STRING-codering"
|
||||||
|
|
||||||
|
#: ../../WINGs/wwindow.c:181
|
||||||
|
msgid "icon title conversion error... using STRING encoding"
|
||||||
|
msgstr "icoontitelomzettingsfout... gebruikt STRING-codering"
|
||||||
|
|
||||||
|
# Keep next entries for wmaker-0.95.6
|
||||||
|
msgid "Could not open input file \"%s\""
|
||||||
|
msgstr "Kon invoerbestand \"%s\" niet openen"
|
||||||
|
|
||||||
|
msgid "Could not create target file \"%s\""
|
||||||
|
msgstr "Kon doelbestand \"%s\" niet aanmaken"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"invalid characted '%c' in arg-list for macro \"%s\" while expecting "
|
||||||
|
"parameter name"
|
||||||
|
msgstr ""
|
||||||
|
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte "
|
||||||
|
"parameternaam"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"invalid characted '%c' in arg-list for macro \"%s\" while expecting ',' "
|
||||||
|
"or ')'"
|
||||||
|
msgstr ""
|
||||||
|
"ongeldig letterteken '%c' in arg.-lijst voor macro \"%s\", verwachtte ',' "
|
||||||
|
"of ')'"
|
||||||
|
|
||||||
|
msgid "found #%s but have no matching #if"
|
||||||
|
msgstr "#%s gevonden, maar heeft geen bijbehorende #if"
|
||||||
|
|
||||||
|
msgid "too many nested includes"
|
||||||
|
msgstr "te veel geneste #include's"
|
||||||
|
|
||||||
|
msgid "could not find file \"%s\" for include"
|
||||||
|
msgstr "kon bestand \"%s\" niet vinden voor #include"
|
||||||
|
|
||||||
|
msgid "too many nested macro expansion, breaking loop"
|
||||||
|
msgstr "te veel geneste macro-uitwerkingen, cyclus afgebroken"
|
||||||
|
|||||||
+2
-1
@@ -19,6 +19,7 @@ msgstr ""
|
|||||||
"PO-Revision-Date: 2001-12-20 04:00+0100\n"
|
"PO-Revision-Date: 2001-12-20 04:00+0100\n"
|
||||||
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
|
"Last-Translator: Jan \"judas\" Tomka <judas@linux.sk>\n"
|
||||||
"Language-Team: Slovak <sk@li.org>\n"
|
"Language-Team: Slovak <sk@li.org>\n"
|
||||||
|
"Language: sk\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
@@ -557,7 +558,7 @@ msgstr "'%s' je adresár."
|
|||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:832
|
#: ../../WINGs/wfilepanel.c:832
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "An error occured browsing '%s'."
|
msgid "An error occurred browsing '%s'."
|
||||||
msgstr "Pri prehliadaní '%s' nastala chyba."
|
msgstr "Pri prehliadaní '%s' nastala chyba."
|
||||||
|
|
||||||
#: ../../WINGs/wfilepanel.c:836
|
#: ../../WINGs/wfilepanel.c:836
|
||||||
|
|||||||
+806
@@ -0,0 +1,806 @@
|
|||||||
|
# Serbian messages for Window Maker
|
||||||
|
# Copyright (C) 1997-2006 Alfredo K. Kojima
|
||||||
|
# 1998-2006 Dan Pascu
|
||||||
|
# 2013-2020 Window Maker Developers Team
|
||||||
|
# This file is distributed under the same license as the Window Maker package.
|
||||||
|
# Strahinya Radich (Страхиња Радић) <sr@strahinja.org>, 2023.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: WindowMaker 0.96.0\n"
|
||||||
|
"Report-Msgid-Bugs-To: wmaker-dev@googlegroups.com\n"
|
||||||
|
"POT-Creation-Date: 2023-11-02 19:36+0100\n"
|
||||||
|
"PO-Revision-Date: 2023-11-02 19:48+0100\n"
|
||||||
|
"Last-Translator: Страхиња Радић <sr@strahinja.org>\n"
|
||||||
|
"Language-Team: Serbian <sr@li.org>\n"
|
||||||
|
"Language: sr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||||
|
"X-Generator: poe 1.6.0-1-g10e6dcc\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:106
|
||||||
|
msgid "fatal: "
|
||||||
|
msgstr "фатално: "
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:112
|
||||||
|
msgid "error: "
|
||||||
|
msgstr "грешка: "
|
||||||
|
|
||||||
|
#: ../../WINGs/error.c:118
|
||||||
|
msgid "warning: "
|
||||||
|
msgstr "упозорење: "
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:59
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get password entry for UID %i"
|
||||||
|
msgstr "не може се добавити унос лозинке за UID %i"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:89
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get password entry for user %s"
|
||||||
|
msgstr "не може се добавити унос лозинке за корисника %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:208
|
||||||
|
#, c-format
|
||||||
|
msgid "could not expand %s"
|
||||||
|
msgstr "не може се проширити %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:437
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not open input file \"%s\": %s"
|
||||||
|
msgstr "Не може се отворити улазна датотека „%s“: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:453
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not create target file \"%s\": %s"
|
||||||
|
msgstr "Не може се креирати одредишна датотека „%s“: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:461
|
||||||
|
msgid "could not allocate memory for the copy buffer"
|
||||||
|
msgstr "не може се алоцирати меморија за бафер за копирање"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:478
|
||||||
|
#, c-format
|
||||||
|
msgid "could not read from file \"%s\": %s"
|
||||||
|
msgstr "не може се прочитати датотека „%s“: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:493
|
||||||
|
#, c-format
|
||||||
|
msgid "could not write data to file \"%s\": %s"
|
||||||
|
msgstr "не могу се уписати подаци у датотеку „%s“: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:505
|
||||||
|
#, c-format
|
||||||
|
msgid "could not set permission 0%03o on file \"%s\": %s"
|
||||||
|
msgstr "не може се поставити дозвола 0%03o на датотеци „%s“: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/findfile.c:509
|
||||||
|
#, c-format
|
||||||
|
msgid "could not close the file \"%s\": %s"
|
||||||
|
msgstr "не може се затворити датотека „%s“: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:110
|
||||||
|
#, c-format
|
||||||
|
msgid " included from file \"%s\" at line %d"
|
||||||
|
msgstr " укључена из датотеке „%s“ у реду %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:142
|
||||||
|
#, c-format
|
||||||
|
msgid "missing #endif to match #%s at line %d"
|
||||||
|
msgstr "недостаје #endif који би одговарао #%s у реду %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:200
|
||||||
|
msgid "multiple SHORTCUT definition not valid"
|
||||||
|
msgstr "вишеструка дефиниција SHORTCUT није исправна"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:253
|
||||||
|
msgid "premature end of file while expecting a new line after '\\'"
|
||||||
|
msgstr "прерани крај датотеке док се очекивао нови ред после „\\“"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:279
|
||||||
|
#, c-format
|
||||||
|
msgid "reached end of file while searching '*/' for comment started at line %d"
|
||||||
|
msgstr "достигнут крај датотеке приликом тражења „*/“ за коментар започет у реду %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:344
|
||||||
|
msgid "missing closing double-quote before end-of-line"
|
||||||
|
msgstr "недостаје завршни наводник пре краја реда"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:362
|
||||||
|
msgid "missing closing simple-quote before end-of-line"
|
||||||
|
msgstr "недостаје завршни апостроф пре краја реда"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:380
|
||||||
|
msgid "too many nested macro expansions, breaking loop"
|
||||||
|
msgstr "превише угњеждених проширења макроа, прекида се петља"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:439
|
||||||
|
#, c-format
|
||||||
|
msgid "unknown directive '#%s'"
|
||||||
|
msgstr "непозната директива „#%s“"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:444
|
||||||
|
#, c-format
|
||||||
|
msgid "extra text after '#' command is ignored: \"%.16s...\""
|
||||||
|
msgstr "сувишни текст после наредбе „#“ је игнорисан: „%.16s...“"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:459
|
||||||
|
msgid "no file name found for #include"
|
||||||
|
msgstr "назив датотеке у #include-у није пронађен"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:471
|
||||||
|
msgid "file name must be enclosed in brackets or double-quotes for #define"
|
||||||
|
msgstr "назив датотеке у #define-у мора бити окружен угластим заградама или наводницима"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:485
|
||||||
|
#, c-format
|
||||||
|
msgid "missing closing '%c' in filename specification"
|
||||||
|
msgstr "недостаје завршно „%c“ у задавању назива датотеке"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:503
|
||||||
|
msgid "too many nested #include's"
|
||||||
|
msgstr "превише угњеждених #include-ова"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:568
|
||||||
|
#, c-format
|
||||||
|
msgid "could not find file \"%s\" for #include"
|
||||||
|
msgstr "не може се наћи датотека „%s“ у #include-у"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:589
|
||||||
|
#, c-format
|
||||||
|
msgid "missing macro name argument to #%s"
|
||||||
|
msgstr "недостаје аргумент #%s - назив макроа"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:600
|
||||||
|
msgid "too many nested #if sequences"
|
||||||
|
msgstr "превише угњеждених секвенци #if"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser.c:626 ../../WINGs/menuparser.c:643
|
||||||
|
#, c-format
|
||||||
|
msgid "found #%s but has no matching #if"
|
||||||
|
msgstr "пронађено #%s, али без одговарајућег #if"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:166
|
||||||
|
msgid "no macro name found for #define"
|
||||||
|
msgstr "назив макроа за #define није пронађен"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:188
|
||||||
|
#, c-format
|
||||||
|
msgid "premature end of file while reading arg-list for macro \"%s\""
|
||||||
|
msgstr "прерани крај датотеке приликом читања листе аргумената за макро „%s“"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:195
|
||||||
|
#, c-format
|
||||||
|
msgid "too many parameters for macro \"%s\" definition"
|
||||||
|
msgstr "превише параметара за дефиницију макроа „%s“"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:210
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid character '%c' in arg-list for macro \"%s\" while expecting parameter name"
|
||||||
|
msgstr "неисправни знак „%c“ у листи аргумената за макро „%s“ док се очекивао назив параметра"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:221
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid character '%c' in arg-list for macro \"%s\" while expecting ',' or ')'"
|
||||||
|
msgstr "неисправни знак „%c“ у листи аргумената за макро „%s“ док се очекивало „,“ или „)“"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:254
|
||||||
|
#, c-format
|
||||||
|
msgid "macro \"%s\" already defined, ignoring redefinition"
|
||||||
|
msgstr "макро „%s“ је већ дефинисан, игнорише се поновна дефиниција"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:348
|
||||||
|
#, c-format
|
||||||
|
msgid "more content than supported for the macro \"%s\""
|
||||||
|
msgstr "више садржаја него што је подржано за макро „%s“"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:459
|
||||||
|
#, c-format
|
||||||
|
msgid "expansion for macro \"%s\" too big, line truncated"
|
||||||
|
msgstr "проширење макроа „%s“ је превелико, ред је исечен"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:471
|
||||||
|
#, c-format
|
||||||
|
msgid "macro \"%s\" needs parenthesis for arguments"
|
||||||
|
msgstr "макроу „%s“ су потребне заграде за аргументе"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:502
|
||||||
|
msgid "missing closing quote or double-quote before end-of-line"
|
||||||
|
msgstr "недостаје завршни наводник или апостроф пре краја реда"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:525
|
||||||
|
#, c-format
|
||||||
|
msgid "too many arguments for macro \"%s\", expected only %d"
|
||||||
|
msgstr "превише аргумената за макро „%s“, очекује се само %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:534
|
||||||
|
#, c-format
|
||||||
|
msgid "premature end of line while searching for arguments to macro \"%s\""
|
||||||
|
msgstr "прерани крај реда приликом тражења аргумената за макро „%s“"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:540
|
||||||
|
#, c-format
|
||||||
|
msgid "not enough arguments for macro \"%s\", expected %d but got only %d"
|
||||||
|
msgstr "недовољно аргумената за макро „%s“, очекује се %d, али само постоји %d"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:545
|
||||||
|
#, c-format
|
||||||
|
msgid "too much data in parameter list of macro \"%s\", truncated"
|
||||||
|
msgstr "превише података у листи параметара макроа „%s“, исечено"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:565
|
||||||
|
#, c-format
|
||||||
|
msgid "size of value for macro '%s' is too big, truncated"
|
||||||
|
msgstr "величина вредности макроа „%s“ је превелика, исечено"
|
||||||
|
|
||||||
|
#: ../../WINGs/menuparser_macros.c:646 ../../WINGs/menuparser_macros.c:672
|
||||||
|
#, c-format
|
||||||
|
msgid "could not determine %s"
|
||||||
|
msgstr "не може се одредити %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:78
|
||||||
|
#, c-format
|
||||||
|
msgid "syntax error in %s %s, line %i: %s"
|
||||||
|
msgstr "синтаксна грешка у %s %s, ред %i: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:134
|
||||||
|
msgid "Only string or data is supported for a proplist dictionary key"
|
||||||
|
msgstr "Само ниска или подаци су подржани у proplist речничком кључу"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:167 ../../WINGs/proplist.c:217
|
||||||
|
#: ../../WINGs/proplist.c:382 ../../WINGs/proplist.c:458
|
||||||
|
#: ../../WINGs/proplist.c:1048 ../../WINGs/proplist.c:1098
|
||||||
|
#: ../../WINGs/proplist.c:1246 ../../WINGs/proplist.c:1326
|
||||||
|
#: ../../WINGs/proplist.c:1431 ../../WINGs/proplist.c:1475
|
||||||
|
msgid "Used proplist functions on non-WMPropLists objects"
|
||||||
|
msgstr "Користе се proplist функције над не-WMPropLists објектима"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:635
|
||||||
|
msgid "unterminated PropList string"
|
||||||
|
msgstr "незатворена PropList ниска"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:673
|
||||||
|
msgid "unterminated PropList data"
|
||||||
|
msgstr "незатворен PropList податак"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:681
|
||||||
|
msgid "unterminated PropList data (missing hexdigit)"
|
||||||
|
msgstr "незатворен PropList податак (недостаје хекс-цифра)"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:693 ../../WINGs/proplist.c:698
|
||||||
|
msgid "non hexdigit character in PropList data"
|
||||||
|
msgstr "знак који није хекс-цифра у PropList подацима"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:730
|
||||||
|
msgid "unterminated PropList array"
|
||||||
|
msgstr "незатворен PropList низ"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:738
|
||||||
|
msgid "missing or unterminated PropList array"
|
||||||
|
msgstr "недостајући или незатворени PropList низ"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:748
|
||||||
|
msgid "could not get PropList array element"
|
||||||
|
msgstr "не може се добавити елемент PropList низа"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:775
|
||||||
|
msgid "unterminated PropList dictionary"
|
||||||
|
msgstr "незатворени PropList речник"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:792
|
||||||
|
msgid "missing PropList dictionary key"
|
||||||
|
msgstr "недостајући кључ PropList речника"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:794
|
||||||
|
msgid "missing PropList dictionary entry key or unterminated dictionary"
|
||||||
|
msgstr "недостаје кључ PropList речничке ставке или је речник незатворен"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:802
|
||||||
|
msgid "error parsing PropList dictionary key"
|
||||||
|
msgstr "грешка приликом рашчлањивања кључа PropList речника"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:810
|
||||||
|
msgid "missing = in PropList dictionary entry"
|
||||||
|
msgstr "недостаје = у ставци PropList речника"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:818
|
||||||
|
msgid "error parsing PropList dictionary entry value"
|
||||||
|
msgstr "грешка приликом рашчлањивања вредности PropList речничког уноса"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:826
|
||||||
|
msgid "missing ; in PropList dictionary entry"
|
||||||
|
msgstr "недостаје ; у речничком уносу PropList"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:885
|
||||||
|
msgid "was expecting a string, data, array or dictionary. If it's a string, try enclosing it with \"."
|
||||||
|
msgstr "очекује се ниска, податак, низ или речник. Ако је у питању ниска, пробајте да је окружите са \"."
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:888
|
||||||
|
msgid "Comments are not allowed inside WindowMaker owned domain files."
|
||||||
|
msgstr "Коментари нису дозвољени унутар датотека домена WindowMaker-а."
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1495 ../../WINGs/proplist.c:1560
|
||||||
|
#: ../../WINGs/proplist.c:1624
|
||||||
|
msgid "extra data after end of property list"
|
||||||
|
msgstr "вишак података после листе особина"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1535
|
||||||
|
#, c-format
|
||||||
|
msgid "could not get size for file '%s'"
|
||||||
|
msgstr "не може се одредити величина датотеке „%s“"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1543
|
||||||
|
#, c-format
|
||||||
|
msgid "error reading from file '%s'"
|
||||||
|
msgstr "грешка приликом читања датотеке „%s“"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1590
|
||||||
|
#, c-format
|
||||||
|
msgid "%s:could not open menu file"
|
||||||
|
msgstr "%s:не може се отворити датотека менија"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1672
|
||||||
|
#, c-format
|
||||||
|
msgid "mkstemp (%s) failed"
|
||||||
|
msgstr "mkstemp (%s) није успео"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1682
|
||||||
|
#, c-format
|
||||||
|
msgid "mktemp (%s) failed"
|
||||||
|
msgstr "mktemp (%s) није успео"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1689
|
||||||
|
#, c-format
|
||||||
|
msgid "open (%s) failed"
|
||||||
|
msgstr "open (%s) није успео"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1696
|
||||||
|
#, c-format
|
||||||
|
msgid "writing to file: %s failed"
|
||||||
|
msgstr "уписивање у датотеку: %s није успело"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1706
|
||||||
|
#, c-format
|
||||||
|
msgid "fclose (%s) failed"
|
||||||
|
msgstr "fclose (%s) није успео"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1714
|
||||||
|
#, c-format
|
||||||
|
msgid "rename ('%s' to '%s') failed"
|
||||||
|
msgstr "rename („%s“ у „%s“) није успео"
|
||||||
|
|
||||||
|
#: ../../WINGs/proplist.c:1785
|
||||||
|
#, c-format
|
||||||
|
msgid "Could not create component %s"
|
||||||
|
msgstr "Не може се креирати компонента %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/userdefaults.c:68
|
||||||
|
msgid "variable WMAKER_USER_ROOT defined with invalid path, not used"
|
||||||
|
msgstr "променљива WMAKER_USER_ROOT је задата са неисправном путањом, не користи се"
|
||||||
|
|
||||||
|
#. something happened with the file. just overwrite it
|
||||||
|
#: ../../WINGs/userdefaults.c:208 ../../WINGs/userdefaults.c:223
|
||||||
|
#, c-format
|
||||||
|
msgid "cannot read domain from file '%s' when syncing"
|
||||||
|
msgstr "не може се учитати домен из датотеке „%s“ приликом синхронизовања"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:60
|
||||||
|
#, c-format
|
||||||
|
msgid "unknown XDND action %s"
|
||||||
|
msgstr "непозната XDND акција %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:142
|
||||||
|
#, c-format
|
||||||
|
msgid "target %lu for XDND message no longer exists"
|
||||||
|
msgstr "одредиште %lu XDND поруке више не постоји"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragcommon.c:220
|
||||||
|
#, c-format
|
||||||
|
msgid "unsupported version %i for XDND enter message"
|
||||||
|
msgstr "неподржана верзија %i XDND улазне поруке"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:163
|
||||||
|
msgid "XDND selection lost during drag operation..."
|
||||||
|
msgstr "XDND избор је изгубљен приликом операције превлачења..."
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:758
|
||||||
|
msgid "could not get XDND version for target of drop"
|
||||||
|
msgstr "не може се одредити верзија XDND-а за одредиште превлачења"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:774
|
||||||
|
msgid "could not get ownership of XDND selection"
|
||||||
|
msgstr "не може се одредити власништво над XDND избором"
|
||||||
|
|
||||||
|
#: ../../WINGs/dragsource.c:1070
|
||||||
|
msgid "delay for drag destination response expired"
|
||||||
|
msgstr "пауза за одговор одредишта превлачења је истекла"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:204 ../../WINGs/wcolor.c:214 ../../WINGs/wcolor.c:250
|
||||||
|
#: ../../WINGs/wcolor.c:288
|
||||||
|
#, c-format
|
||||||
|
msgid "could not allocate %s color"
|
||||||
|
msgstr "не може се алоцирати боја %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:204
|
||||||
|
msgid "white"
|
||||||
|
msgstr "бела"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:214
|
||||||
|
msgid "black"
|
||||||
|
msgstr "црна"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:250
|
||||||
|
msgid "gray"
|
||||||
|
msgstr "сива"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolor.c:288
|
||||||
|
msgid "dark gray"
|
||||||
|
msgstr "тамно сива"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:390
|
||||||
|
msgid "Colors"
|
||||||
|
msgstr "Боје"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:565 ../../WINGs/wcolorpanel.c:2716
|
||||||
|
msgid "Brightness"
|
||||||
|
msgstr "Светлина"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:567 ../../WINGs/wcolorpanel.c:641
|
||||||
|
#: ../../WINGs/wcolorpanel.c:672 ../../WINGs/wcolorpanel.c:703
|
||||||
|
#: ../../WINGs/wcolorpanel.c:778 ../../WINGs/wcolorpanel.c:809
|
||||||
|
#: ../../WINGs/wcolorpanel.c:841 ../../WINGs/wcolorpanel.c:874
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2010 ../../WINGs/wcolorpanel.c:2718
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2752 ../../WINGs/wcolorpanel.c:2786
|
||||||
|
msgid "Color Panel: Could not allocate memory"
|
||||||
|
msgstr "Панел за боје: Неуспешно алоцирање меморије"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:639
|
||||||
|
msgid "Red"
|
||||||
|
msgstr "Црвена"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:670
|
||||||
|
msgid "Green"
|
||||||
|
msgstr "Зелена"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:701
|
||||||
|
msgid "Blue"
|
||||||
|
msgstr "Плава"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:715
|
||||||
|
msgid "Decimal"
|
||||||
|
msgstr "Децимално"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:723
|
||||||
|
msgid "Hexadecimal"
|
||||||
|
msgstr "Хексадекадно"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:776
|
||||||
|
msgid "Cyan"
|
||||||
|
msgstr "Цијан"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:807
|
||||||
|
msgid "Magenta"
|
||||||
|
msgstr "Магента"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:839
|
||||||
|
msgid "Yellow"
|
||||||
|
msgstr "Жута"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:872
|
||||||
|
msgid "Black"
|
||||||
|
msgstr "Црна"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:947
|
||||||
|
msgid "Spectrum"
|
||||||
|
msgstr "Спектар"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:973
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr "Палета"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:978
|
||||||
|
msgid "New from File..."
|
||||||
|
msgstr "Нова из датотеке..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:979 ../../WINGs/wcolorpanel.c:1024
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1039
|
||||||
|
msgid "Rename..."
|
||||||
|
msgstr "Преименуј..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:980 ../../WINGs/wcolorpanel.c:1025
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1040 ../../WINGs/wcolorpanel.c:3176
|
||||||
|
msgid "Remove"
|
||||||
|
msgstr "Уклони"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:981
|
||||||
|
msgid "Copy"
|
||||||
|
msgstr "Копирај"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:982
|
||||||
|
msgid "New from Clipboard"
|
||||||
|
msgstr "Нова из клипборда"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1001
|
||||||
|
msgid "X11-Colors"
|
||||||
|
msgstr "X11 боје"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1018
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Боја"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1023
|
||||||
|
msgid "Add..."
|
||||||
|
msgstr "Додај..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1033
|
||||||
|
msgid "List"
|
||||||
|
msgstr "Листа"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1038
|
||||||
|
msgid "New..."
|
||||||
|
msgstr "Нова..."
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1165
|
||||||
|
#, c-format
|
||||||
|
msgid "Color Panel: Could not create directory %s needed to store configurations"
|
||||||
|
msgstr "Панел за боје: Не може се креирати директоријум %s неопходан за чување подешавања"
|
||||||
|
|
||||||
|
#. Delete the file, it doesn't belong here
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1171 ../../WINGs/wcolorpanel.c:3069
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3073
|
||||||
|
msgid "File Error"
|
||||||
|
msgstr "Грешка датотеке"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1172
|
||||||
|
msgid "Could not create ColorPanel configuration directory"
|
||||||
|
msgstr "Не може се креирати директоријум са подешавањима ColorPanel"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1173 ../../WINGs/wcolorpanel.c:3070
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3075 ../../WINGs/wcolorpanel.c:3100
|
||||||
|
#: ../../WINGs/wfilepanel.c:227 ../../WINGs/wfilepanel.c:596
|
||||||
|
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
||||||
|
#: ../../WINGs/wfilepanel.c:883 ../../WINGs/wfontpanel.c:532
|
||||||
|
msgid "OK"
|
||||||
|
msgstr "ОК"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1178
|
||||||
|
msgid "Color Panel: Could not find file"
|
||||||
|
msgstr "Панел за боје: Не може се пронаћи датотека"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1374 ../../WINGs/wcolorpanel.c:1435
|
||||||
|
#: ../../WINGs/wcolorpanel.c:1495
|
||||||
|
msgid "Color Panel: X failed request"
|
||||||
|
msgstr "Панел за боје: Неуспешан захтев X-а"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2750
|
||||||
|
msgid "Saturation"
|
||||||
|
msgstr "Засићење"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:2784
|
||||||
|
msgid "Hue"
|
||||||
|
msgstr "Нијанса"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3008
|
||||||
|
msgid "Open Palette"
|
||||||
|
msgstr "Отвори палету"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3070
|
||||||
|
msgid "Invalid file format !"
|
||||||
|
msgstr "Неисправан формат датотеке !"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3072
|
||||||
|
#, c-format
|
||||||
|
msgid "can't remove file %s"
|
||||||
|
msgstr "не може се уклонити датотека %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3074
|
||||||
|
msgid "Couldn't remove file from Configuration Directory !"
|
||||||
|
msgstr "Не може се уклонити датотека из директоријума са подешавањима !"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3099
|
||||||
|
msgid "Rename"
|
||||||
|
msgstr "Преименовање"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3099
|
||||||
|
msgid "Rename palette to:"
|
||||||
|
msgstr "Преименуј палету у:"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3100 ../../WINGs/wfilepanel.c:236
|
||||||
|
#: ../../WINGs/wfilepanel.c:611 ../../WINGs/wfilepanel.c:715
|
||||||
|
msgid "Cancel"
|
||||||
|
msgstr "Поништи"
|
||||||
|
|
||||||
|
#. Careful, this palette exists already
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3116 ../../WINGs/wfilepanel.c:715
|
||||||
|
msgid "Warning"
|
||||||
|
msgstr "Упозорење"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3117
|
||||||
|
msgid "Palette already exists !\n\nOverwrite ?"
|
||||||
|
msgstr "Палета већ постоји !\n\nПреписати ?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3117 ../../WINGs/wcolorpanel.c:3176
|
||||||
|
msgid "No"
|
||||||
|
msgstr "Не"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3117 ../../WINGs/wcolorpanel.c:3176
|
||||||
|
msgid "Yes"
|
||||||
|
msgstr "Да"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3148
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't rename palette %s to %s"
|
||||||
|
msgstr "Палета %s се не може преименовати у %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3171
|
||||||
|
msgid "This will permanently remove the palette "
|
||||||
|
msgstr "Ово ће трајно уклонити палету "
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3173
|
||||||
|
msgid ".\n\nAre you sure you want to remove this palette ?"
|
||||||
|
msgstr ".\n\nДа ли сте сигурни да желите да уклоните палету ?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3195
|
||||||
|
#, c-format
|
||||||
|
msgid "Couldn't remove palette %s"
|
||||||
|
msgstr "Не може се уклонити палета %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wcolorpanel.c:3498
|
||||||
|
msgid "Color Panel: Color unspecified"
|
||||||
|
msgstr "Панел за боју: Боја није задата"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:216
|
||||||
|
msgid "Name:"
|
||||||
|
msgstr "Назив:"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:306 ../../WINGs/wfilepanel.c:364
|
||||||
|
msgid "Open"
|
||||||
|
msgstr "Отвори"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:322 ../../WINGs/wfilepanel.c:370
|
||||||
|
msgid "Save"
|
||||||
|
msgstr "Сачувај"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:506
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not open directory %s\n"
|
||||||
|
msgstr "WINGs: не може се отворити директоријум %s\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:526
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not stat %s\n"
|
||||||
|
msgstr "WINGs: не може се stat-овати %s\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:596 ../../WINGs/wfilepanel.c:883
|
||||||
|
#: ../../WINGs/wfontpanel.c:531
|
||||||
|
msgid "Error"
|
||||||
|
msgstr "Грешка"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:610
|
||||||
|
msgid "Create Directory"
|
||||||
|
msgstr "Креирање директоријума"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:611
|
||||||
|
msgid "Enter directory name"
|
||||||
|
msgstr "Унесите назив директоријума"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:639
|
||||||
|
#, c-format
|
||||||
|
msgid "Can not create %s: %s"
|
||||||
|
msgstr "Не може се креирати %s: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:705
|
||||||
|
#, c-format
|
||||||
|
msgid "Can not find %s: %s"
|
||||||
|
msgstr "Не може се наћи %s: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:711
|
||||||
|
#, c-format
|
||||||
|
msgid "Delete %s %s?"
|
||||||
|
msgstr "Обрисати %s %s?"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:712
|
||||||
|
msgid "directory"
|
||||||
|
msgstr "директоријум"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:712
|
||||||
|
msgid "file"
|
||||||
|
msgstr "датотеку"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:719
|
||||||
|
#, c-format
|
||||||
|
msgid "Removing %s failed: %s"
|
||||||
|
msgstr "Уклањање %s није успело: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:751
|
||||||
|
#, c-format
|
||||||
|
msgid "An error occurred browsing '%s'."
|
||||||
|
msgstr "Догодила се грешка приликом прегледања „%s“."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:754
|
||||||
|
#, c-format
|
||||||
|
msgid "'%s' is not a directory."
|
||||||
|
msgstr "„%s“ није директоријум."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfilepanel.c:883
|
||||||
|
msgid "File does not exist."
|
||||||
|
msgstr "Датотека не постоји."
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:43
|
||||||
|
#, c-format
|
||||||
|
msgid "invalid font: %s. Trying '%s'"
|
||||||
|
msgstr "неисправан фонт: %s. Проба се „%s“"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfont.c:270 ../../WINGs/wfont.c:288
|
||||||
|
#, c-format
|
||||||
|
msgid "could not load font: %s."
|
||||||
|
msgstr "не може се учитати фонт: %s."
|
||||||
|
|
||||||
|
#. WMSetWidgetBackgroundColor(panel->win, WMWhiteColor(scr));
|
||||||
|
#: ../../WINGs/wfontpanel.c:184
|
||||||
|
msgid "Font Panel"
|
||||||
|
msgstr "Панел за фонт"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:220
|
||||||
|
msgid "The quick brown fox jumps over the lazy dog"
|
||||||
|
msgstr "Одбациће кавгаџија плаштом чађ у жељезни фењер"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:226
|
||||||
|
msgid "Family"
|
||||||
|
msgstr "Фамилија"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:237
|
||||||
|
msgid "Typeface"
|
||||||
|
msgstr "Словни лик"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:248
|
||||||
|
msgid "Size"
|
||||||
|
msgstr "Величина"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:267
|
||||||
|
msgid "Set"
|
||||||
|
msgstr "Постави"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:273
|
||||||
|
msgid "Revert"
|
||||||
|
msgstr "Врати"
|
||||||
|
|
||||||
|
#: ../../WINGs/wfontpanel.c:532
|
||||||
|
msgid "Could not init font config library\n"
|
||||||
|
msgstr "Не може се иницијализовати библиотека font config\n"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:447
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not load widget images file: %s"
|
||||||
|
msgstr "WINGs: не може се учитати датотека са сликама виџета: %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:543
|
||||||
|
#, c-format
|
||||||
|
msgid "WINGs: could not open display %s"
|
||||||
|
msgstr "WINGs: не може се отворити приказ %s"
|
||||||
|
|
||||||
|
#: ../../WINGs/widgets.c:772
|
||||||
|
msgid "could not load any fonts. Make sure your font installation and locale settings are correct."
|
||||||
|
msgstr "не може се учитати ниједан фонт. Проверите да ли су фонтови исправно инсталирани и да али су подешавања језика исправна."
|
||||||
|
|
||||||
|
#: ../../WINGs/winputmethod.c:65
|
||||||
|
msgid "could not add destroy callback for XIM input method"
|
||||||
|
msgstr "не може се додати destroy callback за XIM метод уноса"
|
||||||
|
|
||||||
|
#: ../../WINGs/wruler.c:175
|
||||||
|
msgid "0 inches"
|
||||||
|
msgstr "0 инча"
|
||||||
|
|
||||||
|
#: ../../WINGs/wtextfield.c:494
|
||||||
|
msgid "only left alignment is supported in textfields"
|
||||||
|
msgstr "у текстуалним пољима је подржано само лево уравнање"
|
||||||
|
|
||||||
|
#: ../../WINGs/wwindow.c:160
|
||||||
|
msgid "window title conversion error... using STRING encoding"
|
||||||
|
msgstr "грешка приликом конверзије наслова прозора... користи се STRING кодирање"
|
||||||
|
|
||||||
|
#: ../../WINGs/wwindow.c:181
|
||||||
|
msgid "icon title conversion error... using STRING encoding"
|
||||||
|
msgstr "грешка приликом конверзије наслова иконе... користи се STRING кодирање"
|
||||||
+50
-15
@@ -1213,6 +1213,7 @@ WMPropList *WMSubtractPLDictionaries(WMPropList * dest, WMPropList * source, Boo
|
|||||||
for (i = 0; i < WMGetArrayItemCount(keys->d.array); i++) {
|
for (i = 0; i < WMGetArrayItemCount(keys->d.array); i++) {
|
||||||
WMRemoveFromPLDictionary(dest, WMGetFromArray(keys->d.array, i));
|
WMRemoveFromPLDictionary(dest, WMGetFromArray(keys->d.array, i));
|
||||||
}
|
}
|
||||||
|
WMReleasePropList(keys);
|
||||||
return dest;
|
return dest;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1252,22 +1253,34 @@ int WMGetPropListItemCount(WMPropList * plist)
|
|||||||
|
|
||||||
Bool WMIsPLString(WMPropList * plist)
|
Bool WMIsPLString(WMPropList * plist)
|
||||||
{
|
{
|
||||||
return (plist->type == WPLString);
|
if (plist)
|
||||||
|
return (plist->type == WPLString);
|
||||||
|
else
|
||||||
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMIsPLData(WMPropList * plist)
|
Bool WMIsPLData(WMPropList * plist)
|
||||||
{
|
{
|
||||||
return (plist->type == WPLData);
|
if (plist)
|
||||||
|
return (plist->type == WPLData);
|
||||||
|
else
|
||||||
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMIsPLArray(WMPropList * plist)
|
Bool WMIsPLArray(WMPropList * plist)
|
||||||
{
|
{
|
||||||
return (plist->type == WPLArray);
|
if (plist)
|
||||||
|
return (plist->type == WPLArray);
|
||||||
|
else
|
||||||
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMIsPLDictionary(WMPropList * plist)
|
Bool WMIsPLDictionary(WMPropList * plist)
|
||||||
{
|
{
|
||||||
return (plist->type == WPLDictionary);
|
if (plist)
|
||||||
|
return (plist->type == WPLDictionary);
|
||||||
|
else
|
||||||
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bool WMIsPropListEqualTo(WMPropList * plist, WMPropList * other)
|
Bool WMIsPropListEqualTo(WMPropList * plist, WMPropList * other)
|
||||||
@@ -1645,13 +1658,22 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
|
|||||||
thePath = wstrconcat(path, ".XXXXXX");
|
thePath = wstrconcat(path, ".XXXXXX");
|
||||||
|
|
||||||
#ifdef HAVE_MKSTEMP
|
#ifdef HAVE_MKSTEMP
|
||||||
|
/*
|
||||||
|
* We really just want to read the current umask, but as Coverity is
|
||||||
|
* pointing a possible security issue:
|
||||||
|
* some versions of mkstemp do not set file rights properly on the
|
||||||
|
* created file, so it is recommended so set the umask beforehand.
|
||||||
|
* As we need to set an umask to read the current value, we take this
|
||||||
|
* opportunity to set a temporary aggresive umask so Coverity won't
|
||||||
|
* complain, even if we do not really care in the present use case.
|
||||||
|
*/
|
||||||
|
mask = umask(S_IRWXG | S_IRWXO);
|
||||||
if ((fd = mkstemp(thePath)) < 0) {
|
if ((fd = mkstemp(thePath)) < 0) {
|
||||||
werror(_("mkstemp (%s) failed"), thePath);
|
werror(_("mkstemp (%s) failed"), thePath);
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
mask = umask(0);
|
|
||||||
umask(mask);
|
umask(mask);
|
||||||
fchmod(fd, 0644 & ~mask);
|
fchmod(fd, 0666 & ~mask);
|
||||||
if ((theFile = fdopen(fd, "wb")) == NULL) {
|
if ((theFile = fdopen(fd, "wb")) == NULL) {
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
@@ -1673,6 +1695,7 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
|
|||||||
if (fprintf(theFile, "%s\n", desc) != strlen(desc) + 1) {
|
if (fprintf(theFile, "%s\n", desc) != strlen(desc) + 1) {
|
||||||
werror(_("writing to file: %s failed"), thePath);
|
werror(_("writing to file: %s failed"), thePath);
|
||||||
wfree(desc);
|
wfree(desc);
|
||||||
|
fclose(theFile);
|
||||||
goto failure;
|
goto failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1709,7 +1732,7 @@ Bool WMWritePropListToFile(WMPropList * plist, const char *path)
|
|||||||
* file, and the last component is stripped off. the rest is the
|
* file, and the last component is stripped off. the rest is the
|
||||||
* the hierarchy to be created.
|
* the hierarchy to be created.
|
||||||
*
|
*
|
||||||
* refuses to create anything outside $GNUSTEP_USER_ROOT
|
* refuses to create anything outside $WMAKER_USER_ROOT
|
||||||
*
|
*
|
||||||
* returns 1 on success, 0 on failure
|
* returns 1 on success, 0 on failure
|
||||||
*/
|
*/
|
||||||
@@ -1720,7 +1743,7 @@ int wmkdirhier(const char *path)
|
|||||||
size_t p, plen;
|
size_t p, plen;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
/* Only create directories under $GNUSTEP_USER_ROOT */
|
/* Only create directories under $WMAKER_USER_ROOT */
|
||||||
if ((t = wusergnusteppath()) == NULL)
|
if ((t = wusergnusteppath()) == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
if (strncmp(path, t, strlen(t)) != 0)
|
if (strncmp(path, t, strlen(t)) != 0)
|
||||||
@@ -1801,7 +1824,7 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
|
|||||||
/*
|
/*
|
||||||
* remove a directory hierarchy
|
* remove a directory hierarchy
|
||||||
*
|
*
|
||||||
* refuses to remove anything outside $GNUSTEP_USER_ROOT
|
* refuses to remove anything outside $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library
|
||||||
*
|
*
|
||||||
* returns 1 on success, 0 on failure
|
* returns 1 on success, 0 on failure
|
||||||
*
|
*
|
||||||
@@ -1811,15 +1834,27 @@ static int wrmdirhier_fn(const char *path, const struct stat *st,
|
|||||||
*/
|
*/
|
||||||
int wrmdirhier(const char *path)
|
int wrmdirhier(const char *path)
|
||||||
{
|
{
|
||||||
|
const char *libpath;
|
||||||
|
char *udefpath = NULL;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
int error;
|
int error;
|
||||||
const char *t;
|
|
||||||
|
|
||||||
/* Only remove directories under $GNUSTEP_USER_ROOT */
|
/* Only remove directories under $WMAKER_USER_ROOT/Defaults or $WMAKER_USER_ROOT/Library */
|
||||||
if ((t = wusergnusteppath()) == NULL)
|
libpath = wuserdatapath();
|
||||||
return EPERM;
|
if (strncmp(path, libpath, strlen(libpath)) == 0)
|
||||||
if (strncmp(path, t, strlen(t)) != 0)
|
if (path[strlen(libpath)] == '/')
|
||||||
return EPERM;
|
goto path_in_valid_tree;
|
||||||
|
|
||||||
|
udefpath = wdefaultspathfordomain("");
|
||||||
|
if (strncmp(path, udefpath, strlen(udefpath)) == 0)
|
||||||
|
/* Note: by side effect, 'udefpath' already contains a final '/' */
|
||||||
|
goto path_in_valid_tree;
|
||||||
|
|
||||||
|
wfree(udefpath);
|
||||||
|
return EPERM;
|
||||||
|
|
||||||
|
path_in_valid_tree:
|
||||||
|
wfree(udefpath);
|
||||||
|
|
||||||
/* Shortcut if it doesn't exist to begin with */
|
/* Shortcut if it doesn't exist to begin with */
|
||||||
if (stat(path, &st) == -1)
|
if (stat(path, &st) == -1)
|
||||||
|
|||||||
+2
-2
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define MAX_PROPERTY_SIZE 8*1024
|
#define MAX_PROPERTY_SIZE 8*1024
|
||||||
|
|
||||||
char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
|
const char *WMSelectionOwnerDidChangeNotification = "WMSelectionOwnerDidChange";
|
||||||
|
|
||||||
typedef struct SelectionHandler {
|
typedef struct SelectionHandler {
|
||||||
WMView *view;
|
WMView *view;
|
||||||
@@ -261,7 +261,7 @@ static WMData *getSelectionData(Display * dpy, Window win, Atom where)
|
|||||||
|
|
||||||
bpi = bits / 8;
|
bpi = bits / 8;
|
||||||
|
|
||||||
wdata = WMCreateDataWithBytesNoCopy(data, len * bpi, (WMFreeDataProc *) XFree);
|
wdata = WMCreateDataWithBytesNoCopy(data, len * bpi, (void *) XFree);
|
||||||
WMSetDataFormat(wdata, bits);
|
WMSetDataFormat(wdata, bits);
|
||||||
|
|
||||||
return wdata;
|
return wdata;
|
||||||
|
|||||||
+5
-7
@@ -204,7 +204,7 @@ char *wstrndup(const char *str, size_t len)
|
|||||||
char *wstrconcat(const char *str1, const char *str2)
|
char *wstrconcat(const char *str1, const char *str2)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
size_t slen;
|
size_t slen, slen1;
|
||||||
|
|
||||||
if (!str1 && str2)
|
if (!str1 && str2)
|
||||||
return wstrdup(str2);
|
return wstrdup(str2);
|
||||||
@@ -213,13 +213,11 @@ char *wstrconcat(const char *str1, const char *str2)
|
|||||||
else if (!str1 && !str2)
|
else if (!str1 && !str2)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
slen = strlen(str1) + strlen(str2) + 1;
|
slen1 = strlen(str1);
|
||||||
|
slen = slen1 + strlen(str2) + 1;
|
||||||
str = wmalloc(slen);
|
str = wmalloc(slen);
|
||||||
if (wstrlcpy(str, str1, slen) >= slen ||
|
strcpy(str, str1);
|
||||||
wstrlcat(str, str2, slen) >= slen) {
|
strcpy(str + slen1, str2);
|
||||||
wfree(str);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
|
|||||||
+23
-25
@@ -40,36 +40,32 @@ char *WMUserDefaultsDidChangeNotification = "WMUserDefaultsDidChangeNotification
|
|||||||
|
|
||||||
static void synchronizeUserDefaults(void *foo);
|
static void synchronizeUserDefaults(void *foo);
|
||||||
|
|
||||||
#define DEFAULTS_DIR "/Defaults"
|
|
||||||
#ifndef HAVE_INOTIFY
|
#ifndef HAVE_INOTIFY
|
||||||
/* Check defaults database for changes every this many milliseconds */
|
/* Check defaults database for changes every this many milliseconds */
|
||||||
/* XXX: this is shared with src/ stuff, put it in some common header */
|
/* XXX: this is shared with src/ stuff, put it in some common header */
|
||||||
#define UD_SYNC_INTERVAL 2000
|
#define UD_SYNC_INTERVAL 2000
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const char *wusergnusteppath()
|
const char *wusergnusteppath(void)
|
||||||
{
|
{
|
||||||
static const char subdir[] = "/GNUstep";
|
static const char subdir[] = "/" GSUSER_SUBDIR;
|
||||||
static char *path = NULL;
|
static char *path = NULL;
|
||||||
char *gspath, *h;
|
char *gspath;
|
||||||
|
const char *h;
|
||||||
int pathlen;
|
int pathlen;
|
||||||
|
|
||||||
if (path)
|
if (path)
|
||||||
/* Value have been already computed, re-use it */
|
/* Value have been already computed, re-use it */
|
||||||
return path;
|
return path;
|
||||||
|
|
||||||
#ifdef HAVE_SECURE_GETENV
|
gspath = GETENV("WMAKER_USER_ROOT");
|
||||||
gspath = secure_getenv("GNUSTEP_USER_ROOT");
|
|
||||||
#else
|
|
||||||
gspath = getenv("GNUSTEP_USER_ROOT");
|
|
||||||
#endif
|
|
||||||
if (gspath) {
|
if (gspath) {
|
||||||
gspath = wexpandpath(gspath);
|
gspath = wexpandpath(gspath);
|
||||||
if (gspath) {
|
if (gspath) {
|
||||||
path = gspath;
|
path = gspath;
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
wwarning(_("variable GNUSTEP_USER_ROOT defined with invalid path, not used"));
|
wwarning(_("variable WMAKER_USER_ROOT defined with invalid path, not used"));
|
||||||
}
|
}
|
||||||
|
|
||||||
h = wgethomedir();
|
h = wgethomedir();
|
||||||
@@ -84,6 +80,19 @@ const char *wusergnusteppath()
|
|||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *wuserdatapath(void)
|
||||||
|
{
|
||||||
|
static char *path = NULL;
|
||||||
|
|
||||||
|
if (path)
|
||||||
|
/* Value have been already computed, re-use it */
|
||||||
|
return path;
|
||||||
|
|
||||||
|
path = wstrconcat(wusergnusteppath(), "/" USERDATA_SUBDIR);
|
||||||
|
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
|
||||||
char *wdefaultspathfordomain(const char *domain)
|
char *wdefaultspathfordomain(const char *domain)
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
@@ -91,31 +100,20 @@ char *wdefaultspathfordomain(const char *domain)
|
|||||||
size_t slen;
|
size_t slen;
|
||||||
|
|
||||||
gspath = wusergnusteppath();
|
gspath = wusergnusteppath();
|
||||||
slen = strlen(gspath) + strlen(DEFAULTS_DIR) + strlen(domain) + 4;
|
slen = strlen(gspath) + strlen("/" DEFAULTS_SUBDIR "/") + strlen(domain) + 1;
|
||||||
path = wmalloc(slen);
|
path = wmalloc(slen);
|
||||||
|
|
||||||
strcpy(path, gspath);
|
strcpy(path, gspath);
|
||||||
strcat(path, DEFAULTS_DIR);
|
strcat(path, "/" DEFAULTS_SUBDIR "/");
|
||||||
strcat(path, "/");
|
|
||||||
strcat(path, domain);
|
strcat(path, domain);
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* XXX: doesn't quite belong to *user*defaults.c */
|
/* XXX: doesn't quite belong to *user*defaults.c */
|
||||||
#ifndef GLOBAL_DEFAULTS_SUBDIR
|
|
||||||
#define GLOBAL_DEFAULTS_SUBDIR "WindowMaker"
|
|
||||||
#endif
|
|
||||||
char *wglobaldefaultspathfordomain(const char *domain)
|
char *wglobaldefaultspathfordomain(const char *domain)
|
||||||
{
|
{
|
||||||
char *t = NULL;
|
return wstrconcat(PKGCONFDIR "/", domain);
|
||||||
size_t len;
|
|
||||||
|
|
||||||
len = strlen( SYSCONFDIR ) + strlen( GLOBAL_DEFAULTS_SUBDIR ) + strlen(domain) + 3;
|
|
||||||
t = wmalloc(len);
|
|
||||||
snprintf(t, len, "%s/%s/%s", SYSCONFDIR, GLOBAL_DEFAULTS_SUBDIR, domain);
|
|
||||||
|
|
||||||
return t;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void w_save_defaults_changes(void)
|
void w_save_defaults_changes(void)
|
||||||
@@ -591,7 +589,7 @@ void WMSetUDFloatForKey(WMUserDefaults * database, float value, const char *defa
|
|||||||
WMPropList *object;
|
WMPropList *object;
|
||||||
char buffer[128];
|
char buffer[128];
|
||||||
|
|
||||||
sprintf(buffer, "%f", value);
|
sprintf(buffer, "%f", (double)value);
|
||||||
object = WMCreatePLString(buffer);
|
object = WMCreatePLString(buffer);
|
||||||
|
|
||||||
WMSetUDObjectForKey(database, object, defaultName);
|
WMSetUDObjectForKey(database, object, defaultName);
|
||||||
|
|||||||
+45
-36
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
struct W_Application WMApplication;
|
struct W_Application WMApplication;
|
||||||
|
|
||||||
char *_WINGS_progname = NULL;
|
const char *_WINGS_progname = NULL;
|
||||||
|
|
||||||
Bool W_ApplicationInitialized(void)
|
Bool W_ApplicationInitialized(void)
|
||||||
{
|
{
|
||||||
@@ -83,7 +83,7 @@ void WMSetResourcePath(const char *path)
|
|||||||
WMApplication.resourcePath = wstrdup(path);
|
WMApplication.resourcePath = wstrdup(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *WMGetApplicationName()
|
char *WMGetApplicationName(void)
|
||||||
{
|
{
|
||||||
return WMApplication.applicationName;
|
return WMApplication.applicationName;
|
||||||
}
|
}
|
||||||
@@ -131,22 +131,23 @@ error:
|
|||||||
|
|
||||||
char *WMPathForResourceOfType(const char *resource, const char *ext)
|
char *WMPathForResourceOfType(const char *resource, const char *ext)
|
||||||
{
|
{
|
||||||
char *path, *tmp, *appdir;
|
const char *gslocapps, *gssysapps, *gsuserapps;
|
||||||
int i;
|
char *path, *appdir;
|
||||||
|
char buffer[PATH_MAX];
|
||||||
size_t slen;
|
size_t slen;
|
||||||
|
|
||||||
path = tmp = appdir = NULL;
|
path = appdir = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Paths are searched in this order:
|
* Paths are searched in this order:
|
||||||
* - resourcePath/ext
|
* - resourcePath/ext
|
||||||
* - dirname(argv[0])/ext
|
* - dirname(argv[0])/ext
|
||||||
* - GNUSTEP_USER_ROOT/Applications/ApplicationName.app/ext
|
* - WMAKER_USER_ROOT/Applications/ApplicationName.app/ext
|
||||||
* - ~/GNUstep/Applications/ApplicationName.app/ext
|
* - GNUSTEP_USER_APPS/ApplicationName.app/ext
|
||||||
* - GNUSTEP_LOCAL_ROOT/Applications/ApplicationName.app/ext
|
* - GNUSTEP_LOCAL_APPS/ApplicationName.app/ext
|
||||||
* - /usr/local/GNUstep/Applications/ApplicationName.app/ext
|
* - /usr/local/lib/GNUstep/Applications/ApplicationName.app/ext
|
||||||
* - GNUSTEP_SYSTEM_ROOT/Applications/ApplicationName.app/ext
|
* - GNUSTEP_SYSTEM_APPS/ApplicationName.app/ext
|
||||||
* - /usr/GNUstep/Applications/ApplicationName.app/ext
|
* - /usr/lib/GNUstep/Applications/ApplicationName.app/ext
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (WMApplication.resourcePath) {
|
if (WMApplication.resourcePath) {
|
||||||
@@ -156,49 +157,57 @@ char *WMPathForResourceOfType(const char *resource, const char *ext)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (WMApplication.argv[0]) {
|
if (WMApplication.argv[0]) {
|
||||||
tmp = wstrdup(WMApplication.argv[0]);
|
char *ptr_slash;
|
||||||
i = strlen(tmp);
|
|
||||||
while (i > 0 && tmp[i] != '/')
|
ptr_slash = strrchr(WMApplication.argv[0], '/');
|
||||||
i--;
|
if (ptr_slash != NULL) {
|
||||||
tmp[i] = 0;
|
char tmp[ptr_slash - WMApplication.argv[0] + 1];
|
||||||
if (i > 0) {
|
|
||||||
|
strncpy(tmp, WMApplication.argv[0], sizeof(tmp)-1);
|
||||||
|
tmp[sizeof(tmp) - 1] = '\0';
|
||||||
|
|
||||||
path = checkFile(tmp, NULL, ext, resource);
|
path = checkFile(tmp, NULL, ext, resource);
|
||||||
} else {
|
if (path)
|
||||||
path = NULL;
|
goto out;
|
||||||
}
|
}
|
||||||
goto out;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
slen = strlen(WMApplication.applicationName) + sizeof("Applications/.app");
|
snprintf(buffer, sizeof(buffer), "Applications/%s.app", WMApplication.applicationName);
|
||||||
|
path = checkFile(GETENV("WMAKER_USER_ROOT"), buffer, ext, resource);
|
||||||
|
if (path)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
slen = strlen(WMApplication.applicationName) + sizeof("/.app");
|
||||||
appdir = wmalloc(slen);
|
appdir = wmalloc(slen);
|
||||||
if (snprintf(appdir, slen, "Applications/%s.app", WMApplication.applicationName) >= slen)
|
if (snprintf(appdir, slen, "/%s.app", WMApplication.applicationName) >= slen)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
path = checkFile(getenv("GNUSTEP_USER_ROOT"), appdir, ext, resource);
|
gsuserapps = GETENV("GNUSTEP_USER_APPS");
|
||||||
|
if (!gsuserapps) {
|
||||||
|
snprintf(buffer, sizeof(buffer), "%s/Applications", wusergnusteppath());
|
||||||
|
gsuserapps = buffer;
|
||||||
|
}
|
||||||
|
path = checkFile(gsuserapps, appdir, ext, resource);
|
||||||
if (path)
|
if (path)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
path = checkFile(wusergnusteppath(), appdir, ext, resource);
|
gslocapps = GETENV("GNUSTEP_LOCAL_APPS");
|
||||||
|
if (!gslocapps)
|
||||||
|
gslocapps = "/usr/local/lib/GNUstep/Applications";
|
||||||
|
path = checkFile(gslocapps, appdir, ext, resource);
|
||||||
if (path)
|
if (path)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
path = checkFile(getenv("GNUSTEP_LOCAL_ROOT"), appdir, ext, resource);
|
gssysapps = GETENV("GNUSTEP_SYSTEM_APPS");
|
||||||
|
if (!gssysapps)
|
||||||
|
gssysapps = "/usr/lib/GNUstep/Applications";
|
||||||
|
path = checkFile(gssysapps, appdir, ext, resource);
|
||||||
if (path)
|
if (path)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
path = checkFile("/usr/local/GNUstep", appdir, ext, resource);
|
path = checkFile("/usr/GNUstep/System/Applications", appdir, ext, resource); /* falls through */
|
||||||
if (path)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
path = checkFile(getenv("GNUSTEP_SYSTEM_ROOT"), appdir, ext, resource);
|
|
||||||
if (path)
|
|
||||||
goto out;
|
|
||||||
|
|
||||||
path = checkFile("/usr/GNUstep", appdir, ext, resource); /* falls through */
|
|
||||||
|
|
||||||
out:
|
out:
|
||||||
if (tmp)
|
|
||||||
wfree(tmp);
|
|
||||||
if (appdir)
|
if (appdir)
|
||||||
wfree(appdir);
|
wfree(appdir);
|
||||||
|
|
||||||
|
|||||||
@@ -229,11 +229,6 @@ void W_BalloonHandleEnterView(WMView * view)
|
|||||||
#define LEFT 0
|
#define LEFT 0
|
||||||
#define RIGHT 2
|
#define RIGHT 2
|
||||||
|
|
||||||
#define TLEFT (TOP|LEFT)
|
|
||||||
#define TRIGHT (TOP|RIGHT)
|
|
||||||
#define BLEFT (BOTTOM|LEFT)
|
|
||||||
#define BRIGHT (BOTTOM|RIGHT)
|
|
||||||
|
|
||||||
#define SPACE 12
|
#define SPACE 12
|
||||||
|
|
||||||
static void drawBalloon(WMScreen * scr, Pixmap bitmap, Pixmap pix, int x, int y, int w, int h, int side)
|
static void drawBalloon(WMScreen * scr, Pixmap bitmap, Pixmap pix, int x, int y, int w, int h, int side)
|
||||||
|
|||||||
+6
-12
@@ -565,7 +565,7 @@ static void scrollCallback(WMWidget * scroller, void *self)
|
|||||||
|
|
||||||
floatValue = (floatValue * value) / value;
|
floatValue = (floatValue * value) / value;
|
||||||
|
|
||||||
newFirst = rint(floatValue * (float)(bPtr->columnCount - bPtr->maxVisibleColumns));
|
newFirst = rint(floatValue * (double)(bPtr->columnCount - bPtr->maxVisibleColumns));
|
||||||
|
|
||||||
if (bPtr->firstVisibleColumn != newFirst)
|
if (bPtr->firstVisibleColumn != newFirst)
|
||||||
scrollToColumn(bPtr, newFirst, False);
|
scrollToColumn(bPtr, newFirst, False);
|
||||||
@@ -619,11 +619,12 @@ void WMSetBrowserHasScroller(WMBrowser * bPtr, int hasScroller)
|
|||||||
bPtr->flags.hasScroller = hasScroller;
|
bPtr->flags.hasScroller = hasScroller;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *WMSetBrowserPath(WMBrowser * bPtr, char *path)
|
const char *WMSetBrowserPath(WMBrowser * bPtr, const char *path)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *str;
|
char *str;
|
||||||
char *tmp, *retPtr = NULL;
|
char *tmp;
|
||||||
|
const char *retPtr = NULL;
|
||||||
int item;
|
int item;
|
||||||
WMListItem *listItem;
|
WMListItem *listItem;
|
||||||
|
|
||||||
@@ -781,11 +782,7 @@ WMArray *WMGetBrowserPaths(WMBrowser * bPtr)
|
|||||||
path = wmalloc(slen);
|
path = wmalloc(slen);
|
||||||
/* ignore first `/' */
|
/* ignore first `/' */
|
||||||
for (i = 0; i <= column; i++) {
|
for (i = 0; i <= column; i++) {
|
||||||
if (wstrlcat(path, bPtr->pathSeparator, slen) >= slen) {
|
wstrlcat(path, bPtr->pathSeparator, slen);
|
||||||
wfree(path);
|
|
||||||
WMFreeArray(paths);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
if (i == column) {
|
if (i == column) {
|
||||||
item = lastItem;
|
item = lastItem;
|
||||||
} else {
|
} else {
|
||||||
@@ -793,10 +790,7 @@ WMArray *WMGetBrowserPaths(WMBrowser * bPtr)
|
|||||||
}
|
}
|
||||||
if (!item)
|
if (!item)
|
||||||
break;
|
break;
|
||||||
if (wstrlcat(path, item->text, slen) >= slen) {
|
wstrlcat(path, item->text, slen);
|
||||||
wfree(path);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
WMAddToArray(paths, path);
|
WMAddToArray(paths, path);
|
||||||
}
|
}
|
||||||
|
|||||||
+35
-6
@@ -17,6 +17,7 @@ typedef struct W_Button {
|
|||||||
|
|
||||||
W_Pixmap *image;
|
W_Pixmap *image;
|
||||||
W_Pixmap *altImage;
|
W_Pixmap *altImage;
|
||||||
|
W_Pixmap *tsImage;
|
||||||
|
|
||||||
W_Pixmap *dimage;
|
W_Pixmap *dimage;
|
||||||
|
|
||||||
@@ -37,7 +38,7 @@ typedef struct W_Button {
|
|||||||
WMImagePosition imagePosition:4;
|
WMImagePosition imagePosition:4;
|
||||||
WMAlignment alignment:2;
|
WMAlignment alignment:2;
|
||||||
|
|
||||||
unsigned int selected:1;
|
unsigned int selected:2;
|
||||||
|
|
||||||
unsigned int enabled:1;
|
unsigned int enabled:1;
|
||||||
|
|
||||||
@@ -98,7 +99,6 @@ static void handleActionEvents(XEvent * event, void *data);
|
|||||||
|
|
||||||
static char *WMPushedRadioNotification = "WMPushedRadioNotification";
|
static char *WMPushedRadioNotification = "WMPushedRadioNotification";
|
||||||
|
|
||||||
#define NFONT(b) (b)->view->screen->normalFont
|
|
||||||
|
|
||||||
WMButton *WMCreateCustomButton(WMWidget * parent, int behaviourMask)
|
WMButton *WMCreateCustomButton(WMWidget * parent, int behaviourMask)
|
||||||
{
|
{
|
||||||
@@ -184,6 +184,14 @@ WMButton *WMCreateButton(WMWidget * parent, WMButtonType type)
|
|||||||
bPtr->altImage = WMRetainPixmap(scrPtr->radioButtonImageOn);
|
bPtr->altImage = WMRetainPixmap(scrPtr->radioButtonImageOn);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case WBTTriState:
|
||||||
|
bPtr = WMCreateCustomButton(parent, WBBStateChangeMask);
|
||||||
|
bPtr->flags.bordered = 0;
|
||||||
|
bPtr->image = WMRetainPixmap(scrPtr->tristateButtonImageOff);
|
||||||
|
bPtr->altImage = WMRetainPixmap(scrPtr->tristateButtonImageOn);
|
||||||
|
bPtr->tsImage = WMRetainPixmap(scrPtr->tristateButtonImageTri);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
case WBTMomentaryLight:
|
case WBTMomentaryLight:
|
||||||
bPtr = WMCreateCustomButton(parent, WBBSpringLoadedMask | WBBPushLightMask);
|
bPtr = WMCreateCustomButton(parent, WBBSpringLoadedMask | WBBPushLightMask);
|
||||||
@@ -198,7 +206,7 @@ WMButton *WMCreateButton(WMWidget * parent, WMButtonType type)
|
|||||||
WMSetButtonText(bPtr, DEFAULT_RADIO_TEXT);
|
WMSetButtonText(bPtr, DEFAULT_RADIO_TEXT);
|
||||||
bPtr->flags.alignment = DEFAULT_RADIO_ALIGNMENT;
|
bPtr->flags.alignment = DEFAULT_RADIO_ALIGNMENT;
|
||||||
bPtr->flags.imagePosition = DEFAULT_RADIO_IMAGE_POSITION;
|
bPtr->flags.imagePosition = DEFAULT_RADIO_IMAGE_POSITION;
|
||||||
} else if (type == WBTSwitch) {
|
} else if (type == WBTSwitch || type == WBTTriState) {
|
||||||
W_ResizeView(bPtr->view, DEFAULT_SWITCH_WIDTH, DEFAULT_SWITCH_HEIGHT);
|
W_ResizeView(bPtr->view, DEFAULT_SWITCH_WIDTH, DEFAULT_SWITCH_HEIGHT);
|
||||||
WMSetButtonText(bPtr, DEFAULT_SWITCH_TEXT);
|
WMSetButtonText(bPtr, DEFAULT_SWITCH_TEXT);
|
||||||
bPtr->flags.alignment = DEFAULT_SWITCH_ALIGNMENT;
|
bPtr->flags.alignment = DEFAULT_SWITCH_ALIGNMENT;
|
||||||
@@ -325,6 +333,11 @@ void WMSetButtonText(WMButton * bPtr, const char *text)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char *WMGetButtonText(WMButton *bPtr)
|
||||||
|
{
|
||||||
|
return bPtr->caption;
|
||||||
|
}
|
||||||
|
|
||||||
void WMSetButtonAltText(WMButton * bPtr, const char *text)
|
void WMSetButtonAltText(WMButton * bPtr, const char *text)
|
||||||
{
|
{
|
||||||
if (bPtr->altCaption)
|
if (bPtr->altCaption)
|
||||||
@@ -367,7 +380,10 @@ void WMSetButtonDisabledTextColor(WMButton * bPtr, WMColor * color)
|
|||||||
|
|
||||||
void WMSetButtonSelected(WMButton * bPtr, int isSelected)
|
void WMSetButtonSelected(WMButton * bPtr, int isSelected)
|
||||||
{
|
{
|
||||||
bPtr->flags.selected = isSelected ? 1 : 0;
|
if ((bPtr->flags.type == WBTTriState) && (isSelected < 0))
|
||||||
|
bPtr->flags.selected = 2;
|
||||||
|
else
|
||||||
|
bPtr->flags.selected = isSelected ? 1 : 0;
|
||||||
|
|
||||||
if (bPtr->view->flags.realized) {
|
if (bPtr->view->flags.realized) {
|
||||||
paintButton(bPtr);
|
paintButton(bPtr);
|
||||||
@@ -380,6 +396,9 @@ int WMGetButtonSelected(WMButton * bPtr)
|
|||||||
{
|
{
|
||||||
CHECK_CLASS(bPtr, WC_Button);
|
CHECK_CLASS(bPtr, WC_Button);
|
||||||
|
|
||||||
|
if ((bPtr->flags.type == WBTTriState) && (bPtr->flags.selected == 2))
|
||||||
|
return -1;
|
||||||
|
|
||||||
return bPtr->flags.selected;
|
return bPtr->flags.selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -554,7 +573,9 @@ static void paintButton(Button * bPtr)
|
|||||||
if (bPtr->flags.stateChange) {
|
if (bPtr->flags.stateChange) {
|
||||||
if (bPtr->altCaption)
|
if (bPtr->altCaption)
|
||||||
caption = bPtr->altCaption;
|
caption = bPtr->altCaption;
|
||||||
if (bPtr->altImage)
|
if (bPtr->flags.selected == 2)
|
||||||
|
image = bPtr->tsImage;
|
||||||
|
else if (bPtr->altImage)
|
||||||
image = bPtr->altImage;
|
image = bPtr->altImage;
|
||||||
if (bPtr->altTextColor)
|
if (bPtr->altTextColor)
|
||||||
textColor = bPtr->altTextColor;
|
textColor = bPtr->altTextColor;
|
||||||
@@ -655,6 +676,8 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
|
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
if (event->xbutton.button == Button1) {
|
if (event->xbutton.button == Button1) {
|
||||||
|
static const unsigned int next_state[4] = { [0] = 1, [1] = 2, [2] = 0 };
|
||||||
|
|
||||||
bPtr->flags.prevSelected = bPtr->flags.selected;
|
bPtr->flags.prevSelected = bPtr->flags.selected;
|
||||||
bPtr->flags.wasPushed = 0;
|
bPtr->flags.wasPushed = 0;
|
||||||
bPtr->flags.pushed = 1;
|
bPtr->flags.pushed = 1;
|
||||||
@@ -663,7 +686,10 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
dopaint = 1;
|
dopaint = 1;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
bPtr->flags.selected = !bPtr->flags.selected;
|
if (bPtr->flags.type == WBTTriState)
|
||||||
|
bPtr->flags.selected = next_state[bPtr->flags.selected];
|
||||||
|
else
|
||||||
|
bPtr->flags.selected = !bPtr->flags.selected;
|
||||||
dopaint = 1;
|
dopaint = 1;
|
||||||
|
|
||||||
if (bPtr->flags.continuous && !bPtr->timer) {
|
if (bPtr->flags.continuous && !bPtr->timer) {
|
||||||
@@ -744,5 +770,8 @@ static void destroyButton(Button * bPtr)
|
|||||||
if (bPtr->altImage)
|
if (bPtr->altImage)
|
||||||
WMReleasePixmap(bPtr->altImage);
|
WMReleasePixmap(bPtr->altImage);
|
||||||
|
|
||||||
|
if (bPtr->tsImage)
|
||||||
|
WMReleasePixmap(bPtr->tsImage);
|
||||||
|
|
||||||
wfree(bPtr);
|
wfree(bPtr);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -51,7 +51,7 @@ static WMColor *findCloseColor(WMScreen * scr, unsigned short red, unsigned shor
|
|||||||
color->refCount = 1;
|
color->refCount = 1;
|
||||||
color->color = xcolor;
|
color->color = xcolor;
|
||||||
color->alpha = alpha;
|
color->alpha = alpha;
|
||||||
color->flags.exact = 1;
|
color->flags.exact = 0;
|
||||||
color->gc = NULL;
|
color->gc = NULL;
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
@@ -91,7 +91,7 @@ WMColor *WMCreateRGBColor(WMScreen * scr, unsigned short red, unsigned short gre
|
|||||||
color = findCloseColor(scr, red, green, blue, 0xffff);
|
color = findCloseColor(scr, red, green, blue, 0xffff);
|
||||||
}
|
}
|
||||||
if (!color)
|
if (!color)
|
||||||
color = WMBlackColor(scr);
|
color = scr->black;
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
@@ -117,7 +117,7 @@ WMColor *WMCreateRGBAColor(WMScreen * scr, unsigned short red, unsigned short gr
|
|||||||
color = findCloseColor(scr, red, green, blue, alpha);
|
color = findCloseColor(scr, red, green, blue, alpha);
|
||||||
}
|
}
|
||||||
if (!color)
|
if (!color)
|
||||||
color = WMBlackColor(scr);
|
color = scr->black;
|
||||||
|
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|||||||
+54
-52
@@ -44,7 +44,7 @@
|
|||||||
# include <X11/extensions/shape.h>
|
# include <X11/extensions/shape.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
|
const char *WMColorPanelColorChangedNotification = "WMColorPanelColorChangedNotification";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Bitmaps for magnifying glass cursor
|
* Bitmaps for magnifying glass cursor
|
||||||
@@ -67,9 +67,6 @@ static unsigned char Cursor_bits[] = {
|
|||||||
0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x70
|
0x00, 0x00, 0x00, 0xb8, 0x00, 0x00, 0x00, 0x70
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Cursor shape-mask */
|
|
||||||
#define Cursor_shape_width 32
|
|
||||||
#define Cursor_shape_height 32
|
|
||||||
static unsigned char Cursor_shape_bits[] = {
|
static unsigned char Cursor_shape_bits[] = {
|
||||||
0x00, 0x7e, 0x00, 0x00, 0xc0, 0x81, 0x03, 0x00, 0x20, 0x00, 0x04, 0x00, 0x10, 0x00, 0x08,
|
0x00, 0x7e, 0x00, 0x00, 0xc0, 0x81, 0x03, 0x00, 0x20, 0x00, 0x04, 0x00, 0x10, 0x00, 0x08,
|
||||||
0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x20, 0x00, 0x02, 0x00, 0x40, 0x00, 0x02, 0x00,
|
0x00, 0x08, 0x00, 0x10, 0x00, 0x04, 0x00, 0x20, 0x00, 0x02, 0x00, 0x40, 0x00, 0x02, 0x00,
|
||||||
@@ -264,13 +261,7 @@ enum {
|
|||||||
|
|
||||||
#define COLORWHEEL_PART 1
|
#define COLORWHEEL_PART 1
|
||||||
#define CUSTOMPALETTE_PART 2
|
#define CUSTOMPALETTE_PART 2
|
||||||
#define BUFSIZE 1024
|
|
||||||
|
|
||||||
#define MAX_LENGTH 1024
|
|
||||||
|
|
||||||
#ifndef M_PI
|
|
||||||
#define M_PI 3.14159265358979323846
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static char *generateNewFilename(const char *curName);
|
static char *generateNewFilename(const char *curName);
|
||||||
static void convertCPColor(CPColor * color);
|
static void convertCPColor(CPColor * color);
|
||||||
@@ -403,7 +394,7 @@ static WMColorPanel *makeColorPanel(WMScreen * scrPtr, const char *name)
|
|||||||
panel->mode = WMWheelModeColorPanel;
|
panel->mode = WMWheelModeColorPanel;
|
||||||
panel->lastChanged = 0;
|
panel->lastChanged = 0;
|
||||||
panel->slidersmode = WMRGBModeColorPanel;
|
panel->slidersmode = WMRGBModeColorPanel;
|
||||||
panel->configurationPath = wstrconcat(wusergnusteppath(), "/Library/Colors/");
|
panel->configurationPath = wstrconcat(wuserdatapath(), "/Colors/");
|
||||||
|
|
||||||
/* Some General Purpose Widgets */
|
/* Some General Purpose Widgets */
|
||||||
panel->colorWell = WMCreateColorWell(panel->win);
|
panel->colorWell = WMCreateColorWell(panel->win);
|
||||||
@@ -721,7 +712,7 @@ static WMColorPanel *makeColorPanel(WMScreen * scrPtr, const char *name)
|
|||||||
WMAddNotificationObserver(rgbTextFieldCallback, panel, WMTextDidEndEditingNotification, panel->rgbBlueT);
|
WMAddNotificationObserver(rgbTextFieldCallback, panel, WMTextDidEndEditingNotification, panel->rgbBlueT);
|
||||||
|
|
||||||
panel->rgbDecB = WMCreateButton(panel->rgbFrm, WBTRadio);
|
panel->rgbDecB = WMCreateButton(panel->rgbFrm, WBTRadio);
|
||||||
WMSetButtonText(panel->rgbDecB, "Decimal");
|
WMSetButtonText(panel->rgbDecB, _("Decimal"));
|
||||||
WMSetButtonSelected(panel->rgbDecB, 1);
|
WMSetButtonSelected(panel->rgbDecB, 1);
|
||||||
panel->rgbState = RGBdec;
|
panel->rgbState = RGBdec;
|
||||||
WMSetButtonAction(panel->rgbDecB, rgbDecToHex, panel);
|
WMSetButtonAction(panel->rgbDecB, rgbDecToHex, panel);
|
||||||
@@ -729,7 +720,7 @@ static WMColorPanel *makeColorPanel(WMScreen * scrPtr, const char *name)
|
|||||||
WMMoveWidget(panel->rgbDecB, 2, 81);
|
WMMoveWidget(panel->rgbDecB, 2, 81);
|
||||||
|
|
||||||
panel->rgbHexB = WMCreateButton(panel->rgbFrm, WBTRadio);
|
panel->rgbHexB = WMCreateButton(panel->rgbFrm, WBTRadio);
|
||||||
WMSetButtonText(panel->rgbHexB, "Hexadecimal");
|
WMSetButtonText(panel->rgbHexB, _("Hexadecimal"));
|
||||||
WMSetButtonAction(panel->rgbHexB, rgbDecToHex, panel);
|
WMSetButtonAction(panel->rgbHexB, rgbDecToHex, panel);
|
||||||
WMResizeWidget(panel->rgbHexB, PWIDTH - 8, 23);
|
WMResizeWidget(panel->rgbHexB, PWIDTH - 8, 23);
|
||||||
WMMoveWidget(panel->rgbHexB, 2, 104);
|
WMMoveWidget(panel->rgbHexB, 2, 104);
|
||||||
@@ -1168,21 +1159,18 @@ static void readConfiguration(W_ColorPanel * panel)
|
|||||||
|
|
||||||
DIR *dPtr;
|
DIR *dPtr;
|
||||||
struct dirent *dp;
|
struct dirent *dp;
|
||||||
struct stat stat_buf;
|
|
||||||
int item;
|
int item;
|
||||||
|
|
||||||
if (stat(panel->configurationPath, &stat_buf) != 0) {
|
if (!wmkdirhier(panel->configurationPath)) {
|
||||||
if (mkdir(panel->configurationPath, S_IRWXU | S_IRGRP | S_IROTH | S_IXGRP | S_IXOTH) != 0) {
|
werror(_("Color Panel: Could not create directory %s needed"
|
||||||
werror(_("Color Panel: Could not create directory %s needed"
|
" to store configurations"), panel->configurationPath);
|
||||||
" to store configurations"), panel->configurationPath);
|
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
|
||||||
WMSetPopUpButtonEnabled(panel->customPaletteMenuBtn, False);
|
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
|
||||||
WMSetPopUpButtonEnabled(panel->colorListColorMenuBtn, False);
|
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
|
||||||
WMSetPopUpButtonEnabled(panel->colorListListMenuBtn, False);
|
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
||||||
WMRunAlertPanel(WMWidgetScreen(panel->win), panel->win,
|
_("File Error"),
|
||||||
_("File Error"),
|
_("Could not create ColorPanel configuration directory"),
|
||||||
_("Could not create ColorPanel configuration directory"),
|
_("OK"), NULL, NULL);
|
||||||
_("OK"), NULL, NULL);
|
|
||||||
}
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1954,7 +1942,7 @@ static void wheelInitMatrix(W_ColorPanel * panel)
|
|||||||
if (sat < 256) {
|
if (sat < 256) {
|
||||||
if (xcor != 0)
|
if (xcor != 0)
|
||||||
dhue[0] = rint(atan((double)ycor / (double)xcor) *
|
dhue[0] = rint(atan((double)ycor / (double)xcor) *
|
||||||
(180.0 / M_PI)) + (xcor < 0 ? 180.0 : 0.0);
|
(180.0 / WM_PI)) + (xcor < 0 ? 180.0 : 0.0);
|
||||||
else
|
else
|
||||||
dhue[0] = 270;
|
dhue[0] = 270;
|
||||||
|
|
||||||
@@ -2240,7 +2228,7 @@ static void wheelPositionSelectionOutBounds(W_ColorPanel * panel, int x, int y)
|
|||||||
panel->color.hsv.value = 255 - WMGetSliderValue(panel->wheelBrightnessS);
|
panel->color.hsv.value = 255 - WMGetSliderValue(panel->wheelBrightnessS);
|
||||||
|
|
||||||
if (xcor != 0)
|
if (xcor != 0)
|
||||||
hue = rint(atan(-(double)ycor / (double)xcor) * (180.0 / M_PI));
|
hue = rint(atan(-(double)ycor / (double)xcor) * (180.0 / WM_PI));
|
||||||
else {
|
else {
|
||||||
if (ycor < 0)
|
if (ycor < 0)
|
||||||
hue = 90;
|
hue = 90;
|
||||||
@@ -2260,9 +2248,9 @@ static void wheelPositionSelectionOutBounds(W_ColorPanel * panel, int x, int y)
|
|||||||
|
|
||||||
wheelUndrawSelection(panel);
|
wheelUndrawSelection(panel);
|
||||||
|
|
||||||
panel->colx = 2 + rint((colorWheelSize * (1.0 + cos(panel->color.hsv.hue * (M_PI / 180.0)))) / 2.0);
|
panel->colx = 2 + rint((colorWheelSize * (1.0 + cos(panel->color.hsv.hue * (WM_PI / 180.0)))) / 2.0);
|
||||||
/* "+2" because of "colorWheelSize + 4" */
|
/* "+2" because of "colorWheelSize + 4" */
|
||||||
panel->coly = 2 + rint((colorWheelSize * (1.0 + sin(-panel->color.hsv.hue * (M_PI / 180.0)))) / 2.0);
|
panel->coly = 2 + rint((colorWheelSize * (1.0 + sin(-panel->color.hsv.hue * (WM_PI / 180.0)))) / 2.0);
|
||||||
|
|
||||||
wheelUpdateSelection(panel);
|
wheelUpdateSelection(panel);
|
||||||
cpColor = panel->color;
|
cpColor = panel->color;
|
||||||
@@ -2271,7 +2259,7 @@ static void wheelPositionSelectionOutBounds(W_ColorPanel * panel, int x, int y)
|
|||||||
|
|
||||||
static void wheelUpdateBrightnessGradientFromLocation(W_ColorPanel * panel)
|
static void wheelUpdateBrightnessGradientFromLocation(W_ColorPanel * panel)
|
||||||
{
|
{
|
||||||
CPColor from;
|
CPColor from = {};
|
||||||
unsigned long ofs;
|
unsigned long ofs;
|
||||||
|
|
||||||
ofs = panel->coly * panel->wheelMtrx->width + panel->colx;
|
ofs = panel->coly * panel->wheelMtrx->width + panel->colx;
|
||||||
@@ -2394,6 +2382,8 @@ void rgbIntToChar(W_ColorPanel *panel, int *value)
|
|||||||
case RGBhex:
|
case RGBhex:
|
||||||
format = "%0X";
|
format = "%0X";
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
format = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
sprintf(tmp, format, value[0]);
|
sprintf(tmp, format, value[0]);
|
||||||
@@ -2614,7 +2604,7 @@ static void cmykTextFieldCallback(void *observerData, WMNotification * notificat
|
|||||||
|
|
||||||
static void hsbSliderCallback(WMWidget * w, void *data)
|
static void hsbSliderCallback(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
CPColor cpColor;
|
CPColor cpColor = {};
|
||||||
int value[3];
|
int value[3];
|
||||||
char tmp[4];
|
char tmp[4];
|
||||||
W_ColorPanel *panel = (W_ColorPanel *) data;
|
W_ColorPanel *panel = (W_ColorPanel *) data;
|
||||||
@@ -2650,9 +2640,9 @@ static void hsbSliderCallback(WMWidget * w, void *data)
|
|||||||
|
|
||||||
static void hsbTextFieldCallback(void *observerData, WMNotification * notification)
|
static void hsbTextFieldCallback(void *observerData, WMNotification * notification)
|
||||||
{
|
{
|
||||||
CPColor cpColor;
|
CPColor cpColor = {};
|
||||||
int value[3];
|
int value[3];
|
||||||
char tmp[4];
|
char tmp[12]; /* We only 4 bytes needed, but compilers cannot know that */
|
||||||
int n;
|
int n;
|
||||||
W_ColorPanel *panel = (W_ColorPanel *) observerData;
|
W_ColorPanel *panel = (W_ColorPanel *) observerData;
|
||||||
|
|
||||||
@@ -2873,8 +2863,6 @@ static void customSetPalette(W_ColorPanel * panel)
|
|||||||
|
|
||||||
panel->palXRatio = (double)(panel->customPaletteImg->width) / (double)(customPaletteWidth);
|
panel->palXRatio = (double)(panel->customPaletteImg->width) / (double)(customPaletteWidth);
|
||||||
panel->palYRatio = (double)(panel->customPaletteImg->height) / (double)(customPaletteHeight);
|
panel->palYRatio = (double)(panel->customPaletteImg->height) / (double)(customPaletteHeight);
|
||||||
|
|
||||||
WMGetPopUpButtonSelectedItem(panel->customPaletteHistoryBtn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void customPalettePositionSelection(W_ColorPanel * panel, int x, int y)
|
static void customPalettePositionSelection(W_ColorPanel * panel, int x, int y)
|
||||||
@@ -3360,10 +3348,10 @@ static void wheelInit(W_ColorPanel * panel)
|
|||||||
|
|
||||||
panel->colx = 2 + rint((colorWheelSize / 2.0) *
|
panel->colx = 2 + rint((colorWheelSize / 2.0) *
|
||||||
(1 + (panel->color.hsv.saturation / 255.0) *
|
(1 + (panel->color.hsv.saturation / 255.0) *
|
||||||
cos(panel->color.hsv.hue * M_PI / 180.0)));
|
cos(panel->color.hsv.hue * WM_PI / 180.0)));
|
||||||
panel->coly = 2 + rint((colorWheelSize / 2.0) *
|
panel->coly = 2 + rint((colorWheelSize / 2.0) *
|
||||||
(1 + (panel->color.hsv.saturation / 255.0) *
|
(1 + (panel->color.hsv.saturation / 255.0) *
|
||||||
sin(-panel->color.hsv.hue * M_PI / 180.0)));
|
sin(-panel->color.hsv.hue * WM_PI / 180.0)));
|
||||||
|
|
||||||
wheelCalculateValues(panel, panel->color.hsv.value);
|
wheelCalculateValues(panel, panel->color.hsv.value);
|
||||||
|
|
||||||
@@ -3391,6 +3379,7 @@ static void grayInit(W_ColorPanel * panel)
|
|||||||
static void rgbInit(W_ColorPanel * panel)
|
static void rgbInit(W_ColorPanel * panel)
|
||||||
{
|
{
|
||||||
char tmp[4];
|
char tmp[4];
|
||||||
|
const char *format;
|
||||||
|
|
||||||
if (panel->color.set != cpRGB)
|
if (panel->color.set != cpRGB)
|
||||||
convertCPColor(&panel->color);
|
convertCPColor(&panel->color);
|
||||||
@@ -3399,11 +3388,23 @@ static void rgbInit(W_ColorPanel * panel)
|
|||||||
WMSetSliderValue(panel->rgbGreenS, panel->color.rgb.green);
|
WMSetSliderValue(panel->rgbGreenS, panel->color.rgb.green);
|
||||||
WMSetSliderValue(panel->rgbBlueS, panel->color.rgb.blue);
|
WMSetSliderValue(panel->rgbBlueS, panel->color.rgb.blue);
|
||||||
|
|
||||||
sprintf(tmp, "%d", panel->color.rgb.red);
|
switch (panel->rgbState) {
|
||||||
|
case RGBdec:
|
||||||
|
format = "%d";
|
||||||
|
break;
|
||||||
|
case RGBhex:
|
||||||
|
format = "%0X";
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
/* Avoid compiler warning */
|
||||||
|
format = "";
|
||||||
|
}
|
||||||
|
|
||||||
|
sprintf(tmp, format, panel->color.rgb.red);
|
||||||
WMSetTextFieldText(panel->rgbRedT, tmp);
|
WMSetTextFieldText(panel->rgbRedT, tmp);
|
||||||
sprintf(tmp, "%d", panel->color.rgb.green);
|
sprintf(tmp, format, panel->color.rgb.green);
|
||||||
WMSetTextFieldText(panel->rgbGreenT, tmp);
|
WMSetTextFieldText(panel->rgbGreenT, tmp);
|
||||||
sprintf(tmp, "%d", panel->color.rgb.blue);
|
sprintf(tmp, format, panel->color.rgb.blue);
|
||||||
WMSetTextFieldText(panel->rgbBlueT, tmp);
|
WMSetTextFieldText(panel->rgbBlueT, tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3449,7 +3450,7 @@ static void hsbInit(W_ColorPanel * panel)
|
|||||||
WMSetSliderValue(panel->hsbSaturationS, value[1]);
|
WMSetSliderValue(panel->hsbSaturationS, value[1]);
|
||||||
WMSetSliderValue(panel->hsbBrightnessS, value[2]);
|
WMSetSliderValue(panel->hsbBrightnessS, value[2]);
|
||||||
|
|
||||||
sprintf(tmp, "%d", value[0]);
|
sprintf(tmp, "%hu", value[0]);
|
||||||
WMSetTextFieldText(panel->hsbHueT, tmp);
|
WMSetTextFieldText(panel->hsbHueT, tmp);
|
||||||
sprintf(tmp, "%d", value[1]);
|
sprintf(tmp, "%d", value[1]);
|
||||||
WMSetTextFieldText(panel->hsbSaturationT, tmp);
|
WMSetTextFieldText(panel->hsbSaturationT, tmp);
|
||||||
@@ -3500,13 +3501,17 @@ static void convertCPColor(CPColor * color)
|
|||||||
old_hue = color->hsv.hue;
|
old_hue = color->hsv.hue;
|
||||||
RRGBtoHSV(&(color->rgb), &(color->hsv));
|
RRGBtoHSV(&(color->rgb), &(color->hsv));
|
||||||
|
|
||||||
/* In black the hue is undefined, and may change by conversion
|
/*
|
||||||
* Same for white. */
|
* For pure grey colors, the Hue is generally calculated
|
||||||
if (((color->rgb.red == 0) &&
|
* as 0, but in reality the Hue does not matter.
|
||||||
(color->rgb.green == 0) &&
|
*
|
||||||
(color->rgb.blue == 0)) ||
|
* But in an interactive GUI it is interresting to remember
|
||||||
((color->rgb.red == 0) && (color->rgb.green == 0) && (color->rgb.blue == 255))
|
* the previous Hue because if user moves away from perfect
|
||||||
)
|
* grey then he could be interrested in finding back his
|
||||||
|
* previous tint
|
||||||
|
*/
|
||||||
|
if ((color->rgb.red == color->rgb.green) &&
|
||||||
|
(color->rgb.red == color->rgb.blue) )
|
||||||
color->hsv.hue = old_hue;
|
color->hsv.hue = old_hue;
|
||||||
break;
|
break;
|
||||||
case cpHSV:
|
case cpHSV:
|
||||||
@@ -3515,9 +3520,6 @@ static void convertCPColor(CPColor * color)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ABS_SHIFT(val, shift) \
|
|
||||||
(((shift) > 0) ? (val) >> (shift) : (val) << -(shift))
|
|
||||||
|
|
||||||
static RColor ulongToRColor(WMScreen * scr, unsigned long value)
|
static RColor ulongToRColor(WMScreen * scr, unsigned long value)
|
||||||
{
|
{
|
||||||
RColor color;
|
RColor color;
|
||||||
|
|||||||
+5
-6
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#define XDND_COLOR_DATA_TYPE "application/X-color"
|
#define XDND_COLOR_DATA_TYPE "application/X-color"
|
||||||
|
|
||||||
char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
|
const char *WMColorWellDidChangeNotification = "WMColorWellDidChangeNotification";
|
||||||
|
|
||||||
typedef struct W_ColorWell {
|
typedef struct W_ColorWell {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
@@ -80,7 +80,6 @@ static WMDragDestinationProcs _DragDestinationProcs = {
|
|||||||
|
|
||||||
#define DEFAULT_WIDTH 60
|
#define DEFAULT_WIDTH 60
|
||||||
#define DEFAULT_HEIGHT 30
|
#define DEFAULT_HEIGHT 30
|
||||||
#define DEFAULT_BORDER_WIDTH 6
|
|
||||||
|
|
||||||
#define MIN_WIDTH 16
|
#define MIN_WIDTH 16
|
||||||
#define MIN_HEIGHT 8
|
#define MIN_HEIGHT 8
|
||||||
@@ -174,10 +173,10 @@ WMColorWell *WMCreateColorWell(WMWidget * parent)
|
|||||||
|
|
||||||
void WMSetColorWellColor(WMColorWell * cPtr, WMColor * color)
|
void WMSetColorWellColor(WMColorWell * cPtr, WMColor * color)
|
||||||
{
|
{
|
||||||
if (cPtr->color)
|
if (cPtr->color && cPtr->color != color) {
|
||||||
WMReleaseColor(cPtr->color);
|
WMReleaseColor(cPtr->color);
|
||||||
|
cPtr->color = WMRetainColor(color);
|
||||||
cPtr->color = WMRetainColor(color);
|
}
|
||||||
|
|
||||||
if (cPtr->colorView->flags.realized && cPtr->colorView->flags.mapped)
|
if (cPtr->colorView->flags.realized && cPtr->colorView->flags.mapped)
|
||||||
paintColorWell(cPtr);
|
paintColorWell(cPtr);
|
||||||
@@ -212,7 +211,7 @@ static void willResizeColorWell(W_ViewDelegate * self, WMView * view, unsigned i
|
|||||||
if (*height < MIN_HEIGHT)
|
if (*height < MIN_HEIGHT)
|
||||||
*height = MIN_HEIGHT;
|
*height = MIN_HEIGHT;
|
||||||
|
|
||||||
bw = (int)((float)WMIN(*width, *height) * 0.24);
|
bw = (int)((float)WMIN(*width, *height) * 0.24F);
|
||||||
|
|
||||||
W_ResizeView(cPtr->colorView, *width - 2 * bw, *height - 2 * bw);
|
W_ResizeView(cPtr->colorView, *width - 2 * bw, *height - 2 * bw);
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,12 @@
|
|||||||
# define _(text) (text)
|
# define _(text) (text)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_SECURE_GETENV
|
||||||
|
#define GETENV(x) secure_getenv((x))
|
||||||
|
#else
|
||||||
|
#define GETENV(x) getenv((x))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#endif /* WINGS_CONFIG_H_ */
|
#endif /* WINGS_CONFIG_H_ */
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -343,7 +343,7 @@ void WMFreeFilePanel(WMFilePanel * panel)
|
|||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *path, const char *name, char **fileTypes)
|
WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, const char *path, const char *name, char **fileTypes)
|
||||||
{
|
{
|
||||||
WMScreen *scr = WMWidgetScreen(panel->win);
|
WMScreen *scr = WMWidgetScreen(panel->win);
|
||||||
|
|
||||||
@@ -387,12 +387,12 @@ WMRunModalFilePanelForDirectory(WMFilePanel * panel, WMWindow * owner, char *pat
|
|||||||
return (panel->flags.canceled ? False : True);
|
return (panel->flags.canceled ? False : True);
|
||||||
}
|
}
|
||||||
|
|
||||||
void WMSetFilePanelDirectory(WMFilePanel * panel, char *path)
|
void WMSetFilePanelDirectory(WMFilePanel * panel, const char *path)
|
||||||
{
|
{
|
||||||
WMList *list;
|
WMList *list;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
int col;
|
int col;
|
||||||
char *rest;
|
const char *rest;
|
||||||
|
|
||||||
rest = WMSetBrowserPath(panel->browser, path);
|
rest = WMSetBrowserPath(panel->browser, path);
|
||||||
if (strcmp(path, "/") == 0)
|
if (strcmp(path, "/") == 0)
|
||||||
@@ -748,7 +748,7 @@ static void goFloppy(WMWidget *widget, void *p_panel)
|
|||||||
(void) widget;
|
(void) widget;
|
||||||
|
|
||||||
if (stat(WINGsConfiguration.floppyPath, &filestat)) {
|
if (stat(WINGsConfiguration.floppyPath, &filestat)) {
|
||||||
showError(scr, panel->win, _("An error occured browsing '%s'."), WINGsConfiguration.floppyPath);
|
showError(scr, panel->win, _("An error occurred browsing '%s'."), WINGsConfiguration.floppyPath);
|
||||||
return;
|
return;
|
||||||
} else if (!S_ISDIR(filestat.st_mode)) {
|
} else if (!S_ISDIR(filestat.st_mode)) {
|
||||||
showError(scr, panel->win, _("'%s' is not a directory."), WINGsConfiguration.floppyPath);
|
showError(scr, panel->win, _("'%s' is not a directory."), WINGsConfiguration.floppyPath);
|
||||||
@@ -761,7 +761,7 @@ static void goFloppy(WMWidget *widget, void *p_panel)
|
|||||||
static void goHome(WMWidget *widget, void *p_panel)
|
static void goHome(WMWidget *widget, void *p_panel)
|
||||||
{
|
{
|
||||||
WMFilePanel *panel = p_panel;
|
WMFilePanel *panel = p_panel;
|
||||||
char *home;
|
const char *home;
|
||||||
|
|
||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
(void) widget;
|
(void) widget;
|
||||||
|
|||||||
+111
-31
@@ -12,6 +12,12 @@
|
|||||||
#include <X11/Xft/Xft.h>
|
#include <X11/Xft/Xft.h>
|
||||||
#include <fontconfig/fontconfig.h>
|
#include <fontconfig/fontconfig.h>
|
||||||
|
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
#include <pango/pango.h>
|
||||||
|
#include <pango/pangofc-fontmap.h>
|
||||||
|
#include <pango/pangoxft.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#define DEFAULT_FONT "sans serif:pixelsize=12"
|
#define DEFAULT_FONT "sans serif:pixelsize=12"
|
||||||
|
|
||||||
#define DEFAULT_SIZE WINGsConfiguration.defaultFontSize
|
#define DEFAULT_SIZE WINGsConfiguration.defaultFontSize
|
||||||
@@ -64,37 +70,30 @@ static Bool hasProperty(FcPattern * pattern, const char *property)
|
|||||||
return False;
|
return False;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool hasPropertyWithStringValue(FcPattern * pattern, const char *object, const char *value)
|
|
||||||
{
|
|
||||||
FcChar8 *str;
|
|
||||||
int id;
|
|
||||||
|
|
||||||
if (!value || value[0] == 0)
|
|
||||||
return True;
|
|
||||||
|
|
||||||
id = 0;
|
|
||||||
while (FcPatternGetString(pattern, object, id, &str) == FcResultMatch) {
|
|
||||||
if (strcasecmp(value, (char *)str) == 0) {
|
|
||||||
return True;
|
|
||||||
}
|
|
||||||
id++;
|
|
||||||
}
|
|
||||||
|
|
||||||
return False;
|
|
||||||
}
|
|
||||||
|
|
||||||
static char *makeFontOfSize(const char *font, int size, const char *fallback)
|
static char *makeFontOfSize(const char *font, int size, const char *fallback)
|
||||||
{
|
{
|
||||||
FcPattern *pattern;
|
FcPattern *pattern = NULL;
|
||||||
char *result;
|
char *result;
|
||||||
|
|
||||||
if (font[0] == '-') {
|
if (font && font[0] == '-') {
|
||||||
pattern = xlfdToFcPattern(font);
|
pattern = xlfdToFcPattern(font);
|
||||||
} else {
|
} else {
|
||||||
pattern = FcNameParse((const FcChar8 *) font);
|
pattern = FcNameParse((const FcChar8 *) font);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*FcPatternPrint(pattern); */
|
if (!pattern) {
|
||||||
|
wwarning(_("could not load font spec: %s."), font);
|
||||||
|
if (!fallback)
|
||||||
|
return NULL;
|
||||||
|
pattern = FcPatternCreate();
|
||||||
|
if (!pattern)
|
||||||
|
return NULL;
|
||||||
|
if (!FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) fallback)) {
|
||||||
|
wfatal(_("could not load default font spec: %s."), fallback);
|
||||||
|
FcPatternDestroy(pattern);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (size > 0) {
|
if (size > 0) {
|
||||||
FcPatternDel(pattern, FC_PIXEL_SIZE);
|
FcPatternDel(pattern, FC_PIXEL_SIZE);
|
||||||
@@ -103,12 +102,6 @@ static char *makeFontOfSize(const char *font, int size, const char *fallback)
|
|||||||
FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)DEFAULT_SIZE);
|
FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)DEFAULT_SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fallback && !hasPropertyWithStringValue(pattern, FC_FAMILY, fallback)) {
|
|
||||||
FcPatternAddString(pattern, FC_FAMILY, (const FcChar8 *) fallback);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*FcPatternPrint(pattern); */
|
|
||||||
|
|
||||||
result = (char *)FcNameUnparse(pattern);
|
result = (char *)FcNameUnparse(pattern);
|
||||||
FcPatternDestroy(pattern);
|
FcPatternDestroy(pattern);
|
||||||
|
|
||||||
@@ -120,8 +113,16 @@ WMFont *WMCreateFont(WMScreen * scrPtr, const char *fontName)
|
|||||||
Display *display = scrPtr->display;
|
Display *display = scrPtr->display;
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
char *fname;
|
char *fname;
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
PangoFontMap *fontmap;
|
||||||
|
PangoContext *context;
|
||||||
|
PangoLayout *layout;
|
||||||
|
FcPattern *pattern;
|
||||||
|
PangoFontDescription *description;
|
||||||
|
double size;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (fontName[0] == '-') {
|
if (fontName && fontName[0] == '-') {
|
||||||
fname = xlfdToFcName(fontName);
|
fname = xlfdToFcName(fontName);
|
||||||
} else {
|
} else {
|
||||||
fname = wstrdup(fontName);
|
fname = wstrdup(fontName);
|
||||||
@@ -156,6 +157,29 @@ WMFont *WMCreateFont(WMScreen * scrPtr, const char *fontName)
|
|||||||
|
|
||||||
font->name = fname;
|
font->name = fname;
|
||||||
|
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
fontmap = pango_xft_get_font_map(scrPtr->display, scrPtr->screen);
|
||||||
|
context = pango_font_map_create_context(fontmap);
|
||||||
|
layout = pango_layout_new(context);
|
||||||
|
|
||||||
|
pattern = FcNameParse((FcChar8 *) font->name);
|
||||||
|
description = pango_fc_font_description_from_pattern(pattern, FALSE);
|
||||||
|
|
||||||
|
/* Pango examines FC_SIZE but not FC_PIXEL_SIZE of the patten, but
|
||||||
|
* font-name has only "pixelsize", so set the size manually here.
|
||||||
|
*/
|
||||||
|
if (FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &size) == FcResultMatch)
|
||||||
|
pango_font_description_set_absolute_size(description, size * PANGO_SCALE);
|
||||||
|
|
||||||
|
pango_layout_set_font_description(layout, description);
|
||||||
|
|
||||||
|
font->layout = layout;
|
||||||
|
|
||||||
|
pango_font_description_free(description);
|
||||||
|
g_object_unref(context);
|
||||||
|
FcPatternDestroy(pattern);
|
||||||
|
#endif
|
||||||
|
|
||||||
assert(WMHashInsert(scrPtr->fontCache, font->name, font) == NULL);
|
assert(WMHashInsert(scrPtr->fontCache, font->name, font) == NULL);
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
@@ -177,6 +201,11 @@ void WMReleaseFont(WMFont * font)
|
|||||||
font->refCount--;
|
font->refCount--;
|
||||||
if (font->refCount < 1) {
|
if (font->refCount < 1) {
|
||||||
XftFontClose(font->screen->display, font->font);
|
XftFontClose(font->screen->display, font->font);
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
if (font->layout) {
|
||||||
|
g_object_unref(font->layout);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (font->name) {
|
if (font->name) {
|
||||||
WMHashRemove(font->screen->fontCache, font->name);
|
WMHashRemove(font->screen->fontCache, font->name);
|
||||||
wfree(font->name);
|
wfree(font->name);
|
||||||
@@ -204,6 +233,16 @@ char *WMGetFontName(WMFont * font)
|
|||||||
return font->name;
|
return font->name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WMGetScaleBaseFromSystemFont(WMScreen *scrPtr, int *alphabetWidth, int *fontHeight)
|
||||||
|
{
|
||||||
|
WMFont *font;
|
||||||
|
|
||||||
|
font = WMDefaultSystemFont(scrPtr);
|
||||||
|
*alphabetWidth = WMWidthOfString(font, "abcdefghijklmnopqrstuvwxyz", 26);
|
||||||
|
*fontHeight = WMFontHeight(font);
|
||||||
|
WMReleaseFont(font);
|
||||||
|
}
|
||||||
|
|
||||||
WMFont *WMDefaultSystemFont(WMScreen * scrPtr)
|
WMFont *WMDefaultSystemFont(WMScreen * scrPtr)
|
||||||
{
|
{
|
||||||
return WMRetainFont(scrPtr->normalFont);
|
return WMRetainFont(scrPtr->normalFont);
|
||||||
@@ -219,7 +258,11 @@ WMFont *WMSystemFontOfSize(WMScreen * scrPtr, int size)
|
|||||||
WMFont *font;
|
WMFont *font;
|
||||||
char *fontSpec;
|
char *fontSpec;
|
||||||
|
|
||||||
fontSpec = makeFontOfSize(WINGsConfiguration.systemFont, size, NULL);
|
fontSpec = makeFontOfSize(WINGsConfiguration.systemFont, size, DEFAULT_FONT);
|
||||||
|
|
||||||
|
if (!fontSpec) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
font = WMCreateFont(scrPtr, fontSpec);
|
font = WMCreateFont(scrPtr, fontSpec);
|
||||||
|
|
||||||
@@ -237,7 +280,11 @@ WMFont *WMBoldSystemFontOfSize(WMScreen * scrPtr, int size)
|
|||||||
WMFont *font;
|
WMFont *font;
|
||||||
char *fontSpec;
|
char *fontSpec;
|
||||||
|
|
||||||
fontSpec = makeFontOfSize(WINGsConfiguration.boldSystemFont, size, NULL);
|
fontSpec = makeFontOfSize(WINGsConfiguration.boldSystemFont, size, DEFAULT_FONT);
|
||||||
|
|
||||||
|
if (!fontSpec) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
font = WMCreateFont(scrPtr, fontSpec);
|
font = WMCreateFont(scrPtr, fontSpec);
|
||||||
|
|
||||||
@@ -252,18 +299,34 @@ WMFont *WMBoldSystemFontOfSize(WMScreen * scrPtr, int size)
|
|||||||
|
|
||||||
int WMWidthOfString(WMFont * font, const char *text, int length)
|
int WMWidthOfString(WMFont * font, const char *text, int length)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
const char *previous_text;
|
||||||
|
int width;
|
||||||
|
#else
|
||||||
XGlyphInfo extents;
|
XGlyphInfo extents;
|
||||||
|
#endif
|
||||||
|
|
||||||
wassertrv(font != NULL && text != NULL, 0);
|
wassertrv(font != NULL && text != NULL, 0);
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
previous_text = pango_layout_get_text(font->layout);
|
||||||
|
if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
|
||||||
|
pango_layout_set_text(font->layout, text, length);
|
||||||
|
pango_layout_get_pixel_size(font->layout, &width, NULL);
|
||||||
|
|
||||||
|
return width;
|
||||||
|
#else
|
||||||
XftTextExtentsUtf8(font->screen->display, font->font, (XftChar8 *) text, length, &extents);
|
XftTextExtentsUtf8(font->screen->display, font->font, (XftChar8 *) text, length, &extents);
|
||||||
|
|
||||||
return extents.xOff; /* don't ask :P */
|
return extents.xOff; /* don't ask :P */
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void WMDrawString(WMScreen * scr, Drawable d, WMColor * color, WMFont * font, int x, int y, const char *text, int length)
|
void WMDrawString(WMScreen * scr, Drawable d, WMColor * color, WMFont * font, int x, int y, const char *text, int length)
|
||||||
{
|
{
|
||||||
XftColor xftcolor;
|
XftColor xftcolor;
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
const char *previous_text;
|
||||||
|
#endif
|
||||||
|
|
||||||
wassertr(font != NULL);
|
wassertr(font != NULL);
|
||||||
|
|
||||||
@@ -275,7 +338,14 @@ void WMDrawString(WMScreen * scr, Drawable d, WMColor * color, WMFont * font, in
|
|||||||
|
|
||||||
XftDrawChange(scr->xftdraw, d);
|
XftDrawChange(scr->xftdraw, d);
|
||||||
|
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
previous_text = pango_layout_get_text(font->layout);
|
||||||
|
if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
|
||||||
|
pango_layout_set_text(font->layout, text, length);
|
||||||
|
pango_xft_render_layout(scr->xftdraw, &xftcolor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
|
||||||
|
#else
|
||||||
XftDrawStringUtf8(scr->xftdraw, &xftcolor, font->font, x, y + font->y, (XftChar8 *) text, length);
|
XftDrawStringUtf8(scr->xftdraw, &xftcolor, font->font, x, y + font->y, (XftChar8 *) text, length);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@@ -284,6 +354,9 @@ WMDrawImageString(WMScreen * scr, Drawable d, WMColor * color, WMColor * backgro
|
|||||||
{
|
{
|
||||||
XftColor textColor;
|
XftColor textColor;
|
||||||
XftColor bgColor;
|
XftColor bgColor;
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
const char *previous_text;
|
||||||
|
#endif
|
||||||
|
|
||||||
wassertr(font != NULL);
|
wassertr(font != NULL);
|
||||||
|
|
||||||
@@ -303,7 +376,14 @@ WMDrawImageString(WMScreen * scr, Drawable d, WMColor * color, WMColor * backgro
|
|||||||
|
|
||||||
XftDrawRect(scr->xftdraw, &bgColor, x, y, WMWidthOfString(font, text, length), font->height);
|
XftDrawRect(scr->xftdraw, &bgColor, x, y, WMWidthOfString(font, text, length), font->height);
|
||||||
|
|
||||||
|
#ifdef USE_PANGO
|
||||||
|
previous_text = pango_layout_get_text(font->layout);
|
||||||
|
if ((previous_text == NULL) || (strncmp(text, previous_text, length) != 0) || previous_text[length] != '\0')
|
||||||
|
pango_layout_set_text(font->layout, text, length);
|
||||||
|
pango_xft_render_layout(scr->xftdraw, &textColor, font->layout, x * PANGO_SCALE, y * PANGO_SCALE);
|
||||||
|
#else
|
||||||
XftDrawStringUtf8(scr->xftdraw, &textColor, font->font, x, y + font->y, (XftChar8 *) text, length);
|
XftDrawStringUtf8(scr->xftdraw, &textColor, font->font, x, y + font->y, (XftChar8 *) text, length);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
WMFont *WMCopyFontWithStyle(WMScreen * scrPtr, WMFont * font, WMFontStyle style)
|
WMFont *WMCopyFontWithStyle(WMScreen * scrPtr, WMFont * font, WMFontStyle style)
|
||||||
|
|||||||
+9
-6
@@ -43,8 +43,6 @@ typedef struct W_FontPanel {
|
|||||||
#define MIN_UPPER_HEIGHT 20
|
#define MIN_UPPER_HEIGHT 20
|
||||||
#define MIN_LOWER_HEIGHT 140
|
#define MIN_LOWER_HEIGHT 140
|
||||||
|
|
||||||
#define MAX_FONTS_TO_RETRIEVE 2000
|
|
||||||
|
|
||||||
#define BUTTON_SPACE_HEIGHT 40
|
#define BUTTON_SPACE_HEIGHT 40
|
||||||
|
|
||||||
#define MIN_WIDTH 250
|
#define MIN_WIDTH 250
|
||||||
@@ -701,8 +699,10 @@ static void typefaceClick(WMWidget * w, void *data)
|
|||||||
WMClearList(panel->sizLs);
|
WMClearList(panel->sizLs);
|
||||||
|
|
||||||
WM_ITERATE_ARRAY(face->sizes, size, i) {
|
WM_ITERATE_ARRAY(face->sizes, size, i) {
|
||||||
if ((uintptr_t)size != 0) {
|
if (size != NULL) {
|
||||||
sprintf(buffer, "%li", (uintptr_t)size);
|
int size_int = (intptr_t) size;
|
||||||
|
|
||||||
|
sprintf(buffer, "%i", size_int);
|
||||||
|
|
||||||
WMAddListItem(panel->sizLs, buffer);
|
WMAddListItem(panel->sizLs, buffer);
|
||||||
}
|
}
|
||||||
@@ -800,8 +800,11 @@ static void setFontPanelFontName(FontPanel * panel, const char *family, const ch
|
|||||||
|
|
||||||
WM_ITERATE_ARRAY(face->sizes, vsize, i) {
|
WM_ITERATE_ARRAY(face->sizes, vsize, i) {
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
if ((uintptr_t)vsize != 0) {
|
|
||||||
sprintf(buffer, "%li", (uintptr_t)vsize);
|
if (vsize != NULL) {
|
||||||
|
int size_int = (intptr_t) vsize;
|
||||||
|
|
||||||
|
sprintf(buffer, "%i", size_int);
|
||||||
|
|
||||||
WMAddListItem(panel->sizLs, buffer);
|
WMAddListItem(panel->sizLs, buffer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -253,6 +253,9 @@ WMFrame *WMCreateFrame(WMWidget * parent)
|
|||||||
|
|
||||||
static void destroyFrame(Frame * fPtr)
|
static void destroyFrame(Frame * fPtr)
|
||||||
{
|
{
|
||||||
|
if (fPtr->textColor)
|
||||||
|
WMReleaseColor(fPtr->textColor);
|
||||||
|
|
||||||
if (fPtr->caption)
|
if (fPtr->caption)
|
||||||
wfree(fPtr->caption);
|
wfree(fPtr->caption);
|
||||||
|
|
||||||
|
|||||||
+87
-15
@@ -97,6 +97,66 @@ static char *RADIO_BUTTON_OFF[] = {
|
|||||||
"..... .....",
|
"..... .....",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#define TRISTATE_BUTTON_ON_WIDTH 15
|
||||||
|
#define TRISTATE_BUTTON_ON_HEIGHT 15
|
||||||
|
static char *TRISTATE_BUTTON_ON[] = {
|
||||||
|
"%%%%%%%%%%%%%%.",
|
||||||
|
"%%%%%%%%%%%%%. ",
|
||||||
|
"%% . ",
|
||||||
|
"%% ## ## . ",
|
||||||
|
"%% ### ### . ",
|
||||||
|
"%% ### ### . ",
|
||||||
|
"%% ##### . ",
|
||||||
|
"%% ### . ",
|
||||||
|
"%% ##### . ",
|
||||||
|
"%% ### ### . ",
|
||||||
|
"%% ### ### . ",
|
||||||
|
"%% ## ## . ",
|
||||||
|
"%% . ",
|
||||||
|
"%............. ",
|
||||||
|
". ",
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TRISTATE_BUTTON_OFF_WIDTH 15
|
||||||
|
#define TRISTATE_BUTTON_OFF_HEIGHT 15
|
||||||
|
static char *TRISTATE_BUTTON_OFF[] = {
|
||||||
|
"%%%%%%%%%%%%%%.",
|
||||||
|
"%%%%%%%%%%%%%. ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%% . ",
|
||||||
|
"%............. ",
|
||||||
|
". ",
|
||||||
|
};
|
||||||
|
|
||||||
|
#define TRISTATE_BUTTON_TRI_WIDTH 15
|
||||||
|
#define TRISTATE_BUTTON_TRI_HEIGHT 15
|
||||||
|
static char *TRISTATE_BUTTON_TRI[] = {
|
||||||
|
"%%%%%%%%%%%%%%.",
|
||||||
|
"%%%%%%%%%%%%%. ",
|
||||||
|
"%% . ",
|
||||||
|
"%% # # # # # . ",
|
||||||
|
"%% # # # # . ",
|
||||||
|
"%% # # # # # . ",
|
||||||
|
"%% # # # # . ",
|
||||||
|
"%% # # # # # . ",
|
||||||
|
"%% # # # # . ",
|
||||||
|
"%% # # # # # . ",
|
||||||
|
"%% # # # # . ",
|
||||||
|
"%% # # # # # . ",
|
||||||
|
"%% . ",
|
||||||
|
"%............. ",
|
||||||
|
". ",
|
||||||
|
};
|
||||||
|
|
||||||
static char *BUTTON_ARROW[] = {
|
static char *BUTTON_ARROW[] = {
|
||||||
"..................",
|
"..................",
|
||||||
"....##....#### ...",
|
"....##....#### ...",
|
||||||
@@ -325,6 +385,7 @@ static void renderPixmap(W_Screen * screen, Pixmap d, Pixmap mask, char **data,
|
|||||||
if (mask)
|
if (mask)
|
||||||
XDrawPoint(screen->display, mask, screen->monoGC, x, y);
|
XDrawPoint(screen->display, mask, screen->monoGC, x, y);
|
||||||
|
|
||||||
|
/* FALLTHRU */
|
||||||
case '.':
|
case '.':
|
||||||
case 'l':
|
case 'l':
|
||||||
XDrawPoint(screen->display, d, lightGC, x, y);
|
XDrawPoint(screen->display, d, lightGC, x, y);
|
||||||
@@ -363,10 +424,7 @@ static WMPixmap *makePixmap(W_Screen * sPtr, char **data, int width, int height,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#define T_WINGS_IMAGES_FILE RESOURCE_PATH"/Images.tiff"
|
#define T_WINGS_IMAGES_FILE RESOURCE_PATH"/Images.tiff"
|
||||||
#define T_DEFAULT_OBJECT_ICON_FILE RESOURCE_PATH"/defaultIcon.tiff"
|
|
||||||
|
|
||||||
#define X_WINGS_IMAGES_FILE RESOURCE_PATH"/Images.xpm"
|
#define X_WINGS_IMAGES_FILE RESOURCE_PATH"/Images.xpm"
|
||||||
#define X_DEFAULT_OBJECT_ICON_FILE RESOURCE_PATH"/defaultIcon.xpm"
|
|
||||||
|
|
||||||
static Bool loadPixmaps(WMScreen * scr)
|
static Bool loadPixmaps(WMScreen * scr)
|
||||||
{
|
{
|
||||||
@@ -474,16 +532,6 @@ static Bool loadPixmaps(WMScreen * scr)
|
|||||||
|
|
||||||
RReleaseImage(image);
|
RReleaseImage(image);
|
||||||
|
|
||||||
#if 0
|
|
||||||
scr->defaultObjectIcon = WMCreatePixmapFromFile(scr, T_DEFAULT_OBJECT_ICON_FILE);
|
|
||||||
if (!scr->defaultObjectIcon) {
|
|
||||||
scr->defaultObjectIcon = WMCreatePixmapFromFile(scr, X_DEFAULT_OBJECT_ICON_FILE);
|
|
||||||
}
|
|
||||||
if (!scr->defaultObjectIcon) {
|
|
||||||
wwarning("WINGs: could not load default icon file");
|
|
||||||
return False;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return True;
|
return True;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -492,7 +540,7 @@ WMScreen *WMOpenScreen(const char *display)
|
|||||||
Display *dpy = XOpenDisplay(display);
|
Display *dpy = XOpenDisplay(display);
|
||||||
|
|
||||||
if (!dpy) {
|
if (!dpy) {
|
||||||
wwarning("WINGs: could not open display %s", XDisplayName(display));
|
wwarning(_("WINGs: could not open display %s"), XDisplayName(display));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -742,6 +790,15 @@ WMScreen *WMCreateScreenWithRContext(Display * display, int screen, RContext * c
|
|||||||
scrPtr->radioButtonImageOff = makePixmap(scrPtr, RADIO_BUTTON_OFF,
|
scrPtr->radioButtonImageOff = makePixmap(scrPtr, RADIO_BUTTON_OFF,
|
||||||
RADIO_BUTTON_OFF_WIDTH, RADIO_BUTTON_OFF_HEIGHT, False);
|
RADIO_BUTTON_OFF_WIDTH, RADIO_BUTTON_OFF_HEIGHT, False);
|
||||||
|
|
||||||
|
scrPtr->tristateButtonImageOn = makePixmap(scrPtr, TRISTATE_BUTTON_ON,
|
||||||
|
TRISTATE_BUTTON_ON_WIDTH, TRISTATE_BUTTON_ON_HEIGHT, False);
|
||||||
|
|
||||||
|
scrPtr->tristateButtonImageOff = makePixmap(scrPtr, TRISTATE_BUTTON_OFF,
|
||||||
|
TRISTATE_BUTTON_OFF_WIDTH, TRISTATE_BUTTON_OFF_HEIGHT, False);
|
||||||
|
|
||||||
|
scrPtr->tristateButtonImageTri = makePixmap(scrPtr, TRISTATE_BUTTON_TRI,
|
||||||
|
TRISTATE_BUTTON_TRI_WIDTH, TRISTATE_BUTTON_TRI_HEIGHT, False);
|
||||||
|
|
||||||
scrPtr->buttonArrow = makePixmap(scrPtr, BUTTON_ARROW, BUTTON_ARROW_WIDTH, BUTTON_ARROW_HEIGHT, False);
|
scrPtr->buttonArrow = makePixmap(scrPtr, BUTTON_ARROW, BUTTON_ARROW_WIDTH, BUTTON_ARROW_HEIGHT, False);
|
||||||
|
|
||||||
scrPtr->pushedButtonArrow = makePixmap(scrPtr, BUTTON_ARROW2,
|
scrPtr->pushedButtonArrow = makePixmap(scrPtr, BUTTON_ARROW2,
|
||||||
@@ -888,7 +945,7 @@ void WMSetFocusToWidget(WMWidget * widget)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* WMRealizeWidget-
|
* WMRealizeWidget-
|
||||||
* Realizes the widget and all it's children.
|
* Realizes the widget and all its children.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void WMRealizeWidget(WMWidget * w)
|
void WMRealizeWidget(WMWidget * w)
|
||||||
@@ -960,6 +1017,21 @@ WMColor *WMGetWidgetBackgroundColor(WMWidget * w)
|
|||||||
return W_VIEW(w)->backColor;
|
return W_VIEW(w)->backColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void WMSetWidgetBackgroundPixmap(WMWidget *w, WMPixmap *pix)
|
||||||
|
{
|
||||||
|
if (!pix)
|
||||||
|
return;
|
||||||
|
|
||||||
|
W_SetViewBackgroundPixmap(W_VIEW(w), pix);
|
||||||
|
if (W_VIEW(w)->flags.mapped)
|
||||||
|
WMRedisplayWidget(w);
|
||||||
|
}
|
||||||
|
|
||||||
|
WMPixmap *WMGetWidgetBackgroundPixmap(WMWidget *w)
|
||||||
|
{
|
||||||
|
return W_VIEW(w)->backImage;
|
||||||
|
}
|
||||||
|
|
||||||
void WMRaiseWidget(WMWidget * w)
|
void WMRaiseWidget(WMWidget * w)
|
||||||
{
|
{
|
||||||
W_RaiseView(W_VIEW(w));
|
W_RaiseView(W_VIEW(w));
|
||||||
|
|||||||
+32
-1
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
#include <X11/Xlib.h>
|
#include <X11/Xlib.h>
|
||||||
|
|
||||||
|
#include "wconfig.h"
|
||||||
|
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
|
||||||
typedef struct W_IMContext {
|
typedef struct W_IMContext {
|
||||||
@@ -60,7 +62,7 @@ void W_InitIM(W_Screen * scr)
|
|||||||
cb.callback = destroyIM_cb;
|
cb.callback = destroyIM_cb;
|
||||||
cb.client_data = (XPointer) scr;
|
cb.client_data = (XPointer) scr;
|
||||||
if (XSetIMValues(scr->imctx->xim, XNDestroyCallback, &cb, NULL))
|
if (XSetIMValues(scr->imctx->xim, XNDestroyCallback, &cb, NULL))
|
||||||
wwarning("could not add destroy callback for input method");
|
wwarning(_("could not add destroy callback for XIM input method"));
|
||||||
XUnregisterIMInstantiateCallback(scr->display, NULL, NULL, NULL, instantiateIM_cb, (XPointer) scr);
|
XUnregisterIMInstantiateCallback(scr->display, NULL, NULL, NULL, instantiateIM_cb, (XPointer) scr);
|
||||||
/* Get available input style */
|
/* Get available input style */
|
||||||
XGetIMValues(scr->imctx->xim, XNQueryInputStyle, &im_styles, NULL);
|
XGetIMValues(scr->imctx->xim, XNQueryInputStyle, &im_styles, NULL);
|
||||||
@@ -211,3 +213,32 @@ int W_LookupString(W_View *view, XKeyPressedEvent *event, char *buffer, int bufl
|
|||||||
#endif
|
#endif
|
||||||
return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status);
|
return XLookupString(event, buffer, buflen, keysym, (XComposeStatus *) status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Map a keycode to the corresponding keysym
|
||||||
|
* To replace the deprecated X11 function XKeycodeToKeysym
|
||||||
|
*/
|
||||||
|
KeySym W_KeycodeToKeysym(Display *display, KeyCode keycode, int index)
|
||||||
|
{
|
||||||
|
static int min_kc = -1;
|
||||||
|
static int max_kc;
|
||||||
|
int num_syms;
|
||||||
|
KeySym *key_syms;
|
||||||
|
KeySym ks;
|
||||||
|
|
||||||
|
XDisplayKeycodes(display, &min_kc, &max_kc);
|
||||||
|
if (keycode < min_kc || keycode > max_kc || index < 0) {
|
||||||
|
return NoSymbol;
|
||||||
|
}
|
||||||
|
|
||||||
|
key_syms = XGetKeyboardMapping(display, keycode, 1, &num_syms);
|
||||||
|
if (index >= num_syms) {
|
||||||
|
XFree(key_syms);
|
||||||
|
return NoSymbol;
|
||||||
|
}
|
||||||
|
|
||||||
|
ks = key_syms[index];
|
||||||
|
XFree(key_syms);
|
||||||
|
|
||||||
|
return ks;
|
||||||
|
}
|
||||||
|
|||||||
+500
-11
@@ -1,8 +1,10 @@
|
|||||||
|
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <strings.h>
|
||||||
|
|
||||||
char *WMListDidScrollNotification = "WMListDidScrollNotification";
|
const char *WMListDidScrollNotification = "WMListDidScrollNotification";
|
||||||
char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
|
const char *WMListSelectionDidChangeNotification = "WMListSelectionDidChangeNotification";
|
||||||
|
|
||||||
typedef struct W_List {
|
typedef struct W_List {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
@@ -27,11 +29,15 @@ typedef struct W_List {
|
|||||||
WMHandlerID *idleID; /* for updating the scroller after adding elements */
|
WMHandlerID *idleID; /* for updating the scroller after adding elements */
|
||||||
|
|
||||||
WMHandlerID *selectID; /* for selecting items in list while scrolling */
|
WMHandlerID *selectID; /* for selecting items in list while scrolling */
|
||||||
|
WMHandlerID *typeaheadID; /* for clearing typeahead buffer */
|
||||||
|
|
||||||
WMScroller *vScroller;
|
WMScroller *vScroller;
|
||||||
|
|
||||||
Pixmap doubleBuffer;
|
Pixmap doubleBuffer;
|
||||||
|
|
||||||
|
char *typeahead;
|
||||||
|
int typeaheadLen;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
unsigned int allowMultipleSelection:1;
|
unsigned int allowMultipleSelection:1;
|
||||||
unsigned int allowEmptySelection:1;
|
unsigned int allowEmptySelection:1;
|
||||||
@@ -48,6 +54,7 @@ typedef struct W_List {
|
|||||||
#define DEFAULT_HEIGHT 150
|
#define DEFAULT_HEIGHT 150
|
||||||
|
|
||||||
#define SCROLL_DELAY 100
|
#define SCROLL_DELAY 100
|
||||||
|
#define TYPEAHEAD_CLEAR_DELAY 700
|
||||||
|
|
||||||
static void destroyList(List * lPtr);
|
static void destroyList(List * lPtr);
|
||||||
static void paintList(List * lPtr);
|
static void paintList(List * lPtr);
|
||||||
@@ -62,6 +69,8 @@ static void scrollBackwardSelecting(void *data);
|
|||||||
static void vScrollCallBack(WMWidget * scroller, void *self);
|
static void vScrollCallBack(WMWidget * scroller, void *self);
|
||||||
|
|
||||||
static void toggleItemSelection(WMList * lPtr, int index);
|
static void toggleItemSelection(WMList * lPtr, int index);
|
||||||
|
static void jumpToFirstItemWithPrefix(WMList * lPtr, const char *prefix, int prefixLen);
|
||||||
|
static void typeaheadTimeout(void *data);
|
||||||
|
|
||||||
static void updateGeometry(WMList * lPtr);
|
static void updateGeometry(WMList * lPtr);
|
||||||
static void didResizeList(W_ViewDelegate * self, WMView * view);
|
static void didResizeList(W_ViewDelegate * self, WMView * view);
|
||||||
@@ -113,6 +122,9 @@ WMList *WMCreateList(WMWidget * parent)
|
|||||||
W_Screen *scrPtr = W_VIEW(parent)->screen;
|
W_Screen *scrPtr = W_VIEW(parent)->screen;
|
||||||
|
|
||||||
lPtr = wmalloc(sizeof(List));
|
lPtr = wmalloc(sizeof(List));
|
||||||
|
lPtr->typeahead = NULL;
|
||||||
|
lPtr->typeaheadLen = 0;
|
||||||
|
lPtr->typeaheadID = NULL;
|
||||||
|
|
||||||
lPtr->widgetClass = WC_List;
|
lPtr->widgetClass = WC_List;
|
||||||
|
|
||||||
@@ -129,7 +141,8 @@ WMList *WMCreateList(WMWidget * parent)
|
|||||||
| ClientMessageMask, handleEvents, lPtr);
|
| ClientMessageMask, handleEvents, lPtr);
|
||||||
|
|
||||||
WMCreateEventHandler(lPtr->view, ButtonPressMask | ButtonReleaseMask
|
WMCreateEventHandler(lPtr->view, ButtonPressMask | ButtonReleaseMask
|
||||||
| EnterWindowMask | LeaveWindowMask | ButtonMotionMask, handleActionEvents, lPtr);
|
| EnterWindowMask | LeaveWindowMask | ButtonMotionMask
|
||||||
|
| KeyPressMask, handleActionEvents, lPtr);
|
||||||
|
|
||||||
lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1;
|
lPtr->itemHeight = WMFontHeight(scrPtr->normalFont) + 1;
|
||||||
|
|
||||||
@@ -288,6 +301,14 @@ void WMClearList(WMList * lPtr)
|
|||||||
WMDeleteTimerHandler(lPtr->selectID);
|
WMDeleteTimerHandler(lPtr->selectID);
|
||||||
lPtr->selectID = NULL;
|
lPtr->selectID = NULL;
|
||||||
}
|
}
|
||||||
|
if (lPtr->typeaheadID) {
|
||||||
|
WMDeleteTimerHandler(lPtr->typeaheadID);
|
||||||
|
lPtr->typeaheadID = NULL;
|
||||||
|
}
|
||||||
|
if (lPtr->typeahead) {
|
||||||
|
lPtr->typeahead[0] = '\0';
|
||||||
|
lPtr->typeaheadLen = 0;
|
||||||
|
}
|
||||||
if (lPtr->view->flags.realized) {
|
if (lPtr->view->flags.realized) {
|
||||||
updateScroller(lPtr);
|
updateScroller(lPtr);
|
||||||
}
|
}
|
||||||
@@ -495,15 +516,16 @@ static void paintItem(List * lPtr, int index)
|
|||||||
static void paintList(List * lPtr)
|
static void paintList(List * lPtr)
|
||||||
{
|
{
|
||||||
W_Screen *scrPtr = lPtr->view->screen;
|
W_Screen *scrPtr = lPtr->view->screen;
|
||||||
int i, lim;
|
int i, lim, itemCount;
|
||||||
|
|
||||||
if (!lPtr->view->flags.mapped)
|
if (!lPtr->view->flags.mapped)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (WMGetArrayItemCount(lPtr->items) > 0) {
|
itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
if (lPtr->topItem + lPtr->fullFitLines + lPtr->flags.dontFitAll > WMGetArrayItemCount(lPtr->items)) {
|
if (itemCount > 0) {
|
||||||
|
if (lPtr->topItem + lPtr->fullFitLines + lPtr->flags.dontFitAll > itemCount) {
|
||||||
|
|
||||||
lim = WMGetArrayItemCount(lPtr->items) - lPtr->topItem;
|
lim = itemCount - lPtr->topItem;
|
||||||
XClearArea(scrPtr->display, lPtr->view->window, 19,
|
XClearArea(scrPtr->display, lPtr->view->window, 19,
|
||||||
2 + lim * lPtr->itemHeight, lPtr->view->size.width - 21,
|
2 + lim * lPtr->itemHeight, lPtr->view->size.width - 21,
|
||||||
lPtr->view->size.height - lim * lPtr->itemHeight - 3, False);
|
lPtr->view->size.height - lim * lPtr->itemHeight - 3, False);
|
||||||
@@ -820,7 +842,7 @@ void WMSetListSelectionToRange(WMList * lPtr, WMRange range)
|
|||||||
|
|
||||||
void WMSelectAllListItems(WMList * lPtr)
|
void WMSelectAllListItems(WMList * lPtr)
|
||||||
{
|
{
|
||||||
int i;
|
int i, itemCount;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
|
|
||||||
if (!lPtr->flags.allowMultipleSelection)
|
if (!lPtr->flags.allowMultipleSelection)
|
||||||
@@ -833,7 +855,8 @@ void WMSelectAllListItems(WMList * lPtr)
|
|||||||
WMFreeArray(lPtr->selectedItems);
|
WMFreeArray(lPtr->selectedItems);
|
||||||
lPtr->selectedItems = WMCreateArrayWithArray(lPtr->items);
|
lPtr->selectedItems = WMCreateArrayWithArray(lPtr->items);
|
||||||
|
|
||||||
for (i = 0; i < WMGetArrayItemCount(lPtr->items); i++) {
|
itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
|
for (i = 0; i < itemCount; i++) {
|
||||||
item = WMGetFromArray(lPtr->items, i);
|
item = WMGetFromArray(lPtr->items, i);
|
||||||
if (!item->selected) {
|
if (!item->selected) {
|
||||||
item->selected = 1;
|
item->selected = 1;
|
||||||
@@ -859,10 +882,11 @@ void WMSelectAllListItems(WMList * lPtr)
|
|||||||
*/
|
*/
|
||||||
static void unselectAllListItems(WMList * lPtr, WMListItem * exceptThis)
|
static void unselectAllListItems(WMList * lPtr, WMListItem * exceptThis)
|
||||||
{
|
{
|
||||||
int i;
|
int i, itemCount;
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
|
|
||||||
for (i = 0; i < WMGetArrayItemCount(lPtr->items); i++) {
|
itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
|
for (i = 0; i < itemCount; i++) {
|
||||||
item = WMGetFromArray(lPtr->items, i);
|
item = WMGetFromArray(lPtr->items, i);
|
||||||
if (item != exceptThis && item->selected) {
|
if (item != exceptThis && item->selected) {
|
||||||
item->selected = 0;
|
item->selected = 0;
|
||||||
@@ -920,6 +944,85 @@ static void toggleItemSelection(WMList * lPtr, int index)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int findItemWithPrefix(List * lPtr, const char *prefix, int prefixLen)
|
||||||
|
{
|
||||||
|
if (prefixLen <= 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
int i, itemCount;
|
||||||
|
|
||||||
|
itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
|
for (i = 0; i < itemCount; i++) {
|
||||||
|
WMListItem *item = WMGetFromArray(lPtr->items, i);
|
||||||
|
|
||||||
|
if (!item || !item->text || item->text[0] == '\0')
|
||||||
|
continue;
|
||||||
|
if (strncasecmp(item->text, prefix, prefixLen) == 0)
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void jumpToFirstItemWithPrefix(WMList * lPtr, const char *prefix, int prefixLen)
|
||||||
|
{
|
||||||
|
int index, oldTop, visibleCount;
|
||||||
|
|
||||||
|
index = findItemWithPrefix(lPtr, prefix, prefixLen);
|
||||||
|
if (index < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (lPtr->flags.allowMultipleSelection) {
|
||||||
|
WMRange range;
|
||||||
|
|
||||||
|
range.position = index;
|
||||||
|
range.count = 1;
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
} else {
|
||||||
|
WMSelectListItem(lPtr, index);
|
||||||
|
/* Trigger action callback */
|
||||||
|
if (lPtr->action)
|
||||||
|
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||||
|
}
|
||||||
|
|
||||||
|
visibleCount = lPtr->fullFitLines + lPtr->flags.dontFitAll;
|
||||||
|
if (visibleCount < 1)
|
||||||
|
visibleCount = 1;
|
||||||
|
|
||||||
|
oldTop = lPtr->topItem;
|
||||||
|
if (index < lPtr->topItem) {
|
||||||
|
lPtr->topItem = index;
|
||||||
|
} else {
|
||||||
|
if (lPtr->flags.dontFitAll) {
|
||||||
|
if (lPtr->fullFitLines <= 0) {
|
||||||
|
lPtr->topItem = index;
|
||||||
|
} else {
|
||||||
|
int lastFullyVisible = lPtr->topItem + lPtr->fullFitLines - 1;
|
||||||
|
if (index > lastFullyVisible)
|
||||||
|
lPtr->topItem = index - lPtr->fullFitLines + 1;
|
||||||
|
}
|
||||||
|
} else if (index >= lPtr->topItem + visibleCount) {
|
||||||
|
lPtr->topItem = index - visibleCount + 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (lPtr->topItem < 0)
|
||||||
|
lPtr->topItem = 0;
|
||||||
|
|
||||||
|
if (lPtr->view->flags.realized && lPtr->topItem != oldTop)
|
||||||
|
updateScroller(lPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void typeaheadTimeout(void *data)
|
||||||
|
{
|
||||||
|
List *lPtr = (List *) data;
|
||||||
|
|
||||||
|
lPtr->typeaheadID = NULL;
|
||||||
|
if (lPtr->typeahead) {
|
||||||
|
lPtr->typeahead[0] = '\0';
|
||||||
|
lPtr->typeaheadLen = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void handleActionEvents(XEvent * event, void *data)
|
static void handleActionEvents(XEvent * event, void *data)
|
||||||
{
|
{
|
||||||
List *lPtr = (List *) data;
|
List *lPtr = (List *) data;
|
||||||
@@ -959,6 +1062,7 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
WMDeleteTimerHandler(lPtr->selectID);
|
WMDeleteTimerHandler(lPtr->selectID);
|
||||||
lPtr->selectID = NULL;
|
lPtr->selectID = NULL;
|
||||||
}
|
}
|
||||||
|
WMSetFocusToWidget(lPtr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LeaveNotify:
|
case LeaveNotify:
|
||||||
@@ -970,6 +1074,9 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY, scrollBackwardSelecting, lPtr);
|
lPtr->selectID = WMAddTimerHandler(SCROLL_DELAY, scrollBackwardSelecting, lPtr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
WMWidget *parentWidget = WMWidgetOfView(lPtr->view->parent);
|
||||||
|
if (parentWidget)
|
||||||
|
WMSetFocusToWidget(parentWidget);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
@@ -1076,6 +1183,381 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
prevItem = tmp;
|
prevItem = tmp;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case KeyPress:
|
||||||
|
char buffer[16];
|
||||||
|
KeySym ksym;
|
||||||
|
Status status;
|
||||||
|
int len;
|
||||||
|
WMScreen *scr = lPtr->view->screen;
|
||||||
|
XWindowAttributes wattr;
|
||||||
|
|
||||||
|
if (event->xkey.state & (ControlMask | Mod1Mask))
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (!(XGetWindowAttributes(scr->display, lPtr->view->window, &wattr) && wattr.map_state == IsViewable))
|
||||||
|
break;
|
||||||
|
|
||||||
|
len = W_LookupString(lPtr->view, &event->xkey, buffer, (int)sizeof(buffer) - 1, &ksym, &status);
|
||||||
|
if (len < 0)
|
||||||
|
break;
|
||||||
|
if (len > 0)
|
||||||
|
buffer[len] = '\0';
|
||||||
|
|
||||||
|
/* Handle navigation keys */
|
||||||
|
switch (ksym) {
|
||||||
|
case XK_Up: {
|
||||||
|
int newRow;
|
||||||
|
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
|
int cur = WMGetListSelectedItemRow(lPtr);
|
||||||
|
|
||||||
|
if (lPtr->flags.allowMultipleSelection && WMGetArrayItemCount(lPtr->selectedItems) > 0) {
|
||||||
|
WMListItem *lastSel = WMGetFromArray(lPtr->selectedItems, WMGetArrayItemCount(lPtr->selectedItems) - 1);
|
||||||
|
if (lastSel)
|
||||||
|
cur = WMGetFirstInArray(lPtr->items, lastSel);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cur == WLNotFound)
|
||||||
|
cur = lPtr->topItem;
|
||||||
|
newRow = cur - 1;
|
||||||
|
if (newRow < 0)
|
||||||
|
newRow = 0;
|
||||||
|
|
||||||
|
if (newRow != cur && itemCount > 0) {
|
||||||
|
if (lPtr->flags.allowMultipleSelection) {
|
||||||
|
if (event->xkey.state & ShiftMask) {
|
||||||
|
WMRange range;
|
||||||
|
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||||
|
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||||
|
anchor = cur;
|
||||||
|
}
|
||||||
|
|
||||||
|
range.position = anchor;
|
||||||
|
if (newRow >= anchor)
|
||||||
|
range.count = newRow - anchor + 1;
|
||||||
|
else
|
||||||
|
range.count = newRow - anchor - 1;
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
} else {
|
||||||
|
WMRange range = { .position = newRow, .count = 1 };
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WMSelectListItem(lPtr, newRow);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure visibility */
|
||||||
|
if (newRow < lPtr->topItem) {
|
||||||
|
lPtr->topItem = newRow;
|
||||||
|
if (lPtr->view->flags.realized)
|
||||||
|
updateScroller(lPtr);
|
||||||
|
}
|
||||||
|
/* Trigger action callback */
|
||||||
|
if (lPtr->action)
|
||||||
|
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XK_Down: {
|
||||||
|
int newRow;
|
||||||
|
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
|
int cur = WMGetListSelectedItemRow(lPtr);
|
||||||
|
|
||||||
|
if (lPtr->flags.allowMultipleSelection && WMGetArrayItemCount(lPtr->selectedItems) > 0) {
|
||||||
|
WMListItem *lastSel = WMGetFromArray(lPtr->selectedItems, WMGetArrayItemCount(lPtr->selectedItems) - 1);
|
||||||
|
if (lastSel)
|
||||||
|
cur = WMGetFirstInArray(lPtr->items, lastSel);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (cur == WLNotFound)
|
||||||
|
cur = lPtr->topItem;
|
||||||
|
newRow = cur + 1;
|
||||||
|
if (newRow >= itemCount)
|
||||||
|
newRow = itemCount - 1;
|
||||||
|
|
||||||
|
if (newRow != cur && itemCount > 0) {
|
||||||
|
if (lPtr->flags.allowMultipleSelection) {
|
||||||
|
if (event->xkey.state & ShiftMask) {
|
||||||
|
WMRange range;
|
||||||
|
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||||
|
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||||
|
anchor = cur;
|
||||||
|
}
|
||||||
|
|
||||||
|
range.position = anchor;
|
||||||
|
if (newRow >= anchor)
|
||||||
|
range.count = newRow - anchor + 1;
|
||||||
|
else
|
||||||
|
range.count = newRow - anchor - 1;
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
} else {
|
||||||
|
WMRange range = { .position = newRow, .count = 1 };
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WMSelectListItem(lPtr, newRow);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure visibility */
|
||||||
|
if (newRow > (lPtr->topItem + lPtr->fullFitLines - 1)) {
|
||||||
|
lPtr->topItem = newRow - lPtr->fullFitLines + 1;
|
||||||
|
if (lPtr->topItem < 0)
|
||||||
|
lPtr->topItem = 0;
|
||||||
|
/* Ensure we don't scroll past the end */
|
||||||
|
if (lPtr->topItem + lPtr->fullFitLines > itemCount)
|
||||||
|
lPtr->topItem = itemCount - lPtr->fullFitLines;
|
||||||
|
if (lPtr->topItem < 0)
|
||||||
|
lPtr->topItem = 0;
|
||||||
|
if (lPtr->view->flags.realized)
|
||||||
|
updateScroller(lPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Trigger action callback */
|
||||||
|
if (lPtr->action)
|
||||||
|
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XK_Page_Up: {
|
||||||
|
int newRow;
|
||||||
|
int page = lPtr->fullFitLines > 0 ? lPtr->fullFitLines : 1;
|
||||||
|
int cur = WMGetListSelectedItemRow(lPtr);
|
||||||
|
|
||||||
|
if (cur == WLNotFound)
|
||||||
|
cur = lPtr->topItem;
|
||||||
|
newRow = cur - page;
|
||||||
|
if (newRow < 0)
|
||||||
|
newRow = 0;
|
||||||
|
|
||||||
|
if (newRow != cur) {
|
||||||
|
if (lPtr->flags.allowMultipleSelection) {
|
||||||
|
if (event->xkey.state & ShiftMask) {
|
||||||
|
WMRange range;
|
||||||
|
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||||
|
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||||
|
anchor = cur;
|
||||||
|
}
|
||||||
|
|
||||||
|
range.position = anchor;
|
||||||
|
if (newRow >= anchor)
|
||||||
|
range.count = newRow - anchor + 1;
|
||||||
|
else
|
||||||
|
range.count = newRow - anchor - 1;
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
} else {
|
||||||
|
WMRange range = { .position = newRow, .count = 1 };
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WMSelectListItem(lPtr, newRow);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
if (newRow < lPtr->topItem) {
|
||||||
|
lPtr->topItem = newRow;
|
||||||
|
if (lPtr->view->flags.realized)
|
||||||
|
updateScroller(lPtr);
|
||||||
|
}
|
||||||
|
/* Trigger action callback */
|
||||||
|
if (lPtr->action)
|
||||||
|
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XK_Page_Down: {
|
||||||
|
int newRow;
|
||||||
|
int page = lPtr->fullFitLines > 0 ? lPtr->fullFitLines : 1;
|
||||||
|
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
|
int cur = WMGetListSelectedItemRow(lPtr);
|
||||||
|
|
||||||
|
if (cur == WLNotFound)
|
||||||
|
cur = lPtr->topItem;
|
||||||
|
newRow = cur + page;
|
||||||
|
if (newRow >= itemCount)
|
||||||
|
newRow = itemCount - 1;
|
||||||
|
|
||||||
|
if (newRow != cur && itemCount > 0) {
|
||||||
|
if (lPtr->flags.allowMultipleSelection) {
|
||||||
|
if (event->xkey.state & ShiftMask) {
|
||||||
|
WMRange range;
|
||||||
|
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||||
|
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||||
|
anchor = cur;
|
||||||
|
}
|
||||||
|
|
||||||
|
range.position = anchor;
|
||||||
|
if (newRow >= anchor)
|
||||||
|
range.count = newRow - anchor + 1;
|
||||||
|
else
|
||||||
|
range.count = newRow - anchor - 1;
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
} else {
|
||||||
|
WMRange range = { .position = newRow, .count = 1 };
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WMSelectListItem(lPtr, newRow);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure visibility */
|
||||||
|
if (newRow > (lPtr->topItem + lPtr->fullFitLines - 1)) {
|
||||||
|
lPtr->topItem = newRow - lPtr->fullFitLines + 1;
|
||||||
|
if (lPtr->topItem < 0)
|
||||||
|
lPtr->topItem = 0;
|
||||||
|
/* Ensure we don't scroll past the end */
|
||||||
|
if (lPtr->topItem + lPtr->fullFitLines > itemCount)
|
||||||
|
lPtr->topItem = itemCount - lPtr->fullFitLines;
|
||||||
|
if (lPtr->topItem < 0)
|
||||||
|
lPtr->topItem = 0;
|
||||||
|
if (lPtr->view->flags.realized)
|
||||||
|
updateScroller(lPtr);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Trigger action callback */
|
||||||
|
if (lPtr->action)
|
||||||
|
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XK_Home: {
|
||||||
|
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
|
if (itemCount > 0) {
|
||||||
|
int newRow = 0;
|
||||||
|
if (lPtr->flags.allowMultipleSelection) {
|
||||||
|
if (event->xkey.state & ShiftMask) {
|
||||||
|
WMRange range;
|
||||||
|
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||||
|
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||||
|
anchor = lPtr->topItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
range.position = anchor;
|
||||||
|
if (newRow >= anchor)
|
||||||
|
range.count = newRow - anchor + 1;
|
||||||
|
else
|
||||||
|
range.count = newRow - anchor - 1;
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
} else {
|
||||||
|
WMRange range = { .position = newRow, .count = 1 };
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WMSelectListItem(lPtr, newRow);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
if (newRow < lPtr->topItem) {
|
||||||
|
lPtr->topItem = newRow;
|
||||||
|
if (lPtr->view->flags.realized)
|
||||||
|
updateScroller(lPtr);
|
||||||
|
}
|
||||||
|
/* Trigger action callback */
|
||||||
|
if (lPtr->action)
|
||||||
|
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case XK_End: {
|
||||||
|
int itemCount = WMGetArrayItemCount(lPtr->items);
|
||||||
|
if (itemCount > 0) {
|
||||||
|
int newRow = itemCount - 1;
|
||||||
|
if (lPtr->flags.allowMultipleSelection) {
|
||||||
|
if (event->xkey.state & ShiftMask) {
|
||||||
|
WMRange range;
|
||||||
|
int anchor = WMGetListSelectedItemRow(lPtr);
|
||||||
|
if (anchor == WLNotFound || WMGetArrayItemCount(lPtr->selectedItems) == 0) {
|
||||||
|
anchor = lPtr->topItem;
|
||||||
|
}
|
||||||
|
|
||||||
|
range.position = anchor;
|
||||||
|
if (newRow >= anchor)
|
||||||
|
range.count = newRow - anchor + 1;
|
||||||
|
else
|
||||||
|
range.count = newRow - anchor - 1;
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
} else {
|
||||||
|
WMRange range = { .position = newRow, .count = 1 };
|
||||||
|
WMSetListSelectionToRange(lPtr, range);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WMSelectListItem(lPtr, newRow);
|
||||||
|
lastClicked = newRow;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Ensure the last item is fully visible */
|
||||||
|
lPtr->topItem = itemCount - lPtr->fullFitLines;
|
||||||
|
if (lPtr->topItem < 0)
|
||||||
|
lPtr->topItem = 0;
|
||||||
|
if (lPtr->view->flags.realized)
|
||||||
|
updateScroller(lPtr);
|
||||||
|
|
||||||
|
/* Trigger action callback */
|
||||||
|
if (lPtr->action)
|
||||||
|
(*lPtr->action) (lPtr, lPtr->clientData);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If we handled a navigation keysym, avoid falling through to typeahead logic */
|
||||||
|
if (ksym == XK_Up || ksym == XK_Down || ksym == XK_Page_Up || ksym == XK_Page_Down || ksym == XK_Home || ksym == XK_End)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (len <= 0)
|
||||||
|
break;
|
||||||
|
|
||||||
|
buffer[len] = '\0';
|
||||||
|
|
||||||
|
if (ksym == XK_Escape) {
|
||||||
|
if (lPtr->typeaheadID) {
|
||||||
|
WMDeleteTimerHandler(lPtr->typeaheadID);
|
||||||
|
lPtr->typeaheadID = NULL;
|
||||||
|
}
|
||||||
|
if (lPtr->typeahead) {
|
||||||
|
lPtr->typeahead[0] = '\0';
|
||||||
|
lPtr->typeaheadLen = 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ksym == XK_BackSpace) {
|
||||||
|
if (lPtr->typeaheadLen > 0 && lPtr->typeahead) {
|
||||||
|
lPtr->typeaheadLen--;
|
||||||
|
lPtr->typeahead[lPtr->typeaheadLen] = '\0';
|
||||||
|
}
|
||||||
|
} else if (len == 1 && isalnum((unsigned char)buffer[0])) {
|
||||||
|
if (!lPtr->typeahead) {
|
||||||
|
lPtr->typeahead = wmalloc(2);
|
||||||
|
lPtr->typeaheadLen = 0;
|
||||||
|
}
|
||||||
|
lPtr->typeahead = wrealloc(lPtr->typeahead, lPtr->typeaheadLen + 2);
|
||||||
|
lPtr->typeahead[lPtr->typeaheadLen] = buffer[0];
|
||||||
|
lPtr->typeaheadLen++;
|
||||||
|
lPtr->typeahead[lPtr->typeaheadLen] = '\0';
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (lPtr->typeaheadLen > 0)
|
||||||
|
jumpToFirstItemWithPrefix(lPtr, lPtr->typeahead, lPtr->typeaheadLen);
|
||||||
|
|
||||||
|
if (lPtr->typeaheadID) {
|
||||||
|
WMDeleteTimerHandler(lPtr->typeaheadID);
|
||||||
|
lPtr->typeaheadID = NULL;
|
||||||
|
}
|
||||||
|
if (lPtr->typeaheadLen > 0)
|
||||||
|
lPtr->typeaheadID = WMAddTimerHandler(TYPEAHEAD_CLEAR_DELAY, typeaheadTimeout, lPtr);
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (lPtr->topItem != topItem)
|
if (lPtr->topItem != topItem)
|
||||||
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
WMPostNotificationName(WMListDidScrollNotification, lPtr, NULL);
|
||||||
@@ -1123,6 +1605,10 @@ static void destroyList(List * lPtr)
|
|||||||
WMDeleteTimerHandler(lPtr->selectID);
|
WMDeleteTimerHandler(lPtr->selectID);
|
||||||
lPtr->selectID = NULL;
|
lPtr->selectID = NULL;
|
||||||
|
|
||||||
|
if (lPtr->typeaheadID)
|
||||||
|
WMDeleteTimerHandler(lPtr->typeaheadID);
|
||||||
|
lPtr->typeaheadID = NULL;
|
||||||
|
|
||||||
if (lPtr->selectedItems)
|
if (lPtr->selectedItems)
|
||||||
WMFreeArray(lPtr->selectedItems);
|
WMFreeArray(lPtr->selectedItems);
|
||||||
|
|
||||||
@@ -1132,6 +1618,9 @@ static void destroyList(List * lPtr)
|
|||||||
if (lPtr->doubleBuffer)
|
if (lPtr->doubleBuffer)
|
||||||
XFreePixmap(lPtr->view->screen->display, lPtr->doubleBuffer);
|
XFreePixmap(lPtr->view->screen->display, lPtr->doubleBuffer);
|
||||||
|
|
||||||
|
if (lPtr->typeahead)
|
||||||
|
wfree(lPtr->typeahead);
|
||||||
|
|
||||||
WMRemoveNotificationObserver(lPtr);
|
WMRemoveNotificationObserver(lPtr);
|
||||||
|
|
||||||
wfree(lPtr);
|
wfree(lPtr);
|
||||||
|
|||||||
+11
-3
@@ -220,12 +220,20 @@ W_PaintTextAndImage(W_View * view, int wrap, WMColor * textColor, W_Font * font,
|
|||||||
XFillRectangle(screen->display, d, WMColorGC(backColor),
|
XFillRectangle(screen->display, d, WMColorGC(backColor),
|
||||||
0, 0, view->size.width, view->size.height);
|
0, 0, view->size.width, view->size.height);
|
||||||
} else {
|
} else {
|
||||||
|
if (view->attribs.background_pixmap) {
|
||||||
#ifndef DOUBLE_BUFFER
|
#ifndef DOUBLE_BUFFER
|
||||||
XClearWindow(screen->display, d);
|
XClearWindow(screen->display, d);
|
||||||
#else
|
#else
|
||||||
XSetForeground(screen->display, screen->copyGC, view->attribs.background_pixel);
|
XCopyArea(screen->display, view->attribs.background_pixmap, d, screen->copyGC, 0, 0, view->size.width, view->size.height, 0, 0);
|
||||||
XFillRectangle(screen->display, d, screen->copyGC, 0, 0, view->size.width, view->size.height);
|
|
||||||
#endif
|
#endif
|
||||||
|
} else {
|
||||||
|
#ifndef DOUBLE_BUFFER
|
||||||
|
XClearWindow(screen->display, d);
|
||||||
|
#else
|
||||||
|
XSetForeground(screen->display, screen->copyGC, view->attribs.background_pixel);
|
||||||
|
XFillRectangle(screen->display, d, screen->copyGC, 0, 0, view->size.width, view->size.height);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (relief == WRFlat) {
|
if (relief == WRFlat) {
|
||||||
|
|||||||
+290
-10
@@ -25,7 +25,7 @@ static void handleKeyPress(XEvent * event, void *clientData)
|
|||||||
|
|
||||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||||
|
|
||||||
if (ksym == XK_Return && panel->defBtn) {
|
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
||||||
WMPerformButtonClick(panel->defBtn);
|
WMPerformButtonClick(panel->defBtn);
|
||||||
} else if (ksym == XK_Escape) {
|
} else if (ksym == XK_Escape) {
|
||||||
if (panel->altBtn || panel->othBtn) {
|
if (panel->altBtn || panel->othBtn) {
|
||||||
@@ -89,10 +89,12 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
const char *alternateButton, const char *otherButton)
|
const char *alternateButton, const char *otherButton)
|
||||||
{
|
{
|
||||||
WMAlertPanel *panel;
|
WMAlertPanel *panel;
|
||||||
|
WMFont *defaultFont;
|
||||||
int dw = 0, aw = 0, ow = 0, w;
|
int dw = 0, aw = 0, ow = 0, w;
|
||||||
WMBox *hbox;
|
WMBox *hbox;
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
|
|
||||||
|
defaultFont = WMSystemFontOfSize(scrPtr, 12);
|
||||||
panel = wmalloc(sizeof(WMAlertPanel));
|
panel = wmalloc(sizeof(WMAlertPanel));
|
||||||
|
|
||||||
if (owner) {
|
if (owner) {
|
||||||
@@ -160,6 +162,7 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
WMFontHeight(scrPtr->normalFont) * 4, 0, 5);
|
WMFontHeight(scrPtr->normalFont) * 4, 0, 5);
|
||||||
WMSetLabelText(panel->mLbl, msg);
|
WMSetLabelText(panel->mLbl, msg);
|
||||||
WMSetLabelTextAlignment(panel->mLbl, WACenter);
|
WMSetLabelTextAlignment(panel->mLbl, WACenter);
|
||||||
|
WMSetLabelFont(panel->mLbl, defaultFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->hbox = WMCreateBox(panel->vbox);
|
panel->hbox = WMCreateBox(panel->vbox);
|
||||||
@@ -170,13 +173,13 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
|
|
||||||
/* create buttons */
|
/* create buttons */
|
||||||
if (otherButton)
|
if (otherButton)
|
||||||
ow = WMWidthOfString(scrPtr->normalFont, otherButton, strlen(otherButton));
|
ow = WMWidthOfString(defaultFont, otherButton, strlen(otherButton));
|
||||||
|
|
||||||
if (alternateButton)
|
if (alternateButton)
|
||||||
aw = WMWidthOfString(scrPtr->normalFont, alternateButton, strlen(alternateButton));
|
aw = WMWidthOfString(defaultFont, alternateButton, strlen(alternateButton));
|
||||||
|
|
||||||
if (defaultButton)
|
if (defaultButton)
|
||||||
dw = WMWidthOfString(scrPtr->normalFont, defaultButton, strlen(defaultButton));
|
dw = WMWidthOfString(defaultFont, defaultButton, strlen(defaultButton));
|
||||||
|
|
||||||
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
||||||
|
|
||||||
@@ -206,18 +209,187 @@ WMAlertPanel *WMCreateAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
||||||
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
||||||
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
||||||
|
WMSetButtonFont(panel->defBtn, defaultFont);
|
||||||
}
|
}
|
||||||
if (alternateButton) {
|
if (alternateButton) {
|
||||||
panel->altBtn = WMCreateCommandButton(panel->hbox);
|
panel->altBtn = WMCreateCommandButton(panel->hbox);
|
||||||
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->altBtn), False, True, aw, 0, 5);
|
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->altBtn), False, True, aw, 0, 5);
|
||||||
WMSetButtonAction(panel->altBtn, alertPanelOnClick, panel);
|
WMSetButtonAction(panel->altBtn, alertPanelOnClick, panel);
|
||||||
WMSetButtonText(panel->altBtn, alternateButton);
|
WMSetButtonText(panel->altBtn, alternateButton);
|
||||||
|
WMSetButtonFont(panel->altBtn, defaultFont);
|
||||||
}
|
}
|
||||||
if (otherButton) {
|
if (otherButton) {
|
||||||
panel->othBtn = WMCreateCommandButton(panel->hbox);
|
panel->othBtn = WMCreateCommandButton(panel->hbox);
|
||||||
WMSetButtonAction(panel->othBtn, alertPanelOnClick, panel);
|
WMSetButtonAction(panel->othBtn, alertPanelOnClick, panel);
|
||||||
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->othBtn), False, True, ow, 0, 5);
|
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->othBtn), False, True, ow, 0, 5);
|
||||||
WMSetButtonText(panel->othBtn, otherButton);
|
WMSetButtonText(panel->othBtn, otherButton);
|
||||||
|
WMSetButtonFont(panel->othBtn, defaultFont);
|
||||||
|
}
|
||||||
|
|
||||||
|
WMMapSubwidgets(panel->hbox);
|
||||||
|
|
||||||
|
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask, handleKeyPress, panel);
|
||||||
|
|
||||||
|
WMRealizeWidget(panel->win);
|
||||||
|
WMMapSubwidgets(panel->win);
|
||||||
|
|
||||||
|
WMReleaseFont(defaultFont);
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
WMAlertPanel *WMCreateScaledAlertPanel(WMScreen * scrPtr, WMWindow * owner,
|
||||||
|
const char *title, const char *msg, const char *defaultButton,
|
||||||
|
const char *alternateButton, const char *otherButton)
|
||||||
|
{
|
||||||
|
WMAlertPanel *panel;
|
||||||
|
int dw = 0, aw = 0, ow = 0, w;
|
||||||
|
WMBox *hbox;
|
||||||
|
WMPixmap *icon;
|
||||||
|
int wmScaleWidth, wmScaleHeight;
|
||||||
|
int pwidth, pheight;
|
||||||
|
|
||||||
|
panel = wmalloc(sizeof(WMAlertPanel));
|
||||||
|
|
||||||
|
if (owner) {
|
||||||
|
panel->win = WMCreatePanelWithStyleForWindow(owner, "alertPanel", WMTitledWindowMask);
|
||||||
|
} else {
|
||||||
|
panel->win = WMCreateWindowWithStyle(scrPtr, "alertPanel", WMTitledWindowMask);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* calculate and set the panel's size */
|
||||||
|
WMGetScaleBaseFromSystemFont(scrPtr, &wmScaleWidth, &wmScaleHeight);
|
||||||
|
pwidth = WMScaleX(400);
|
||||||
|
pheight = WMScaleY(5) /* upper margin */
|
||||||
|
+ 64 /* icon size */
|
||||||
|
+ WMScaleY(5) /* space between icon and divider line */
|
||||||
|
+ 2 /* divider line */
|
||||||
|
+ WMScaleY(5); /* space between divider line and message */
|
||||||
|
if (msg)
|
||||||
|
pheight += WMFontHeight(scrPtr->normalFont) * 4 + WMScaleY(5);
|
||||||
|
pheight += WMScaleY(44);
|
||||||
|
WMResizeWidget(panel->win, pwidth, pheight);
|
||||||
|
|
||||||
|
WMSetWindowInitialPosition(panel->win,
|
||||||
|
(scrPtr->rootView->size.width - pwidth) / 2,
|
||||||
|
(scrPtr->rootView->size.height - pheight) / 2);
|
||||||
|
|
||||||
|
WMSetWindowTitle(panel->win, "");
|
||||||
|
|
||||||
|
panel->vbox = WMCreateBox(panel->win);
|
||||||
|
WMSetViewExpandsToParent(WMWidgetView(panel->vbox), 0, 0, 0, 0);
|
||||||
|
WMSetBoxHorizontal(panel->vbox, False);
|
||||||
|
WMMapWidget(panel->vbox);
|
||||||
|
|
||||||
|
hbox = WMCreateBox(panel->vbox);
|
||||||
|
WMSetBoxBorderWidth(hbox, WMScaleX(5));
|
||||||
|
WMSetBoxHorizontal(hbox, True);
|
||||||
|
WMMapWidget(hbox);
|
||||||
|
WMAddBoxSubview(panel->vbox, WMWidgetView(hbox), False, True, 64 + 2 * WMScaleY(5), 0, WMScaleY(5));
|
||||||
|
|
||||||
|
panel->iLbl = WMCreateLabel(hbox);
|
||||||
|
WMSetLabelImagePosition(panel->iLbl, WIPImageOnly);
|
||||||
|
WMMapWidget(panel->iLbl);
|
||||||
|
WMAddBoxSubview(hbox, WMWidgetView(panel->iLbl), False, True, 64, 0, 10);
|
||||||
|
icon = WMCreateApplicationIconBlendedPixmap(scrPtr, (RColor *) NULL);
|
||||||
|
if (icon) {
|
||||||
|
WMSetLabelImage(panel->iLbl, icon);
|
||||||
|
WMReleasePixmap(icon);
|
||||||
|
} else {
|
||||||
|
WMSetLabelImage(panel->iLbl, scrPtr->applicationIconPixmap);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (title) {
|
||||||
|
WMFont *largeFont;
|
||||||
|
|
||||||
|
largeFont = WMBoldSystemFontOfSize(scrPtr, 24);
|
||||||
|
|
||||||
|
panel->tLbl = WMCreateLabel(hbox);
|
||||||
|
WMMapWidget(panel->tLbl);
|
||||||
|
WMAddBoxSubview(hbox, WMWidgetView(panel->tLbl), True, True, 64, 0, 0);
|
||||||
|
WMSetLabelText(panel->tLbl, title);
|
||||||
|
WMSetLabelTextAlignment(panel->tLbl, WALeft);
|
||||||
|
WMSetLabelFont(panel->tLbl, largeFont);
|
||||||
|
|
||||||
|
WMReleaseFont(largeFont);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* create divider line */
|
||||||
|
|
||||||
|
panel->line = WMCreateFrame(panel->win);
|
||||||
|
WMMapWidget(panel->line);
|
||||||
|
WMAddBoxSubview(panel->vbox, WMWidgetView(panel->line), False, True, 2, 2, WMScaleY(5));
|
||||||
|
WMSetFrameRelief(panel->line, WRGroove);
|
||||||
|
|
||||||
|
if (msg) {
|
||||||
|
panel->mLbl = WMCreateLabel(panel->vbox);
|
||||||
|
WMSetLabelWraps(panel->mLbl, True);
|
||||||
|
WMMapWidget(panel->mLbl);
|
||||||
|
WMAddBoxSubview(panel->vbox, WMWidgetView(panel->mLbl), True, True,
|
||||||
|
WMFontHeight(scrPtr->normalFont) * 4, 0, WMScaleY(5));
|
||||||
|
WMSetLabelText(panel->mLbl, msg);
|
||||||
|
WMSetLabelTextAlignment(panel->mLbl, WACenter);
|
||||||
|
}
|
||||||
|
|
||||||
|
panel->hbox = WMCreateBox(panel->vbox);
|
||||||
|
WMSetBoxBorderWidth(panel->hbox, WMScaleX(10));
|
||||||
|
WMSetBoxHorizontal(panel->hbox, True);
|
||||||
|
WMMapWidget(panel->hbox);
|
||||||
|
WMAddBoxSubview(panel->vbox, WMWidgetView(panel->hbox), False, True, WMScaleY(44), 0, 0);
|
||||||
|
|
||||||
|
/* create buttons */
|
||||||
|
if (otherButton)
|
||||||
|
ow = WMWidthOfString(scrPtr->normalFont, otherButton, strlen(otherButton));
|
||||||
|
|
||||||
|
if (alternateButton)
|
||||||
|
aw = WMWidthOfString(scrPtr->normalFont, alternateButton, strlen(alternateButton));
|
||||||
|
|
||||||
|
if (defaultButton)
|
||||||
|
dw = WMWidthOfString(scrPtr->normalFont, defaultButton, strlen(defaultButton));
|
||||||
|
|
||||||
|
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
||||||
|
|
||||||
|
aw += WMScaleX(30);
|
||||||
|
ow += WMScaleX(30);
|
||||||
|
dw += WMScaleX(30);
|
||||||
|
|
||||||
|
w = WMAX(dw, WMAX(aw, ow));
|
||||||
|
if ((w + WMScaleX(10)) * 3 < pwidth) {
|
||||||
|
aw = w;
|
||||||
|
ow = w;
|
||||||
|
dw = w;
|
||||||
|
} else {
|
||||||
|
int t;
|
||||||
|
|
||||||
|
t = pwidth - 4 * WMScaleX(10) - aw - ow - dw;
|
||||||
|
aw += t / 3;
|
||||||
|
ow += t / 3;
|
||||||
|
dw += t / 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (defaultButton) {
|
||||||
|
panel->defBtn = WMCreateCommandButton(panel->hbox);
|
||||||
|
WMResizeWidget(panel->defBtn, dw, WMScaleY(24));
|
||||||
|
WMSetButtonAction(panel->defBtn, alertPanelOnClick, panel);
|
||||||
|
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->defBtn), False, True, dw, 0, 0);
|
||||||
|
WMSetButtonText(panel->defBtn, defaultButton);
|
||||||
|
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
||||||
|
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
||||||
|
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
||||||
|
}
|
||||||
|
if (alternateButton) {
|
||||||
|
panel->altBtn = WMCreateCommandButton(panel->hbox);
|
||||||
|
WMResizeWidget(panel->altBtn, aw, WMScaleY(24));
|
||||||
|
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->altBtn), False, True, aw, 0, WMScaleX(5));
|
||||||
|
WMSetButtonAction(panel->altBtn, alertPanelOnClick, panel);
|
||||||
|
WMSetButtonText(panel->altBtn, alternateButton);
|
||||||
|
}
|
||||||
|
if (otherButton) {
|
||||||
|
panel->othBtn = WMCreateCommandButton(panel->hbox);
|
||||||
|
WMResizeWidget(panel->othBtn, ow, WMScaleY(24));
|
||||||
|
WMSetButtonAction(panel->othBtn, alertPanelOnClick, panel);
|
||||||
|
WMAddBoxSubviewAtEnd(panel->hbox, WMWidgetView(panel->othBtn), False, True, ow, 0, WMScaleX(5));
|
||||||
|
WMSetButtonText(panel->othBtn, otherButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(panel->hbox);
|
WMMapSubwidgets(panel->hbox);
|
||||||
@@ -249,7 +421,7 @@ static void handleKeyPress2(XEvent * event, void *clientData)
|
|||||||
|
|
||||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||||
|
|
||||||
if (ksym == XK_Return && panel->defBtn) {
|
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
||||||
WMPerformButtonClick(panel->defBtn);
|
WMPerformButtonClick(panel->defBtn);
|
||||||
} else if (ksym == XK_Escape) {
|
} else if (ksym == XK_Escape) {
|
||||||
if (panel->altBtn) {
|
if (panel->altBtn) {
|
||||||
@@ -338,8 +510,10 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, const char
|
|||||||
const char *defaultText, const char *okButton, const char *cancelButton)
|
const char *defaultText, const char *okButton, const char *cancelButton)
|
||||||
{
|
{
|
||||||
WMInputPanel *panel;
|
WMInputPanel *panel;
|
||||||
|
WMFont *defaultFont;
|
||||||
int x, dw = 0, aw = 0, w;
|
int x, dw = 0, aw = 0, w;
|
||||||
|
|
||||||
|
defaultFont = WMSystemFontOfSize(scrPtr, 12);
|
||||||
panel = wmalloc(sizeof(WMInputPanel));
|
panel = wmalloc(sizeof(WMInputPanel));
|
||||||
|
|
||||||
if (owner)
|
if (owner)
|
||||||
@@ -371,21 +545,23 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, const char
|
|||||||
WMResizeWidget(panel->mLbl, 320 - 40, WMFontHeight(scrPtr->normalFont) * 2);
|
WMResizeWidget(panel->mLbl, 320 - 40, WMFontHeight(scrPtr->normalFont) * 2);
|
||||||
WMSetLabelText(panel->mLbl, msg);
|
WMSetLabelText(panel->mLbl, msg);
|
||||||
WMSetLabelTextAlignment(panel->mLbl, WALeft);
|
WMSetLabelTextAlignment(panel->mLbl, WALeft);
|
||||||
|
WMSetLabelFont(panel->mLbl, defaultFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
panel->text = WMCreateTextField(panel->win);
|
panel->text = WMCreateTextField(panel->win);
|
||||||
WMMoveWidget(panel->text, 20, 85);
|
WMMoveWidget(panel->text, 20, 85);
|
||||||
WMResizeWidget(panel->text, 320 - 40, WMWidgetHeight(panel->text));
|
WMResizeWidget(panel->text, 320 - 40, WMWidgetHeight(panel->text));
|
||||||
WMSetTextFieldText(panel->text, defaultText);
|
WMSetTextFieldText(panel->text, defaultText);
|
||||||
|
WMSetTextFieldFont(panel->text, defaultFont);
|
||||||
|
|
||||||
WMAddNotificationObserver(endedEditingObserver, panel, WMTextDidEndEditingNotification, panel->text);
|
WMAddNotificationObserver(endedEditingObserver, panel, WMTextDidEndEditingNotification, panel->text);
|
||||||
|
|
||||||
/* create buttons */
|
/* create buttons */
|
||||||
if (cancelButton)
|
if (cancelButton)
|
||||||
aw = WMWidthOfString(scrPtr->normalFont, cancelButton, strlen(cancelButton));
|
aw = WMWidthOfString(defaultFont, cancelButton, strlen(cancelButton));
|
||||||
|
|
||||||
if (okButton)
|
if (okButton)
|
||||||
dw = WMWidthOfString(scrPtr->normalFont, okButton, strlen(okButton));
|
dw = WMWidthOfString(defaultFont, okButton, strlen(okButton));
|
||||||
|
|
||||||
w = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
w = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
||||||
if (aw > w)
|
if (aw > w)
|
||||||
@@ -406,6 +582,7 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, const char
|
|||||||
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
||||||
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
||||||
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
||||||
|
WMSetButtonFont(panel->defBtn, defaultFont);
|
||||||
}
|
}
|
||||||
if (cancelButton) {
|
if (cancelButton) {
|
||||||
x -= w + 10;
|
x -= w + 10;
|
||||||
@@ -415,6 +592,104 @@ WMInputPanel *WMCreateInputPanel(WMScreen * scrPtr, WMWindow * owner, const char
|
|||||||
WMMoveWidget(panel->altBtn, x, 124);
|
WMMoveWidget(panel->altBtn, x, 124);
|
||||||
WMResizeWidget(panel->altBtn, w, 24);
|
WMResizeWidget(panel->altBtn, w, 24);
|
||||||
WMSetButtonText(panel->altBtn, cancelButton);
|
WMSetButtonText(panel->altBtn, cancelButton);
|
||||||
|
WMSetButtonFont(panel->altBtn, defaultFont);
|
||||||
|
}
|
||||||
|
|
||||||
|
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask, handleKeyPress2, panel);
|
||||||
|
|
||||||
|
WMRealizeWidget(panel->win);
|
||||||
|
WMMapSubwidgets(panel->win);
|
||||||
|
|
||||||
|
WMSetFocusToWidget(panel->text);
|
||||||
|
|
||||||
|
WMReleaseFont(defaultFont);
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
|
|
||||||
|
WMInputPanel *WMCreateScaledInputPanel(WMScreen * scrPtr, WMWindow * owner, const char *title, const char *msg,
|
||||||
|
const char *defaultText, const char *okButton, const char *cancelButton)
|
||||||
|
{
|
||||||
|
WMInputPanel *panel;
|
||||||
|
int x, dw = 0, aw = 0, w;
|
||||||
|
int wmScaleWidth, wmScaleHeight;
|
||||||
|
|
||||||
|
panel = wmalloc(sizeof(WMInputPanel));
|
||||||
|
|
||||||
|
if (owner)
|
||||||
|
panel->win = WMCreatePanelWithStyleForWindow(owner, "inputPanel", WMTitledWindowMask);
|
||||||
|
else
|
||||||
|
panel->win = WMCreateWindowWithStyle(scrPtr, "inputPanel", WMTitledWindowMask);
|
||||||
|
WMSetWindowTitle(panel->win, "");
|
||||||
|
|
||||||
|
WMGetScaleBaseFromSystemFont(scrPtr, &wmScaleWidth, &wmScaleHeight);
|
||||||
|
WMResizeWidget(panel->win, WMScaleX(320), WMScaleY(160));
|
||||||
|
|
||||||
|
if (title) {
|
||||||
|
WMFont *largeFont;
|
||||||
|
|
||||||
|
largeFont = WMBoldSystemFontOfSize(scrPtr, WMScaleY(24));
|
||||||
|
|
||||||
|
panel->tLbl = WMCreateLabel(panel->win);
|
||||||
|
WMMoveWidget(panel->tLbl, WMScaleX(20), WMScaleY(16));
|
||||||
|
WMResizeWidget(panel->tLbl, WMScaleX(320) - 2 * WMScaleX(20), WMFontHeight(largeFont) + WMScaleY(4));
|
||||||
|
WMSetLabelText(panel->tLbl, title);
|
||||||
|
WMSetLabelTextAlignment(panel->tLbl, WALeft);
|
||||||
|
WMSetLabelFont(panel->tLbl, largeFont);
|
||||||
|
|
||||||
|
WMReleaseFont(largeFont);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (msg) {
|
||||||
|
panel->mLbl = WMCreateLabel(panel->win);
|
||||||
|
WMMoveWidget(panel->mLbl, WMScaleX(20), WMScaleY(50));
|
||||||
|
WMResizeWidget(panel->mLbl, WMScaleX(320) - 2 * WMScaleX(20), WMFontHeight(scrPtr->normalFont) * 2);
|
||||||
|
WMSetLabelText(panel->mLbl, msg);
|
||||||
|
WMSetLabelTextAlignment(panel->mLbl, WALeft);
|
||||||
|
}
|
||||||
|
|
||||||
|
panel->text = WMCreateTextField(panel->win);
|
||||||
|
WMMoveWidget(panel->text, WMScaleX(20), WMScaleY(85));
|
||||||
|
WMResizeWidget(panel->text, WMScaleX(320) - 2 * WMScaleX(20), WMScaleY(20));
|
||||||
|
WMSetTextFieldText(panel->text, defaultText);
|
||||||
|
|
||||||
|
WMAddNotificationObserver(endedEditingObserver, panel, WMTextDidEndEditingNotification, panel->text);
|
||||||
|
|
||||||
|
/* create buttons */
|
||||||
|
if (cancelButton)
|
||||||
|
aw = WMWidthOfString(scrPtr->normalFont, cancelButton, strlen(cancelButton));
|
||||||
|
|
||||||
|
if (okButton)
|
||||||
|
dw = WMWidthOfString(scrPtr->normalFont, okButton, strlen(okButton));
|
||||||
|
|
||||||
|
w = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
||||||
|
if (aw > w)
|
||||||
|
w = aw;
|
||||||
|
|
||||||
|
w += WMScaleX(30);
|
||||||
|
x = WMScaleX(310);
|
||||||
|
|
||||||
|
if (okButton) {
|
||||||
|
x -= w + WMScaleX(10);
|
||||||
|
|
||||||
|
panel->defBtn = WMCreateCustomButton(panel->win, WBBPushInMask
|
||||||
|
| WBBPushChangeMask | WBBPushLightMask);
|
||||||
|
WMSetButtonAction(panel->defBtn, inputBoxOnClick, panel);
|
||||||
|
WMMoveWidget(panel->defBtn, x, WMScaleY(124));
|
||||||
|
WMResizeWidget(panel->defBtn, w, WMScaleY(24));
|
||||||
|
WMSetButtonText(panel->defBtn, okButton);
|
||||||
|
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
||||||
|
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
||||||
|
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
||||||
|
}
|
||||||
|
if (cancelButton) {
|
||||||
|
x -= w + WMScaleX(10);
|
||||||
|
|
||||||
|
panel->altBtn = WMCreateCommandButton(panel->win);
|
||||||
|
WMSetButtonAction(panel->altBtn, inputBoxOnClick, panel);
|
||||||
|
WMMoveWidget(panel->altBtn, x, WMScaleY(124));
|
||||||
|
WMResizeWidget(panel->altBtn, w, WMScaleY(24));
|
||||||
|
WMSetButtonText(panel->altBtn, cancelButton);
|
||||||
}
|
}
|
||||||
|
|
||||||
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask, handleKeyPress2, panel);
|
WMCreateEventHandler(W_VIEW(panel->win), KeyPressMask, handleKeyPress2, panel);
|
||||||
@@ -434,7 +709,7 @@ static void handleKeyPress3(XEvent * event, void *clientData)
|
|||||||
|
|
||||||
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
XLookupString(&event->xkey, NULL, 0, &ksym, NULL);
|
||||||
|
|
||||||
if (ksym == XK_Return && panel->defBtn) {
|
if ((ksym == XK_Return || ksym == XK_KP_Enter) && panel->defBtn) {
|
||||||
WMPerformButtonClick(panel->defBtn);
|
WMPerformButtonClick(panel->defBtn);
|
||||||
} else if (ksym == XK_Escape) {
|
} else if (ksym == XK_Escape) {
|
||||||
if (panel->altBtn) {
|
if (panel->altBtn) {
|
||||||
@@ -457,10 +732,12 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
const char *title, const char *defaultButton, const char *alternateButton)
|
const char *title, const char *defaultButton, const char *alternateButton)
|
||||||
{
|
{
|
||||||
WMGenericPanel *panel;
|
WMGenericPanel *panel;
|
||||||
|
WMFont *defaultFont;
|
||||||
int dw = 0, aw = 0, w;
|
int dw = 0, aw = 0, w;
|
||||||
WMBox *hbox;
|
WMBox *hbox;
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
|
|
||||||
|
defaultFont = WMSystemFontOfSize(scrPtr, 12);
|
||||||
panel = wmalloc(sizeof(WMGenericPanel));
|
panel = wmalloc(sizeof(WMGenericPanel));
|
||||||
|
|
||||||
if (owner) {
|
if (owner) {
|
||||||
@@ -533,10 +810,10 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
|
|
||||||
/* create buttons */
|
/* create buttons */
|
||||||
if (defaultButton)
|
if (defaultButton)
|
||||||
dw = WMWidthOfString(scrPtr->normalFont, defaultButton, strlen(defaultButton));
|
dw = WMWidthOfString(defaultFont, defaultButton, strlen(defaultButton));
|
||||||
|
|
||||||
if (alternateButton)
|
if (alternateButton)
|
||||||
aw = WMWidthOfString(scrPtr->normalFont, alternateButton, strlen(alternateButton));
|
aw = WMWidthOfString(defaultFont, alternateButton, strlen(alternateButton));
|
||||||
|
|
||||||
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
dw = dw + (scrPtr->buttonArrow ? scrPtr->buttonArrow->width : 0);
|
||||||
|
|
||||||
@@ -561,6 +838,7 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
WMSetButtonImage(panel->defBtn, scrPtr->buttonArrow);
|
||||||
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
WMSetButtonAltImage(panel->defBtn, scrPtr->pushedButtonArrow);
|
||||||
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
WMSetButtonImagePosition(panel->defBtn, WIPRight);
|
||||||
|
WMSetButtonFont(panel->defBtn, defaultFont);
|
||||||
}
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(hbox);
|
WMMapSubwidgets(hbox);
|
||||||
@@ -570,5 +848,7 @@ WMGenericPanel *WMCreateGenericPanel(WMScreen * scrPtr, WMWindow * owner,
|
|||||||
WMRealizeWidget(panel->win);
|
WMRealizeWidget(panel->win);
|
||||||
WMMapSubwidgets(panel->win);
|
WMMapSubwidgets(panel->win);
|
||||||
|
|
||||||
|
WMReleaseFont(defaultFont);
|
||||||
|
|
||||||
return panel;
|
return panel;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -85,6 +85,9 @@ WMPixmap *WMCreatePixmapFromRImage(WMScreen * scrPtr, RImage * image, int thresh
|
|||||||
WMPixmap *pixPtr;
|
WMPixmap *pixPtr;
|
||||||
Pixmap pixmap, mask;
|
Pixmap pixmap, mask;
|
||||||
|
|
||||||
|
if (image == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!RConvertImageMask(scrPtr->rcontext, image, &pixmap, &mask, threshold)) {
|
if (!RConvertImageMask(scrPtr->rcontext, image, &pixmap, &mask, threshold)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,6 +252,56 @@ WMMenuItem *WMGetPopUpButtonMenuItem(WMPopUpButton * bPtr, int index)
|
|||||||
return WMGetFromArray(bPtr->items, index);
|
return WMGetFromArray(bPtr->items, index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int WMSelectPopUpButtonPreviousItem(WMPopUpButton * bPtr)
|
||||||
|
{
|
||||||
|
int testIndex;
|
||||||
|
|
||||||
|
CHECK_CLASS(bPtr, WC_PopUpButton);
|
||||||
|
|
||||||
|
if (bPtr->flags.pullsDown || bPtr->selectedItemIndex < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
testIndex = bPtr->selectedItemIndex - 1;
|
||||||
|
|
||||||
|
while (testIndex >= 0 && !WMGetPopUpButtonItemEnabled(bPtr, testIndex))
|
||||||
|
testIndex--;
|
||||||
|
|
||||||
|
if (testIndex != -1) {
|
||||||
|
WMSetPopUpButtonSelectedItem(bPtr, testIndex);
|
||||||
|
if (bPtr->action)
|
||||||
|
(*bPtr->action) (bPtr, bPtr->clientData);
|
||||||
|
return testIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int WMSelectPopUpButtonNextItem(WMPopUpButton * bPtr)
|
||||||
|
{
|
||||||
|
int itemCount;
|
||||||
|
int testIndex;
|
||||||
|
|
||||||
|
CHECK_CLASS(bPtr, WC_PopUpButton);
|
||||||
|
|
||||||
|
if (bPtr->flags.pullsDown || bPtr->selectedItemIndex < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
itemCount = WMGetArrayItemCount(bPtr->items);
|
||||||
|
testIndex = bPtr->selectedItemIndex + 1;
|
||||||
|
|
||||||
|
while (testIndex < itemCount && !WMGetPopUpButtonItemEnabled(bPtr, testIndex))
|
||||||
|
testIndex++;
|
||||||
|
|
||||||
|
if (testIndex != itemCount) {
|
||||||
|
WMSetPopUpButtonSelectedItem(bPtr, testIndex);
|
||||||
|
if (bPtr->action)
|
||||||
|
(*bPtr->action) (bPtr, bPtr->clientData);
|
||||||
|
return testIndex;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static void paintPopUpButton(PopUpButton * bPtr)
|
static void paintPopUpButton(PopUpButton * bPtr)
|
||||||
{
|
{
|
||||||
W_Screen *scr = bPtr->view->screen;
|
W_Screen *scr = bPtr->view->screen;
|
||||||
|
|||||||
+1
-4
@@ -181,10 +181,7 @@ static void drawRulerOnPixmap(Ruler * rPtr)
|
|||||||
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
XDrawLine(rPtr->view->screen->display, rPtr->drawBuffer,
|
||||||
rPtr->fgGC, rPtr->margins.left + m, 23, rPtr->margins.left + m, marks[i % 8] + 23);
|
rPtr->fgGC, rPtr->margins.left + m, 23, rPtr->margins.left + m, marks[i % 8] + 23);
|
||||||
if (i != 0 && i % 8 == 0) {
|
if (i != 0 && i % 8 == 0) {
|
||||||
if (j < 10)
|
snprintf(c, sizeof(c), "%hu", ++j);
|
||||||
snprintf(c, 3, "%d", ++j);
|
|
||||||
else
|
|
||||||
snprintf(c, 3, "%2d", ++j);
|
|
||||||
WMDrawString(rPtr->view->screen, rPtr->drawBuffer, rPtr->fg,
|
WMDrawString(rPtr->view->screen, rPtr->drawBuffer, rPtr->fg,
|
||||||
rPtr->font, rPtr->margins.left + 2 + m, 26, c, 2);
|
rPtr->font, rPtr->margins.left + 2 + m, 26, c, 2);
|
||||||
}
|
}
|
||||||
|
|||||||
+10
-12
@@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#define AUTOSCROLL_DELAY 40
|
#define AUTOSCROLL_DELAY 40
|
||||||
|
|
||||||
char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
|
const char *WMScrollerDidScrollNotification = "WMScrollerDidScrollNotification";
|
||||||
|
|
||||||
typedef struct W_Scroller {
|
typedef struct W_Scroller {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
@@ -64,8 +64,6 @@ typedef struct W_Scroller {
|
|||||||
} flags;
|
} flags;
|
||||||
} Scroller;
|
} Scroller;
|
||||||
|
|
||||||
#define DEFAULT_HEIGHT 60
|
|
||||||
#define DEFAULT_WIDTH SCROLLER_WIDTH
|
|
||||||
#define DEFAULT_ARROWS_POSITION WSAMinEnd
|
#define DEFAULT_ARROWS_POSITION WSAMinEnd
|
||||||
|
|
||||||
#define BUTTON_SIZE ((SCROLLER_WIDTH) - 4)
|
#define BUTTON_SIZE ((SCROLLER_WIDTH) - 4)
|
||||||
@@ -108,7 +106,7 @@ WMScroller *WMCreateScroller(WMWidget * parent)
|
|||||||
WMCreateEventHandler(sPtr->view, ExposureMask | StructureNotifyMask
|
WMCreateEventHandler(sPtr->view, ExposureMask | StructureNotifyMask
|
||||||
| ClientMessageMask, handleEvents, sPtr);
|
| ClientMessageMask, handleEvents, sPtr);
|
||||||
|
|
||||||
W_ResizeView(sPtr->view, DEFAULT_WIDTH, DEFAULT_WIDTH);
|
W_ResizeView(sPtr->view, SCROLLER_WIDTH, SCROLLER_WIDTH);
|
||||||
sPtr->flags.arrowsPosition = DEFAULT_ARROWS_POSITION;
|
sPtr->flags.arrowsPosition = DEFAULT_ARROWS_POSITION;
|
||||||
|
|
||||||
WMCreateEventHandler(sPtr->view, ButtonPressMask | ButtonReleaseMask
|
WMCreateEventHandler(sPtr->view, ButtonPressMask | ButtonReleaseMask
|
||||||
@@ -170,10 +168,10 @@ void WMSetScrollerParameters(WMScroller * sPtr, float floatValue, float knobProp
|
|||||||
|
|
||||||
assert(!isnan(floatValue));
|
assert(!isnan(floatValue));
|
||||||
|
|
||||||
if (floatValue < 0.0)
|
if (floatValue < 0.0F)
|
||||||
sPtr->floatValue = 0.0;
|
sPtr->floatValue = 0.0F;
|
||||||
else if (floatValue > 1.0)
|
else if (floatValue > 1.0F)
|
||||||
sPtr->floatValue = 1.0;
|
sPtr->floatValue = 1.0F;
|
||||||
else
|
else
|
||||||
sPtr->floatValue = floatValue;
|
sPtr->floatValue = floatValue;
|
||||||
|
|
||||||
@@ -182,9 +180,9 @@ void WMSetScrollerParameters(WMScroller * sPtr, float floatValue, float knobProp
|
|||||||
sPtr->knobProportion = min_knob_proportion;
|
sPtr->knobProportion = min_knob_proportion;
|
||||||
sPtr->flags.documentFullyVisible = 0;
|
sPtr->flags.documentFullyVisible = 0;
|
||||||
|
|
||||||
} else if (knobProportion >= 1.0) {
|
} else if (knobProportion >= 1.0F) {
|
||||||
|
|
||||||
sPtr->knobProportion = 1.0;
|
sPtr->knobProportion = 1.0F;
|
||||||
sPtr->flags.documentFullyVisible = 1;
|
sPtr->flags.documentFullyVisible = 1;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -346,7 +344,7 @@ static int knobLength(Scroller * sPtr)
|
|||||||
length -= 2 * (BUTTON_SIZE + 1);
|
length -= 2 * (BUTTON_SIZE + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
tmp = (int)((float)length * sPtr->knobProportion + 0.5);
|
tmp = (int)((float)length * sPtr->knobProportion + 0.5F);
|
||||||
/* keep minimum size */
|
/* keep minimum size */
|
||||||
if (tmp < BUTTON_SIZE)
|
if (tmp < BUTTON_SIZE)
|
||||||
tmp = BUTTON_SIZE;
|
tmp = BUTTON_SIZE;
|
||||||
@@ -420,7 +418,7 @@ static void paintScroller(Scroller * sPtr)
|
|||||||
length - (int)(knobP + knobL), view->size.height - 4);
|
length - (int)(knobP + knobL), view->size.height - 4);
|
||||||
} else {
|
} else {
|
||||||
/* before */
|
/* before */
|
||||||
if (knobP > 0.0)
|
if (knobP > 0.0F)
|
||||||
XFillRectangle(scr->display, d, scr->stippleGC,
|
XFillRectangle(scr->display, d, scr->stippleGC,
|
||||||
2, ofs, view->size.width - 4, (int)knobP);
|
2, ofs, view->size.width - 4, (int)knobP);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -506,7 +506,7 @@ static void updateScrollerProportion(ScrollView * sPtr)
|
|||||||
|
|
||||||
prop = (float)sPtr->viewport->size.width / (float)sPtr->contentView->size.width;
|
prop = (float)sPtr->viewport->size.width / (float)sPtr->contentView->size.width;
|
||||||
|
|
||||||
if (oldP < 1.0)
|
if (oldP < 1.0F)
|
||||||
value = (prop * oldV) / oldP;
|
value = (prop * oldV) / oldP;
|
||||||
else
|
else
|
||||||
value = 0;
|
value = 0;
|
||||||
@@ -518,7 +518,7 @@ static void updateScrollerProportion(ScrollView * sPtr)
|
|||||||
|
|
||||||
prop = (float)sPtr->viewport->size.height / (float)sPtr->contentView->size.height;
|
prop = (float)sPtr->viewport->size.height / (float)sPtr->contentView->size.height;
|
||||||
|
|
||||||
if (oldP < 1.0)
|
if (oldP < 1.0F)
|
||||||
value = (prop * oldV) / oldP;
|
value = (prop * oldV) / oldP;
|
||||||
else
|
else
|
||||||
value = 0;
|
value = 0;
|
||||||
|
|||||||
+4
-4
@@ -410,16 +410,16 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
|
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
if (event->xbutton.button == WINGsConfiguration.mouseWheelUp && !sPtr->flags.dragging) {
|
if (event->xbutton.button == WINGsConfiguration.mouseWheelDown && !sPtr->flags.dragging) {
|
||||||
/* Wheel up */
|
/* Wheel down */
|
||||||
if (sPtr->value + 1 <= sPtr->maxValue) {
|
if (sPtr->value + 1 <= sPtr->maxValue) {
|
||||||
WMSetSliderValue(sPtr, sPtr->value + 1);
|
WMSetSliderValue(sPtr, sPtr->value + 1);
|
||||||
if (sPtr->flags.continuous && sPtr->action) {
|
if (sPtr->flags.continuous && sPtr->action) {
|
||||||
(*sPtr->action) (sPtr, sPtr->clientData);
|
(*sPtr->action) (sPtr, sPtr->clientData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (event->xbutton.button == WINGsConfiguration.mouseWheelDown && !sPtr->flags.dragging) {
|
} else if (event->xbutton.button == WINGsConfiguration.mouseWheelUp && !sPtr->flags.dragging) {
|
||||||
/* Wheel down */
|
/* Wheel up */
|
||||||
if (sPtr->value - 1 >= sPtr->minValue) {
|
if (sPtr->value - 1 >= sPtr->minValue) {
|
||||||
WMSetSliderValue(sPtr, sPtr->value - 1);
|
WMSetSliderValue(sPtr, sPtr->value - 1);
|
||||||
if (sPtr->flags.continuous && sPtr->action) {
|
if (sPtr->flags.continuous && sPtr->action) {
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ typedef struct W_SplitView {
|
|||||||
/* TODO: rewrite --Dan */
|
/* TODO: rewrite --Dan */
|
||||||
#define _GetSubviewsCount() WMGetArrayItemCount(sPtr->subviews)
|
#define _GetSubviewsCount() WMGetArrayItemCount(sPtr->subviews)
|
||||||
|
|
||||||
#define _AddPSubviewStruct(P) \
|
|
||||||
(WMAddToArray(sPtr->subviews,((void*)P)))
|
|
||||||
|
|
||||||
#define _GetPSubviewStructAt(i) \
|
#define _GetPSubviewStructAt(i) \
|
||||||
((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))
|
((W_SplitViewSubview*)WMGetFromArray(sPtr->subviews,(i)))
|
||||||
|
|
||||||
|
|||||||
+31
-16
@@ -166,12 +166,15 @@ typedef struct W_Text {
|
|||||||
WMArray *xdndDestinationTypes;
|
WMArray *xdndDestinationTypes;
|
||||||
} Text;
|
} Text;
|
||||||
|
|
||||||
|
/* not used */
|
||||||
|
#if 0
|
||||||
#define NOTIFY(T,C,N,A) {\
|
#define NOTIFY(T,C,N,A) {\
|
||||||
WMNotification *notif = WMCreateNotification(N,T,A);\
|
WMNotification *notif = WMCreateNotification(N,T,A);\
|
||||||
if ((T)->delegate && (T)->delegate->C)\
|
if ((T)->delegate && (T)->delegate->C)\
|
||||||
(*(T)->delegate->C)((T)->delegate,notif);\
|
(*(T)->delegate->C)((T)->delegate,notif);\
|
||||||
WMPostNotification(notif);\
|
WMPostNotification(notif);\
|
||||||
WMReleaseNotification(notif);}
|
WMReleaseNotification(notif);}
|
||||||
|
#endif
|
||||||
|
|
||||||
#define TYPETEXT 0
|
#define TYPETEXT 0
|
||||||
|
|
||||||
@@ -215,6 +218,11 @@ static char *default_bullet[] = {
|
|||||||
" ooo "
|
" ooo "
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* These id are used when sharing the selected text between applications */
|
||||||
|
static Atom XA_TARGETS = None;
|
||||||
|
static Atom XA_TEXT = None;
|
||||||
|
static Atom XA_COMPOUND_TEXT = None;
|
||||||
|
|
||||||
static void handleEvents(XEvent * event, void *data);
|
static void handleEvents(XEvent * event, void *data);
|
||||||
static void layOutDocument(Text * tPtr);
|
static void layOutDocument(Text * tPtr);
|
||||||
static void updateScrollers(Text * tPtr);
|
static void updateScrollers(Text * tPtr);
|
||||||
@@ -617,7 +625,7 @@ static void paintText(Text * tPtr)
|
|||||||
TextBlock *tb;
|
TextBlock *tb;
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
const char *text;
|
const char *text;
|
||||||
int len, y, c, s, done = False, dir /* 1 = down */ ;
|
int len, y, c, s, done = False, dir; /* dir 1 = down */
|
||||||
WMScreen *scr = tPtr->view->screen;
|
WMScreen *scr = tPtr->view->screen;
|
||||||
Display *dpy = tPtr->view->screen->display;
|
Display *dpy = tPtr->view->screen->display;
|
||||||
Window win = tPtr->view->window;
|
Window win = tPtr->view->window;
|
||||||
@@ -2036,17 +2044,13 @@ static void releaseSelection(Text * tPtr)
|
|||||||
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
|
static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *cdata, Atom * type)
|
||||||
{
|
{
|
||||||
Text *tPtr = view->self;
|
Text *tPtr = view->self;
|
||||||
Display *dpy = tPtr->view->screen->display;
|
|
||||||
Atom _TARGETS;
|
|
||||||
Atom TEXT = XInternAtom(dpy, "TEXT", False);
|
|
||||||
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
|
||||||
WMData *data = NULL;
|
WMData *data = NULL;
|
||||||
|
|
||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
(void) selection;
|
(void) selection;
|
||||||
(void) cdata;
|
(void) cdata;
|
||||||
|
|
||||||
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
|
if (target == XA_STRING || target == XA_TEXT || target == XA_COMPOUND_TEXT) {
|
||||||
char *text = WMGetTextSelectedStream(tPtr);
|
char *text = WMGetTextSelectedStream(tPtr);
|
||||||
|
|
||||||
if (text) {
|
if (text) {
|
||||||
@@ -2059,20 +2063,18 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
|||||||
} else
|
} else
|
||||||
printf("didn't get it\n");
|
printf("didn't get it\n");
|
||||||
|
|
||||||
_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
if (target == XA_TARGETS) {
|
||||||
if (target == _TARGETS) {
|
Atom supported_type[4];
|
||||||
Atom *ptr;
|
|
||||||
|
|
||||||
ptr = wmalloc(4 * sizeof(Atom));
|
supported_type[0] = XA_TARGETS;
|
||||||
ptr[0] = _TARGETS;
|
supported_type[1] = XA_STRING;
|
||||||
ptr[1] = XA_STRING;
|
supported_type[2] = XA_TEXT;
|
||||||
ptr[2] = TEXT;
|
supported_type[3] = XA_COMPOUND_TEXT;
|
||||||
ptr[3] = COMPOUND_TEXT;
|
|
||||||
|
|
||||||
data = WMCreateDataWithBytes(ptr, 4 * 4);
|
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
|
||||||
WMSetDataFormat(data, 32);
|
WMSetDataFormat(data, 32);
|
||||||
|
|
||||||
*type = target;
|
*type = XA_ATOM;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2306,6 +2308,7 @@ static void handleTextKeyPress(Text * tPtr, XEvent * event)
|
|||||||
|
|
||||||
case XK_Return:
|
case XK_Return:
|
||||||
*buffer = '\n';
|
*buffer = '\n';
|
||||||
|
/* FALLTHRU */
|
||||||
default:
|
default:
|
||||||
if (*buffer != 0 && !control_pressed) {
|
if (*buffer != 0 && !control_pressed) {
|
||||||
insertTextInteractively(tPtr, buffer, strlen(buffer));
|
insertTextInteractively(tPtr, buffer, strlen(buffer));
|
||||||
@@ -2545,6 +2548,7 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* FALLTHRU */
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
if (tPtr->flags.pointerGrabbed) {
|
if (tPtr->flags.pointerGrabbed) {
|
||||||
tPtr->flags.pointerGrabbed = False;
|
tPtr->flags.pointerGrabbed = False;
|
||||||
@@ -2973,6 +2977,17 @@ WMText *WMCreateTextForDocumentType(WMWidget * parent, WMAction * parser, WMActi
|
|||||||
dpy = tPtr->view->screen->display;
|
dpy = tPtr->view->screen->display;
|
||||||
scr = tPtr->view->screen;
|
scr = tPtr->view->screen;
|
||||||
|
|
||||||
|
if (XA_TARGETS == None) {
|
||||||
|
/*
|
||||||
|
* Because the X protocol guaranties that the value will never change in
|
||||||
|
* the lifespan of the server, we query the values only the first time a
|
||||||
|
* widget is created
|
||||||
|
*/
|
||||||
|
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||||
|
XA_TEXT = XInternAtom(dpy, "TEXT", False);
|
||||||
|
XA_COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
||||||
|
}
|
||||||
|
|
||||||
tPtr->view->self = tPtr;
|
tPtr->view->self = tPtr;
|
||||||
tPtr->view->attribs.cursor = scr->textCursor;
|
tPtr->view->attribs.cursor = scr->textCursor;
|
||||||
tPtr->view->attribFlags |= CWOverrideRedirect | CWCursor;
|
tPtr->view->attribFlags |= CWOverrideRedirect | CWCursor;
|
||||||
|
|||||||
+111
-64
@@ -10,9 +10,9 @@
|
|||||||
#define CURSOR_BLINK_ON_DELAY 600
|
#define CURSOR_BLINK_ON_DELAY 600
|
||||||
#define CURSOR_BLINK_OFF_DELAY 300
|
#define CURSOR_BLINK_OFF_DELAY 300
|
||||||
|
|
||||||
char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
|
const char *WMTextDidChangeNotification = "WMTextDidChangeNotification";
|
||||||
char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
|
const char *WMTextDidBeginEditingNotification = "WMTextDidBeginEditingNotification";
|
||||||
char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
|
const char *WMTextDidEndEditingNotification = "WMTextDidEndEditingNotification";
|
||||||
|
|
||||||
typedef struct W_TextField {
|
typedef struct W_TextField {
|
||||||
W_Class widgetClass;
|
W_Class widgetClass;
|
||||||
@@ -239,9 +239,9 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
|||||||
TextField *tPtr = view->self;
|
TextField *tPtr = view->self;
|
||||||
int count;
|
int count;
|
||||||
Display *dpy = tPtr->view->screen->display;
|
Display *dpy = tPtr->view->screen->display;
|
||||||
Atom _TARGETS;
|
Atom XA_TARGETS;
|
||||||
Atom TEXT = XInternAtom(dpy, "TEXT", False);
|
Atom XA_TEXT = XInternAtom(dpy, "TEXT", False);
|
||||||
Atom COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
Atom XA_COMPOUND_TEXT = XInternAtom(dpy, "COMPOUND_TEXT", False);
|
||||||
WMData *data;
|
WMData *data;
|
||||||
|
|
||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
@@ -251,7 +251,7 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
|||||||
count = tPtr->selection.count < 0
|
count = tPtr->selection.count < 0
|
||||||
? tPtr->selection.position + tPtr->selection.count : tPtr->selection.position;
|
? tPtr->selection.position + tPtr->selection.count : tPtr->selection.position;
|
||||||
|
|
||||||
if (target == XA_STRING || target == TEXT || target == COMPOUND_TEXT) {
|
if (target == XA_STRING || target == XA_TEXT || target == XA_COMPOUND_TEXT) {
|
||||||
|
|
||||||
data = WMCreateDataWithBytes(&(tPtr->text[count]), abs(tPtr->selection.count));
|
data = WMCreateDataWithBytes(&(tPtr->text[count]), abs(tPtr->selection.count));
|
||||||
WMSetDataFormat(data, 8);
|
WMSetDataFormat(data, 8);
|
||||||
@@ -260,19 +260,19 @@ static WMData *requestHandler(WMView * view, Atom selection, Atom target, void *
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
XA_TARGETS = XInternAtom(dpy, "TARGETS", False);
|
||||||
if (target == _TARGETS) {
|
if (target == XA_TARGETS) {
|
||||||
Atom supported_type[4];
|
Atom supported_type[4];
|
||||||
|
|
||||||
supported_type[0] = _TARGETS;
|
supported_type[0] = XA_TARGETS;
|
||||||
supported_type[1] = XA_STRING;
|
supported_type[1] = XA_STRING;
|
||||||
supported_type[2] = TEXT;
|
supported_type[2] = XA_TEXT;
|
||||||
supported_type[3] = COMPOUND_TEXT;
|
supported_type[3] = XA_COMPOUND_TEXT;
|
||||||
|
|
||||||
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
|
data = WMCreateDataWithBytes(supported_type, sizeof(supported_type));
|
||||||
WMSetDataFormat(data, 32);
|
WMSetDataFormat(data, 32);
|
||||||
|
|
||||||
*type = target;
|
*type = XA_ATOM;
|
||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -446,6 +446,13 @@ void WMDeleteTextFieldRange(WMTextField * tPtr, WMRange range)
|
|||||||
|
|
||||||
decrToFit(tPtr);
|
decrToFit(tPtr);
|
||||||
|
|
||||||
|
/* Ensure cursor is visible after deletion */
|
||||||
|
if (tPtr->cursorPosition < tPtr->viewPosition) {
|
||||||
|
tPtr->viewPosition = tPtr->cursorPosition;
|
||||||
|
} else {
|
||||||
|
incrToFit2(tPtr);
|
||||||
|
}
|
||||||
|
|
||||||
paintTextField(tPtr);
|
paintTextField(tPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -490,11 +497,6 @@ void WMSetTextFieldAlignment(WMTextField * tPtr, WMAlignment alignment)
|
|||||||
|
|
||||||
tPtr->flags.alignment = alignment;
|
tPtr->flags.alignment = alignment;
|
||||||
|
|
||||||
if (alignment != WALeft) {
|
|
||||||
wwarning("only left alignment is supported in textfields");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tPtr->view->flags.realized) {
|
if (tPtr->view->flags.realized) {
|
||||||
paintTextField(tPtr);
|
paintTextField(tPtr);
|
||||||
}
|
}
|
||||||
@@ -661,7 +663,7 @@ static void didResizeTextField(W_ViewDelegate * self, WMView * view)
|
|||||||
|
|
||||||
tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1);
|
tPtr->offsetWidth = WMAX((tPtr->view->size.height - WMFontHeight(tPtr->font)) / 2, 1);
|
||||||
|
|
||||||
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth /*+ 2 */ ;
|
tPtr->usableWidth = tPtr->view->size.width - 2 * tPtr->offsetWidth;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *makeHiddenString(int length)
|
static char *makeHiddenString(int length)
|
||||||
@@ -846,8 +848,8 @@ static void paintTextField(TextField * tPtr)
|
|||||||
count = tPtr->viewPosition;
|
count = tPtr->viewPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
rx = tPtr->offsetWidth + 1 + WMWidthOfString(tPtr->font, text, count)
|
rx = tx + WMWidthOfString(tPtr->font, &(text[tPtr->viewPosition]),
|
||||||
- WMWidthOfString(tPtr->font, text, tPtr->viewPosition);
|
count - tPtr->viewPosition);
|
||||||
|
|
||||||
WMDrawImageString(screen, drawbuffer, color, screen->gray,
|
WMDrawImageString(screen, drawbuffer, color, screen->gray,
|
||||||
tPtr->font, rx, ty, &(text[count]), count2);
|
tPtr->font, rx, ty, &(text[count]), count2);
|
||||||
@@ -942,7 +944,7 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
{
|
{
|
||||||
char buffer[64];
|
char buffer[64];
|
||||||
KeySym ksym;
|
KeySym ksym;
|
||||||
char *textEvent = NULL;
|
const char *textEvent = NULL;
|
||||||
void *data = NULL;
|
void *data = NULL;
|
||||||
int count, refresh = 0;
|
int count, refresh = 0;
|
||||||
int control_pressed = 0;
|
int control_pressed = 0;
|
||||||
@@ -965,6 +967,7 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
switch (ksym) {
|
switch (ksym) {
|
||||||
case XK_Tab:
|
case XK_Tab:
|
||||||
#ifdef XK_ISO_Left_Tab
|
#ifdef XK_ISO_Left_Tab
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_ISO_Left_Tab:
|
case XK_ISO_Left_Tab:
|
||||||
#endif
|
#endif
|
||||||
if (!controled) {
|
if (!controled) {
|
||||||
@@ -1000,6 +1003,11 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
#ifdef XK_KP_Enter
|
||||||
|
/* FALLTHRU */
|
||||||
|
case XK_KP_Enter:
|
||||||
|
#endif
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_Return:
|
case XK_Return:
|
||||||
if (!modified) {
|
if (!modified) {
|
||||||
data = (void *)WMReturnTextMovement;
|
data = (void *)WMReturnTextMovement;
|
||||||
@@ -1016,12 +1024,13 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
controled = False;
|
controled = False;
|
||||||
|
|
||||||
#ifdef XK_KP_Left
|
#ifdef XK_KP_Left
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_KP_Left:
|
case XK_KP_Left:
|
||||||
#endif
|
#endif
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_Left:
|
case XK_Left:
|
||||||
if (tPtr->cursorPosition > 0) {
|
if (tPtr->cursorPosition > 0) {
|
||||||
int i;
|
int i;
|
||||||
paintCursor(tPtr);
|
|
||||||
|
|
||||||
i = tPtr->cursorPosition;
|
i = tPtr->cursorPosition;
|
||||||
i += oneUTF8CharBackward(&tPtr->text[i], i);
|
i += oneUTF8CharBackward(&tPtr->text[i], i);
|
||||||
@@ -1037,9 +1046,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
|
|
||||||
if (tPtr->cursorPosition < tPtr->viewPosition) {
|
if (tPtr->cursorPosition < tPtr->viewPosition) {
|
||||||
tPtr->viewPosition = tPtr->cursorPosition;
|
tPtr->viewPosition = tPtr->cursorPosition;
|
||||||
refresh = 1;
|
}
|
||||||
} else
|
refresh = 1;
|
||||||
paintCursor(tPtr);
|
|
||||||
}
|
}
|
||||||
if (shifted)
|
if (shifted)
|
||||||
cancelSelection = 0;
|
cancelSelection = 0;
|
||||||
@@ -1055,12 +1063,13 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
controled = False;
|
controled = False;
|
||||||
|
|
||||||
#ifdef XK_KP_Right
|
#ifdef XK_KP_Right
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_KP_Right:
|
case XK_KP_Right:
|
||||||
#endif
|
#endif
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_Right:
|
case XK_Right:
|
||||||
if (tPtr->cursorPosition < tPtr->textLen) {
|
if (tPtr->cursorPosition < tPtr->textLen) {
|
||||||
int i;
|
int i;
|
||||||
paintCursor(tPtr);
|
|
||||||
|
|
||||||
i = tPtr->cursorPosition;
|
i = tPtr->cursorPosition;
|
||||||
if (controled) {
|
if (controled) {
|
||||||
@@ -1073,10 +1082,8 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
}
|
}
|
||||||
tPtr->cursorPosition = i;
|
tPtr->cursorPosition = i;
|
||||||
|
|
||||||
refresh = incrToFit2(tPtr);
|
incrToFit2(tPtr);
|
||||||
|
refresh = 1;
|
||||||
if (!refresh)
|
|
||||||
paintCursor(tPtr);
|
|
||||||
}
|
}
|
||||||
if (shifted)
|
if (shifted)
|
||||||
cancelSelection = 0;
|
cancelSelection = 0;
|
||||||
@@ -1092,18 +1099,18 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
controled = False;
|
controled = False;
|
||||||
|
|
||||||
#ifdef XK_KP_Home
|
#ifdef XK_KP_Home
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_KP_Home:
|
case XK_KP_Home:
|
||||||
#endif
|
#endif
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_Home:
|
case XK_Home:
|
||||||
if (!controled) {
|
if (!controled) {
|
||||||
if (tPtr->cursorPosition > 0) {
|
if (tPtr->cursorPosition > 0) {
|
||||||
paintCursor(tPtr);
|
|
||||||
tPtr->cursorPosition = 0;
|
tPtr->cursorPosition = 0;
|
||||||
if (tPtr->viewPosition > 0) {
|
if (tPtr->viewPosition > 0) {
|
||||||
tPtr->viewPosition = 0;
|
tPtr->viewPosition = 0;
|
||||||
refresh = 1;
|
}
|
||||||
} else
|
refresh = 1;
|
||||||
paintCursor(tPtr);
|
|
||||||
}
|
}
|
||||||
if (shifted)
|
if (shifted)
|
||||||
cancelSelection = 0;
|
cancelSelection = 0;
|
||||||
@@ -1119,19 +1126,18 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
controled = False;
|
controled = False;
|
||||||
|
|
||||||
#ifdef XK_KP_End
|
#ifdef XK_KP_End
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_KP_End:
|
case XK_KP_End:
|
||||||
#endif
|
#endif
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_End:
|
case XK_End:
|
||||||
if (!controled) {
|
if (!controled) {
|
||||||
if (tPtr->cursorPosition < tPtr->textLen) {
|
if (tPtr->cursorPosition < tPtr->textLen) {
|
||||||
paintCursor(tPtr);
|
|
||||||
tPtr->cursorPosition = tPtr->textLen;
|
tPtr->cursorPosition = tPtr->textLen;
|
||||||
tPtr->viewPosition = 0;
|
tPtr->viewPosition = 0;
|
||||||
|
|
||||||
refresh = incrToFit(tPtr);
|
incrToFit(tPtr);
|
||||||
|
refresh = 1;
|
||||||
if (!refresh)
|
|
||||||
paintCursor(tPtr);
|
|
||||||
}
|
}
|
||||||
if (shifted)
|
if (shifted)
|
||||||
cancelSelection = 0;
|
cancelSelection = 0;
|
||||||
@@ -1146,6 +1152,7 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
else
|
else
|
||||||
modified = False;
|
modified = False;
|
||||||
|
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_BackSpace:
|
case XK_BackSpace:
|
||||||
if (!modified) {
|
if (!modified) {
|
||||||
if (tPtr->selection.count) {
|
if (tPtr->selection.count) {
|
||||||
@@ -1174,8 +1181,10 @@ static void handleTextFieldKeyPress(TextField * tPtr, XEvent * event)
|
|||||||
modified = False;
|
modified = False;
|
||||||
|
|
||||||
#ifdef XK_KP_Delete
|
#ifdef XK_KP_Delete
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_KP_Delete:
|
case XK_KP_Delete:
|
||||||
#endif
|
#endif
|
||||||
|
/* FALLTHRU */
|
||||||
case XK_Delete:
|
case XK_Delete:
|
||||||
if (!modified) {
|
if (!modified) {
|
||||||
if (tPtr->selection.count) {
|
if (tPtr->selection.count) {
|
||||||
@@ -1391,7 +1400,25 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
|||||||
tPtr->viewPosition);
|
tPtr->viewPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
if (tPtr->flags.alignment == WARight) {
|
||||||
|
int textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
|
||||||
|
if (textWidth < tPtr->usableWidth) {
|
||||||
|
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||||
|
event->xmotion.x - tPtr->usableWidth + textWidth);
|
||||||
|
} else {
|
||||||
|
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
||||||
|
}
|
||||||
|
} else if (tPtr->flags.alignment == WACenter) {
|
||||||
|
int textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
|
||||||
|
if (textWidth < tPtr->usableWidth) {
|
||||||
|
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||||
|
event->xmotion.x - (tPtr->usableWidth - textWidth) / 2);
|
||||||
|
} else {
|
||||||
|
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xmotion.x);
|
||||||
|
}
|
||||||
|
|
||||||
/* Do not allow text selection in secure textfields */
|
/* Do not allow text selection in secure textfields */
|
||||||
if (tPtr->flags.secure) {
|
if (tPtr->flags.secure) {
|
||||||
@@ -1424,17 +1451,35 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
|||||||
if (tPtr->flags.enabled && !tPtr->flags.focused) {
|
if (tPtr->flags.enabled && !tPtr->flags.focused) {
|
||||||
WMSetFocusToWidget(tPtr);
|
WMSetFocusToWidget(tPtr);
|
||||||
}
|
}
|
||||||
|
if (textWidth < tPtr->usableWidth) {
|
||||||
|
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||||
|
event->xbutton.x - tPtr->usableWidth
|
||||||
|
+ textWidth);
|
||||||
|
} else
|
||||||
|
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
|
||||||
|
|
||||||
if (tPtr->flags.focused) {
|
if (tPtr->flags.focused) {
|
||||||
tPtr->selection.position = tPtr->cursorPosition;
|
tPtr->selection.position = tPtr->cursorPosition;
|
||||||
tPtr->selection.count = 0;
|
tPtr->selection.count = 0;
|
||||||
}
|
}
|
||||||
|
paintTextField(tPtr);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case WACenter:
|
||||||
|
textWidth = WMWidthOfString(tPtr->font, tPtr->text, tPtr->textLen);
|
||||||
|
if (tPtr->flags.enabled && !tPtr->flags.focused) {
|
||||||
|
WMSetFocusToWidget(tPtr);
|
||||||
|
}
|
||||||
if (textWidth < tPtr->usableWidth) {
|
if (textWidth < tPtr->usableWidth) {
|
||||||
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
tPtr->cursorPosition = pointToCursorPosition(tPtr,
|
||||||
event->xbutton.x - tPtr->usableWidth
|
event->xbutton.x - (tPtr->usableWidth - textWidth) / 2);
|
||||||
+ textWidth);
|
} else {
|
||||||
} else
|
|
||||||
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
|
tPtr->cursorPosition = pointToCursorPosition(tPtr, event->xbutton.x);
|
||||||
|
}
|
||||||
|
if (tPtr->flags.focused) {
|
||||||
|
tPtr->selection.position = tPtr->cursorPosition;
|
||||||
|
tPtr->selection.count = 0;
|
||||||
|
}
|
||||||
paintTextField(tPtr);
|
paintTextField(tPtr);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -1448,29 +1493,31 @@ static void handleTextFieldActionEvents(XEvent * event, void *data)
|
|||||||
tPtr->selection.count = 0;
|
tPtr->selection.count = 0;
|
||||||
paintTextField(tPtr);
|
paintTextField(tPtr);
|
||||||
}
|
}
|
||||||
if (event->xbutton.button == Button2 && tPtr->flags.enabled) {
|
|
||||||
char *text;
|
|
||||||
int n;
|
|
||||||
|
|
||||||
if (!WMRequestSelection(tPtr->view, XA_PRIMARY, XA_STRING,
|
|
||||||
event->xbutton.time, pasteText, NULL)) {
|
|
||||||
text = XFetchBuffer(tPtr->view->screen->display, &n, 0);
|
|
||||||
|
|
||||||
if (text) {
|
|
||||||
text[n] = 0;
|
|
||||||
WMInsertTextFieldText(tPtr, text, tPtr->cursorPosition);
|
|
||||||
XFree(text);
|
|
||||||
NOTIFY(tPtr, didChange, WMTextDidChangeNotification,
|
|
||||||
(void *)WMInsertTextEvent);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
tPtr->flags.waitingSelection = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (event->xbutton.button == Button2 && tPtr->flags.enabled) {
|
||||||
|
char *text;
|
||||||
|
int n;
|
||||||
|
|
||||||
|
if (!WMRequestSelection(tPtr->view, XA_PRIMARY, XA_STRING,
|
||||||
|
event->xbutton.time, pasteText, NULL)) {
|
||||||
|
text = XFetchBuffer(tPtr->view->screen->display, &n, 0);
|
||||||
|
|
||||||
|
if (text) {
|
||||||
|
text[n] = 0;
|
||||||
|
WMInsertTextFieldText(tPtr, text, tPtr->cursorPosition);
|
||||||
|
XFree(text);
|
||||||
|
NOTIFY(tPtr, didChange, WMTextDidChangeNotification,
|
||||||
|
(void *)WMInsertTextEvent);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
tPtr->flags.waitingSelection = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
|
||||||
void WHandleEvents()
|
void WHandleEvents(void)
|
||||||
{
|
{
|
||||||
/* Check any expired timers */
|
/* Check any expired timers */
|
||||||
W_CheckTimerHandlers();
|
W_CheckTimerHandlers();
|
||||||
|
|||||||
+27
-4
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
/* the notifications about views */
|
/* the notifications about views */
|
||||||
|
|
||||||
char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
|
const char *WMViewSizeDidChangeNotification = "WMViewSizeDidChangeNotification";
|
||||||
char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
|
const char *WMViewFocusDidChangeNotification = "WMViewFocusDidChangeNotification";
|
||||||
char *WMViewRealizedNotification = "WMViewRealizedNotification";
|
const char *WMViewRealizedNotification = "WMViewRealizedNotification";
|
||||||
|
|
||||||
#define EVENT_MASK \
|
#define EVENT_MASK \
|
||||||
KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \
|
KeyPressMask|KeyReleaseMask|ButtonPressMask|ButtonReleaseMask| \
|
||||||
@@ -100,7 +100,8 @@ static W_View *createView(W_Screen * screen, W_View * parent)
|
|||||||
view->attribFlags = CWEventMask | CWBitGravity;
|
view->attribFlags = CWEventMask | CWBitGravity;
|
||||||
view->attribs = defAtts;
|
view->attribs = defAtts;
|
||||||
|
|
||||||
view->attribFlags |= CWBackPixel | CWColormap | CWBorderPixel;
|
view->attribFlags |= CWBackPixel | CWColormap | CWBorderPixel | CWBackPixmap;
|
||||||
|
view->attribs.background_pixmap = None;
|
||||||
view->attribs.background_pixel = W_PIXEL(screen->gray);
|
view->attribs.background_pixel = W_PIXEL(screen->gray);
|
||||||
view->attribs.border_pixel = W_PIXEL(screen->black);
|
view->attribs.border_pixel = W_PIXEL(screen->black);
|
||||||
view->attribs.colormap = screen->colormap;
|
view->attribs.colormap = screen->colormap;
|
||||||
@@ -188,6 +189,12 @@ void W_RealizeView(W_View * view)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!view->flags.realized) {
|
if (!view->flags.realized) {
|
||||||
|
|
||||||
|
if (view->parent == NULL) {
|
||||||
|
wwarning("trying to realize widget without parent");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
parentWID = view->parent->window;
|
parentWID = view->parent->window;
|
||||||
view->window = XCreateWindow(dpy, parentWID, view->pos.x, view->pos.y,
|
view->window = XCreateWindow(dpy, parentWID, view->pos.x, view->pos.y,
|
||||||
view->size.width, view->size.height, 0,
|
view->size.width, view->size.height, 0,
|
||||||
@@ -483,6 +490,7 @@ void W_SetViewBackgroundColor(W_View * view, WMColor * color)
|
|||||||
view->backColor = WMRetainColor(color);
|
view->backColor = WMRetainColor(color);
|
||||||
|
|
||||||
view->attribFlags |= CWBackPixel;
|
view->attribFlags |= CWBackPixel;
|
||||||
|
view->attribFlags &= ~CWBackPixmap;
|
||||||
view->attribs.background_pixel = W_PIXEL(color);
|
view->attribs.background_pixel = W_PIXEL(color);
|
||||||
if (view->flags.realized) {
|
if (view->flags.realized) {
|
||||||
XSetWindowBackground(view->screen->display, view->window, W_PIXEL(color));
|
XSetWindowBackground(view->screen->display, view->window, W_PIXEL(color));
|
||||||
@@ -490,6 +498,21 @@ void W_SetViewBackgroundColor(W_View * view, WMColor * color)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void W_SetViewBackgroundPixmap(W_View *view, WMPixmap *pix)
|
||||||
|
{
|
||||||
|
if (view->backImage)
|
||||||
|
WMReleasePixmap(view->backImage);
|
||||||
|
view->backImage = WMRetainPixmap(pix);
|
||||||
|
|
||||||
|
view->attribFlags |= CWBackPixmap;
|
||||||
|
view->attribFlags &= ~CWBackPixel;
|
||||||
|
view->attribs.background_pixmap = pix->pixmap;
|
||||||
|
if (view->flags.realized) {
|
||||||
|
XSetWindowBackgroundPixmap(view->screen->display, view->window, pix->pixmap);
|
||||||
|
XClearWindow(view->screen->display, view->window);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void W_SetViewCursor(W_View * view, Cursor cursor)
|
void W_SetViewCursor(W_View * view, Cursor cursor)
|
||||||
{
|
{
|
||||||
view->cursor = cursor;
|
view->cursor = cursor;
|
||||||
|
|||||||
+22
-37
@@ -1,8 +1,12 @@
|
|||||||
|
|
||||||
#include <X11/Xmd.h>
|
#include <X11/Xmd.h>
|
||||||
|
|
||||||
|
#include "wconfig.h"
|
||||||
|
|
||||||
#include "WINGsP.h"
|
#include "WINGsP.h"
|
||||||
|
|
||||||
|
#include "GNUstep.h"
|
||||||
|
|
||||||
#include <X11/Xatom.h>
|
#include <X11/Xatom.h>
|
||||||
|
|
||||||
typedef struct W_Window {
|
typedef struct W_Window {
|
||||||
@@ -46,32 +50,6 @@ typedef struct W_Window {
|
|||||||
} flags;
|
} flags;
|
||||||
} _Window;
|
} _Window;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
CARD32 flags;
|
|
||||||
CARD32 window_style;
|
|
||||||
CARD32 window_level;
|
|
||||||
CARD32 reserved;
|
|
||||||
Pixmap miniaturize_pixmap; /* pixmap for miniaturize button */
|
|
||||||
Pixmap close_pixmap; /* pixmap for close button */
|
|
||||||
Pixmap miniaturize_mask; /* miniaturize pixmap mask */
|
|
||||||
Pixmap close_mask; /* close pixmap mask */
|
|
||||||
CARD32 extra_flags;
|
|
||||||
} GNUstepWMAttributes;
|
|
||||||
|
|
||||||
#define GSWindowStyleAttr (1<<0)
|
|
||||||
#define GSWindowLevelAttr (1<<1)
|
|
||||||
#define GSMiniaturizePixmapAttr (1<<3)
|
|
||||||
#define GSClosePixmapAttr (1<<4)
|
|
||||||
#define GSMiniaturizeMaskAttr (1<<5)
|
|
||||||
#define GSCloseMaskAttr (1<<6)
|
|
||||||
#define GSExtraFlagsAttr (1<<7)
|
|
||||||
|
|
||||||
/* extra flags */
|
|
||||||
#define GSDocumentEditedFlag (1<<0)
|
|
||||||
#define GSNoApplicationIconFlag (1<<5)
|
|
||||||
|
|
||||||
#define WMFHideOtherApplications 10
|
|
||||||
#define WMFHideApplication 12
|
|
||||||
|
|
||||||
static void willResizeWindow(W_ViewDelegate *, WMView *, unsigned *, unsigned *);
|
static void willResizeWindow(W_ViewDelegate *, WMView *, unsigned *, unsigned *);
|
||||||
|
|
||||||
@@ -85,7 +63,6 @@ struct W_ViewDelegate _WindowViewDelegate = {
|
|||||||
|
|
||||||
#define DEFAULT_WIDTH 400
|
#define DEFAULT_WIDTH 400
|
||||||
#define DEFAULT_HEIGHT 180
|
#define DEFAULT_HEIGHT 180
|
||||||
#define DEFAULT_TITLE ""
|
|
||||||
|
|
||||||
static void destroyWindow(_Window * win);
|
static void destroyWindow(_Window * win);
|
||||||
|
|
||||||
@@ -180,7 +157,7 @@ static void setWindowTitle(WMWindow * win, const char *title)
|
|||||||
|
|
||||||
result = XmbTextListToTextProperty(scr->display, (char **)&title, 1, XStdICCTextStyle, &property);
|
result = XmbTextListToTextProperty(scr->display, (char **)&title, 1, XStdICCTextStyle, &property);
|
||||||
if (result == XNoMemory || result == XLocaleNotSupported) {
|
if (result == XNoMemory || result == XLocaleNotSupported) {
|
||||||
wwarning("window title conversion error... using STRING encoding");
|
wwarning(_("window title conversion error... using STRING encoding"));
|
||||||
XStoreName(scr->display, win->view->window, title);
|
XStoreName(scr->display, win->view->window, title);
|
||||||
} else {
|
} else {
|
||||||
XSetWMName(scr->display, win->view->window, &property);
|
XSetWMName(scr->display, win->view->window, &property);
|
||||||
@@ -201,7 +178,7 @@ static void setMiniwindowTitle(WMWindow * win, const char *title)
|
|||||||
|
|
||||||
result = XmbTextListToTextProperty(scr->display, (char **)&title, 1, XStdICCTextStyle, &property);
|
result = XmbTextListToTextProperty(scr->display, (char **)&title, 1, XStdICCTextStyle, &property);
|
||||||
if (result == XNoMemory || result == XLocaleNotSupported) {
|
if (result == XNoMemory || result == XLocaleNotSupported) {
|
||||||
wwarning("icon title conversion error..using STRING encoding");
|
wwarning(_("icon title conversion error... using STRING encoding"));
|
||||||
XSetIconName(scr->display, win->view->window, title);
|
XSetIconName(scr->display, win->view->window, title);
|
||||||
} else {
|
} else {
|
||||||
XSetWMIconName(scr->display, win->view->window, &property);
|
XSetWMIconName(scr->display, win->view->window, &property);
|
||||||
@@ -217,7 +194,7 @@ static void setMiniwindowTitle(WMWindow * win, const char *title)
|
|||||||
static void setMiniwindow(WMWindow *win, RImage *image)
|
static void setMiniwindow(WMWindow *win, RImage *image)
|
||||||
{
|
{
|
||||||
WMScreen *scr = win->view->screen;
|
WMScreen *scr = win->view->screen;
|
||||||
long *data;
|
unsigned long *data;
|
||||||
int x, y;
|
int x, y;
|
||||||
int o;
|
int o;
|
||||||
|
|
||||||
@@ -232,15 +209,19 @@ static void setMiniwindow(WMWindow *win, RImage *image)
|
|||||||
|
|
||||||
for (y = 0; y < image->height; y++) {
|
for (y = 0; y < image->height; y++) {
|
||||||
for (x = 0; x < image->width; x++) {
|
for (x = 0; x < image->width; x++) {
|
||||||
long pixel;
|
unsigned long pixel;
|
||||||
int offs = (x + y * image->width);
|
int offs = (x + y * image->width);
|
||||||
|
|
||||||
if (image->format == RRGBFormat)
|
if (image->format == RRGBFormat) {
|
||||||
pixel = image->data[offs * 3] << 16 | image->data[offs * 3 + 1] << 8
|
pixel = ((unsigned long) image->data[offs * 3 ]) << 16;
|
||||||
| image->data[offs * 3 + 2];
|
pixel |= ((unsigned long) image->data[offs * 3 + 1]) << 8;
|
||||||
else
|
pixel |= ((unsigned long) image->data[offs * 3 + 2]);
|
||||||
pixel = image->data[offs * 4] << 16 | image->data[offs * 4 + 1] << 8
|
} else {
|
||||||
| image->data[offs * 4 + 2] | image->data[offs * 4 + 3] << 24;
|
pixel = ((unsigned long) image->data[offs * 4 ]) << 16;
|
||||||
|
pixel |= ((unsigned long) image->data[offs * 4 + 1]) << 8;
|
||||||
|
pixel |= ((unsigned long) image->data[offs * 4 + 2]);
|
||||||
|
pixel |= ((unsigned long) image->data[offs * 4 + 3]) << 24;
|
||||||
|
}
|
||||||
|
|
||||||
data[o++] = pixel;
|
data[o++] = pixel;
|
||||||
}
|
}
|
||||||
@@ -414,7 +395,11 @@ static void setWindowMakerHints(WMWindow * win)
|
|||||||
|
|
||||||
memset(&attribs, 0, sizeof(GNUstepWMAttributes));
|
memset(&attribs, 0, sizeof(GNUstepWMAttributes));
|
||||||
attribs.flags = GSWindowStyleAttr | GSWindowLevelAttr | GSExtraFlagsAttr;
|
attribs.flags = GSWindowStyleAttr | GSWindowLevelAttr | GSExtraFlagsAttr;
|
||||||
|
|
||||||
|
if (win->minSize.width == win->maxSize.width && win->minSize.height == win->maxSize.height)
|
||||||
|
win->flags.style &= ~WMResizableWindowMask;
|
||||||
attribs.window_style = win->flags.style;
|
attribs.window_style = win->flags.style;
|
||||||
|
|
||||||
attribs.window_level = win->level;
|
attribs.window_level = win->level;
|
||||||
if (win->flags.documentEdited)
|
if (win->flags.documentEdited)
|
||||||
attribs.extra_flags = GSDocumentEditedFlag;
|
attribs.extra_flags = GSDocumentEditedFlag;
|
||||||
|
|||||||
+251
-213
@@ -28,9 +28,119 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include "TexturePanel.h"
|
#include "TexturePanel.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
const char *key;
|
||||||
|
const char *default_value;
|
||||||
|
const char *label;
|
||||||
|
WMRect preview; /* The rectangle where the corresponding object is displayed */
|
||||||
|
WMPoint hand; /* The coordinate where the hand is drawn when pointing this item */
|
||||||
|
} colorOptions[] = {
|
||||||
|
/* Related to Window titles */
|
||||||
|
{ "FTitleColor", "white", N_("Focused Window Title"),
|
||||||
|
{ { 30, 10 }, { 190, 20 } }, { 5, 10 } },
|
||||||
|
{ "UTitleColor", "black", N_("Unfocused Window Title"),
|
||||||
|
{ { 30, 40 }, { 190, 20 } }, { 5, 40 } },
|
||||||
|
{ "PTitleColor", "white", N_("Owner of Focused Window Title"),
|
||||||
|
{ { 30, 70 }, { 190, 20 } }, { 5, 70 } },
|
||||||
|
|
||||||
|
/* Related to Menus */
|
||||||
|
{ "MenuTitleColor", "white", N_("Menu Title") ,
|
||||||
|
{ { 30, 120 }, { 90, 20 } }, { 5, 120 } },
|
||||||
|
{ "MenuTextColor", "black", N_("Menu Item Text") ,
|
||||||
|
{ { 30, 140 }, { 90, 20 } }, { 5, 140 } },
|
||||||
|
{ "MenuDisabledColor", "#616161", N_("Disabled Menu Item Text") ,
|
||||||
|
{ { 30, 160 }, { 90, 20 } }, { 5, 160 } },
|
||||||
|
{ "HighlightColor", "white", N_("Menu Highlight Color") ,
|
||||||
|
{ { 30, 180 }, { 90, 20 } }, { 5, 180 } },
|
||||||
|
{ "HighlightTextColor", "black", N_("Highlighted Menu Text Color") ,
|
||||||
|
{ { 30, 200 }, { 90, 20 } }, { 5, 180 } },
|
||||||
|
/*
|
||||||
|
* yuck kluge: the coordinate for HighlightTextColor are actually those of the last "Normal item"
|
||||||
|
* at the bottom when user clicks it, the "yuck kluge" in the function 'previewClick' will swap it
|
||||||
|
* for the MenuTextColor selection as user would expect
|
||||||
|
*
|
||||||
|
* Note that the entries are reffered by their index for performance
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* Related to Window's border */
|
||||||
|
{ "FrameFocusedBorderColor", "black", N_("Focused Window Border Color") ,
|
||||||
|
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
|
||||||
|
{ "FrameBorderColor", "black", N_("Window Border Color") ,
|
||||||
|
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
|
||||||
|
{ "FrameSelectedBorderColor", "white", N_("Selected Window Border Color") ,
|
||||||
|
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
|
||||||
|
|
||||||
|
/* Related to Icons and Clip */
|
||||||
|
{ "IconTitleColor", "white", N_("Miniwindow Title") ,
|
||||||
|
{ { 155, 130 }, { 64, 64 } }, { 130, 132 } },
|
||||||
|
{ "IconTitleBack", "black", N_("Miniwindow Title Back") ,
|
||||||
|
{ { 155, 130 }, { 64, 64 } }, { 130, 132 } },
|
||||||
|
{ "ClipTitleColor", "black", N_("Clip Title") ,
|
||||||
|
{ { 155, 130 }, { 64, 64 } }, { 130, 132 } },
|
||||||
|
{ "CClipTitleColor", "#454045", N_("Collapsed Clip Title") ,
|
||||||
|
{ { 155, 130 }, { 64, 64 } }, { 130, 132 } }
|
||||||
|
};
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
typedef enum {
|
||||||
|
MSTYLE_NORMAL = 0,
|
||||||
|
MSTYLE_SINGLE = 1,
|
||||||
|
MSTYLE_FLAT = 2
|
||||||
|
} menu_style_index;
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
const char *db_value;
|
||||||
|
const char *file_name;
|
||||||
|
} menu_style[] = {
|
||||||
|
[MSTYLE_NORMAL] = { "normal", "msty1" },
|
||||||
|
[MSTYLE_SINGLE] = { "singletexture", "msty2" },
|
||||||
|
[MSTYLE_FLAT] = { "flat", "msty3" }
|
||||||
|
};
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
static const struct {
|
||||||
|
const char *label;
|
||||||
|
const char *db_value;
|
||||||
|
} wintitle_align[] = {
|
||||||
|
[WALeft] = { N_("Left"), "left" },
|
||||||
|
[WACenter] = { N_("Center"), "center" },
|
||||||
|
[WARight] = { N_("Right"), "right" }
|
||||||
|
};
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
static const char *const sample_colors[] = {
|
||||||
|
"black",
|
||||||
|
"#292929",
|
||||||
|
"#525252",
|
||||||
|
"#848484",
|
||||||
|
"#adadad",
|
||||||
|
"#d6d6d6",
|
||||||
|
"white",
|
||||||
|
"#d6d68c",
|
||||||
|
"#d6a57b",
|
||||||
|
"#8cd68c",
|
||||||
|
"#8cd6ce",
|
||||||
|
"#d68c8c",
|
||||||
|
"#8c9cd6",
|
||||||
|
"#bd86d6",
|
||||||
|
"#d68cbd",
|
||||||
|
"#d64a4a",
|
||||||
|
"#4a5ad6",
|
||||||
|
"#4ad6ce",
|
||||||
|
"#4ad65a",
|
||||||
|
"#ced64a",
|
||||||
|
"#d6844a",
|
||||||
|
"#8ad631",
|
||||||
|
"#ce29c6",
|
||||||
|
"#ce2973"
|
||||||
|
};
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMBox *box;
|
WMBox *box;
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
@@ -60,20 +170,20 @@ typedef struct _Panel {
|
|||||||
WMFrame *colF;
|
WMFrame *colF;
|
||||||
|
|
||||||
WMPopUpButton *colP;
|
WMPopUpButton *colP;
|
||||||
WMColor *colors[15];
|
WMColor *colors[wlengthof_nocheck(colorOptions)];
|
||||||
|
|
||||||
WMColorWell *colW;
|
WMColorWell *colW;
|
||||||
|
|
||||||
WMColorWell *sampW[24];
|
WMColorWell *sampW[wlengthof_nocheck(sample_colors)];
|
||||||
|
|
||||||
/* options */
|
/* options */
|
||||||
WMFrame *optF;
|
WMFrame *optF;
|
||||||
|
|
||||||
WMFrame *mstyF;
|
WMFrame *mstyF;
|
||||||
WMButton *mstyB[3];
|
WMButton *mstyB[wlengthof_nocheck(menu_style)];
|
||||||
|
|
||||||
WMFrame *taliF;
|
WMFrame *taliF;
|
||||||
WMButton *taliB[3];
|
WMButton *taliB[wlengthof_nocheck(wintitle_align)];
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
@@ -94,9 +204,9 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
char oldTabItem;
|
char oldTabItem;
|
||||||
|
|
||||||
int menuStyle;
|
menu_style_index menuStyle;
|
||||||
|
|
||||||
int titleAlignment;
|
WMAlignment titleAlignment;
|
||||||
|
|
||||||
Pixmap preview;
|
Pixmap preview;
|
||||||
Pixmap previewNoText;
|
Pixmap previewNoText;
|
||||||
@@ -151,10 +261,6 @@ static WMTabViewDelegate tabviewDelegate = {
|
|||||||
#define TEDIT_FILE "tedit"
|
#define TEDIT_FILE "tedit"
|
||||||
#define TEXTR_FILE "textr"
|
#define TEXTR_FILE "textr"
|
||||||
|
|
||||||
#define MSTYLE1_FILE "msty1"
|
|
||||||
#define MSTYLE2_FILE "msty2"
|
|
||||||
#define MSTYLE3_FILE "msty3"
|
|
||||||
|
|
||||||
/* XPM */
|
/* XPM */
|
||||||
static char *blueled_xpm[] = {
|
static char *blueled_xpm[] = {
|
||||||
"8 8 17 1",
|
"8 8 17 1",
|
||||||
@@ -263,34 +369,6 @@ static char *hand_xpm[] = {
|
|||||||
" "
|
" "
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *sampleColors[] = {
|
|
||||||
"black",
|
|
||||||
"#292929",
|
|
||||||
"#525252",
|
|
||||||
"#848484",
|
|
||||||
"#adadad",
|
|
||||||
"#d6d6d6",
|
|
||||||
"white",
|
|
||||||
"#d6d68c",
|
|
||||||
"#d6a57b",
|
|
||||||
"#8cd68c",
|
|
||||||
"#8cd6ce",
|
|
||||||
"#d68c8c",
|
|
||||||
"#8c9cd6",
|
|
||||||
"#bd86d6",
|
|
||||||
"#d68cbd",
|
|
||||||
"#d64a4a",
|
|
||||||
"#4a5ad6",
|
|
||||||
"#4ad6ce",
|
|
||||||
"#4ad65a",
|
|
||||||
"#ced64a",
|
|
||||||
"#d6844a",
|
|
||||||
"#8ad631",
|
|
||||||
"#ce29c6",
|
|
||||||
"#ce2973",
|
|
||||||
"black"
|
|
||||||
};
|
|
||||||
|
|
||||||
static const struct {
|
static const struct {
|
||||||
const char *key;
|
const char *key;
|
||||||
const char *default_value;
|
const char *default_value;
|
||||||
@@ -345,12 +423,6 @@ enum {
|
|||||||
TEXPREV_HEIGHT = 24
|
TEXPREV_HEIGHT = 24
|
||||||
};
|
};
|
||||||
|
|
||||||
enum {
|
|
||||||
MSTYLE_NORMAL,
|
|
||||||
MSTYLE_SINGLE,
|
|
||||||
MSTYLE_FLAT
|
|
||||||
};
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
FTITLE_COL,
|
FTITLE_COL,
|
||||||
UTITLE_COL,
|
UTITLE_COL,
|
||||||
@@ -369,70 +441,23 @@ enum {
|
|||||||
CCLIP_COL
|
CCLIP_COL
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct {
|
|
||||||
const char *key;
|
|
||||||
const char *default_value;
|
|
||||||
const char *label;
|
|
||||||
WMRect preview; /* The rectangle where the corresponding object is displayed */
|
|
||||||
WMPoint hand; /* The coordinate where the hand is drawn when pointing this item */
|
|
||||||
} colorOptions[] = {
|
|
||||||
/* Related to Window titles */
|
|
||||||
{ "FTitleColor", "white", N_("Focused Window Title"),
|
|
||||||
{ { 30, 10 }, { 190, 20 } }, { 5, 10 } },
|
|
||||||
{ "UTitleColor", "black", N_("Unfocused Window Title"),
|
|
||||||
{ { 30, 40 }, { 190, 20 } }, { 5, 40 } },
|
|
||||||
{ "PTitleColor", "white", N_("Owner of Focused Window Title"),
|
|
||||||
{ { 30, 70 }, { 190, 20 } }, { 5, 70 } },
|
|
||||||
|
|
||||||
/* Related to Menus */
|
|
||||||
{ "MenuTitleColor", "white", N_("Menu Title") ,
|
|
||||||
{ { 30, 120 }, { 90, 20 } }, { 5, 120 } },
|
|
||||||
{ "MenuTextColor", "black", N_("Menu Item Text") ,
|
|
||||||
{ { 30, 140 }, { 90, 20 } }, { 5, 140 } },
|
|
||||||
{ "MenuDisabledColor", "#616161", N_("Disabled Menu Item Text") ,
|
|
||||||
{ { 30, 160 }, { 90, 20 } }, { 5, 160 } },
|
|
||||||
{ "HighlightColor", "white", N_("Menu Highlight Color") ,
|
|
||||||
{ { 30, 180 }, { 90, 20 } }, { 5, 180 } },
|
|
||||||
{ "HighlightTextColor", "black", N_("Highlighted Menu Text Color") ,
|
|
||||||
{ { 30, 200 }, { 90, 20 } }, { 5, 180 } },
|
|
||||||
/*
|
|
||||||
* yuck kluge: the coordinate for HighlightTextColor are actually those of the last "Normal item"
|
|
||||||
* at the bottom when user clicks it, the "yuck kluge" in the function 'previewClick' will swap it
|
|
||||||
* for the MenuTextColor selection as user would expect
|
|
||||||
*
|
|
||||||
* Note that the entries are reffered by their index for performance
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Related to Window's border */
|
|
||||||
{ "FrameFocusedBorderColor", "black", N_("Focused Window Border Color") ,
|
|
||||||
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
|
|
||||||
{ "FrameBorderColor", "black", N_("Window Border Color") ,
|
|
||||||
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
|
|
||||||
{ "FrameSelectedBorderColor", "white", N_("Selected Window Border Color") ,
|
|
||||||
{ { 0, 0 }, { 0, 0 } }, { -22, -21 } },
|
|
||||||
|
|
||||||
/* Related to Icons and Clip */
|
|
||||||
{ "IconTitleColor", "white", N_("Miniwindow Title") ,
|
|
||||||
{ { 155, 130 }, { 64, 64 } }, { 130, 132 } },
|
|
||||||
{ "IconTitleBack", "black", N_("Miniwindow Title Back") ,
|
|
||||||
{ { 155, 130 }, { 64, 64 } }, { 130, 132 } },
|
|
||||||
{ "ClipTitleColor", "black", N_("Clip Title") ,
|
|
||||||
{ { 155, 130 }, { 64, 64 } }, { 130, 132 } },
|
|
||||||
{ "CClipTitleColor", "#454045", N_("Collapsed Clip Title") ,
|
|
||||||
{ { 155, 130 }, { 64, 64 } }, { 130, 132 } }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static void str2rcolor(RContext * rc, const char *name, RColor * color)
|
static void str2rcolor(RContext * rc, const char *name, RColor * color)
|
||||||
{
|
{
|
||||||
XColor xcolor;
|
XColor xcolor;
|
||||||
|
|
||||||
XParseColor(rc->dpy, rc->cmap, name, &xcolor);
|
if (XParseColor(rc->dpy, rc->cmap, name, &xcolor) != 0) {
|
||||||
|
color->alpha = 255;
|
||||||
color->alpha = 255;
|
color->red = xcolor.red >> 8;
|
||||||
color->red = xcolor.red >> 8;
|
color->green = xcolor.green >> 8;
|
||||||
color->green = xcolor.green >> 8;
|
color->blue = xcolor.blue >> 8;
|
||||||
color->blue = xcolor.blue >> 8;
|
} else {
|
||||||
|
/* Color Name was not found - Return white instead */
|
||||||
|
color->alpha = 255;
|
||||||
|
color->red = 255;
|
||||||
|
color->green = 255;
|
||||||
|
color->blue = 255;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dumpRImage(const char *path, RImage * image)
|
static void dumpRImage(const char *path, RImage * image)
|
||||||
@@ -540,10 +565,10 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
|||||||
if (path) {
|
if (path) {
|
||||||
timage = RLoadImage(rc, path, 0);
|
timage = RLoadImage(rc, path, 0);
|
||||||
if (!timage)
|
if (!timage)
|
||||||
wwarning("could not load file '%s': %s", path, RMessageForError(RErrorCode));
|
wwarning(_("could not load file '%s': %s"), path, RMessageForError(RErrorCode));
|
||||||
wfree(path);
|
wfree(path);
|
||||||
} else {
|
} else {
|
||||||
wwarning("could not find file '%s' for %s of texture", str, type);
|
wwarning(_("could not find file '%s' for texture type %s"), str, type);
|
||||||
timage = NULL;
|
timage = NULL;
|
||||||
}
|
}
|
||||||
if (!timage) {
|
if (!timage) {
|
||||||
@@ -591,7 +616,8 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
|||||||
style = RHorizontalGradient;
|
style = RHorizontalGradient;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wwarning("unknow direction in '%s', falling back to diagonal", type);
|
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
||||||
|
/* FALLTHRU */
|
||||||
case 'D':
|
case 'D':
|
||||||
style = RDiagonalGradient;
|
style = RDiagonalGradient;
|
||||||
break;
|
break;
|
||||||
@@ -617,7 +643,8 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
|||||||
style = RHorizontalGradient;
|
style = RHorizontalGradient;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wwarning("unknow direction in '%s', falling back to diagonal", type);
|
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
||||||
|
/* FALLTHRU */
|
||||||
case 'D':
|
case 'D':
|
||||||
style = RDiagonalGradient;
|
style = RDiagonalGradient;
|
||||||
break;
|
break;
|
||||||
@@ -651,7 +678,8 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
|||||||
style = RHorizontalGradient;
|
style = RHorizontalGradient;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wwarning("unknow direction in '%s', falling back to diagonal", type);
|
wwarning(_("unknown direction in '%s', falling back to diagonal"), type);
|
||||||
|
/* FALLTHRU */
|
||||||
case 'D':
|
case 'D':
|
||||||
style = RDiagonalGradient;
|
style = RDiagonalGradient;
|
||||||
break;
|
break;
|
||||||
@@ -698,7 +726,7 @@ static Pixmap renderTexture(WMScreen * scr, WMPropList * texture, int width, int
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wwarning("type '%s' in not a supported type for a texture", type);
|
wwarning(_("type '%s' is not a supported type for a texture"), type);
|
||||||
RReleaseImage(timage);
|
RReleaseImage(timage);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
@@ -1048,6 +1076,8 @@ static void deleteTexture(WMWidget * w, void *data)
|
|||||||
(void) w;
|
(void) w;
|
||||||
|
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
|
if (section < 0)
|
||||||
|
return;
|
||||||
row = WMGetListSelectedItemRow(panel->texLs);
|
row = WMGetListSelectedItemRow(panel->texLs);
|
||||||
item = WMGetListItem(panel->texLs, row);
|
item = WMGetListItem(panel->texLs, row);
|
||||||
titem = (TextureListItem *) item->clientData;
|
titem = (TextureListItem *) item->clientData;
|
||||||
@@ -1066,7 +1096,7 @@ static void deleteTexture(WMWidget * w, void *data)
|
|||||||
WMReleasePropList(titem->prop);
|
WMReleasePropList(titem->prop);
|
||||||
if (titem->path) {
|
if (titem->path) {
|
||||||
if (remove(titem->path) < 0 && errno != ENOENT) {
|
if (remove(titem->path) < 0 && errno != ENOENT) {
|
||||||
werror("could not remove file %s", titem->path);
|
werror(_("could not remove file %s"), titem->path);
|
||||||
}
|
}
|
||||||
wfree(titem->path);
|
wfree(titem->path);
|
||||||
}
|
}
|
||||||
@@ -1106,6 +1136,8 @@ static void changePage(WMWidget * w, void *data)
|
|||||||
|
|
||||||
if (w) {
|
if (w) {
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
|
if (section < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
WMSelectListItem(panel->texLs, panel->textureIndex[section]);
|
WMSelectListItem(panel->texLs, panel->textureIndex[section]);
|
||||||
|
|
||||||
@@ -1205,6 +1237,8 @@ static void textureDoubleClick(WMWidget * w, void *data)
|
|||||||
|
|
||||||
/* unselect old texture */
|
/* unselect old texture */
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
section = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
|
if (section < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, panel->textureIndex[section]);
|
item = WMGetListItem(panel->texLs, panel->textureIndex[section]);
|
||||||
titem = (TextureListItem *) item->clientData;
|
titem = (TextureListItem *) item->clientData;
|
||||||
@@ -1233,7 +1267,7 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) WMGetHangedData(lPtr);
|
_Panel *panel = (_Panel *) WMGetHangedData(lPtr);
|
||||||
WMScreen *scr = WMWidgetScreen(lPtr);
|
WMScreen *scr = WMWidgetScreen(lPtr);
|
||||||
int width, height, x, y;
|
int width, height, x, y, tmp;
|
||||||
Display *dpy = WMScreenDisplay(scr);
|
Display *dpy = WMScreenDisplay(scr);
|
||||||
WMColor *back = (state & WLDSSelected) ? WMWhiteColor(scr) : WMGrayColor(scr);
|
WMColor *back = (state & WLDSSelected) ? WMWhiteColor(scr) : WMGrayColor(scr);
|
||||||
WMListItem *item;
|
WMListItem *item;
|
||||||
@@ -1262,7 +1296,8 @@ static void paintListItem(WMList * lPtr, int index, Drawable d, char *text, int
|
|||||||
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
|
XCopyArea(dpy, titem->preview, d, WMColorGC(black), 0, 0,
|
||||||
TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5);
|
TEXPREV_WIDTH, TEXPREV_HEIGHT, x + 5, y + 5);
|
||||||
|
|
||||||
if ((1 << WMGetPopUpButtonSelectedItem(panel->secP)) & titem->selectedFor)
|
tmp = WMGetPopUpButtonSelectedItem(panel->secP);
|
||||||
|
if ((tmp >= 0) && ((1 << tmp) & titem->selectedFor))
|
||||||
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
WMDrawPixmap(panel->onLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
||||||
else if (titem->selectedFor)
|
else if (titem->selectedFor)
|
||||||
WMDrawPixmap(panel->offLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
WMDrawPixmap(panel->offLed, d, x + TEXPREV_WIDTH + 10, y + 6);
|
||||||
@@ -1291,10 +1326,22 @@ static Pixmap loadRImage(WMScreen * scr, const char *path)
|
|||||||
|
|
||||||
cnt = fscanf(f, "%02x%02x%1x", &w, &h, &d);
|
cnt = fscanf(f, "%02x%02x%1x", &w, &h, &d);
|
||||||
if (cnt != 3) {
|
if (cnt != 3) {
|
||||||
|
wwarning(_("could not read size of image from '%s', ignoring"), path);
|
||||||
|
fclose(f);
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
if (d < 3 || d > 4) {
|
||||||
|
wwarning(_("image \"%s\" has an invalid depth of %d, ignoring"), path, d);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
image = RCreateImage(w, h, d == 4);
|
image = RCreateImage(w, h, d == 4);
|
||||||
|
if (image == NULL) {
|
||||||
|
wwarning(_("could not create RImage for \"%s\": %s"),
|
||||||
|
path, RMessageForError(RErrorCode));
|
||||||
|
fclose(f);
|
||||||
|
return None;
|
||||||
|
}
|
||||||
read_size = w * h * d;
|
read_size = w * h * d;
|
||||||
if (fread(image->data, 1, read_size, f) == read_size)
|
if (fread(image->data, 1, read_size, f) == read_size)
|
||||||
RConvertImage(WMScreenRContext(scr), image, &pixmap);
|
RConvertImage(WMScreenRContext(scr), image, &pixmap);
|
||||||
@@ -1353,8 +1400,8 @@ static void fillColorList(_Panel * panel)
|
|||||||
|
|
||||||
list = WMGetUDObjectForKey(udb, "ColorList");
|
list = WMGetUDObjectForKey(udb, "ColorList");
|
||||||
if (!list) {
|
if (!list) {
|
||||||
for (i = 0; i < 24; i++) {
|
for (i = 0; i < wlengthof(sample_colors); i++) {
|
||||||
color = WMCreateNamedColor(scr, sampleColors[i], False);
|
color = WMCreateNamedColor(scr, sample_colors[i], False);
|
||||||
if (!color)
|
if (!color)
|
||||||
continue;
|
continue;
|
||||||
WMSetColorWellColor(panel->sampW[i], color);
|
WMSetColorWellColor(panel->sampW[i], color);
|
||||||
@@ -1363,7 +1410,7 @@ static void fillColorList(_Panel * panel)
|
|||||||
} else {
|
} else {
|
||||||
WMPropList *c;
|
WMPropList *c;
|
||||||
|
|
||||||
for (i = 0; i < WMIN(24, WMGetPropListItemCount(list)); i++) {
|
for (i = 0; i < WMIN(wlengthof(sample_colors), WMGetPropListItemCount(list)); i++) {
|
||||||
c = WMGetFromPLArray(list, i);
|
c = WMGetFromPLArray(list, i);
|
||||||
if (!c || !WMIsPLString(c))
|
if (!c || !WMIsPLString(c))
|
||||||
continue;
|
continue;
|
||||||
@@ -1385,6 +1432,10 @@ static void changeColorPage(WMWidget * w, void *data)
|
|||||||
WMScreen *scr = WMWidgetScreen(panel->box);
|
WMScreen *scr = WMWidgetScreen(panel->box);
|
||||||
RContext *rc = WMScreenRContext(scr);
|
RContext *rc = WMScreenRContext(scr);
|
||||||
|
|
||||||
|
section = WMGetPopUpButtonSelectedItem(panel->colP);
|
||||||
|
if (section < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
if (panel->preview) {
|
if (panel->preview) {
|
||||||
GC gc;
|
GC gc;
|
||||||
|
|
||||||
@@ -1396,7 +1447,6 @@ static void changeColorPage(WMWidget * w, void *data)
|
|||||||
colorOptions[panel->oldcsection].hand.y);
|
colorOptions[panel->oldcsection].hand.y);
|
||||||
}
|
}
|
||||||
if (w) {
|
if (w) {
|
||||||
section = WMGetPopUpButtonSelectedItem(panel->colP);
|
|
||||||
|
|
||||||
panel->oldcsection = section;
|
panel->oldcsection = section;
|
||||||
if (panel->preview)
|
if (panel->preview)
|
||||||
@@ -1593,7 +1643,9 @@ static void updateColorPreviewBox(_Panel * panel, int elements)
|
|||||||
panel->smallFont, 155, 130, 64, 13, WALeft,
|
panel->smallFont, 155, 130, 64, 13, WALeft,
|
||||||
_("Icon Text"));
|
_("Icon Text"));
|
||||||
|
|
||||||
}
|
WMReleaseColor(light);
|
||||||
|
WMReleaseColor(dim);
|
||||||
|
}
|
||||||
|
|
||||||
if (elements & (1 << CLIP_COL) || elements & (1 << CCLIP_COL)) {
|
if (elements & (1 << CLIP_COL) || elements & (1 << CCLIP_COL)) {
|
||||||
Pixmap pix;
|
Pixmap pix;
|
||||||
@@ -1695,6 +1747,8 @@ static void colorWellObserver(void *self, WMNotification * n)
|
|||||||
(void) n;
|
(void) n;
|
||||||
|
|
||||||
p = WMGetPopUpButtonSelectedItem(panel->colP);
|
p = WMGetPopUpButtonSelectedItem(panel->colP);
|
||||||
|
if (p < 0)
|
||||||
|
return;
|
||||||
|
|
||||||
WMReleaseColor(panel->colors[p]);
|
WMReleaseColor(panel->colors[p]);
|
||||||
|
|
||||||
@@ -1749,37 +1803,31 @@ static void changedTabItem(struct WMTabViewDelegate *self, WMTabView * tabView,
|
|||||||
static void menuStyleCallback(WMWidget * self, void *data)
|
static void menuStyleCallback(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) data;
|
_Panel *panel = (_Panel *) data;
|
||||||
|
menu_style_index i;
|
||||||
|
|
||||||
if (self == panel->mstyB[0]) {
|
for (i = 0; i < wlengthof(menu_style); i++) {
|
||||||
panel->menuStyle = MSTYLE_NORMAL;
|
if (self == panel->mstyB[i]) {
|
||||||
updatePreviewBox(panel, 1 << PMITEM);
|
panel->menuStyle = i;
|
||||||
|
break;
|
||||||
} else if (self == panel->mstyB[1]) {
|
}
|
||||||
panel->menuStyle = MSTYLE_SINGLE;
|
|
||||||
updatePreviewBox(panel, 1 << PMITEM);
|
|
||||||
|
|
||||||
} else if (self == panel->mstyB[2]) {
|
|
||||||
panel->menuStyle = MSTYLE_FLAT;
|
|
||||||
updatePreviewBox(panel, 1 << PMITEM);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updatePreviewBox(panel, 1 << PMITEM);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void titleAlignCallback(WMWidget * self, void *data)
|
static void titleAlignCallback(WMWidget * self, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) data;
|
_Panel *panel = (_Panel *) data;
|
||||||
|
WMAlignment align;
|
||||||
|
|
||||||
if (self == panel->taliB[0]) {
|
for (align = 0; align < wlengthof(wintitle_align); align++) {
|
||||||
panel->titleAlignment = WALeft;
|
if (self == panel->taliB[align]) {
|
||||||
updatePreviewBox(panel, 1 << PFOCUSED | 1 << PUNFOCUSED | 1 << POWNER);
|
panel->titleAlignment = align;
|
||||||
|
break;
|
||||||
} else if (self == panel->taliB[1]) {
|
}
|
||||||
panel->titleAlignment = WACenter;
|
|
||||||
updatePreviewBox(panel, 1 << PFOCUSED | 1 << PUNFOCUSED | 1 << POWNER);
|
|
||||||
|
|
||||||
} else if (self == panel->taliB[2]) {
|
|
||||||
panel->titleAlignment = WARight;
|
|
||||||
updatePreviewBox(panel, 1 << PFOCUSED | 1 << PUNFOCUSED | 1 << POWNER);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updatePreviewBox(panel, 1 << PFOCUSED | 1 << PUNFOCUSED | 1 << POWNER);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createPanel(Panel * p)
|
static void createPanel(Panel * p)
|
||||||
@@ -1792,10 +1840,10 @@ static void createPanel(Panel * p)
|
|||||||
char *tmp;
|
char *tmp;
|
||||||
Bool ok = True;
|
Bool ok = True;
|
||||||
|
|
||||||
panel->fprefix = wstrconcat(wusergnusteppath(), "/Library/WindowMaker");
|
panel->fprefix = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME);
|
||||||
|
|
||||||
if (access(panel->fprefix, F_OK) != 0) {
|
if (access(panel->fprefix, F_OK) != 0) {
|
||||||
if (mkdir(panel->fprefix, 0755) < 0) {
|
if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
|
||||||
werror("%s", panel->fprefix);
|
werror("%s", panel->fprefix);
|
||||||
ok = False;
|
ok = False;
|
||||||
}
|
}
|
||||||
@@ -1805,7 +1853,7 @@ static void createPanel(Panel * p)
|
|||||||
wfree(panel->fprefix);
|
wfree(panel->fprefix);
|
||||||
panel->fprefix = tmp;
|
panel->fprefix = tmp;
|
||||||
if (access(panel->fprefix, F_OK) != 0) {
|
if (access(panel->fprefix, F_OK) != 0) {
|
||||||
if (mkdir(panel->fprefix, 0755) < 0) {
|
if (-1 == mkdir(panel->fprefix, 0755) && errno != EEXIST) {
|
||||||
werror("%s", panel->fprefix);
|
werror("%s", panel->fprefix);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1952,13 +2000,31 @@ static void createPanel(Panel * p)
|
|||||||
WMMoveWidget(panel->colW, 30, 75);
|
WMMoveWidget(panel->colW, 30, 75);
|
||||||
WMAddNotificationObserver(colorWellObserver, panel, WMColorWellDidChangeNotification, panel->colW);
|
WMAddNotificationObserver(colorWellObserver, panel, WMColorWellDidChangeNotification, panel->colW);
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
{ /* Distribute the color samples regularly in the right half */
|
||||||
int j;
|
const int parent_width = 242;
|
||||||
for (j = 0; j < 6; j++) {
|
const int parent_height = 195;
|
||||||
panel->sampW[i + j * 4] = WMCreateColorWell(panel->colF);
|
const int available_width = (parent_width / 2) - 7;
|
||||||
WMResizeWidget(panel->sampW[i + j * 4], 22, 22);
|
const int available_height = parent_height - 7 - 20 - 7 - 7;
|
||||||
WMMoveWidget(panel->sampW[i + j * 4], 130 + i * 22, 40 + j * 22);
|
const int widget_size = 22;
|
||||||
WSetColorWellBordered(panel->sampW[i + j * 4], False);
|
|
||||||
|
const int nb_x = (int) round(sqrt(wlengthof(sample_colors) * available_width / available_height));
|
||||||
|
const int nb_y = (wlengthof(sample_colors) + nb_x - 1) / nb_x;
|
||||||
|
|
||||||
|
const int offset_x = (parent_width / 2) + (available_width - nb_x * widget_size) / 2;
|
||||||
|
const int offset_y = (7 + 20 + 7) + (available_height - nb_y * widget_size) / 2;
|
||||||
|
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
x = 0; y = 0;
|
||||||
|
for (i = 0; i < wlengthof(sample_colors); i++) {
|
||||||
|
panel->sampW[i] = WMCreateColorWell(panel->colF);
|
||||||
|
WMResizeWidget(panel->sampW[i], widget_size, widget_size);
|
||||||
|
WMMoveWidget(panel->sampW[i], offset_x + x * widget_size, offset_y + y * widget_size);
|
||||||
|
WSetColorWellBordered(panel->sampW[i], False);
|
||||||
|
if (++x >= nb_x) {
|
||||||
|
y++;
|
||||||
|
x = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1979,7 +2045,7 @@ static void createPanel(Panel * p)
|
|||||||
WMMoveWidget(panel->mstyF, 15, 10);
|
WMMoveWidget(panel->mstyF, 15, 10);
|
||||||
WMSetFrameTitle(panel->mstyF, _("Menu Style"));
|
WMSetFrameTitle(panel->mstyF, _("Menu Style"));
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < wlengthof(menu_style); i++) {
|
||||||
WMPixmap *icon;
|
WMPixmap *icon;
|
||||||
char *path;
|
char *path;
|
||||||
|
|
||||||
@@ -1988,17 +2054,7 @@ static void createPanel(Panel * p)
|
|||||||
WMMoveWidget(panel->mstyB[i], 15 + i * 65, 20);
|
WMMoveWidget(panel->mstyB[i], 15 + i * 65, 20);
|
||||||
WMSetButtonImagePosition(panel->mstyB[i], WIPImageOnly);
|
WMSetButtonImagePosition(panel->mstyB[i], WIPImageOnly);
|
||||||
WMSetButtonAction(panel->mstyB[i], menuStyleCallback, panel);
|
WMSetButtonAction(panel->mstyB[i], menuStyleCallback, panel);
|
||||||
switch (i) {
|
path = LocateImage(menu_style[i].file_name);
|
||||||
case 0:
|
|
||||||
path = LocateImage(MSTYLE1_FILE);
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
path = LocateImage(MSTYLE2_FILE);
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
path = LocateImage(MSTYLE3_FILE);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (path) {
|
if (path) {
|
||||||
icon = WMCreatePixmapFromFile(scr, path);
|
icon = WMCreatePixmapFromFile(scr, path);
|
||||||
if (icon) {
|
if (icon) {
|
||||||
@@ -2020,20 +2076,10 @@ static void createPanel(Panel * p)
|
|||||||
WMMoveWidget(panel->taliF, 15, 100);
|
WMMoveWidget(panel->taliF, 15, 100);
|
||||||
WMSetFrameTitle(panel->taliF, _("Title Alignment"));
|
WMSetFrameTitle(panel->taliF, _("Title Alignment"));
|
||||||
|
|
||||||
for (i = 0; i < 3; i++) {
|
for (i = 0; i < wlengthof(wintitle_align); i++) {
|
||||||
panel->taliB[i] = WMCreateRadioButton(panel->taliF);
|
panel->taliB[i] = WMCreateRadioButton(panel->taliF);
|
||||||
WMSetButtonAction(panel->taliB[i], titleAlignCallback, panel);
|
WMSetButtonAction(panel->taliB[i], titleAlignCallback, panel);
|
||||||
switch (i) {
|
WMSetButtonText(panel->taliB[i], _(wintitle_align[i].label));
|
||||||
case 0:
|
|
||||||
WMSetButtonText(panel->taliB[i], _("Left"));
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
WMSetButtonText(panel->taliB[i], _("Center"));
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
WMSetButtonText(panel->taliB[i], _("Right"));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
WMResizeWidget(panel->taliB[i], 90, 18);
|
WMResizeWidget(panel->taliB[i], 90, 18);
|
||||||
WMMoveWidget(panel->taliB[i], 10, 15 + 20 * i);
|
WMMoveWidget(panel->taliB[i], 10, 15 + 20 * i);
|
||||||
}
|
}
|
||||||
@@ -2093,21 +2139,27 @@ static void showData(_Panel * panel)
|
|||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
str = GetStringForKey("MenuStyle");
|
str = GetStringForKey("MenuStyle");
|
||||||
if (str && strcasecmp(str, "flat") == 0) {
|
panel->menuStyle = MSTYLE_NORMAL;
|
||||||
panel->menuStyle = MSTYLE_FLAT;
|
if (str != NULL) {
|
||||||
} else if (str && strcasecmp(str, "singletexture") == 0) {
|
for (i = 0; i < wlengthof(menu_style); i++) {
|
||||||
panel->menuStyle = MSTYLE_SINGLE;
|
if (strcasecmp(str, menu_style[i].db_value) == 0) {
|
||||||
} else {
|
panel->menuStyle = i;
|
||||||
panel->menuStyle = MSTYLE_NORMAL;
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
str = GetStringForKey("TitleJustify");
|
str = GetStringForKey("TitleJustify");
|
||||||
if (str && strcasecmp(str, "left") == 0) {
|
panel->titleAlignment = WACenter;
|
||||||
panel->titleAlignment = WALeft;
|
if (str != NULL) {
|
||||||
} else if (str && strcasecmp(str, "right") == 0) {
|
WMAlignment align;
|
||||||
panel->titleAlignment = WARight;
|
|
||||||
} else {
|
for (align = 0; align < wlengthof(wintitle_align); align++) {
|
||||||
panel->titleAlignment = WACenter;
|
if (strcasecmp(str, wintitle_align[align].db_value) == 0) {
|
||||||
|
panel->titleAlignment = align;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < wlengthof(colorOptions); i++) {
|
for (i = 0; i < wlengthof(colorOptions); i++) {
|
||||||
@@ -2159,30 +2211,8 @@ static void storeData(_Panel * panel)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (panel->menuStyle) {
|
SetStringForKey(menu_style[panel->menuStyle].db_value, "MenuStyle");
|
||||||
case MSTYLE_SINGLE:
|
SetStringForKey(wintitle_align[panel->titleAlignment].db_value, "TitleJustify");
|
||||||
SetStringForKey("singletexture", "MenuStyle");
|
|
||||||
break;
|
|
||||||
case MSTYLE_FLAT:
|
|
||||||
SetStringForKey("flat", "MenuStyle");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
case MSTYLE_NORMAL:
|
|
||||||
SetStringForKey("normal", "MenuStyle");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
switch (panel->titleAlignment) {
|
|
||||||
case WALeft:
|
|
||||||
SetStringForKey("left", "TitleJustify");
|
|
||||||
break;
|
|
||||||
case WARight:
|
|
||||||
SetStringForKey("right", "TitleJustify");
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
case WACenter:
|
|
||||||
SetStringForKey("center", "TitleJustify");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prepareForClose(_Panel * panel)
|
static void prepareForClose(_Panel * panel)
|
||||||
@@ -2198,11 +2228,16 @@ static void prepareForClose(_Panel * panel)
|
|||||||
|
|
||||||
/* store list of textures */
|
/* store list of textures */
|
||||||
for (i = 8; i < WMGetListNumberOfRows(panel->texLs); i++) {
|
for (i = 8; i < WMGetListNumberOfRows(panel->texLs); i++) {
|
||||||
|
WMPropList *pl_title, *pl_path;
|
||||||
|
|
||||||
item = WMGetListItem(panel->texLs, i);
|
item = WMGetListItem(panel->texLs, i);
|
||||||
titem = (TextureListItem *) item->clientData;
|
titem = (TextureListItem *) item->clientData;
|
||||||
|
|
||||||
texture = WMCreatePLArray(WMCreatePLString(titem->title),
|
pl_title = WMCreatePLString(titem->title);
|
||||||
WMRetainPropList(titem->prop), WMCreatePLString(titem->path), NULL);
|
pl_path = WMCreatePLString(titem->path);
|
||||||
|
texture = WMCreatePLArray(pl_title, titem->prop, pl_path, NULL);
|
||||||
|
WMReleasePropList(pl_title);
|
||||||
|
WMReleasePropList(pl_path);
|
||||||
|
|
||||||
WMAddToPLArray(textureList, texture);
|
WMAddToPLArray(textureList, texture);
|
||||||
}
|
}
|
||||||
@@ -2212,14 +2247,17 @@ static void prepareForClose(_Panel * panel)
|
|||||||
|
|
||||||
/* store list of colors */
|
/* store list of colors */
|
||||||
textureList = WMCreatePLArray(NULL, NULL);
|
textureList = WMCreatePLArray(NULL, NULL);
|
||||||
for (i = 0; i < 24; i++) {
|
for (i = 0; i < wlengthof(sample_colors); i++) {
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
char *str;
|
char *str;
|
||||||
|
WMPropList *pl_color;
|
||||||
|
|
||||||
color = WMGetColorWellColor(panel->sampW[i]);
|
color = WMGetColorWellColor(panel->sampW[i]);
|
||||||
|
|
||||||
str = WMGetColorRGBDescription(color);
|
str = WMGetColorRGBDescription(color);
|
||||||
WMAddToPLArray(textureList, WMCreatePLString(str));
|
pl_color = WMCreatePLString(str);
|
||||||
|
WMAddToPLArray(textureList, pl_color);
|
||||||
|
WMReleasePropList(pl_color);
|
||||||
wfree(str);
|
wfree(str);
|
||||||
}
|
}
|
||||||
WMSetUDObjectForKey(udb, textureList, "ColorList");
|
WMSetUDObjectForKey(udb, textureList, "ColorList");
|
||||||
|
|||||||
+61
-70
@@ -21,6 +21,37 @@
|
|||||||
|
|
||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const char *const clip_delay_frame_titles[] = {
|
||||||
|
N_("Clip autocollapsing delays"),
|
||||||
|
N_("Clip autoraising delays")
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
const char *key;
|
||||||
|
const char *string;
|
||||||
|
} auto_delay[] = {
|
||||||
|
{ "ClipAutoexpandDelay", N_("Before auto-expansion") },
|
||||||
|
{ "ClipAutocollapseDelay", N_("Before auto-collapsing") },
|
||||||
|
{ "ClipAutoraiseDelay", N_("Before auto-raising") },
|
||||||
|
{ "ClipAutolowerDelay", N_("Before auto-lowering") }
|
||||||
|
};
|
||||||
|
|
||||||
|
static char *autoDelayPresetValues[5] = { "0", "100", "250", "600", "1000" };
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
const char *disable_key;
|
||||||
|
const char *icon_file;
|
||||||
|
const char *balloon_text;
|
||||||
|
} dock_config[] = {
|
||||||
|
{ "DisableDock", "dock",
|
||||||
|
N_("Disable/enable the application Dock (the\nvertical icon bar in the side of the screen).") },
|
||||||
|
{ "DisableClip", "clip",
|
||||||
|
N_("Disable/enable the Clip (that thing with\na paper clip icon).") },
|
||||||
|
{ "DisableDrawers", "drawer",
|
||||||
|
N_("Disable/enable Drawers (a dock that stores\napplication icons horizontally). The dock is required.") }
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMBox *box;
|
WMBox *box;
|
||||||
|
|
||||||
@@ -32,14 +63,14 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
WMWidget *parent;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMFrame *autoDelayF[2];
|
WMFrame *autoDelayF[wlengthof_nocheck(clip_delay_frame_titles)];
|
||||||
WMLabel *autoDelayL[4];
|
WMLabel *autoDelayL[wlengthof_nocheck(auto_delay)];
|
||||||
WMButton *autoDelayB[4][5];
|
WMButton *autoDelayB[wlengthof_nocheck(auto_delay)][wlengthof_nocheck(autoDelayPresetValues)];
|
||||||
WMTextField *autoDelayT[4];
|
WMTextField *autoDelayT[wlengthof_nocheck(auto_delay)];
|
||||||
WMLabel *autoDelayMsL[4];
|
WMLabel *autoDelayMsL[wlengthof_nocheck(auto_delay)];
|
||||||
|
|
||||||
WMFrame *dockF;
|
WMFrame *dockF;
|
||||||
WMButton *docksB[3];
|
WMButton *docksB[wlengthof_nocheck(dock_config)];
|
||||||
} _Panel;
|
} _Panel;
|
||||||
|
|
||||||
#define ICON_FILE "dockclipdrawersection"
|
#define ICON_FILE "dockclipdrawersection"
|
||||||
@@ -48,28 +79,6 @@ typedef struct _Panel {
|
|||||||
#define DELAY_ICON "timer%i"
|
#define DELAY_ICON "timer%i"
|
||||||
#define DELAY_ICON_S "timer%is"
|
#define DELAY_ICON_S "timer%is"
|
||||||
|
|
||||||
static const struct {
|
|
||||||
const char *key;
|
|
||||||
const char *string;
|
|
||||||
} auto_delay[] = {
|
|
||||||
{ "ClipAutoexpandDelay", N_("Before auto-expansion") },
|
|
||||||
{ "ClipAutocollapseDelay", N_("Before auto-collapsing") },
|
|
||||||
{ "ClipAutoraiseDelay", N_("Before auto-raise") },
|
|
||||||
{ "ClipAutolowerDelay", N_("Before auto-lowering") }
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
static char *autoDelayPresetValues[5] = { "0", "100", "250", "600", "1000" };
|
|
||||||
|
|
||||||
static const struct {
|
|
||||||
const char *disable_key;
|
|
||||||
const char *icon_file;
|
|
||||||
} dock_config[] = {
|
|
||||||
{ "DisableDock", "dock" },
|
|
||||||
{ "DisableClip", "clip" },
|
|
||||||
{ "DisableDrawers", "drawer" }
|
|
||||||
};
|
|
||||||
|
|
||||||
static void showData(_Panel *panel);
|
static void showData(_Panel *panel);
|
||||||
static void storeData(_Panel *panel);
|
static void storeData(_Panel *panel);
|
||||||
|
|
||||||
@@ -78,9 +87,9 @@ static void pushAutoDelayButton(WMWidget *w, void *data)
|
|||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) data;
|
_Panel *panel = (_Panel *) data;
|
||||||
int i, j;
|
int i, j;
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < wlengthof(auto_delay); i++)
|
||||||
{
|
{
|
||||||
for (j = 0; j < 5; j++)
|
for (j = 0; j < wlengthof(autoDelayPresetValues); j++)
|
||||||
{
|
{
|
||||||
if (w == panel->autoDelayB[i][j])
|
if (w == panel->autoDelayB[i][j])
|
||||||
{
|
{
|
||||||
@@ -98,7 +107,7 @@ static void adjustButtonSelectionBasedOnValue(_Panel *panel, int row, const char
|
|||||||
if (!value)
|
if (!value)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (j = 0; j < 5; j++)
|
for (j = 0; j < wlengthof(autoDelayPresetValues); j++)
|
||||||
{
|
{
|
||||||
int isThatOne = !strcmp(autoDelayPresetValues[j], value);
|
int isThatOne = !strcmp(autoDelayPresetValues[j], value);
|
||||||
WMSetButtonSelected(panel->autoDelayB[row][j], isThatOne);
|
WMSetButtonSelected(panel->autoDelayB[row][j], isThatOne);
|
||||||
@@ -112,7 +121,7 @@ static void autoDelayChanged(void *observerData, WMNotification *notification)
|
|||||||
_Panel *panel = (_Panel *) observerData;
|
_Panel *panel = (_Panel *) observerData;
|
||||||
int row;
|
int row;
|
||||||
WMTextField *anAutoDelayT = (WMTextField *) WMGetNotificationObject(notification);
|
WMTextField *anAutoDelayT = (WMTextField *) WMGetNotificationObject(notification);
|
||||||
for (row = 0; row < 4; row++)
|
for (row = 0; row < wlengthof(panel->autoDelayT); row++)
|
||||||
{
|
{
|
||||||
if (anAutoDelayT != panel->autoDelayT[row])
|
if (anAutoDelayT != panel->autoDelayT[row])
|
||||||
{
|
{
|
||||||
@@ -170,29 +179,25 @@ static void createPanel(Panel *p)
|
|||||||
buf1 = wmalloc(strlen(DELAY_ICON) + 1);
|
buf1 = wmalloc(strlen(DELAY_ICON) + 1);
|
||||||
buf2 = wmalloc(strlen(DELAY_ICON_S) + 1);
|
buf2 = wmalloc(strlen(DELAY_ICON_S) + 1);
|
||||||
|
|
||||||
for (k = 0; k < 2; k++)
|
for (k = 0; k < wlengthof(clip_delay_frame_titles); k++)
|
||||||
{
|
{
|
||||||
panel->autoDelayF[k] = WMCreateFrame(panel->box);
|
panel->autoDelayF[k] = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->autoDelayF[k], 370, 100);
|
WMResizeWidget(panel->autoDelayF[k], 372, 100);
|
||||||
WMMoveWidget(panel->autoDelayF[k], 15, 10 + k * 110);
|
WMMoveWidget(panel->autoDelayF[k], 11, 10 + k * 110);
|
||||||
if (k == 0)
|
WMSetFrameTitle(panel->autoDelayF[k], _(clip_delay_frame_titles[k]));
|
||||||
WMSetFrameTitle(panel->autoDelayF[k], _("Clip autocollapsing delays"));
|
|
||||||
else
|
|
||||||
WMSetFrameTitle(panel->autoDelayF[k], _("Clip autoraising delays"));
|
|
||||||
|
|
||||||
for (i = 0; i < 2; i++)
|
for (i = 0; i < 2; i++)
|
||||||
{
|
{
|
||||||
panel->autoDelayL[i + k * 2] = WMCreateLabel(panel->autoDelayF[k]);
|
panel->autoDelayL[i + k * 2] = WMCreateLabel(panel->autoDelayF[k]);
|
||||||
WMResizeWidget(panel->autoDelayL[i + k * 2], 155, 20);
|
WMResizeWidget(panel->autoDelayL[i + k * 2], 152, 20);
|
||||||
WMMoveWidget(panel->autoDelayL[i + k * 2], 10, 27 + 40 * i);
|
WMMoveWidget(panel->autoDelayL[i + k * 2], 8, 27 + 40 * i);
|
||||||
WMSetLabelText(panel->autoDelayL[i + k * 2], _(auto_delay[i + k * 2].string));
|
WMSetLabelText(panel->autoDelayL[i + k * 2], _(auto_delay[i + k * 2].string));
|
||||||
/* WMSetLabelTextAlignment(panel->autoDelayL[i + k * 2], WARight); */
|
|
||||||
|
|
||||||
for (j = 0; j < 5; j++)
|
for (j = 0; j < wlengthof(autoDelayPresetValues); j++)
|
||||||
{
|
{
|
||||||
panel->autoDelayB[i + k * 2][j] = WMCreateCustomButton(panel->autoDelayF[k], WBBStateChangeMask);
|
panel->autoDelayB[i + k * 2][j] = WMCreateCustomButton(panel->autoDelayF[k], WBBStateChangeMask);
|
||||||
WMResizeWidget(panel->autoDelayB[i + k * 2][j], 25, 25);
|
WMResizeWidget(panel->autoDelayB[i + k * 2][j], 25, 25);
|
||||||
WMMoveWidget(panel->autoDelayB[i + k * 2][j], 145 + (28 * j), 25 + 40 * i);
|
WMMoveWidget(panel->autoDelayB[i + k * 2][j], 160 + (26 * j), 25 + 40 * i);
|
||||||
WMSetButtonBordered(panel->autoDelayB[i + k * 2][j], False);
|
WMSetButtonBordered(panel->autoDelayB[i + k * 2][j], False);
|
||||||
WMSetButtonImagePosition(panel->autoDelayB[i + k * 2][j], WIPImageOnly);
|
WMSetButtonImagePosition(panel->autoDelayB[i + k * 2][j], WIPImageOnly);
|
||||||
WMSetButtonAction(panel->autoDelayB[i + k * 2][j], pushAutoDelayButton, panel);
|
WMSetButtonAction(panel->autoDelayB[i + k * 2][j], pushAutoDelayButton, panel);
|
||||||
@@ -217,16 +222,16 @@ static void createPanel(Panel *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
panel->autoDelayT[i + k * 2] = WMCreateTextField(panel->autoDelayF[k]);
|
panel->autoDelayT[i + k * 2] = WMCreateTextField(panel->autoDelayF[k]);
|
||||||
WMResizeWidget(panel->autoDelayT[i + k * 2], 36, 20);
|
WMResizeWidget(panel->autoDelayT[i + k * 2], 41, 20);
|
||||||
WMMoveWidget(panel->autoDelayT[i + k * 2], 287, 27 + 40 * i);
|
WMMoveWidget(panel->autoDelayT[i + k * 2], 293, 27 + 40 * i);
|
||||||
WMAddNotificationObserver(autoDelayChanged, panel, WMTextDidChangeNotification, panel->autoDelayT[i + k * 2]);
|
WMAddNotificationObserver(autoDelayChanged, panel, WMTextDidChangeNotification, panel->autoDelayT[i + k * 2]);
|
||||||
|
|
||||||
color = WMDarkGrayColor(scr);
|
color = WMDarkGrayColor(scr);
|
||||||
font = WMSystemFontOfSize(scr, 10);
|
font = WMSystemFontOfSize(scr, 10);
|
||||||
panel->autoDelayMsL[i + k * 2] = WMCreateLabel(panel->autoDelayF[k]);
|
panel->autoDelayMsL[i + k * 2] = WMCreateLabel(panel->autoDelayF[k]);
|
||||||
WMResizeWidget(panel->autoDelayMsL[i + k * 2], 36, 16);
|
WMResizeWidget(panel->autoDelayMsL[i + k * 2], 26, 16);
|
||||||
WMMoveWidget(panel->autoDelayMsL[i + k * 2], 327, 33 + 40 *i);
|
WMMoveWidget(panel->autoDelayMsL[i + k * 2], 337, 30 + 40 * i);
|
||||||
WMSetLabelText(panel->autoDelayMsL[i + k * 2], _("msec"));
|
WMSetLabelText(panel->autoDelayMsL[i + k * 2], _("ms"));
|
||||||
WMSetLabelTextColor(panel->autoDelayMsL[i + k * 2], color);
|
WMSetLabelTextColor(panel->autoDelayMsL[i + k * 2], color);
|
||||||
WMSetLabelFont(panel->autoDelayMsL[i + k * 2], font);
|
WMSetLabelFont(panel->autoDelayMsL[i + k * 2], font);
|
||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
@@ -241,10 +246,10 @@ static void createPanel(Panel *p)
|
|||||||
/***************** Enable/disable clip/dock/drawers *****************/
|
/***************** Enable/disable clip/dock/drawers *****************/
|
||||||
panel->dockF = WMCreateFrame(panel->box);
|
panel->dockF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->dockF, 115, 210);
|
WMResizeWidget(panel->dockF, 115, 210);
|
||||||
WMMoveWidget(panel->dockF, 390, 10);
|
WMMoveWidget(panel->dockF, 394, 10);
|
||||||
WMSetFrameTitle(panel->dockF, _("Dock/Clip/Drawer"));
|
WMSetFrameTitle(panel->dockF, _("Dock/Clip/Drawer"));
|
||||||
|
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < wlengthof(dock_config); i++)
|
||||||
{
|
{
|
||||||
panel->docksB[i] = WMCreateButton(panel->dockF, WBTToggle);
|
panel->docksB[i] = WMCreateButton(panel->dockF, WBTToggle);
|
||||||
WMResizeWidget(panel->docksB[i], 56, 56);
|
WMResizeWidget(panel->docksB[i], 56, 56);
|
||||||
@@ -259,21 +264,7 @@ static void createPanel(Panel *p)
|
|||||||
WMSetButtonAltImage(panel->docksB[i], icon1);
|
WMSetButtonAltImage(panel->docksB[i], icon1);
|
||||||
WMReleasePixmap(icon1);
|
WMReleasePixmap(icon1);
|
||||||
}
|
}
|
||||||
switch(i)
|
WMSetBalloonTextForView(_(dock_config[i].balloon_text), WMWidgetView(panel->docksB[i]));
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
WMSetBalloonTextForView(_("Disable/enable the application Dock (the\n"
|
|
||||||
"vertical icon bar in the side of the screen)."), WMWidgetView(panel->docksB[i]));
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
WMSetBalloonTextForView(_("Disable/enable the Clip (that thing with\n"
|
|
||||||
"a paper clip icon)."), WMWidgetView(panel->docksB[i]));
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
WMSetBalloonTextForView(_("Disable/enable Drawers (a dock that stores\n"
|
|
||||||
"application icons horizontally). The dock is required."), WMWidgetView(panel->docksB[i]));
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
WMSetButtonAction(panel->docksB[i], pushDockButton, panel);
|
WMSetButtonAction(panel->docksB[i], pushDockButton, panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -291,7 +282,7 @@ static void createPanel(Panel *p)
|
|||||||
static void storeData(_Panel *panel)
|
static void storeData(_Panel *panel)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < wlengthof(auto_delay); i++)
|
||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
|
|
||||||
@@ -299,7 +290,7 @@ static void storeData(_Panel *panel)
|
|||||||
SetStringForKey(str, auto_delay[i].key);
|
SetStringForKey(str, auto_delay[i].key);
|
||||||
wfree(str);
|
wfree(str);
|
||||||
}
|
}
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < wlengthof(dock_config); i++)
|
||||||
{
|
{
|
||||||
SetBoolForKey(!WMGetButtonSelected(panel->docksB[i]), dock_config[i].disable_key);
|
SetBoolForKey(!WMGetButtonSelected(panel->docksB[i]), dock_config[i].disable_key);
|
||||||
}
|
}
|
||||||
@@ -309,13 +300,13 @@ static void showData(_Panel *panel)
|
|||||||
{
|
{
|
||||||
char *value;
|
char *value;
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 4; i++)
|
for (i = 0; i < wlengthof(auto_delay); i++)
|
||||||
{
|
{
|
||||||
value = GetStringForKey(auto_delay[i].key);
|
value = GetStringForKey(auto_delay[i].key);
|
||||||
WMSetTextFieldText(panel->autoDelayT[i], value);
|
WMSetTextFieldText(panel->autoDelayT[i], value);
|
||||||
adjustButtonSelectionBasedOnValue(panel, i, value);
|
adjustButtonSelectionBasedOnValue(panel, i, value);
|
||||||
}
|
}
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < wlengthof(dock_config); i++)
|
||||||
{
|
{
|
||||||
WMSetButtonSelected(panel->docksB[i], !GetBoolForKey(dock_config[i].disable_key));
|
WMSetButtonSelected(panel->docksB[i], !GetBoolForKey(dock_config[i].disable_key));
|
||||||
}
|
}
|
||||||
|
|||||||
+295
-11
@@ -2,8 +2,9 @@
|
|||||||
*
|
*
|
||||||
* WPrefs - Window Maker Preferences Program
|
* WPrefs - Window Maker Preferences Program
|
||||||
*
|
*
|
||||||
* Copyright (c) 2014 Window Maker Team
|
* Copyright (c) 2014-2023 Window Maker Team
|
||||||
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
* Copyright (c) 1998-2003 Alfredo K. Kojima
|
||||||
|
* Copyright (c) 2009-2026 Window Maker Team
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -25,7 +26,7 @@
|
|||||||
/* This structure containts the list of all the check-buttons to display in the
|
/* This structure containts the list of all the check-buttons to display in the
|
||||||
* expert tab of the window with the corresponding information for effect
|
* expert tab of the window with the corresponding information for effect
|
||||||
*/
|
*/
|
||||||
static const struct {
|
static struct expert_option {
|
||||||
const char *label; /* Text displayed to user */
|
const char *label; /* Text displayed to user */
|
||||||
|
|
||||||
int def_state; /* True/False: the default value, if not defined in current config */
|
int def_state; /* True/False: the default value, if not defined in current config */
|
||||||
@@ -33,7 +34,8 @@ static const struct {
|
|||||||
enum {
|
enum {
|
||||||
OPTION_WMAKER,
|
OPTION_WMAKER,
|
||||||
OPTION_WMAKER_ARRAY,
|
OPTION_WMAKER_ARRAY,
|
||||||
OPTION_USERDEF
|
OPTION_USERDEF,
|
||||||
|
OPTION_WMAKER_INT
|
||||||
} class;
|
} class;
|
||||||
|
|
||||||
const char *op_name; /* The identifier for the option in the config file */
|
const char *op_name; /* The identifier for the option in the config file */
|
||||||
@@ -43,6 +45,12 @@ static const struct {
|
|||||||
{ N_("Disable miniwindows (icons for minimized windows). For use with KDE/GNOME."),
|
{ N_("Disable miniwindows (icons for minimized windows). For use with KDE/GNOME."),
|
||||||
/* default: */ False, OPTION_WMAKER, "DisableMiniwindows" },
|
/* default: */ False, OPTION_WMAKER, "DisableMiniwindows" },
|
||||||
|
|
||||||
|
{ N_("Ignore decoration hints for GTK applications."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "IgnoreGtkHints" },
|
||||||
|
|
||||||
|
{ N_("Enable workspace pager."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "EnableWorkspacePager" },
|
||||||
|
|
||||||
{ N_("Do not set non-WindowMaker specific parameters (do not use xset)."),
|
{ N_("Do not set non-WindowMaker specific parameters (do not use xset)."),
|
||||||
/* default: */ False, OPTION_USERDEF, "NoXSetStuff" },
|
/* default: */ False, OPTION_USERDEF, "NoXSetStuff" },
|
||||||
|
|
||||||
@@ -64,9 +72,15 @@ static const struct {
|
|||||||
{ N_("Cycle windows only on the active head."),
|
{ N_("Cycle windows only on the active head."),
|
||||||
/* default: */ False, OPTION_WMAKER, "CycleActiveHeadOnly" },
|
/* default: */ False, OPTION_WMAKER, "CycleActiveHeadOnly" },
|
||||||
|
|
||||||
|
{ N_("Cycle all windows from all workspaces."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "CycleAllWorkspaces" },
|
||||||
|
|
||||||
{ N_("Ignore minimized windows when cycling."),
|
{ N_("Ignore minimized windows when cycling."),
|
||||||
/* default: */ False, OPTION_WMAKER, "CycleIgnoreMinimized" },
|
/* default: */ False, OPTION_WMAKER, "CycleIgnoreMinimized" },
|
||||||
|
|
||||||
|
{ N_("Show app icons in window list."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "WindowListAppIcons" },
|
||||||
|
|
||||||
{ N_("Show switch panel when cycling windows."),
|
{ N_("Show switch panel when cycling windows."),
|
||||||
/* default: */ True, OPTION_WMAKER_ARRAY, "SwitchPanelImages" },
|
/* default: */ True, OPTION_WMAKER_ARRAY, "SwitchPanelImages" },
|
||||||
|
|
||||||
@@ -78,12 +92,55 @@ static const struct {
|
|||||||
|
|
||||||
#ifdef XKB_MODELOCK
|
#ifdef XKB_MODELOCK
|
||||||
{ N_("Enable keyboard language switch button in window titlebars."),
|
{ N_("Enable keyboard language switch button in window titlebars."),
|
||||||
/* default: */ False, OPTION_WMAKER, "KbdModeLock" }
|
/* default: */ False, OPTION_WMAKER, "KbdModeLock" },
|
||||||
#endif /* XKB_MODELOCK */
|
#endif /* XKB_MODELOCK */
|
||||||
|
|
||||||
|
{ N_("Snap a window to edge or corner by dragging."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "WindowSnapping" },
|
||||||
|
|
||||||
|
{ N_("Distance from edge to begin window snap."),
|
||||||
|
/* default: */ 1, OPTION_WMAKER_INT, "SnapEdgeDetect" },
|
||||||
|
|
||||||
|
{ N_("Distance from corner to begin window snap."),
|
||||||
|
/* default: */ 10, OPTION_WMAKER_INT, "SnapCornerDetect" },
|
||||||
|
|
||||||
|
{ N_("Snap a window to the top to maximize it to the full screen."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "SnapToTopMaximizesFullscreen" },
|
||||||
|
|
||||||
|
{ N_("Allow move half-maximized windows between multiple screens."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "MoveHalfMaximizedWindowsBetweenScreens" },
|
||||||
|
|
||||||
|
{ N_("Alternative transitions between states for half maximized windows."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "AlternativeHalfMaximized" },
|
||||||
|
|
||||||
|
{ N_("Move mouse pointer with half maximized windows."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "PointerWithHalfMaxWindows" },
|
||||||
|
|
||||||
|
{ N_("Open dialogs in the same workspace as their owners."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "OpenTransientOnOwnerWorkspace" },
|
||||||
|
|
||||||
|
{ N_("Wrap dock-attached icons around the screen edges."),
|
||||||
|
/* default: */ True, OPTION_WMAKER, "WrapAppiconsInDock" },
|
||||||
|
|
||||||
|
{ N_("Double click on titlebar maximizes/minimizes a window to/from full screen."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "DbClickFullScreen" },
|
||||||
|
|
||||||
|
{ N_("Close rootmenu when mouse (left or right) is clicked outside focus."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "CloseRootMenuByLeftOrRightMouseClick" },
|
||||||
|
{ N_("Keep dock on primary head."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "KeepDockOnPrimaryHead"},
|
||||||
|
|
||||||
|
{ N_("Allow windows to take focus using mouse wheel."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "MouseWheelFocus"},
|
||||||
|
|
||||||
|
#ifdef USE_RANDR
|
||||||
|
{ N_("Automatically (de)activate monitors on hotplug events."),
|
||||||
|
/* default: */ False, OPTION_WMAKER, "HotplugMonitor"},
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMBox *box;
|
WMBox *box;
|
||||||
char *sectionName;
|
char *sectionName;
|
||||||
@@ -94,12 +151,173 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
WMWidget *parent;
|
WMWidget *parent;
|
||||||
|
|
||||||
WMButton *swi[sizeof(expert_options) / sizeof(expert_options[0])];
|
WMButton *swi[wlengthof_nocheck(expert_options)];
|
||||||
|
|
||||||
|
WMTextField *textfield[wlengthof_nocheck(expert_options)];
|
||||||
|
WMScrollView *sv;
|
||||||
|
WMWidget *frame;
|
||||||
|
|
||||||
} _Panel;
|
} _Panel;
|
||||||
|
|
||||||
#define ICON_FILE "expert"
|
#define ICON_FILE "expert"
|
||||||
|
|
||||||
|
static void changeIntTextfield(void *data, int delta)
|
||||||
|
{
|
||||||
|
WMTextField *textfield;
|
||||||
|
char *text, buffer[12];
|
||||||
|
int value;
|
||||||
|
|
||||||
|
textfield = (WMTextField *)data;
|
||||||
|
text = WMGetTextFieldText(textfield);
|
||||||
|
value = atoi(text);
|
||||||
|
wfree(text);
|
||||||
|
value += delta;
|
||||||
|
sprintf(buffer, "%d", value);
|
||||||
|
WMSetTextFieldText(textfield, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void scrollViewWheelHandler(XEvent *event, void *data)
|
||||||
|
{
|
||||||
|
_Panel *panel = (_Panel *) data;
|
||||||
|
int amount, viewH, contentH, newY, maxY;
|
||||||
|
WMRect rect;
|
||||||
|
WMPoint pt;
|
||||||
|
|
||||||
|
if (!panel || !panel->sv || !panel->frame)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (event->type != ButtonPress)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (event->xbutton.button != WINGsConfiguration.mouseWheelUp &&
|
||||||
|
event->xbutton.button != WINGsConfiguration.mouseWheelDown)
|
||||||
|
return;
|
||||||
|
|
||||||
|
rect = WMGetScrollViewVisibleRect(panel->sv);
|
||||||
|
viewH = rect.size.height;
|
||||||
|
contentH = WMWidgetHeight(panel->frame);
|
||||||
|
|
||||||
|
if (event->xbutton.state & ControlMask) {
|
||||||
|
amount = viewH; /* page */
|
||||||
|
} else if (event->xbutton.state & ShiftMask) {
|
||||||
|
amount = 1; /* line */
|
||||||
|
} else {
|
||||||
|
amount = viewH / 3; /* default */
|
||||||
|
if (amount == 0)
|
||||||
|
amount = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event->xbutton.button == WINGsConfiguration.mouseWheelUp)
|
||||||
|
amount = -amount;
|
||||||
|
|
||||||
|
newY = rect.pos.y + amount;
|
||||||
|
maxY = contentH - viewH;
|
||||||
|
if (maxY < 0)
|
||||||
|
maxY = 0;
|
||||||
|
if (newY < 0)
|
||||||
|
newY = 0;
|
||||||
|
if (newY > maxY)
|
||||||
|
newY = maxY;
|
||||||
|
|
||||||
|
pt.x = rect.pos.x;
|
||||||
|
pt.y = newY;
|
||||||
|
|
||||||
|
WMScrollViewScrollPoint(panel->sv, pt);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void scrollViewRealizeObserver(void *self, WMNotification *not)
|
||||||
|
{
|
||||||
|
(void) not;
|
||||||
|
_Panel *panel = (_Panel *) self;
|
||||||
|
Display *dpy = NULL;
|
||||||
|
Window viewport_win = 0;
|
||||||
|
WMView *frameView;
|
||||||
|
|
||||||
|
if (!panel || !panel->frame)
|
||||||
|
return;
|
||||||
|
|
||||||
|
frameView = WMWidgetView(panel->frame);
|
||||||
|
|
||||||
|
if (frameView && frameView->parent) {
|
||||||
|
dpy = frameView->screen->display;
|
||||||
|
viewport_win = frameView->parent->window;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* fallback: use the scrollview's view window if parent viewport not available */
|
||||||
|
if (!viewport_win && panel->sv) {
|
||||||
|
WMView *svView = WMWidgetView(panel->sv);
|
||||||
|
if (svView && svView->screen) {
|
||||||
|
dpy = svView->screen->display;
|
||||||
|
viewport_win = svView->window;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dpy || viewport_win == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
|
XGrabButton(dpy, WINGsConfiguration.mouseWheelUp, AnyModifier, viewport_win,
|
||||||
|
True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None);
|
||||||
|
XGrabButton(dpy, WINGsConfiguration.mouseWheelDown, AnyModifier, viewport_win,
|
||||||
|
True, ButtonPressMask, GrabModeAsync, GrabModeAsync, None, None);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void scrollViewPrepareForClose(Panel *p)
|
||||||
|
{
|
||||||
|
_Panel *panel = (_Panel *) p;
|
||||||
|
Display *dpy = NULL;
|
||||||
|
Window viewport_win = 0;
|
||||||
|
|
||||||
|
if (!panel)
|
||||||
|
return;
|
||||||
|
|
||||||
|
if (panel->frame) {
|
||||||
|
WMView *frameView = WMWidgetView(panel->frame);
|
||||||
|
if (frameView && frameView->parent) {
|
||||||
|
dpy = frameView->screen->display;
|
||||||
|
viewport_win = frameView->parent->window;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!viewport_win && panel->sv) {
|
||||||
|
WMView *svView = WMWidgetView(panel->sv);
|
||||||
|
if (svView && svView->screen) {
|
||||||
|
dpy = svView->screen->display;
|
||||||
|
viewport_win = svView->window;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dpy && viewport_win != 0) {
|
||||||
|
XUngrabButton(dpy, WINGsConfiguration.mouseWheelUp, AnyModifier, viewport_win);
|
||||||
|
XUngrabButton(dpy, WINGsConfiguration.mouseWheelDown, AnyModifier, viewport_win);
|
||||||
|
}
|
||||||
|
|
||||||
|
WMRemoveNotificationObserver(panel);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void downButtonCallback(WMWidget *self, void *data)
|
||||||
|
{
|
||||||
|
(void) self;
|
||||||
|
changeIntTextfield(data, -1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void upButtonCallback(WMWidget *self, void *data)
|
||||||
|
{
|
||||||
|
(void) self;
|
||||||
|
changeIntTextfield(data, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cmpExpertOptions(const void *v1, const void *v2)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
const struct expert_option *opt1 = (struct expert_option *)v1;
|
||||||
|
const struct expert_option *opt2 = (struct expert_option *)v2;
|
||||||
|
|
||||||
|
if ((rc = strcmp(opt1->label, opt2->label)) < 0)
|
||||||
|
return -1;
|
||||||
|
else if (rc > 0)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
static void createPanel(Panel *p)
|
static void createPanel(Panel *p)
|
||||||
{
|
{
|
||||||
@@ -124,12 +342,15 @@ static void createPanel(Panel *p)
|
|||||||
WMSetFrameRelief(f, WRFlat);
|
WMSetFrameRelief(f, WRFlat);
|
||||||
|
|
||||||
udb = WMGetStandardUserDefaults();
|
udb = WMGetStandardUserDefaults();
|
||||||
|
qsort(expert_options, wlengthof(expert_options), sizeof(expert_options[0]), cmpExpertOptions);
|
||||||
for (i = 0; i < wlengthof(expert_options); i++) {
|
for (i = 0; i < wlengthof(expert_options); i++) {
|
||||||
panel->swi[i] = WMCreateSwitchButton(f);
|
if (expert_options[i].class != OPTION_WMAKER_INT) {
|
||||||
WMResizeWidget(panel->swi[i], FRAME_WIDTH - 40, 25);
|
panel->swi[i] = WMCreateSwitchButton(f);
|
||||||
WMMoveWidget(panel->swi[i], 5, 5 + i * 25);
|
WMResizeWidget(panel->swi[i], FRAME_WIDTH - 40, 25);
|
||||||
|
WMMoveWidget(panel->swi[i], 5, 5 + i * 25);
|
||||||
|
|
||||||
WMSetButtonText(panel->swi[i], _(expert_options[i].label));
|
WMSetButtonText(panel->swi[i], _(expert_options[i].label));
|
||||||
|
}
|
||||||
|
|
||||||
switch (expert_options[i].class) {
|
switch (expert_options[i].class) {
|
||||||
case OPTION_WMAKER:
|
case OPTION_WMAKER:
|
||||||
@@ -151,19 +372,68 @@ static void createPanel(Panel *p)
|
|||||||
state = WMGetUDBoolForKey(udb, expert_options[i].op_name);
|
state = WMGetUDBoolForKey(udb, expert_options[i].op_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPTION_WMAKER_INT:
|
||||||
|
{
|
||||||
|
char tmp[10];
|
||||||
|
WMButton *up, *down;
|
||||||
|
WMLabel *label;
|
||||||
|
|
||||||
|
panel->textfield[i] = WMCreateTextField(f);
|
||||||
|
WMResizeWidget(panel->textfield[i], 41, 20);
|
||||||
|
WMMoveWidget(panel->textfield[i], 22, 7 + i * 25);
|
||||||
|
|
||||||
|
down = WMCreateCommandButton(f);
|
||||||
|
WMSetButtonImage(down, WMGetSystemPixmap(WMWidgetScreen(down), WSIArrowDown));
|
||||||
|
WMSetButtonAltImage(down,
|
||||||
|
WMGetSystemPixmap(WMWidgetScreen(down), WSIHighlightedArrowDown));
|
||||||
|
WMSetButtonImagePosition(down, WIPImageOnly);
|
||||||
|
WMSetButtonAction(down, downButtonCallback, panel->textfield[i]);
|
||||||
|
WMResizeWidget(down, 16, 16);
|
||||||
|
WMMoveWidget(down, 5, 9 + i * 25);
|
||||||
|
|
||||||
|
up = WMCreateCommandButton(f);
|
||||||
|
WMSetButtonImage(up, WMGetSystemPixmap(WMWidgetScreen(up), WSIArrowUp));
|
||||||
|
WMSetButtonAltImage(up, WMGetSystemPixmap(WMWidgetScreen(up), WSIHighlightedArrowUp));
|
||||||
|
WMSetButtonImagePosition(up, WIPImageOnly);
|
||||||
|
WMSetButtonAction(up, upButtonCallback, panel->textfield[i]);
|
||||||
|
WMResizeWidget(up, 16, 16);
|
||||||
|
WMMoveWidget(up, 64, 9 + i * 25);
|
||||||
|
|
||||||
|
label = WMCreateLabel(f);
|
||||||
|
WMSetLabelText(label, _(expert_options[i].label));
|
||||||
|
WMResizeWidget(label, FRAME_WIDTH - 99, 25);
|
||||||
|
WMMoveWidget(label, 85, 5 + i * 25);
|
||||||
|
|
||||||
|
if (GetStringForKey(expert_options[i].op_name))
|
||||||
|
state = GetIntegerForKey(expert_options[i].op_name);
|
||||||
|
else
|
||||||
|
state = expert_options[i].def_state;
|
||||||
|
|
||||||
|
sprintf(tmp, "%d", state);
|
||||||
|
WMSetTextFieldText(panel->textfield[i], tmp);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
wwarning("export_options[%d].class = %d, this should not happen\n",
|
wwarning("expert_options[%d].class = %d, this should not happen\n",
|
||||||
i, expert_options[i].class);
|
i, expert_options[i].class);
|
||||||
#endif
|
#endif
|
||||||
state = expert_options[i].def_state;
|
state = expert_options[i].def_state;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
WMSetButtonSelected(panel->swi[i], state);
|
if (expert_options[i].class != OPTION_WMAKER_INT)
|
||||||
|
WMSetButtonSelected(panel->swi[i], state);
|
||||||
}
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(panel->box);
|
WMMapSubwidgets(panel->box);
|
||||||
WMSetScrollViewContentView(sv, WMWidgetView(f));
|
WMSetScrollViewContentView(sv, WMWidgetView(f));
|
||||||
|
/* keep references for the wheel handler and register it */
|
||||||
|
panel->sv = sv;
|
||||||
|
panel->frame = f;
|
||||||
|
WMCreateEventHandler(WMWidgetView(sv), ButtonPressMask, scrollViewWheelHandler, panel);
|
||||||
|
WMAddNotificationObserver(scrollViewRealizeObserver, panel, WMViewRealizedNotification, WMWidgetView(sv));
|
||||||
WMRealizeWidget(panel->box);
|
WMRealizeWidget(panel->box);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,6 +462,19 @@ static void storeDefaults(_Panel *panel)
|
|||||||
case OPTION_USERDEF:
|
case OPTION_USERDEF:
|
||||||
WMSetUDBoolForKey(udb, WMGetButtonSelected(panel->swi[i]), expert_options[i].op_name);
|
WMSetUDBoolForKey(udb, WMGetButtonSelected(panel->swi[i]), expert_options[i].op_name);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case OPTION_WMAKER_INT:
|
||||||
|
{
|
||||||
|
char *text;
|
||||||
|
int value;
|
||||||
|
|
||||||
|
text = WMGetTextFieldText(panel->textfield[i]);
|
||||||
|
value = atoi(text);
|
||||||
|
wfree(text);
|
||||||
|
|
||||||
|
SetIntegerForKey(value, expert_options[i].op_name);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,6 +494,7 @@ Panel *InitExpert(WMWidget *parent)
|
|||||||
|
|
||||||
panel->callbacks.createWidgets = createPanel;
|
panel->callbacks.createWidgets = createPanel;
|
||||||
panel->callbacks.updateDomain = storeDefaults;
|
panel->callbacks.updateDomain = storeDefaults;
|
||||||
|
panel->callbacks.prepareForClose = scrollViewPrepareForClose;
|
||||||
|
|
||||||
AddSection(panel, ICON_FILE);
|
AddSection(panel, ICON_FILE);
|
||||||
|
|
||||||
|
|||||||
+27
-18
@@ -205,13 +205,13 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
panel->kfocB[0] = WMCreateRadioButton(box);
|
panel->kfocB[0] = WMCreateRadioButton(box);
|
||||||
WMSetButtonText(panel->kfocB[0], _("Manual: Click on the window to set "
|
WMSetButtonText(panel->kfocB[0], _("Manual: Click on the window to set "
|
||||||
"keyboard input focus."));
|
"keyboard input focus"));
|
||||||
WMAddBoxSubview(box, WMWidgetView(panel->kfocB[0]), True, True, 20, 0, 0);
|
WMAddBoxSubview(box, WMWidgetView(panel->kfocB[0]), True, True, 20, 0, 0);
|
||||||
|
|
||||||
panel->kfocB[1] = WMCreateRadioButton(box);
|
panel->kfocB[1] = WMCreateRadioButton(box);
|
||||||
WMGroupButtons(panel->kfocB[0], panel->kfocB[1]);
|
WMGroupButtons(panel->kfocB[0], panel->kfocB[1]);
|
||||||
WMSetButtonText(panel->kfocB[1], _("Auto: Set keyboard input focus to "
|
WMSetButtonText(panel->kfocB[1], _("Auto: Set keyboard input focus to "
|
||||||
"the window under the mouse pointer."));
|
"the window under the mouse pointer"));
|
||||||
WMAddBoxSubview(box, WMWidgetView(panel->kfocB[1]), True, True, 20, 0, 0);
|
WMAddBoxSubview(box, WMWidgetView(panel->kfocB[1]), True, True, 20, 0, 0);
|
||||||
|
|
||||||
WMMapSubwidgets(box);
|
WMMapSubwidgets(box);
|
||||||
@@ -223,17 +223,26 @@ static void createPanel(Panel * p)
|
|||||||
panel->cfocF = WMCreateFrame(panel->box);
|
panel->cfocF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->cfocF, 240, 77);
|
WMResizeWidget(panel->cfocF, 240, 77);
|
||||||
WMMoveWidget(panel->cfocF, 15, 143);
|
WMMoveWidget(panel->cfocF, 15, 143);
|
||||||
WMSetFrameTitle(panel->cfocF, _("Install colormap in the window..."));
|
WMSetFrameTitle(panel->cfocF, _("Install colormap from the window..."));
|
||||||
|
|
||||||
|
WMSetBalloonTextForView(_("This option is for screens that can display only a limited number\n"
|
||||||
|
"of colors at a time, so they use an indexed table of colors (called\n"
|
||||||
|
"a ColorMap) that each application customizes for its needs, and\n"
|
||||||
|
"WindowMaker will set the global ColorMap dynamically from the\n"
|
||||||
|
"active application.\n"
|
||||||
|
"You can know the capability of your screen in WindowMaker's info\n"
|
||||||
|
"panel as the 'visual'."),
|
||||||
|
WMWidgetView(panel->cfocF));
|
||||||
|
|
||||||
panel->manB = WMCreateRadioButton(panel->cfocF);
|
panel->manB = WMCreateRadioButton(panel->cfocF);
|
||||||
WMResizeWidget(panel->manB, 225, 20);
|
WMResizeWidget(panel->manB, 226, 24);
|
||||||
WMMoveWidget(panel->manB, 10, 20);
|
WMMoveWidget(panel->manB, 9, 18);
|
||||||
WMSetButtonText(panel->manB, _("...that has the input focus."));
|
WMSetButtonText(panel->manB, _("...that has the input focus"));
|
||||||
|
|
||||||
panel->autB = WMCreateRadioButton(panel->cfocF);
|
panel->autB = WMCreateRadioButton(panel->cfocF);
|
||||||
WMResizeWidget(panel->autB, 225, 20);
|
WMResizeWidget(panel->autB, 226, 24);
|
||||||
WMMoveWidget(panel->autB, 10, 45);
|
WMMoveWidget(panel->autB, 9, 43);
|
||||||
WMSetButtonText(panel->autB, _("...that's under the mouse pointer."));
|
WMSetButtonText(panel->autB, _("...that's under the mouse pointer"));
|
||||||
WMGroupButtons(panel->manB, panel->autB);
|
WMGroupButtons(panel->manB, panel->autB);
|
||||||
|
|
||||||
WMMapSubwidgets(panel->cfocF);
|
WMMapSubwidgets(panel->cfocF);
|
||||||
@@ -297,7 +306,7 @@ static void createPanel(Panel * p)
|
|||||||
panel->raisL = WMCreateLabel(panel->raisF);
|
panel->raisL = WMCreateLabel(panel->raisF);
|
||||||
WMResizeWidget(panel->raisL, 36, 16);
|
WMResizeWidget(panel->raisL, 36, 16);
|
||||||
WMMoveWidget(panel->raisL, 205, 32);
|
WMMoveWidget(panel->raisL, 205, 32);
|
||||||
WMSetLabelText(panel->raisL, _("msec"));
|
WMSetLabelText(panel->raisL, _("ms"));
|
||||||
WMSetLabelTextColor(panel->raisL, color);
|
WMSetLabelTextColor(panel->raisL, color);
|
||||||
WMSetLabelFont(panel->raisL, font);
|
WMSetLabelFont(panel->raisL, font);
|
||||||
|
|
||||||
@@ -312,19 +321,19 @@ static void createPanel(Panel * p)
|
|||||||
WMMoveWidget(panel->optF, 265, 88);
|
WMMoveWidget(panel->optF, 265, 88);
|
||||||
|
|
||||||
panel->ignB = WMCreateSwitchButton(panel->optF);
|
panel->ignB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->ignB, 225, 50);
|
WMResizeWidget(panel->ignB, 228, 50-2);
|
||||||
WMMoveWidget(panel->ignB, 10, 4);
|
WMMoveWidget(panel->ignB, 10, 4);
|
||||||
WMSetButtonText(panel->ignB, _("Do not let applications receive " "the click used to focus windows."));
|
WMSetButtonText(panel->ignB, _("Do not let applications receive the click used to focus windows"));
|
||||||
|
|
||||||
panel->newB = WMCreateSwitchButton(panel->optF);
|
panel->newB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->newB, 225, 35);
|
WMResizeWidget(panel->newB, 228, 35);
|
||||||
WMMoveWidget(panel->newB, 10, 49);
|
WMMoveWidget(panel->newB, 10, 52);
|
||||||
WMSetButtonText(panel->newB, _("Automatically focus new windows."));
|
WMSetButtonText(panel->newB, _("Automatically focus new windows"));
|
||||||
|
|
||||||
panel->craisB = WMCreateSwitchButton(panel->optF);
|
panel->craisB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->craisB, 225, 36);
|
WMResizeWidget(panel->craisB, 228, 36);
|
||||||
WMMoveWidget(panel->craisB, 10, 85);
|
WMMoveWidget(panel->craisB, 10, 87);
|
||||||
WMSetButtonText(panel->craisB, _("Raise window when switching\nfocus with keyboard."));
|
WMSetButtonText(panel->craisB, _("Raise window when switching focus with keyboard"));
|
||||||
|
|
||||||
WMMapSubwidgets(panel->optF);
|
WMMapSubwidgets(panel->optF);
|
||||||
|
|
||||||
|
|||||||
+10
-13
@@ -22,6 +22,7 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <fontconfig/fontconfig.h>
|
#include <fontconfig/fontconfig.h>
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
/* workaround for older fontconfig, that doesn't define these constants */
|
/* workaround for older fontconfig, that doesn't define these constants */
|
||||||
#ifndef FC_WEIGHT_NORMAL
|
#ifndef FC_WEIGHT_NORMAL
|
||||||
@@ -521,7 +522,7 @@ static void selectedOption(WMWidget * w, void *data)
|
|||||||
WMListItem *item = WMGetListItem(panel->sizeL, i);
|
WMListItem *item = WMGetListItem(panel->sizeL, i);
|
||||||
int distance;
|
int distance;
|
||||||
|
|
||||||
distance = abs(size - atoi(item->text));
|
distance = fabs(size - atoi(item->text));
|
||||||
|
|
||||||
if (i == 0 || distance < closest) {
|
if (i == 0 || distance < closest) {
|
||||||
closest = distance;
|
closest = distance;
|
||||||
@@ -569,6 +570,9 @@ static void showData(_Panel * panel)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
WMMenuItem *item;
|
WMMenuItem *item;
|
||||||
|
WMScreen *scr;
|
||||||
|
|
||||||
|
scr = WMWidgetScreen(panel->parent);
|
||||||
|
|
||||||
for (i = 0; i < WMGetPopUpButtonNumberOfItems(panel->optionP); i++) {
|
for (i = 0; i < WMGetPopUpButtonNumberOfItems(panel->optionP); i++) {
|
||||||
char *ofont, *font;
|
char *ofont, *font;
|
||||||
@@ -579,19 +583,12 @@ static void showData(_Panel * panel)
|
|||||||
if (ofont)
|
if (ofont)
|
||||||
wfree(ofont);
|
wfree(ofont);
|
||||||
|
|
||||||
if (strcmp(fontOptions[i].option, "SystemFont") == 0 ||
|
if (strcmp(fontOptions[i].option, "SystemFont") == 0)
|
||||||
strcmp(fontOptions[i].option, "BoldSystemFont") == 0) {
|
font = WMGetFontName(WMDefaultSystemFont(scr));
|
||||||
char *path;
|
else if (strcmp(fontOptions[i].option, "BoldSystemFont") == 0)
|
||||||
WMUserDefaults *defaults;
|
font = WMGetFontName(WMDefaultBoldSystemFont(scr));
|
||||||
|
else
|
||||||
path = wdefaultspathfordomain("WMGLOBAL");
|
|
||||||
defaults = WMGetDefaultsFromPath(path);
|
|
||||||
wfree(path);
|
|
||||||
font = WMGetUDStringForKey(defaults,
|
|
||||||
fontOptions[i].option);
|
|
||||||
} else {
|
|
||||||
font = GetStringForKey(fontOptions[i].option);
|
font = GetStringForKey(fontOptions[i].option);
|
||||||
}
|
|
||||||
if (font)
|
if (font)
|
||||||
font = wstrdup(font);
|
font = wstrdup(font);
|
||||||
WMSetMenuItemRepresentedObject(item, font);
|
WMSetMenuItemRepresentedObject(item, font);
|
||||||
|
|||||||
@@ -0,0 +1,465 @@
|
|||||||
|
/* HotCornerShortcuts.c - screen corners actions
|
||||||
|
*
|
||||||
|
* WPrefs - Window Maker Preferences Program
|
||||||
|
*
|
||||||
|
* Copyright (c) 2023 Window Maker Team
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License along
|
||||||
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "WPrefs.h"
|
||||||
|
|
||||||
|
typedef struct _Panel {
|
||||||
|
WMBox *box;
|
||||||
|
|
||||||
|
char *sectionName;
|
||||||
|
|
||||||
|
char *description;
|
||||||
|
|
||||||
|
CallbackRec callbacks;
|
||||||
|
|
||||||
|
WMWidget *parent;
|
||||||
|
WMPixmap *icon;
|
||||||
|
Pixmap quarter[4];
|
||||||
|
|
||||||
|
WMFrame *hcF;
|
||||||
|
WMButton *hcB;
|
||||||
|
WMFrame *hceF;
|
||||||
|
WMSlider *hceS;
|
||||||
|
WMLabel *hceL;
|
||||||
|
WMFrame *hcdescF;
|
||||||
|
WMLabel *hcdescL;
|
||||||
|
|
||||||
|
WMFrame *hcdelayF;
|
||||||
|
WMButton *hcdelayB[5];
|
||||||
|
WMTextField *hcdelayT;
|
||||||
|
WMLabel *hcdelayL;
|
||||||
|
WMLabel *icornerL;
|
||||||
|
|
||||||
|
WMFrame *hcactionsF;
|
||||||
|
WMTextField *hcactionsT[4];
|
||||||
|
|
||||||
|
char hotcornerDelaySelected;
|
||||||
|
} _Panel;
|
||||||
|
|
||||||
|
#define ICON_FILE "hotcorners"
|
||||||
|
|
||||||
|
#define DELAY_ICON "timer%i"
|
||||||
|
#define DELAY_ICON_S "timer%is"
|
||||||
|
|
||||||
|
static void edgeCallback(WMWidget * w, void *data)
|
||||||
|
{
|
||||||
|
_Panel *panel = (_Panel *) data;
|
||||||
|
char buffer[64];
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) w;
|
||||||
|
|
||||||
|
i = WMGetSliderValue(panel->hceS);
|
||||||
|
|
||||||
|
if (i == 0)
|
||||||
|
sprintf(buffer, _("OFF"));
|
||||||
|
else if (i == 1)
|
||||||
|
sprintf(buffer, _("1 pixel"));
|
||||||
|
else if (i <= 4)
|
||||||
|
/* 2-4 */
|
||||||
|
sprintf(buffer, _("%i pixels"), i);
|
||||||
|
else
|
||||||
|
/* >4 */
|
||||||
|
sprintf(buffer, _("%i pixels "), i); /* note space! */
|
||||||
|
WMSetLabelText(panel->hceL, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void showData(_Panel * panel)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char buffer[32];
|
||||||
|
WMPropList *array;
|
||||||
|
|
||||||
|
if (!GetObjectForKey("HotCornerDelay"))
|
||||||
|
i = 250;
|
||||||
|
else
|
||||||
|
i = GetIntegerForKey("HotCornerDelay");
|
||||||
|
sprintf(buffer, "%i", i);
|
||||||
|
WMSetTextFieldText(panel->hcdelayT, buffer);
|
||||||
|
|
||||||
|
switch (i) {
|
||||||
|
case 0:
|
||||||
|
WMPerformButtonClick(panel->hcdelayB[0]);
|
||||||
|
break;
|
||||||
|
case 250:
|
||||||
|
WMPerformButtonClick(panel->hcdelayB[1]);
|
||||||
|
break;
|
||||||
|
case 500:
|
||||||
|
WMPerformButtonClick(panel->hcdelayB[2]);
|
||||||
|
break;
|
||||||
|
case 750:
|
||||||
|
WMPerformButtonClick(panel->hcdelayB[3]);
|
||||||
|
break;
|
||||||
|
case 1000:
|
||||||
|
WMPerformButtonClick(panel->hcdelayB[4]);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
i = GetIntegerForKey("HotCornerEdge");
|
||||||
|
i = i < 0 ? 2 : i;
|
||||||
|
i = i > 10 ? 10 : i;
|
||||||
|
WMSetSliderValue(panel->hceS, i);
|
||||||
|
edgeCallback(NULL, panel);
|
||||||
|
|
||||||
|
WMSetButtonSelected(panel->hcB, GetBoolForKey("HotCorners"));
|
||||||
|
|
||||||
|
array = GetObjectForKey("HotCornerActions");
|
||||||
|
if (array && (!WMIsPLArray(array) || WMGetPropListItemCount(array) != sizeof(panel->hcactionsT) / sizeof(WMTextField *))) {
|
||||||
|
wwarning(_("invalid data in option HotCornerActions."));
|
||||||
|
} else {
|
||||||
|
if (array) {
|
||||||
|
for (i = 0; i < sizeof(panel->hcactionsT) / sizeof(WMTextField *); i++)
|
||||||
|
if (strcasecmp(WMGetFromPLString(WMGetFromPLArray(array, i)), "None") != 0)
|
||||||
|
WMSetTextFieldText(panel->hcactionsT[i], WMGetFromPLString(WMGetFromPLArray(array, i)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void storeData(_Panel * panel)
|
||||||
|
{
|
||||||
|
WMPropList *list;
|
||||||
|
WMPropList *tmp;
|
||||||
|
char *str;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
SetBoolForKey(WMGetButtonSelected(panel->hcB), "HotCorners");
|
||||||
|
|
||||||
|
str = WMGetTextFieldText(panel->hcdelayT);
|
||||||
|
if (sscanf(str, "%i", &i) != 1)
|
||||||
|
i = 0;
|
||||||
|
SetIntegerForKey(i, "HotCornerDelay");
|
||||||
|
free(str);
|
||||||
|
|
||||||
|
SetIntegerForKey(WMGetSliderValue(panel->hceS), "HotCornerEdge");
|
||||||
|
|
||||||
|
list = WMCreatePLArray(NULL, NULL);
|
||||||
|
for (i = 0; i < sizeof(panel->hcactionsT) / sizeof(WMTextField *); i++) {
|
||||||
|
str = WMGetTextFieldText(panel->hcactionsT[i]);
|
||||||
|
if (strlen(str) == 0)
|
||||||
|
str = "None";
|
||||||
|
tmp = WMCreatePLString(str);
|
||||||
|
WMAddToPLArray(list, tmp);
|
||||||
|
}
|
||||||
|
SetObjectForKey(list, "HotCornerActions");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void pushDelayButton(WMWidget * w, void *data)
|
||||||
|
{
|
||||||
|
_Panel *panel = (_Panel *) data;
|
||||||
|
|
||||||
|
panel->hotcornerDelaySelected = 1;
|
||||||
|
if (w == panel->hcdelayB[0]) {
|
||||||
|
WMSetTextFieldText(panel->hcdelayT, "0");
|
||||||
|
} else if (w == panel->hcdelayB[1]) {
|
||||||
|
WMSetTextFieldText(panel->hcdelayT, "250");
|
||||||
|
} else if (w == panel->hcdelayB[2]) {
|
||||||
|
WMSetTextFieldText(panel->hcdelayT, "500");
|
||||||
|
} else if (w == panel->hcdelayB[3]) {
|
||||||
|
WMSetTextFieldText(panel->hcdelayT, "700");
|
||||||
|
} else if (w == panel->hcdelayB[4]) {
|
||||||
|
WMSetTextFieldText(panel->hcdelayT, "1000");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void delayTextChanged(void *observerData, WMNotification * notification)
|
||||||
|
{
|
||||||
|
_Panel *panel = (_Panel *) observerData;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
|
(void) notification;
|
||||||
|
|
||||||
|
if (panel->hotcornerDelaySelected) {
|
||||||
|
for (i = 0; i < 5; i++) {
|
||||||
|
WMSetButtonSelected(panel->hcdelayB[i], False);
|
||||||
|
}
|
||||||
|
panel->hotcornerDelaySelected = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
static void createPanel(Panel * p)
|
||||||
|
{
|
||||||
|
_Panel *panel = (_Panel *) p;
|
||||||
|
int i;
|
||||||
|
char *buf1, *buf2;
|
||||||
|
WMColor *color;
|
||||||
|
WMFont *font;
|
||||||
|
char *path;
|
||||||
|
RImage *xis = NULL;
|
||||||
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
|
RContext *rc = WMScreenRContext(scr);
|
||||||
|
GC gc = XCreateGC(scr->display, WMWidgetXID(panel->parent), 0, NULL);
|
||||||
|
|
||||||
|
path = LocateImage(ICON_FILE);
|
||||||
|
if (path) {
|
||||||
|
xis = RLoadImage(rc, path, 0);
|
||||||
|
if (!xis) {
|
||||||
|
wwarning(_("could not load image file %s"), path);
|
||||||
|
}
|
||||||
|
wfree(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
panel->box = WMCreateBox(panel->parent);
|
||||||
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
|
|
||||||
|
/***************** Hot Corner lelf side frames *****************/
|
||||||
|
panel->hcF = WMCreateFrame(panel->box);
|
||||||
|
WMResizeWidget(panel->hcF, 240, 53);
|
||||||
|
WMMoveWidget(panel->hcF, 15, 17);
|
||||||
|
|
||||||
|
panel->hcB = WMCreateSwitchButton(panel->hcF);
|
||||||
|
WMResizeWidget(panel->hcB, 150, 30);
|
||||||
|
WMMoveWidget(panel->hcB, 15, 12);
|
||||||
|
WMSetButtonText(panel->hcB, _("Enable Hot Corners"));
|
||||||
|
|
||||||
|
WMMapSubwidgets(panel->hcF);
|
||||||
|
|
||||||
|
panel->hceF = WMCreateFrame(panel->box);
|
||||||
|
WMSetFrameTitle(panel->hceF, _("Hot Corner Edge"));
|
||||||
|
WMResizeWidget(panel->hceF, 240, 40);
|
||||||
|
WMMoveWidget(panel->hceF, 15, 77);
|
||||||
|
|
||||||
|
panel->hceS = WMCreateSlider(panel->hceF);
|
||||||
|
WMResizeWidget(panel->hceS, 80, 15);
|
||||||
|
WMMoveWidget(panel->hceS, 15, 18);
|
||||||
|
WMSetSliderMinValue(panel->hceS, 2);
|
||||||
|
WMSetSliderMaxValue(panel->hceS, 10);
|
||||||
|
WMSetSliderAction(panel->hceS, edgeCallback, panel);
|
||||||
|
|
||||||
|
panel->hceL = WMCreateLabel(panel->hceF);
|
||||||
|
WMResizeWidget(panel->hceL, 100, 15);
|
||||||
|
WMMoveWidget(panel->hceL, 105, 18);
|
||||||
|
|
||||||
|
WMMapSubwidgets(panel->hceF);
|
||||||
|
|
||||||
|
panel->hcdescF = WMCreateFrame(panel->box);
|
||||||
|
WMResizeWidget(panel->hcdescF, 240, 95);
|
||||||
|
WMMoveWidget(panel->hcdescF, 15, 130);
|
||||||
|
|
||||||
|
panel->hcdescL = WMCreateLabel(panel->hcdescF);
|
||||||
|
WMResizeWidget(panel->hcdescL, 200, 70);
|
||||||
|
WMMoveWidget(panel->hcdescL, 15, 10);
|
||||||
|
WMSetLabelText(panel->hcdescL,
|
||||||
|
_("Instructions:\n\n"
|
||||||
|
" - assign command to corner\n"
|
||||||
|
" - or leave it empty\n"));
|
||||||
|
|
||||||
|
WMMapSubwidgets(panel->hcdescF);
|
||||||
|
|
||||||
|
/***************** Hot Corner Action Delay *****************/
|
||||||
|
panel->hcdelayF = WMCreateFrame(panel->box);
|
||||||
|
WMResizeWidget(panel->hcdelayF, 245, 60);
|
||||||
|
WMMoveWidget(panel->hcdelayF, 265, 10);
|
||||||
|
|
||||||
|
WMSetFrameTitle(panel->hcdelayF, _("Hot Corner Delay"));
|
||||||
|
|
||||||
|
buf1 = wmalloc(strlen(DELAY_ICON) + 1);
|
||||||
|
buf2 = wmalloc(strlen(DELAY_ICON_S) + 1);
|
||||||
|
|
||||||
|
for (i = 0; i < 5; i++) {
|
||||||
|
char *path;
|
||||||
|
|
||||||
|
panel->hcdelayB[i] = WMCreateCustomButton(panel->hcdelayF, WBBStateChangeMask);
|
||||||
|
WMResizeWidget(panel->hcdelayB[i], 25, 25);
|
||||||
|
WMMoveWidget(panel->hcdelayB[i], 12 + (30 * i), 25);
|
||||||
|
WMSetButtonBordered(panel->hcdelayB[i], False);
|
||||||
|
WMSetButtonImagePosition(panel->hcdelayB[i], WIPImageOnly);
|
||||||
|
WMSetButtonAction(panel->hcdelayB[i], pushDelayButton, panel);
|
||||||
|
if (i > 0)
|
||||||
|
WMGroupButtons(panel->hcdelayB[0], panel->hcdelayB[i]);
|
||||||
|
sprintf(buf1, DELAY_ICON, i);
|
||||||
|
sprintf(buf2, DELAY_ICON_S, i);
|
||||||
|
path = LocateImage(buf1);
|
||||||
|
if (path) {
|
||||||
|
panel->icon = WMCreatePixmapFromFile(scr, path);
|
||||||
|
if (panel->icon) {
|
||||||
|
WMSetButtonImage(panel->hcdelayB[i], panel->icon);
|
||||||
|
WMReleasePixmap(panel->icon);
|
||||||
|
} else {
|
||||||
|
wwarning(_("could not load icon file %s"), path);
|
||||||
|
}
|
||||||
|
wfree(path);
|
||||||
|
}
|
||||||
|
path = LocateImage(buf2);
|
||||||
|
if (path) {
|
||||||
|
panel->icon = WMCreatePixmapFromFile(scr, path);
|
||||||
|
if (panel->icon) {
|
||||||
|
WMSetButtonAltImage(panel->hcdelayB[i], panel->icon);
|
||||||
|
WMReleasePixmap(panel->icon);
|
||||||
|
} else {
|
||||||
|
wwarning(_("could not load icon file %s"), path);
|
||||||
|
}
|
||||||
|
wfree(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wfree(buf1);
|
||||||
|
wfree(buf2);
|
||||||
|
|
||||||
|
panel->hcdelayT = WMCreateTextField(panel->hcdelayF);
|
||||||
|
|
||||||
|
WMResizeWidget(panel->hcdelayT, 36, 20);
|
||||||
|
WMMoveWidget(panel->hcdelayT, 165, 28);
|
||||||
|
WMAddNotificationObserver(delayTextChanged, panel, WMTextDidChangeNotification, panel->hcdelayT);
|
||||||
|
|
||||||
|
panel->hcdelayL = WMCreateLabel(panel->hcdelayF);
|
||||||
|
WMResizeWidget(panel->hcdelayL, 36, 16);
|
||||||
|
WMMoveWidget(panel->hcdelayL, 205, 32);
|
||||||
|
WMSetLabelText(panel->hcdelayL, _("ms"));
|
||||||
|
|
||||||
|
color = WMDarkGrayColor(scr);
|
||||||
|
font = WMSystemFontOfSize(scr, 10);
|
||||||
|
|
||||||
|
WMSetLabelTextColor(panel->hcdelayL, color);
|
||||||
|
WMSetLabelFont(panel->hcdelayL, font);
|
||||||
|
|
||||||
|
WMReleaseColor(color);
|
||||||
|
WMReleaseFont(font);
|
||||||
|
|
||||||
|
WMMapSubwidgets(panel->hcdelayF);
|
||||||
|
|
||||||
|
/***************** Set Hot Corner Actions ****************/
|
||||||
|
panel->hcactionsF = WMCreateFrame(panel->box);
|
||||||
|
WMSetFrameTitle(panel->hcactionsF, _("Hot Corner Actions"));
|
||||||
|
WMResizeWidget(panel->hcactionsF, 245, 148);
|
||||||
|
WMMoveWidget(panel->hcactionsF, 265, 77);
|
||||||
|
|
||||||
|
panel->icornerL = WMCreateLabel(panel->hcactionsF);
|
||||||
|
WMResizeWidget(panel->icornerL, 24, 24);
|
||||||
|
WMMoveWidget(panel->icornerL, 10, 18);
|
||||||
|
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
|
||||||
|
CreateImages(scr, rc, xis, ICON_FILE, &panel->icon, NULL);
|
||||||
|
if (panel->icon)
|
||||||
|
{
|
||||||
|
WMPixmap *nicon;
|
||||||
|
|
||||||
|
panel->quarter[0] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||||
|
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[0], gc, 0, 0, panel->icon->width/2, panel->icon->height/2, 0, 0);
|
||||||
|
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[0], WMGetPixmapMaskXID(panel->icon),
|
||||||
|
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||||
|
WMSetLabelImage(panel->icornerL, nicon);
|
||||||
|
WMReleasePixmap(nicon);
|
||||||
|
}
|
||||||
|
|
||||||
|
panel->hcactionsT[0] = WMCreateTextField(panel->hcactionsF);
|
||||||
|
WMResizeWidget(panel->hcactionsT[0], 180, 20);
|
||||||
|
WMMoveWidget(panel->hcactionsT[0], 50, 20);
|
||||||
|
|
||||||
|
panel->icornerL = WMCreateLabel(panel->hcactionsF);
|
||||||
|
WMResizeWidget(panel->icornerL, 24, 24);
|
||||||
|
WMMoveWidget(panel->icornerL, 10, 48);
|
||||||
|
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
|
||||||
|
if (panel->icon)
|
||||||
|
{
|
||||||
|
WMPixmap *nicon;
|
||||||
|
|
||||||
|
panel->quarter[1] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||||
|
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[1], gc, panel->icon->width/2, 0, panel->icon->width/2, panel->icon->height/2, 0, 0);
|
||||||
|
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[1], WMGetPixmapMaskXID(panel->icon),
|
||||||
|
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||||
|
WMSetLabelImage(panel->icornerL, nicon);
|
||||||
|
WMReleasePixmap(nicon);
|
||||||
|
}
|
||||||
|
|
||||||
|
panel->hcactionsT[1] = WMCreateTextField(panel->hcactionsF);
|
||||||
|
WMResizeWidget(panel->hcactionsT[1], 180, 20);
|
||||||
|
WMMoveWidget(panel->hcactionsT[1], 50, 50);
|
||||||
|
|
||||||
|
panel->icornerL = WMCreateLabel(panel->hcactionsF);
|
||||||
|
WMResizeWidget(panel->icornerL, 24, 24);
|
||||||
|
WMMoveWidget(panel->icornerL, 10, 78);
|
||||||
|
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
|
||||||
|
if (panel->icon)
|
||||||
|
{
|
||||||
|
WMPixmap *nicon;
|
||||||
|
|
||||||
|
panel->quarter[2] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||||
|
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[2], gc, 0, panel->icon->height/2, panel->icon->width/2, panel->icon->height/2, 0, 0);
|
||||||
|
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[2], WMGetPixmapMaskXID(panel->icon),
|
||||||
|
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||||
|
WMSetLabelImage(panel->icornerL, nicon);
|
||||||
|
WMReleasePixmap(nicon);
|
||||||
|
}
|
||||||
|
panel->hcactionsT[2] = WMCreateTextField(panel->hcactionsF);
|
||||||
|
WMResizeWidget(panel->hcactionsT[2], 180, 20);
|
||||||
|
WMMoveWidget(panel->hcactionsT[2], 50, 80);
|
||||||
|
|
||||||
|
panel->icornerL = WMCreateLabel(panel->hcactionsF);
|
||||||
|
WMResizeWidget(panel->icornerL, 24, 24);
|
||||||
|
WMMoveWidget(panel->icornerL, 10, 108);
|
||||||
|
WMSetLabelImagePosition(panel->icornerL, WIPImageOnly);
|
||||||
|
if (panel->icon)
|
||||||
|
{
|
||||||
|
WMPixmap *nicon;
|
||||||
|
|
||||||
|
panel->quarter[3] = XCreatePixmap(scr->display, WMWidgetXID(panel->parent), panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||||
|
XCopyArea(scr->display, WMGetPixmapXID(panel->icon), panel->quarter[3], gc, panel->icon->width/2, panel->icon->height/2, panel->icon->width/2, panel->icon->height/2, 0, 0);
|
||||||
|
nicon = WMCreatePixmapFromXPixmaps(scr, panel->quarter[3], WMGetPixmapMaskXID(panel->icon),
|
||||||
|
panel->icon->width/2, panel->icon->height/2, WMScreenDepth(scr));
|
||||||
|
WMSetLabelImage(panel->icornerL, nicon);
|
||||||
|
WMReleasePixmap(nicon);
|
||||||
|
}
|
||||||
|
|
||||||
|
panel->hcactionsT[3] = WMCreateTextField(panel->hcactionsF);
|
||||||
|
WMResizeWidget(panel->hcactionsT[3], 180, 20);
|
||||||
|
WMMoveWidget(panel->hcactionsT[3], 50, 107);
|
||||||
|
|
||||||
|
WMMapSubwidgets(panel->hcactionsF);
|
||||||
|
|
||||||
|
if (xis)
|
||||||
|
RReleaseImage(xis);
|
||||||
|
XFreeGC(scr->display, gc);
|
||||||
|
|
||||||
|
WMRealizeWidget(panel->box);
|
||||||
|
WMMapSubwidgets(panel->box);
|
||||||
|
|
||||||
|
showData(panel);
|
||||||
|
}
|
||||||
|
static void prepareForClose(_Panel *panel)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
WMScreen *scr = WMWidgetScreen(panel->parent);
|
||||||
|
|
||||||
|
WMReleasePixmap(panel->icon);
|
||||||
|
for (i = 0; i < sizeof(panel->quarter) / sizeof(Pixmap); i++)
|
||||||
|
XFreePixmap(scr->display, panel->quarter[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
Panel *InitHotCornerShortcuts(WMWidget *parent)
|
||||||
|
{
|
||||||
|
_Panel *panel;
|
||||||
|
|
||||||
|
panel = wmalloc(sizeof(_Panel));
|
||||||
|
|
||||||
|
panel->sectionName = _("Hot Corner Shortcut Preferences");
|
||||||
|
panel->description = _("Choose actions to perform when you move the\n"
|
||||||
|
"mouse pointer to the screen corners.");
|
||||||
|
panel->parent = parent;
|
||||||
|
|
||||||
|
panel->callbacks.createWidgets = createPanel;
|
||||||
|
panel->callbacks.updateDomain = storeData;
|
||||||
|
panel->callbacks.prepareForClose = prepareForClose;
|
||||||
|
|
||||||
|
AddSection(panel, ICON_FILE);
|
||||||
|
|
||||||
|
return panel;
|
||||||
|
}
|
||||||
+260
-117
@@ -21,6 +21,36 @@
|
|||||||
|
|
||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
|
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
const char *db_value;
|
||||||
|
const char *label;
|
||||||
|
} icon_animation[] = {
|
||||||
|
{ "zoom", N_("Shrinking/Zooming") },
|
||||||
|
{ "twist", N_("Spinning/Twisting") },
|
||||||
|
{ "flip", N_("3D-flipping") },
|
||||||
|
{ "none", N_("None") }
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The code is using a convenient trick to make the link between the icon
|
||||||
|
* position and its representing number:
|
||||||
|
* bit[0] tell if the icon are arranged horizontally or vertically
|
||||||
|
* bit[2:1] tell the corner to which they are starting from:
|
||||||
|
* bit[2] is for Top or Bottom choice
|
||||||
|
* bit[1] is for Left or Right choice
|
||||||
|
*/
|
||||||
|
static const char icon_position_dbvalue[][4] = {
|
||||||
|
/* 000: */ "tlv",
|
||||||
|
/* 001: */ "tlh",
|
||||||
|
/* 010: */ "trv",
|
||||||
|
/* 011: */ "trh",
|
||||||
|
/* 100: */ "blv",
|
||||||
|
/* 101: */ "blh",
|
||||||
|
/* 110: */ "brv",
|
||||||
|
/* 111: */ "brh"
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMBox *box;
|
WMBox *box;
|
||||||
|
|
||||||
@@ -36,15 +66,26 @@ typedef struct _Panel {
|
|||||||
WMFrame *posVF;
|
WMFrame *posVF;
|
||||||
WMFrame *posV;
|
WMFrame *posV;
|
||||||
|
|
||||||
WMButton *posB[8];
|
struct {
|
||||||
|
int width, height;
|
||||||
|
} icon_position;
|
||||||
|
|
||||||
|
WMButton *posB[wlengthof_nocheck(icon_position_dbvalue)];
|
||||||
|
|
||||||
WMFrame *animF;
|
WMFrame *animF;
|
||||||
WMButton *animB[4];
|
WMPopUpButton *animP;
|
||||||
|
|
||||||
WMFrame *optF;
|
WMFrame *optF;
|
||||||
WMButton *arrB;
|
WMButton *arrB;
|
||||||
WMButton *omnB;
|
WMButton *omnB;
|
||||||
WMButton *sclB;
|
WMButton *sclB;
|
||||||
|
WMButton *marginB;
|
||||||
|
|
||||||
|
struct {
|
||||||
|
WMFrame *frame;
|
||||||
|
WMSlider *slider;
|
||||||
|
WMLabel *label;
|
||||||
|
} minipreview;
|
||||||
|
|
||||||
WMFrame *sizeF;
|
WMFrame *sizeF;
|
||||||
WMPopUpButton *sizeP;
|
WMPopUpButton *sizeP;
|
||||||
@@ -52,6 +93,16 @@ typedef struct _Panel {
|
|||||||
int iconPos;
|
int iconPos;
|
||||||
} _Panel;
|
} _Panel;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Minimum size for a Mini-Preview:
|
||||||
|
* This value is actually twice the size of the minimum icon size choosable.
|
||||||
|
* We set the slider min to taht number minus one, because when set to this
|
||||||
|
* value WPrefs will consider that the user wants the feature turned off.
|
||||||
|
*/
|
||||||
|
static const int minipreview_minimum_size = 2 * 24 - 1;
|
||||||
|
|
||||||
|
static const int minipreview_maximum_size = 512; /* Arbitrary limit for the slider */
|
||||||
|
|
||||||
#define ICON_FILE "iconprefs"
|
#define ICON_FILE "iconprefs"
|
||||||
|
|
||||||
static void showIconLayout(WMWidget * widget, void *data)
|
static void showIconLayout(WMWidget * widget, void *data)
|
||||||
@@ -60,7 +111,7 @@ static void showIconLayout(WMWidget * widget, void *data)
|
|||||||
int w, h;
|
int w, h;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
for (i = 0; i < wlengthof(panel->posB); i++) {
|
||||||
if (panel->posB[i] == widget) {
|
if (panel->posB[i] == widget) {
|
||||||
panel->iconPos = i;
|
panel->iconPos = i;
|
||||||
break;
|
break;
|
||||||
@@ -81,121 +132,192 @@ static void showIconLayout(WMWidget * widget, void *data)
|
|||||||
WMMoveWidget(panel->posV, 2, 2);
|
WMMoveWidget(panel->posV, 2, 2);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
WMMoveWidget(panel->posV, 95 - 2 - w, 2);
|
WMMoveWidget(panel->posV, panel->icon_position.width - 2 - w, 2);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
WMMoveWidget(panel->posV, 2, 70 - 2 - h);
|
WMMoveWidget(panel->posV, 2, panel->icon_position.height - 2 - h);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
WMMoveWidget(panel->posV, 95 - 2 - w, 70 - 2 - h);
|
WMMoveWidget(panel->posV, panel->icon_position.width - 2 - w, panel->icon_position.height - 2 - h);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void minipreview_slider_changed(WMWidget *w, void *data)
|
||||||
|
{
|
||||||
|
_Panel *panel = (_Panel *) data;
|
||||||
|
char buffer[64];
|
||||||
|
int value;
|
||||||
|
|
||||||
|
/* Parameter is not used, but tell the compiler that it is ok */
|
||||||
|
(void) w;
|
||||||
|
|
||||||
|
value = WMGetSliderValue(panel->minipreview.slider);
|
||||||
|
|
||||||
|
/* Round the value to a multiple of 8 because it makes the displayed value look better */
|
||||||
|
value &= ~7;
|
||||||
|
|
||||||
|
if (value <= minipreview_minimum_size)
|
||||||
|
sprintf(buffer, _("OFF"));
|
||||||
|
else
|
||||||
|
sprintf(buffer, "%i", value);
|
||||||
|
|
||||||
|
WMSetLabelText(panel->minipreview.label, buffer);
|
||||||
|
}
|
||||||
|
|
||||||
static void showData(_Panel * panel)
|
static void showData(_Panel * panel)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
char *str;
|
char *str;
|
||||||
char *def = "blh";
|
Bool b;
|
||||||
|
|
||||||
WMSetButtonSelected(panel->arrB, GetBoolForKey("AutoArrangeIcons"));
|
WMSetButtonSelected(panel->arrB, GetBoolForKey("AutoArrangeIcons"));
|
||||||
WMSetButtonSelected(panel->omnB, GetBoolForKey("StickyIcons"));
|
WMSetButtonSelected(panel->omnB, GetBoolForKey("StickyIcons"));
|
||||||
WMSetButtonSelected(panel->sclB, GetBoolForKey("SingleClickLaunch"));
|
WMSetButtonSelected(panel->sclB, GetBoolForKey("SingleClickLaunch"));
|
||||||
|
WMSetButtonSelected(panel->marginB, GetBoolForKey("EnforceIconMargin"));
|
||||||
|
|
||||||
str = GetStringForKey("IconPosition");
|
str = GetStringForKey("IconPosition");
|
||||||
if (!str)
|
if (str != NULL) {
|
||||||
str = def;
|
for (i = 0; i < wlengthof(icon_position_dbvalue); i++)
|
||||||
if (strlen(str) != 3) {
|
if (strcmp(str, icon_position_dbvalue[i]) == 0) {
|
||||||
wwarning("bad value %s for option IconPosition. Using default blh", str);
|
panel->iconPos = i;
|
||||||
str = def;
|
goto found_position_value;
|
||||||
|
}
|
||||||
|
wwarning(_("bad value \"%s\" for option %s, using default \"%s\""),
|
||||||
|
str, "IconPosition", icon_position_dbvalue[5]);
|
||||||
}
|
}
|
||||||
|
panel->iconPos = 5;
|
||||||
if (str[0] == 't' || str[0] == 'T') {
|
found_position_value:
|
||||||
i = 0;
|
WMPerformButtonClick(panel->posB[panel->iconPos]);
|
||||||
} else {
|
|
||||||
i = 4;
|
|
||||||
}
|
|
||||||
if (str[1] == 'r' || str[1] == 'R') {
|
|
||||||
i += 2;
|
|
||||||
}
|
|
||||||
if (str[2] == 'v' || str[2] == 'V') {
|
|
||||||
i += 0;
|
|
||||||
} else {
|
|
||||||
i += 1;
|
|
||||||
}
|
|
||||||
panel->iconPos = i;
|
|
||||||
WMPerformButtonClick(panel->posB[i]);
|
|
||||||
|
|
||||||
i = GetIntegerForKey("IconSize");
|
i = GetIntegerForKey("IconSize");
|
||||||
i = (i - 24) / 8;
|
i = (i - 24) / 8;
|
||||||
|
|
||||||
if (i < 0)
|
if (i < 0)
|
||||||
i = 0;
|
i = 0;
|
||||||
else if (i > 9)
|
else if (i > 29)
|
||||||
i = 9;
|
i = 29;
|
||||||
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
|
WMSetPopUpButtonSelectedItem(panel->sizeP, i);
|
||||||
|
|
||||||
str = GetStringForKey("IconificationStyle");
|
/* Mini-Previews for Icons */
|
||||||
if (!str)
|
|
||||||
str = "zoom";
|
str = GetStringForKey("MiniwindowPreviewBalloons");
|
||||||
if (strcasecmp(str, "none") == 0)
|
if (str != NULL) {
|
||||||
WMPerformButtonClick(panel->animB[3]);
|
/* New names found, use them in priority */
|
||||||
else if (strcasecmp(str, "twist") == 0)
|
b = GetBoolForKey("MiniwindowPreviewBalloons");
|
||||||
WMPerformButtonClick(panel->animB[1]);
|
if (b) {
|
||||||
else if (strcasecmp(str, "flip") == 0)
|
i = GetIntegerForKey("MiniPreviewSize");
|
||||||
WMPerformButtonClick(panel->animB[2]);
|
if (i <= minipreview_minimum_size)
|
||||||
else {
|
i = minipreview_minimum_size;
|
||||||
WMPerformButtonClick(panel->animB[0]);
|
} else {
|
||||||
|
i = minipreview_minimum_size;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
WMSetSliderValue(panel->minipreview.slider, i);
|
||||||
|
minipreview_slider_changed(panel->minipreview.slider, panel);
|
||||||
|
|
||||||
|
/* Animation */
|
||||||
|
str = GetStringForKey("IconificationStyle");
|
||||||
|
if (str != NULL) {
|
||||||
|
for (i = 0; i < wlengthof(icon_animation); i++) {
|
||||||
|
if (strcasecmp(str, icon_animation[i].db_value) == 0) {
|
||||||
|
WMSetPopUpButtonSelectedItem(panel->animP, i);
|
||||||
|
goto found_animation_value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
wwarning(_("animation style \"%s\" is unknown, resetting to \"%s\""),
|
||||||
|
str, icon_animation[0].db_value);
|
||||||
|
}
|
||||||
|
/* If we're here, no valid value have been found so we fall-back to the default */
|
||||||
|
WMSetPopUpButtonSelectedItem(panel->animP, 0);
|
||||||
|
found_animation_value:
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void createPanel(Panel * p)
|
static void createPanel(Panel * p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) p;
|
_Panel *panel = (_Panel *) p;
|
||||||
|
WMScreen *scr;
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
int i;
|
int i;
|
||||||
char buf[16];
|
char buf[16];
|
||||||
|
int swidth, sheight;
|
||||||
|
int width, height;
|
||||||
|
int startx, starty;
|
||||||
|
|
||||||
panel->box = WMCreateBox(panel->parent);
|
panel->box = WMCreateBox(panel->parent);
|
||||||
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2);
|
||||||
|
|
||||||
/***************** Positioning of Icons *****************/
|
/***************** Positioning of Icons *****************/
|
||||||
panel->posF = WMCreateFrame(panel->box);
|
panel->posF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->posF, 210, 140);
|
WMResizeWidget(panel->posF, 268, 155);
|
||||||
WMMoveWidget(panel->posF, 20, 10);
|
WMMoveWidget(panel->posF, 12, 6);
|
||||||
WMSetFrameTitle(panel->posF, _("Icon Positioning"));
|
WMSetFrameTitle(panel->posF, _("Icon Positioning"));
|
||||||
|
|
||||||
for (i = 0; i < 8; i++) {
|
/*
|
||||||
|
* There is an available area of 240 x 122, starting at x=14 y=20
|
||||||
|
* We have to keep 14 pixels on each side for the buttons,
|
||||||
|
* and an extra pixel for spacing. We also want the final dimension
|
||||||
|
* to be an even number so we can have the 2 buttons per side of
|
||||||
|
* the same size.
|
||||||
|
* In this area, we want to have a rectangle with the same aspect
|
||||||
|
* ratio as the screen.
|
||||||
|
*/
|
||||||
|
scr = WMWidgetScreen(panel->parent);
|
||||||
|
swidth = WidthOfScreen(DefaultScreenOfDisplay(WMScreenDisplay(scr)));
|
||||||
|
sheight = HeightOfScreen(DefaultScreenOfDisplay(WMScreenDisplay(scr)));
|
||||||
|
|
||||||
|
width = swidth * (122 - 15 * 2) / sheight;
|
||||||
|
if (width <= (240 - 15 * 2)) {
|
||||||
|
height = 122 - 15 * 2;
|
||||||
|
} else {
|
||||||
|
width = 240 - 15 * 2;
|
||||||
|
height = sheight * (240 - 15 * 2) / swidth;
|
||||||
|
}
|
||||||
|
|
||||||
|
panel->icon_position.width = width;
|
||||||
|
panel->icon_position.height = height;
|
||||||
|
|
||||||
|
startx = 14 + (240 - 15 * 2 - width) / 2;
|
||||||
|
starty = 20 + (122 - 15 * 2 - height) / 2;
|
||||||
|
|
||||||
|
for (i = 0; i < wlengthof(icon_position_dbvalue); i++) {
|
||||||
|
int x, y, w, h;
|
||||||
|
|
||||||
panel->posB[i] = WMCreateButton(panel->posF, WBTOnOff);
|
panel->posB[i] = WMCreateButton(panel->posF, WBTOnOff);
|
||||||
WMSetButtonAction(panel->posB[i], showIconLayout, panel);
|
WMSetButtonAction(panel->posB[i], showIconLayout, panel);
|
||||||
|
|
||||||
if (i > 0)
|
if (i > 0)
|
||||||
WMGroupButtons(panel->posB[0], panel->posB[i]);
|
WMGroupButtons(panel->posB[0], panel->posB[i]);
|
||||||
|
|
||||||
|
if (i & 1) { /* 0=Vertical, 1=Horizontal */
|
||||||
|
w = width / 2;
|
||||||
|
h = 14;
|
||||||
|
} else {
|
||||||
|
w = 14;
|
||||||
|
h = height / 2;
|
||||||
|
}
|
||||||
|
WMResizeWidget(panel->posB[i], w, h);
|
||||||
|
|
||||||
|
x = startx;
|
||||||
|
y = starty;
|
||||||
|
switch (i) {
|
||||||
|
case 0: x += 0; y += 15; break;
|
||||||
|
case 1: x += 15; y += 0; break;
|
||||||
|
case 2: x += 15 + width; y += 15; break;
|
||||||
|
case 3: x += 15 + w; y += 0; break;
|
||||||
|
case 4: x += 0; y += 15 + h; break;
|
||||||
|
case 5: x += 15; y += 15 + height; break;
|
||||||
|
case 6: x += 15 + width; y += 15 + h; break;
|
||||||
|
case 7: x += 15 + w; y += 15 + height; break;
|
||||||
|
}
|
||||||
|
WMMoveWidget(panel->posB[i], x, y);
|
||||||
}
|
}
|
||||||
WMMoveWidget(panel->posB[1], 58, 25);
|
|
||||||
WMResizeWidget(panel->posB[1], 47, 15);
|
|
||||||
WMMoveWidget(panel->posB[3], 58 + 47, 25);
|
|
||||||
WMResizeWidget(panel->posB[3], 47, 15);
|
|
||||||
|
|
||||||
WMMoveWidget(panel->posB[0], 43, 40);
|
|
||||||
WMResizeWidget(panel->posB[0], 15, 35);
|
|
||||||
WMMoveWidget(panel->posB[4], 43, 40 + 35);
|
|
||||||
WMResizeWidget(panel->posB[4], 15, 35);
|
|
||||||
|
|
||||||
WMMoveWidget(panel->posB[5], 58, 40 + 70);
|
|
||||||
WMResizeWidget(panel->posB[5], 47, 15);
|
|
||||||
WMMoveWidget(panel->posB[7], 58 + 47, 40 + 70);
|
|
||||||
WMResizeWidget(panel->posB[7], 47, 15);
|
|
||||||
|
|
||||||
WMMoveWidget(panel->posB[2], 58 + 95, 40);
|
|
||||||
WMResizeWidget(panel->posB[2], 15, 35);
|
|
||||||
WMMoveWidget(panel->posB[6], 58 + 95, 40 + 35);
|
|
||||||
WMResizeWidget(panel->posB[6], 15, 35);
|
|
||||||
|
|
||||||
color = WMCreateRGBColor(WMWidgetScreen(panel->parent), 0x5100, 0x5100, 0x7100, True);
|
color = WMCreateRGBColor(WMWidgetScreen(panel->parent), 0x5100, 0x5100, 0x7100, True);
|
||||||
panel->posVF = WMCreateFrame(panel->posF);
|
panel->posVF = WMCreateFrame(panel->posF);
|
||||||
WMResizeWidget(panel->posVF, 95, 70);
|
WMResizeWidget(panel->posVF, width, height);
|
||||||
WMMoveWidget(panel->posVF, 58, 40);
|
WMMoveWidget(panel->posVF, startx + 15, starty + 15);
|
||||||
WMSetFrameRelief(panel->posVF, WRSunken);
|
WMSetFrameRelief(panel->posVF, WRSunken);
|
||||||
WMSetWidgetBackgroundColor(panel->posVF, color);
|
WMSetWidgetBackgroundColor(panel->posVF, color);
|
||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
@@ -207,72 +329,100 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/***************** Icon Size ****************/
|
/***************** Icon Size ****************/
|
||||||
panel->sizeF = WMCreateFrame(panel->box);
|
panel->sizeF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->sizeF, 210, 70);
|
WMResizeWidget(panel->sizeF, 100, 52);
|
||||||
WMMoveWidget(panel->sizeF, 20, 155);
|
WMMoveWidget(panel->sizeF, 12, 168);
|
||||||
WMSetFrameTitle(panel->sizeF, _("Icon Size"));
|
WMSetFrameTitle(panel->sizeF, _("Icon Size"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("The size of the dock/application icon and miniwindows"),
|
WMSetBalloonTextForView(_("The size of the dock/application icon and miniwindows"),
|
||||||
WMWidgetView(panel->sizeF));
|
WMWidgetView(panel->sizeF));
|
||||||
|
|
||||||
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
panel->sizeP = WMCreatePopUpButton(panel->sizeF);
|
||||||
WMResizeWidget(panel->sizeP, 161, 20);
|
WMResizeWidget(panel->sizeP, 80, 20);
|
||||||
WMMoveWidget(panel->sizeP, 25, 30);
|
WMMoveWidget(panel->sizeP, 10, 19);
|
||||||
for (i = 24; i <= 96; i += 8) {
|
for (i = 24; i <= 256; i += 8) {
|
||||||
sprintf(buf, "%ix%i", i, i);
|
sprintf(buf, "%ix%i", i, i);
|
||||||
WMAddPopUpButtonItem(panel->sizeP, buf);
|
WMAddPopUpButtonItem(panel->sizeP, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
WMMapSubwidgets(panel->sizeF);
|
WMMapSubwidgets(panel->sizeF);
|
||||||
|
|
||||||
|
/***************** Mini-Previews ****************/
|
||||||
|
panel->minipreview.frame = WMCreateFrame(panel->box);
|
||||||
|
WMResizeWidget(panel->minipreview.frame, 156, 52);
|
||||||
|
WMMoveWidget(panel->minipreview.frame, 124, 168);
|
||||||
|
WMSetFrameTitle(panel->minipreview.frame, _("Mini-Previews for Icons"));
|
||||||
|
|
||||||
|
WMSetBalloonTextForView(_("The Mini-Preview provides a small view of the content of the\n"
|
||||||
|
"window when the mouse is placed over the icon."),
|
||||||
|
WMWidgetView(panel->minipreview.frame));
|
||||||
|
|
||||||
|
panel->minipreview.slider = WMCreateSlider(panel->minipreview.frame);
|
||||||
|
WMResizeWidget(panel->minipreview.slider, 109, 15);
|
||||||
|
WMMoveWidget(panel->minipreview.slider, 11, 23);
|
||||||
|
WMSetSliderMinValue(panel->minipreview.slider, minipreview_minimum_size);
|
||||||
|
WMSetSliderMaxValue(panel->minipreview.slider, minipreview_maximum_size);
|
||||||
|
WMSetSliderAction(panel->minipreview.slider, minipreview_slider_changed, panel);
|
||||||
|
|
||||||
|
panel->minipreview.label = WMCreateLabel(panel->minipreview.frame);
|
||||||
|
WMResizeWidget(panel->minipreview.label, 33, 15);
|
||||||
|
WMMoveWidget(panel->minipreview.label, 120, 23);
|
||||||
|
WMSetLabelText(panel->minipreview.label, _("OFF"));
|
||||||
|
|
||||||
|
WMMapSubwidgets(panel->minipreview.frame);
|
||||||
|
|
||||||
/***************** Animation ****************/
|
/***************** Animation ****************/
|
||||||
panel->animF = WMCreateFrame(panel->box);
|
panel->animF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->animF, 260, 110);
|
WMResizeWidget(panel->animF, 215, 52);
|
||||||
WMMoveWidget(panel->animF, 240, 10);
|
WMMoveWidget(panel->animF, 292, 6);
|
||||||
WMSetFrameTitle(panel->animF, _("Iconification Animation"));
|
WMSetFrameTitle(panel->animF, _("Iconification Animation"));
|
||||||
|
|
||||||
for (i = 0; i < 4; i++) {
|
panel->animP = WMCreatePopUpButton(panel->animF);
|
||||||
panel->animB[i] = WMCreateRadioButton(panel->animF);
|
WMResizeWidget(panel->animP, 195, 20);
|
||||||
WMResizeWidget(panel->animB[i], 145, 20);
|
WMMoveWidget(panel->animP, 10, 19);
|
||||||
WMMoveWidget(panel->animB[i], 15, 18 + i * 22);
|
for (i = 0; i < wlengthof(icon_animation); i++)
|
||||||
}
|
WMAddPopUpButtonItem(panel->animP, _(icon_animation[i].label));
|
||||||
WMGroupButtons(panel->animB[0], panel->animB[1]);
|
|
||||||
WMGroupButtons(panel->animB[0], panel->animB[2]);
|
|
||||||
WMGroupButtons(panel->animB[0], panel->animB[3]);
|
|
||||||
|
|
||||||
WMSetButtonText(panel->animB[0], _("Shrinking/Zooming"));
|
|
||||||
WMSetButtonText(panel->animB[1], _("Spinning/Twisting"));
|
|
||||||
WMSetButtonText(panel->animB[2], _("3D-flipping"));
|
|
||||||
WMSetButtonText(panel->animB[3], _("None"));
|
|
||||||
|
|
||||||
WMMapSubwidgets(panel->animF);
|
WMMapSubwidgets(panel->animF);
|
||||||
|
|
||||||
/***************** Options ****************/
|
/***************** Options ****************/
|
||||||
panel->optF = WMCreateFrame(panel->box);
|
panel->optF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->optF, 260, 95);
|
WMResizeWidget(panel->optF, 215, 148);
|
||||||
WMMoveWidget(panel->optF, 240, 130);
|
WMMoveWidget(panel->optF, 292, 72);
|
||||||
/* WMSetFrameTitle(panel->optF, _("Icon Display")); */
|
/* WMSetFrameTitle(panel->optF, _("Icon Display")); */
|
||||||
|
starty = 8 + 14; /* the last term centers the checkboxes within the panel; subtract 13 for a new option */
|
||||||
|
|
||||||
panel->arrB = WMCreateSwitchButton(panel->optF);
|
panel->arrB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->arrB, 235, 20);
|
WMResizeWidget(panel->arrB, 198, 26);
|
||||||
WMMoveWidget(panel->arrB, 15, 10);
|
WMMoveWidget(panel->arrB, 12, starty);
|
||||||
|
starty += 26;
|
||||||
WMSetButtonText(panel->arrB, _("Auto-arrange icons"));
|
WMSetButtonText(panel->arrB, _("Auto-arrange icons"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Keep icons and miniwindows arranged all the time."), WMWidgetView(panel->arrB));
|
WMSetBalloonTextForView(_("Keep icons and miniwindows arranged all the time."), WMWidgetView(panel->arrB));
|
||||||
|
|
||||||
panel->omnB = WMCreateSwitchButton(panel->optF);
|
panel->omnB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->omnB, 235, 20);
|
WMResizeWidget(panel->omnB, 198, 26);
|
||||||
WMMoveWidget(panel->omnB, 15, 37);
|
WMMoveWidget(panel->omnB, 12, starty);
|
||||||
|
starty += 26;
|
||||||
WMSetButtonText(panel->omnB, _("Omnipresent miniwindows"));
|
WMSetButtonText(panel->omnB, _("Omnipresent miniwindows"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Make miniwindows be present in all workspaces."), WMWidgetView(panel->omnB));
|
WMSetBalloonTextForView(_("Make miniwindows be present in all workspaces."), WMWidgetView(panel->omnB));
|
||||||
|
|
||||||
panel->sclB = WMCreateSwitchButton(panel->optF);
|
panel->sclB = WMCreateSwitchButton(panel->optF);
|
||||||
WMResizeWidget(panel->sclB, 235, 28);
|
WMResizeWidget(panel->sclB, 198, 26);
|
||||||
WMMoveWidget(panel->sclB, 15, 60);
|
WMMoveWidget(panel->sclB, 12, starty);
|
||||||
|
starty += 26;
|
||||||
WMSetButtonText(panel->sclB, _("Single click activation"));
|
WMSetButtonText(panel->sclB, _("Single click activation"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Launch applications and restore windows with a single click."), WMWidgetView(panel->sclB));
|
WMSetBalloonTextForView(_("Launch applications and restore windows with a single click."), WMWidgetView(panel->sclB));
|
||||||
|
|
||||||
|
panel->marginB = WMCreateSwitchButton(panel->optF);
|
||||||
|
WMResizeWidget(panel->marginB, 198, 26);
|
||||||
|
WMMoveWidget(panel->marginB, 12, starty);
|
||||||
|
starty += 26;
|
||||||
|
WMSetButtonText(panel->marginB, _("Enforce icon margin"));
|
||||||
|
|
||||||
|
WMSetBalloonTextForView(_("Make sure that the icon image does not protrude into the icon frame."), WMWidgetView(panel->marginB));
|
||||||
|
|
||||||
WMMapSubwidgets(panel->optF);
|
WMMapSubwidgets(panel->optF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->box);
|
WMRealizeWidget(panel->box);
|
||||||
@@ -283,41 +433,34 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
static void storeData(_Panel * panel)
|
static void storeData(_Panel * panel)
|
||||||
{
|
{
|
||||||
char buf[8];
|
int i;
|
||||||
|
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->arrB), "AutoArrangeIcons");
|
SetBoolForKey(WMGetButtonSelected(panel->arrB), "AutoArrangeIcons");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->omnB), "StickyIcons");
|
SetBoolForKey(WMGetButtonSelected(panel->omnB), "StickyIcons");
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->sclB), "SingleClickLaunch");
|
SetBoolForKey(WMGetButtonSelected(panel->sclB), "SingleClickLaunch");
|
||||||
|
SetBoolForKey(WMGetButtonSelected(panel->marginB), "EnforceIconMargin");
|
||||||
|
|
||||||
SetIntegerForKey(WMGetPopUpButtonSelectedItem(panel->sizeP) * 8 + 24, "IconSize");
|
SetIntegerForKey(WMGetPopUpButtonSelectedItem(panel->sizeP) * 8 + 24, "IconSize");
|
||||||
|
|
||||||
buf[3] = 0;
|
SetStringForKey(icon_position_dbvalue[panel->iconPos], "IconPosition");
|
||||||
|
|
||||||
if (panel->iconPos < 4) {
|
i = WMGetSliderValue(panel->minipreview.slider);
|
||||||
buf[0] = 't';
|
if (i <= minipreview_minimum_size) {
|
||||||
|
SetBoolForKey(False, "MiniwindowPreviewBalloons");
|
||||||
} else {
|
} else {
|
||||||
buf[0] = 'b';
|
SetBoolForKey(True, "MiniwindowPreviewBalloons");
|
||||||
|
if (i < minipreview_maximum_size) {
|
||||||
|
/*
|
||||||
|
* If the value is bigger, it means it was edited by the user manually
|
||||||
|
* so we keep as-is. Otherwise, we round it to a multiple of 8 like it
|
||||||
|
* was done for display
|
||||||
|
*/
|
||||||
|
i &= ~7;
|
||||||
|
}
|
||||||
|
SetIntegerForKey(i, "MiniPreviewSize");
|
||||||
}
|
}
|
||||||
if (panel->iconPos & 2) {
|
|
||||||
buf[1] = 'r';
|
|
||||||
} else {
|
|
||||||
buf[1] = 'l';
|
|
||||||
}
|
|
||||||
if (panel->iconPos & 1) {
|
|
||||||
buf[2] = 'h';
|
|
||||||
} else {
|
|
||||||
buf[2] = 'v';
|
|
||||||
}
|
|
||||||
SetStringForKey(buf, "IconPosition");
|
|
||||||
|
|
||||||
if (WMGetButtonSelected(panel->animB[0]))
|
SetStringForKey(icon_animation[WMGetPopUpButtonSelectedItem(panel->animP)].db_value, "IconificationStyle");
|
||||||
SetStringForKey("zoom", "IconificationStyle");
|
|
||||||
else if (WMGetButtonSelected(panel->animB[1]))
|
|
||||||
SetStringForKey("twist", "IconificationStyle");
|
|
||||||
else if (WMGetButtonSelected(panel->animB[2]))
|
|
||||||
SetStringForKey("flip", "IconificationStyle");
|
|
||||||
else
|
|
||||||
SetStringForKey("none", "IconificationStyle");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Panel *InitIcons(WMWidget *parent)
|
Panel *InitIcons(WMWidget *parent)
|
||||||
|
|||||||
+194
-60
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <sys/select.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
@@ -65,7 +67,7 @@ typedef struct _Panel {
|
|||||||
* First parameter is the internal keyword known by WMaker
|
* First parameter is the internal keyword known by WMaker
|
||||||
* Second is the text displayed to the user
|
* Second is the text displayed to the user
|
||||||
*/
|
*/
|
||||||
static const struct {
|
static struct keyOption {
|
||||||
const char *key;
|
const char *key;
|
||||||
const char *title;
|
const char *title;
|
||||||
} keyOptions[] = {
|
} keyOptions[] = {
|
||||||
@@ -84,11 +86,15 @@ static const struct {
|
|||||||
{ "RHMaximizeKey", N_("Maximize active window right half") },
|
{ "RHMaximizeKey", N_("Maximize active window right half") },
|
||||||
{ "THMaximizeKey", N_("Maximize active window top half") },
|
{ "THMaximizeKey", N_("Maximize active window top half") },
|
||||||
{ "BHMaximizeKey", N_("Maximize active window bottom half") },
|
{ "BHMaximizeKey", N_("Maximize active window bottom half") },
|
||||||
{ "LTCMaximizeKey", N_("Maximize active window left top corner") },
|
{ "TLCMaximizeKey", N_("Maximize active window top left corner") },
|
||||||
{ "RTCMaximizeKey", N_("Maximize active window right top corner") },
|
{ "TRCMaximizeKey", N_("Maximize active window top right corner") },
|
||||||
{ "LBCMaximizeKey", N_("Maximize active window left bottom corner") },
|
{ "BLCMaximizeKey", N_("Maximize active window bottom left corner") },
|
||||||
{ "RBCMaximizeKey", N_("Maximize active window right bottom corner") },
|
{ "BRCMaximizeKey", N_("Maximize active window bottom right corner") },
|
||||||
{ "MaximusKey", N_("Maximus: Tiled maximization ") },
|
{ "MaximusKey", N_("Tile active window") },
|
||||||
|
{ "CenterKey", N_("Center active window") },
|
||||||
|
{ "KeepOnTopKey", N_("Toggle window on top status") },
|
||||||
|
{ "KeepAtBottomKey",N_("Toggle window at bottom status") },
|
||||||
|
{ "OmnipresentKey", N_("Toggle window omnipresent status") },
|
||||||
{ "RaiseKey", N_("Raise active window") },
|
{ "RaiseKey", N_("Raise active window") },
|
||||||
{ "LowerKey", N_("Lower active window") },
|
{ "LowerKey", N_("Lower active window") },
|
||||||
{ "RaiseLowerKey", N_("Raise/Lower window under mouse pointer") },
|
{ "RaiseLowerKey", N_("Raise/Lower window under mouse pointer") },
|
||||||
@@ -101,6 +107,7 @@ static const struct {
|
|||||||
{ "GroupPrevKey", N_("Focus previous group window") },
|
{ "GroupPrevKey", N_("Focus previous group window") },
|
||||||
|
|
||||||
/* Workspace Related */
|
/* Workspace Related */
|
||||||
|
{ "WorkspaceMapKey", N_("Open workspace pager") },
|
||||||
{ "NextWorkspaceKey", N_("Switch to next workspace") },
|
{ "NextWorkspaceKey", N_("Switch to next workspace") },
|
||||||
{ "PrevWorkspaceKey", N_("Switch to previous workspace") },
|
{ "PrevWorkspaceKey", N_("Switch to previous workspace") },
|
||||||
{ "LastWorkspaceKey", N_("Switch to last used workspace") },
|
{ "LastWorkspaceKey", N_("Switch to last used workspace") },
|
||||||
@@ -144,12 +151,20 @@ static const struct {
|
|||||||
{ "WindowShortcut9Key", N_("Shortcut for window 9") },
|
{ "WindowShortcut9Key", N_("Shortcut for window 9") },
|
||||||
{ "WindowShortcut10Key", N_("Shortcut for window 10") },
|
{ "WindowShortcut10Key", N_("Shortcut for window 10") },
|
||||||
|
|
||||||
|
/* Head Selection */
|
||||||
|
{ "MoveTo12to6Head", N_("Move to right/bottom/left/top head") },
|
||||||
|
{ "MoveTo6to12Head", N_("Move to left/top/right/bottom head") },
|
||||||
|
|
||||||
/* Misc. */
|
/* Misc. */
|
||||||
{ "WindowRelaunchKey", N_("Launch new instance of application") },
|
{ "WindowRelaunchKey", N_("Launch new instance of application") },
|
||||||
{ "ScreenSwitchKey", N_("Switch to Next Screen/Monitor") },
|
{ "ScreenSwitchKey", N_("Switch to next screen/monitor") },
|
||||||
{ "RunKey", N_("Run application") },
|
{ "RunKey", N_("Run application") },
|
||||||
|
{ "ExitKey", N_("Exit Window Maker") },
|
||||||
{ "DockRaiseLowerKey", N_("Raise/Lower Dock") },
|
{ "DockRaiseLowerKey", N_("Raise/Lower Dock") },
|
||||||
{ "ClipRaiseLowerKey", N_("Raise/Lower Clip") }
|
{ "ClipRaiseLowerKey", N_("Raise/Lower Clip") },
|
||||||
|
{ "ScreenCaptureKey", N_("Capture the entire screen") },
|
||||||
|
{ "WindowCaptureKey", N_("Capture a window") },
|
||||||
|
{ "PartialCaptureKey", N_("Capture a portion of the screen") }
|
||||||
#ifdef XKB_MODELOCK
|
#ifdef XKB_MODELOCK
|
||||||
,{ "ToggleKbdModeKey", N_("Toggle keyboard language") }
|
,{ "ToggleKbdModeKey", N_("Toggle keyboard language") }
|
||||||
#endif /* XKB_MODELOCK */
|
#endif /* XKB_MODELOCK */
|
||||||
@@ -294,25 +309,61 @@ static int NumLockMask(Display *dpy)
|
|||||||
return mask;
|
return mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Append the modifier prefix and key name to the keybuf */
|
||||||
|
static void build_key_combo(unsigned int xkstate, const char *keyname,
|
||||||
|
unsigned int numlock_mask, char keybuf[64])
|
||||||
|
{
|
||||||
|
if (xkstate & ControlMask)
|
||||||
|
strcat(keybuf, "Control+");
|
||||||
|
if (xkstate & ShiftMask)
|
||||||
|
strcat(keybuf, "Shift+");
|
||||||
|
if ((numlock_mask != Mod1Mask) && (xkstate & Mod1Mask))
|
||||||
|
strcat(keybuf, "Mod1+");
|
||||||
|
if ((numlock_mask != Mod2Mask) && (xkstate & Mod2Mask))
|
||||||
|
strcat(keybuf, "Mod2+");
|
||||||
|
if ((numlock_mask != Mod3Mask) && (xkstate & Mod3Mask))
|
||||||
|
strcat(keybuf, "Mod3+");
|
||||||
|
if ((numlock_mask != Mod4Mask) && (xkstate & Mod4Mask))
|
||||||
|
strcat(keybuf, "Mod4+");
|
||||||
|
if ((numlock_mask != Mod5Mask) && (xkstate & Mod5Mask))
|
||||||
|
strcat(keybuf, "Mod5+");
|
||||||
|
wstrlcat(keybuf, keyname, 64);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Interactively capture a key shortcut or keychain,
|
||||||
|
* function waits KeychainTimeoutDelay or 300 ms after
|
||||||
|
* each key press for another key in the chain,
|
||||||
|
* and returns the full key specification string.
|
||||||
|
*/
|
||||||
char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
||||||
{
|
{
|
||||||
XEvent ev;
|
XEvent ev;
|
||||||
KeySym ksym, lksym, uksym;
|
KeySym ksym, lksym, uksym;
|
||||||
char buffer[64];
|
/* Large enough for several chained chords */
|
||||||
char *key = NULL;
|
char buffer[512];
|
||||||
|
char keybuf[64];
|
||||||
|
char *key;
|
||||||
unsigned int numlock_mask;
|
unsigned int numlock_mask;
|
||||||
|
Bool have_key = False;
|
||||||
|
Bool chain_mode;
|
||||||
|
int timeout_ms;
|
||||||
|
|
||||||
|
timeout_ms = GetIntegerForKey("KeychainTimeoutDelay");
|
||||||
|
if (timeout_ms <= 0)
|
||||||
|
timeout_ms = 300;
|
||||||
|
|
||||||
|
buffer[0] = '\0';
|
||||||
|
|
||||||
|
/* ---- Phase 1: capture the first key (blocking) ---- */
|
||||||
while (*capturing) {
|
while (*capturing) {
|
||||||
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
|
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
|
||||||
WMNextEvent(dpy, &ev);
|
WMNextEvent(dpy, &ev);
|
||||||
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
|
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
|
||||||
numlock_mask = NumLockMask(dpy);
|
numlock_mask = NumLockMask(dpy);
|
||||||
|
|
||||||
if (xext_xkb_supported)
|
/* conditional mask check to get numeric keypad keys */
|
||||||
/* conditional mask check to get numeric keypad keys */
|
ksym = W_KeycodeToKeysym(dpy, ev.xkey.keycode, ev.xkey.state & numlock_mask?1:0);
|
||||||
ksym = XkbKeycodeToKeysym(dpy, ev.xkey.keycode, 0, ev.xkey.state & numlock_mask?1:0);
|
|
||||||
else
|
|
||||||
ksym = XKeycodeToKeysym(dpy, ev.xkey.keycode, 0);
|
|
||||||
|
|
||||||
if (!IsModifierKey(ksym)) {
|
if (!IsModifierKey(ksym)) {
|
||||||
if (convert_case) {
|
if (convert_case) {
|
||||||
@@ -322,44 +373,95 @@ char *capture_shortcut(Display *dpy, Bool *capturing, Bool convert_case)
|
|||||||
key = XKeysymToString(ksym);
|
key = XKeysymToString(ksym);
|
||||||
}
|
}
|
||||||
|
|
||||||
*capturing = 0;
|
keybuf[0] = '\0';
|
||||||
|
build_key_combo(ev.xkey.state, key, numlock_mask, keybuf);
|
||||||
|
wstrlcat(buffer, keybuf, sizeof(buffer));
|
||||||
|
have_key = True;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
WMHandleEvent(&ev);
|
WMHandleEvent(&ev);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!key)
|
/* ---- Phase 2: collect additional chain keys with timeout ---- */
|
||||||
|
chain_mode = (timeout_ms > 0);
|
||||||
|
while (*capturing && chain_mode) {
|
||||||
|
int xfd = ConnectionNumber(dpy);
|
||||||
|
fd_set rfds;
|
||||||
|
struct timeval tv;
|
||||||
|
|
||||||
|
if (!XPending(dpy)) {
|
||||||
|
FD_ZERO(&rfds);
|
||||||
|
FD_SET(xfd, &rfds);
|
||||||
|
tv.tv_sec = timeout_ms / 1000;
|
||||||
|
tv.tv_usec = (timeout_ms % 1000) * 1000;
|
||||||
|
XFlush(dpy);
|
||||||
|
if (select(xfd + 1, &rfds, NULL, NULL, &tv) == 0)
|
||||||
|
break; /* timeout: the chain is complete */
|
||||||
|
}
|
||||||
|
|
||||||
|
XAllowEvents(dpy, AsyncKeyboard, CurrentTime);
|
||||||
|
WMNextEvent(dpy, &ev);
|
||||||
|
if (ev.type == KeyPress && ev.xkey.keycode != 0) {
|
||||||
|
numlock_mask = NumLockMask(dpy);
|
||||||
|
ksym = W_KeycodeToKeysym(dpy, ev.xkey.keycode,
|
||||||
|
ev.xkey.state & numlock_mask ? 1 : 0);
|
||||||
|
|
||||||
|
if (!IsModifierKey(ksym)) {
|
||||||
|
if (convert_case) {
|
||||||
|
XConvertCase(ksym, &lksym, &uksym);
|
||||||
|
key = XKeysymToString(uksym);
|
||||||
|
} else {
|
||||||
|
key = XKeysymToString(ksym);
|
||||||
|
}
|
||||||
|
|
||||||
|
keybuf[0] = '\0';
|
||||||
|
build_key_combo(ev.xkey.state, key, numlock_mask, keybuf);
|
||||||
|
wstrlcat(buffer, " ", sizeof(buffer));
|
||||||
|
wstrlcat(buffer, keybuf, sizeof(buffer));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
WMHandleEvent(&ev);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!have_key || !*capturing)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
buffer[0] = 0;
|
*capturing = 0;
|
||||||
|
|
||||||
if (ev.xkey.state & ControlMask)
|
|
||||||
strcat(buffer, "Control+");
|
|
||||||
|
|
||||||
if (ev.xkey.state & ShiftMask)
|
|
||||||
strcat(buffer, "Shift+");
|
|
||||||
|
|
||||||
if ((numlock_mask != Mod1Mask) && (ev.xkey.state & Mod1Mask))
|
|
||||||
strcat(buffer, "Mod1+");
|
|
||||||
|
|
||||||
if ((numlock_mask != Mod2Mask) && (ev.xkey.state & Mod2Mask))
|
|
||||||
strcat(buffer, "Mod2+");
|
|
||||||
|
|
||||||
if ((numlock_mask != Mod3Mask) && (ev.xkey.state & Mod3Mask))
|
|
||||||
strcat(buffer, "Mod3+");
|
|
||||||
|
|
||||||
if ((numlock_mask != Mod4Mask) && (ev.xkey.state & Mod4Mask))
|
|
||||||
strcat(buffer, "Mod4+");
|
|
||||||
|
|
||||||
if ((numlock_mask != Mod5Mask) && (ev.xkey.state & Mod5Mask))
|
|
||||||
strcat(buffer, "Mod5+");
|
|
||||||
|
|
||||||
strcat(buffer, key);
|
|
||||||
|
|
||||||
return wstrdup(buffer);
|
return wstrdup(buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* check if the keystr entered is already set to another action
|
||||||
|
* if found it returns the position in the keyOptions
|
||||||
|
*/
|
||||||
|
static int isKeySet(_Panel *panel, char *keystr)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char *str;
|
||||||
|
|
||||||
|
for (i = 0; i < panel->actionCount; i++) {
|
||||||
|
str = NULL;
|
||||||
|
if (panel->shortcuts[i]) {
|
||||||
|
str = wtrimspace(panel->shortcuts[i]);
|
||||||
|
if (strlen(str) == 0) {
|
||||||
|
wfree(str);
|
||||||
|
str = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (str) {
|
||||||
|
if (strcmp(keystr, str) == 0) {
|
||||||
|
wfree(str);
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
wfree(str);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
static void captureClick(WMWidget * w, void *data)
|
static void captureClick(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) data;
|
_Panel *panel = (_Panel *) data;
|
||||||
@@ -374,23 +476,37 @@ static void captureClick(WMWidget * w, void *data)
|
|||||||
XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
XGrabKeyboard(dpy, WMWidgetXID(panel->parent), True, GrabModeAsync, GrabModeAsync, CurrentTime);
|
||||||
shortcut = capture_shortcut(dpy, &panel->capturing, 1);
|
shortcut = capture_shortcut(dpy, &panel->capturing, 1);
|
||||||
if (shortcut) {
|
if (shortcut) {
|
||||||
|
int key_idx = -1;
|
||||||
int row = WMGetListSelectedItemRow(panel->actLs);
|
int row = WMGetListSelectedItemRow(panel->actLs);
|
||||||
|
|
||||||
WMSetTextFieldText(panel->shoT, shortcut);
|
key_idx = isKeySet(panel, shortcut);
|
||||||
if (row >= 0) {
|
if (key_idx >= 0 && (key_idx != row)) {
|
||||||
if (panel->shortcuts[row])
|
char *msg;
|
||||||
wfree(panel->shortcuts[row]);
|
|
||||||
panel->shortcuts[row] = shortcut;
|
|
||||||
|
|
||||||
WMRedisplayWidget(panel->actLs);
|
msg = wstrconcat(_("Key shortcut already in use by the "), _(keyOptions[key_idx].title));
|
||||||
} else {
|
WMRunAlertPanel(WMWidgetScreen(w), GetWindow(),
|
||||||
|
_("Error"),
|
||||||
|
msg,
|
||||||
|
_("OK"), NULL, NULL);
|
||||||
|
wfree(msg);
|
||||||
wfree(shortcut);
|
wfree(shortcut);
|
||||||
|
} else {
|
||||||
|
WMSetTextFieldText(panel->shoT, shortcut);
|
||||||
|
if (row >= 0) {
|
||||||
|
if (panel->shortcuts[row])
|
||||||
|
wfree(panel->shortcuts[row]);
|
||||||
|
panel->shortcuts[row] = shortcut;
|
||||||
|
|
||||||
|
WMRedisplayWidget(panel->actLs);
|
||||||
|
} else {
|
||||||
|
wfree(shortcut);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
panel->capturing = 0;
|
panel->capturing = 0;
|
||||||
WMSetButtonText(w, _("Capture"));
|
WMSetButtonText(w, _("Capture"));
|
||||||
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key."));
|
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key(s)."));
|
||||||
XUngrabKeyboard(dpy, CurrentTime);
|
XUngrabKeyboard(dpy, CurrentTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -402,6 +518,9 @@ static void clearShortcut(WMWidget * w, void *data)
|
|||||||
/* Parameter not used, but tell the compiler that it is ok */
|
/* Parameter not used, but tell the compiler that it is ok */
|
||||||
(void) w;
|
(void) w;
|
||||||
|
|
||||||
|
/* Cancel any ongoing capture so the keychain loop is unblocked */
|
||||||
|
panel->capturing = 0;
|
||||||
|
|
||||||
WMSetTextFieldText(panel->shoT, NULL);
|
WMSetTextFieldText(panel->shoT, NULL);
|
||||||
|
|
||||||
if (row >= 0) {
|
if (row >= 0) {
|
||||||
@@ -491,6 +610,20 @@ static void paintItem(WMList * lPtr, int index, Drawable d, char *text, int stat
|
|||||||
WMDrawString(scr, d, panel->black, panel->font, x + 20, y, text, strlen(text));
|
WMDrawString(scr, d, panel->black, panel->font, x + 20, y, text, strlen(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int cmpKeyOptions(const void *v1, const void *v2)
|
||||||
|
{
|
||||||
|
int rc;
|
||||||
|
const struct keyOption *opt1 = (struct keyOption *)v1;
|
||||||
|
const struct keyOption *opt2 = (struct keyOption *)v2;
|
||||||
|
|
||||||
|
if ((rc = strncmp(opt1->title, opt2->title, 20)) < 0)
|
||||||
|
return -1;
|
||||||
|
else if (rc > 0)
|
||||||
|
return 1;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void createPanel(Panel * p)
|
static void createPanel(Panel * p)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) p;
|
_Panel *panel = (_Panel *) p;
|
||||||
@@ -513,8 +646,8 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/* **************** Actions **************** */
|
/* **************** Actions **************** */
|
||||||
panel->actL = WMCreateLabel(panel->box);
|
panel->actL = WMCreateLabel(panel->box);
|
||||||
WMResizeWidget(panel->actL, 280, 20);
|
WMResizeWidget(panel->actL, 314, 20);
|
||||||
WMMoveWidget(panel->actL, 20, 10);
|
WMMoveWidget(panel->actL, 9, 9);
|
||||||
WMSetLabelFont(panel->actL, boldFont);
|
WMSetLabelFont(panel->actL, boldFont);
|
||||||
WMSetLabelText(panel->actL, _("Actions"));
|
WMSetLabelText(panel->actL, _("Actions"));
|
||||||
WMSetLabelRelief(panel->actL, WRSunken);
|
WMSetLabelRelief(panel->actL, WRSunken);
|
||||||
@@ -525,11 +658,12 @@ static void createPanel(Panel * p)
|
|||||||
WMSetLabelTextColor(panel->actL, panel->white);
|
WMSetLabelTextColor(panel->actL, panel->white);
|
||||||
|
|
||||||
panel->actLs = WMCreateList(panel->box);
|
panel->actLs = WMCreateList(panel->box);
|
||||||
WMResizeWidget(panel->actLs, 280, 190);
|
WMResizeWidget(panel->actLs, 314, 191);
|
||||||
WMMoveWidget(panel->actLs, 20, 32);
|
WMMoveWidget(panel->actLs, 9, 31);
|
||||||
WMSetListUserDrawProc(panel->actLs, paintItem);
|
WMSetListUserDrawProc(panel->actLs, paintItem);
|
||||||
WMHangData(panel->actLs, panel);
|
WMHangData(panel->actLs, panel);
|
||||||
|
|
||||||
|
qsort(keyOptions, wlengthof(keyOptions), sizeof(keyOptions[0]), cmpKeyOptions);
|
||||||
for (i = 0; i < wlengthof(keyOptions); i++) {
|
for (i = 0; i < wlengthof(keyOptions); i++) {
|
||||||
WMAddListItem(panel->actLs, _(keyOptions[i].title));
|
WMAddListItem(panel->actLs, _(keyOptions[i].title));
|
||||||
}
|
}
|
||||||
@@ -541,30 +675,30 @@ static void createPanel(Panel * p)
|
|||||||
/***************** Shortcut ****************/
|
/***************** Shortcut ****************/
|
||||||
|
|
||||||
panel->shoF = WMCreateFrame(panel->box);
|
panel->shoF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->shoF, 190, 210);
|
WMResizeWidget(panel->shoF, 178, 214);
|
||||||
WMMoveWidget(panel->shoF, 315, 10);
|
WMMoveWidget(panel->shoF, 333, 8);
|
||||||
WMSetFrameTitle(panel->shoF, _("Shortcut"));
|
WMSetFrameTitle(panel->shoF, _("Shortcut"));
|
||||||
|
|
||||||
panel->shoT = WMCreateTextField(panel->shoF);
|
panel->shoT = WMCreateTextField(panel->shoF);
|
||||||
WMResizeWidget(panel->shoT, 160, 20);
|
WMResizeWidget(panel->shoT, 160, 20);
|
||||||
WMMoveWidget(panel->shoT, 15, 65);
|
WMMoveWidget(panel->shoT, 9, 65);
|
||||||
WMAddNotificationObserver(typedKeys, panel, WMTextDidChangeNotification, panel->shoT);
|
WMAddNotificationObserver(typedKeys, panel, WMTextDidChangeNotification, panel->shoT);
|
||||||
|
|
||||||
panel->cleB = WMCreateCommandButton(panel->shoF);
|
panel->cleB = WMCreateCommandButton(panel->shoF);
|
||||||
WMResizeWidget(panel->cleB, 75, 24);
|
WMResizeWidget(panel->cleB, 75, 24);
|
||||||
WMMoveWidget(panel->cleB, 15, 95);
|
WMMoveWidget(panel->cleB, 9, 95);
|
||||||
WMSetButtonText(panel->cleB, _("Clear"));
|
WMSetButtonText(panel->cleB, _("Clear"));
|
||||||
WMSetButtonAction(panel->cleB, clearShortcut, panel);
|
WMSetButtonAction(panel->cleB, clearShortcut, panel);
|
||||||
|
|
||||||
panel->defB = WMCreateCommandButton(panel->shoF);
|
panel->defB = WMCreateCommandButton(panel->shoF);
|
||||||
WMResizeWidget(panel->defB, 75, 24);
|
WMResizeWidget(panel->defB, 75, 24);
|
||||||
WMMoveWidget(panel->defB, 100, 95);
|
WMMoveWidget(panel->defB, 94, 95);
|
||||||
WMSetButtonText(panel->defB, _("Capture"));
|
WMSetButtonText(panel->defB, _("Capture"));
|
||||||
WMSetButtonAction(panel->defB, captureClick, panel);
|
WMSetButtonAction(panel->defB, captureClick, panel);
|
||||||
|
|
||||||
panel->instructionsL = WMCreateLabel(panel->shoF);
|
panel->instructionsL = WMCreateLabel(panel->shoF);
|
||||||
WMResizeWidget(panel->instructionsL, 160, 55);
|
WMResizeWidget(panel->instructionsL, 160, 55);
|
||||||
WMMoveWidget(panel->instructionsL, 15, 140);
|
WMMoveWidget(panel->instructionsL, 9, 140);
|
||||||
WMSetLabelTextAlignment(panel->instructionsL, WACenter);
|
WMSetLabelTextAlignment(panel->instructionsL, WACenter);
|
||||||
WMSetLabelWraps(panel->instructionsL, True);
|
WMSetLabelWraps(panel->instructionsL, True);
|
||||||
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key."));
|
WMSetLabelText(panel->instructionsL, _("Click on Capture to interactively define the shortcut key."));
|
||||||
|
|||||||
+18
-4
@@ -10,9 +10,20 @@ wpdatadir = @wprefs_datadir@
|
|||||||
|
|
||||||
wpdata_DATA = WPrefs.tiff WPrefs.xpm
|
wpdata_DATA = WPrefs.tiff WPrefs.xpm
|
||||||
|
|
||||||
|
applicationsdir = @datadir@/applications
|
||||||
|
|
||||||
|
applications_DATA = WPrefs.desktop
|
||||||
|
|
||||||
|
WPrefs.desktop: WPrefs.desktop.in
|
||||||
|
$(AM_V_GEN)sed -e "s:#wprefs_bindir#:${wprefs_bindir}:" \
|
||||||
|
-e "s:#wprefs_datadir#:${wprefs_datadir}:" $< > $@
|
||||||
|
|
||||||
EXTRA_DIST = $(wpdata_DATA) \
|
EXTRA_DIST = $(wpdata_DATA) \
|
||||||
KeyboardSettings.c \
|
KeyboardSettings.c \
|
||||||
Themes.c
|
Themes.c \
|
||||||
|
WPrefs.desktop.in
|
||||||
|
|
||||||
|
DISTCLEANFILES = WPrefs.desktop
|
||||||
|
|
||||||
WPrefs_SOURCES = \
|
WPrefs_SOURCES = \
|
||||||
main.c \
|
main.c \
|
||||||
@@ -24,6 +35,7 @@ WPrefs_SOURCES = \
|
|||||||
Expert.c \
|
Expert.c \
|
||||||
Focus.c \
|
Focus.c \
|
||||||
FontSimple.c \
|
FontSimple.c \
|
||||||
|
HotCornerShortcuts.c \
|
||||||
Icons.c \
|
Icons.c \
|
||||||
KeyboardShortcuts.c \
|
KeyboardShortcuts.c \
|
||||||
Menu.c \
|
Menu.c \
|
||||||
@@ -45,10 +57,11 @@ WPrefs_SOURCES = \
|
|||||||
# KeyboardSettings.c \
|
# KeyboardSettings.c \
|
||||||
# Themes.c
|
# Themes.c
|
||||||
|
|
||||||
AM_CFLAGS =
|
AM_CFLAGS = @PANGO_CFLAGS@
|
||||||
|
|
||||||
AM_CPPFLAGS = -DLOCALEDIR=\"$(NLSDIR)\" -DRESOURCE_PATH=\"$(wpdatadir)\" -DWMAKER_RESOURCE_PATH=\"$(pkgdatadir)\" \
|
AM_CPPFLAGS = -DRESOURCE_PATH=\"$(wpdatadir)\" -DWMAKER_RESOURCE_PATH=\"$(pkgdatadir)\" \
|
||||||
-I$(top_srcdir)/wrlib -I$(top_srcdir)/WINGs @HEADER_SEARCH_PATH@
|
-I$(top_builddir)/wrlib -I$(top_srcdir)/WINGs -I$(top_builddir)/WINGs \
|
||||||
|
@HEADER_SEARCH_PATH@
|
||||||
|
|
||||||
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
WPrefs_DEPENDENCIES = $(top_builddir)/WINGs/libWINGs.la
|
||||||
|
|
||||||
@@ -57,5 +70,6 @@ WPrefs_LDADD = \
|
|||||||
$(top_builddir)/WINGs/libWUtil.la\
|
$(top_builddir)/WINGs/libWUtil.la\
|
||||||
$(top_builddir)/wrlib/libwraster.la \
|
$(top_builddir)/wrlib/libwraster.la \
|
||||||
@XLFLAGS@ @XLIBS@ \
|
@XLFLAGS@ @XLIBS@ \
|
||||||
|
@LIBM@ \
|
||||||
@FCLIBS@ \
|
@FCLIBS@ \
|
||||||
@INTLIBS@
|
@INTLIBS@
|
||||||
|
|||||||
+83
-23
@@ -22,6 +22,7 @@
|
|||||||
#include "WPrefs.h"
|
#include "WPrefs.h"
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <X11/keysym.h>
|
#include <X11/keysym.h>
|
||||||
#include <X11/cursorfont.h>
|
#include <X11/cursorfont.h>
|
||||||
@@ -42,7 +43,6 @@ typedef enum {
|
|||||||
} InfoType;
|
} InfoType;
|
||||||
|
|
||||||
#define MAX_SECTION_SIZE 4
|
#define MAX_SECTION_SIZE 4
|
||||||
#define PATH_LEN 256
|
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMBox *box;
|
WMBox *box;
|
||||||
@@ -291,6 +291,8 @@ static void changedItemPad(WMWidget * w, void *data)
|
|||||||
_Panel *panel = (_Panel *) data;
|
_Panel *panel = (_Panel *) data;
|
||||||
int padn = WMGetPopUpButtonSelectedItem(w);
|
int padn = WMGetPopUpButtonSelectedItem(w);
|
||||||
|
|
||||||
|
if (padn < 0)
|
||||||
|
return;
|
||||||
WMUnmapWidget(panel->itemPad[panel->currentPad]);
|
WMUnmapWidget(panel->itemPad[panel->currentPad]);
|
||||||
WMMapWidget(panel->itemPad[padn]);
|
WMMapWidget(panel->itemPad[padn]);
|
||||||
|
|
||||||
@@ -507,7 +509,7 @@ static void createPanel(_Panel * p)
|
|||||||
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
WMSetScrollViewContentView(sview, WMWidgetView(pad));
|
||||||
|
|
||||||
data = putNewItem(panel, pad, ExternalInfo, _("Debian Menu"));
|
data = putNewItem(panel, pad, ExternalInfo, _("Debian Menu"));
|
||||||
data->param.pipe.command = "/etc/X11/WindowMaker/menu.hook";
|
data->param.pipe.command = "/etc/" GSUSER_SUBDIR "/" DEFAULTS_SUBDIR "/menu.hook";
|
||||||
|
|
||||||
data = putNewItem(panel, pad, PipeInfo, _("RedHat Menu"));
|
data = putNewItem(panel, pad, PipeInfo, _("RedHat Menu"));
|
||||||
data->param.pipe.command = "wmconfig --output wmaker";
|
data->param.pipe.command = "wmconfig --output wmaker";
|
||||||
@@ -518,19 +520,25 @@ static void createPanel(_Panel * p)
|
|||||||
data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
|
data = putNewItem(panel, pad, DirectoryInfo, _("Themes"));
|
||||||
data->param.directory.command = "setstyle";
|
data->param.directory.command = "setstyle";
|
||||||
data->param.directory.directory =
|
data->param.directory.directory =
|
||||||
"/usr/share/WindowMaker/Themes /usr/local/share/WindowMaker/Themes $HOME/GNUstep/Library/WindowMaker/Themes";
|
"/usr/share/" PACKAGE_TARNAME "/Themes"
|
||||||
|
" /usr/local/share/" PACKAGE_TARNAME "/Themes"
|
||||||
|
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Themes";
|
||||||
data->param.directory.stripExt = 1;
|
data->param.directory.stripExt = 1;
|
||||||
|
|
||||||
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
|
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (scale)"));
|
||||||
data->param.directory.command = "wmsetbg -u -s";
|
data->param.directory.command = "wmsetbg -u -s";
|
||||||
data->param.directory.directory =
|
data->param.directory.directory =
|
||||||
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
|
"/opt/kde2/share/wallpapers"
|
||||||
|
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
|
||||||
|
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
|
||||||
data->param.directory.stripExt = 1;
|
data->param.directory.stripExt = 1;
|
||||||
|
|
||||||
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)"));
|
data = putNewItem(panel, pad, DirectoryInfo, _("Bg Images (tile)"));
|
||||||
data->param.directory.command = "wmsetbg -u -t";
|
data->param.directory.command = "wmsetbg -u -t";
|
||||||
data->param.directory.directory =
|
data->param.directory.directory =
|
||||||
"/opt/kde2/share/wallpapers /usr/share/WindowMaker/Backgrounds $HOME/GNUstep/Library/WindowMaker/Backgrounds";
|
"/opt/kde2/share/wallpapers"
|
||||||
|
" /usr/share/" PACKAGE_TARNAME "/Backgrounds"
|
||||||
|
" $HOME/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/Backgrounds";
|
||||||
data->param.directory.stripExt = 1;
|
data->param.directory.stripExt = 1;
|
||||||
|
|
||||||
smenu = putNewSubmenu(pad, _("Assorted XTerms"));
|
smenu = putNewSubmenu(pad, _("Assorted XTerms"));
|
||||||
@@ -614,12 +622,13 @@ static void createPanel(_Panel * p)
|
|||||||
WMAddNotificationObserver(dataChanged, panel, WMTextDidChangeNotification, panel->pathT);
|
WMAddNotificationObserver(dataChanged, panel, WMTextDidChangeNotification, panel->pathT);
|
||||||
|
|
||||||
label = WMCreateLabel(panel->pathF);
|
label = WMCreateLabel(panel->pathF);
|
||||||
WMResizeWidget(label, width - 20, 80);
|
WMResizeWidget(label, width - 20, 90);
|
||||||
WMMoveWidget(label, 10, 50);
|
WMMoveWidget(label, 10, 50);
|
||||||
WMSetLabelText(label, _("Enter the path for a file containing a menu\n"
|
WMSetLabelText(label, _("Enter the path for a file containing a menu\n"
|
||||||
"or a list of directories with the programs you\n"
|
"or a list of directories with the programs you\n"
|
||||||
"want to have listed in the menu. Ex:\n"
|
"want to have listed in the menu. Ex:\n"
|
||||||
"~/GNUstep/Library/WindowMaker/menu\n" "or\n" "/usr/bin ~/xbin"));
|
"~/" GSUSER_SUBDIR "/" USERDATA_SUBDIR "/" PACKAGE_TARNAME "/menu\n"
|
||||||
|
"or\n" "/usr/bin ~/xbin"));
|
||||||
|
|
||||||
WMMapSubwidgets(panel->pathF);
|
WMMapSubwidgets(panel->pathF);
|
||||||
|
|
||||||
@@ -804,7 +813,7 @@ static void createPanel(_Panel * p)
|
|||||||
|
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < wlengthof(panel->itemPad); i++)
|
||||||
WMUnmapWidget(panel->itemPad[i]);
|
WMUnmapWidget(panel->itemPad[i]);
|
||||||
}
|
}
|
||||||
changedItemPad(panel->typeP, panel);
|
changedItemPad(panel->typeP, panel);
|
||||||
@@ -914,6 +923,11 @@ static ItemData *parseCommand(WMPropList * item)
|
|||||||
|
|
||||||
data->type = ExecInfo;
|
data->type = ExecInfo;
|
||||||
|
|
||||||
|
if (parameter == NULL) {
|
||||||
|
wfree(data);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
data->param.exec.command = wstrdup(parameter);
|
data->param.exec.command = wstrdup(parameter);
|
||||||
if (shortcut)
|
if (shortcut)
|
||||||
data->param.exec.shortcut = wstrdup(shortcut);
|
data->param.exec.shortcut = wstrdup(shortcut);
|
||||||
@@ -926,6 +940,12 @@ static ItemData *parseCommand(WMPropList * item)
|
|||||||
* |pipe
|
* |pipe
|
||||||
*/
|
*/
|
||||||
p = parameter;
|
p = parameter;
|
||||||
|
|
||||||
|
if (p == NULL) {
|
||||||
|
wfree(data);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
while (isspace(*p) && *p)
|
while (isspace(*p) && *p)
|
||||||
p++;
|
p++;
|
||||||
if (*p == '|') {
|
if (*p == '|') {
|
||||||
@@ -1299,7 +1319,7 @@ static Bool shouldRemoveItem(struct WEditMenuDelegate *delegate, WEditMenu * men
|
|||||||
_("Remove Submenu"),
|
_("Remove Submenu"),
|
||||||
_("Removing this item will destroy all items inside\n"
|
_("Removing this item will destroy all items inside\n"
|
||||||
"the submenu. Do you really want to do that?"),
|
"the submenu. Do you really want to do that?"),
|
||||||
_("Yes"), _("No"), _("Yes, don't ask again."));
|
_("Yes"), _("No"), _("Yes, don't ask again"));
|
||||||
switch (res) {
|
switch (res) {
|
||||||
case WAPRDefault:
|
case WAPRDefault:
|
||||||
return True;
|
return True;
|
||||||
@@ -1436,12 +1456,12 @@ static WEditMenu *buildSubmenu(_Panel * panel, WMPropList * pl)
|
|||||||
WSetEditMenuItemImage(item, panel->markerPix[data->type]);
|
WSetEditMenuItemImage(item, panel->markerPix[data->type]);
|
||||||
WSetEditMenuItemData(item, data, (WMCallback *) freeItemData);
|
WSetEditMenuItemData(item, data, (WMCallback *) freeItemData);
|
||||||
} else {
|
} else {
|
||||||
char *buf = wmalloc(1024);
|
char buf[256];
|
||||||
snprintf(buf, 1024, _("Invalid menu command \"%s\" with label \"%s\" cleared"),
|
|
||||||
|
snprintf(buf, sizeof(buf), _("Invalid menu command \"%s\" with label \"%s\" cleared"),
|
||||||
WMGetFromPLString(WMGetFromPLArray(pi, 1)),
|
WMGetFromPLString(WMGetFromPLArray(pi, 1)),
|
||||||
WMGetFromPLString(WMGetFromPLArray(pi, 0)));
|
WMGetFromPLString(WMGetFromPLArray(pi, 0)));
|
||||||
WMRunAlertPanel(scr, panel->parent, _("Warning"), buf, _("OK"), NULL, NULL);
|
WMRunAlertPanel(scr, panel->parent, _("Warning"), buf, _("OK"), NULL, NULL);
|
||||||
wfree(buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1482,18 +1502,53 @@ static WMPropList *getDefaultMenu(_Panel * panel)
|
|||||||
|
|
||||||
static void showData(_Panel * panel)
|
static void showData(_Panel * panel)
|
||||||
{
|
{
|
||||||
const char *gspath;
|
char *menuPath, *labelText;
|
||||||
char *menuPath;
|
char buf[1024];
|
||||||
WMPropList *pmenu;
|
WMPropList *pmenu;
|
||||||
|
|
||||||
gspath = wusergnusteppath();
|
menuPath = wdefaultspathfordomain("WMRootMenu");
|
||||||
|
|
||||||
menuPath = wmalloc(strlen(gspath) + 32);
|
|
||||||
strcpy(menuPath, gspath);
|
|
||||||
strcat(menuPath, "/Defaults/WMRootMenu");
|
|
||||||
|
|
||||||
pmenu = WMReadPropListFromFile(menuPath);
|
pmenu = WMReadPropListFromFile(menuPath);
|
||||||
|
|
||||||
|
/* check if WMRootMenu references another file, and if so,
|
||||||
|
if that file is in proplist format */
|
||||||
|
while (WMIsPLString(pmenu)) {
|
||||||
|
char *path = NULL;
|
||||||
|
|
||||||
|
path = wexpandpath(WMGetFromPLString(pmenu));
|
||||||
|
|
||||||
|
if (access(path, F_OK) < 0) {
|
||||||
|
char *old_path = path;
|
||||||
|
|
||||||
|
path = wfindfile(DEF_CONFIG_PATHS, path);
|
||||||
|
wfree(old_path);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO: if needed, concatenate locale suffix to path.
|
||||||
|
See getLocalizedMenuFile() in src/rootmenu.c. */
|
||||||
|
|
||||||
|
if (!path)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (access(path, W_OK) < 0) {
|
||||||
|
snprintf(buf, sizeof(buf),
|
||||||
|
_("The menu file \"%s\" referenced by "
|
||||||
|
"WMRootMenu is read-only.\n"
|
||||||
|
"You cannot use WPrefs to modify it."),
|
||||||
|
path);
|
||||||
|
WMRunAlertPanel(WMWidgetScreen(panel->parent),
|
||||||
|
panel->parent,
|
||||||
|
_("Warning"), buf,
|
||||||
|
_("OK"), NULL, NULL);
|
||||||
|
panel->dontSave = True;
|
||||||
|
wfree(path);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
pmenu = WMReadPropListFromFile(path);
|
||||||
|
menuPath = path;
|
||||||
|
}
|
||||||
|
|
||||||
if (!pmenu || !WMIsPLArray(pmenu)) {
|
if (!pmenu || !WMIsPLArray(pmenu)) {
|
||||||
int res;
|
int res;
|
||||||
|
|
||||||
@@ -1518,6 +1573,14 @@ static void showData(_Panel * panel)
|
|||||||
|
|
||||||
panel->menuPath = menuPath;
|
panel->menuPath = menuPath;
|
||||||
|
|
||||||
|
snprintf(buf, sizeof(buf),
|
||||||
|
_("\n\nWhen saved, the menu will be written to the file\n\"%s\"."),
|
||||||
|
menuPath);
|
||||||
|
labelText = WMGetLabelText(panel->sections[NoInfo][0]);
|
||||||
|
labelText = wstrconcat(labelText, buf);
|
||||||
|
WMSetLabelText(panel->sections[NoInfo][0], labelText);
|
||||||
|
wfree(labelText);
|
||||||
|
|
||||||
buildMenuFromPL(panel, pmenu);
|
buildMenuFromPL(panel, pmenu);
|
||||||
|
|
||||||
WMReleasePropList(pmenu);
|
WMReleasePropList(pmenu);
|
||||||
@@ -1558,15 +1621,12 @@ static WMPropList *processData(const char *title, ItemData * data)
|
|||||||
case ExecInfo:
|
case ExecInfo:
|
||||||
if (data->param.exec.command == NULL)
|
if (data->param.exec.command == NULL)
|
||||||
goto return_null;
|
goto return_null;
|
||||||
#if 1
|
|
||||||
if (strpbrk(data->param.exec.command, "&$*|><?`=;")) {
|
if (strpbrk(data->param.exec.command, "&$*|><?`=;")) {
|
||||||
s1 = "SHEXEC";
|
s1 = "SHEXEC";
|
||||||
} else {
|
} else {
|
||||||
s1 = "EXEC";
|
s1 = "EXEC";
|
||||||
}
|
}
|
||||||
#else
|
|
||||||
s1 = "SHEXEC";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (notblank(data->param.exec.shortcut)) {
|
if (notblank(data->param.exec.shortcut)) {
|
||||||
WMAddToPLArray(item, pscut);
|
WMAddToPLArray(item, pscut);
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ static void storeData(_Panel * panel)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < wlengthof(panel->scrB); i++) {
|
||||||
if (WMGetButtonSelected(panel->scrB[i]))
|
if (WMGetButtonSelected(panel->scrB[i]))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
buf1 = wmalloc(strlen(SPEED_IMAGE) + 1);
|
buf1 = wmalloc(strlen(SPEED_IMAGE) + 1);
|
||||||
buf2 = wmalloc(strlen(SPEED_IMAGE_S) + 1);
|
buf2 = wmalloc(strlen(SPEED_IMAGE_S) + 1);
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < wlengthof(panel->scrB); i++) {
|
||||||
panel->scrB[i] = WMCreateCustomButton(panel->scrF, WBBStateChangeMask);
|
panel->scrB[i] = WMCreateCustomButton(panel->scrF, WBBStateChangeMask);
|
||||||
WMResizeWidget(panel->scrB[i], 40, 40);
|
WMResizeWidget(panel->scrB[i], 40, 40);
|
||||||
WMMoveWidget(panel->scrB[i], 15 + (40 * i), 30);
|
WMMoveWidget(panel->scrB[i], 15 + (40 * i), 30);
|
||||||
|
|||||||
+158
-259
@@ -26,11 +26,52 @@
|
|||||||
#include <X11/XKBlib.h>
|
#include <X11/XKBlib.h>
|
||||||
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
|
||||||
#define XSET "xset"
|
#define XSET "xset"
|
||||||
|
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
const char *db_key;
|
||||||
|
int default_action;
|
||||||
|
enum { T_BUTTON, T_WHEEL } type;
|
||||||
|
const char *display_label;
|
||||||
|
} button_list[] = {
|
||||||
|
{ "MouseLeftButtonAction", 3, T_BUTTON, N_("Left Button") },
|
||||||
|
{ "MouseMiddleButtonAction", 2, T_BUTTON, N_("Middle Button") },
|
||||||
|
{ "MouseRightButtonAction", 1, T_BUTTON, N_("Right Button") },
|
||||||
|
{ "MouseBackwardButtonAction", 0, T_BUTTON, N_("Back Button") },
|
||||||
|
{ "MouseForwardButtonAction", 0, T_BUTTON, N_("Forward Button") },
|
||||||
|
{ "MouseWheelAction", 0, T_WHEEL, N_("Mouse Wheel") },
|
||||||
|
{ "MouseWheelTiltAction", 0, T_WHEEL, N_("Mouse Wheel Tilt") }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
const char *db_value;
|
||||||
|
const char *label;
|
||||||
|
} button_actions[] = {
|
||||||
|
{ "None", N_("None") },
|
||||||
|
{ "OpenApplicationsMenu", N_("Applications Menu") },
|
||||||
|
{ "OpenWindowListMenu", N_("Window List Menu") },
|
||||||
|
{ "SelectWindows", N_("Select Windows") },
|
||||||
|
{ "MoveToPrevWorkspace", N_("Previous Workspace") },
|
||||||
|
{ "MoveToNextWorkspace", N_("Next Workspace") },
|
||||||
|
{ "MoveToPrevWindow", N_("Previous Window") },
|
||||||
|
{ "MoveToNextWindow", N_("Next Window") }
|
||||||
|
};
|
||||||
|
|
||||||
|
static const struct {
|
||||||
|
const char *db_value;
|
||||||
|
const char *label;
|
||||||
|
} wheel_actions[] = {
|
||||||
|
{ "None", N_("None") },
|
||||||
|
{ "SwitchWorkspaces", N_("Switch Workspaces") },
|
||||||
|
{ "SwitchWindows", N_("Switch Windows") }
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct _Panel {
|
typedef struct _Panel {
|
||||||
WMBox *box;
|
WMBox *box;
|
||||||
|
|
||||||
@@ -57,20 +98,10 @@ typedef struct _Panel {
|
|||||||
DoubleTest *tester;
|
DoubleTest *tester;
|
||||||
|
|
||||||
WMFrame *menuF;
|
WMFrame *menuF;
|
||||||
WMLabel *button1L;
|
struct {
|
||||||
WMLabel *button2L;
|
WMLabel *label;
|
||||||
WMLabel *button3L;
|
WMPopUpButton *popup;
|
||||||
WMLabel *button8L;
|
} mouse_action[wlengthof_nocheck(button_list)];
|
||||||
WMLabel *button9L;
|
|
||||||
WMLabel *wheelL;
|
|
||||||
WMLabel *wheelTiltL;
|
|
||||||
WMPopUpButton *button1P;
|
|
||||||
WMPopUpButton *button2P;
|
|
||||||
WMPopUpButton *button3P;
|
|
||||||
WMPopUpButton *button8P;
|
|
||||||
WMPopUpButton *button9P;
|
|
||||||
WMPopUpButton *wheelP;
|
|
||||||
WMPopUpButton *wheelTiltP;
|
|
||||||
|
|
||||||
WMButton *disaB;
|
WMButton *disaB;
|
||||||
|
|
||||||
@@ -93,10 +124,6 @@ typedef struct _Panel {
|
|||||||
|
|
||||||
static char *modifierNames[8];
|
static char *modifierNames[8];
|
||||||
|
|
||||||
static char *buttonActions[4];
|
|
||||||
|
|
||||||
static char *wheelActions[2];
|
|
||||||
|
|
||||||
#define DELAY(i) ((i)*75+170)
|
#define DELAY(i) ((i)*75+170)
|
||||||
|
|
||||||
|
|
||||||
@@ -163,13 +190,29 @@ static void returnPressed(void *observerData, WMNotification * notification)
|
|||||||
speedChange(NULL, panel);
|
speedChange(NULL, panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void toggle_disabling_of_mouse_actions(WMWidget *w, void *client_data)
|
||||||
|
{
|
||||||
|
WMButton *button = (WMButton *) w;
|
||||||
|
Panel *panel = (Panel *) client_data;
|
||||||
|
Bool do_enable;
|
||||||
|
int i;
|
||||||
|
|
||||||
|
if (WMGetButtonSelected(button))
|
||||||
|
do_enable = False;
|
||||||
|
else
|
||||||
|
do_enable = True;
|
||||||
|
|
||||||
|
for (i = 0; i < wlengthof(panel->mouse_action); i++)
|
||||||
|
WMSetPopUpButtonEnabled(panel->mouse_action[i].popup, do_enable);
|
||||||
|
}
|
||||||
|
|
||||||
static void doubleClick(WMWidget * w, void *data)
|
static void doubleClick(WMWidget * w, void *data)
|
||||||
{
|
{
|
||||||
_Panel *panel = (_Panel *) data;
|
_Panel *panel = (_Panel *) data;
|
||||||
int i;
|
int i;
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < wlengthof(panel->ddelaB); i++) {
|
||||||
if (panel->ddelaB[i] == w)
|
if (panel->ddelaB[i] == w)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -181,34 +224,32 @@ static void doubleClick(WMWidget * w, void *data)
|
|||||||
|
|
||||||
static int getButtonAction(const char *str)
|
static int getButtonAction(const char *str)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
if (!str)
|
if (!str)
|
||||||
return -2;
|
return -2;
|
||||||
|
|
||||||
if (strcasecmp(str, "None") == 0)
|
for (i = 0; i < wlengthof(button_actions); i++) {
|
||||||
return 0;
|
if (strcasecmp(str, button_actions[i].db_value) == 0)
|
||||||
else if (strcasecmp(str, "OpenApplicationsMenu") == 0)
|
return i;
|
||||||
return 1;
|
}
|
||||||
else if (strcasecmp(str, "OpenWindowListMenu") == 0)
|
|
||||||
return 2;
|
|
||||||
else if (strcasecmp(str, "SelectWindows") == 0)
|
|
||||||
return 3;
|
|
||||||
else
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int getWheelAction(const char *str)
|
static int getWheelAction(const char *str)
|
||||||
{
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
if (!str)
|
if (!str)
|
||||||
return -2;
|
return -2;
|
||||||
|
|
||||||
if (strcasecmp(str, "None") == 0)
|
for (i = 0; i < wlengthof(wheel_actions); i++) {
|
||||||
return 0;
|
if (strcasecmp(str, wheel_actions[i].db_value) == 0)
|
||||||
else if (strcasecmp(str, "SwitchWorkspaces") == 0)
|
return i;
|
||||||
return 1;
|
}
|
||||||
else
|
|
||||||
return -1;
|
|
||||||
|
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void getMouseParameters(Display * dpy, float *accel, int *thre)
|
static void getMouseParameters(Display * dpy, float *accel, int *thre)
|
||||||
@@ -224,96 +265,30 @@ static void showData(_Panel * panel)
|
|||||||
{
|
{
|
||||||
char *str;
|
char *str;
|
||||||
int i;
|
int i;
|
||||||
int a = -1, b = -1, c = -1, w = -1;
|
int a = -1, b = -1;
|
||||||
float accel;
|
float accel;
|
||||||
char buffer[32];
|
char buffer[32];
|
||||||
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->parent));
|
Display *dpy = WMScreenDisplay(WMWidgetScreen(panel->parent));
|
||||||
|
|
||||||
str = GetStringForKey("MouseLeftButtonAction");
|
for (i = 0; i < wlengthof(button_list); i++) {
|
||||||
i = getButtonAction(str);
|
int action;
|
||||||
if (i < 0) {
|
|
||||||
a = 3;
|
|
||||||
if (i == -1) {
|
|
||||||
wwarning(_("bad value %s for option %s"), str, "MouseLeftButtonAction");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
a = i;
|
|
||||||
}
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->button1P, a);
|
|
||||||
|
|
||||||
str = GetStringForKey("MouseMiddleButtonAction");
|
str = GetStringForKey(button_list[i].db_key);
|
||||||
i = getButtonAction(str);
|
if (button_list[i].type == T_BUTTON)
|
||||||
if (i < 0) {
|
action = getButtonAction(str);
|
||||||
b = 2;
|
else
|
||||||
if (i == -1) {
|
action = getWheelAction(str);
|
||||||
wwarning(_("bad value %s for option %s"), str, "MouseMiddleButtonAction");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
b = i;
|
|
||||||
}
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->button2P, b);
|
|
||||||
|
|
||||||
str = GetStringForKey("MouseRightButtonAction");
|
if (action < 0) {
|
||||||
i = getButtonAction(str);
|
if (action == -1)
|
||||||
if (i < 0) {
|
wwarning(_("bad value %s for option %s"), str, button_list[i].db_key);
|
||||||
c = 1;
|
action = button_list[i].default_action;
|
||||||
if (i == -1) {
|
|
||||||
wwarning(_("bad value %s for option %s"), str, "MouseRightButtonAction");
|
|
||||||
}
|
}
|
||||||
} else {
|
WMSetPopUpButtonSelectedItem(panel->mouse_action[i].popup, action);
|
||||||
c = i;
|
|
||||||
}
|
}
|
||||||
WMSetPopUpButtonSelectedItem(panel->button3P, c);
|
|
||||||
|
|
||||||
str = GetStringForKey("MouseBackwardButtonAction");
|
|
||||||
i = getButtonAction(str);
|
|
||||||
if (i < 0) {
|
|
||||||
b = 0;
|
|
||||||
if (i == -1) {
|
|
||||||
wwarning(_("bad value %s for option %s"), str, "MouseBackwardButtonAction");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
b = i;
|
|
||||||
}
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->button8P, b);
|
|
||||||
|
|
||||||
str = GetStringForKey("MouseForwardButtonAction");
|
|
||||||
i = getButtonAction(str);
|
|
||||||
if (i < 0) {
|
|
||||||
b = 0;
|
|
||||||
if (i == -1) {
|
|
||||||
wwarning(_("bad value %s for option %s"), str, "MouseForwardButtonAction");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
b = i;
|
|
||||||
}
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->button9P, b);
|
|
||||||
|
|
||||||
str = GetStringForKey("MouseWheelAction");
|
|
||||||
i = getWheelAction(str);
|
|
||||||
if (i < 0) {
|
|
||||||
w = 0;
|
|
||||||
if (i == -1) {
|
|
||||||
wwarning(_("bad value %s for option %s"), str, "MouseWheelAction");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
w = i;
|
|
||||||
}
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->wheelP, w);
|
|
||||||
|
|
||||||
str = GetStringForKey("MouseWheelTiltAction");
|
|
||||||
i = getWheelAction(str);
|
|
||||||
if (i < 0) {
|
|
||||||
w = 0;
|
|
||||||
if (i == -1) {
|
|
||||||
wwarning(_("bad value %s for option %s"), str, "MouseWheelTiltAction");
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
w = i;
|
|
||||||
}
|
|
||||||
WMSetPopUpButtonSelectedItem(panel->wheelTiltP, w);
|
|
||||||
|
|
||||||
WMSetButtonSelected(panel->disaB, GetBoolForKey("DisableWSMouseActions"));
|
WMSetButtonSelected(panel->disaB, GetBoolForKey("DisableWSMouseActions"));
|
||||||
|
toggle_disabling_of_mouse_actions(panel->disaB, panel);
|
||||||
|
|
||||||
/**/ getMouseParameters(dpy, &accel, &a);
|
/**/ getMouseParameters(dpy, &accel, &a);
|
||||||
panel->maxThreshold = WidthOfScreen(DefaultScreenOfDisplay(dpy));
|
panel->maxThreshold = WidthOfScreen(DefaultScreenOfDisplay(dpy));
|
||||||
@@ -323,16 +298,16 @@ static void showData(_Panel * panel)
|
|||||||
sprintf(buffer, "%i", a);
|
sprintf(buffer, "%i", a);
|
||||||
WMSetTextFieldText(panel->threT, buffer);
|
WMSetTextFieldText(panel->threT, buffer);
|
||||||
|
|
||||||
WMSetSliderValue(panel->speedS, (accel - 0.25) / 0.25);
|
WMSetSliderValue(panel->speedS, (accel - 0.25F) / 0.25F);
|
||||||
|
|
||||||
panel->acceleration = accel;
|
panel->acceleration = accel;
|
||||||
sprintf(buffer, "%.2f", accel);
|
sprintf(buffer, "%.2f", (double)accel);
|
||||||
WMSetTextFieldText(panel->acceT, buffer);
|
WMSetTextFieldText(panel->acceT, buffer);
|
||||||
|
|
||||||
/**/ b = GetIntegerForKey("DoubleClickTime");
|
/**/ b = GetIntegerForKey("DoubleClickTime");
|
||||||
/* find best match */
|
/* find best match */
|
||||||
a = -1;
|
a = -1;
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < wlengthof(panel->ddelaB); i++) {
|
||||||
if (DELAY(i) == b)
|
if (DELAY(i) == b)
|
||||||
a = i;
|
a = i;
|
||||||
}
|
}
|
||||||
@@ -406,10 +381,7 @@ static void fillModifierPopUp(WMPopUpButton * pop)
|
|||||||
if (mapping->modifiermap[idx] != 0) {
|
if (mapping->modifiermap[idx] != 0) {
|
||||||
int l;
|
int l;
|
||||||
for (l = 0; l < 4; l++) {
|
for (l = 0; l < 4; l++) {
|
||||||
if (xext_xkb_supported)
|
ksym = W_KeycodeToKeysym(dpy, mapping->modifiermap[idx], l);
|
||||||
ksym = XkbKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0, l);
|
|
||||||
else
|
|
||||||
ksym = XKeycodeToKeysym(dpy, mapping->modifiermap[idx], 0);
|
|
||||||
if (ksym != NoSymbol)
|
if (ksym != NoSymbol)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -478,13 +450,13 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
/**************** Mouse Speed ****************/
|
/**************** Mouse Speed ****************/
|
||||||
panel->speedF = WMCreateFrame(panel->box);
|
panel->speedF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->speedF, 225, 90);
|
WMResizeWidget(panel->speedF, 219, 85);
|
||||||
WMMoveWidget(panel->speedF, 15, 5);
|
WMMoveWidget(panel->speedF, 9, 54);
|
||||||
WMSetFrameTitle(panel->speedF, _("Mouse Speed"));
|
WMSetFrameTitle(panel->speedF, _("Mouse Speed"));
|
||||||
|
|
||||||
panel->speedL = WMCreateLabel(panel->speedF);
|
panel->speedL = WMCreateLabel(panel->speedF);
|
||||||
WMResizeWidget(panel->speedL, 40, 46);
|
WMResizeWidget(panel->speedL, 40, 46);
|
||||||
WMMoveWidget(panel->speedL, 10, 14);
|
WMMoveWidget(panel->speedL, 8, 10);
|
||||||
WMSetLabelImagePosition(panel->speedL, WIPImageOnly);
|
WMSetLabelImagePosition(panel->speedL, WIPImageOnly);
|
||||||
path = LocateImage(SPEED_ICON_FILE);
|
path = LocateImage(SPEED_ICON_FILE);
|
||||||
if (path) {
|
if (path) {
|
||||||
@@ -500,7 +472,7 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
panel->speedS = WMCreateSlider(panel->speedF);
|
panel->speedS = WMCreateSlider(panel->speedF);
|
||||||
WMResizeWidget(panel->speedS, 150, 15);
|
WMResizeWidget(panel->speedS, 150, 15);
|
||||||
WMMoveWidget(panel->speedS, 60, 35);
|
WMMoveWidget(panel->speedS, 58, 30);
|
||||||
WMSetSliderMinValue(panel->speedS, 0);
|
WMSetSliderMinValue(panel->speedS, 0);
|
||||||
WMSetSliderMaxValue(panel->speedS, 40);
|
WMSetSliderMaxValue(panel->speedS, 40);
|
||||||
WMSetSliderContinuous(panel->speedS, False);
|
WMSetSliderContinuous(panel->speedS, False);
|
||||||
@@ -508,32 +480,32 @@ static void createPanel(Panel * p)
|
|||||||
|
|
||||||
panel->acceL = WMCreateLabel(panel->speedF);
|
panel->acceL = WMCreateLabel(panel->speedF);
|
||||||
WMResizeWidget(panel->acceL, 50, 16);
|
WMResizeWidget(panel->acceL, 50, 16);
|
||||||
WMMoveWidget(panel->acceL, 10, 65);
|
WMMoveWidget(panel->acceL, 8, 58);
|
||||||
WMSetLabelTextAlignment(panel->acceL, WARight);
|
WMSetLabelTextAlignment(panel->acceL, WARight);
|
||||||
WMSetLabelText(panel->acceL, _("Accel.:"));
|
WMSetLabelText(panel->acceL, _("Accel.:"));
|
||||||
|
|
||||||
panel->acceT = WMCreateTextField(panel->speedF);
|
panel->acceT = WMCreateTextField(panel->speedF);
|
||||||
WMResizeWidget(panel->acceT, 40, 20);
|
WMResizeWidget(panel->acceT, 40, 20);
|
||||||
WMMoveWidget(panel->acceT, 60, 63);
|
WMMoveWidget(panel->acceT, 58, 56);
|
||||||
WMAddNotificationObserver(returnPressed, panel, WMTextDidEndEditingNotification, panel->acceT);
|
WMAddNotificationObserver(returnPressed, panel, WMTextDidEndEditingNotification, panel->acceT);
|
||||||
|
|
||||||
panel->threL = WMCreateLabel(panel->speedF);
|
panel->threL = WMCreateLabel(panel->speedF);
|
||||||
WMResizeWidget(panel->threL, 80, 16);
|
WMResizeWidget(panel->threL, 80, 16);
|
||||||
WMMoveWidget(panel->threL, 100, 65);
|
WMMoveWidget(panel->threL, 98, 58);
|
||||||
WMSetLabelTextAlignment(panel->threL, WARight);
|
WMSetLabelTextAlignment(panel->threL, WARight);
|
||||||
WMSetLabelText(panel->threL, _("Threshold:"));
|
WMSetLabelText(panel->threL, _("Threshold:"));
|
||||||
|
|
||||||
panel->threT = WMCreateTextField(panel->speedF);
|
panel->threT = WMCreateTextField(panel->speedF);
|
||||||
WMResizeWidget(panel->threT, 30, 20);
|
WMResizeWidget(panel->threT, 30, 20);
|
||||||
WMMoveWidget(panel->threT, 180, 63);
|
WMMoveWidget(panel->threT, 178, 56);
|
||||||
WMAddNotificationObserver(returnPressed, panel, WMTextDidEndEditingNotification, panel->threT);
|
WMAddNotificationObserver(returnPressed, panel, WMTextDidEndEditingNotification, panel->threT);
|
||||||
|
|
||||||
WMMapSubwidgets(panel->speedF);
|
WMMapSubwidgets(panel->speedF);
|
||||||
|
|
||||||
/* ************** Grab Modifier **************** */
|
/* ************** Grab Modifier **************** */
|
||||||
panel->grabF = WMCreateFrame(panel->box);
|
panel->grabF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->grabF, 225, 45);
|
WMResizeWidget(panel->grabF, 219, 46);
|
||||||
WMMoveWidget(panel->grabF, 15, 95);
|
WMMoveWidget(panel->grabF, 9, 5);
|
||||||
WMSetFrameTitle(panel->grabF, _("Mouse Grab Modifier"));
|
WMSetFrameTitle(panel->grabF, _("Mouse Grab Modifier"));
|
||||||
|
|
||||||
WMSetBalloonTextForView(_("Keyboard modifier to use for actions that\n"
|
WMSetBalloonTextForView(_("Keyboard modifier to use for actions that\n"
|
||||||
@@ -541,8 +513,8 @@ static void createPanel(Panel * p)
|
|||||||
"clicking inside the window."), WMWidgetView(panel->grabF));
|
"clicking inside the window."), WMWidgetView(panel->grabF));
|
||||||
|
|
||||||
panel->grabP = WMCreatePopUpButton(panel->grabF);
|
panel->grabP = WMCreatePopUpButton(panel->grabF);
|
||||||
WMResizeWidget(panel->grabP, 160, 20);
|
WMResizeWidget(panel->grabP, 178, 20);
|
||||||
WMMoveWidget(panel->grabP, 50, 18);
|
WMMoveWidget(panel->grabP, 20, 17);
|
||||||
|
|
||||||
fillModifierPopUp(panel->grabP);
|
fillModifierPopUp(panel->grabP);
|
||||||
WMMapSubwidgets(panel->grabF);
|
WMMapSubwidgets(panel->grabF);
|
||||||
@@ -550,17 +522,17 @@ static void createPanel(Panel * p)
|
|||||||
/***************** Doubleclick Delay ****************/
|
/***************** Doubleclick Delay ****************/
|
||||||
|
|
||||||
panel->ddelaF = WMCreateFrame(panel->box);
|
panel->ddelaF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->ddelaF, 225, 87);
|
WMResizeWidget(panel->ddelaF, 219, 80);
|
||||||
WMMoveWidget(panel->ddelaF, 15, 140);
|
WMMoveWidget(panel->ddelaF, 9, 142);
|
||||||
WMSetFrameTitle(panel->ddelaF, _("Double-Click Delay"));
|
WMSetFrameTitle(panel->ddelaF, _("Double-Click Delay"));
|
||||||
|
|
||||||
buf1 = wmalloc(strlen(DELAY_ICON) + 2);
|
buf1 = wmalloc(strlen(DELAY_ICON) + 2);
|
||||||
buf2 = wmalloc(strlen(DELAY_ICON_S) + 2);
|
buf2 = wmalloc(strlen(DELAY_ICON_S) + 2);
|
||||||
|
|
||||||
for (i = 0; i < 5; i++) {
|
for (i = 0; i < wlengthof(panel->ddelaB); i++) {
|
||||||
panel->ddelaB[i] = WMCreateCustomButton(panel->ddelaF, WBBStateChangeMask);
|
panel->ddelaB[i] = WMCreateCustomButton(panel->ddelaF, WBBStateChangeMask);
|
||||||
WMResizeWidget(panel->ddelaB[i], 25, 25);
|
WMResizeWidget(panel->ddelaB[i], 25, 25);
|
||||||
WMMoveWidget(panel->ddelaB[i], 20 + (40 * i), 20);
|
WMMoveWidget(panel->ddelaB[i], 18 + (40 * i), 18);
|
||||||
WMSetButtonBordered(panel->ddelaB[i], False);
|
WMSetButtonBordered(panel->ddelaB[i], False);
|
||||||
WMSetButtonImagePosition(panel->ddelaB[i], WIPImageOnly);
|
WMSetButtonImagePosition(panel->ddelaB[i], WIPImageOnly);
|
||||||
WMSetButtonAction(panel->ddelaB[i], doubleClick, panel);
|
WMSetButtonAction(panel->ddelaB[i], doubleClick, panel);
|
||||||
@@ -596,16 +568,16 @@ static void createPanel(Panel * p)
|
|||||||
wfree(buf2);
|
wfree(buf2);
|
||||||
|
|
||||||
panel->tester = CreateDoubleTest(panel->ddelaF, _("Test"));
|
panel->tester = CreateDoubleTest(panel->ddelaF, _("Test"));
|
||||||
WMResizeWidget(panel->tester, 84, 29);
|
WMResizeWidget(panel->tester, 84, 24);
|
||||||
WMMoveWidget(panel->tester, 25, 52);
|
WMMoveWidget(panel->tester, 20, 48);
|
||||||
|
|
||||||
panel->ddelaT = WMCreateTextField(panel->ddelaF);
|
panel->ddelaT = WMCreateTextField(panel->ddelaF);
|
||||||
WMResizeWidget(panel->ddelaT, 40, 20);
|
WMResizeWidget(panel->ddelaT, 40, 20);
|
||||||
WMMoveWidget(panel->ddelaT, 130, 57);
|
WMMoveWidget(panel->ddelaT, 130, 50);
|
||||||
|
|
||||||
panel->ddelaL = WMCreateLabel(panel->ddelaF);
|
panel->ddelaL = WMCreateLabel(panel->ddelaF);
|
||||||
WMResizeWidget(panel->ddelaL, 40, 16);
|
WMResizeWidget(panel->ddelaL, 40, 16);
|
||||||
WMMoveWidget(panel->ddelaL, 175, 63);
|
WMMoveWidget(panel->ddelaL, 173, 54);
|
||||||
{
|
{
|
||||||
WMFont *font;
|
WMFont *font;
|
||||||
WMColor *color;
|
WMColor *color;
|
||||||
@@ -617,105 +589,44 @@ static void createPanel(Panel * p)
|
|||||||
WMReleaseFont(font);
|
WMReleaseFont(font);
|
||||||
WMReleaseColor(color);
|
WMReleaseColor(color);
|
||||||
}
|
}
|
||||||
WMSetLabelText(panel->ddelaL, _("msec"));
|
WMSetLabelText(panel->ddelaL, _("ms"));
|
||||||
|
|
||||||
WMMapSubwidgets(panel->ddelaF);
|
WMMapSubwidgets(panel->ddelaF);
|
||||||
|
|
||||||
/* ************** Workspace Action Buttons **************** */
|
/* ************** Workspace Action Buttons **************** */
|
||||||
|
|
||||||
panel->menuF = WMCreateFrame(panel->box);
|
panel->menuF = WMCreateFrame(panel->box);
|
||||||
WMResizeWidget(panel->menuF, 260, 222);
|
WMResizeWidget(panel->menuF, 276, 217);
|
||||||
WMMoveWidget(panel->menuF, 250, 5);
|
WMMoveWidget(panel->menuF, 236, 5);
|
||||||
WMSetFrameTitle(panel->menuF, _("Workspace Mouse Actions"));
|
WMSetFrameTitle(panel->menuF, _("Workspace Mouse Actions"));
|
||||||
|
|
||||||
panel->disaB = WMCreateSwitchButton(panel->menuF);
|
panel->disaB = WMCreateSwitchButton(panel->menuF);
|
||||||
WMResizeWidget(panel->disaB, 205, 18);
|
WMResizeWidget(panel->disaB, 254, 18);
|
||||||
WMMoveWidget(panel->disaB, 10, 15);
|
WMMoveWidget(panel->disaB, 10, 15);
|
||||||
WMSetButtonText(panel->disaB, _("Disable mouse actions"));
|
WMSetButtonText(panel->disaB, _("Disable mouse actions"));
|
||||||
|
WMSetButtonAction(panel->disaB, toggle_disabling_of_mouse_actions, panel);
|
||||||
|
|
||||||
panel->button1L = WMCreateLabel(panel->menuF);
|
for (i = 0; i < wlengthof(button_list); i++) {
|
||||||
WMResizeWidget(panel->button1L, 107, 20);
|
int j;
|
||||||
WMMoveWidget(panel->button1L, 5, 40);
|
|
||||||
WMSetLabelTextAlignment(panel->button1L, WARight);
|
|
||||||
WMSetLabelText(panel->button1L, _("Left Button"));
|
|
||||||
|
|
||||||
panel->button1P = WMCreatePopUpButton(panel->menuF);
|
panel->mouse_action[i].label = WMCreateLabel(panel->menuF);
|
||||||
WMResizeWidget(panel->button1P, 135, 20);
|
WMResizeWidget(panel->mouse_action[i].label, 115, 20);
|
||||||
WMMoveWidget(panel->button1P, 115, 40);
|
WMMoveWidget(panel->mouse_action[i].label, 4, 37 + 25 * i);
|
||||||
|
WMSetLabelTextAlignment(panel->mouse_action[i].label, WARight);
|
||||||
|
WMSetLabelText(panel->mouse_action[i].label, _(button_list[i].display_label));
|
||||||
|
|
||||||
panel->button2L = WMCreateLabel(panel->menuF);
|
panel->mouse_action[i].popup = WMCreatePopUpButton(panel->menuF);
|
||||||
WMResizeWidget(panel->button2L, 107, 20);
|
WMResizeWidget(panel->mouse_action[i].popup, 145, 20);
|
||||||
WMMoveWidget(panel->button2L, 5, 65);
|
WMMoveWidget(panel->mouse_action[i].popup, 121, 37 + 25 * i);
|
||||||
WMSetLabelTextAlignment(panel->button2L, WARight);
|
|
||||||
WMSetLabelText(panel->button2L, _("Middle Button"));
|
|
||||||
|
|
||||||
panel->button2P = WMCreatePopUpButton(panel->menuF);
|
if (button_list[i].type == T_BUTTON) {
|
||||||
WMResizeWidget(panel->button2P, 135, 20);
|
for (j = 0; j < wlengthof(button_actions); j++)
|
||||||
WMMoveWidget(panel->button2P, 115, 65);
|
WMAddPopUpButtonItem(panel->mouse_action[i].popup, _(button_actions[j].label));
|
||||||
|
} else {
|
||||||
panel->button3L = WMCreateLabel(panel->menuF);
|
for (j = 0; j < wlengthof(wheel_actions); j++)
|
||||||
WMResizeWidget(panel->button3L, 107, 20);
|
WMAddPopUpButtonItem(panel->mouse_action[i].popup, _(wheel_actions[j].label));
|
||||||
WMMoveWidget(panel->button3L, 5, 90);
|
}
|
||||||
WMSetLabelTextAlignment(panel->button3L, WARight);
|
|
||||||
WMSetLabelText(panel->button3L, _("Right Button"));
|
|
||||||
|
|
||||||
panel->button3P = WMCreatePopUpButton(panel->menuF);
|
|
||||||
WMResizeWidget(panel->button3P, 135, 20);
|
|
||||||
WMMoveWidget(panel->button3P, 115, 90);
|
|
||||||
|
|
||||||
panel->button8L = WMCreateLabel(panel->menuF);
|
|
||||||
WMResizeWidget(panel->button8L, 107, 20);
|
|
||||||
WMMoveWidget(panel->button8L, 5, 115);
|
|
||||||
WMSetLabelTextAlignment(panel->button8L, WARight);
|
|
||||||
WMSetLabelText(panel->button8L, _("Back Button"));
|
|
||||||
|
|
||||||
panel->button8P = WMCreatePopUpButton(panel->menuF);
|
|
||||||
WMResizeWidget(panel->button8P, 135, 20);
|
|
||||||
WMMoveWidget(panel->button8P, 115, 115);
|
|
||||||
|
|
||||||
panel->button9L = WMCreateLabel(panel->menuF);
|
|
||||||
WMResizeWidget(panel->button9L, 107, 20);
|
|
||||||
WMMoveWidget(panel->button9L, 5, 140);
|
|
||||||
WMSetLabelTextAlignment(panel->button9L, WARight);
|
|
||||||
WMSetLabelText(panel->button9L, _("Forward Button"));
|
|
||||||
|
|
||||||
panel->button9P = WMCreatePopUpButton(panel->menuF);
|
|
||||||
WMResizeWidget(panel->button9P, 135, 20);
|
|
||||||
WMMoveWidget(panel->button9P, 115, 140);
|
|
||||||
|
|
||||||
panel->wheelL = WMCreateLabel(panel->menuF);
|
|
||||||
WMResizeWidget(panel->wheelL, 107, 20);
|
|
||||||
WMMoveWidget(panel->wheelL, 5, 165);
|
|
||||||
WMSetLabelTextAlignment(panel->wheelL, WARight);
|
|
||||||
WMSetLabelText(panel->wheelL, _("Mouse Wheel"));
|
|
||||||
|
|
||||||
panel->wheelP = WMCreatePopUpButton(panel->menuF);
|
|
||||||
WMResizeWidget(panel->wheelP, 135, 20);
|
|
||||||
WMMoveWidget(panel->wheelP, 115, 165);
|
|
||||||
|
|
||||||
panel->wheelTiltL = WMCreateLabel(panel->menuF);
|
|
||||||
WMResizeWidget(panel->wheelTiltL, 107, 20);
|
|
||||||
WMMoveWidget(panel->wheelTiltL, 5, 190);
|
|
||||||
WMSetLabelTextAlignment(panel->wheelTiltL, WARight);
|
|
||||||
WMSetLabelText(panel->wheelTiltL, _("Mouse Wheel Tilt"));
|
|
||||||
|
|
||||||
panel->wheelTiltP = WMCreatePopUpButton(panel->menuF);
|
|
||||||
WMResizeWidget(panel->wheelTiltP, 135, 20);
|
|
||||||
WMMoveWidget(panel->wheelTiltP, 115, 190);
|
|
||||||
|
|
||||||
for (i = 0; i < wlengthof(buttonActions); i++) {
|
|
||||||
WMAddPopUpButtonItem(panel->button1P, buttonActions[i]);
|
|
||||||
WMAddPopUpButtonItem(panel->button2P, buttonActions[i]);
|
|
||||||
WMAddPopUpButtonItem(panel->button3P, buttonActions[i]);
|
|
||||||
WMAddPopUpButtonItem(panel->button8P, buttonActions[i]);
|
|
||||||
WMAddPopUpButtonItem(panel->button9P, buttonActions[i]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < wlengthof(wheelActions); i++) {
|
|
||||||
WMAddPopUpButtonItem(panel->wheelP, wheelActions[i]);
|
|
||||||
WMAddPopUpButtonItem(panel->wheelTiltP, wheelActions[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
WMMapSubwidgets(panel->menuF);
|
WMMapSubwidgets(panel->menuF);
|
||||||
|
|
||||||
WMRealizeWidget(panel->box);
|
WMRealizeWidget(panel->box);
|
||||||
@@ -729,8 +640,14 @@ static void storeCommandInScript(const char *cmd, const char *line)
|
|||||||
char *path;
|
char *path;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char buffer[128];
|
char buffer[128];
|
||||||
|
mode_t permissions;
|
||||||
|
|
||||||
path = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart");
|
/* Calculate permission to be Executable but taking into account user's umask */
|
||||||
|
permissions = umask(0);
|
||||||
|
umask(permissions);
|
||||||
|
permissions = (S_IRWXU | S_IRWXG | S_IRWXO) & (~permissions);
|
||||||
|
|
||||||
|
path = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart");
|
||||||
|
|
||||||
f = fopen(path, "rb");
|
f = fopen(path, "rb");
|
||||||
if (!f) {
|
if (!f) {
|
||||||
@@ -748,7 +665,7 @@ static void storeCommandInScript(const char *cmd, const char *line)
|
|||||||
char *tmppath;
|
char *tmppath;
|
||||||
FILE *fo;
|
FILE *fo;
|
||||||
|
|
||||||
tmppath = wstrconcat(wusergnusteppath(), "/Library/WindowMaker/autostart.tmp");
|
tmppath = wstrconcat(wuserdatapath(), "/" PACKAGE_TARNAME "/autostart.tmp");
|
||||||
fo = fopen(tmppath, "wb");
|
fo = fopen(tmppath, "wb");
|
||||||
if (!fo) {
|
if (!fo) {
|
||||||
werror(_("could not create temporary file %s"), tmppath);
|
werror(_("could not create temporary file %s"), tmppath);
|
||||||
@@ -788,9 +705,8 @@ static void storeCommandInScript(const char *cmd, const char *line)
|
|||||||
}
|
}
|
||||||
wfree(tmppath);
|
wfree(tmppath);
|
||||||
}
|
}
|
||||||
sprintf(buffer, "chmod u+x %s", path);
|
if (chmod(path, permissions) != 0)
|
||||||
if (system(buffer) == -1)
|
wwarning(_("could not set permission 0%03o on file \"%s\""), permissions, path);
|
||||||
werror(_("could not execute command \"%s\""), buffer);
|
|
||||||
|
|
||||||
end:
|
end:
|
||||||
wfree(path);
|
wfree(path);
|
||||||
@@ -805,8 +721,6 @@ static void storeData(_Panel * panel)
|
|||||||
char buffer[64];
|
char buffer[64];
|
||||||
int i;
|
int i;
|
||||||
char *tmp, *p;
|
char *tmp, *p;
|
||||||
static char *button[4] = { "None", "OpenApplicationsMenu", "OpenWindowListMenu", "SelectWindows" };
|
|
||||||
static char *wheel[2] = { "None", "SwitchWorkspaces" };
|
|
||||||
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
WMUserDefaults *udb = WMGetStandardUserDefaults();
|
||||||
|
|
||||||
if (!WMGetUDBoolForKey(udb, "NoXSetStuff")) {
|
if (!WMGetUDBoolForKey(udb, "NoXSetStuff")) {
|
||||||
@@ -829,26 +743,19 @@ static void storeData(_Panel * panel)
|
|||||||
|
|
||||||
SetBoolForKey(WMGetButtonSelected(panel->disaB), "DisableWSMouseActions");
|
SetBoolForKey(WMGetButtonSelected(panel->disaB), "DisableWSMouseActions");
|
||||||
|
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->button1P);
|
for (i = 0; i < wlengthof(button_list); i++) {
|
||||||
SetStringForKey(button[i], "MouseLeftButtonAction");
|
const char *db_value;
|
||||||
|
int action;
|
||||||
|
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->button2P);
|
action = WMGetPopUpButtonSelectedItem(panel->mouse_action[i].popup);
|
||||||
SetStringForKey(button[i], "MouseMiddleButtonAction");
|
if (action < 0)
|
||||||
|
continue;
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->button3P);
|
if (button_list[i].type == T_BUTTON)
|
||||||
SetStringForKey(button[i], "MouseRightButtonAction");
|
db_value = button_actions[action].db_value;
|
||||||
|
else
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->button8P);
|
db_value = wheel_actions[action].db_value;
|
||||||
SetStringForKey(button[i], "MouseBackwardButtonAction");
|
SetStringForKey(db_value, button_list[i].db_key);
|
||||||
|
}
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->button9P);
|
|
||||||
SetStringForKey(button[i], "MouseForwardButtonAction");
|
|
||||||
|
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->wheelP);
|
|
||||||
SetStringForKey(wheel[i], "MouseWheelAction");
|
|
||||||
|
|
||||||
i = WMGetPopUpButtonSelectedItem(panel->wheelTiltP);
|
|
||||||
SetStringForKey(wheel[i], "MouseWheelTiltAction");
|
|
||||||
|
|
||||||
tmp = WMGetPopUpButtonItem(panel->grabP, WMGetPopUpButtonSelectedItem(panel->grabP));
|
tmp = WMGetPopUpButtonItem(panel->grabP, WMGetPopUpButtonSelectedItem(panel->grabP));
|
||||||
tmp = wstrdup(tmp);
|
tmp = wstrdup(tmp);
|
||||||
@@ -874,14 +781,6 @@ Panel *InitMouseSettings(WMWidget *parent)
|
|||||||
modifierNames[6] = wstrdup(_("Mod4"));
|
modifierNames[6] = wstrdup(_("Mod4"));
|
||||||
modifierNames[7] = wstrdup(_("Mod5"));
|
modifierNames[7] = wstrdup(_("Mod5"));
|
||||||
|
|
||||||
buttonActions[0] = wstrdup(_("None"));
|
|
||||||
buttonActions[1] = wstrdup(_("Applications Menu"));
|
|
||||||
buttonActions[2] = wstrdup(_("Window List Menu"));
|
|
||||||
buttonActions[3] = wstrdup(_("Select Windows"));
|
|
||||||
|
|
||||||
wheelActions[0] = wstrdup(_("None"));
|
|
||||||
wheelActions[1] = wstrdup(_("Switch Workspaces"));
|
|
||||||
|
|
||||||
panel = wmalloc(sizeof(_Panel));
|
panel = wmalloc(sizeof(_Panel));
|
||||||
|
|
||||||
panel->sectionName = _("Mouse Preferences");
|
panel->sectionName = _("Mouse Preferences");
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user