Compare commits
339 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
ccfbfb4af8 | |
|
|
463c1a4c5a | |
|
|
40f4f0b946 | |
|
|
5df2f8b992 | |
|
|
d716a398dc | |
|
|
996a035017 | |
|
|
92b8bddb6b | |
|
|
25e1f27ac9 | |
|
|
5ad5dfffd1 | |
|
|
cb40739af7 | |
|
|
c87003101c | |
|
|
e9abbbb1c4 | |
|
|
41e7a9d547 | |
|
|
1a993dca38 | |
|
|
e470e2f40d | |
|
|
137742d471 | |
|
|
d125d77d01 | |
|
|
f087570eb5 | |
|
|
27a398d0e1 | |
|
|
ca6baf0dc8 | |
|
|
cb49c83799 | |
|
|
3223a6fdca | |
|
|
5698f3f7cb | |
|
|
f18e8e6ac0 | |
|
|
0e6428404e | |
|
|
5e14f261b3 | |
|
|
e588728d3d | |
|
|
e99927d985 | |
|
|
baf5e7c968 | |
|
|
28a9d79d03 | |
|
|
1437091725 | |
|
|
022fb02556 | |
|
|
ea11a92689 | |
|
|
c9c214c6d5 | |
|
|
9731ebecb7 | |
|
|
cddfa3172f | |
|
|
80b49f2a1d | |
|
|
bb90ab6040 | |
|
|
dd45e87f01 | |
|
|
556cbb2ab3 | |
|
|
58677dc175 | |
|
|
ed167f8d1b | |
|
|
44ba9ba17d | |
|
|
b3fffc193e | |
|
|
42eff0fa05 | |
|
|
ff350130a4 | |
|
|
28def0059d | |
|
|
236e4db236 | |
|
|
ccf928c048 | |
|
|
e218819edd | |
|
|
6374cc8c47 | |
|
|
82aee30657 | |
|
|
6e99e380cb | |
|
|
950881d1c3 | |
|
|
bf75da8fa8 | |
|
|
79f27d1b25 | |
|
|
129c8f584c | |
|
|
6892b9c582 | |
|
|
1db60b6d4e | |
|
|
fba13926c4 | |
|
|
3c67bf3398 | |
|
|
532b9242c9 | |
|
|
27e194905b | |
|
|
4cc0c9e028 | |
|
|
dd18ca3051 | |
|
|
737bc856c4 | |
|
|
af694382c8 | |
|
|
9977a037ec | |
|
|
b1cbc63f0b | |
|
|
8af42fbad8 | |
|
|
34eb8e930b | |
|
|
d20040b135 | |
|
|
eb87714adc | |
|
|
324c066685 | |
|
|
5e43b05740 | |
|
|
1677425413 | |
|
|
f7d1f15cf5 | |
|
|
277a3b244b | |
|
|
2ac453139f | |
|
|
6f76640146 | |
|
|
b4d680b5ba | |
|
|
509fa0be29 | |
|
|
23eea44661 | |
|
|
072adde856 | |
|
|
f9e25fa8f6 | |
|
|
1d73d9f0e3 | |
|
|
81bce359f9 | |
|
|
e3b32ace3b | |
|
|
99964991c0 | |
|
|
cde5bab27d | |
|
|
42b4c9c00c | |
|
|
b63c1e9ffa | |
|
|
a8633f1fbc | |
|
|
60091a94b6 | |
|
|
e53e69efcf | |
|
|
464aae77c6 | |
|
|
24682db69c | |
|
|
771bad2d59 | |
|
|
a06d318646 | |
|
|
8277710510 | |
|
|
442d20b387 | |
|
|
56008f3041 | |
|
|
03b73862cc | |
|
|
2dd900bddf | |
|
|
f9769c11f2 | |
|
|
5af13a1e12 | |
|
|
2195aed3c0 | |
|
|
c1689cac75 | |
|
|
6a8afcc20a | |
|
|
89067a8dd9 | |
|
|
1d95fac3bf | |
|
|
a128664921 | |
|
|
ecab1e2bed | |
|
|
b3a1a77160 | |
|
|
01701538bb | |
|
|
0fe72b7746 | |
|
|
9585d3c80b | |
|
|
4e0455af34 | |
|
|
075b080aaf | |
|
|
a1ce4aaf79 | |
|
|
39ec1ba888 | |
|
|
1abe0b735f | |
|
|
c78f5e82da | |
|
|
80e2955f8c | |
|
|
408929848d | |
|
|
11b90ecc0a | |
|
|
e686f03082 | |
|
|
1172e9da6f | |
|
|
7a41c6157c | |
|
|
352f86018b | |
|
|
19355033ff | |
|
|
813d6b0f1b | |
|
|
e8140eae88 | |
|
|
96efac1e3f | |
|
|
ca96e76d12 | |
|
|
78be404571 | |
|
|
f4909e021d | |
|
|
35980726fe | |
|
|
b2b6a6a8fe | |
|
|
92e1c0d299 | |
|
|
0c311ae477 | |
|
|
303a93b721 | |
|
|
9269022d0f | |
|
|
27872b84db | |
|
|
da7ad4069a | |
|
|
ef51bb8bf9 | |
|
|
34baae6df2 | |
|
|
1abdb528a2 | |
|
|
9b7e7cc3cb | |
|
|
80163fcca8 | |
|
|
3ddaa28400 | |
|
|
8ce87b8f1f | |
|
|
55efba0b3c | |
|
|
1e8a9492ba | |
|
|
040b0138bb | |
|
|
3f0fce3bc6 | |
|
|
e50a8c80a7 | |
|
|
0d42d69f91 | |
|
|
9199fbd82b | |
|
|
be36fd4de2 | |
|
|
f02d076ce2 | |
|
|
75c20c34d2 | |
|
|
6a5481ff05 | |
|
|
06e931ffd2 | |
|
|
fbe044a2b9 | |
|
|
dc73000a1d | |
|
|
c5f604a80a | |
|
|
8fae815ed8 | |
|
|
e341b36d65 | |
|
|
119c6725ef | |
|
|
8519948c3b | |
|
|
5bf0ccc4f1 | |
|
|
b0c06b8a73 | |
|
|
3c72b84a5c | |
|
|
579a6bfa32 | |
|
|
64507ba483 | |
|
|
10384c06e6 | |
|
|
7f039398d0 | |
|
|
0b8786eaa0 | |
|
|
98832cec72 | |
|
|
3c14f72f56 | |
|
|
b364895c7d | |
|
|
9c351b5724 | |
|
|
ca943ddd9e | |
|
|
f0b3876bac | |
|
|
4d901db080 | |
|
|
1e4a847565 | |
|
|
879fad367c | |
|
|
a84d71bd5e | |
|
|
6f9b07b64d | |
|
|
5ca7a5e4a6 | |
|
|
a33f7b8324 | |
|
|
a569eed459 | |
|
|
22ffa69f68 | |
|
|
fa4223b7ce | |
|
|
15d3efcbd5 | |
|
|
2658926c44 | |
|
|
317f9e4176 | |
|
|
6a0c0e525a | |
|
|
c26c8cd2b5 | |
|
|
4907e35778 | |
|
|
443d1f8662 | |
|
|
9f4e8a25d0 | |
|
|
9fc08f8bce | |
|
|
04894a9031 | |
|
|
9bde4d3013 | |
|
|
b4eb418c89 | |
|
|
95f54f0576 | |
|
|
d0177aa8eb | |
|
|
2c632c3d3a | |
|
|
5b7d1eedf4 | |
|
|
b69c4ccf97 | |
|
|
755b3d79c9 | |
|
|
c087e359d9 | |
|
|
0249d12694 | |
|
|
c5721f9752 | |
|
|
360ac081ce | |
|
|
91475c8b70 | |
|
|
11a00a25d0 | |
|
|
a4456762b5 | |
|
|
b45c86a5af | |
|
|
17c0da57a1 | |
|
|
8b3256d820 | |
|
|
970a6370be | |
|
|
0a5dff018d | |
|
|
1fe315b8f7 | |
|
|
508d7dca3a | |
|
|
6286834473 | |
|
|
2dbcb4a805 | |
|
|
da66b29032 | |
|
|
9e92996cc0 | |
|
|
0d83dcead1 | |
|
|
447b36421b | |
|
|
149b188e4e | |
|
|
0ae23a5d10 | |
|
|
4e3353863c | |
|
|
289b280f67 | |
|
|
7fbbb8ef68 | |
|
|
06f59dbea3 | |
|
|
8580902bf5 | |
|
|
d19c3e25ea | |
|
|
ef99ca7f2f | |
|
|
0dd7859d4f | |
|
|
34c7c8f575 | |
|
|
1e03967fbf | |
|
|
5e8cb0ea1f | |
|
|
acb728a117 | |
|
|
c9bde10ff0 | |
|
|
cc7e208c35 | |
|
|
528a62fa57 | |
|
|
e0ce5e0096 | |
|
|
aa0a984878 | |
|
|
4cc28cf100 | |
|
|
662f229a64 | |
|
|
e4d6e327b8 | |
|
|
738d06cde6 | |
|
|
8159ff3f7a | |
|
|
f4ff709fd3 | |
|
|
bc5acc7472 | |
|
|
8f3fbe7aa9 | |
|
|
5b1816d29a | |
|
|
74f602b268 | |
|
|
04b119557f | |
|
|
5997c9cba3 | |
|
|
ec2348b1ec | |
|
|
17bbe345af | |
|
|
7c7d75a2ba | |
|
|
97c8393835 | |
|
|
7878af7157 | |
|
|
f0ac2a21b0 | |
|
|
6d27a37478 | |
|
|
1c6fa54d69 | |
|
|
944500fc24 | |
|
|
bb78937d60 | |
|
|
e391a3522e | |
|
|
f8e4b843b9 | |
|
|
8d30b480a2 | |
|
|
6dd552ae7e | |
|
|
fbd6ad709c | |
|
|
1af3554f5c | |
|
|
fb8e46bb45 | |
|
|
2d92334fe9 | |
|
|
fab077b7a9 | |
|
|
4133492989 | |
|
|
3f2fb189c7 | |
|
|
e9445ca2c9 | |
|
|
99369f0d42 | |
|
|
52ca619294 | |
|
|
7d9bb459b4 | |
|
|
8671a9e502 | |
|
|
71c2309eb8 | |
|
|
98030f870d | |
|
|
62c1ac3e96 | |
|
|
d543ba5c90 | |
|
|
31e540e128 | |
|
|
1a4de3190f | |
|
|
c531fba30c | |
|
|
8780e3607b | |
|
|
7a1fc3acff | |
|
|
c30af6260f | |
|
|
8288ead3c3 | |
|
|
26d27a6048 | |
|
|
ec2408043f | |
|
|
d2c285154b | |
|
|
14205295fc | |
|
|
82c45f4cc1 | |
|
|
695c5a09d9 | |
|
|
a89e1d9d70 | |
|
|
1b799da43d | |
|
|
f7997b9336 | |
|
|
2a0c6536f2 | |
|
|
c04dd01b44 | |
|
|
05e6c7b33f | |
|
|
27ea6a8be9 | |
|
|
9f74d2bd57 | |
|
|
7712a7a92e | |
|
|
764d18a090 | |
|
|
e3788ba37f | |
|
|
db447b1f5b | |
|
|
da32878df4 | |
|
|
da52cfa260 | |
|
|
72292c41f6 | |
|
|
4e15c42b86 | |
|
|
3dd6507d36 | |
|
|
2b25958d8c | |
|
|
0c17e2cfbe | |
|
|
9e6b58d3da | |
|
|
15556e40f4 | |
|
|
39301d9367 | |
|
|
3ebcec5a68 | |
|
|
91bb4b26a7 | |
|
|
743d8d7644 | |
|
|
26ae9fd784 | |
|
|
f65379c8e1 | |
|
|
0de553c748 | |
|
|
dbdb35a677 | |
|
|
0e2360591c | |
|
|
8718e219a2 | |
|
|
220bf0143c |
|
|
@ -0,0 +1,675 @@
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
|
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The GNU General Public License is a free, copyleft license for
|
||||||
|
software and other kinds of works.
|
||||||
|
|
||||||
|
The licenses for most software and other practical works are designed
|
||||||
|
to take away your freedom to share and change the works. By contrast,
|
||||||
|
the GNU General Public License is intended to guarantee your freedom to
|
||||||
|
share and change all versions of a program--to make sure it remains free
|
||||||
|
software for all its users. We, the Free Software Foundation, use the
|
||||||
|
GNU General Public License for most of our software; it applies also to
|
||||||
|
any other work released this way by its authors. You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
them if you wish), that you receive source code or can get it if you
|
||||||
|
want it, that you can change the software or use pieces of it in new
|
||||||
|
free programs, and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to prevent others from denying you
|
||||||
|
these rights or asking you to surrender the rights. Therefore, you have
|
||||||
|
certain responsibilities if you distribute copies of the software, or if
|
||||||
|
you modify it: responsibilities to respect the freedom of others.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must pass on to the recipients the same
|
||||||
|
freedoms that you received. You must make sure that they, too, receive
|
||||||
|
or can get the source code. And you must show them these terms so they
|
||||||
|
know their rights.
|
||||||
|
|
||||||
|
Developers that use the GNU GPL protect your rights with two steps:
|
||||||
|
(1) assert copyright on the software, and (2) offer you this License
|
||||||
|
giving you legal permission to copy, distribute and/or modify it.
|
||||||
|
|
||||||
|
For the developers' and authors' protection, the GPL clearly explains
|
||||||
|
that there is no warranty for this free software. For both users' and
|
||||||
|
authors' sake, the GPL requires that modified versions be marked as
|
||||||
|
changed, so that their problems will not be attributed erroneously to
|
||||||
|
authors of previous versions.
|
||||||
|
|
||||||
|
Some devices are designed to deny users access to install or run
|
||||||
|
modified versions of the software inside them, although the manufacturer
|
||||||
|
can do so. This is fundamentally incompatible with the aim of
|
||||||
|
protecting users' freedom to change the software. The systematic
|
||||||
|
pattern of such abuse occurs in the area of products for individuals to
|
||||||
|
use, which is precisely where it is most unacceptable. Therefore, we
|
||||||
|
have designed this version of the GPL to prohibit the practice for those
|
||||||
|
products. If such problems arise substantially in other domains, we
|
||||||
|
stand ready to extend this provision to those domains in future versions
|
||||||
|
of the GPL, as needed to protect the freedom of users.
|
||||||
|
|
||||||
|
Finally, every program is threatened constantly by software patents.
|
||||||
|
States should not allow patents to restrict development and use of
|
||||||
|
software on general-purpose computers, but in those that do, we wish to
|
||||||
|
avoid the special danger that patents applied to a free program could
|
||||||
|
make it effectively proprietary. To prevent this, the GPL assures that
|
||||||
|
patents cannot be used to render the program non-free.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
0. Definitions.
|
||||||
|
|
||||||
|
"This License" refers to version 3 of the GNU General Public License.
|
||||||
|
|
||||||
|
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||||
|
works, such as semiconductor masks.
|
||||||
|
|
||||||
|
"The Program" refers to any copyrightable work licensed under this
|
||||||
|
License. Each licensee is addressed as "you". "Licensees" and
|
||||||
|
"recipients" may be individuals or organizations.
|
||||||
|
|
||||||
|
To "modify" a work means to copy from or adapt all or part of the work
|
||||||
|
in a fashion requiring copyright permission, other than the making of an
|
||||||
|
exact copy. The resulting work is called a "modified version" of the
|
||||||
|
earlier work or a work "based on" the earlier work.
|
||||||
|
|
||||||
|
A "covered work" means either the unmodified Program or a work based
|
||||||
|
on the Program.
|
||||||
|
|
||||||
|
To "propagate" a work means to do anything with it that, without
|
||||||
|
permission, would make you directly or secondarily liable for
|
||||||
|
infringement under applicable copyright law, except executing it on a
|
||||||
|
computer or modifying a private copy. Propagation includes copying,
|
||||||
|
distribution (with or without modification), making available to the
|
||||||
|
public, and in some countries other activities as well.
|
||||||
|
|
||||||
|
To "convey" a work means any kind of propagation that enables other
|
||||||
|
parties to make or receive copies. Mere interaction with a user through
|
||||||
|
a computer network, with no transfer of a copy, is not conveying.
|
||||||
|
|
||||||
|
An interactive user interface displays "Appropriate Legal Notices"
|
||||||
|
to the extent that it includes a convenient and prominently visible
|
||||||
|
feature that (1) displays an appropriate copyright notice, and (2)
|
||||||
|
tells the user that there is no warranty for the work (except to the
|
||||||
|
extent that warranties are provided), that licensees may convey the
|
||||||
|
work under this License, and how to view a copy of this License. If
|
||||||
|
the interface presents a list of user commands or options, such as a
|
||||||
|
menu, a prominent item in the list meets this criterion.
|
||||||
|
|
||||||
|
1. Source Code.
|
||||||
|
|
||||||
|
The "source code" for a work means the preferred form of the work
|
||||||
|
for making modifications to it. "Object code" means any non-source
|
||||||
|
form of a work.
|
||||||
|
|
||||||
|
A "Standard Interface" means an interface that either is an official
|
||||||
|
standard defined by a recognized standards body, or, in the case of
|
||||||
|
interfaces specified for a particular programming language, one that
|
||||||
|
is widely used among developers working in that language.
|
||||||
|
|
||||||
|
The "System Libraries" of an executable work include anything, other
|
||||||
|
than the work as a whole, that (a) is included in the normal form of
|
||||||
|
packaging a Major Component, but which is not part of that Major
|
||||||
|
Component, and (b) serves only to enable use of the work with that
|
||||||
|
Major Component, or to implement a Standard Interface for which an
|
||||||
|
implementation is available to the public in source code form. A
|
||||||
|
"Major Component", in this context, means a major essential component
|
||||||
|
(kernel, window system, and so on) of the specific operating system
|
||||||
|
(if any) on which the executable work runs, or a compiler used to
|
||||||
|
produce the work, or an object code interpreter used to run it.
|
||||||
|
|
||||||
|
The "Corresponding Source" for a work in object code form means all
|
||||||
|
the source code needed to generate, install, and (for an executable
|
||||||
|
work) run the object code and to modify the work, including scripts to
|
||||||
|
control those activities. However, it does not include the work's
|
||||||
|
System Libraries, or general-purpose tools or generally available free
|
||||||
|
programs which are used unmodified in performing those activities but
|
||||||
|
which are not part of the work. For example, Corresponding Source
|
||||||
|
includes interface definition files associated with source files for
|
||||||
|
the work, and the source code for shared libraries and dynamically
|
||||||
|
linked subprograms that the work is specifically designed to require,
|
||||||
|
such as by intimate data communication or control flow between those
|
||||||
|
subprograms and other parts of the work.
|
||||||
|
|
||||||
|
The Corresponding Source need not include anything that users
|
||||||
|
can regenerate automatically from other parts of the Corresponding
|
||||||
|
Source.
|
||||||
|
|
||||||
|
The Corresponding Source for a work in source code form is that
|
||||||
|
same work.
|
||||||
|
|
||||||
|
2. Basic Permissions.
|
||||||
|
|
||||||
|
All rights granted under this License are granted for the term of
|
||||||
|
copyright on the Program, and are irrevocable provided the stated
|
||||||
|
conditions are met. This License explicitly affirms your unlimited
|
||||||
|
permission to run the unmodified Program. The output from running a
|
||||||
|
covered work is covered by this License only if the output, given its
|
||||||
|
content, constitutes a covered work. This License acknowledges your
|
||||||
|
rights of fair use or other equivalent, as provided by copyright law.
|
||||||
|
|
||||||
|
You may make, run and propagate covered works that you do not
|
||||||
|
convey, without conditions so long as your license otherwise remains
|
||||||
|
in force. You may convey covered works to others for the sole purpose
|
||||||
|
of having them make modifications exclusively for you, or provide you
|
||||||
|
with facilities for running those works, provided that you comply with
|
||||||
|
the terms of this License in conveying all material for which you do
|
||||||
|
not control copyright. Those thus making or running the covered works
|
||||||
|
for you must do so exclusively on your behalf, under your direction
|
||||||
|
and control, on terms that prohibit them from making any copies of
|
||||||
|
your copyrighted material outside their relationship with you.
|
||||||
|
|
||||||
|
Conveying under any other circumstances is permitted solely under
|
||||||
|
the conditions stated below. Sublicensing is not allowed; section 10
|
||||||
|
makes it unnecessary.
|
||||||
|
|
||||||
|
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||||
|
|
||||||
|
No covered work shall be deemed part of an effective technological
|
||||||
|
measure under any applicable law fulfilling obligations under article
|
||||||
|
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||||
|
similar laws prohibiting or restricting circumvention of such
|
||||||
|
measures.
|
||||||
|
|
||||||
|
When you convey a covered work, you waive any legal power to forbid
|
||||||
|
circumvention of technological measures to the extent such circumvention
|
||||||
|
is effected by exercising rights under this License with respect to
|
||||||
|
the covered work, and you disclaim any intention to limit operation or
|
||||||
|
modification of the work as a means of enforcing, against the work's
|
||||||
|
users, your or third parties' legal rights to forbid circumvention of
|
||||||
|
technological measures.
|
||||||
|
|
||||||
|
4. Conveying Verbatim Copies.
|
||||||
|
|
||||||
|
You may convey verbatim copies of the Program's source code as you
|
||||||
|
receive it, in any medium, provided that you conspicuously and
|
||||||
|
appropriately publish on each copy an appropriate copyright notice;
|
||||||
|
keep intact all notices stating that this License and any
|
||||||
|
non-permissive terms added in accord with section 7 apply to the code;
|
||||||
|
keep intact all notices of the absence of any warranty; and give all
|
||||||
|
recipients a copy of this License along with the Program.
|
||||||
|
|
||||||
|
You may charge any price or no price for each copy that you convey,
|
||||||
|
and you may offer support or warranty protection for a fee.
|
||||||
|
|
||||||
|
5. Conveying Modified Source Versions.
|
||||||
|
|
||||||
|
You may convey a work based on the Program, or the modifications to
|
||||||
|
produce it from the Program, in the form of source code under the
|
||||||
|
terms of section 4, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) The work must carry prominent notices stating that you modified
|
||||||
|
it, and giving a relevant date.
|
||||||
|
|
||||||
|
b) The work must carry prominent notices stating that it is
|
||||||
|
released under this License and any conditions added under section
|
||||||
|
7. This requirement modifies the requirement in section 4 to
|
||||||
|
"keep intact all notices".
|
||||||
|
|
||||||
|
c) You must license the entire work, as a whole, under this
|
||||||
|
License to anyone who comes into possession of a copy. This
|
||||||
|
License will therefore apply, along with any applicable section 7
|
||||||
|
additional terms, to the whole of the work, and all its parts,
|
||||||
|
regardless of how they are packaged. This License gives no
|
||||||
|
permission to license the work in any other way, but it does not
|
||||||
|
invalidate such permission if you have separately received it.
|
||||||
|
|
||||||
|
d) If the work has interactive user interfaces, each must display
|
||||||
|
Appropriate Legal Notices; however, if the Program has interactive
|
||||||
|
interfaces that do not display Appropriate Legal Notices, your
|
||||||
|
work need not make them do so.
|
||||||
|
|
||||||
|
A compilation of a covered work with other separate and independent
|
||||||
|
works, which are not by their nature extensions of the covered work,
|
||||||
|
and which are not combined with it such as to form a larger program,
|
||||||
|
in or on a volume of a storage or distribution medium, is called an
|
||||||
|
"aggregate" if the compilation and its resulting copyright are not
|
||||||
|
used to limit the access or legal rights of the compilation's users
|
||||||
|
beyond what the individual works permit. Inclusion of a covered work
|
||||||
|
in an aggregate does not cause this License to apply to the other
|
||||||
|
parts of the aggregate.
|
||||||
|
|
||||||
|
6. Conveying Non-Source Forms.
|
||||||
|
|
||||||
|
You may convey a covered work in object code form under the terms
|
||||||
|
of sections 4 and 5, provided that you also convey the
|
||||||
|
machine-readable Corresponding Source under the terms of this License,
|
||||||
|
in one of these ways:
|
||||||
|
|
||||||
|
a) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by the
|
||||||
|
Corresponding Source fixed on a durable physical medium
|
||||||
|
customarily used for software interchange.
|
||||||
|
|
||||||
|
b) Convey the object code in, or embodied in, a physical product
|
||||||
|
(including a physical distribution medium), accompanied by a
|
||||||
|
written offer, valid for at least three years and valid for as
|
||||||
|
long as you offer spare parts or customer support for that product
|
||||||
|
model, to give anyone who possesses the object code either (1) a
|
||||||
|
copy of the Corresponding Source for all the software in the
|
||||||
|
product that is covered by this License, on a durable physical
|
||||||
|
medium customarily used for software interchange, for a price no
|
||||||
|
more than your reasonable cost of physically performing this
|
||||||
|
conveying of source, or (2) access to copy the
|
||||||
|
Corresponding Source from a network server at no charge.
|
||||||
|
|
||||||
|
c) Convey individual copies of the object code with a copy of the
|
||||||
|
written offer to provide the Corresponding Source. This
|
||||||
|
alternative is allowed only occasionally and noncommercially, and
|
||||||
|
only if you received the object code with such an offer, in accord
|
||||||
|
with subsection 6b.
|
||||||
|
|
||||||
|
d) Convey the object code by offering access from a designated
|
||||||
|
place (gratis or for a charge), and offer equivalent access to the
|
||||||
|
Corresponding Source in the same way through the same place at no
|
||||||
|
further charge. You need not require recipients to copy the
|
||||||
|
Corresponding Source along with the object code. If the place to
|
||||||
|
copy the object code is a network server, the Corresponding Source
|
||||||
|
may be on a different server (operated by you or a third party)
|
||||||
|
that supports equivalent copying facilities, provided you maintain
|
||||||
|
clear directions next to the object code saying where to find the
|
||||||
|
Corresponding Source. Regardless of what server hosts the
|
||||||
|
Corresponding Source, you remain obligated to ensure that it is
|
||||||
|
available for as long as needed to satisfy these requirements.
|
||||||
|
|
||||||
|
e) Convey the object code using peer-to-peer transmission, provided
|
||||||
|
you inform other peers where the object code and Corresponding
|
||||||
|
Source of the work are being offered to the general public at no
|
||||||
|
charge under subsection 6d.
|
||||||
|
|
||||||
|
A separable portion of the object code, whose source code is excluded
|
||||||
|
from the Corresponding Source as a System Library, need not be
|
||||||
|
included in conveying the object code work.
|
||||||
|
|
||||||
|
A "User Product" is either (1) a "consumer product", which means any
|
||||||
|
tangible personal property which is normally used for personal, family,
|
||||||
|
or household purposes, or (2) anything designed or sold for incorporation
|
||||||
|
into a dwelling. In determining whether a product is a consumer product,
|
||||||
|
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||||
|
product received by a particular user, "normally used" refers to a
|
||||||
|
typical or common use of that class of product, regardless of the status
|
||||||
|
of the particular user or of the way in which the particular user
|
||||||
|
actually uses, or expects or is expected to use, the product. A product
|
||||||
|
is a consumer product regardless of whether the product has substantial
|
||||||
|
commercial, industrial or non-consumer uses, unless such uses represent
|
||||||
|
the only significant mode of use of the product.
|
||||||
|
|
||||||
|
"Installation Information" for a User Product means any methods,
|
||||||
|
procedures, authorization keys, or other information required to install
|
||||||
|
and execute modified versions of a covered work in that User Product from
|
||||||
|
a modified version of its Corresponding Source. The information must
|
||||||
|
suffice to ensure that the continued functioning of the modified object
|
||||||
|
code is in no case prevented or interfered with solely because
|
||||||
|
modification has been made.
|
||||||
|
|
||||||
|
If you convey an object code work under this section in, or with, or
|
||||||
|
specifically for use in, a User Product, and the conveying occurs as
|
||||||
|
part of a transaction in which the right of possession and use of the
|
||||||
|
User Product is transferred to the recipient in perpetuity or for a
|
||||||
|
fixed term (regardless of how the transaction is characterized), the
|
||||||
|
Corresponding Source conveyed under this section must be accompanied
|
||||||
|
by the Installation Information. But this requirement does not apply
|
||||||
|
if neither you nor any third party retains the ability to install
|
||||||
|
modified object code on the User Product (for example, the work has
|
||||||
|
been installed in ROM).
|
||||||
|
|
||||||
|
The requirement to provide Installation Information does not include a
|
||||||
|
requirement to continue to provide support service, warranty, or updates
|
||||||
|
for a work that has been modified or installed by the recipient, or for
|
||||||
|
the User Product in which it has been modified or installed. Access to a
|
||||||
|
network may be denied when the modification itself materially and
|
||||||
|
adversely affects the operation of the network or violates the rules and
|
||||||
|
protocols for communication across the network.
|
||||||
|
|
||||||
|
Corresponding Source conveyed, and Installation Information provided,
|
||||||
|
in accord with this section must be in a format that is publicly
|
||||||
|
documented (and with an implementation available to the public in
|
||||||
|
source code form), and must require no special password or key for
|
||||||
|
unpacking, reading or copying.
|
||||||
|
|
||||||
|
7. Additional Terms.
|
||||||
|
|
||||||
|
"Additional permissions" are terms that supplement the terms of this
|
||||||
|
License by making exceptions from one or more of its conditions.
|
||||||
|
Additional permissions that are applicable to the entire Program shall
|
||||||
|
be treated as though they were included in this License, to the extent
|
||||||
|
that they are valid under applicable law. If additional permissions
|
||||||
|
apply only to part of the Program, that part may be used separately
|
||||||
|
under those permissions, but the entire Program remains governed by
|
||||||
|
this License without regard to the additional permissions.
|
||||||
|
|
||||||
|
When you convey a copy of a covered work, you may at your option
|
||||||
|
remove any additional permissions from that copy, or from any part of
|
||||||
|
it. (Additional permissions may be written to require their own
|
||||||
|
removal in certain cases when you modify the work.) You may place
|
||||||
|
additional permissions on material, added by you to a covered work,
|
||||||
|
for which you have or can give appropriate copyright permission.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, for material you
|
||||||
|
add to a covered work, you may (if authorized by the copyright holders of
|
||||||
|
that material) supplement the terms of this License with terms:
|
||||||
|
|
||||||
|
a) Disclaiming warranty or limiting liability differently from the
|
||||||
|
terms of sections 15 and 16 of this License; or
|
||||||
|
|
||||||
|
b) Requiring preservation of specified reasonable legal notices or
|
||||||
|
author attributions in that material or in the Appropriate Legal
|
||||||
|
Notices displayed by works containing it; or
|
||||||
|
|
||||||
|
c) Prohibiting misrepresentation of the origin of that material, or
|
||||||
|
requiring that modified versions of such material be marked in
|
||||||
|
reasonable ways as different from the original version; or
|
||||||
|
|
||||||
|
d) Limiting the use for publicity purposes of names of licensors or
|
||||||
|
authors of the material; or
|
||||||
|
|
||||||
|
e) Declining to grant rights under trademark law for use of some
|
||||||
|
trade names, trademarks, or service marks; or
|
||||||
|
|
||||||
|
f) Requiring indemnification of licensors and authors of that
|
||||||
|
material by anyone who conveys the material (or modified versions of
|
||||||
|
it) with contractual assumptions of liability to the recipient, for
|
||||||
|
any liability that these contractual assumptions directly impose on
|
||||||
|
those licensors and authors.
|
||||||
|
|
||||||
|
All other non-permissive additional terms are considered "further
|
||||||
|
restrictions" within the meaning of section 10. If the Program as you
|
||||||
|
received it, or any part of it, contains a notice stating that it is
|
||||||
|
governed by this License along with a term that is a further
|
||||||
|
restriction, you may remove that term. If a license document contains
|
||||||
|
a further restriction but permits relicensing or conveying under this
|
||||||
|
License, you may add to a covered work material governed by the terms
|
||||||
|
of that license document, provided that the further restriction does
|
||||||
|
not survive such relicensing or conveying.
|
||||||
|
|
||||||
|
If you add terms to a covered work in accord with this section, you
|
||||||
|
must place, in the relevant source files, a statement of the
|
||||||
|
additional terms that apply to those files, or a notice indicating
|
||||||
|
where to find the applicable terms.
|
||||||
|
|
||||||
|
Additional terms, permissive or non-permissive, may be stated in the
|
||||||
|
form of a separately written license, or stated as exceptions;
|
||||||
|
the above requirements apply either way.
|
||||||
|
|
||||||
|
8. Termination.
|
||||||
|
|
||||||
|
You may not propagate or modify a covered work except as expressly
|
||||||
|
provided under this License. Any attempt otherwise to propagate or
|
||||||
|
modify it is void, and will automatically terminate your rights under
|
||||||
|
this License (including any patent licenses granted under the third
|
||||||
|
paragraph of section 11).
|
||||||
|
|
||||||
|
However, if you cease all violation of this License, then your
|
||||||
|
license from a particular copyright holder is reinstated (a)
|
||||||
|
provisionally, unless and until the copyright holder explicitly and
|
||||||
|
finally terminates your license, and (b) permanently, if the copyright
|
||||||
|
holder fails to notify you of the violation by some reasonable means
|
||||||
|
prior to 60 days after the cessation.
|
||||||
|
|
||||||
|
Moreover, your license from a particular copyright holder is
|
||||||
|
reinstated permanently if the copyright holder notifies you of the
|
||||||
|
violation by some reasonable means, this is the first time you have
|
||||||
|
received notice of violation of this License (for any work) from that
|
||||||
|
copyright holder, and you cure the violation prior to 30 days after
|
||||||
|
your receipt of the notice.
|
||||||
|
|
||||||
|
Termination of your rights under this section does not terminate the
|
||||||
|
licenses of parties who have received copies or rights from you under
|
||||||
|
this License. If your rights have been terminated and not permanently
|
||||||
|
reinstated, you do not qualify to receive new licenses for the same
|
||||||
|
material under section 10.
|
||||||
|
|
||||||
|
9. Acceptance Not Required for Having Copies.
|
||||||
|
|
||||||
|
You are not required to accept this License in order to receive or
|
||||||
|
run a copy of the Program. Ancillary propagation of a covered work
|
||||||
|
occurring solely as a consequence of using peer-to-peer transmission
|
||||||
|
to receive a copy likewise does not require acceptance. However,
|
||||||
|
nothing other than this License grants you permission to propagate or
|
||||||
|
modify any covered work. These actions infringe copyright if you do
|
||||||
|
not accept this License. Therefore, by modifying or propagating a
|
||||||
|
covered work, you indicate your acceptance of this License to do so.
|
||||||
|
|
||||||
|
10. Automatic Licensing of Downstream Recipients.
|
||||||
|
|
||||||
|
Each time you convey a covered work, the recipient automatically
|
||||||
|
receives a license from the original licensors, to run, modify and
|
||||||
|
propagate that work, subject to this License. You are not responsible
|
||||||
|
for enforcing compliance by third parties with this License.
|
||||||
|
|
||||||
|
An "entity transaction" is a transaction transferring control of an
|
||||||
|
organization, or substantially all assets of one, or subdividing an
|
||||||
|
organization, or merging organizations. If propagation of a covered
|
||||||
|
work results from an entity transaction, each party to that
|
||||||
|
transaction who receives a copy of the work also receives whatever
|
||||||
|
licenses to the work the party's predecessor in interest had or could
|
||||||
|
give under the previous paragraph, plus a right to possession of the
|
||||||
|
Corresponding Source of the work from the predecessor in interest, if
|
||||||
|
the predecessor has it or can get it with reasonable efforts.
|
||||||
|
|
||||||
|
You may not impose any further restrictions on the exercise of the
|
||||||
|
rights granted or affirmed under this License. For example, you may
|
||||||
|
not impose a license fee, royalty, or other charge for exercise of
|
||||||
|
rights granted under this License, and you may not initiate litigation
|
||||||
|
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||||
|
any patent claim is infringed by making, using, selling, offering for
|
||||||
|
sale, or importing the Program or any portion of it.
|
||||||
|
|
||||||
|
11. Patents.
|
||||||
|
|
||||||
|
A "contributor" is a copyright holder who authorizes use under this
|
||||||
|
License of the Program or a work on which the Program is based. The
|
||||||
|
work thus licensed is called the contributor's "contributor version".
|
||||||
|
|
||||||
|
A contributor's "essential patent claims" are all patent claims
|
||||||
|
owned or controlled by the contributor, whether already acquired or
|
||||||
|
hereafter acquired, that would be infringed by some manner, permitted
|
||||||
|
by this License, of making, using, or selling its contributor version,
|
||||||
|
but do not include claims that would be infringed only as a
|
||||||
|
consequence of further modification of the contributor version. For
|
||||||
|
purposes of this definition, "control" includes the right to grant
|
||||||
|
patent sublicenses in a manner consistent with the requirements of
|
||||||
|
this License.
|
||||||
|
|
||||||
|
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||||
|
patent license under the contributor's essential patent claims, to
|
||||||
|
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||||
|
propagate the contents of its contributor version.
|
||||||
|
|
||||||
|
In the following three paragraphs, a "patent license" is any express
|
||||||
|
agreement or commitment, however denominated, not to enforce a patent
|
||||||
|
(such as an express permission to practice a patent or covenant not to
|
||||||
|
sue for patent infringement). To "grant" such a patent license to a
|
||||||
|
party means to make such an agreement or commitment not to enforce a
|
||||||
|
patent against the party.
|
||||||
|
|
||||||
|
If you convey a covered work, knowingly relying on a patent license,
|
||||||
|
and the Corresponding Source of the work is not available for anyone
|
||||||
|
to copy, free of charge and under the terms of this License, through a
|
||||||
|
publicly available network server or other readily accessible means,
|
||||||
|
then you must either (1) cause the Corresponding Source to be so
|
||||||
|
available, or (2) arrange to deprive yourself of the benefit of the
|
||||||
|
patent license for this particular work, or (3) arrange, in a manner
|
||||||
|
consistent with the requirements of this License, to extend the patent
|
||||||
|
license to downstream recipients. "Knowingly relying" means you have
|
||||||
|
actual knowledge that, but for the patent license, your conveying the
|
||||||
|
covered work in a country, or your recipient's use of the covered work
|
||||||
|
in a country, would infringe one or more identifiable patents in that
|
||||||
|
country that you have reason to believe are valid.
|
||||||
|
|
||||||
|
If, pursuant to or in connection with a single transaction or
|
||||||
|
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||||
|
covered work, and grant a patent license to some of the parties
|
||||||
|
receiving the covered work authorizing them to use, propagate, modify
|
||||||
|
or convey a specific copy of the covered work, then the patent license
|
||||||
|
you grant is automatically extended to all recipients of the covered
|
||||||
|
work and works based on it.
|
||||||
|
|
||||||
|
A patent license is "discriminatory" if it does not include within
|
||||||
|
the scope of its coverage, prohibits the exercise of, or is
|
||||||
|
conditioned on the non-exercise of one or more of the rights that are
|
||||||
|
specifically granted under this License. You may not convey a covered
|
||||||
|
work if you are a party to an arrangement with a third party that is
|
||||||
|
in the business of distributing software, under which you make payment
|
||||||
|
to the third party based on the extent of your activity of conveying
|
||||||
|
the work, and under which the third party grants, to any of the
|
||||||
|
parties who would receive the covered work from you, a discriminatory
|
||||||
|
patent license (a) in connection with copies of the covered work
|
||||||
|
conveyed by you (or copies made from those copies), or (b) primarily
|
||||||
|
for and in connection with specific products or compilations that
|
||||||
|
contain the covered work, unless you entered into that arrangement,
|
||||||
|
or that patent license was granted, prior to 28 March 2007.
|
||||||
|
|
||||||
|
Nothing in this License shall be construed as excluding or limiting
|
||||||
|
any implied license or other defenses to infringement that may
|
||||||
|
otherwise be available to you under applicable patent law.
|
||||||
|
|
||||||
|
12. No Surrender of Others' Freedom.
|
||||||
|
|
||||||
|
If conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot convey a
|
||||||
|
covered work so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you may
|
||||||
|
not convey it at all. For example, if you agree to terms that obligate you
|
||||||
|
to collect a royalty for further conveying from those to whom you convey
|
||||||
|
the Program, the only way you could satisfy both those terms and this
|
||||||
|
License would be to refrain entirely from conveying the Program.
|
||||||
|
|
||||||
|
13. Use with the GNU Affero General Public License.
|
||||||
|
|
||||||
|
Notwithstanding any other provision of this License, you have
|
||||||
|
permission to link or combine any covered work with a work licensed
|
||||||
|
under version 3 of the GNU Affero General Public License into a single
|
||||||
|
combined work, and to convey the resulting work. The terms of this
|
||||||
|
License will continue to apply to the part which is the covered work,
|
||||||
|
but the special requirements of the GNU Affero General Public License,
|
||||||
|
section 13, concerning interaction through a network will apply to the
|
||||||
|
combination as such.
|
||||||
|
|
||||||
|
14. Revised Versions of this License.
|
||||||
|
|
||||||
|
The Free Software Foundation may publish revised and/or new versions of
|
||||||
|
the GNU General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the
|
||||||
|
Program specifies that a certain numbered version of the GNU General
|
||||||
|
Public License "or any later version" applies to it, you have the
|
||||||
|
option of following the terms and conditions either of that numbered
|
||||||
|
version or of any later version published by the Free Software
|
||||||
|
Foundation. If the Program does not specify a version number of the
|
||||||
|
GNU General Public License, you may choose any version ever published
|
||||||
|
by the Free Software Foundation.
|
||||||
|
|
||||||
|
If the Program specifies that a proxy can decide which future
|
||||||
|
versions of the GNU General Public License can be used, that proxy's
|
||||||
|
public statement of acceptance of a version permanently authorizes you
|
||||||
|
to choose that version for the Program.
|
||||||
|
|
||||||
|
Later license versions may give you additional or different
|
||||||
|
permissions. However, no additional obligations are imposed on any
|
||||||
|
author or copyright holder as a result of your choosing to follow a
|
||||||
|
later version.
|
||||||
|
|
||||||
|
15. Disclaimer of Warranty.
|
||||||
|
|
||||||
|
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||||
|
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||||
|
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||||
|
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||||
|
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||||
|
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||||
|
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
16. Limitation of Liability.
|
||||||
|
|
||||||
|
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||||
|
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||||
|
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||||
|
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||||
|
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||||
|
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||||
|
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||||
|
SUCH DAMAGES.
|
||||||
|
|
||||||
|
17. Interpretation of Sections 15 and 16.
|
||||||
|
|
||||||
|
If the disclaimer of warranty and limitation of liability provided
|
||||||
|
above cannot be given local legal effect according to their terms,
|
||||||
|
reviewing courts shall apply local law that most closely approximates
|
||||||
|
an absolute waiver of all civil liability in connection with the
|
||||||
|
Program, unless a warranty or assumption of liability accompanies a
|
||||||
|
copy of the Program in return for a fee.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
state the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program does terminal interaction, make it output a short
|
||||||
|
notice like this when it starts in an interactive mode:
|
||||||
|
|
||||||
|
<program> Copyright (C) <year> <name of author>
|
||||||
|
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, your program's commands
|
||||||
|
might be different; for a GUI interface, you would use an "about box".
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or school,
|
||||||
|
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||||
|
For more information on this, and how to apply and follow the GNU GPL, see
|
||||||
|
<http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
The GNU General Public License does not permit incorporating your program
|
||||||
|
into proprietary programs. If your program is a subroutine library, you
|
||||||
|
may consider it more useful to permit linking proprietary applications with
|
||||||
|
the library. If this is what you want to do, use the GNU Lesser General
|
||||||
|
Public License instead of this License. But first, please read
|
||||||
|
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||||
|
|
||||||
339
LICENSE
|
|
@ -1,339 +0,0 @@
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
Version 2, June 1991
|
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., <http://fsf.org/>
|
|
||||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
|
||||||
of this license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Preamble
|
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
|
||||||
License is intended to guarantee your freedom to share and change free
|
|
||||||
software--to make sure the software is free for all its users. This
|
|
||||||
General Public License applies to most of the Free Software
|
|
||||||
Foundation's software and to any other program whose authors commit to
|
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
|
||||||
the GNU Lesser General Public License instead.) You can apply it to
|
|
||||||
your programs, too.
|
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
|
||||||
price. Our General Public Licenses are designed to make sure that you
|
|
||||||
have the freedom to distribute copies of free software (and charge for
|
|
||||||
this service if you wish), that you receive source code or can get it
|
|
||||||
if you want it, that you can change the software or use pieces of it
|
|
||||||
in new free programs; and that you know you can do these things.
|
|
||||||
|
|
||||||
To protect your rights, we need to make restrictions that forbid
|
|
||||||
anyone to deny you these rights or to ask you to surrender the rights.
|
|
||||||
These restrictions translate to certain responsibilities for you if you
|
|
||||||
distribute copies of the software, or if you modify it.
|
|
||||||
|
|
||||||
For example, if you distribute copies of such a program, whether
|
|
||||||
gratis or for a fee, you must give the recipients all the rights that
|
|
||||||
you have. You must make sure that they, too, receive or can get the
|
|
||||||
source code. And you must show them these terms so they know their
|
|
||||||
rights.
|
|
||||||
|
|
||||||
We protect your rights with two steps: (1) copyright the software, and
|
|
||||||
(2) offer you this license which gives you legal permission to copy,
|
|
||||||
distribute and/or modify the software.
|
|
||||||
|
|
||||||
Also, for each author's protection and ours, we want to make certain
|
|
||||||
that everyone understands that there is no warranty for this free
|
|
||||||
software. If the software is modified by someone else and passed on, we
|
|
||||||
want its recipients to know that what they have is not the original, so
|
|
||||||
that any problems introduced by others will not reflect on the original
|
|
||||||
authors' reputations.
|
|
||||||
|
|
||||||
Finally, any free program is threatened constantly by software
|
|
||||||
patents. We wish to avoid the danger that redistributors of a free
|
|
||||||
program will individually obtain patent licenses, in effect making the
|
|
||||||
program proprietary. To prevent this, we have made it clear that any
|
|
||||||
patent must be licensed for everyone's free use or not licensed at all.
|
|
||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
|
||||||
modification follow.
|
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
|
||||||
a notice placed by the copyright holder saying it may be distributed
|
|
||||||
under the terms of this General Public License. The "Program", below,
|
|
||||||
refers to any such program or work, and a "work based on the Program"
|
|
||||||
means either the Program or any derivative work under copyright law:
|
|
||||||
that is to say, a work containing the Program or a portion of it,
|
|
||||||
either verbatim or with modifications and/or translated into another
|
|
||||||
language. (Hereinafter, translation is included without limitation in
|
|
||||||
the term "modification".) Each licensee is addressed as "you".
|
|
||||||
|
|
||||||
Activities other than copying, distribution and modification are not
|
|
||||||
covered by this License; they are outside its scope. The act of
|
|
||||||
running the Program is not restricted, and the output from the Program
|
|
||||||
is covered only if its contents constitute a work based on the
|
|
||||||
Program (independent of having been made by running the Program).
|
|
||||||
Whether that is true depends on what the Program does.
|
|
||||||
|
|
||||||
1. You may copy and distribute verbatim copies of the Program's
|
|
||||||
source code as you receive it, in any medium, provided that you
|
|
||||||
conspicuously and appropriately publish on each copy an appropriate
|
|
||||||
copyright notice and disclaimer of warranty; keep intact all the
|
|
||||||
notices that refer to this License and to the absence of any warranty;
|
|
||||||
and give any other recipients of the Program a copy of this License
|
|
||||||
along with the Program.
|
|
||||||
|
|
||||||
You may charge a fee for the physical act of transferring a copy, and
|
|
||||||
you may at your option offer warranty protection in exchange for a fee.
|
|
||||||
|
|
||||||
2. You may modify your copy or copies of the Program or any portion
|
|
||||||
of it, thus forming a work based on the Program, and copy and
|
|
||||||
distribute such modifications or work under the terms of Section 1
|
|
||||||
above, provided that you also meet all of these conditions:
|
|
||||||
|
|
||||||
a) You must cause the modified files to carry prominent notices
|
|
||||||
stating that you changed the files and the date of any change.
|
|
||||||
|
|
||||||
b) You must cause any work that you distribute or publish, that in
|
|
||||||
whole or in part contains or is derived from the Program or any
|
|
||||||
part thereof, to be licensed as a whole at no charge to all third
|
|
||||||
parties under the terms of this License.
|
|
||||||
|
|
||||||
c) If the modified program normally reads commands interactively
|
|
||||||
when run, you must cause it, when started running for such
|
|
||||||
interactive use in the most ordinary way, to print or display an
|
|
||||||
announcement including an appropriate copyright notice and a
|
|
||||||
notice that there is no warranty (or else, saying that you provide
|
|
||||||
a warranty) and that users may redistribute the program under
|
|
||||||
these conditions, and telling the user how to view a copy of this
|
|
||||||
License. (Exception: if the Program itself is interactive but
|
|
||||||
does not normally print such an announcement, your work based on
|
|
||||||
the Program is not required to print an announcement.)
|
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
|
||||||
identifiable sections of that work are not derived from the Program,
|
|
||||||
and can be reasonably considered independent and separate works in
|
|
||||||
themselves, then this License, and its terms, do not apply to those
|
|
||||||
sections when you distribute them as separate works. But when you
|
|
||||||
distribute the same sections as part of a whole which is a work based
|
|
||||||
on the Program, the distribution of the whole must be on the terms of
|
|
||||||
this License, whose permissions for other licensees extend to the
|
|
||||||
entire whole, and thus to each and every part regardless of who wrote it.
|
|
||||||
|
|
||||||
Thus, it is not the intent of this section to claim rights or contest
|
|
||||||
your rights to work written entirely by you; rather, the intent is to
|
|
||||||
exercise the right to control the distribution of derivative or
|
|
||||||
collective works based on the Program.
|
|
||||||
|
|
||||||
In addition, mere aggregation of another work not based on the Program
|
|
||||||
with the Program (or with a work based on the Program) on a volume of
|
|
||||||
a storage or distribution medium does not bring the other work under
|
|
||||||
the scope of this License.
|
|
||||||
|
|
||||||
3. You may copy and distribute the Program (or a work based on it,
|
|
||||||
under Section 2) in object code or executable form under the terms of
|
|
||||||
Sections 1 and 2 above provided that you also do one of the following:
|
|
||||||
|
|
||||||
a) Accompany it with the complete corresponding machine-readable
|
|
||||||
source code, which must be distributed under the terms of Sections
|
|
||||||
1 and 2 above on a medium customarily used for software interchange; or,
|
|
||||||
|
|
||||||
b) Accompany it with a written offer, valid for at least three
|
|
||||||
years, to give any third party, for a charge no more than your
|
|
||||||
cost of physically performing source distribution, a complete
|
|
||||||
machine-readable copy of the corresponding source code, to be
|
|
||||||
distributed under the terms of Sections 1 and 2 above on a medium
|
|
||||||
customarily used for software interchange; or,
|
|
||||||
|
|
||||||
c) Accompany it with the information you received as to the offer
|
|
||||||
to distribute corresponding source code. (This alternative is
|
|
||||||
allowed only for noncommercial distribution and only if you
|
|
||||||
received the program in object code or executable form with such
|
|
||||||
an offer, in accord with Subsection b above.)
|
|
||||||
|
|
||||||
The source code for a work means the preferred form of the work for
|
|
||||||
making modifications to it. For an executable work, complete source
|
|
||||||
code means all the source code for all modules it contains, plus any
|
|
||||||
associated interface definition files, plus the scripts used to
|
|
||||||
control compilation and installation of the executable. However, as a
|
|
||||||
special exception, the source code distributed need not include
|
|
||||||
anything that is normally distributed (in either source or binary
|
|
||||||
form) with the major components (compiler, kernel, and so on) of the
|
|
||||||
operating system on which the executable runs, unless that component
|
|
||||||
itself accompanies the executable.
|
|
||||||
|
|
||||||
If distribution of executable or object code is made by offering
|
|
||||||
access to copy from a designated place, then offering equivalent
|
|
||||||
access to copy the source code from the same place counts as
|
|
||||||
distribution of the source code, even though third parties are not
|
|
||||||
compelled to copy the source along with the object code.
|
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
|
||||||
except as expressly provided under this License. Any attempt
|
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
|
||||||
void, and will automatically terminate your rights under this License.
|
|
||||||
However, parties who have received copies, or rights, from you under
|
|
||||||
this License will not have their licenses terminated so long as such
|
|
||||||
parties remain in full compliance.
|
|
||||||
|
|
||||||
5. You are not required to accept this License, since you have not
|
|
||||||
signed it. However, nothing else grants you permission to modify or
|
|
||||||
distribute the Program or its derivative works. These actions are
|
|
||||||
prohibited by law if you do not accept this License. Therefore, by
|
|
||||||
modifying or distributing the Program (or any work based on the
|
|
||||||
Program), you indicate your acceptance of this License to do so, and
|
|
||||||
all its terms and conditions for copying, distributing or modifying
|
|
||||||
the Program or works based on it.
|
|
||||||
|
|
||||||
6. Each time you redistribute the Program (or any work based on the
|
|
||||||
Program), the recipient automatically receives a license from the
|
|
||||||
original licensor to copy, distribute or modify the Program subject to
|
|
||||||
these terms and conditions. You may not impose any further
|
|
||||||
restrictions on the recipients' exercise of the rights granted herein.
|
|
||||||
You are not responsible for enforcing compliance by third parties to
|
|
||||||
this License.
|
|
||||||
|
|
||||||
7. If, as a consequence of a court judgment or allegation of patent
|
|
||||||
infringement or for any other reason (not limited to patent issues),
|
|
||||||
conditions are imposed on you (whether by court order, agreement or
|
|
||||||
otherwise) that contradict the conditions of this License, they do not
|
|
||||||
excuse you from the conditions of this License. If you cannot
|
|
||||||
distribute so as to satisfy simultaneously your obligations under this
|
|
||||||
License and any other pertinent obligations, then as a consequence you
|
|
||||||
may not distribute the Program at all. For example, if a patent
|
|
||||||
license would not permit royalty-free redistribution of the Program by
|
|
||||||
all those who receive copies directly or indirectly through you, then
|
|
||||||
the only way you could satisfy both it and this License would be to
|
|
||||||
refrain entirely from distribution of the Program.
|
|
||||||
|
|
||||||
If any portion of this section is held invalid or unenforceable under
|
|
||||||
any particular circumstance, the balance of the section is intended to
|
|
||||||
apply and the section as a whole is intended to apply in other
|
|
||||||
circumstances.
|
|
||||||
|
|
||||||
It is not the purpose of this section to induce you to infringe any
|
|
||||||
patents or other property right claims or to contest validity of any
|
|
||||||
such claims; this section has the sole purpose of protecting the
|
|
||||||
integrity of the free software distribution system, which is
|
|
||||||
implemented by public license practices. Many people have made
|
|
||||||
generous contributions to the wide range of software distributed
|
|
||||||
through that system in reliance on consistent application of that
|
|
||||||
system; it is up to the author/donor to decide if he or she is willing
|
|
||||||
to distribute software through any other system and a licensee cannot
|
|
||||||
impose that choice.
|
|
||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
|
||||||
be a consequence of the rest of this License.
|
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
|
||||||
original copyright holder who places the Program under this License
|
|
||||||
may add an explicit geographical distribution limitation excluding
|
|
||||||
those countries, so that distribution is permitted only in or among
|
|
||||||
countries not thus excluded. In such case, this License incorporates
|
|
||||||
the limitation as if written in the body of this License.
|
|
||||||
|
|
||||||
9. The Free Software Foundation may publish revised and/or new versions
|
|
||||||
of the General Public License from time to time. Such new versions will
|
|
||||||
be similar in spirit to the present version, but may differ in detail to
|
|
||||||
address new problems or concerns.
|
|
||||||
|
|
||||||
Each version is given a distinguishing version number. If the Program
|
|
||||||
specifies a version number of this License which applies to it and "any
|
|
||||||
later version", you have the option of following the terms and conditions
|
|
||||||
either of that version or of any later version published by the Free
|
|
||||||
Software Foundation. If the Program does not specify a version number of
|
|
||||||
this License, you may choose any version ever published by the Free Software
|
|
||||||
Foundation.
|
|
||||||
|
|
||||||
10. If you wish to incorporate parts of the Program into other free
|
|
||||||
programs whose distribution conditions are different, write to the author
|
|
||||||
to ask for permission. For software which is copyrighted by the Free
|
|
||||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
|
||||||
make exceptions for this. Our decision will be guided by the two goals
|
|
||||||
of preserving the free status of all derivatives of our free software and
|
|
||||||
of promoting the sharing and reuse of software generally.
|
|
||||||
|
|
||||||
NO WARRANTY
|
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
|
||||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
|
||||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
|
||||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
|
||||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
|
||||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
|
||||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
|
||||||
REPAIR OR CORRECTION.
|
|
||||||
|
|
||||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
|
||||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
|
||||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
|
||||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
|
||||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
|
||||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
|
||||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|
||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
|
||||||
possible use to the public, the best way to achieve this is to make it
|
|
||||||
free software which everyone can redistribute and change under these terms.
|
|
||||||
|
|
||||||
To do so, attach the following notices to the program. It is safest
|
|
||||||
to attach them to the start of each source file to most effectively
|
|
||||||
convey the exclusion of warranty; and each file should have at least
|
|
||||||
the "copyright" line and a pointer to where the full notice is found.
|
|
||||||
|
|
||||||
DrawOnYourScreen
|
|
||||||
Copyright (C) 2019 abakkk
|
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
|
||||||
when it starts in an interactive mode:
|
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) year name of author
|
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
|
||||||
This is free software, and you are welcome to redistribute it
|
|
||||||
under certain conditions; type `show c' for details.
|
|
||||||
|
|
||||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
|
||||||
parts of the General Public License. Of course, the commands you use may
|
|
||||||
be called something other than `show w' and `show c'; they could even be
|
|
||||||
mouse-clicks or menu items--whatever suits your program.
|
|
||||||
|
|
||||||
You should also get your employer (if you work as a programmer) or your
|
|
||||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
|
||||||
necessary. Here is a sample; alter the names:
|
|
||||||
|
|
||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
|
||||||
|
|
||||||
{signature of Ty Coon}, 1 April 1989
|
|
||||||
Ty Coon, President of Vice
|
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
|
||||||
consider it more useful to permit linking proprietary applications with the
|
|
||||||
library. If this is what you want to do, use the GNU Lesser General
|
|
||||||
Public License instead of this License.
|
|
||||||
|
|
@ -0,0 +1,155 @@
|
||||||
|
v11.1 - April 2021
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Not to erase the text when pressing "Escape" #60
|
||||||
|
|
||||||
|
v11 - February 2021
|
||||||
|
===================
|
||||||
|
|
||||||
|
* GS 40 compatibility (40.beta)
|
||||||
|
* Gtk4 port (preferences)
|
||||||
|
* Toggle animations (background, grid and square area)
|
||||||
|
* Multi-line text elements
|
||||||
|
* Start a new line with "Enter" (text tool)
|
||||||
|
* Add "centered" text alignment
|
||||||
|
* Convenient marks for rotation and stretch transformations
|
||||||
|
|
||||||
|
v10 - October 2020
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Fix multi-monitor support #52
|
||||||
|
|
||||||
|
v9 - October 2020
|
||||||
|
=================
|
||||||
|
|
||||||
|
* Split the drawing area in several layers (performance)
|
||||||
|
* Start a new line with "Shift + Enter" (text tool)
|
||||||
|
|
||||||
|
v8.1 - October 2020
|
||||||
|
===================
|
||||||
|
|
||||||
|
* Fix unsanitized GType names #46
|
||||||
|
* Quick free drawings are smoother #45
|
||||||
|
* Transformations are undoable/redoable
|
||||||
|
|
||||||
|
v8 - September 2020
|
||||||
|
===================
|
||||||
|
|
||||||
|
Nothing.
|
||||||
|
|
||||||
|
v7 - September 2020
|
||||||
|
===================
|
||||||
|
|
||||||
|
* Can import GIMP palettes.
|
||||||
|
* Can color SVG images.
|
||||||
|
* Integrate color picker (GS buit-in or Color Picker extension).
|
||||||
|
|
||||||
|
v6.4 - September 2020
|
||||||
|
=====================
|
||||||
|
|
||||||
|
* Prepare GS 3.38 compatibility.
|
||||||
|
* Add tooltips to sub-menu buttons also.
|
||||||
|
* Fix drawing directory monitoring when it does not exist yet.
|
||||||
|
* Fix text entry / ibus candidate popup position.
|
||||||
|
|
||||||
|
v6.3 - September 2020
|
||||||
|
=====================
|
||||||
|
|
||||||
|
* Replace user stylesheet with proper drawing settings
|
||||||
|
* Multi-palettes
|
||||||
|
* Possibility to add insertable images from the clipboard
|
||||||
|
* Image directory is configurable
|
||||||
|
* Thumbnails in "Open drawing" sub-menu
|
||||||
|
* Drawings can be directly inserted as an image.
|
||||||
|
* Add a lot of icons in the menu and the OSD notifications
|
||||||
|
* Group menu items at the bottom
|
||||||
|
* Add tooltips to menu buttons
|
||||||
|
* New "Persistent over toggles' setting #42
|
||||||
|
|
||||||
|
v6.2 - August 2020
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Show the text entry when ibusCandidatePopup is used
|
||||||
|
* Regroup first menu items
|
||||||
|
* Center grid overlay
|
||||||
|
* Image shape
|
||||||
|
* Extend font family choices
|
||||||
|
* Fix sub-menu scroll view adjustment
|
||||||
|
|
||||||
|
v6.1 - June 2020
|
||||||
|
================
|
||||||
|
|
||||||
|
* Fix empty media-keys settings case #28
|
||||||
|
* Fix label color in OSD and menu #31
|
||||||
|
* Fix OSD width
|
||||||
|
* Fix "Hide panel and dock"
|
||||||
|
* Small menu on small monitor
|
||||||
|
* Start a new text line with the `Enter` key #30
|
||||||
|
* IBus inputs #29 #34
|
||||||
|
* Non-latin and emoji characters rendered
|
||||||
|
* GS keyboard is now available to type text
|
||||||
|
* Grid overlay
|
||||||
|
* Polygon and polyline shapes
|
||||||
|
* Move, resize and mirror tools
|
||||||
|
* Fill rule and text alignment style attributes
|
||||||
|
* An optional fourth control point for Bézier curves
|
||||||
|
* Keybinding to toggle modeless/modal #6 #9 #20 #24 #33
|
||||||
|
(ungrabs keyboard and mouse while drawing remains at the top)
|
||||||
|
* Attributes are now persistent through drawing mode toggling #27
|
||||||
|
|
||||||
|
v6 - March 2020
|
||||||
|
===============
|
||||||
|
|
||||||
|
* GS 3.36 compatibility
|
||||||
|
|
||||||
|
v5.1 - March 2020
|
||||||
|
=================
|
||||||
|
|
||||||
|
* Add "Open" and "Save drawing"
|
||||||
|
* Change some keyboard shortcuts
|
||||||
|
* Replace "smoothed stroke" preference with `Ctrl` key modifier
|
||||||
|
* Add `space` key modifier to ignore pointer movement #20
|
||||||
|
* User style is now stored in user data directory (`user.css`)
|
||||||
|
* Customizable square area size #22
|
||||||
|
|
||||||
|
v5 - December 2019
|
||||||
|
==================
|
||||||
|
|
||||||
|
* Improve pointer cursor
|
||||||
|
* Add 3.24 version as supported
|
||||||
|
* Use maxLevel in line-width OSD
|
||||||
|
* Small fix with text shape that displayed keybindings
|
||||||
|
|
||||||
|
|
||||||
|
v4.1 - October 2019
|
||||||
|
===================
|
||||||
|
|
||||||
|
* GS 3.34 compatibility
|
||||||
|
* Create drawing menu on demand
|
||||||
|
* Allow 0 px line width because stroke lines cannot have color with some transparency
|
||||||
|
|
||||||
|
|
||||||
|
v4 - April 2019
|
||||||
|
===============
|
||||||
|
|
||||||
|
* Add drawing menu
|
||||||
|
* Add panel indicator
|
||||||
|
* Prefs to disable indicator and notifications
|
||||||
|
* Change middle click action
|
||||||
|
|
||||||
|
v3 - March 2019
|
||||||
|
===============
|
||||||
|
|
||||||
|
* Fix area container integration #1
|
||||||
|
* Add persistence
|
||||||
|
|
||||||
|
v2 - March 2019
|
||||||
|
===============
|
||||||
|
|
||||||
|
* Add transformations
|
||||||
|
* Add square area
|
||||||
|
|
||||||
|
v1 - March 2019
|
||||||
|
===============
|
||||||
|
|
||||||
|
* Initial release
|
||||||
75
README.md
|
|
@ -1,25 +1,68 @@
|
||||||
__Draw On Your Screen__
|
# Draw On Your Screen
|
||||||
=======================
|
|
||||||
Start drawing with Super+Alt+D.
|
Start drawing with Super+Alt+D.
|
||||||
Then save your beautiful work by taking a screenshot.
|
Then save your beautiful work by taking a screenshot.
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
Features :
|
## Features
|
||||||
----------
|
|
||||||
|
|
||||||
1. Basic shapes and text
|
* Basic shapes (rectangle, circle, ellipse, line, curve, polygon, polyline, text, image, free)
|
||||||
2. Smooth stroke
|
* Basic transformations (move, rotate, resize, stretch, mirror, inverse)
|
||||||
3. Multi-monitor support
|
* Smooth stroke
|
||||||
4. Export to SVG
|
* Draw over applications
|
||||||
|
* Keep drawings on desktop background with persistence (notes, children's art ...)
|
||||||
|
* Multi-monitor support
|
||||||
|
* Export to SVG
|
||||||
|
|
||||||
Install :
|
## Install
|
||||||
----------
|
|
||||||
|
|
||||||
1. Download and decompress or clone the repository
|
1. Download and decompress or clone the repository
|
||||||
2. Place the resulting directory in ~/.local/share/gnome-shell/extensions
|
2. Place the directory (the one that contains `metadata.json`) in `~/.local/share/gnome-shell/extensions`
|
||||||
3. IMPORTANT: change the directory name to drawOnYourScreen@abakkk.framagit.org
|
3. **Change the directory name** to `draw-on-your-screen@som.codeberg.org`
|
||||||
4. A small shot of `alt + F2` `r` to restart Gnome-shell under Xorg, restart or relogin under Wayland
|
4. Xorg: type `alt + F2` and `r` to restart gnome-shell
|
||||||
5. Enable the extension in Gnome-tweak-tool
|
Wayland: restart or re-login
|
||||||
|
5. Enable the extension with GNOME Extensions or GNOME Tweaks application
|
||||||
6. `Super + Alt + D` to test
|
6. `Super + Alt + D` to test
|
||||||
7. [https://framagit.org/abakkk/DrawOnYourScreen/issues](https://framagit.org/abakkk/DrawOnYourScreen/issues) to say it doesn't work
|
7. [https://codeberg.org/som/DrawOnYourScreen/issues](https://codeberg.org/som/DrawOnYourScreen/issues) to say it doesn't work
|
||||||
|
|
||||||
|
## Tips and tricks
|
||||||
|
|
||||||
|
* Power is nothing without control:
|
||||||
|
|
||||||
|
The `Ctrl` key provides an extra functionality for each tool.
|
||||||
|
|
||||||
|
[Range of Ctrl key possibilities](https://codeberg.org/som/DrawOnYourScreen/src/branch/media/ctrl.webm)
|
||||||
|
|
||||||
|
* Draw arrows:
|
||||||
|
|
||||||
|
Intersect two lines and curve the second thanks to the `Ctrl` key.
|
||||||
|
|
||||||
|
[How to draw an arrow](https://codeberg.org/som/DrawOnYourScreen/src/branch/media/arrow.webm)
|
||||||
|
|
||||||
|
* Duplicate an element:
|
||||||
|
|
||||||
|
Hold the `Shift` key while starting moving.
|
||||||
|
|
||||||
|
[How to duplicate an element](https://codeberg.org/som/DrawOnYourScreen/src/branch/media/duplicate.webm)
|
||||||
|
|
||||||
|
* Insertable images:
|
||||||
|
|
||||||
|
You can insert images (jpeg, png, svg) in your drawings. By default images are sought in `~/.local/share/draw-on-your-screen/images/` but the location is configurable in the preferences. Another way is to copy-past the images from Nautilus or any clipboard source by using the usual `Ctrl + V` shortcut inside the drawing mode.
|
||||||
|
|
||||||
|
[How to add images from Nautilus](https://codeberg.org/som/DrawOnYourScreen/src/branch/media/ctrl-plus-v.webm)
|
||||||
|
|
||||||
|
* Eraser and SVG:
|
||||||
|
|
||||||
|
There is no eraser in SVG so when you export elements made with the eraser to a SVG file, they are colored with the background color, transparent if it is disabled. See `“Add a drawing background”` or edit the SVG file afterwards.
|
||||||
|
|
||||||
|
* Screenshot Tool extension:
|
||||||
|
|
||||||
|
[Screenshot Tool](https://extensions.gnome.org/extension/1112/screenshot-tool/) is a convenient extension to “create, copy, store and upload screenshots”. In order to select a screenshoot area with your pointer while keeping the drawing in place, you need first to tell DrawOnYourScreen to ungrab the pointer (`Ctrl + Super + Alt + D`).
|
||||||
|
|
||||||
|
* Color Picker extension:
|
||||||
|
|
||||||
|
If the GNOME Shell built-in color picker is too basic for you, have a look at the [Color Picker extension](https://extensions.gnome.org/extension/3396/color-picker), which let's you select the pixel accurately, preview the color and adjust its values. Once installed and enabled, it will be transparently integrated into DrawOnYourScreen.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<metadata>
|
||||||
|
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/tool-arc-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
</metadata>
|
||||||
|
<path fill="#474747" d="M 14,1 C 13,1 13,2 13,2 13,2 12.941,4.04 12.701,4.6152 12.204,5.8094 11.214,7 8,7 4.2143,7 2.2036,8.8094 1.4512,10.615 1,11.698 1,14 1,14 1,14 1,15 2,15 3,15 3,14 3,14 3,14 2.9373,12.253 3.2988,11.385 3.7964,10.191 4.7857,9 8,9 11.786,9 13.796,7.1906 14.549,5.3848 15.045,4.1955 15,2 15,2 15,2 15,1 14,1 Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 604 B |
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||||
|
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||||
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
||||||
|
<metadata>
|
||||||
|
Created by potrace 1.15, written by Peter Selinger 2001-2017
|
||||||
|
https://svgsilh.com/image/1745699.html
|
||||||
|
https://creativecommons.org/publicdomain/zero/1.0
|
||||||
|
</metadata>
|
||||||
|
<g fill="#474747">
|
||||||
|
<path d="M63.3 115.3 c-8.1 -9.8 -16.3 -21.4 -22.0 -31.2 -7.3 -12.5 -11.6
|
||||||
|
-23.5 -12.7 -32.2 -0.7 -5.2 -0.3 -9.1 1.3 -14.3 1.2 -4.0 3.1 -7.8 5.5 -11.5
|
||||||
|
1.6 -2.4 3.0 -4.1 5.1 -6.2 3.1 -3.1 5.7 -5.0 9.3 -6.8 3.8 -1.9 7.5 -3.0
|
||||||
|
12.0 -3.5 1.4 -0.2 5.4 -0.2 6.8 0 8.4 0.9 15.5 4.4 21.6 10.7 5.6 5.7 9.7 13.5
|
||||||
|
11.3 21.5 0.7 3.4 0.7 7.5 0 11.8 -2.3 14.3 -13.1 34.4 -30.0 56.3 -2.4 3.1
|
||||||
|
-6.1 7.7 -6.3 7.7 0 0 -0.9 -1.0 -1.8 -2.1z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 851 B |
|
|
@ -0,0 +1,5 @@
|
||||||
|
<svg viewBox="0 0 576 576" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#474747" x="228" y="228" width="120" height="120"/>
|
||||||
|
<rect fill="#474747" x="50" y="228" width="120" height="120"/>
|
||||||
|
<rect fill="#474747" x="406" y="228" width="120" height="120"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 267 B |
|
|
@ -0,0 +1,8 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<metadata>
|
||||||
|
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/document-export-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
</metadata>
|
||||||
|
<path fill="#474747" d="M 3,15 C 3,15 2,15 2,14 V 11 2 C 2,1 3,1 3,1 H 13 C 13,1 14,1 14,2 V 6.25 L 12,5 V 3.01 H 4 V 13 H 12 V 11 L 14,9.75 V 14 C 14,14 14,15 13,15 Z"/>
|
||||||
|
<path fill="#474747" d="M 10,11 V 9 H 6 V 7 H 10 V 5 L 14.5,8 Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 517 B |
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg viewBox="-50 -130 740 740" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<ellipse fill="#474747" cx="320" cy="240" rx="320" ry="240"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 178 B |
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<polygon fill="#474747" fill-rule="evenodd" points="100,10 40,190 190,74 10,74 160,190"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 201 B |
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<polygon fill="#474747" fill-rule="nonzero" points="100,10 40,190 190,74 10,74 160,190"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 201 B |
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg viewBox="0 0 576 576" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#474747" x="50" y="228" width="476" height="120"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 135 B |
|
|
@ -0,0 +1,4 @@
|
||||||
|
<svg viewBox="0 0 576 576" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#474747" x="50" y="178" width="350" height="220"/>
|
||||||
|
<ellipse fill="#474747" cx="400" cy="288" rx="130" ry="110"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 199 B |
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg viewBox="-50 -50 676 676" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#474747" d="M -13 518 L288 0 L589 518 L500 576 L288 217 L76 576z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 156 B |
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?xml version="1.0" standalone="no"?>
|
||||||
|
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||||
|
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||||
|
<svg version="1.0" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
||||||
|
<metadata>
|
||||||
|
Created by potrace 1.15, written by Peter Selinger 2001-2017
|
||||||
|
https://svgsilh.com/image/2026954.html
|
||||||
|
https://creativecommons.org/publicdomain/zero/1.0/
|
||||||
|
</metadata>
|
||||||
|
<g transform="translate(0,128) scale(1,-1)" fill="#474747">
|
||||||
|
<path d="M61.4 111.9 c-11.9 -0.8 -22.5 -5.4 -30.9 -13.6 -7.6 -7.5 -12.5
|
||||||
|
-17 -14 -27.4 -0.4 -2.6 -0.5 -3.8 -0.5 -7 0 -4.4 0.4 -7.6 1.4 -11.7 0.9
|
||||||
|
-3.5 1.8 -6 3.5 -9.5 1.9 -3.8 3.6 -6.5 6.4 -9.8 1.2 -1.4 4.6 -4.8 6.2
|
||||||
|
-6.1 7.1 -5.8 15.4 -9.4 24.4 -10.6 3.1 -0.4 6.9 -0.5 8 -0.2 1.8 0.5 3.3 1.4
|
||||||
|
4.3 2.8 1.3 1.6 1.9 3.5 1.8 5.6 -0.1 2 -0.7 3.3 -2.2 5.1 -0.7 0.8 -1.4 2.2
|
||||||
|
-1.6 3.2 -0.3 1 -0.3 2.9 0 3.8 0.6 2.4 2.3 4.4 4.5 5.4 1.5 0.7 1.4 0.7 8.9 0.8
|
||||||
|
3.7 0 6.9 0.1 7 0.1 0.1 0 0.7 0.1 1.3 0.2 5.4 0.9 10.5 3.5 14.5 7.5 3.2 3.3 5.4
|
||||||
|
6.9 6.7 11.3 1.1 3.6 1.3 8.1 0.7 12.7 -1.9 13.4 -10.7 25.1 -23.8 31.8 -5.8
|
||||||
|
3 -12 4.7 -18.7 5.4 -1.5 0.2 -6.5 0.3 -7.9 0.2z m-8.4 -10.9 c2.7 -0.9 4.7
|
||||||
|
-3 5.5 -5.7 0.3 -1.1 0.3 -2.9 0 -4 -0.7 -2.8 -3 -5 -5.8 -5.8 -1.1 -0.3
|
||||||
|
-2.8 -0.3 -3.9 0 -2.8 0.7 -4.8 2.7 -5.7 5.5 -0.3 0.9 -0.4 2.7 -0.2 3.7 0.5 3.1 3
|
||||||
|
5.7 6.1 6.4 0.9 0.2 3.1 0.1 4 -0.2z m26 0.2 c3.2 -0.7 5.7 -3.3 6.2 -6.4 0.2
|
||||||
|
-1 0.1 -2.8 -0.2 -3.7 -0.9 -2.8 -2.9 -4.7 -5.7 -5.5 -1.1 -0.3 -2.8 -0.3 -3.9 0
|
||||||
|
-2.8 0.7 -5 2.3 -5.8 5.8 -0.3 1.1 -0.3 2.9 0 4 0.8 3 3.2 5.3 6.2 5.9 0.7
|
||||||
|
0.1 2.4 0.1 3.2 0z m-43.1 -21.3 c1.8 -0.3 3.1 -1 4.5 -2.3 1.3 -1.3 2 -2.7
|
||||||
|
2.3 -4.6 0.3 -2.5 -0.6 -5 -2.5 -6.7 -1 -0.9 -2 -1.5 -3.4 -1.9 -1 -0.3
|
||||||
|
-3 -0.3 -4 0 -3.6 1 -6 4.1 -6 7.8 0 1.7 0.4 3.1 1.3 4.4 1.8 2.6 4.9
|
||||||
|
4 7.9 3.5z m59.6 -0.2 c3.5 -1 5.8 -4.1 5.8 -7.7 0 -1.7 -0.4 -3 -1.3 -4.3
|
||||||
|
-2.5 -3.9 -7.7 -4.8 -11.5 -2.1 -1.2 0.9 -2.4 2.5 -2.9 4 -0.9 2.7 -0.2 5.8
|
||||||
|
1.8 7.9 1.2 1.3 2.7 2.1 4.4 2.5 1 0.2 2.7 0.1 3.6 -0.2z"/>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.9 KiB |
|
|
@ -0,0 +1,6 @@
|
||||||
|
<svg viewBox="0 0 576 576" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#474747" x="99.06" y="116.46" width="426.79" height="88.9" transform="translate(296.43,151.57) rotate(-17.00) translate(-312.45,-160.91)"/>
|
||||||
|
<rect fill="#474747" x="382.92" y="219.17" width="137.39" height="55" transform="translate(442.19,191.07) rotate(-16.48) translate(-451.62,-237.50)"/>
|
||||||
|
<rect fill="#474747" x="99.06" y="116.46" width="426.79" height="88.9" transform="translate(0, 284.75) rotate(180) scale(1, -1) rotate(-180) translate(296.43,-133.18) rotate(-17.00) translate(-312.45,-160.91)"/>
|
||||||
|
<rect fill="#474747" x="382.92" y="219.17" width="137.39" height="55" transform="translate(0, 284.02) rotate(180) scale(1, -1) rotate(-180) translate(442.19,-92.95) rotate(-16.48) translate(-451.62,-237.50)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 803 B |
|
|
@ -0,0 +1,3 @@
|
||||||
|
<svg viewBox="-50 -130 740 740" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="#474747" d="m4,239.99861l0,0c0,-130.70635 141.47749,-236.66527 315.99786,-236.66527l0,0c83.80939,0 164.18481,24.93385 223.44586,69.31971c59.2608,44.38261 92.55627,104.57763 92.55627,167.34556l0,0c0,130.70897 -141.47833,236.66808 -316.00214,236.66808l0,0c-174.52037,0 -315.99786,-105.95911 -315.99786,-236.66808zm158.00044,0l0,0c0,65.35454 70.73923,118.33434 157.99742,118.33434c87.26294,0 158.00085,-52.9798 158.00085,-118.33434c0,-65.35178 -70.73792,-118.33152 -158.00085,-118.33152l0,0c-87.25819,0 -157.99742,52.97974 -157.99742,118.33152z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 673 B |
|
|
@ -0,0 +1,7 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<metadata>
|
||||||
|
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/tool-circle-move-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
</metadata>
|
||||||
|
<path fill="#474747" d="M 8,1 A 7,7 0 0 0 1,8 7,7 0 0 0 8,15 7,7 0 0 0 15,8 7,7 0 0 0 8,1 Z M 8,3 A 5,5 0 0 1 13,8 5,5 0 0 1 8,13 5,5 0 0 1 3,8 5,5 0 0 1 8,3 Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 442 B |
|
|
@ -0,0 +1,7 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<metadata>
|
||||||
|
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/tool-line-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
</metadata>
|
||||||
|
<path fill="#474747" d="M 12.778,13.778 C 12.778,13.778 13.278,14.278 13.778,13.778 14.278,13.278 13.778,12.778 13.778,12.778 L 3.2237,2.2237 C 3.2237,2.2237 2.7237,1.7237 2.2237,2.2237 1.7237,2.7237 2.2237,3.2237 2.2237,3.2237 Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 505 B |
|
|
@ -0,0 +1,8 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<metadata>
|
||||||
|
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/view-mirror-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
</metadata>
|
||||||
|
<path fill="#474747" d="M 1.8613,0 C 1.0809,0 0,0.69182 0,1.5762 V 14.387 C 0,15.271 1.0809,16 1.8613,16 L 5.752,13.053 C 6.3603,12.597 7,12.324 7,11.439 V 4.5254 C 7,3.6409 6.188,3.303 5.752,2.9121 Z M 2,1.3535 5.8516,4.2598 C 5.8516,4.2598 6,4.328 6,4.5254 V 11.439 C 6,11.699 5.8984,11.699 5.8984,11.699 L 2,14.641 Z"/>
|
||||||
|
<path fill="#474747" opacity="0.3" d="M 13.139,0 C 13.919,0 15,0.69182 15,1.5762 V 14.387 C 15,15.271 13.919,16 13.139,16 L 9.248,13.053 C 8.6397,12.597 8,12.324 8,11.439 V 4.5254 C 8,3.6409 8.812,3.303 9.248,2.9121 Z M 13,1.3535 9.1484,4.2598 C 9.1484,4.2598 9,4.328 9,4.5254 V 11.439 C 9,11.699 9.1016,11.699 9.1016,11.699 L 13,14.641 Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 940 B |
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16">
|
||||||
|
<metadata>
|
||||||
|
Combination of https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/object-move-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
and https://gitlab.gnome.org/World/design/icon-library/-/blob/master/data/resources/icon-dev-kit/rotate-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
optimized with SVGO
|
||||||
|
</metadata>
|
||||||
|
<path d="M8 15.5L5 12h2v-2h2v2h2zM.5 8L4 5v2h2v2H4v2z" fill="#474747"/>
|
||||||
|
<a transform="rotate(-4.342 5.603 3.916)">
|
||||||
|
<path fill="#474747" d="M8.672.954l-3.654 3.2c.634.717 1.341 1.557 1.92 2.193l1.28 1.46.166-2.484.022-.02c.769-.196 1.74.097 2.457.915 1.102 1.259.67 2.758-.634 3.9l.57.674c.346.407 1.058.4 1.396-.012 1.65-1.444 1.556-4.028.037-5.763-.986-1.124-2.398-1.707-3.725-1.579z"/>
|
||||||
|
</a>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 903 B |
|
|
@ -0,0 +1,17 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 920.729 920.729">
|
||||||
|
<metadata>
|
||||||
|
Combination of https://www.svgrepo.com/svg/150374/pencil
|
||||||
|
https://creativecommons.org/publicdomain/zero/1.0/deed.en
|
||||||
|
and https://www.svgrepo.com/svg/29291/pencil
|
||||||
|
https://creativecommons.org/publicdomain/zero/1.0/deed.en
|
||||||
|
</metadata>
|
||||||
|
<g fill="#474747">
|
||||||
|
<path d="m 823.25922,841.48926 c -1.399,0 -2.699,0.1 -4.1,0.3 l -245.7,31.8 c -12.6,1.601 -21.399,-12.2 -14.6,-23 3.7,-5.7 7.3,-11.5 10.899,-17.3 9.5,-15.4 -3.199,-35.9 -20.8,-35.9 -1.2,0 -2.399,0.101 -3.7,0.301 l -322,48.399 -38.5,5.8 -104.999997,15.801 c -11.9,1.8 -19.9,11.899 -18.9,24 0.4,5.399 2.6,10.5 6.1,14.3 4.1,4.5 9.8,7 16,7 1.2,0 2.4,-0.101 3.7,-0.3 l 383.799997,-57.7 c 13.101,-2 22.101,12.8 14.4,23.6 -2.5,3.4 -5,6.9 -7.5,10.3 -6.9,9.4 -5.3,25.101 2.7,33.2 4.1,4.2 9.3,6.4 14.8,6.4 0.6,0 1.3,0 1.899,-0.101 h 0.101 0.1 l 331.3,-42.199 h 0.101 0.1 c 5.7,-0.9 10.7,-4.2 14,-9.301 3.601,-5.6 4.9,-12.5 3.3,-18.699 -2.6,-10.101 -11.4,-16.701 -22.5,-16.701 z"/>
|
||||||
|
<g transform="translate(58.371053,4.3729293)">
|
||||||
|
<path d="m 515.582,157.916 -439.199,439.2 4.6,10.1 27.1,58.8 41.6,22 c 9.8,5.2 17.7,13.101 22.9,22.9 l 22,41.6 58.8,27.101 10.101,4.6 439.2,-439.2 z"/>
|
||||||
|
<path d="m 853.282,159.216 -151.8,-151.8 c -4.9,-4.9 -11.3,-7.3 -17.7,-7.3 -6.4,0 -12.8,2.4 -17.7,7.3 l -129.3,129.3 187.2,187.2 129.3,-129.3 c 9.8,-9.8 9.8,-25.6 0,-35.4 z"/>
|
||||||
|
<path d="m 46.083,650.016 -4.3,16.9 -41,162.5 c -4.1,16.2 8.5,31.1 24.1,31.1 2,0 4.1,-0.3 6.2,-0.8 l 162.5,-41 16.9,-4.3 16.9,-4.3 13.3,-3.4 -30.9,-14.2 -29.5,-13.5 c -5,-2.3 -9.1,-6.199 -11.7,-11 l -18.6,-35.1 -4.3,-8 c -2.3,-4.4 -6,-8.1 -10.4,-10.4 l -8,-4.3 -35.1,-18.6 c -4.9,-2.601 -8.7,-6.7 -11,-11.7 l -13.5,-29.5 -14.2,-30.9 -3.4,13.301 z"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.8 KiB |
|
|
@ -0,0 +1,8 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<metadata>
|
||||||
|
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/tool-polygon-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
</metadata>
|
||||||
|
<path fill="#474747" d="M 12.98,2.5 1.9551,3.502 1.5,4 V 14 L 2.3203,14.385 8.0684,9.5938 13.777,12.447 14.496,11.945 13.496,2.9453 Z M 12.557,3.543 13.402,11.143 8.2227,8.5527 7.6797,8.6152 2.5,12.932 V 4.457 Z"/>
|
||||||
|
<path fill="#474747" d="M 10,9 A 2,2 0 0 1 8,11 2,2 0 0 1 6,9 2,2 0 0 1 8,7 2,2 0 0 1 10,9 Z M 4,4 A 2,2 0 0 1 2,6 2,2 0 0 1 0,4 2,2 0 0 1 2,2 2,2 0 0 1 4,4 Z M 4,14 A 2,2 0 0 1 2,16 2,2 0 0 1 0,14 2,2 0 0 1 2,12 2,2 0 0 1 4,14 Z M 16,12 A 2,2 0 0 1 14,14 2,2 0 0 1 12,12 2,2 0 0 1 14,10 2,2 0 0 1 16,12 Z M 15,3 A 2,2 0 0 1 13,5 2,2 0 0 1 11,3 2,2 0 0 1 13,1 2,2 0 0 1 15,3 Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 871 B |
|
|
@ -0,0 +1,9 @@
|
||||||
|
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<rect fill="#474747" x="98" y="204" width="226" height="40" transform="translate(116,253) rotate(-66) translate(-211,-226)"/>
|
||||||
|
<rect fill="#474747" x="145" y="339" width="270" height="40" transform="translate(236,262) rotate(58) translate(-280,-362)"/>
|
||||||
|
<rect fill="#474747" x="141" y="429" width="211" height="40" transform="translate(374,300) rotate(-47) translate(-246,-451)"/>
|
||||||
|
<circle fill="#474747" cx="166" cy="172" r="55"/>
|
||||||
|
<circle fill="#474747" cx="166" cy="172" r="55" transform="translate(143,190)"/>
|
||||||
|
<circle fill="#474747" cx="166" cy="172" r="55" transform="translate(-87,168)"/>
|
||||||
|
<circle fill="#474747" cx="166" cy="172" r="55" transform="translate(273,56)"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 755 B |
|
|
@ -0,0 +1,7 @@
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" version="1.1">
|
||||||
|
<metadata>
|
||||||
|
https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/blob/master/Papirus/symbolic/actions/tool-rectangle-symbolic.svg
|
||||||
|
https://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
</metadata>
|
||||||
|
<path fill="#474747" d="M 1,1 V 15 H 15 V 1 Z M 3,3 H 13 V 13 H 3 Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 348 B |
|
|
@ -0,0 +1,15 @@
|
||||||
|
<svg width="16" height="16">
|
||||||
|
<metadata>
|
||||||
|
https://gitlab.gnome.org/GNOME/adwaita-icon-theme/-/blob/master/Adwaita/scalable/actions/view-fullscreen-symbolic.svg
|
||||||
|
https://creativecommons.org/licenses/by-sa/3.0/
|
||||||
|
</metadata>
|
||||||
|
<g fill="#474747">
|
||||||
|
<path d="M1.984 8.986A1 1 0 0 0 1 10v4a1 1 0 0 0 1 1h4a1 1 0 1 0 0-2H3v-3a1 1 0 0 0-1.016-1.014z" />
|
||||||
|
<path d="M6.48 8.49a1 1 0 0 0-.687.303l-4.5 4.5a1 1 0 1 0 1.414 1.414l4.5-4.5A1 1 0 0 0 6.48 8.49z" />
|
||||||
|
<path d="M1 14h1v1H1z" />
|
||||||
|
<path d="M10 1a1 1 0 1 0 0 2h3v3a1 1 0 1 0 2 0V2a1 1 0 0 0-1-1z" />
|
||||||
|
<path d="M14 1h1v1h-1z" />
|
||||||
|
<path d="M13.984.99a1 1 0 0 0-.69.301l-4.5 4.469a1 1 0 1 0 1.411 1.418l4.5-4.469a1 1 0 0 0-.72-1.719z" />
|
||||||
|
<path d="M1 9h1v1H1zM6 14h1v1H6zM14 6h1v1h-1zM9 1h1v1H9z" />
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 773 B |
|
|
@ -0,0 +1,43 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
<!-- https://commons.wikimedia.org/wiki/File:Bananas.svg -->
|
||||||
|
<!-- public domain -->
|
||||||
|
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="559.62469" height="373.29596" id="svg2" sodipodi:version="0.32" inkscape:version="0.44" version="1.0" sodipodi:docbase="C:\Documents and Settings\Elembis\My Documents\Images\Shartak\Shartak.com" sodipodi:docname="bananas3.svg" inkscape:export-filename="C:\Documents and Settings\Elembis\My Documents\Images\Shartak\Shartak.com\banana.png" inkscape:export-xdpi="25.797226" inkscape:export-ydpi="25.797226">
|
||||||
|
<defs id="defs4"/>
|
||||||
|
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0" gridtolerance="10000" guidetolerance="10" objecttolerance="10" inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="1" inkscape:cx="257.85399" inkscape:cy="231.60006" inkscape:document-units="px" inkscape:current-layer="layer1" inkscape:window-width="1024" inkscape:window-height="721" inkscape:window-x="-4" inkscape:window-y="-4"/>
|
||||||
|
<metadata id="metadata7">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1" transform="translate(-66.38047,-391.3222)">
|
||||||
|
<g id="g9893" inkscape:transform-center-x="88.0002" inkscape:transform-center-y="113.00018">
|
||||||
|
<path transform="translate(-17.85713,318.6479)" sodipodi:nodetypes="csccccc" id="path17976" d="M 543,119 C 543,119 547,177 531,189 C 515,201 397,320 397,320 L 419,345 L 562,248 L 573,121 L 543,119 z " style="fill:#ffc701;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
<path sodipodi:nodetypes="csccccc" id="path18863" d="M 525.14247,437.64826 C 525.14247,437.64826 529.14247,495.64826 513.14247,507.64826 C 497.14247,519.64826 379.14247,638.64826 379.14247,638.64826 L 401.14247,663.64826 L 544.14247,566.64826 L 555.14247,439.64826 L 525.14247,437.64826 z " style="opacity:0.7;fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
</g>
|
||||||
|
<g id="g2783">
|
||||||
|
<path id="path6424" d="M 519.9114,399.65406 L 483.38679,454.45323 C 483.38679,454.45323 454.12626,461.72103 439.29443,470.94146 C 424.46259,480.16189 377.85779,514.19114 274.74769,506.89067 C 171.63759,499.59021 156.32242,477.55739 133.97629,476.75109 C 111.63016,475.9448 77.83775,479.82705 69.64709,486.06507 C 61.45643,492.3031 71.25003,511.09366 71.25003,511.09366 C 71.25003,511.09366 101.21736,578.4951 210.30564,606.14897 C 319.39391,633.80284 448.5453,576.70729 448.5453,576.70729 L 538.74205,411.07361 L 519.9114,399.65406 z " style="fill:#ffc701;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
|
||||||
|
<path id="path1895" d="M 517.00522,404.00971 L 483.38022,454.44721 C 483.38022,454.44721 454.1183,461.72678 439.28647,470.94721 C 424.45462,480.16764 377.86532,514.18518 274.75522,506.88471 C 171.64512,499.58425 156.3201,477.56601 133.97397,476.75971 C 111.62785,475.95343 77.85213,479.83419 69.66147,486.07221 C 69.2897,486.35536 68.96174,486.67778 68.66147,487.00971 C 87.94596,484.21174 116.37515,484.78053 136.38022,488.41596 C 174.77085,495.39252 209.97775,518.65573 299.50522,516.22846 C 426.73709,512.73998 441.6649,473.10304 459.38022,468.41596 C 484.00837,461.89991 530.48444,452.34626 517.00522,404.00971 z " style="fill:white;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;opacity:0.4"/>
|
||||||
|
<path id="path9086" d="M 106.96213,554.70796 C 128.49383,573.41467 161.44348,593.76255 210.30593,606.14918 C 222.07021,609.13143 234.0755,611.11073 246.11929,612.29962 L 284.83188,604.45269 C 220.5418,614.51673 142.31641,575.18761 106.96213,554.70796 z " style="opacity:0.4;fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
</g>
|
||||||
|
<g id="g9941">
|
||||||
|
<path transform="translate(-17.85713,318.6479)" inkscape:transform-center-y="181" inkscape:transform-center-x="126" sodipodi:nodetypes="cssssssssc" id="path12644" d="M 546,120 C 546,120 567,175 561,189 C 555,203 520,283 455,313 C 390,343 223,339 219,331 C 215,323 219,407 320,438 C 421,469 550.08904,401.09271 573,379 C 602,351 657,279 641,225 C 625,171 613,187 604,172 C 595,157 585,128 585,116 C 585,104 547,120 546,120 z " style="opacity:1;fill:#ffc701;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
|
||||||
|
<path id="path8981" d="M 533.7244,527.63751 C 518.52971,557.28537 486.49949,608.85189 437.13065,631.63751 C 372.13066,661.63751 205.13065,657.63751 201.13065,649.63751 C 200.13065,647.63751 199.64628,651.40313 201.0369,658.63751 L 201.06815,658.76251 L 203.13065,665.63751 C 203.13064,665.63751 202.9682,665.65254 202.75565,665.73126 C 202.85933,666.09273 202.98841,666.48596 203.0994,666.85626 C 203.2463,667.34553 203.37675,667.82087 203.5369,668.32501 C 203.82494,669.23173 204.17292,670.18568 204.50565,671.13751 C 204.61749,671.45746 204.70108,671.78151 204.81815,672.10626 C 205.04405,672.73471 205.32226,673.36688 205.56815,674.01251 C 205.8517,674.75499 206.10087,675.49879 206.4119,676.26251 C 206.6323,676.80515 206.89597,677.36609 207.13065,677.91876 C 207.44564,678.65842 207.75805,679.38112 208.0994,680.13751 C 208.26157,680.49795 208.4311,680.86725 208.5994,681.23126 C 209.69117,683.59259 210.89044,686.02408 212.25565,688.51251 C 212.29126,688.57728 212.34485,688.63516 212.38065,688.70001 C 212.39669,688.72911 212.39582,688.76464 212.4119,688.79376 C 212.77389,689.44818 213.15496,690.10127 213.5369,690.76251 C 213.57214,690.82361 213.59523,690.88885 213.63065,690.95001 C 214.03425,691.64604 214.45442,692.3411 214.88065,693.04376 C 215.33612,693.79463 215.80496,694.56759 216.2869,695.32501 C 216.29464,695.33717 216.3104,695.34409 216.31815,695.35626 C 216.77977,696.08134 217.23774,696.81355 217.7244,697.54376 C 217.72759,697.54854 217.75246,697.53898 217.75565,697.54376 C 258.55477,715.44577 403.2244,681.10626 468.13065,633.63751 C 513.82083,600.22229 528.80654,553.79612 533.7244,527.63751 z " style="opacity:0.6;fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
|
||||||
|
<path id="path17089" d="M 559.79937,430.17885 C 558.18509,430.20703 556.38497,430.42195 554.48687,430.74135 C 560.75792,449.99636 590.83405,543.70808 588.14312,561.6476 C 585.14312,581.6476 553.30943,654.34782 501.14312,685.6476 C 466.14312,706.6476 390.14312,739.6476 363.14312,744.6476 C 346.05557,747.81196 312.61613,752.46521 286.48687,751.11635 C 291.4351,753.10006 296.63167,754.95597 302.14312,756.6476 C 403.14312,787.6476 532.23216,719.74031 555.14312,697.6476 C 584.14312,669.6476 639.14312,597.6476 623.14312,543.6476 C 607.14312,489.6476 595.14312,505.6476 586.14312,490.6476 C 577.14312,475.6476 567.14312,446.6476 567.14312,434.6476 C 567.14312,431.2726 564.14254,430.10304 559.79937,430.17885 z " style="opacity:0.4;fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
</g>
|
||||||
|
<g id="g9903">
|
||||||
|
<path sodipodi:nodetypes="cssccccc" id="path1933" d="M 533.14287,448.6479 C 533.14287,448.6479 514.14287,467.6479 519.14287,485.6479 C 524.14287,503.6479 541.14287,547.6479 478.14287,597.6479 C 415.14287,647.6479 232.14287,734.6479 109.14287,639.6479 C 74.14287,599.6479 94.14287,573.6479 94.14287,573.6479 C 94.14287,573.6479 114.12992,570.75757 122.14287,571.6479 C 132.14287,568.6479 179.14287,571.6479 223.14287,573.6479 C 282.05327,572.49008 443.14287,497.6479 474.14287,468.6479 C 474.14287,468.6479 512.14287,422.6479 513.14287,414.6479 C 514.14287,406.6479 540.14287,430.6479 541.14287,437.6479 C 542.14287,444.6479 533.14287,447.6479 533.14287,448.6479 z " style="fill:#ffc701;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
|
||||||
|
<path sodipodi:nodetypes="cssccccsscc" id="path7201" d="M 514.60028,413.04467 C 513.79169,413.14037 513.25653,413.63842 513.13153,414.63842 C 512.13153,422.63842 474.13153,468.63841 474.13153,468.63842 C 443.13153,497.63842 282.04191,572.4806 223.13152,573.63842 C 179.13152,571.63842 132.13152,568.63842 122.13152,571.63842 C 114.11858,570.74809 94.13152,573.63842 94.13152,573.63842 C 94.13152,573.63842 93.7656,574.16602 93.22527,575.07592 C 104.18437,578.28284 124.12588,582.75014 156.38152,583.60717 C 230.77215,585.58373 262.00653,581.54467 326.50653,556.41967 C 394.13686,530.0753 484.82418,496.21955 520.38153,415.35717 C 517.97095,413.81698 515.90107,412.89071 514.60028,413.04467 z " style="opacity:0.4;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
|
||||||
|
<path id="path4646" d="M 518.58062,482.8981 C 510.39544,511.03311 477.26645,585.47414 350.14312,628.6481 C 194.69709,681.44109 156.81818,651.08254 106.61187,636.61685 C 107.43132,637.61484 108.2539,638.63184 109.14312,639.6481 C 232.14312,734.6481 415.14312,647.6481 478.14312,597.6481 C 541.14312,547.6481 524.14312,503.6481 519.14312,485.6481 C 518.88851,484.73149 518.71644,483.81726 518.58062,482.8981 z " style="opacity:0.4;fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
</g>
|
||||||
|
<g id="g9946">
|
||||||
|
<path sodipodi:nodetypes="czsssz" id="path23294" d="M 534.47367,391.42537 C 528.72367,389.92537 508.71616,405.72925 509.06846,411.02017 C 509.42029,416.30405 528.53454,433.43637 540.64281,437.57407 C 544.64281,438.57407 566.64281,436.57407 567.64281,432.57407 C 568.64281,428.57407 568.64281,411.57407 564.64281,407.57407 C 560.64281,403.57407 541.16441,393.17078 534.47367,391.42537 z " style="fill:#884a13;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:4;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"/>
|
||||||
|
<path sodipodi:nodetypes="czsssz" id="path22407" d="M 534.47374,391.42502 C 528.72374,389.92502 508.71623,405.7289 509.06853,411.01982 C 509.42036,416.3037 528.53461,433.43602 540.64288,437.57372 C 544.64288,438.57372 566.64288,436.57372 567.64288,432.57372 C 568.64288,428.57372 568.64288,411.57372 564.64288,407.57372 C 560.64288,403.57372 541.16448,393.17043 534.47374,391.42502 z " style="fill:#884a13;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
<path id="path25958" d="M 533.23672,391.3354 C 526.30206,391.85508 508.75019,406.06266 509.08047,411.0229 C 509.222,413.14841 512.41917,417.17996 516.95547,421.5229 C 517.24178,413.18494 521.37892,401.08827 540.67422,393.7729 C 538.17765,392.66554 536.00097,391.82417 534.48672,391.42915 C 534.12734,391.3354 533.69903,391.30075 533.23672,391.3354 z " style="opacity:0.3;fill:white;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
<path id="path26854" d="M 564.58087,407.52257 C 564.73328,425.7813 549.04695,433.48138 538.20587,436.61632 C 539.04145,436.98636 539.85952,437.31721 540.64337,437.58507 C 544.64338,438.58507 566.64337,436.58507 567.64337,432.58507 C 568.64338,428.58507 568.64337,411.58507 564.64337,407.58507 C 564.62587,407.56758 564.59896,407.54031 564.58087,407.52257 z " style="opacity:0.4;fill:black;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"/>
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 12 KiB |
720
draw.js
|
|
@ -1,720 +0,0 @@
|
||||||
/* jslint esversion: 6 */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Copyright 2019 Abakkk
|
|
||||||
*
|
|
||||||
* This file is part of DrowOnYourScreen, a drawing extension for GNOME Shell.
|
|
||||||
* https://framagit.org/abakkk/DrawOnYourScreen
|
|
||||||
*
|
|
||||||
* 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, see <http://www.gnu.org/licenses/>.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const Cairo = imports.cairo;
|
|
||||||
const Clutter = imports.gi.Clutter;
|
|
||||||
const GLib = imports.gi.GLib;
|
|
||||||
const Gtk = imports.gi.Gtk;
|
|
||||||
const Lang = imports.lang;
|
|
||||||
const Mainloop = imports.mainloop;
|
|
||||||
const Signals = imports.signals;
|
|
||||||
const St = imports.gi.St;
|
|
||||||
const Screenshot = imports.ui.screenshot;
|
|
||||||
const Tweener = imports.ui.tweener;
|
|
||||||
|
|
||||||
const ExtensionUtils = imports.misc.extensionUtils;
|
|
||||||
const Extension = ExtensionUtils.getCurrentExtension();
|
|
||||||
const Convenience = Extension.imports.convenience;
|
|
||||||
const Prefs = Extension.imports.prefs;
|
|
||||||
const _ = imports.gettext.domain(Extension.metadata["gettext-domain"]).gettext;
|
|
||||||
|
|
||||||
var Shapes = { NONE: 0, LINE: 1, ELLIPSE: 2, RECTANGLE: 3, TEXT: 4 };
|
|
||||||
var ShapeNames = { 0: "Free drawing", 1: "Line", 2: "Circle", 3: "Rectangle", 4: "Text" };
|
|
||||||
var LineCapNames = { 0: 'Butt', 1: 'Round', 2: 'Square' };
|
|
||||||
var LineJoinNames = { 0: 'Miter', 1: 'Round', 2: 'Bevel' };
|
|
||||||
var FontWeightNames = { 0: 'Normal', 1: 'Bold' };
|
|
||||||
var FontStyleNames = { 0: 'Normal', 1: 'Italic', 2: 'Oblique' };
|
|
||||||
var FontFamilyNames = { 0: 'Default', 1: 'Sans-Serif', 2: 'Serif', 3: 'Monospace', 4: 'Cursive', 5: 'Fantasy' };
|
|
||||||
|
|
||||||
// DrawingArea is the widget in which we draw, thanks to Cairo.
|
|
||||||
// It creates and manages a DrawingElement for each "brushstroke".
|
|
||||||
// It handles pointer/mouse/(touch?) events and some keyboard events.
|
|
||||||
var DrawingArea = new Lang.Class({
|
|
||||||
Name: 'DrawingArea',
|
|
||||||
Extends: St.DrawingArea,
|
|
||||||
|
|
||||||
_init: function(params, helper) {
|
|
||||||
this.parent({ style_class: 'draw-on-your-screen', name: params && params.name ? params.name : ""});
|
|
||||||
|
|
||||||
// 'style-changed' is emitted when 'this' is added to an actor
|
|
||||||
// ('this' needs to be in the stage to query theme_node)
|
|
||||||
this.connect('style-changed', this._onStyleChanged.bind(this));
|
|
||||||
this.connect('repaint', this._repaint.bind(this));
|
|
||||||
|
|
||||||
this.settings = Convenience.getSettings();
|
|
||||||
this.emitter = new DrawingAreaEmitter();
|
|
||||||
this.helper = helper;
|
|
||||||
|
|
||||||
this.elements = [];
|
|
||||||
this.undoneElements = [];
|
|
||||||
this.currentElement = null;
|
|
||||||
this.currentShape = Shapes.NONE;
|
|
||||||
this.hasBackground = false;
|
|
||||||
this.textHasCursor = false;
|
|
||||||
this.dashedLine = false;
|
|
||||||
this.colors = [Clutter.Color.new(0, 0, 0, 255)];
|
|
||||||
},
|
|
||||||
|
|
||||||
_redisplay: function() {
|
|
||||||
// force area to emit 'repaint'
|
|
||||||
this.queue_repaint();
|
|
||||||
},
|
|
||||||
|
|
||||||
_onStyleChanged: function() {
|
|
||||||
try {
|
|
||||||
let themeNode = this.get_theme_node();
|
|
||||||
for (let i = 1; i < 10; i++) {
|
|
||||||
this.colors[i] = themeNode.get_color('-drawing-color' + i);
|
|
||||||
}
|
|
||||||
this.activeBackgroundColor = themeNode.get_color('-drawing-background-color');
|
|
||||||
this.currentLineWidth = themeNode.get_length('-drawing-line-width');
|
|
||||||
this.currentLineJoin = themeNode.get_double('-drawing-line-join');
|
|
||||||
this.currentLineCap = themeNode.get_double('-drawing-line-cap');
|
|
||||||
this.dashArray = [themeNode.get_length('-drawing-dash-array-on'), themeNode.get_length('-drawing-dash-array-off')];
|
|
||||||
this.dashOffset = themeNode.get_length('-drawing-dash-offset');
|
|
||||||
let font = themeNode.get_font();
|
|
||||||
this.fontFamily = font.get_family();
|
|
||||||
this.currentFontWeight = font.get_weight();
|
|
||||||
this.currentFontStyle = font.get_style();
|
|
||||||
} catch(e) {
|
|
||||||
logError(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 1; i < 10; i++) {
|
|
||||||
this.colors[i] = this.colors[i].alpha ? this.colors[i] : this.colors[0];
|
|
||||||
}
|
|
||||||
this.currentColor = this.colors[1];
|
|
||||||
|
|
||||||
this.currentLineWidth = (this.currentLineWidth > 0) ? this.currentLineWidth : 3;
|
|
||||||
this.currentLineJoin = ([0, 1, 2].indexOf(this.currentLineJoin) != -1) ? this.currentLineJoin : Cairo.LineJoin.ROUND;
|
|
||||||
this.currentLineCap = ([0, 1, 2].indexOf(this.currentLineCap) != -1) ? this.currentLineCap : Cairo.LineCap.ROUND;
|
|
||||||
this.currentFontFamilyId = 0;
|
|
||||||
this.currentFontWeight = this.currentFontWeight > 500 ? 1 : 0 ;
|
|
||||||
// font style enum order of Cairo and Pango are different
|
|
||||||
this.currentFontStyle = this.currentFontStyle == 2 ? 1 : ( this.currentFontStyle == 1 ? 2 : 0);
|
|
||||||
},
|
|
||||||
|
|
||||||
_repaint: function(area) {
|
|
||||||
let cr = area.get_context();
|
|
||||||
|
|
||||||
for (let i = 0; i < this.elements.length; i++) {
|
|
||||||
this.elements[i].buildCairo(cr, false);
|
|
||||||
|
|
||||||
if (this.elements[i].fill && this.elements[i].shape != Shapes.LINE)
|
|
||||||
cr.fill();
|
|
||||||
else
|
|
||||||
cr.stroke();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.currentElement) {
|
|
||||||
this.currentElement.buildCairo(cr, this.textHasCursor);
|
|
||||||
cr.stroke();
|
|
||||||
}
|
|
||||||
|
|
||||||
cr.$dispose();
|
|
||||||
},
|
|
||||||
|
|
||||||
_onButtonPressed: function(actor, event) {
|
|
||||||
let button = event.get_button();
|
|
||||||
let [x, y] = event.get_coords();
|
|
||||||
let shiftPressed = event.has_shift_modifier();
|
|
||||||
|
|
||||||
// stop writing
|
|
||||||
if (this.currentElement && this.currentElement.shape == Shapes.TEXT) {
|
|
||||||
this._stopWriting();
|
|
||||||
}
|
|
||||||
|
|
||||||
// hide helper
|
|
||||||
if (this.helper.visible && button != 2) {
|
|
||||||
this.helper.hideHelp();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (button == 1) {
|
|
||||||
this._startDrawing(x, y, false, shiftPressed);
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
} else if (button == 2) {
|
|
||||||
this.toggleShape();
|
|
||||||
} else if (button == 3) {
|
|
||||||
this._startDrawing(x, y, true, shiftPressed);
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
}
|
|
||||||
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
},
|
|
||||||
|
|
||||||
_onKeyPressed: function(actor, event) {
|
|
||||||
if (event.get_key_symbol() == Clutter.Escape) {
|
|
||||||
this.emitter.emit('stop-drawing');
|
|
||||||
this.erase();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
} else if (this.currentElement && this.currentElement.shape == Shapes.TEXT) {
|
|
||||||
if (event.get_key_symbol() == Clutter.KEY_BackSpace) {
|
|
||||||
this.currentElement.text = this.currentElement.text.slice(0, -1);
|
|
||||||
this._updateCursorTimeout();
|
|
||||||
} else if (event.has_control_modifier() && event.get_key_symbol() == 118) {
|
|
||||||
// Ctrl + V
|
|
||||||
St.Clipboard.get_default().get_text(St.ClipboardType.CLIPBOARD, (clipBoard, clipText) => {
|
|
||||||
this.currentElement.text += clipText;
|
|
||||||
this._updateCursorTimeout();
|
|
||||||
this._redisplay();
|
|
||||||
});
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
} else if (event.get_key_symbol() == Clutter.KEY_Return || event.get_key_symbol() == 65421) {
|
|
||||||
// stop writing
|
|
||||||
// Clutter.KEY_Return is "Enter" and 65421 is KP_Enter
|
|
||||||
this._stopWriting();
|
|
||||||
} else {
|
|
||||||
let unicode = event.get_key_unicode();
|
|
||||||
this.currentElement.text += unicode;
|
|
||||||
this._updateCursorTimeout();
|
|
||||||
}
|
|
||||||
this._redisplay();
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
} else {
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
_onScroll: function(actor, event) {
|
|
||||||
if (this.helper.visible)
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
let direction = event.get_scroll_direction();
|
|
||||||
if (direction == Clutter.ScrollDirection.UP)
|
|
||||||
this.incrementLineWidth(1);
|
|
||||||
else if (direction == Clutter.ScrollDirection.DOWN)
|
|
||||||
this.incrementLineWidth(-1);
|
|
||||||
else
|
|
||||||
return Clutter.EVENT_PROPAGATE;
|
|
||||||
return Clutter.EVENT_STOP;
|
|
||||||
},
|
|
||||||
|
|
||||||
_startDrawing: function(stageX, stageY, fill, eraser) {
|
|
||||||
let [success, startX, startY] = this.transform_stage_point(stageX, stageY);
|
|
||||||
|
|
||||||
if (!success)
|
|
||||||
return;
|
|
||||||
|
|
||||||
this.buttonReleasedHandler = this.connect('button-release-event', (actor, event) => {
|
|
||||||
this._stopDrawing();
|
|
||||||
});
|
|
||||||
|
|
||||||
this.smoothedStroke = this.settings.get_boolean('smoothed-stroke');
|
|
||||||
|
|
||||||
this.currentElement = new DrawingElement ({
|
|
||||||
color: this.currentColor,
|
|
||||||
line: { lineWidth: this.currentLineWidth, lineJoin: this.currentLineJoin, lineCap: this.currentLineCap },
|
|
||||||
dash: { array: this.dashedLine ? this.dashArray : [0, 0] , offset: this.dashedLine ? this.dashOffset : 0 },
|
|
||||||
fill: fill,
|
|
||||||
eraser: eraser,
|
|
||||||
shape: this.currentShape == Shapes.TEXT ? Shapes.RECTANGLE : this.currentShape,
|
|
||||||
text: '',
|
|
||||||
font: { family: (this.currentFontFamilyId == 0 ? this.fontFamily : FontFamilyNames[this.currentFontFamilyId]), weight: this.currentFontWeight, style: this.currentFontStyle },
|
|
||||||
points: [[startX, startY]]
|
|
||||||
});
|
|
||||||
|
|
||||||
this.motionHandler = this.connect('motion-event', (actor, event) => {
|
|
||||||
let coords = event.get_coords();
|
|
||||||
let [s, x, y] = this.transform_stage_point(coords[0], coords[1]);
|
|
||||||
if (!s)
|
|
||||||
return;
|
|
||||||
this._updateDrawing(x, y);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
_stopDrawing: function() {
|
|
||||||
if (this.motionHandler) {
|
|
||||||
this.disconnect(this.motionHandler);
|
|
||||||
this.motionHandler = null;
|
|
||||||
}
|
|
||||||
if (this.buttonReleasedHandler) {
|
|
||||||
this.disconnect(this.buttonReleasedHandler);
|
|
||||||
this.buttonReleasedHandler = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// start writing
|
|
||||||
if (this.currentShape == Shapes.TEXT && this.currentElement) {
|
|
||||||
this.currentElement.shape = Shapes.TEXT;
|
|
||||||
this.currentElement.text = '';
|
|
||||||
this.emitter.emit('show-osd', _("Type your text\nand press Enter"), null);
|
|
||||||
this._updateCursorTimeout();
|
|
||||||
this._redisplay();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.currentElement) {
|
|
||||||
this.elements.push(this.currentElement);
|
|
||||||
}
|
|
||||||
this.currentElement = null;
|
|
||||||
this._redisplay();
|
|
||||||
},
|
|
||||||
|
|
||||||
_updateDrawing: function(x, y) {
|
|
||||||
if (!this.currentElement)
|
|
||||||
return;
|
|
||||||
if (this.currentElement.shape == Shapes.NONE)
|
|
||||||
this.currentElement.addPoint(x, y, this.smoothedStroke);
|
|
||||||
else
|
|
||||||
this.currentElement.points[1] = [x, y];
|
|
||||||
this._redisplay();
|
|
||||||
},
|
|
||||||
|
|
||||||
_stopWriting: function() {
|
|
||||||
this.elements.push(this.currentElement);
|
|
||||||
this.currentElement = null;
|
|
||||||
this._stopCursorTimeout();
|
|
||||||
this._redisplay();
|
|
||||||
},
|
|
||||||
|
|
||||||
_stopCursorTimeout: function() {
|
|
||||||
if (this.cursorTimeoutId) {
|
|
||||||
Mainloop.source_remove(this.cursorTimeoutId);
|
|
||||||
this.cursorTimeoutId = null;
|
|
||||||
}
|
|
||||||
this.textHasCursor = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
_updateCursorTimeout: function() {
|
|
||||||
this._stopCursorTimeout();
|
|
||||||
this.cursorTimeoutId = Mainloop.timeout_add(600, () => {
|
|
||||||
this.textHasCursor = !this.textHasCursor;
|
|
||||||
this._redisplay();
|
|
||||||
return true;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
erase: function() {
|
|
||||||
this.elements = [];
|
|
||||||
this.undoneElements = [];
|
|
||||||
this.currentElement = null;
|
|
||||||
this._redisplay();
|
|
||||||
},
|
|
||||||
|
|
||||||
deleteLastElement: function() {
|
|
||||||
if (this.currentElement) {
|
|
||||||
if (this.motionHandler) {
|
|
||||||
this.disconnect(this.motionHandler);
|
|
||||||
this.motionHandler = null;
|
|
||||||
}
|
|
||||||
if (this.buttonReleasedHandler) {
|
|
||||||
this.disconnect(this.buttonReleasedHandler);
|
|
||||||
this.buttonReleasedHandler = null;
|
|
||||||
}
|
|
||||||
this.currentElement = null;
|
|
||||||
this._stopCursorTimeout();
|
|
||||||
} else {
|
|
||||||
this.elements.pop();
|
|
||||||
}
|
|
||||||
this._redisplay();
|
|
||||||
},
|
|
||||||
|
|
||||||
undo: function() {
|
|
||||||
if (this.elements.length > 0)
|
|
||||||
this.undoneElements.push(this.elements.pop());
|
|
||||||
this._redisplay();
|
|
||||||
},
|
|
||||||
|
|
||||||
redo: function() {
|
|
||||||
if (this.undoneElements.length > 0)
|
|
||||||
this.elements.push(this.undoneElements.pop());
|
|
||||||
this._redisplay();
|
|
||||||
},
|
|
||||||
|
|
||||||
smoothLastElement: function() {
|
|
||||||
if (this.elements.length > 0 && this.elements[this.elements.length - 1].shape == Shapes.NONE) {
|
|
||||||
this.elements[this.elements.length - 1].smoothAll();
|
|
||||||
this._redisplay();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleBackground: function() {
|
|
||||||
this.hasBackground = !this.hasBackground;
|
|
||||||
this.get_parent().set_background_color(this.hasBackground ? this.activeBackgroundColor : null);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleColor: function() {
|
|
||||||
this.selectColor((this.currentColor == this.colors[1]) ? 2 : 1);
|
|
||||||
},
|
|
||||||
|
|
||||||
selectColor: function(index) {
|
|
||||||
this.currentColor = this.colors[index];
|
|
||||||
if (this.currentElement) {
|
|
||||||
this.currentElement.color = this.currentColor;
|
|
||||||
this._redisplay();
|
|
||||||
}
|
|
||||||
this.emitter.emit('show-osd', this.currentColor.to_string(), null);
|
|
||||||
},
|
|
||||||
|
|
||||||
selectShape: function(shape) {
|
|
||||||
this.currentShape = shape;
|
|
||||||
this.emitter.emit('show-osd', _(ShapeNames[shape]), null);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleShape: function() {
|
|
||||||
this.selectShape((this.currentShape == Object.keys(Shapes).length - 1) ? 0 : this.currentShape + 1);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleDash: function() {
|
|
||||||
this.dashedLine = !this.dashedLine;
|
|
||||||
this.emitter.emit('show-osd', this.dashedLine ? _("Dashed line") : _("Full line"), null);
|
|
||||||
},
|
|
||||||
|
|
||||||
incrementLineWidth: function(increment) {
|
|
||||||
this.currentLineWidth = Math.max(this.currentLineWidth + increment, 1);
|
|
||||||
this.emitter.emit('show-osd', this.currentLineWidth + "px", this.currentLineWidth);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleLineJoin: function() {
|
|
||||||
this.currentLineJoin = this.currentLineJoin == 2 ? 0 : this.currentLineJoin + 1;
|
|
||||||
this.emitter.emit('show-osd', LineJoinNames[this.currentLineJoin], null);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleLineCap: function() {
|
|
||||||
this.currentLineCap = this.currentLineCap == 2 ? 0 : this.currentLineCap + 1;
|
|
||||||
this.emitter.emit('show-osd', LineCapNames[this.currentLineCap], null);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleFontWeight: function() {
|
|
||||||
this.currentFontWeight = this.currentFontWeight == 1 ? 0 : this.currentFontWeight + 1;
|
|
||||||
if (this.currentElement) {
|
|
||||||
this.currentElement.font.weight = this.currentFontWeight;
|
|
||||||
this._redisplay();
|
|
||||||
}
|
|
||||||
this.emitter.emit('show-osd', FontWeightNames[this.currentFontWeight], null);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleFontStyle: function() {
|
|
||||||
this.currentFontStyle = this.currentFontStyle == 2 ? 0 : this.currentFontStyle + 1;
|
|
||||||
if (this.currentElement) {
|
|
||||||
this.currentElement.font.style = this.currentFontStyle;
|
|
||||||
this._redisplay();
|
|
||||||
}
|
|
||||||
this.emitter.emit('show-osd', FontStyleNames[this.currentFontStyle], null);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleFontFamily: function() {
|
|
||||||
this.currentFontFamilyId = this.currentFontFamilyId == 5 ? 0 : this.currentFontFamilyId + 1;
|
|
||||||
let currentFontFamily = this.currentFontFamilyId == 0 ? this.fontFamily : FontFamilyNames[this.currentFontFamilyId];
|
|
||||||
if (this.currentElement) {
|
|
||||||
this.currentElement.font.family = currentFontFamily;
|
|
||||||
this._redisplay();
|
|
||||||
}
|
|
||||||
this.emitter.emit('show-osd',currentFontFamily , null);
|
|
||||||
},
|
|
||||||
|
|
||||||
toggleHelp: function() {
|
|
||||||
if (this.helper.visible)
|
|
||||||
this.helper.hideHelp();
|
|
||||||
else
|
|
||||||
this.helper.showHelp();
|
|
||||||
},
|
|
||||||
|
|
||||||
enterDrawingMode: function() {
|
|
||||||
this.keyPressedHandler = this.connect('key-press-event', this._onKeyPressed.bind(this));
|
|
||||||
this.buttonPressedHandler = this.connect('button-press-event', this._onButtonPressed.bind(this));
|
|
||||||
this.scrollHandler = this.connect('scroll-event', this._onScroll.bind(this));
|
|
||||||
this.selectShape(Shapes.NONE);
|
|
||||||
this.get_parent().set_background_color(this.hasBackground ? this.activeBackgroundColor : null);
|
|
||||||
},
|
|
||||||
|
|
||||||
leaveDrawingMode: function() {
|
|
||||||
if (this.keyPressedHandler) {
|
|
||||||
this.disconnect(this.keyPressedHandler);
|
|
||||||
this.keyPressedHandler = null;
|
|
||||||
}
|
|
||||||
if (this.buttonPressedHandler) {
|
|
||||||
this.disconnect(this.buttonPressedHandler);
|
|
||||||
this.buttonPressedHandler = null;
|
|
||||||
}
|
|
||||||
if (this.motionHandler) {
|
|
||||||
this.disconnect(this.motionHandler);
|
|
||||||
this.motionHandler = null;
|
|
||||||
}
|
|
||||||
if (this.buttonReleasedHandler) {
|
|
||||||
this.disconnect(this.buttonReleasedHandler);
|
|
||||||
this.buttonReleasedHandler = null;
|
|
||||||
}
|
|
||||||
if (this.scrollHandler) {
|
|
||||||
this.disconnect(this.scrollHandler);
|
|
||||||
this.scrollHandler = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.helper.visible)
|
|
||||||
this.helper.hideHelp();
|
|
||||||
|
|
||||||
this.currentElement = null;
|
|
||||||
this._stopCursorTimeout();
|
|
||||||
this.dashedLine = false;
|
|
||||||
this._redisplay();
|
|
||||||
this.get_parent().set_background_color(null);
|
|
||||||
},
|
|
||||||
|
|
||||||
save: function() {
|
|
||||||
// stop drawing or writing
|
|
||||||
if (this.currentElement && this.currentElement.shape == Shapes.TEXT) {
|
|
||||||
this._stopWriting();
|
|
||||||
} else if (this.currentElement && this.currentShape != Shapes.TEXT) {
|
|
||||||
this._stopDrawing();
|
|
||||||
}
|
|
||||||
|
|
||||||
let content = `<svg viewBox="0 0 ${this.width} ${this.height}" xmlns="http://www.w3.org/2000/svg">`;
|
|
||||||
let backgroundColorString = this.hasBackground ? this.activeBackgroundColor.to_string() : 'transparent';
|
|
||||||
if (backgroundColorString != 'transparent') {
|
|
||||||
content += `\n <rect id="background" width="100%" height="100%" fill="${backgroundColorString}"/>`;
|
|
||||||
}
|
|
||||||
for (let i = 0; i < this.elements.length; i++) {
|
|
||||||
content += this.elements[i].buildSVG(backgroundColorString);
|
|
||||||
}
|
|
||||||
content += "\n</svg>";
|
|
||||||
|
|
||||||
let date = GLib.DateTime.new_now_local();
|
|
||||||
let filename = `DrawOnYourScreen ${date.format("%F")} ${date.format("%X")}.svg`;
|
|
||||||
let dir = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES);
|
|
||||||
let path = GLib.build_filenamev([dir, filename]);
|
|
||||||
if (GLib.file_test(path, GLib.FileTest.EXISTS))
|
|
||||||
return false;
|
|
||||||
let success = GLib.file_set_contents(path, content);
|
|
||||||
|
|
||||||
if (success) {
|
|
||||||
// pass the parent (bgContainer) to Flashspot because coords of this are relative
|
|
||||||
let flashspot = new Screenshot.Flashspot(this.get_parent());
|
|
||||||
flashspot.fire();
|
|
||||||
global.play_theme_sound(0, 'screen-capture', "Save as SVG", null);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
disable: function() {
|
|
||||||
if (this.theme && this.customStylesheetsChangedHandler) {
|
|
||||||
this.theme.disconnect(this.customStylesheetsChangedHandler);
|
|
||||||
this.customStylesheetsChangedHandler = null;
|
|
||||||
}
|
|
||||||
this.erase();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
var DrawingAreaEmitter = new Lang.Class({
|
|
||||||
Name: 'DrawingAreaEmitter',
|
|
||||||
|
|
||||||
_init: function() {
|
|
||||||
}
|
|
||||||
});
|
|
||||||
Signals.addSignalMethods(DrawingAreaEmitter.prototype);
|
|
||||||
|
|
||||||
|
|
||||||
// DrawingElement represents a "brushstroke".
|
|
||||||
// It can be converted into a cairo path as well as a svg element.
|
|
||||||
// See DrawingArea._startDrawing() to know its params.
|
|
||||||
var DrawingElement = new Lang.Class({
|
|
||||||
Name: 'DrawingElement',
|
|
||||||
|
|
||||||
_init: function(params) {
|
|
||||||
for (let key in params)
|
|
||||||
this[key] = params[key];
|
|
||||||
},
|
|
||||||
|
|
||||||
buildCairo: function(cr, showTextCursor) {
|
|
||||||
cr.setLineCap(this.line.lineCap);
|
|
||||||
cr.setLineJoin(this.line.lineJoin);
|
|
||||||
cr.setLineWidth(this.line.lineWidth);
|
|
||||||
|
|
||||||
if (this.dash.array[0] > 0 && this.dash.array[1] > 0)
|
|
||||||
cr.setDash(this.dash.array, this.dash.offset);
|
|
||||||
else
|
|
||||||
cr.setDash([1000000], 0);
|
|
||||||
|
|
||||||
if (this.eraser)
|
|
||||||
cr.setOperator(Cairo.Operator.CLEAR);
|
|
||||||
else
|
|
||||||
cr.setOperator(Cairo.Operator.OVER);
|
|
||||||
|
|
||||||
Clutter.cairo_set_source_color(cr, this.color);
|
|
||||||
|
|
||||||
let [points, shape] = [this.points, this.shape];
|
|
||||||
|
|
||||||
if (shape == Shapes.NONE || shape == Shapes.LINE) {
|
|
||||||
cr.moveTo(points[0][0], points[0][1]);
|
|
||||||
for (let j = 1; j < points.length; j++) {
|
|
||||||
cr.lineTo(points[j][0], points[j][1]);
|
|
||||||
}
|
|
||||||
} else if (shape == Shapes.ELLIPSE && points.length == 2) {
|
|
||||||
let r = Math.hypot(points[1][0] - points[0][0], points[1][1] - points[0][1]);
|
|
||||||
cr.arc(points[0][0], points[0][1], r, 0, 2 * Math.PI);
|
|
||||||
|
|
||||||
} else if (shape == Shapes.RECTANGLE && points.length == 2) {
|
|
||||||
cr.rectangle(points[0][0], points[0][1], points[1][0] - points[0][0], points[1][1] - points[0][1]);
|
|
||||||
} else if (shape == Shapes.TEXT && points.length == 2) {
|
|
||||||
cr.selectFontFace(this.font.family, this.font.style, this.font.weight);
|
|
||||||
cr.setFontSize(Math.abs(points[1][1] - points[0][1]));
|
|
||||||
cr.moveTo(Math.min(points[0][0], points[1][0]), Math.max(points[0][1], points[1][1]));
|
|
||||||
cr.showText((showTextCursor) ? (this.text + "_") : this.text);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
buildSVG: function(bgColor) {
|
|
||||||
let row = "\n ";
|
|
||||||
let points = this.points.map((point) => [Math.round(point[0]*100)/100, Math.round(point[1]*100)/100]);
|
|
||||||
let color = this.eraser ? bgColor : this.color.to_string();
|
|
||||||
let attributes = `fill="${this.fill ? color : 'transparent'}" ` +
|
|
||||||
`stroke="${this.fill ? 'transparent' : color}" ` +
|
|
||||||
`${this.fill ? 'stroke-opacity="0"' : 'fill-opacity="0"'} ` +
|
|
||||||
`stroke-width="${this.line.lineWidth}" ` +
|
|
||||||
`stroke-linecap="${LineCapNames[this.line.lineCap].toLowerCase()}" ` +
|
|
||||||
`stroke-linejoin="${LineJoinNames[this.line.lineJoin].toLowerCase()}"`;
|
|
||||||
|
|
||||||
if (this.dash.array[0] > 0 && this.dash.array[1] > 0)
|
|
||||||
attributes += ` stroke-dasharray="${this.dash.array[0]} ${this.dash.array[1]}" stroke-dashoffset="${this.dash.offset}"`;
|
|
||||||
|
|
||||||
if (this.shape == Shapes.NONE || this.shape == Shapes.LINE) {
|
|
||||||
row += `<path ${attributes} d="M${points[0][0]} ${points[0][1]}`;
|
|
||||||
|
|
||||||
for (let i = 1; i < points.length; i++) {
|
|
||||||
row += ` L ${points[i][0]} ${points[i][1]}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
row += `${this.fill ? 'z' : ''}"/>`;
|
|
||||||
} else if (this.shape == Shapes.ELLIPSE && points.length == 2) {
|
|
||||||
let r = Math.hypot(points[1][0] - points[0][0], points[1][1] - points[0][1]);
|
|
||||||
row += `<circle ${attributes} cx="${points[0][0]}" cy="${points[0][1]}" r="${r}"/>`;
|
|
||||||
} else if (this.shape == Shapes.RECTANGLE && points.length == 2) {
|
|
||||||
row += `<rect ${attributes} x="${Math.min(points[0][0], points[1][0])}" y="${Math.min(points[0][1], points[1][1])}" ` +
|
|
||||||
`width="${Math.abs(points[1][0] - points[0][0])}" height="${Math.abs(points[1][1] - points[0][1])}"/>`;
|
|
||||||
} else if (this.shape == Shapes.TEXT && points.length == 2) {
|
|
||||||
attributes = `fill="${color}" ` +
|
|
||||||
`stroke="transparent" ` +
|
|
||||||
`stroke-opacity="0" ` +
|
|
||||||
`font-family="${this.font.family}" ` +
|
|
||||||
`font-size="${Math.abs(points[1][1] - points[0][1])}" ` +
|
|
||||||
`font-weight="${FontWeightNames[this.font.weight].toLowerCase()}" ` +
|
|
||||||
`font-style="${FontStyleNames[this.font.style].toLowerCase()}"`;
|
|
||||||
|
|
||||||
row += `<text ${attributes} x="${Math.min(points[0][0], points[1][0])}" y="${Math.max(points[0][1], points[1][1])}">${this.text}</text>`;
|
|
||||||
}
|
|
||||||
|
|
||||||
return row;
|
|
||||||
},
|
|
||||||
|
|
||||||
addPoint: function(x, y, smoothedStroke) {
|
|
||||||
this.points.push([x, y]);
|
|
||||||
if (smoothedStroke)
|
|
||||||
this.smooth(this.points.length - 1);
|
|
||||||
},
|
|
||||||
|
|
||||||
smooth: function(i) {
|
|
||||||
if (i < 2)
|
|
||||||
return;
|
|
||||||
this.points[i-1] = [(this.points[i-2][0] + this.points[i][0]) / 2, (this.points[i-2][1] + this.points[i][1]) / 2];
|
|
||||||
},
|
|
||||||
|
|
||||||
smoothAll: function() {
|
|
||||||
for (let i = 0; i < this.points.length; i++) {
|
|
||||||
this.smooth(i);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
var HELPER_ANIMATION_TIME = 0.25;
|
|
||||||
|
|
||||||
// DrawingHelper provides the "help osd" (Ctrl + F1)
|
|
||||||
// It uses the same texts as in prefs
|
|
||||||
var DrawingHelper = new Lang.Class({
|
|
||||||
Name: 'DrawingHelper',
|
|
||||||
Extends: St.ScrollView,
|
|
||||||
|
|
||||||
_init: function(params, monitor) {
|
|
||||||
this.parent(params);
|
|
||||||
this.monitor = monitor;
|
|
||||||
this.hide();
|
|
||||||
this.vbox = new St.BoxLayout({ style_class: 'osd-window draw-on-your-screen-helper', vertical: true });
|
|
||||||
this.add_actor(this.vbox);
|
|
||||||
this.vbox.add(new St.Label({ text: _("Global") }));
|
|
||||||
|
|
||||||
let settings = Convenience.getSettings();
|
|
||||||
|
|
||||||
for (let settingKey in Prefs.GLOBAL_KEYBINDINGS) {
|
|
||||||
let hbox = new St.BoxLayout({ vertical: false });
|
|
||||||
if (settingKey.indexOf('-separator-') != -1) {
|
|
||||||
this.vbox.add(hbox);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let [keyval, mods] = Gtk.accelerator_parse(settings.get_strv(settingKey)[0]);
|
|
||||||
hbox.add(new St.Label({ text: _(Prefs.GLOBAL_KEYBINDINGS[settingKey]) }));
|
|
||||||
hbox.add(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods) }), { expand: true });
|
|
||||||
this.vbox.add(hbox);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.vbox.add(new St.Label({ text: _("Internal") }));
|
|
||||||
|
|
||||||
for (let i = 0; i < Prefs.OTHER_SHORTCUTS.length; i++) {
|
|
||||||
if (Prefs.OTHER_SHORTCUTS[i].desc.indexOf('-separator-') != -1) {
|
|
||||||
this.vbox.add(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-separator' }));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let hbox = new St.BoxLayout({ vertical: false });
|
|
||||||
hbox.add(new St.Label({ text: _(Prefs.OTHER_SHORTCUTS[i].desc) }));
|
|
||||||
hbox.add(new St.Label({ text: _(Prefs.OTHER_SHORTCUTS[i].shortcut) }), { expand: true });
|
|
||||||
this.vbox.add(hbox);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.vbox.add(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-separator' }));
|
|
||||||
|
|
||||||
for (let settingKey in Prefs.INTERNAL_KEYBINDINGS) {
|
|
||||||
if (settingKey.indexOf('-separator-') != -1) {
|
|
||||||
this.vbox.add(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-separator' }));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
let hbox = new St.BoxLayout({ vertical: false });
|
|
||||||
let [keyval, mods] = Gtk.accelerator_parse(settings.get_strv(settingKey)[0]);
|
|
||||||
hbox.add(new St.Label({ text: _(Prefs.INTERNAL_KEYBINDINGS[settingKey]) }));
|
|
||||||
hbox.add(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods) }), { expand: true });
|
|
||||||
this.vbox.add(hbox);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
showHelp: function() {
|
|
||||||
this.opacity = 0;
|
|
||||||
this.show();
|
|
||||||
|
|
||||||
let maxHeight = this.monitor.height*(3/4);
|
|
||||||
if (this.height > maxHeight)
|
|
||||||
this.vscrollbar_policy = Gtk.PolicyType.ALWAYS;
|
|
||||||
else
|
|
||||||
this.vscrollbar_policy = Gtk.PolicyType.NEVER;
|
|
||||||
this.set_height(Math.min(this.height, maxHeight));
|
|
||||||
this.set_position(this.monitor.x + Math.floor(this.monitor.width / 2 - this.width / 2),
|
|
||||||
this.monitor.y + Math.floor(this.monitor.height / 2 - this.height / 2));
|
|
||||||
|
|
||||||
Tweener.removeTweens(this);
|
|
||||||
Tweener.addTween(this, { opacity: 255,
|
|
||||||
time: HELPER_ANIMATION_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onComplete: null });
|
|
||||||
},
|
|
||||||
|
|
||||||
hideHelp: function() {
|
|
||||||
Tweener.removeTweens(this);
|
|
||||||
Tweener.addTween(this, { opacity: 0,
|
|
||||||
time: HELPER_ANIMATION_TIME,
|
|
||||||
transition: 'easeOutQuad',
|
|
||||||
onComplete: this.hide.bind(this) });
|
|
||||||
|
|
||||||
},
|
|
||||||
});
|
|
||||||
596
extension.js
|
|
@ -1,14 +1,9 @@
|
||||||
/* jslint esversion: 6 */
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2019 Abakkk
|
* Copyright 2019 Abakkk
|
||||||
*
|
*
|
||||||
* This file is part of DrowOnYourScreen, a drawing extension for GNOME Shell.
|
|
||||||
* https://framagit.org/abakkk/DrawOnYourScreen
|
|
||||||
*
|
|
||||||
* 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
|
||||||
* the Free Software Foundation, either version 2 of the License, or
|
* the Free Software Foundation, either version 3 of the License, or
|
||||||
* (at your option) any later version.
|
* (at your option) any later version.
|
||||||
*
|
*
|
||||||
* This program is distributed in the hope that it will be useful,
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
|
@ -18,73 +13,149 @@
|
||||||
*
|
*
|
||||||
* You should have received a copy of the GNU General Public License
|
* You should have received a copy of the GNU General Public License
|
||||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2019 Abakkk
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const Gio = imports.gi.Gio;
|
/* jslint esversion: 6 */
|
||||||
|
/* exported init */
|
||||||
|
|
||||||
const Lang = imports.lang;
|
const Lang = imports.lang;
|
||||||
const Meta = imports.gi.Meta;
|
const Meta = imports.gi.Meta;
|
||||||
const Shell = imports.gi.Shell;
|
const Shell = imports.gi.Shell;
|
||||||
const St = imports.gi.St;
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const Config = imports.misc.config;
|
||||||
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
const OsdWindow = imports.ui.osdWindow;
|
const OsdWindow = imports.ui.osdWindow;
|
||||||
const Extension = imports.misc.extensionUtils.getCurrentExtension();
|
const PanelMenu = imports.ui.panelMenu;
|
||||||
const Convenience = Extension.imports.convenience;
|
|
||||||
const Draw = Extension.imports.draw;
|
|
||||||
const _ = imports.gettext.domain(Extension.metadata["gettext-domain"]).gettext;
|
|
||||||
|
|
||||||
let manager;
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
|
const Convenience = ExtensionUtils.getSettings && ExtensionUtils.initTranslations ? ExtensionUtils : Me.imports.convenience;
|
||||||
|
const Area = Me.imports.area;
|
||||||
|
const Files = Me.imports.files;
|
||||||
|
const Helper = Me.imports.helper;
|
||||||
|
const _ = imports.gettext.domain(Me.metadata['gettext-domain']).gettext;
|
||||||
|
|
||||||
|
const GS_VERSION = Config.PACKAGE_VERSION;
|
||||||
|
const HIDE_TIMEOUT_LONG = 2500; // ms, default is 1500 ms
|
||||||
|
const UUID = Me.uuid.replace(/@/gi, '_at_').replace(/[^a-z0-9+_-]/gi, '_');
|
||||||
|
|
||||||
|
// custom Shell.ActionMode, assuming that they are unused
|
||||||
|
const DRAWING_ACTION_MODE = Math.pow(2,14);
|
||||||
|
const WRITING_ACTION_MODE = Math.pow(2,15);
|
||||||
|
// use 'login-dialog-message-warning' class in order to get GS theme warning color (default: #f57900)
|
||||||
|
const WARNING_COLOR_STYLE_CLASS_NAME = 'login-dialog-message-warning';
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
Convenience.initTranslations();
|
return new Extension();
|
||||||
}
|
}
|
||||||
|
|
||||||
function enable() {
|
const Extension = new Lang.Class({
|
||||||
manager = new AreaManager();
|
Name: `${UUID}-Extension`,
|
||||||
}
|
|
||||||
|
|
||||||
function disable() {
|
_init: function() {
|
||||||
manager.disable();
|
Convenience.initTranslations();
|
||||||
manager = null;
|
},
|
||||||
}
|
|
||||||
|
enable() {
|
||||||
|
if (ExtensionUtils.isOutOfDate(Me))
|
||||||
|
log(`${Me.metadata.uuid}: GNOME Shell ${Number.parseFloat(GS_VERSION)} is not supported.`);
|
||||||
|
|
||||||
|
Me.settings = Convenience.getSettings();
|
||||||
|
Me.internalShortcutSettings = Convenience.getSettings(Me.metadata['settings-schema'] + '.internal-shortcuts');
|
||||||
|
Me.drawingSettings = Convenience.getSettings(Me.metadata['settings-schema'] + '.drawing');
|
||||||
|
this.areaManager = new AreaManager();
|
||||||
|
},
|
||||||
|
|
||||||
|
disable() {
|
||||||
|
this.areaManager.disable();
|
||||||
|
delete this.areaManager;
|
||||||
|
delete Me.settings;
|
||||||
|
delete Me.internalShortcutSettings;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// AreaManager assigns one DrawingArea per monitor (updateAreas()),
|
// AreaManager assigns one DrawingArea per monitor (updateAreas()),
|
||||||
// distributes keybinding callbacks to the active area
|
// distributes keybinding callbacks to the active area
|
||||||
// and handles stylesheet and monitor changes.
|
// and handles stylesheet and monitor changes.
|
||||||
var AreaManager = new Lang.Class({
|
const AreaManager = new Lang.Class({
|
||||||
Name: 'AreaManager',
|
Name: `${UUID}-AreaManager`,
|
||||||
|
|
||||||
_init: function() {
|
_init: function() {
|
||||||
this.areas = [];
|
this.areas = [];
|
||||||
this.drawingHandlers = [];
|
|
||||||
this.activeArea = null;
|
this.activeArea = null;
|
||||||
this.enterGicon = new Gio.ThemedIcon({ name: 'applications-graphics-symbolic' });
|
|
||||||
this.leaveGicon = new Gio.ThemedIcon({ name: 'application-exit-symbolic' });
|
|
||||||
|
|
||||||
Main.wm.addKeybinding('toggle-drawing',
|
Main.wm.addKeybinding('toggle-drawing',
|
||||||
Convenience.getSettings(),
|
Me.settings,
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.ActionMode.ALL,
|
Shell.ActionMode.ALL,
|
||||||
this.toggleDrawing.bind(this));
|
this.toggleDrawing.bind(this));
|
||||||
|
|
||||||
Main.wm.addKeybinding('erase-drawing',
|
Main.wm.addKeybinding('toggle-modal',
|
||||||
Convenience.getSettings(),
|
Me.settings,
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
Shell.ActionMode.ALL,
|
Shell.ActionMode.ALL,
|
||||||
this.eraseDrawing.bind(this));
|
this.toggleModal.bind(this));
|
||||||
|
|
||||||
|
Main.wm.addKeybinding('erase-drawings',
|
||||||
|
Me.settings,
|
||||||
|
Meta.KeyBindingFlags.NONE,
|
||||||
|
Shell.ActionMode.ALL,
|
||||||
|
this.eraseDrawings.bind(this));
|
||||||
|
|
||||||
this.updateAreas();
|
this.updateAreas();
|
||||||
this.monitorChangedHandler = Main.layoutManager.connect('monitors-changed', this.updateAreas.bind(this));
|
this.monitorChangedHandler = Main.layoutManager.connect('monitors-changed', this.updateAreas.bind(this));
|
||||||
|
|
||||||
if (Extension.stylesheet) {
|
this.updateIndicator();
|
||||||
this.stylesheetMonitor = Extension.stylesheet.monitor(Gio.FileMonitorFlags.NONE, null);
|
this.indicatorSettingHandler = Me.settings.connect('changed::indicator-disabled', this.updateIndicator.bind(this));
|
||||||
this.stylesheetChangedHandler = this.stylesheetMonitor.connect('changed', (monitor, file, otherFile, eventType) => {
|
|
||||||
if ((eventType != 0 && eventType != 3) || !Extension.stylesheet.query_exists(null))
|
this.desktopSettingHandler = Me.settings.connect('changed::drawing-on-desktop', this.onDesktopSettingChanged.bind(this));
|
||||||
return;
|
this.persistentOverRestartsSettingHandler = Me.settings.connect('changed::persistent-over-restarts', this.onPersistentOverRestartsSettingChanged.bind(this));
|
||||||
let theme = St.ThemeContext.get_for_stage(global.stage).get_theme();
|
this.persistentOverTogglesSettingHandler = Me.settings.connect('changed::persistent-over-toggles', this.onPersistentOverTogglesSettingChanged.bind(this));
|
||||||
theme.unload_stylesheet(Extension.stylesheet);
|
},
|
||||||
theme.load_stylesheet(Extension.stylesheet);
|
|
||||||
});
|
get persistentOverToggles() {
|
||||||
|
return Me.settings.get_boolean('persistent-over-toggles');
|
||||||
|
},
|
||||||
|
|
||||||
|
get persistentOverRestarts() {
|
||||||
|
return Me.settings.get_boolean('persistent-over-toggles') && Me.settings.get_boolean('persistent-over-restarts');
|
||||||
|
},
|
||||||
|
|
||||||
|
get onDesktop() {
|
||||||
|
return Me.settings.get_boolean('persistent-over-toggles') && Me.settings.get_boolean('drawing-on-desktop');
|
||||||
|
},
|
||||||
|
|
||||||
|
onDesktopSettingChanged: function() {
|
||||||
|
if (this.onDesktop)
|
||||||
|
this.areas.forEach(area => area.show());
|
||||||
|
else
|
||||||
|
this.areas.forEach(area => area.hide());
|
||||||
|
},
|
||||||
|
|
||||||
|
onPersistentOverRestartsSettingChanged: function() {
|
||||||
|
if (this.persistentOverRestarts)
|
||||||
|
this.areas[Main.layoutManager.primaryIndex].syncPersistent();
|
||||||
|
},
|
||||||
|
|
||||||
|
onPersistentOverTogglesSettingChanged: function() {
|
||||||
|
if (!this.persistentOverToggles && !this.activeArea)
|
||||||
|
this.eraseDrawings();
|
||||||
|
|
||||||
|
this.onPersistentOverRestartsSettingChanged();
|
||||||
|
this.onDesktopSettingChanged();
|
||||||
|
},
|
||||||
|
|
||||||
|
updateIndicator: function() {
|
||||||
|
if (this.indicator) {
|
||||||
|
this.indicator.disable();
|
||||||
|
this.indicator = null;
|
||||||
}
|
}
|
||||||
|
if (!Me.settings.get_boolean('indicator-disabled'))
|
||||||
|
this.indicator = new DrawingIndicator();
|
||||||
},
|
},
|
||||||
|
|
||||||
updateAreas: function() {
|
updateAreas: function() {
|
||||||
|
|
@ -96,88 +167,135 @@ var AreaManager = new Lang.Class({
|
||||||
|
|
||||||
for (let i = 0; i < this.monitors.length; i++) {
|
for (let i = 0; i < this.monitors.length; i++) {
|
||||||
let monitor = this.monitors[i];
|
let monitor = this.monitors[i];
|
||||||
let helper = new Draw.DrawingHelper({ name: 'drawOnYourSreenHelper' + i }, monitor);
|
let helper = new Helper.DrawingHelper({ name: 'drawOnYourSreenHelper' + i }, monitor);
|
||||||
let bgContainer = new St.Bin({ name: 'drawOnYourSreenContainer' + i });
|
let loadPersistent = i == Main.layoutManager.primaryIndex && this.persistentOverRestarts;
|
||||||
let area = new Draw.DrawingArea({ name: 'drawOnYourSreenArea' + i }, helper);
|
// Some utils for the drawing area menus.
|
||||||
bgContainer.set_child(area);
|
let areaManagerUtils = {
|
||||||
Main.uiGroup.add_actor(bgContainer);
|
getHiddenList: () => this.hiddenList || null,
|
||||||
Main.uiGroup.add_actor(helper);
|
togglePanelAndDockOpacity: this.togglePanelAndDockOpacity.bind(this),
|
||||||
bgContainer.set_position(monitor.x, monitor.y);
|
openPreferences: this.openPreferences.bind(this)
|
||||||
bgContainer.set_size(monitor.width, monitor.height);
|
};
|
||||||
|
let area = new Area.DrawingArea({ name: 'drawOnYourSreenArea' + i }, monitor, helper, areaManagerUtils, loadPersistent);
|
||||||
|
|
||||||
|
Main.layoutManager._backgroundGroup.insert_child_above(area, Main.layoutManager._bgManagers[i].backgroundActor);
|
||||||
|
if (!this.onDesktop)
|
||||||
|
area.hide();
|
||||||
|
|
||||||
area.set_position(monitor.x, monitor.y);
|
area.set_position(monitor.x, monitor.y);
|
||||||
area.set_size(monitor.width, monitor.height);
|
area.set_size(monitor.width, monitor.height);
|
||||||
this.drawingHandlers.push(area.emitter.connect('stop-drawing', this.toggleDrawing.bind(this)));
|
area.leaveDrawingHandler = area.connect('leave-drawing-mode', this.toggleDrawing.bind(this));
|
||||||
this.drawingHandlers.push(area.emitter.connect('show-osd', this.showOsd.bind(this)));
|
area.updateActionModeHandler = area.connect('update-action-mode', this.updateActionMode.bind(this));
|
||||||
|
area.pointerCursorChangedHandler = area.connect('pointer-cursor-changed', this.setCursor.bind(this));
|
||||||
|
area.showOsdHandler = area.connect('show-osd', this.showOsd.bind(this));
|
||||||
this.areas.push(area);
|
this.areas.push(area);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
addInternalKeybindings: function() {
|
addInternalKeybindings: function() {
|
||||||
this.internalKeybindings = {
|
// unavailable when writing
|
||||||
|
this.internalKeybindings1 = {
|
||||||
'undo': this.activeArea.undo.bind(this.activeArea),
|
'undo': this.activeArea.undo.bind(this.activeArea),
|
||||||
'redo': this.activeArea.redo.bind(this.activeArea),
|
'redo': this.activeArea.redo.bind(this.activeArea),
|
||||||
'delete-last-element': this.activeArea.deleteLastElement.bind(this.activeArea),
|
'delete-last-element': this.activeArea.deleteLastElement.bind(this.activeArea),
|
||||||
'smooth-last-element': this.activeArea.smoothLastElement.bind(this.activeArea),
|
'smooth-last-element': this.activeArea.smoothLastElement.bind(this.activeArea),
|
||||||
'save-as-svg': this.activeArea.save.bind(this.activeArea),
|
|
||||||
'toggle-background': this.activeArea.toggleBackground.bind(this.activeArea),
|
|
||||||
'increment-line-width': () => this.activeArea.incrementLineWidth(1),
|
'increment-line-width': () => this.activeArea.incrementLineWidth(1),
|
||||||
'decrement-line-width': () => this.activeArea.incrementLineWidth(-1),
|
'decrement-line-width': () => this.activeArea.incrementLineWidth(-1),
|
||||||
'increment-line-width-more': () => this.activeArea.incrementLineWidth(5),
|
'increment-line-width-more': () => this.activeArea.incrementLineWidth(5),
|
||||||
'decrement-line-width-more': () => this.activeArea.incrementLineWidth(-5),
|
'decrement-line-width-more': () => this.activeArea.incrementLineWidth(-5),
|
||||||
'toggle-linejoin': this.activeArea.toggleLineJoin.bind(this.activeArea),
|
'paste-image-files': this.activeArea.pasteImageFiles.bind(this.activeArea),
|
||||||
'toggle-linecap': this.activeArea.toggleLineCap.bind(this.activeArea),
|
'switch-linejoin': this.activeArea.switchLineJoin.bind(this.activeArea),
|
||||||
'toggle-dash' : this.activeArea.toggleDash.bind(this.activeArea),
|
'switch-linecap': this.activeArea.switchLineCap.bind(this.activeArea),
|
||||||
'select-none-shape': () => this.activeArea.selectShape(Draw.Shapes.NONE),
|
'switch-fill-rule': this.activeArea.switchFillRule.bind(this.activeArea),
|
||||||
'select-line-shape': () => this.activeArea.selectShape(Draw.Shapes.LINE),
|
'switch-dash' : this.activeArea.switchDash.bind(this.activeArea),
|
||||||
'select-ellipse-shape': () => this.activeArea.selectShape(Draw.Shapes.ELLIPSE),
|
'switch-fill' : this.activeArea.switchFill.bind(this.activeArea),
|
||||||
'select-rectangle-shape': () => this.activeArea.selectShape(Draw.Shapes.RECTANGLE),
|
'switch-image-file' : this.activeArea.switchImageFile.bind(this.activeArea, false),
|
||||||
'select-text-shape': () => this.activeArea.selectShape(Draw.Shapes.TEXT),
|
'switch-image-file-reverse' : this.activeArea.switchImageFile.bind(this.activeArea, true),
|
||||||
'toggle-font-family': this.activeArea.toggleFontFamily.bind(this.activeArea),
|
'select-none-shape': () => this.activeArea.selectTool(Area.Tool.NONE),
|
||||||
'toggle-font-weight': this.activeArea.toggleFontWeight.bind(this.activeArea),
|
'select-line-shape': () => this.activeArea.selectTool(Area.Tool.LINE),
|
||||||
'toggle-font-style': this.activeArea.toggleFontStyle.bind(this.activeArea),
|
'select-ellipse-shape': () => this.activeArea.selectTool(Area.Tool.ELLIPSE),
|
||||||
'toggle-panel-and-dock-visibility': this.togglePanelAndDockOpacity.bind(this),
|
'select-rectangle-shape': () => this.activeArea.selectTool(Area.Tool.RECTANGLE),
|
||||||
'toggle-help': this.activeArea.toggleHelp.bind(this.activeArea),
|
'select-text-shape': () => this.activeArea.selectTool(Area.Tool.TEXT),
|
||||||
'open-stylesheet': this.openStylesheetFile.bind(this)
|
'select-image-shape': () => this.activeArea.selectTool(Area.Tool.IMAGE),
|
||||||
|
'select-polygon-shape': () => this.activeArea.selectTool(Area.Tool.POLYGON),
|
||||||
|
'select-polyline-shape': () => this.activeArea.selectTool(Area.Tool.POLYLINE),
|
||||||
|
'select-move-tool': () => this.activeArea.selectTool(Area.Tool.MOVE),
|
||||||
|
'select-resize-tool': () => this.activeArea.selectTool(Area.Tool.RESIZE),
|
||||||
|
'select-mirror-tool': () => this.activeArea.selectTool(Area.Tool.MIRROR)
|
||||||
};
|
};
|
||||||
|
|
||||||
for (let key in this.internalKeybindings) {
|
// available when writing
|
||||||
|
this.internalKeybindings2 = {
|
||||||
|
'export-to-svg': this.activeArea.exportToSvg.bind(this.activeArea),
|
||||||
|
'save-as-json': this.activeArea.saveAsJson.bind(this.activeArea, true, null),
|
||||||
|
'open-previous-json': this.activeArea.loadPreviousJson.bind(this.activeArea),
|
||||||
|
'open-next-json': this.activeArea.loadNextJson.bind(this.activeArea),
|
||||||
|
'pick-color': this.activeArea.pickColor.bind(this.activeArea),
|
||||||
|
'toggle-background': this.activeArea.toggleBackground.bind(this.activeArea),
|
||||||
|
'toggle-grid': this.activeArea.toggleGrid.bind(this.activeArea),
|
||||||
|
'toggle-square-area': this.activeArea.toggleSquareArea.bind(this.activeArea),
|
||||||
|
'switch-color-palette': this.activeArea.switchColorPalette.bind(this.activeArea, false),
|
||||||
|
'switch-color-palette-reverse': this.activeArea.switchColorPalette.bind(this.activeArea, true),
|
||||||
|
'switch-font-family': this.activeArea.switchFontFamily.bind(this.activeArea, false),
|
||||||
|
'switch-font-family-reverse': this.activeArea.switchFontFamily.bind(this.activeArea, true),
|
||||||
|
'switch-font-weight': this.activeArea.switchFontWeight.bind(this.activeArea),
|
||||||
|
'switch-font-style': this.activeArea.switchFontStyle.bind(this.activeArea),
|
||||||
|
'switch-text-alignment': this.activeArea.switchTextAlignment.bind(this.activeArea),
|
||||||
|
'toggle-panel-and-dock-visibility': this.togglePanelAndDockOpacity.bind(this),
|
||||||
|
'toggle-help': this.activeArea.toggleHelp.bind(this.activeArea),
|
||||||
|
'open-preferences': this.openPreferences.bind(this)
|
||||||
|
};
|
||||||
|
|
||||||
|
for (let key in this.internalKeybindings1) {
|
||||||
Main.wm.addKeybinding(key,
|
Main.wm.addKeybinding(key,
|
||||||
Convenience.getSettings(),
|
Me.internalShortcutSettings,
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
256,
|
DRAWING_ACTION_MODE,
|
||||||
this.internalKeybindings[key]);
|
this.internalKeybindings1[key]);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (let key in this.internalKeybindings2) {
|
||||||
|
Main.wm.addKeybinding(key,
|
||||||
|
Me.internalShortcutSettings,
|
||||||
|
Meta.KeyBindingFlags.NONE,
|
||||||
|
DRAWING_ACTION_MODE | WRITING_ACTION_MODE,
|
||||||
|
this.internalKeybindings2[key]);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (let i = 1; i < 10; i++) {
|
for (let i = 1; i < 10; i++) {
|
||||||
|
let iCaptured = i;
|
||||||
Main.wm.addKeybinding('select-color' + i,
|
Main.wm.addKeybinding('select-color' + i,
|
||||||
Convenience.getSettings(),
|
Me.internalShortcutSettings,
|
||||||
Meta.KeyBindingFlags.NONE,
|
Meta.KeyBindingFlags.NONE,
|
||||||
256,
|
DRAWING_ACTION_MODE | WRITING_ACTION_MODE,
|
||||||
() => this.activeArea.selectColor(i));
|
this.activeArea.selectColor.bind(this.activeArea, iCaptured - 1));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
removeInternalKeybindings: function() {
|
removeInternalKeybindings: function() {
|
||||||
for (let key in this.internalKeybindings) {
|
for (let key in this.internalKeybindings1)
|
||||||
Main.wm.removeKeybinding(key);
|
Main.wm.removeKeybinding(key);
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 1; i < 10; i++) {
|
for (let key in this.internalKeybindings2)
|
||||||
|
Main.wm.removeKeybinding(key);
|
||||||
|
|
||||||
|
for (let i = 1; i < 10; i++)
|
||||||
Main.wm.removeKeybinding('select-color' + i);
|
Main.wm.removeKeybinding('select-color' + i);
|
||||||
|
},
|
||||||
|
|
||||||
|
openPreferences: function() {
|
||||||
|
// since GS 3.36
|
||||||
|
if (ExtensionUtils.openPrefs) {
|
||||||
|
if (this.activeArea)
|
||||||
|
this.toggleDrawing();
|
||||||
|
ExtensionUtils.openPrefs();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
openStylesheetFile: function() {
|
eraseDrawings: function() {
|
||||||
if (Extension.stylesheet && Extension.stylesheet.query_exists(null))
|
for (let i = 0; i < this.areas.length; i++)
|
||||||
Gio.AppInfo.launch_default_for_uri(Extension.stylesheet.get_uri(), global.create_app_launch_context(0, -1));
|
|
||||||
if (this.activeArea)
|
|
||||||
this.toggleDrawing();
|
|
||||||
},
|
|
||||||
|
|
||||||
eraseDrawing: function() {
|
|
||||||
for (let i = 0; i < this.areas.length; i++) {
|
|
||||||
this.areas[i].erase();
|
this.areas[i].erase();
|
||||||
}
|
if (this.persistentOverRestarts)
|
||||||
|
this.areas[Main.layoutManager.primaryIndex].savePersistent();
|
||||||
},
|
},
|
||||||
|
|
||||||
togglePanelAndDockOpacity: function() {
|
togglePanelAndDockOpacity: function() {
|
||||||
|
|
@ -192,19 +310,23 @@ var AreaManager = new Lang.Class({
|
||||||
// dash-to-dock
|
// dash-to-dock
|
||||||
let dtdContainers = Main.uiGroup.get_children().filter((actor) => {
|
let dtdContainers = Main.uiGroup.get_children().filter((actor) => {
|
||||||
return actor.name && actor.name == 'dashtodockContainer' &&
|
return actor.name && actor.name == 'dashtodockContainer' &&
|
||||||
actor._delegate &&
|
((actor._delegate &&
|
||||||
actor._delegate._monitorIndex !== undefined &&
|
actor._delegate._monitorIndex !== undefined &&
|
||||||
actor._delegate._monitorIndex == activeIndex;
|
actor._delegate._monitorIndex == activeIndex) ||
|
||||||
|
// dtd v68+
|
||||||
|
(actor._monitorIndex !== undefined &&
|
||||||
|
actor._monitorIndex == activeIndex));
|
||||||
});
|
});
|
||||||
|
|
||||||
// for simplicity, we assume that main dash-to-panel panel is displayed on primary monitor
|
// for simplicity, we assume that main dash-to-panel panel is displayed on primary monitor
|
||||||
// and we hide all secondary panels together if the active area is not on the primary
|
// and we hide all secondary panels together if the active area is not on the primary
|
||||||
let name = activeIndex == Main.layoutManager.primaryIndex ? 'panelBox' : 'dashtopanelSecondaryPanelBox';
|
let name = activeIndex == Main.layoutManager.primaryIndex ? 'panelBox' : 'dashtopanelSecondaryPanelBox';
|
||||||
let panelBoxes = Main.uiGroup.get_children().filter((actor) => {
|
let panelBoxes = Main.uiGroup.get_children().filter((actor) => {
|
||||||
return actor.name && actor.name == name;
|
return actor.name && actor.name == name ||
|
||||||
|
// dtp v37+
|
||||||
|
actor.get_children().length && actor.get_children()[0].name && actor.get_children()[0].name == name;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
let actorToHide = dtdContainers.concat(panelBoxes);
|
let actorToHide = dtdContainers.concat(panelBoxes);
|
||||||
this.hiddenList = [];
|
this.hiddenList = [];
|
||||||
for (let i = 0; i < actorToHide.length; i++) {
|
for (let i = 0; i < actorToHide.length; i++) {
|
||||||
|
|
@ -214,74 +336,274 @@ var AreaManager = new Lang.Class({
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
toggleDrawing: function() {
|
toggleArea: function() {
|
||||||
if (this.activeArea) {
|
if (!this.activeArea)
|
||||||
if (this.hiddenList)
|
return;
|
||||||
this.togglePanelAndDockOpacity();
|
|
||||||
Main.popModal(this.activeArea);
|
let activeIndex = this.areas.indexOf(this.activeArea);
|
||||||
let activeIndex = this.areas.indexOf(this.activeArea);
|
|
||||||
this.removeInternalKeybindings();
|
if (this.activeArea.get_parent() == Main.uiGroup) {
|
||||||
this.activeArea.reactive = false;
|
Main.uiGroup.set_child_at_index(Main.layoutManager.keyboardBox, this.oldKeyboardIndex);
|
||||||
this.activeArea.leaveDrawingMode();
|
Main.uiGroup.remove_actor(this.activeArea);
|
||||||
this.activeArea = null;
|
Main.layoutManager._backgroundGroup.insert_child_above(this.activeArea, Main.layoutManager._bgManagers[activeIndex].backgroundActor);
|
||||||
// check display or screen (API changes)
|
if (!this.onDesktop)
|
||||||
if (global.display.set_cursor)
|
this.activeArea.hide();
|
||||||
global.display.set_cursor(Meta.Cursor.DEFAULT);
|
} else {
|
||||||
else if (global.screen && global.screen.set_cursor)
|
Main.layoutManager._backgroundGroup.remove_actor(this.activeArea);
|
||||||
global.screen.set_cursor(Meta.Cursor.DEFAULT);
|
Main.uiGroup.add_child(this.activeArea);
|
||||||
Main.osdWindowManager.show(activeIndex, this.leaveGicon, _("Leaving drawing mode"), null);
|
// move the keyboard above the area to make it available with text entries
|
||||||
} else {
|
this.oldKeyboardIndex = Main.uiGroup.get_children().indexOf(Main.layoutManager.keyboardBox);
|
||||||
// avoid to deal with Meta changes (global.display/global.screen)
|
Main.uiGroup.set_child_above_sibling(Main.layoutManager.keyboardBox, this.activeArea);
|
||||||
let currentIndex = Main.layoutManager.monitors.indexOf(Main.layoutManager.currentMonitor);
|
|
||||||
// 256 is a custom Shell.ActionMode
|
|
||||||
if (!Main.pushModal(this.areas[currentIndex], { actionMode: 256 | 1 }))
|
|
||||||
return;
|
|
||||||
this.activeArea = this.areas[currentIndex];
|
|
||||||
this.addInternalKeybindings();
|
|
||||||
this.activeArea.reactive = true;
|
|
||||||
this.activeArea.enterDrawingMode();
|
|
||||||
// check display or screen (API changes)
|
|
||||||
if (global.display.set_cursor)
|
|
||||||
global.display.set_cursor(Meta.Cursor.POINTING_HAND);
|
|
||||||
else if (global.screen && global.screen.set_cursor)
|
|
||||||
global.screen.set_cursor(Meta.Cursor.POINTING_HAND);
|
|
||||||
// increase OSD display time
|
|
||||||
let hideTimeoutSave = OsdWindow.HIDE_TIMEOUT;
|
|
||||||
OsdWindow.HIDE_TIMEOUT = 2000;
|
|
||||||
Main.osdWindowManager.show(currentIndex, this.enterGicon, _("Press Ctrl + F1 for help") + "\n\n" + _("Entering drawing mode"), null);
|
|
||||||
OsdWindow.HIDE_TIMEOUT = hideTimeoutSave;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
showOsd: function(emitter, label, level, maxLevel) {
|
toggleModal: function(source) {
|
||||||
|
if (!this.activeArea)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.activeArea.closeMenu();
|
||||||
|
|
||||||
|
if (Main._findModal(this.activeArea) != -1) {
|
||||||
|
Main.popModal(this.activeArea);
|
||||||
|
if (source && source == global.display)
|
||||||
|
// Translators: "released" as the opposite of "grabbed"
|
||||||
|
this.showOsd(null, Files.Icons.UNGRAB, _("Keyboard and pointer released"), null, null, false);
|
||||||
|
this.setCursor(null, 'DEFAULT');
|
||||||
|
this.activeArea.reactive = false;
|
||||||
|
this.removeInternalKeybindings();
|
||||||
|
} else {
|
||||||
|
// add Shell.ActionMode.NORMAL to keep system keybindings enabled (e.g. Alt + F2 ...)
|
||||||
|
let actionMode = (this.activeArea.isWriting ? WRITING_ACTION_MODE : DRAWING_ACTION_MODE) | Shell.ActionMode.NORMAL;
|
||||||
|
if (!Main.pushModal(this.activeArea, { actionMode: actionMode }))
|
||||||
|
return false;
|
||||||
|
this.addInternalKeybindings();
|
||||||
|
this.activeArea.reactive = true;
|
||||||
|
this.activeArea.initPointerCursor();
|
||||||
|
if (source && source == global.display)
|
||||||
|
this.showOsd(null, Files.Icons.GRAB, _("Keyboard and pointer grabbed"), null, null, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleDrawing: function() {
|
||||||
|
if (this.activeArea) {
|
||||||
|
let activeIndex = this.areas.indexOf(this.activeArea);
|
||||||
|
let save = activeIndex == Main.layoutManager.primaryIndex && this.persistentOverRestarts;
|
||||||
|
let erase = !this.persistentOverToggles;
|
||||||
|
|
||||||
|
this.showOsd(null, Files.Icons.LEAVE, _("Leaving drawing mode"));
|
||||||
|
this.activeArea.leaveDrawingMode(save, erase);
|
||||||
|
if (this.hiddenList)
|
||||||
|
this.togglePanelAndDockOpacity();
|
||||||
|
|
||||||
|
if (Main._findModal(this.activeArea) != -1)
|
||||||
|
this.toggleModal();
|
||||||
|
this.toggleArea();
|
||||||
|
this.activeArea = null;
|
||||||
|
} else {
|
||||||
|
// avoid to deal with Meta changes (global.display/global.screen)
|
||||||
|
let currentIndex = Main.layoutManager.monitors.indexOf(Main.layoutManager.currentMonitor);
|
||||||
|
this.activeArea = this.areas[currentIndex];
|
||||||
|
this.toggleArea();
|
||||||
|
if (!this.toggleModal()) {
|
||||||
|
this.toggleArea();
|
||||||
|
this.activeArea = null;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.activeArea.enterDrawingMode();
|
||||||
|
this.osdDisabled = Me.settings.get_boolean('osd-disabled');
|
||||||
|
// <span size="medium"> is a clutter/mutter 3.38 bug workaround: https://gitlab.gnome.org/GNOME/mutter/-/issues/1467
|
||||||
|
// Translators: %s is a key label
|
||||||
|
let label = `<small>${_("Press <i>%s</i> for help").format(this.activeArea.helper.helpKeyLabel)}</small>\n\n<span size="medium">${_("Entering drawing mode")}</span>`;
|
||||||
|
this.showOsd(null, Files.Icons.ENTER, label, null, null, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.indicator)
|
||||||
|
this.indicator.sync(Boolean(this.activeArea));
|
||||||
|
},
|
||||||
|
|
||||||
|
updateActionMode: function() {
|
||||||
|
Main.actionMode = (this.activeArea.isWriting ? WRITING_ACTION_MODE : DRAWING_ACTION_MODE) | Shell.ActionMode.NORMAL;
|
||||||
|
},
|
||||||
|
|
||||||
|
// Use level -1 to set no level through a signal.
|
||||||
|
showOsd: function(emitter, icon, label, color, level, long) {
|
||||||
let activeIndex = this.areas.indexOf(this.activeArea);
|
let activeIndex = this.areas.indexOf(this.activeArea);
|
||||||
if (activeIndex != -1)
|
if (activeIndex == -1 || this.osdDisabled)
|
||||||
Main.osdWindowManager.show(activeIndex, this.enterGicon, label, level, maxLevel);
|
return;
|
||||||
|
|
||||||
|
let hideTimeoutSave;
|
||||||
|
if (long && GS_VERSION >= '3.28.0') {
|
||||||
|
hideTimeoutSave = OsdWindow.HIDE_TIMEOUT;
|
||||||
|
OsdWindow.HIDE_TIMEOUT = HIDE_TIMEOUT_LONG;
|
||||||
|
}
|
||||||
|
|
||||||
|
let maxLevel;
|
||||||
|
if (level == -1)
|
||||||
|
level = null;
|
||||||
|
else if (level > 100)
|
||||||
|
maxLevel = 2;
|
||||||
|
|
||||||
|
// GS 3.32- : bar from 0 to 100
|
||||||
|
// GS 3.34+ : bar from 0 to 1
|
||||||
|
if (level && GS_VERSION > '3.33.0')
|
||||||
|
level = level / 100;
|
||||||
|
|
||||||
|
if (!icon)
|
||||||
|
icon = Files.Icons.ENTER;
|
||||||
|
|
||||||
|
let osdWindow = Main.osdWindowManager._osdWindows[activeIndex];
|
||||||
|
|
||||||
|
try {
|
||||||
|
if (!this.osdWindowConstraint)
|
||||||
|
this.osdWindowConstraint = new OsdWindowConstraint();
|
||||||
|
|
||||||
|
if (!osdWindow._box.get_constraint(this.osdWindowConstraint.constructor.name)) {
|
||||||
|
osdWindow._box.remove_constraint(osdWindow._boxConstraint);
|
||||||
|
osdWindow._box.add_constraint_with_name(this.osdWindowConstraint.constructor.name, this.osdWindowConstraint);
|
||||||
|
this.osdWindowConstraint._minSize = osdWindow._boxConstraint._minSize;
|
||||||
|
osdWindow._boxConstraintOld = osdWindow._boxConstraint;
|
||||||
|
osdWindow._boxConstraint = this.osdWindowConstraint;
|
||||||
|
let osdConstraintHandler = osdWindow._box.connect('notify::mapped', (box) => {
|
||||||
|
if (!box.mapped) {
|
||||||
|
osdWindow._boxConstraint = osdWindow._boxConstraintOld;
|
||||||
|
osdWindow._boxConstraint._minSize = this.osdWindowConstraint._minSize;
|
||||||
|
osdWindow._box.remove_constraint(this.osdWindowConstraint);
|
||||||
|
osdWindow._box.add_constraint(osdWindow._boxConstraint);
|
||||||
|
osdWindow._box.disconnect(osdConstraintHandler);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} catch(e) {
|
||||||
|
logError(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
Main.osdWindowManager.show(activeIndex, icon, label, level, maxLevel);
|
||||||
|
osdWindow._label.get_clutter_text().set_use_markup(true);
|
||||||
|
|
||||||
|
if (color) {
|
||||||
|
osdWindow._icon.set_style(`color:${color};`);
|
||||||
|
osdWindow._label.set_style(`color:${color};`);
|
||||||
|
let osdColorChangedHandler = osdWindow._label.connect('notify::text', () => {
|
||||||
|
osdWindow._icon.set_style(`color:;`);
|
||||||
|
osdWindow._label.set_style(`color:;`);
|
||||||
|
osdWindow._label.disconnect(osdColorChangedHandler);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (level === 0) {
|
||||||
|
osdWindow._label.add_style_class_name(WARNING_COLOR_STYLE_CLASS_NAME);
|
||||||
|
// the same label is shared by all GS OSD so the style must be removed after being used
|
||||||
|
let osdLabelChangedHandler = osdWindow._label.connect('notify::text', () => {
|
||||||
|
osdWindow._label.remove_style_class_name(WARNING_COLOR_STYLE_CLASS_NAME);
|
||||||
|
osdWindow._label.disconnect(osdLabelChangedHandler);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (hideTimeoutSave)
|
||||||
|
OsdWindow.HIDE_TIMEOUT = hideTimeoutSave;
|
||||||
|
},
|
||||||
|
|
||||||
|
setCursor: function(sourceActor_, cursorName) {
|
||||||
|
// check display or screen (API changes)
|
||||||
|
if (global.display.set_cursor)
|
||||||
|
global.display.set_cursor(Meta.Cursor[cursorName]);
|
||||||
|
else if (global.screen && global.screen.set_cursor)
|
||||||
|
global.screen.set_cursor(Meta.Cursor[cursorName]);
|
||||||
},
|
},
|
||||||
|
|
||||||
removeAreas: function() {
|
removeAreas: function() {
|
||||||
for (let i = 0; i < this.areas.length; i++) {
|
for (let i = 0; i < this.areas.length; i++) {
|
||||||
let area = this.areas[i];
|
let area = this.areas[i];
|
||||||
Main.uiGroup.remove_actor(area.get_parent());
|
area.disconnect(area.leaveDrawingHandler);
|
||||||
area.emitter.disconnect(this.drawingHandlers[i]);
|
area.disconnect(area.updateActionModeHandler);
|
||||||
area.disable();
|
area.disconnect(area.showOsdHandler);
|
||||||
area.get_parent().destroy();
|
area.destroy();
|
||||||
}
|
}
|
||||||
this.areas = [];
|
this.areas = [];
|
||||||
this.drawingHandlers = [];
|
|
||||||
},
|
},
|
||||||
|
|
||||||
disable: function() {
|
disable: function() {
|
||||||
if (this.stylesheetChangedHandler) {
|
if (this.monitorChangedHandler) {
|
||||||
this.stylesheetMonitor.disconnect(this.stylesheetChangedHandler);
|
Main.layoutManager.disconnect(this.monitorChangedHandler);
|
||||||
this.stylesheetChangedHandler = null;
|
this.monitorChangedHandler = null;
|
||||||
}
|
}
|
||||||
|
if (this.indicatorSettingHandler) {
|
||||||
|
Me.settings.disconnect(this.indicatorSettingHandler);
|
||||||
|
this.indicatorSettingHandler = null;
|
||||||
|
}
|
||||||
|
if (this.desktopSettingHandler) {
|
||||||
|
Me.settings.disconnect(this.desktopSettingHandler);
|
||||||
|
this.desktopSettingHandler = null;
|
||||||
|
}
|
||||||
|
if (this.persistentOverTogglesSettingHandler) {
|
||||||
|
Me.settings.disconnect(this.persistentOverTogglesSettingHandler);
|
||||||
|
this.persistentOverTogglesSettingHandler = null;
|
||||||
|
}
|
||||||
|
if (this.persistentOverRestartsSettingHandler) {
|
||||||
|
Me.settings.disconnect(this.persistentOverRestartsSettingHandler);
|
||||||
|
this.persistentOverRestartsSettingHandler = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (this.activeArea)
|
if (this.activeArea)
|
||||||
this.toggleDrawing();
|
this.toggleDrawing();
|
||||||
Main.wm.removeKeybinding('toggle-drawing');
|
Main.wm.removeKeybinding('toggle-drawing');
|
||||||
Main.wm.removeKeybinding('erase-drawing');
|
Main.wm.removeKeybinding('toggle-modal');
|
||||||
|
Main.wm.removeKeybinding('erase-drawings');
|
||||||
this.removeAreas();
|
this.removeAreas();
|
||||||
|
Files.Images.disable();
|
||||||
|
Files.Jsons.disable();
|
||||||
|
if (this.indicator)
|
||||||
|
this.indicator.disable();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// The same as the original, without forcing a ratio of 1.
|
||||||
|
const OsdWindowConstraint = new Lang.Class({
|
||||||
|
Name: `${UUID}-OsdWindowConstraint`,
|
||||||
|
Extends: OsdWindow.OsdWindowConstraint,
|
||||||
|
|
||||||
|
vfunc_update_allocation: function(actor, actorBox) {
|
||||||
|
// Clutter will adjust the allocation for margins,
|
||||||
|
// so add it to our minimum size
|
||||||
|
let minSize = this._minSize + actor.margin_top + actor.margin_bottom;
|
||||||
|
let [width, height] = actorBox.get_size();
|
||||||
|
|
||||||
|
// DO NOT Enforce a ratio of 1
|
||||||
|
let newWidth = Math.ceil(Math.max(minSize, width, height));
|
||||||
|
let newHeight = Math.ceil(Math.max(minSize, height));
|
||||||
|
actorBox.set_size(newWidth, newHeight);
|
||||||
|
|
||||||
|
// Recenter
|
||||||
|
let [x, y] = actorBox.get_origin();
|
||||||
|
actorBox.set_origin(Math.ceil(x + width / 2 - newWidth / 2),
|
||||||
|
Math.ceil(y + height / 2 - newHeight / 2));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const DrawingIndicator = new Lang.Class({
|
||||||
|
Name: `${UUID}-Indicator`,
|
||||||
|
|
||||||
|
_init: function() {
|
||||||
|
let [menuAlignment, dontCreateMenu] = [0, true];
|
||||||
|
this.button = new PanelMenu.Button(menuAlignment, "Drawing Indicator", dontCreateMenu);
|
||||||
|
this.buttonActor = GS_VERSION < '3.33.0' ? this.button.actor: this.button;
|
||||||
|
Main.panel.addToStatusArea('draw-on-your-screen-indicator', this.button);
|
||||||
|
|
||||||
|
this.icon = new St.Icon({ icon_name: 'applications-graphics-symbolic',
|
||||||
|
style_class: 'system-status-icon screencast-indicator' });
|
||||||
|
this.buttonActor.add_child(this.icon);
|
||||||
|
this.buttonActor.visible = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
sync: function(visible) {
|
||||||
|
this.buttonActor.visible = visible;
|
||||||
|
},
|
||||||
|
|
||||||
|
disable: function() {
|
||||||
|
this.button.destroy();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,608 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019 Abakkk
|
||||||
|
*
|
||||||
|
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2019 Abakkk
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* jslint esversion: 6 */
|
||||||
|
/* exported Icons, Image, Images, Json, Jsons, getDateString, saveSvg */
|
||||||
|
|
||||||
|
const ByteArray = imports.byteArray;
|
||||||
|
const Gdk = imports.gi.Gdk;
|
||||||
|
const GdkPixbuf = imports.gi.GdkPixbuf;
|
||||||
|
const Gio = imports.gi.Gio;
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
|
const UUID = Me.uuid.replace(/@/gi, '_at_').replace(/[^a-z0-9+_-]/gi, '_');
|
||||||
|
const EXAMPLE_IMAGE_DIRECTORY = Me.dir.get_child('data').get_child('images');
|
||||||
|
const DEFAULT_USER_IMAGE_LOCATION = GLib.build_filenamev([GLib.get_user_data_dir(), Me.metadata['data-dir'], 'images']);
|
||||||
|
const Clipboard = St.Clipboard.get_default();
|
||||||
|
const CLIPBOARD_TYPE = St.ClipboardType.CLIPBOARD;
|
||||||
|
const ICON_DIR = Me.dir.get_child('data').get_child('icons');
|
||||||
|
const ICON_NAMES = [
|
||||||
|
'arc', 'color', 'dashed-line', 'document-export', 'fillrule-evenodd', 'fillrule-nonzero', 'fill', 'full-line', 'linecap', 'linejoin', 'palette', 'smooth', 'stroke',
|
||||||
|
'tool-ellipse', 'tool-line', 'tool-mirror', 'tool-move', 'tool-none', 'tool-polygon', 'tool-polyline', 'tool-rectangle', 'tool-resize',
|
||||||
|
];
|
||||||
|
const ThemedIconName = {
|
||||||
|
COLOR_PICKER: 'color-select-symbolic',
|
||||||
|
ENTER: 'applications-graphics', LEAVE: 'application-exit',
|
||||||
|
GRAB: 'input-touchpad', UNGRAB: 'touchpad-disabled',
|
||||||
|
OPEN: 'document-open', SAVE: 'document-save',
|
||||||
|
FONT_FAMILY: 'font-x-generic', FONT_STYLE: 'format-text-italic', FONT_WEIGHT:'format-text-bold',
|
||||||
|
LEFT_ALIGNED: 'format-justify-left', CENTERED: 'format-justify-center',RIGHT_ALIGNED: 'format-justify-right',
|
||||||
|
TOOL_IMAGE: 'insert-image', TOOL_TEXT: 'insert-text',
|
||||||
|
};
|
||||||
|
|
||||||
|
var Icons = {
|
||||||
|
get FAKE() {
|
||||||
|
if (!this._fake) {
|
||||||
|
let bytes = new GLib.Bytes('<svg/>');
|
||||||
|
this._fake = Gio.BytesIcon.new(bytes);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._fake;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ICON_NAMES.forEach(name => {
|
||||||
|
Object.defineProperty(Icons, name.toUpperCase().replace(/-/gi, '_'), {
|
||||||
|
get: function() {
|
||||||
|
if (!this[`_${name}`]) {
|
||||||
|
let file = Gio.File.new_for_path(ICON_DIR.get_child(`${name}-symbolic.svg`).get_path());
|
||||||
|
this[`_${name}`] = file.query_exists(null) ? new Gio.FileIcon({ file }) : new Gio.ThemedIcon({ name: 'action-unavailable-symbolic' });
|
||||||
|
}
|
||||||
|
return this[`_${name}`];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
Object.keys(ThemedIconName).forEach(key => {
|
||||||
|
Object.defineProperty(Icons, key, {
|
||||||
|
get: function() {
|
||||||
|
if (!this[`_${key}`])
|
||||||
|
this[`_${key}`] = new Gio.ThemedIcon({ name: `${ThemedIconName[key]}-symbolic` });
|
||||||
|
return this[`_${key}`];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
const replaceColor = function (contents, color) {
|
||||||
|
if (contents instanceof Uint8Array)
|
||||||
|
contents = ByteArray.toString(contents);
|
||||||
|
else
|
||||||
|
contents = contents.toString();
|
||||||
|
|
||||||
|
return contents.replace(/fill(?=="transparent"|="none"|:transparent|:none)/gi, 'filll')
|
||||||
|
.replace(/fill="[^"]+"/gi, `fill="${color}"`)
|
||||||
|
.replace(/fill:[^";]+/gi, `fill:${color};`)
|
||||||
|
.replace(/filll/gi, 'fill');
|
||||||
|
};
|
||||||
|
|
||||||
|
// Wrapper around image data. If not subclassed, it is used when loading in the area an image element for a drawing file (.json)
|
||||||
|
// and it takes { displayName, contentType, base64, hash } as params.
|
||||||
|
var Image = new Lang.Class({
|
||||||
|
Name: `${UUID}-Image`,
|
||||||
|
|
||||||
|
_init: function(params) {
|
||||||
|
for (let key in params)
|
||||||
|
this[key] = params[key];
|
||||||
|
},
|
||||||
|
|
||||||
|
toString: function() {
|
||||||
|
return this.displayName;
|
||||||
|
},
|
||||||
|
|
||||||
|
toJSON: function() {
|
||||||
|
return {
|
||||||
|
displayName: this.displayName,
|
||||||
|
contentType: this.contentType,
|
||||||
|
base64: this.base64,
|
||||||
|
hash: this.hash
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
get bytes() {
|
||||||
|
if (!this._bytes)
|
||||||
|
this._bytes = new GLib.Bytes(GLib.base64_decode(this.base64));
|
||||||
|
return this._bytes;
|
||||||
|
},
|
||||||
|
|
||||||
|
get base64() {
|
||||||
|
if (!this._base64)
|
||||||
|
this._base64 = GLib.base64_encode(this.bytes.get_data());
|
||||||
|
return this._base64;
|
||||||
|
},
|
||||||
|
|
||||||
|
set base64(base64) {
|
||||||
|
this._base64 = base64;
|
||||||
|
},
|
||||||
|
|
||||||
|
getBase64ForColor: function(color) {
|
||||||
|
if (!color || this.contentType != 'image/svg+xml')
|
||||||
|
return this.base64;
|
||||||
|
|
||||||
|
let contents = GLib.base64_decode(this.base64);
|
||||||
|
return GLib.base64_encode(replaceColor(contents, color));
|
||||||
|
},
|
||||||
|
|
||||||
|
// hash is not used
|
||||||
|
get hash() {
|
||||||
|
if (!this._hash)
|
||||||
|
this._hash = this.bytes.hash();
|
||||||
|
return this._hash;
|
||||||
|
},
|
||||||
|
|
||||||
|
set hash(hash) {
|
||||||
|
this._hash = hash;
|
||||||
|
},
|
||||||
|
|
||||||
|
getBytesForColor: function(color) {
|
||||||
|
if (!color || this.contentType != 'image/svg+xml')
|
||||||
|
return this.bytes;
|
||||||
|
|
||||||
|
let contents = this.bytes.get_data();
|
||||||
|
return new GLib.Bytes(replaceColor(contents, color));
|
||||||
|
},
|
||||||
|
|
||||||
|
getPixbuf: function(color) {
|
||||||
|
if (color) {
|
||||||
|
let stream = Gio.MemoryInputStream.new_from_bytes(this.getBytesForColor(color));
|
||||||
|
let pixbuf = GdkPixbuf.Pixbuf.new_from_stream(stream, null);
|
||||||
|
stream.close(null);
|
||||||
|
return pixbuf;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!this._pixbuf) {
|
||||||
|
let stream = Gio.MemoryInputStream.new_from_bytes(this.bytes);
|
||||||
|
this._pixbuf = GdkPixbuf.Pixbuf.new_from_stream(stream, null);
|
||||||
|
stream.close(null);
|
||||||
|
}
|
||||||
|
return this._pixbuf;
|
||||||
|
},
|
||||||
|
|
||||||
|
getPixbufAtScale: function(width, height, color) {
|
||||||
|
let stream = Gio.MemoryInputStream.new_from_bytes(this.getBytesForColor(color));
|
||||||
|
let pixbuf = GdkPixbuf.Pixbuf.new_from_stream_at_scale(stream, width, height, true, null);
|
||||||
|
stream.close(null);
|
||||||
|
return pixbuf;
|
||||||
|
},
|
||||||
|
|
||||||
|
setCairoSource: function(cr, x, y, width, height, preserveAspectRatio, color) {
|
||||||
|
let pixbuf = preserveAspectRatio ? this.getPixbufAtScale(width, height, color)
|
||||||
|
: this.getPixbuf(color).scale_simple(width, height, GdkPixbuf.InterpType.BILINEAR);
|
||||||
|
Gdk.cairo_set_source_pixbuf(cr, pixbuf, x, y);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add a gicon generator to Image. It is used with image files and it takes { file, info } as params.
|
||||||
|
const ImageWithGicon = new Lang.Class({
|
||||||
|
Name: `${UUID}-ImageWithGicon`,
|
||||||
|
Extends: Image,
|
||||||
|
|
||||||
|
get displayName() {
|
||||||
|
return this.info.get_display_name();
|
||||||
|
},
|
||||||
|
|
||||||
|
get contentType() {
|
||||||
|
return this.info.get_content_type();
|
||||||
|
},
|
||||||
|
|
||||||
|
get thumbnailFile() {
|
||||||
|
if (!this._thumbnailFile) {
|
||||||
|
if (this.info.has_attribute('thumbnail::path') && this.info.get_attribute_boolean('thumbnail::is-valid')) {
|
||||||
|
let thumbnailPath = this.info.get_attribute_as_string('thumbnail::path');
|
||||||
|
this._thumbnailFile = Gio.File.new_for_path(thumbnailPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this._thumbnailFile || null;
|
||||||
|
},
|
||||||
|
|
||||||
|
get gicon() {
|
||||||
|
if (!this._gicon)
|
||||||
|
this._gicon = new Gio.FileIcon({ file: this.thumbnailFile || this.file });
|
||||||
|
return this._gicon;
|
||||||
|
},
|
||||||
|
|
||||||
|
// use only thumbnails in menu (memory)
|
||||||
|
get thumbnailGicon() {
|
||||||
|
if (this.contentType != 'image/svg+xml' && !this.thumbnailFile)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
return this.gicon;
|
||||||
|
},
|
||||||
|
|
||||||
|
get bytes() {
|
||||||
|
if (!this._bytes) {
|
||||||
|
try {
|
||||||
|
// load_bytes available in GLib 2.56+
|
||||||
|
this._bytes = this.file.load_bytes(null)[0];
|
||||||
|
} catch(e) {
|
||||||
|
let [, contents] = this.file.load_contents(null);
|
||||||
|
if (contents instanceof Uint8Array)
|
||||||
|
this._bytes = ByteArray.toGBytes(contents);
|
||||||
|
else
|
||||||
|
this._bytes = contents.toGBytes();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return this._bytes;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// It is directly generated from a Json object, without an image file. It takes { bytes, displayName, gicon } as params.
|
||||||
|
const ImageFromJson = new Lang.Class({
|
||||||
|
Name: `${UUID}-ImageFromJson`,
|
||||||
|
Extends: Image,
|
||||||
|
contentType: 'image/svg+xml',
|
||||||
|
|
||||||
|
get bytes() {
|
||||||
|
return this._bytes;
|
||||||
|
},
|
||||||
|
|
||||||
|
set bytes(bytes) {
|
||||||
|
this._bytes = bytes;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Access images with getPrevious, getNext, getSorted or by iterating over it.
|
||||||
|
var Images = {
|
||||||
|
_images: [],
|
||||||
|
_clipboardImages: [],
|
||||||
|
_upToDate: false,
|
||||||
|
|
||||||
|
disable: function() {
|
||||||
|
this._images = [];
|
||||||
|
this._clipboardImages = [];
|
||||||
|
this._upToDate = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_clipboardImagesContains: function(file) {
|
||||||
|
return this._clipboardImages.some(image => image.file.equal(file));
|
||||||
|
},
|
||||||
|
|
||||||
|
// Firstly iterate over the extension directory that contains Example.svg,
|
||||||
|
// secondly iterate over the directory that was configured by the user in prefs,
|
||||||
|
// finally iterate over the images pasted from the clipboard.
|
||||||
|
[Symbol.iterator]: function() {
|
||||||
|
if (this._upToDate)
|
||||||
|
return this._images.concat(this._clipboardImages)[Symbol.iterator]();
|
||||||
|
|
||||||
|
this._upToDate = true;
|
||||||
|
let oldImages = this._images;
|
||||||
|
let newImages = this._images = [];
|
||||||
|
let clipboardImagesContains = this._clipboardImagesContains.bind(this);
|
||||||
|
let clipboardIterator = this._clipboardImages[Symbol.iterator]();
|
||||||
|
|
||||||
|
return {
|
||||||
|
getExampleEnumerator: function() {
|
||||||
|
try {
|
||||||
|
return EXAMPLE_IMAGE_DIRECTORY.enumerate_children('standard::,thumbnail::', Gio.FileQueryInfoFlags.NONE, null);
|
||||||
|
} catch(e) {
|
||||||
|
return this.getUserEnumerator();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
getUserEnumerator: function() {
|
||||||
|
try {
|
||||||
|
let userLocation = Me.drawingSettings.get_string('image-location') || DEFAULT_USER_IMAGE_LOCATION;
|
||||||
|
let userDirectory = Gio.File.new_for_commandline_arg(userLocation);
|
||||||
|
return userDirectory.enumerate_children('standard::,thumbnail::', Gio.FileQueryInfoFlags.NONE, null);
|
||||||
|
} catch(e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
get enumerator() {
|
||||||
|
if (this._enumerator === undefined)
|
||||||
|
this._enumerator = this.getExampleEnumerator();
|
||||||
|
else if (this._enumerator && this._enumerator.get_container().equal(EXAMPLE_IMAGE_DIRECTORY) && this._enumerator.is_closed())
|
||||||
|
this._enumerator = this.getUserEnumerator();
|
||||||
|
else if (this._enumerator && this._enumerator.is_closed())
|
||||||
|
this._enumerator = null;
|
||||||
|
|
||||||
|
return this._enumerator;
|
||||||
|
},
|
||||||
|
|
||||||
|
next: function() {
|
||||||
|
if (!this.enumerator)
|
||||||
|
return clipboardIterator.next();
|
||||||
|
|
||||||
|
let info = this.enumerator.next_file(null);
|
||||||
|
if (!info) {
|
||||||
|
this.enumerator.close(null);
|
||||||
|
return this.next();
|
||||||
|
}
|
||||||
|
|
||||||
|
let file = this.enumerator.get_child(info);
|
||||||
|
|
||||||
|
if (info.get_content_type().indexOf('image') == 0 && !clipboardImagesContains(file)) {
|
||||||
|
let image = oldImages.find(oldImage => oldImage.file.equal(file)) || new ImageWithGicon({ file, info });
|
||||||
|
newImages.push(image);
|
||||||
|
return { value: image, done: false };
|
||||||
|
} else {
|
||||||
|
return this.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
getSorted: function() {
|
||||||
|
return [...this].sort((a, b) => a.toString().localeCompare(b.toString()));
|
||||||
|
},
|
||||||
|
|
||||||
|
getNext: function(currentImage) {
|
||||||
|
let images = this.getSorted();
|
||||||
|
let index = currentImage && currentImage.file ? images.findIndex(image => image.file.equal(currentImage.file)) : -1;
|
||||||
|
return images[index == images.length - 1 ? 0 : index + 1] || null;
|
||||||
|
},
|
||||||
|
|
||||||
|
getPrevious: function(currentImage) {
|
||||||
|
let images = this.getSorted();
|
||||||
|
let index = currentImage && currentImage.file ? images.findIndex(image => image.file.equal(currentImage.file)) : -1;
|
||||||
|
return images[index <= 0 ? images.length - 1 : index - 1] || null;
|
||||||
|
},
|
||||||
|
|
||||||
|
reset: function() {
|
||||||
|
this._upToDate = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
addImagesFromClipboard: function(callback) {
|
||||||
|
Clipboard.get_text(CLIPBOARD_TYPE, (clipboard, text) => {
|
||||||
|
if (!text)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// Since 3.38 there is a line terminator character, that has to be removed with .trim().
|
||||||
|
let lines = text.split('\n').map(line => line.trim());
|
||||||
|
if (lines[0] == 'x-special/nautilus-clipboard')
|
||||||
|
lines = lines.slice(2);
|
||||||
|
|
||||||
|
let images = lines.filter(line => !!line)
|
||||||
|
.map(line => Gio.File.new_for_commandline_arg(line))
|
||||||
|
.filter(file => file.query_exists(null))
|
||||||
|
.map(file => [file, file.query_info('standard::,thumbnail::', Gio.FileQueryInfoFlags.NONE, null)])
|
||||||
|
.filter(pair => pair[1].get_content_type().indexOf('image') == 0)
|
||||||
|
.map(pair => new ImageWithGicon({ file: pair[0], info: pair[1] }));
|
||||||
|
|
||||||
|
// Prevent duplicated
|
||||||
|
images.filter(image => !this._clipboardImagesContains(image.file))
|
||||||
|
.forEach(image => this._clipboardImages.push(image));
|
||||||
|
|
||||||
|
if (images.length) {
|
||||||
|
this.reset();
|
||||||
|
let lastFile = images[images.length - 1].file;
|
||||||
|
callback(this._clipboardImages.find(image => image.file.equal(lastFile)));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// Wrapper around a json file (drawing saves).
|
||||||
|
var Json = new Lang.Class({
|
||||||
|
Name: `${UUID}-Json`,
|
||||||
|
|
||||||
|
_init: function(params) {
|
||||||
|
for (let key in params)
|
||||||
|
this[key] = params[key];
|
||||||
|
},
|
||||||
|
|
||||||
|
get isPersistent() {
|
||||||
|
return this.name == Me.metadata['persistent-file-name'];
|
||||||
|
},
|
||||||
|
|
||||||
|
toString: function() {
|
||||||
|
return this.displayName || this.name;
|
||||||
|
},
|
||||||
|
|
||||||
|
delete: function() {
|
||||||
|
this.file.delete(null);
|
||||||
|
},
|
||||||
|
|
||||||
|
get file() {
|
||||||
|
if (!this._file)
|
||||||
|
this._file = Gio.File.new_for_path(GLib.build_filenamev([GLib.get_user_data_dir(), Me.metadata['data-dir'], `${this.name}.json`]));
|
||||||
|
|
||||||
|
return this._file;
|
||||||
|
},
|
||||||
|
|
||||||
|
set file(file) {
|
||||||
|
this._file = file;
|
||||||
|
},
|
||||||
|
|
||||||
|
get contents() {
|
||||||
|
if (this._contents === undefined) {
|
||||||
|
try {
|
||||||
|
[, this._contents] = this.file.load_contents(null);
|
||||||
|
if (this._contents instanceof Uint8Array)
|
||||||
|
this._contents = ByteArray.toString(this._contents);
|
||||||
|
} catch(e) {
|
||||||
|
this._contents = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._contents;
|
||||||
|
},
|
||||||
|
|
||||||
|
set contents(contents) {
|
||||||
|
if (this.isPersistent && (this.contents == contents || !this.contents && contents == '[]'))
|
||||||
|
return;
|
||||||
|
|
||||||
|
try {
|
||||||
|
this.file.replace_contents(contents, null, false, Gio.FileCreateFlags.NONE, null);
|
||||||
|
} catch(e) {
|
||||||
|
this.file.get_parent().make_directory_with_parents(null);
|
||||||
|
this.file.replace_contents(contents, null, false, Gio.FileCreateFlags.NONE, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
this._contents = contents;
|
||||||
|
},
|
||||||
|
|
||||||
|
addSvgContents: function(getGiconSvgContent, getImageSvgContent) {
|
||||||
|
let giconSvgBytes = new GLib.Bytes(getGiconSvgContent());
|
||||||
|
this.gicon = Gio.BytesIcon.new(giconSvgBytes);
|
||||||
|
this.getImageSvgBytes = () => new GLib.Bytes(getImageSvgContent());
|
||||||
|
},
|
||||||
|
|
||||||
|
get image() {
|
||||||
|
if (!this._image)
|
||||||
|
this._image = new ImageFromJson({ bytes: this.getImageSvgBytes(), gicon: this.gicon, displayName: this.displayName });
|
||||||
|
|
||||||
|
return this._image;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// Access jsons with getPersistent, getDated, getNamed, getPrevious, getNext, getSorted or by iterating over it.
|
||||||
|
var Jsons = {
|
||||||
|
_jsons: [],
|
||||||
|
_upToDate: false,
|
||||||
|
|
||||||
|
disable: function() {
|
||||||
|
if (this._monitor) {
|
||||||
|
this._monitor.disconnect(this._monitorHandler);
|
||||||
|
this._monitor.cancel();
|
||||||
|
}
|
||||||
|
|
||||||
|
delete this._monitor;
|
||||||
|
delete this._persistent;
|
||||||
|
|
||||||
|
this._jsons = [];
|
||||||
|
this._upToDate = false;
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateMonitor: function() {
|
||||||
|
if (this._monitor)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let directory = Gio.File.new_for_path(GLib.build_filenamev([GLib.get_user_data_dir(), Me.metadata['data-dir']]));
|
||||||
|
// It is important to specify that the file to monitor is a directory because maybe the directory does not exist yet
|
||||||
|
// and remove events would not be monitored.
|
||||||
|
this._monitor = directory.monitor_directory(Gio.FileMonitorFlags.NONE, null);
|
||||||
|
this._monitorHandler = this._monitor.connect('changed', (monitor, file) => {
|
||||||
|
if (file.get_basename() != `${Me.metadata['persistent-file-name']}.json` && file.get_basename().indexOf('.goutputstream'))
|
||||||
|
this.reset();
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
[Symbol.iterator]: function() {
|
||||||
|
if (this._upToDate)
|
||||||
|
return this._jsons[Symbol.iterator]();
|
||||||
|
|
||||||
|
this._updateMonitor();
|
||||||
|
this._upToDate = true;
|
||||||
|
let newJsons = this._jsons = [];
|
||||||
|
|
||||||
|
return {
|
||||||
|
get enumerator() {
|
||||||
|
if (this._enumerator === undefined) {
|
||||||
|
try {
|
||||||
|
let directory = Gio.File.new_for_path(GLib.build_filenamev([GLib.get_user_data_dir(), Me.metadata['data-dir']]));
|
||||||
|
this._enumerator = directory.enumerate_children('standard::name,standard::display-name,standard::content-type,time::modified', Gio.FileQueryInfoFlags.NONE, null);
|
||||||
|
} catch(e) {
|
||||||
|
this._enumerator = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._enumerator;
|
||||||
|
},
|
||||||
|
|
||||||
|
next: function() {
|
||||||
|
if (!this.enumerator || this.enumerator.is_closed())
|
||||||
|
return { done: true };
|
||||||
|
|
||||||
|
let info = this.enumerator.next_file(null);
|
||||||
|
if (!info) {
|
||||||
|
this.enumerator.close(null);
|
||||||
|
return this.next();
|
||||||
|
}
|
||||||
|
|
||||||
|
let file = this.enumerator.get_child(info);
|
||||||
|
|
||||||
|
if (info.get_content_type().indexOf('json') != -1 && info.get_name() != `${Me.metadata['persistent-file-name']}.json`) {
|
||||||
|
let json = new Json({
|
||||||
|
file, name: info.get_name().slice(0, -5),
|
||||||
|
displayName: info.get_display_name().slice(0, -5),
|
||||||
|
// info.get_modification_date_time: Gio 2.62+
|
||||||
|
modificationUnixTime: info.get_attribute_uint64('time::modified')
|
||||||
|
});
|
||||||
|
|
||||||
|
newJsons.push(json);
|
||||||
|
return { value: json, done: false };
|
||||||
|
} else {
|
||||||
|
return this.next();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
getSorted: function() {
|
||||||
|
return [...this].sort((a, b) => b.modificationUnixTime - a.modificationUnixTime);
|
||||||
|
},
|
||||||
|
|
||||||
|
getNext: function(currentJson) {
|
||||||
|
let jsons = this.getSorted();
|
||||||
|
let index = currentJson ? jsons.findIndex(json => json.name == currentJson.name) : -1;
|
||||||
|
return jsons[index == jsons.length - 1 ? 0 : index + 1] || null;
|
||||||
|
},
|
||||||
|
|
||||||
|
getPrevious: function(currentJson) {
|
||||||
|
let jsons = this.getSorted();
|
||||||
|
let index = currentJson ? jsons.findIndex(json => json.name == currentJson.name) : -1;
|
||||||
|
return jsons[index <= 0 ? jsons.length - 1 : index - 1] || null;
|
||||||
|
},
|
||||||
|
|
||||||
|
getPersistent: function() {
|
||||||
|
if (!this._persistent)
|
||||||
|
this._persistent = new Json({ name: Me.metadata['persistent-file-name'] });
|
||||||
|
|
||||||
|
return this._persistent;
|
||||||
|
},
|
||||||
|
|
||||||
|
getDated: function() {
|
||||||
|
return new Json({ name: getDateString() });
|
||||||
|
},
|
||||||
|
|
||||||
|
getNamed: function(name) {
|
||||||
|
return [...this].find(json => json.name == name) || new Json({ name });
|
||||||
|
},
|
||||||
|
|
||||||
|
reset: function() {
|
||||||
|
this._upToDate = false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var getDateString = function() {
|
||||||
|
let date = GLib.DateTime.new_now_local();
|
||||||
|
return `${date.format("%F")} ${date.format("%T")}`;
|
||||||
|
};
|
||||||
|
|
||||||
|
var saveSvg = function(content) {
|
||||||
|
let filename = `${Me.metadata['svg-file-name']} ${getDateString()}.svg`;
|
||||||
|
let dir = GLib.get_user_special_dir(GLib.UserDirectory.DIRECTORY_PICTURES);
|
||||||
|
let path = GLib.build_filenamev([dir, filename]);
|
||||||
|
let file = Gio.File.new_for_path(path);
|
||||||
|
if (file.query_exists(null))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
return file.replace_contents(content, null, false, Gio.FileCreateFlags.NONE, null)[0];
|
||||||
|
} catch(e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
@ -0,0 +1,95 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019 Abakkk
|
||||||
|
*
|
||||||
|
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2019 Abakkk
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* jslint esversion: 6 */
|
||||||
|
/* exported parseFile */
|
||||||
|
|
||||||
|
const ByteArray = imports.byteArray;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* [
|
||||||
|
* [
|
||||||
|
* 'palette name 1', // a palette for each column
|
||||||
|
* [
|
||||||
|
* 'rgb(...)',
|
||||||
|
* 'rgb(...):color display name', // the optional name separated with ':'
|
||||||
|
* ...
|
||||||
|
* ]
|
||||||
|
* ],
|
||||||
|
* [
|
||||||
|
* 'palette name 2',
|
||||||
|
* [...]
|
||||||
|
* ],
|
||||||
|
* ...
|
||||||
|
* ]
|
||||||
|
*/
|
||||||
|
|
||||||
|
function parse(contents) {
|
||||||
|
let lines = contents.split('\n');
|
||||||
|
let line, name, columnNumber;
|
||||||
|
|
||||||
|
line = lines.shift();
|
||||||
|
if (!line || !line.startsWith('GIMP Palette'))
|
||||||
|
log("Missing magic header");
|
||||||
|
|
||||||
|
line = lines.shift();
|
||||||
|
if (line.startsWith('Name:')) {
|
||||||
|
name = line.slice(5).trim() || file.get_basename();
|
||||||
|
line = lines.shift();
|
||||||
|
}
|
||||||
|
if (line.startsWith('Columns:')) {
|
||||||
|
columnNumber = Number(line.slice(8).trim()) || 1;
|
||||||
|
line = lines.shift();
|
||||||
|
}
|
||||||
|
|
||||||
|
let columns = (new Array(columnNumber)).fill(null).map(() => []);
|
||||||
|
|
||||||
|
lines.forEach((line, index) => {
|
||||||
|
if (!line || line.startsWith('#'))
|
||||||
|
return;
|
||||||
|
|
||||||
|
line = line.split('#')[0].trim();
|
||||||
|
|
||||||
|
let [, color, displayName] = line.split(/(^[\d\s]+)/);
|
||||||
|
|
||||||
|
let values = color.trim().split(/\D+/gi).filter(value => value >= 0 && value <= 255);
|
||||||
|
if (values.length < 3)
|
||||||
|
return;
|
||||||
|
|
||||||
|
let string = `rgb(${values[0]},${values[1]},${values[2]})`;
|
||||||
|
if (displayName.trim())
|
||||||
|
string += `:${displayName.trim()}`;
|
||||||
|
|
||||||
|
columns[index % columns.length].push(string);
|
||||||
|
});
|
||||||
|
|
||||||
|
return columns.map((column, index) => [columnNumber > 1 ? `${name} ${index + 1}` : name, column]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseFile(file) {
|
||||||
|
if (!file.query_exists(null))
|
||||||
|
return [];
|
||||||
|
|
||||||
|
let [, contents] = file.load_contents(null);
|
||||||
|
if (contents instanceof Uint8Array)
|
||||||
|
contents = ByteArray.toString(contents);
|
||||||
|
|
||||||
|
return parse(contents);
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,215 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019 Abakkk
|
||||||
|
*
|
||||||
|
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2019 Abakkk
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* jslint esversion: 6 */
|
||||||
|
/* exported DrawingHelper */
|
||||||
|
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const Gtk = imports.gi.Gtk;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const Config = imports.misc.config;
|
||||||
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
|
|
||||||
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
|
const Convenience = ExtensionUtils.getSettings ? ExtensionUtils : Me.imports.convenience;
|
||||||
|
const Shortcuts = Me.imports.shortcuts;
|
||||||
|
const _ = imports.gettext.domain(Me.metadata['gettext-domain']).gettext;
|
||||||
|
|
||||||
|
const GS_VERSION = Config.PACKAGE_VERSION;
|
||||||
|
const Tweener = GS_VERSION < '3.33.0' ? imports.ui.tweener : null;
|
||||||
|
|
||||||
|
const HELPER_ANIMATION_TIME = 0.25;
|
||||||
|
const MEDIA_KEYS_SCHEMA = 'org.gnome.settings-daemon.plugins.media-keys';
|
||||||
|
const MEDIA_KEYS_KEYS = ['screenshot', 'screenshot-clip', 'area-screenshot', 'area-screenshot-clip'];
|
||||||
|
const UUID = Me.uuid.replace(/@/gi, '_at_').replace(/[^a-z0-9+_-]/gi, '_');
|
||||||
|
|
||||||
|
// DrawingHelper provides the "help osd" (Ctrl + F1)
|
||||||
|
// It uses the same texts as in prefs
|
||||||
|
var DrawingHelper = new Lang.Class({
|
||||||
|
Name: `${UUID}-DrawingHelper`,
|
||||||
|
Extends: St.ScrollView,
|
||||||
|
|
||||||
|
_init: function(params, monitor) {
|
||||||
|
params.style_class = 'osd-window draw-on-your-screen-helper';
|
||||||
|
this.parent(params);
|
||||||
|
this.monitor = monitor;
|
||||||
|
this.hide();
|
||||||
|
|
||||||
|
this.settingsHandler = Me.settings.connect('changed', this._onSettingsChanged.bind(this));
|
||||||
|
this.internalShortcutsettingsHandler = Me.internalShortcutSettings.connect('changed', this._onSettingsChanged.bind(this));
|
||||||
|
this.connect('destroy', () => {
|
||||||
|
Me.settings.disconnect(this.settingsHandler);
|
||||||
|
Me.internalShortcutSettings.disconnect(this.internalShortcutsettingsHandler);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_onSettingsChanged: function(settings, key) {
|
||||||
|
if (key == 'toggle-help')
|
||||||
|
this._updateHelpKeyLabel();
|
||||||
|
|
||||||
|
if (this.vbox) {
|
||||||
|
this.vbox.destroy();
|
||||||
|
delete this.vbox;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateHelpKeyLabel: function() {
|
||||||
|
try {
|
||||||
|
let [keyval, mods] = Gtk.accelerator_parse(Me.internalShortcutSettings.get_strv('toggle-help')[0] || '');
|
||||||
|
this._helpKeyLabel = Gtk.accelerator_get_label(keyval, mods);
|
||||||
|
} catch(e) {
|
||||||
|
logError(e);
|
||||||
|
this._helpKeyLabel = " ";
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
get helpKeyLabel() {
|
||||||
|
if (!this._helpKeyLabel)
|
||||||
|
this._updateHelpKeyLabel();
|
||||||
|
|
||||||
|
return this._helpKeyLabel;
|
||||||
|
},
|
||||||
|
|
||||||
|
_populate: function() {
|
||||||
|
this.vbox = new St.BoxLayout({ vertical: true });
|
||||||
|
this.add_actor(this.vbox);
|
||||||
|
this.vbox.add_child(new St.Label({ text: _("Global") }));
|
||||||
|
|
||||||
|
Shortcuts.GLOBAL_KEYBINDINGS.forEach((settingKeys, index) => {
|
||||||
|
if (index)
|
||||||
|
this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' }));
|
||||||
|
|
||||||
|
settingKeys.forEach(settingKey => {
|
||||||
|
if (!Me.settings.get_strv(settingKey)[0])
|
||||||
|
return;
|
||||||
|
|
||||||
|
let hbox = new St.BoxLayout({ vertical: false });
|
||||||
|
let [keyval, mods] = Gtk.accelerator_parse(Me.settings.get_strv(settingKey)[0] || '');
|
||||||
|
hbox.add_child(new St.Label({ text: Me.settings.settings_schema.get_key(settingKey).get_summary() }));
|
||||||
|
hbox.add_child(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods), x_expand: true }));
|
||||||
|
this.vbox.add_child(hbox);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' }));
|
||||||
|
this.vbox.add_child(new St.Label({ text: _("Internal") }));
|
||||||
|
|
||||||
|
Shortcuts.OTHERS.forEach((pairs, index) => {
|
||||||
|
if (index)
|
||||||
|
this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' }));
|
||||||
|
|
||||||
|
pairs.forEach(pair => {
|
||||||
|
let [action, shortcut] = pair;
|
||||||
|
let hbox = new St.BoxLayout({ vertical: false });
|
||||||
|
hbox.add_child(new St.Label({ text: action }));
|
||||||
|
hbox.add_child(new St.Label({ text: shortcut, x_expand: true }));
|
||||||
|
hbox.get_children()[0].get_clutter_text().set_use_markup(true);
|
||||||
|
this.vbox.add_child(hbox);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' }));
|
||||||
|
|
||||||
|
Shortcuts.INTERNAL_KEYBINDINGS.forEach((settingKeys, index) => {
|
||||||
|
if (index)
|
||||||
|
this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' }));
|
||||||
|
|
||||||
|
settingKeys.forEach(settingKey => {
|
||||||
|
if (!Me.internalShortcutSettings.get_strv(settingKey)[0])
|
||||||
|
return;
|
||||||
|
|
||||||
|
let hbox = new St.BoxLayout({ vertical: false });
|
||||||
|
let [keyval, mods] = Gtk.accelerator_parse(Me.internalShortcutSettings.get_strv(settingKey)[0] || '');
|
||||||
|
hbox.add_child(new St.Label({ text: Me.internalShortcutSettings.settings_schema.get_key(settingKey).get_summary() }));
|
||||||
|
hbox.add_child(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods), x_expand: true }));
|
||||||
|
this.vbox.add_child(hbox);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
let mediaKeysSettings;
|
||||||
|
try { mediaKeysSettings = Convenience.getSettings(MEDIA_KEYS_SCHEMA); } catch(e) { return; }
|
||||||
|
|
||||||
|
this.vbox.add_child(new St.BoxLayout({ vertical: false, style_class: 'draw-on-your-screen-helper-separator' }));
|
||||||
|
this.vbox.add_child(new St.Label({ text: _("System") }));
|
||||||
|
|
||||||
|
for (let settingKey of MEDIA_KEYS_KEYS) {
|
||||||
|
if (!mediaKeysSettings.settings_schema.has_key(settingKey))
|
||||||
|
continue;
|
||||||
|
let shortcut = GS_VERSION < '3.33.0' ? mediaKeysSettings.get_string(settingKey) : mediaKeysSettings.get_strv(settingKey)[0];
|
||||||
|
if (!shortcut)
|
||||||
|
continue;
|
||||||
|
let [keyval, mods] = Gtk.accelerator_parse(shortcut || '');
|
||||||
|
let hbox = new St.BoxLayout({ vertical: false });
|
||||||
|
hbox.add_child(new St.Label({ text: mediaKeysSettings.settings_schema.get_key(settingKey).get_summary() }));
|
||||||
|
hbox.add_child(new St.Label({ text: Gtk.accelerator_get_label(keyval, mods), x_expand: true }));
|
||||||
|
this.vbox.add_child(hbox);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
showHelp: function() {
|
||||||
|
if (!this.vbox)
|
||||||
|
this._populate();
|
||||||
|
|
||||||
|
this.opacity = 0;
|
||||||
|
this.show();
|
||||||
|
|
||||||
|
let maxHeight = this.monitor.height * 3 / 4;
|
||||||
|
this.set_height(Math.min(this.height, maxHeight));
|
||||||
|
this.set_position(Math.floor(this.monitor.width / 2 - this.width / 2),
|
||||||
|
Math.floor(this.monitor.height / 2 - this.height / 2));
|
||||||
|
|
||||||
|
// St.PolicyType: GS 3.32+
|
||||||
|
if (this.height == maxHeight)
|
||||||
|
this.vscrollbar_policy = St.PolicyType ? St.PolicyType.ALWAYS : Gtk.PolicyType.ALWAYS;
|
||||||
|
else
|
||||||
|
this.vscrollbar_policy = St.PolicyType ? St.PolicyType.NEVER : Gtk.PolicyType.NEVER;
|
||||||
|
|
||||||
|
if (Tweener) {
|
||||||
|
Tweener.removeTweens(this);
|
||||||
|
Tweener.addTween(this, { opacity: 255,
|
||||||
|
time: HELPER_ANIMATION_TIME,
|
||||||
|
transition: 'easeOutQuad' });
|
||||||
|
} else {
|
||||||
|
this.remove_all_transitions();
|
||||||
|
this.ease({ opacity: 255,
|
||||||
|
duration: HELPER_ANIMATION_TIME * 1000,
|
||||||
|
transition: Clutter.AnimationMode.EASE_OUT_QUAD });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
hideHelp: function() {
|
||||||
|
if (Tweener) {
|
||||||
|
Tweener.removeTweens(this);
|
||||||
|
Tweener.addTween(this, { opacity: 0,
|
||||||
|
time: HELPER_ANIMATION_TIME,
|
||||||
|
transition: 'easeOutQuad',
|
||||||
|
onComplete: this.hide.bind(this) });
|
||||||
|
} else {
|
||||||
|
this.remove_all_transitions();
|
||||||
|
this.ease({ opacity: 0,
|
||||||
|
duration: HELPER_ANIMATION_TIME * 1000,
|
||||||
|
transition: Clutter.AnimationMode.EASE_OUT_QUAD,
|
||||||
|
onComplete: this.hide.bind(this) });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
@ -0,0 +1,8 @@
|
||||||
|
# xgettext --from-code=UTF-8 --add-comments="Translators: " --no-location --package-name="Draw On Your Screen" --msgid-bugs-address="https://codeberg.org/som/DrawOnYourScreen/issues" -f locale/POTFILES.in
|
||||||
|
area.js
|
||||||
|
extension.js
|
||||||
|
helper.js
|
||||||
|
menu.js
|
||||||
|
prefs.js
|
||||||
|
shortcuts.js
|
||||||
|
schemas/org.gnome.shell.extensions.draw-on-your-screen.gschema.xml
|
||||||
|
|
@ -0,0 +1,741 @@
|
||||||
|
# <language> translations for Draw On Your Screen.
|
||||||
|
# Copyright (C) 2019 Listed translators
|
||||||
|
#
|
||||||
|
# This file is distributed under the same license as Draw On Your Screen.
|
||||||
|
# Onno Giesmann <nutzer3105@gmail.com>, 2020-2021.
|
||||||
|
#
|
||||||
|
# Some words refer to SVG attributes (font, line, fill rule ...).
|
||||||
|
# You are free to translate them or not.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Draw On Your Screen\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://codeberg.org/som/DrawOnYourScreen/issues\n"
|
||||||
|
"POT-Creation-Date: 2021-02-17 14:14+0100\n"
|
||||||
|
"PO-Revision-Date: 2021-03-04 08:21+0100\n"
|
||||||
|
"Last-Translator: Onno Giesmann <nutzer3105@gmail.com>\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: de\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: Poedit 2.4.2\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid ""
|
||||||
|
"Press <i>%s</i> to get\n"
|
||||||
|
"a fourth control point"
|
||||||
|
msgstr ""
|
||||||
|
"<i>%s</i> drücken, um einen\n"
|
||||||
|
"vierten Kontrollpunkt zu erhalten"
|
||||||
|
|
||||||
|
msgid "Mark a point of symmetry"
|
||||||
|
msgstr "Symmetriepunkt markieren"
|
||||||
|
|
||||||
|
msgid "Draw a line of symmetry"
|
||||||
|
msgstr "Symmetrielinie zeichnen"
|
||||||
|
|
||||||
|
#. Translators: initial content of the text area
|
||||||
|
msgctxt "text-area-content"
|
||||||
|
msgid "Text"
|
||||||
|
msgstr "Text"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Press <i>%s</i> to mark vertices"
|
||||||
|
msgstr ""
|
||||||
|
"<i>%s</i> drücken, um\n"
|
||||||
|
"Scheitelpunkte zu markieren"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid ""
|
||||||
|
"Press <i>%s</i>\n"
|
||||||
|
"to start a new line"
|
||||||
|
msgstr ""
|
||||||
|
"<i>%s</i> drücken, um\n"
|
||||||
|
"neue Zeile zu beginnen"
|
||||||
|
|
||||||
|
#. Translators: It is displayed in an OSD notification to ask the user to start picking, so it should use the imperative mood.
|
||||||
|
msgctxt "osd-notification"
|
||||||
|
msgid "Pick a color"
|
||||||
|
msgstr "Wählen Sie eine Farbe"
|
||||||
|
|
||||||
|
#. Translators: "released" as the opposite of "grabbed"
|
||||||
|
msgid "Keyboard and pointer released"
|
||||||
|
msgstr "Tastatur und Zeiger losgelöst"
|
||||||
|
|
||||||
|
msgid "Keyboard and pointer grabbed"
|
||||||
|
msgstr "Tastatur und Zeiger gekoppelt"
|
||||||
|
|
||||||
|
msgid "Leaving drawing mode"
|
||||||
|
msgstr "Verlasse Zeichnungsmodus"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Press <i>%s</i> for help"
|
||||||
|
msgstr "Für Hilfe <i>%s</i> drücken"
|
||||||
|
|
||||||
|
msgid "Entering drawing mode"
|
||||||
|
msgstr "Beginne Zeichnungsmodus"
|
||||||
|
|
||||||
|
msgid "Global"
|
||||||
|
msgstr "Global"
|
||||||
|
|
||||||
|
msgid "Internal"
|
||||||
|
msgstr "Intern"
|
||||||
|
|
||||||
|
msgid "System"
|
||||||
|
msgstr "System"
|
||||||
|
|
||||||
|
msgid "Dashed line"
|
||||||
|
msgstr "Gestrichelte Linie"
|
||||||
|
|
||||||
|
#. Translators: as the alternative to "Dashed line"
|
||||||
|
msgid "Full line"
|
||||||
|
msgstr "Volle Linie"
|
||||||
|
|
||||||
|
msgid "Fill"
|
||||||
|
msgstr "Füllen"
|
||||||
|
|
||||||
|
#. Translators: as the alternative to "Fill"
|
||||||
|
msgid "Outline"
|
||||||
|
msgstr "Außenlinie"
|
||||||
|
|
||||||
|
#. Translators: fill-rule SVG attribute
|
||||||
|
msgid "Nonzero"
|
||||||
|
msgstr "Nonzero"
|
||||||
|
|
||||||
|
msgid "Evenodd"
|
||||||
|
msgstr "Evenodd"
|
||||||
|
|
||||||
|
#. Translators: generic font-family SVG attribute
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Sans-Serif"
|
||||||
|
msgstr "Sans-Serif"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Serif"
|
||||||
|
msgstr "Serif"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Monospace"
|
||||||
|
msgstr "Monospace"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Cursive"
|
||||||
|
msgstr "Cursive"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Fantasy"
|
||||||
|
msgstr "Fantasy"
|
||||||
|
|
||||||
|
#. Translators: font-style SVG attribute
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr "Normal"
|
||||||
|
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Oblique"
|
||||||
|
msgstr "Schräg"
|
||||||
|
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Italic"
|
||||||
|
msgstr "Kursiv"
|
||||||
|
|
||||||
|
#. Translators: font-weight SVG attribute
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Thin"
|
||||||
|
msgstr "Fein"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Light"
|
||||||
|
msgstr "Ultraleicht"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Light"
|
||||||
|
msgstr "Leicht"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Semi Light"
|
||||||
|
msgstr "Halbleicht"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Book"
|
||||||
|
msgstr "Buch"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr "Normal"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Medium"
|
||||||
|
msgstr "Medium"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Semi Bold"
|
||||||
|
msgstr "Halbfett"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Bold"
|
||||||
|
msgstr "Fett"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Bold"
|
||||||
|
msgstr "Ultrafett"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Heavy"
|
||||||
|
msgstr "Kräftig"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Heavy"
|
||||||
|
msgstr "Ultrakräftig"
|
||||||
|
|
||||||
|
#. Translators: stroke-linecap SVG attribute
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Butt"
|
||||||
|
msgstr "Rechtwinkeliges Ende"
|
||||||
|
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Round"
|
||||||
|
msgstr "Ende mit Halbkreis"
|
||||||
|
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Square"
|
||||||
|
msgstr "Ende mit Rechteck"
|
||||||
|
|
||||||
|
#. Translators: stroke-linejoin SVG attribute
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Miter"
|
||||||
|
msgstr "Ecken mit Gehrung"
|
||||||
|
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Round"
|
||||||
|
msgstr "Abgerundete Ecken"
|
||||||
|
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Bevel"
|
||||||
|
msgstr "Abgeschrägte Ecken"
|
||||||
|
|
||||||
|
#. Translators: value in pixel unit (e.g. "5 px")
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%f px"
|
||||||
|
msgstr "%f px"
|
||||||
|
|
||||||
|
msgid "Left aligned"
|
||||||
|
msgstr "Linksbündig"
|
||||||
|
|
||||||
|
msgid "Centered"
|
||||||
|
msgstr "Zentriert"
|
||||||
|
|
||||||
|
msgid "Right aligned"
|
||||||
|
msgstr "Rechtsbündig"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Free drawing"
|
||||||
|
msgstr "Freies Zeichnen"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Line"
|
||||||
|
msgstr "Linie"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Ellipse"
|
||||||
|
msgstr "Ellipse"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Rectangle"
|
||||||
|
msgstr "Rechteck"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Text"
|
||||||
|
msgstr "Text"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Polygon"
|
||||||
|
msgstr "Vieleck"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Polyline"
|
||||||
|
msgstr "Linienzug"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Image"
|
||||||
|
msgstr "Bild"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Move"
|
||||||
|
msgstr "Verschieben"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Resize"
|
||||||
|
msgstr "Größenänderung"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Mirror"
|
||||||
|
msgstr "Spiegeln"
|
||||||
|
|
||||||
|
msgid "Erase"
|
||||||
|
msgstr "Entfernen"
|
||||||
|
|
||||||
|
msgid "Smooth"
|
||||||
|
msgstr "Glätten"
|
||||||
|
|
||||||
|
msgid "Open drawing"
|
||||||
|
msgstr "Zeichnung öffnen"
|
||||||
|
|
||||||
|
msgid "Save drawing as…"
|
||||||
|
msgstr "Zeichnung speichern als…"
|
||||||
|
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr "Farbpalette"
|
||||||
|
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Farbe"
|
||||||
|
|
||||||
|
#. Translators: It is displayed in a menu button tooltip or as a shortcut action description, so it should NOT use the imperative mood.
|
||||||
|
msgid "Pick a color"
|
||||||
|
msgstr "Auswählen einer Farbe"
|
||||||
|
|
||||||
|
msgid "Add to images"
|
||||||
|
msgstr "Zu Bildern hinzufügen"
|
||||||
|
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "Löschen"
|
||||||
|
|
||||||
|
msgid "Type a name"
|
||||||
|
msgstr "Namen eingeben"
|
||||||
|
|
||||||
|
#. Translators: "Preferences" page in preferences
|
||||||
|
msgid "Preferences"
|
||||||
|
msgstr "Einstellungen"
|
||||||
|
|
||||||
|
#. Translators: "Drawing" page in preferences
|
||||||
|
msgid "Drawing"
|
||||||
|
msgstr "Zeichnung"
|
||||||
|
|
||||||
|
#. Translators: "About" page in preferences
|
||||||
|
msgid "About"
|
||||||
|
msgstr "Info"
|
||||||
|
|
||||||
|
#. Translators: you are free to translate the extension name, that is displayed in About page, or not
|
||||||
|
msgid "Draw On You Screen"
|
||||||
|
msgstr "Zeichnungen auf Ihrem Bildschirm"
|
||||||
|
|
||||||
|
#. Translators: version number in "About" page
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Version %f"
|
||||||
|
msgstr "Version %f"
|
||||||
|
|
||||||
|
#. Translators: you are free to translate the extension description, that is displayed in About page, or not
|
||||||
|
msgid ""
|
||||||
|
"Start drawing with Super+Alt+D and save your beautiful work by taking a "
|
||||||
|
"screenshot"
|
||||||
|
msgstr ""
|
||||||
|
"Beginnen Sie mit dem Zeichnen durch Drücken von Super+Alt+D.\n"
|
||||||
|
"Sie können Ihr Werk danach auch in einem Bildschirmfoto festhalten"
|
||||||
|
|
||||||
|
#. Translators: add your name here or keep it empty, it will be displayed in about page, e.g.
|
||||||
|
#. msgstr ""
|
||||||
|
#. "translator1\n"
|
||||||
|
#. "<a href=\"mailto:translator2@mail.org\">translator2</a>\n"
|
||||||
|
#. "<a href=\"https://...\">translator3</a>"
|
||||||
|
msgid "translator-credits"
|
||||||
|
msgstr "Onno Giesmann, Oktober 2020"
|
||||||
|
|
||||||
|
msgid "Palettes"
|
||||||
|
msgstr "Farbpaletten"
|
||||||
|
|
||||||
|
msgid "Add a new palette"
|
||||||
|
msgstr "Neue Farbpalette hinzufügen"
|
||||||
|
|
||||||
|
msgid "Area"
|
||||||
|
msgstr "Bereich"
|
||||||
|
|
||||||
|
msgid "Auto"
|
||||||
|
msgstr "Auto"
|
||||||
|
|
||||||
|
msgid "Grid overlay line"
|
||||||
|
msgstr "Gitterlinien anzeigen"
|
||||||
|
|
||||||
|
msgid "Tools"
|
||||||
|
msgstr "Werkzeuge"
|
||||||
|
|
||||||
|
msgid "Dash array"
|
||||||
|
msgstr "Strichdichte"
|
||||||
|
|
||||||
|
msgid "Reset settings"
|
||||||
|
msgstr "Einstellungen zurücksetzen"
|
||||||
|
|
||||||
|
msgid "Rename the palette"
|
||||||
|
msgstr "Farbpalette umbenennen"
|
||||||
|
|
||||||
|
msgid "Remove the palette"
|
||||||
|
msgstr "Farbpalette entfernen"
|
||||||
|
|
||||||
|
#. Translators: default name of a new palette
|
||||||
|
msgid "New palette"
|
||||||
|
msgstr "Neue Farbpalette"
|
||||||
|
|
||||||
|
msgid "In drawing mode"
|
||||||
|
msgstr "Im Zeichnungsmodus"
|
||||||
|
|
||||||
|
msgid "Draw"
|
||||||
|
msgstr "Zeichnen"
|
||||||
|
|
||||||
|
msgid "Left click"
|
||||||
|
msgstr "Linksklick"
|
||||||
|
|
||||||
|
msgid "Menu"
|
||||||
|
msgstr "Menü"
|
||||||
|
|
||||||
|
msgid "Right click"
|
||||||
|
msgstr "Rechtsklick"
|
||||||
|
|
||||||
|
msgid "Center click"
|
||||||
|
msgstr "Mittelklick"
|
||||||
|
|
||||||
|
msgid "Increment/decrement line width"
|
||||||
|
msgstr "Breitere/schwächere Linienstärke"
|
||||||
|
|
||||||
|
msgid "Scroll"
|
||||||
|
msgstr "Scrollen"
|
||||||
|
|
||||||
|
#. Translators: %s are key labels (Ctrl+F1 and Ctrl+F9)
|
||||||
|
msgid "Select color"
|
||||||
|
msgstr "Farbe wählen"
|
||||||
|
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%s … %s"
|
||||||
|
msgstr "%s … %s"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
msgid "Ignore pointer movement"
|
||||||
|
msgstr "Zeigerbewegung ignorieren"
|
||||||
|
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%s held"
|
||||||
|
msgstr "%s festhalten"
|
||||||
|
|
||||||
|
msgid "Leave"
|
||||||
|
msgstr "Beenden"
|
||||||
|
|
||||||
|
msgid "Select eraser <span alpha=\"50%\">(while starting drawing)</span>"
|
||||||
|
msgstr ""
|
||||||
|
"Radierer auswählen <span alpha=\"50%\">(während dem Beginnen mit Zeichnen)</"
|
||||||
|
"span>"
|
||||||
|
|
||||||
|
msgid "Duplicate <span alpha=\"50%\">(while starting handling)</span>"
|
||||||
|
msgstr "Duplizieren <span alpha=\"50%\">(beim Starten der Handhabung)</span>"
|
||||||
|
|
||||||
|
msgid "Rotate rectangle, polygon, polyline"
|
||||||
|
msgstr "Drehen von Rechteck, Vieleck, Linienzug"
|
||||||
|
|
||||||
|
msgid "Extend circle to ellipse"
|
||||||
|
msgstr "Kreis zur Ellipse erweitern"
|
||||||
|
|
||||||
|
msgid "Curve line"
|
||||||
|
msgstr "Kurvenlinie"
|
||||||
|
|
||||||
|
msgid "Smooth free drawing outline"
|
||||||
|
msgstr "Glatte freie Zeichnungskontur"
|
||||||
|
|
||||||
|
msgid "Do not preserve image ratio"
|
||||||
|
msgstr "Bildverhältnis nicht beibehalten"
|
||||||
|
|
||||||
|
msgid "Rotate <span alpha=\"50%\">(while moving)</span>"
|
||||||
|
msgstr "Drehen <span alpha=\"50%\">(während der Bewegung)</span>"
|
||||||
|
|
||||||
|
msgid "Stretch <span alpha=\"50%\">(while resizing)</span>"
|
||||||
|
msgstr "Dehnen <span alpha=\"50%\">(während der Veränderung)</span>"
|
||||||
|
|
||||||
|
msgid "Inverse <span alpha=\"50%\">(while mirroring)</span>"
|
||||||
|
msgstr "Umkehren <span alpha=\"50%\">(während dem Spiegeln)</span>"
|
||||||
|
|
||||||
|
msgid "Drawing on the desktop"
|
||||||
|
msgstr "Zeichnen auf dem Schreibtisch"
|
||||||
|
|
||||||
|
msgid "<i>Draw On Your Screen</i> becomes <i>Draw On Your Desktop</i>"
|
||||||
|
msgstr ""
|
||||||
|
"<i>Zeichnungen auf Ihrem Bildschirm</i> wird zu <i>Zeichnungen auf Ihrem "
|
||||||
|
"Schreibtisch</i>"
|
||||||
|
|
||||||
|
msgid "Erase all drawings"
|
||||||
|
msgstr "Alle Zeichnungen löschen"
|
||||||
|
|
||||||
|
msgid "Disable panel indicator"
|
||||||
|
msgstr "Symbol in der Leiste deaktivieren"
|
||||||
|
|
||||||
|
msgid "Disable on-screen notifications"
|
||||||
|
msgstr "Meldungen auf dem Bildschirm abschalten"
|
||||||
|
|
||||||
|
msgid "Persistent over toggles"
|
||||||
|
msgstr "Nach Umschalten beibehalten"
|
||||||
|
|
||||||
|
msgid "Drawing remains when toggling drawing mode"
|
||||||
|
msgstr ""
|
||||||
|
"Die Zeichnung bleibt erhalten, wenn der Zeichnungsmodus an- oder "
|
||||||
|
"ausgeschaltet wird"
|
||||||
|
|
||||||
|
msgid "Persistent over restarts"
|
||||||
|
msgstr "Nach Neustarts beibehalten"
|
||||||
|
|
||||||
|
msgid "Drawing is automatically saved to a file"
|
||||||
|
msgstr "Die Zeichnung wird automatisch in eine Datei gespeichert"
|
||||||
|
|
||||||
|
msgid "Enter/leave drawing mode"
|
||||||
|
msgstr "Zeichnungsmodus starten/beenden"
|
||||||
|
|
||||||
|
#. Translators: there is a similar text in GNOME Boxes (https://gitlab.gnome.org/GNOME/gnome-boxes/tree/master/po)
|
||||||
|
msgid "Grab/ungrab keyboard and pointer"
|
||||||
|
msgstr "Tastatur und Zeiger ankoppeln/loslösen"
|
||||||
|
|
||||||
|
msgid "Background color"
|
||||||
|
msgstr "Hintergrundfarbe"
|
||||||
|
|
||||||
|
msgid "The color of the drawing area background"
|
||||||
|
msgstr "Hintergrundfarbe der Zeichenfläche"
|
||||||
|
|
||||||
|
msgid "Automatic dash array"
|
||||||
|
msgstr "Automatische Strichdichte"
|
||||||
|
|
||||||
|
msgid "Compute the lengths from the line width"
|
||||||
|
msgstr "Längen aus der Linienbreite berechnen"
|
||||||
|
|
||||||
|
msgid "Dash array on"
|
||||||
|
msgstr "Strichdichte aktiv"
|
||||||
|
|
||||||
|
msgid "The dash length in pixels"
|
||||||
|
msgstr "Strichlänge in Pixel"
|
||||||
|
|
||||||
|
msgid "Dash array off"
|
||||||
|
msgstr "Strichdichte nicht aktiv"
|
||||||
|
|
||||||
|
msgid "The gap between the dashes in pixels"
|
||||||
|
msgstr "Abstand zwischen den Strichen (in Pixel)"
|
||||||
|
|
||||||
|
msgid "Dash offset"
|
||||||
|
msgstr "Strich-Versatz"
|
||||||
|
|
||||||
|
msgid "The dash offset in pixels"
|
||||||
|
msgstr "Versatz der Striche (in Pixel)"
|
||||||
|
|
||||||
|
msgid "Grid overlay color"
|
||||||
|
msgstr "Farbe der Gitterlinien"
|
||||||
|
|
||||||
|
msgid "The color of the lines"
|
||||||
|
msgstr "Die Farbe der Linien"
|
||||||
|
|
||||||
|
msgid "Automatic grid overlay line"
|
||||||
|
msgstr "Automatische Gitternetzlinien"
|
||||||
|
|
||||||
|
msgid "Compute the lengths from the screen size"
|
||||||
|
msgstr "Längen aus der Bildschirmgröße berechnen"
|
||||||
|
|
||||||
|
msgid "Grid overlay line spacing"
|
||||||
|
msgstr "Freiraum zwischen den Gitternetzlinien"
|
||||||
|
|
||||||
|
msgid "The gap between lines in pixels"
|
||||||
|
msgstr "Abstand zwischen den Linien (in Pixel)"
|
||||||
|
|
||||||
|
msgid "Grid overlay line width"
|
||||||
|
msgstr "Stärke der Gitternetzlinien"
|
||||||
|
|
||||||
|
msgid "The line width in pixels"
|
||||||
|
msgstr "Linienbreite in Pixel"
|
||||||
|
|
||||||
|
msgid "Image location"
|
||||||
|
msgstr "Ort der Bilder"
|
||||||
|
|
||||||
|
msgid "The location of the directory in which the image tool picks"
|
||||||
|
msgstr ""
|
||||||
|
"Verzeichnis mit Bildern, die für das Werkzeug \"Bild\" verwendet werden"
|
||||||
|
|
||||||
|
msgid "Color palettes"
|
||||||
|
msgstr "Farbpaletten"
|
||||||
|
|
||||||
|
msgid "The palettes of drawing colors"
|
||||||
|
msgstr "Paletten mit Zeichenfarben"
|
||||||
|
|
||||||
|
msgid "Automatic square area size"
|
||||||
|
msgstr "Automatische Flächengröße des Rechtecks"
|
||||||
|
|
||||||
|
msgid "Compute the area size from the screen size"
|
||||||
|
msgstr "Flächengröße anhand der Bildschirmgröße berechnen"
|
||||||
|
|
||||||
|
msgid "Square area size"
|
||||||
|
msgstr "Rechteck-Flächengröße"
|
||||||
|
|
||||||
|
msgid "The size of the area in pixels"
|
||||||
|
msgstr "Größe der Fläche (in Pixel)"
|
||||||
|
|
||||||
|
msgid "Decrement line width"
|
||||||
|
msgstr "Linienstärke verringern"
|
||||||
|
|
||||||
|
msgid "Decrement line width even more"
|
||||||
|
msgstr "Linienstärke noch mehr verringern"
|
||||||
|
|
||||||
|
msgid "Erase last brushstroke"
|
||||||
|
msgstr "Letzten Pinselstrich entfernen"
|
||||||
|
|
||||||
|
msgid "Export drawing to a SVG file"
|
||||||
|
msgstr "Zeichnung als SVG-Datei exportieren"
|
||||||
|
|
||||||
|
msgid "Increment line width"
|
||||||
|
msgstr "Linienstärke erhöhen"
|
||||||
|
|
||||||
|
msgid "Increment line width even more"
|
||||||
|
msgstr "Linienstärke noch mehr erhöhen"
|
||||||
|
|
||||||
|
msgid "Open next drawing"
|
||||||
|
msgstr "Nächste Zeichnung öffnen"
|
||||||
|
|
||||||
|
msgid "Open preferences"
|
||||||
|
msgstr "Einstellungen öffnen"
|
||||||
|
|
||||||
|
msgid "Open previous drawing"
|
||||||
|
msgstr "Vorige Zeichnung öffnen"
|
||||||
|
|
||||||
|
msgid "Add images from the clipboard"
|
||||||
|
msgstr "Bilder aus der Zwischenablage einfügen"
|
||||||
|
|
||||||
|
msgid "Redo"
|
||||||
|
msgstr "Wiederherstellen"
|
||||||
|
|
||||||
|
msgid "Save drawing"
|
||||||
|
msgstr "Zeichnung speichern"
|
||||||
|
|
||||||
|
msgid "Select color 1"
|
||||||
|
msgstr "Farbe 1 auswählen"
|
||||||
|
|
||||||
|
msgid "Select color 2"
|
||||||
|
msgstr "Farbe 2 auswählen"
|
||||||
|
|
||||||
|
msgid "Select color 3"
|
||||||
|
msgstr "Farbe 3 auswählen"
|
||||||
|
|
||||||
|
msgid "Select color 4"
|
||||||
|
msgstr "Farbe 4 auswählen"
|
||||||
|
|
||||||
|
msgid "Select color 5"
|
||||||
|
msgstr "Farbe 5 auswählen"
|
||||||
|
|
||||||
|
msgid "Select color 6"
|
||||||
|
msgstr "Farbe 6 auswählen"
|
||||||
|
|
||||||
|
msgid "Select color 7"
|
||||||
|
msgstr "Farbe 7 auswählen"
|
||||||
|
|
||||||
|
msgid "Select color 8"
|
||||||
|
msgstr "Farbe 8 auswählen"
|
||||||
|
|
||||||
|
msgid "Select color 9"
|
||||||
|
msgstr "Farbe 9 auswählen"
|
||||||
|
|
||||||
|
msgid "Select ellipse tool"
|
||||||
|
msgstr "Werkzeug Ellipse auswählen"
|
||||||
|
|
||||||
|
msgid "Select image tool"
|
||||||
|
msgstr "Werkzeug Bild auswählen"
|
||||||
|
|
||||||
|
msgid "Select line tool"
|
||||||
|
msgstr "Werkzeug Linie auswählen"
|
||||||
|
|
||||||
|
msgid "Select mirror tool"
|
||||||
|
msgstr "Werkzeug Spiegeln auswählen"
|
||||||
|
|
||||||
|
msgid "Select move tool"
|
||||||
|
msgstr "Werkzeug Verschieben auswählen"
|
||||||
|
|
||||||
|
msgid "Select free drawing"
|
||||||
|
msgstr "Werkzeug Freies Zeichnen auswählen"
|
||||||
|
|
||||||
|
msgid "Select polygon tool"
|
||||||
|
msgstr "Werkzeug Vieleck auswählen"
|
||||||
|
|
||||||
|
msgid "Select polyline tool"
|
||||||
|
msgstr "Werkzeug Linienzug auswählen"
|
||||||
|
|
||||||
|
msgid "Select rectangle tool"
|
||||||
|
msgstr "Werkzeug Rechteck auswählen"
|
||||||
|
|
||||||
|
msgid "Select resize tool"
|
||||||
|
msgstr "Werkzeug Größenänderung auswählen"
|
||||||
|
|
||||||
|
msgid "Select text tool"
|
||||||
|
msgstr "Werkzeug Text auswählen"
|
||||||
|
|
||||||
|
msgid "Smooth last brushstroke"
|
||||||
|
msgstr "Letzten Pinselstrich glätten"
|
||||||
|
|
||||||
|
msgid "Change color palette"
|
||||||
|
msgstr "Farbpalette wechseln"
|
||||||
|
|
||||||
|
msgid "Change color palette (reverse)"
|
||||||
|
msgstr "Farbpalette wechseln (rückwärts)"
|
||||||
|
|
||||||
|
msgid "Toggle fill/outline"
|
||||||
|
msgstr "Füllen/Außenlinie umschalten"
|
||||||
|
|
||||||
|
msgid "Toggle fill rule"
|
||||||
|
msgstr "Füll-Regel umschalten"
|
||||||
|
|
||||||
|
msgid "Change font family"
|
||||||
|
msgstr "Schriftenfamilie ändern"
|
||||||
|
|
||||||
|
msgid "Change font family (reverse)"
|
||||||
|
msgstr "Schriftenfamilie ändern (rückwärts)"
|
||||||
|
|
||||||
|
msgid "Change font style"
|
||||||
|
msgstr "Schriftart ändern"
|
||||||
|
|
||||||
|
msgid "Change font weight"
|
||||||
|
msgstr "Schriftgröße ändern"
|
||||||
|
|
||||||
|
msgid "Change image"
|
||||||
|
msgstr "Bild ändern"
|
||||||
|
|
||||||
|
msgid "Change image (reverse)"
|
||||||
|
msgstr "Bild ändern (rückwärts)"
|
||||||
|
|
||||||
|
msgid "Change linecap"
|
||||||
|
msgstr "Linien-Kappenstil ändern"
|
||||||
|
|
||||||
|
msgid "Change linejoin"
|
||||||
|
msgstr "Linienverbindung ändern"
|
||||||
|
|
||||||
|
msgid "Change text alignment"
|
||||||
|
msgstr "Textausrichtung ändern"
|
||||||
|
|
||||||
|
msgid "Add a drawing background"
|
||||||
|
msgstr "Zeichnungshintergrund hinzufügen"
|
||||||
|
|
||||||
|
msgid "Add a grid overlay"
|
||||||
|
msgstr "Gitternetz hinzufügen"
|
||||||
|
|
||||||
|
msgid "Show help"
|
||||||
|
msgstr "Hilfe anzeigen"
|
||||||
|
|
||||||
|
msgid "Hide panel and dock"
|
||||||
|
msgstr "Leiste und Dock ausblenden"
|
||||||
|
|
||||||
|
#. Translators: It is an action: "Make the drawing area a square"
|
||||||
|
msgid "Square drawing area"
|
||||||
|
msgstr "Rechteckigen Zeichnungsbereich erstellen"
|
||||||
|
|
||||||
|
msgid "Undo"
|
||||||
|
msgstr "Rückgängig"
|
||||||
|
|
||||||
|
#, javascript-format
|
||||||
|
#~ msgid "Type your text and press <i>%s</i>"
|
||||||
|
#~ msgstr ""
|
||||||
|
#~ "Text eingeben\n"
|
||||||
|
#~ "Danach <i>%s</i> drücken"
|
||||||
|
|
||||||
|
#~ msgid "Redo last brushstroke"
|
||||||
|
#~ msgstr "Letzten Pinselstrich wiederherstellen"
|
||||||
|
|
||||||
|
#~ msgid "Undo last brushstroke"
|
||||||
|
#~ msgstr "Letzten Pinselstrich wieder entfernen"
|
||||||
|
|
@ -1,14 +1,16 @@
|
||||||
# SOME DESCRIPTIVE TITLE.
|
# <language> translations for Draw On Your Screen.
|
||||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
# Copyright (C) 2019 Listed translators
|
||||||
# This file is distributed under the same license as the PACKAGE package.
|
#
|
||||||
|
# This file is distributed under the same license as Draw On Your Screen.
|
||||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
#
|
#
|
||||||
#, fuzzy
|
# Some words refer to SVG attributes (font, line, fill rule ...).
|
||||||
|
# You are free to translate them or not.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: Draw On Your Screen\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: https://codeberg.org/som/DrawOnYourScreen/issues\n"
|
||||||
"POT-Creation-Date: 2019-03-04 16:40+0100\n"
|
"POT-Creation-Date: 2021-02-17 14:14+0100\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
|
|
@ -17,120 +19,357 @@ msgstr ""
|
||||||
"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"
|
||||||
|
|
||||||
#: extension.js
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid ""
|
||||||
|
"Press <i>%s</i> to get\n"
|
||||||
|
"a fourth control point"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Mark a point of symmetry"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Draw a line of symmetry"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: initial content of the text area
|
||||||
|
msgctxt "text-area-content"
|
||||||
|
msgid "Text"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Press <i>%s</i> to mark vertices"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid ""
|
||||||
|
"Press <i>%s</i>\n"
|
||||||
|
"to start a new line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: It is displayed in an OSD notification to ask the user to start picking, so it should use the imperative mood.
|
||||||
|
msgctxt "osd-notification"
|
||||||
|
msgid "Pick a color"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: "released" as the opposite of "grabbed"
|
||||||
|
msgid "Keyboard and pointer released"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Keyboard and pointer grabbed"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
msgid "Leaving drawing mode"
|
msgid "Leaving drawing mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Press Ctrl + F1 for help"
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Press <i>%s</i> for help"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Entering drawing mode"
|
msgid "Entering drawing mode"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: draw.js
|
msgid "Global"
|
||||||
msgid "Free drawing"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Line"
|
msgid "Internal"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Circle"
|
msgid "System"
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Rectangle"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Text"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Dashed line"
|
msgid "Dashed line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: as the alternative to "Dashed line"
|
||||||
msgid "Full line"
|
msgid "Full line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Fill"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: as the alternative to "Fill"
|
||||||
|
msgid "Outline"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: fill-rule SVG attribute
|
||||||
|
msgid "Nonzero"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Evenodd"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: generic font-family SVG attribute
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Sans-Serif"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Serif"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Monospace"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Cursive"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Fantasy"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: font-style SVG attribute
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Oblique"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Italic"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: font-weight SVG attribute
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Thin"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Light"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Light"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Semi Light"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Book"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Medium"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Semi Bold"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Bold"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Bold"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Heavy"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Heavy"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: stroke-linecap SVG attribute
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Butt"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Round"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Square"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: stroke-linejoin SVG attribute
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Miter"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Round"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Bevel"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: value in pixel unit (e.g. "5 px")
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%f px"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Left aligned"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Centered"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Right aligned"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Free drawing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Ellipse"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Rectangle"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Text"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Polygon"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Polyline"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Move"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Resize"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Mirror"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Erase"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Smooth"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open drawing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Save drawing as…"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Color"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: It is displayed in a menu button tooltip or as a shortcut action description, so it should NOT use the imperative mood.
|
||||||
|
msgid "Pick a color"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Add to images"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Type a name"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: "Preferences" page in preferences
|
||||||
|
msgid "Preferences"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: "Drawing" page in preferences
|
||||||
|
msgid "Drawing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: "About" page in preferences
|
||||||
|
msgid "About"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: you are free to translate the extension name, that is displayed in About page, or not
|
||||||
|
msgid "Draw On You Screen"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: version number in "About" page
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Version %f"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: you are free to translate the extension description, that is displayed in About page, or not
|
||||||
msgid ""
|
msgid ""
|
||||||
"Type your text\n"
|
"Start drawing with Super+Alt+D and save your beautiful work by taking a "
|
||||||
"and press Enter"
|
"screenshot"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: prefs.js
|
#. Translators: add your name here or keep it empty, it will be displayed in about page, e.g.
|
||||||
msgid "Enter/leave drawing mode"
|
#. msgstr ""
|
||||||
|
#. "translator1\n"
|
||||||
|
#. "<a href=\"mailto:translator2@mail.org\">translator2</a>\n"
|
||||||
|
#. "<a href=\"https://...\">translator3</a>"
|
||||||
|
msgid "translator-credits"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Erase all drawings"
|
msgid "Palettes"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Undo last brushstroke"
|
msgid "Add a new palette"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Redo last brushstroke"
|
msgid "Area"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Erase last brushstroke"
|
msgid "Auto"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Smooth last brushstroke"
|
msgid "Grid overlay line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Increment line width"
|
msgid "Tools"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Decrement line width"
|
msgid "Dash array"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Increment line width even more"
|
msgid "Reset settings"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Decrement line width even more"
|
msgid "Rename the palette"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Change linejoin"
|
msgid "Remove the palette"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Change linecap"
|
#. Translators: default name of a new palette
|
||||||
|
msgid "New palette"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#msgid "Dashed line"
|
msgid "In drawing mode"
|
||||||
#msgstr ""
|
|
||||||
|
|
||||||
msgid "Select line"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Select circle"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Select rectangle"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Select text"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Unselect shape (free drawing)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Change font family (generic name)"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Change font weight"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Change font style"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Hide panel and dock"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Add a drawing background"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Save drawing as a SVG file"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Open stylesheet.css"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Show help"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Draw"
|
msgid "Draw"
|
||||||
|
|
@ -139,15 +378,12 @@ msgstr ""
|
||||||
msgid "Left click"
|
msgid "Left click"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Draw by filling in"
|
msgid "Menu"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Right click"
|
msgid "Right click"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Toggle shape"
|
|
||||||
msgstr ""
|
|
||||||
|
|
||||||
msgid "Center click"
|
msgid "Center click"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
@ -157,61 +393,320 @@ msgstr ""
|
||||||
msgid "Scroll"
|
msgid "Scroll"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: %s are key labels (Ctrl+F1 and Ctrl+F9)
|
||||||
msgid "Select color"
|
msgid "Select color"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Ctrl+1...9"
|
#, javascript-format
|
||||||
|
msgid "%s … %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Select eraser"
|
#. Translators: %s is a key label
|
||||||
|
msgid "Ignore pointer movement"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Shift key held"
|
#, javascript-format
|
||||||
|
msgid "%s held"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Leave and erase all drawings"
|
msgid "Leave"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Escape key"
|
msgid "Select eraser <span alpha=\"50%\">(while starting drawing)</span>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid ""
|
msgid "Duplicate <span alpha=\"50%\">(while starting handling)</span>"
|
||||||
"Start drawing with Super+Alt+D\n"
|
|
||||||
"Then save your beautiful work by taking a screenshot"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Global"
|
msgid "Rotate rectangle, polygon, polyline"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Internal"
|
msgid "Extend circle to ellipse"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "(in drawing mode)"
|
msgid "Curve line"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Smooth stroke during the drawing process"
|
msgid "Smooth free drawing outline"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "You can smooth the stroke afterward\nSee"
|
msgid "Do not preserve image ratio"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Change the style"
|
msgid "Rotate <span alpha=\"50%\">(while moving)</span>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "See stylesheet.css"
|
msgid "Stretch <span alpha=\"50%\">(while resizing)</span>"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid ""
|
msgid "Inverse <span alpha=\"50%\">(while mirroring)</span>"
|
||||||
"<u>Note</u>: When you save elements made with eraser in a SVG file,\n"
|
|
||||||
"they are colored with background color, transparent if it is disabled.\n"
|
|
||||||
"(See \"Add a drawing background\" or edit the SVG file afterwards)"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid ""
|
msgid "Drawing on the desktop"
|
||||||
"<span size=\"small\">This program comes with ABSOLUTELY NO WARRANTY.\n"
|
|
||||||
"See the <a href=\"https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"
|
|
||||||
"\">GNU General Public License, version 2 or later</a> for details.</span>"
|
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Credits"
|
msgid "<i>Draw On Your Screen</i> becomes <i>Draw On Your Desktop</i>"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Erase all drawings"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disable panel indicator"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Disable on-screen notifications"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Persistent over toggles"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Drawing remains when toggling drawing mode"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Persistent over restarts"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Drawing is automatically saved to a file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Enter/leave drawing mode"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: there is a similar text in GNOME Boxes (https://gitlab.gnome.org/GNOME/gnome-boxes/tree/master/po)
|
||||||
|
msgid "Grab/ungrab keyboard and pointer"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Background color"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The color of the drawing area background"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Automatic dash array"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Compute the lengths from the line width"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Dash array on"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The dash length in pixels"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Dash array off"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The gap between the dashes in pixels"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Dash offset"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The dash offset in pixels"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Grid overlay color"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The color of the lines"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Automatic grid overlay line"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Compute the lengths from the screen size"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Grid overlay line spacing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The gap between lines in pixels"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Grid overlay line width"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The line width in pixels"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Image location"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The location of the directory in which the image tool picks"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Color palettes"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The palettes of drawing colors"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Automatic square area size"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Compute the area size from the screen size"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Square area size"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "The size of the area in pixels"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Decrement line width"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Decrement line width even more"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Erase last brushstroke"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Export drawing to a SVG file"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Increment line width"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Increment line width even more"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open next drawing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open preferences"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Open previous drawing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Add images from the clipboard"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Redo"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Save drawing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 1"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 2"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 3"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 4"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 5"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 6"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 7"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 8"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select color 9"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select ellipse tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select image tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select line tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select mirror tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select move tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select free drawing"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select polygon tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select polyline tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select rectangle tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select resize tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select text tool"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Smooth last brushstroke"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change color palette"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change color palette (reverse)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Toggle fill/outline"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Toggle fill rule"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change font family"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change font family (reverse)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change font style"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change font weight"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change image"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change image (reverse)"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change linecap"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change linejoin"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Change text alignment"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Add a drawing background"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Add a grid overlay"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Show help"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Hide panel and dock"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: It is an action: "Make the drawing area a square"
|
||||||
|
msgid "Square drawing area"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Undo"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,725 @@
|
||||||
|
# <language> translations for Draw On Your Screen.
|
||||||
|
# Copyright (C) 2019 Listed translators
|
||||||
|
#
|
||||||
|
# This file is distributed under the same license as Draw On Your Screen.
|
||||||
|
# Abakkk, 2020.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Draw On Your Screen 6.1\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://codeberg.org/som/DrawOnYourScreen/issues\n"
|
||||||
|
"POT-Creation-Date: 2021-02-17 14:14+0100\n"
|
||||||
|
"PO-Revision-Date: 2021-02-20 01:06+0100\n"
|
||||||
|
"Last-Translator: Abakkk\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"Language: fr\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
|
||||||
|
"X-Generator: Poedit 2.4.1\n"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid ""
|
||||||
|
"Press <i>%s</i> to get\n"
|
||||||
|
"a fourth control point"
|
||||||
|
msgstr ""
|
||||||
|
"Appuyez sur <i>%s</i> pour avoir\n"
|
||||||
|
"un quatrième point de contrôle"
|
||||||
|
|
||||||
|
msgid "Mark a point of symmetry"
|
||||||
|
msgstr "Marquez un centre de symétrie"
|
||||||
|
|
||||||
|
msgid "Draw a line of symmetry"
|
||||||
|
msgstr "Tracez un axe de symétrie"
|
||||||
|
|
||||||
|
#. Translators: initial content of the text area
|
||||||
|
msgctxt "text-area-content"
|
||||||
|
msgid "Text"
|
||||||
|
msgstr "Texte"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Press <i>%s</i> to mark vertices"
|
||||||
|
msgstr ""
|
||||||
|
"Appuyez sur <i>%s</i> \n"
|
||||||
|
"pour marquer un sommet"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid ""
|
||||||
|
"Press <i>%s</i>\n"
|
||||||
|
"to start a new line"
|
||||||
|
msgstr ""
|
||||||
|
"Appuyez sur <i>%s</i>\n"
|
||||||
|
"pour démarrer une nouvelle ligne"
|
||||||
|
|
||||||
|
#. Translators: It is displayed in an OSD notification to ask the user to start picking, so it should use the imperative mood.
|
||||||
|
msgctxt "osd-notification"
|
||||||
|
msgid "Pick a color"
|
||||||
|
msgstr ""
|
||||||
|
"Prélève une couleur\n"
|
||||||
|
"avec la pipette"
|
||||||
|
|
||||||
|
#. Translators: "released" as the opposite of "grabbed"
|
||||||
|
msgid "Keyboard and pointer released"
|
||||||
|
msgstr "Clavier et pointeur libérés"
|
||||||
|
|
||||||
|
msgid "Keyboard and pointer grabbed"
|
||||||
|
msgstr "Clavier et pointeur saisis"
|
||||||
|
|
||||||
|
msgid "Leaving drawing mode"
|
||||||
|
msgstr "Sortie du mode dessin"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Press <i>%s</i> for help"
|
||||||
|
msgstr ""
|
||||||
|
"Appuyez sur <i>%s</i>\n"
|
||||||
|
"pour accéder à l’aide"
|
||||||
|
|
||||||
|
msgid "Entering drawing mode"
|
||||||
|
msgstr "Entrée dans le mode dessin"
|
||||||
|
|
||||||
|
msgid "Global"
|
||||||
|
msgstr "Global"
|
||||||
|
|
||||||
|
msgid "Internal"
|
||||||
|
msgstr "Interne"
|
||||||
|
|
||||||
|
msgid "System"
|
||||||
|
msgstr "Système"
|
||||||
|
|
||||||
|
msgid "Dashed line"
|
||||||
|
msgstr "Ligne en pointillés"
|
||||||
|
|
||||||
|
#. Translators: as the alternative to "Dashed line"
|
||||||
|
msgid "Full line"
|
||||||
|
msgstr "Ligne pleine"
|
||||||
|
|
||||||
|
msgid "Fill"
|
||||||
|
msgstr "Remplir"
|
||||||
|
|
||||||
|
#. Translators: as the alternative to "Fill"
|
||||||
|
msgid "Outline"
|
||||||
|
msgstr "Contour"
|
||||||
|
|
||||||
|
#. Translators: fill-rule SVG attribute
|
||||||
|
msgid "Nonzero"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Evenodd"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: generic font-family SVG attribute
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Sans-Serif"
|
||||||
|
msgstr "Sans empattement"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Serif"
|
||||||
|
msgstr "Avec empattement"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Monospace"
|
||||||
|
msgstr "Chasse fixe"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Cursive"
|
||||||
|
msgstr "Cursive"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Fantasy"
|
||||||
|
msgstr "Fantaisiste"
|
||||||
|
|
||||||
|
#. Translators: font-style SVG attribute
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr "Normal"
|
||||||
|
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Oblique"
|
||||||
|
msgstr "Oblique"
|
||||||
|
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Italic"
|
||||||
|
msgstr "Italique"
|
||||||
|
|
||||||
|
#. Translators: font-weight SVG attribute
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Thin"
|
||||||
|
msgstr "Fin"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Light"
|
||||||
|
msgstr "Ultraléger"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Light"
|
||||||
|
msgstr "Léger"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Semi Light"
|
||||||
|
msgstr "Semi-léger"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Book"
|
||||||
|
msgstr "Livre"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr "Normal"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Medium"
|
||||||
|
msgstr "Moyen"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Semi Bold"
|
||||||
|
msgstr "Semi-gras"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Bold"
|
||||||
|
msgstr "Gras"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Bold"
|
||||||
|
msgstr "Ultragras"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Heavy"
|
||||||
|
msgstr "Lourd"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Heavy"
|
||||||
|
msgstr "Ultralourd"
|
||||||
|
|
||||||
|
#. Translators: stroke-linecap SVG attribute
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Butt"
|
||||||
|
msgstr "Net"
|
||||||
|
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Round"
|
||||||
|
msgstr "Arrondi"
|
||||||
|
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Square"
|
||||||
|
msgstr "Carré"
|
||||||
|
|
||||||
|
#. Translators: stroke-linejoin SVG attribute
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Miter"
|
||||||
|
msgstr "Pointu"
|
||||||
|
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Round"
|
||||||
|
msgstr "Arrondi"
|
||||||
|
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Bevel"
|
||||||
|
msgstr "Biseauté"
|
||||||
|
|
||||||
|
#. Translators: value in pixel unit (e.g. "5 px")
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%f px"
|
||||||
|
msgstr "%f px"
|
||||||
|
|
||||||
|
msgid "Left aligned"
|
||||||
|
msgstr "Aligné à gauche"
|
||||||
|
|
||||||
|
msgid "Centered"
|
||||||
|
msgstr "Centré"
|
||||||
|
|
||||||
|
msgid "Right aligned"
|
||||||
|
msgstr "Aligné à droite"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Free drawing"
|
||||||
|
msgstr "Dessin libre"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Line"
|
||||||
|
msgstr "Ligne"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Ellipse"
|
||||||
|
msgstr "Ellipse"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Rectangle"
|
||||||
|
msgstr "Rectangle"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Text"
|
||||||
|
msgstr "Texte"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Polygon"
|
||||||
|
msgstr "Polygone"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Polyline"
|
||||||
|
msgstr "Ligne brisée"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Image"
|
||||||
|
msgstr "Image"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Move"
|
||||||
|
msgstr "Déplacer"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Resize"
|
||||||
|
msgstr "Redimensionner"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Mirror"
|
||||||
|
msgstr "Miroir"
|
||||||
|
|
||||||
|
msgid "Erase"
|
||||||
|
msgstr "Effacer"
|
||||||
|
|
||||||
|
msgid "Smooth"
|
||||||
|
msgstr "Lisser"
|
||||||
|
|
||||||
|
msgid "Open drawing"
|
||||||
|
msgstr "Ouvrir un dessin"
|
||||||
|
|
||||||
|
msgid "Save drawing as…"
|
||||||
|
msgstr "Enregistrer le dessin sous…"
|
||||||
|
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr "Palette"
|
||||||
|
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Couleur"
|
||||||
|
|
||||||
|
#. Translators: It is displayed in a menu button tooltip or as a shortcut action description, so it should NOT use the imperative mood.
|
||||||
|
msgid "Pick a color"
|
||||||
|
msgstr "Prélever une couleur avec la pipette"
|
||||||
|
|
||||||
|
msgid "Add to images"
|
||||||
|
msgstr "Ajouter aux images"
|
||||||
|
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "Supprimer"
|
||||||
|
|
||||||
|
msgid "Type a name"
|
||||||
|
msgstr "Saisissez un nom"
|
||||||
|
|
||||||
|
#. Translators: "Preferences" page in preferences
|
||||||
|
msgid "Preferences"
|
||||||
|
msgstr "Préférences"
|
||||||
|
|
||||||
|
#. Translators: "Drawing" page in preferences
|
||||||
|
msgid "Drawing"
|
||||||
|
msgstr "Dessin"
|
||||||
|
|
||||||
|
#. Translators: "About" page in preferences
|
||||||
|
msgid "About"
|
||||||
|
msgstr "À propos"
|
||||||
|
|
||||||
|
#. Translators: you are free to translate the extension name, that is displayed in About page, or not
|
||||||
|
msgid "Draw On You Screen"
|
||||||
|
msgstr "Dessine Sur Ton Écran"
|
||||||
|
|
||||||
|
#. Translators: version number in "About" page
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Version %f"
|
||||||
|
msgstr "Version %f"
|
||||||
|
|
||||||
|
#. Translators: you are free to translate the extension description, that is displayed in About page, or not
|
||||||
|
msgid ""
|
||||||
|
"Start drawing with Super+Alt+D and save your beautiful work by taking a "
|
||||||
|
"screenshot"
|
||||||
|
msgstr ""
|
||||||
|
"Commence à dessiner avec Super+Alt+D et sauvegarde ton beau travail en "
|
||||||
|
"faisant une capture d’écran"
|
||||||
|
|
||||||
|
#. Translators: add your name here or keep it empty, it will be displayed in about page, e.g.
|
||||||
|
#. msgstr ""
|
||||||
|
#. "translator1\n"
|
||||||
|
#. "<a href=\"mailto:translator2@mail.org\">translator2</a>\n"
|
||||||
|
#. "<a href=\"https://...\">translator3</a>"
|
||||||
|
msgid "translator-credits"
|
||||||
|
msgstr "<a href=\"https://codeberg.org/abak\">Abakkk</a>"
|
||||||
|
|
||||||
|
msgid "Palettes"
|
||||||
|
msgstr "Palettes"
|
||||||
|
|
||||||
|
msgid "Add a new palette"
|
||||||
|
msgstr "Ajouter une nouvelle palette"
|
||||||
|
|
||||||
|
msgid "Area"
|
||||||
|
msgstr "Zone de dessin"
|
||||||
|
|
||||||
|
msgid "Auto"
|
||||||
|
msgstr "Auto"
|
||||||
|
|
||||||
|
msgid "Grid overlay line"
|
||||||
|
msgstr "Dimensions de la grille"
|
||||||
|
|
||||||
|
msgid "Tools"
|
||||||
|
msgstr "Outils"
|
||||||
|
|
||||||
|
msgid "Dash array"
|
||||||
|
msgstr "Taille des pointillés"
|
||||||
|
|
||||||
|
msgid "Reset settings"
|
||||||
|
msgstr "Rétablir les paramètres"
|
||||||
|
|
||||||
|
msgid "Rename the palette"
|
||||||
|
msgstr "Renommer la palette"
|
||||||
|
|
||||||
|
msgid "Remove the palette"
|
||||||
|
msgstr "Supprimer la palette"
|
||||||
|
|
||||||
|
#. Translators: default name of a new palette
|
||||||
|
msgid "New palette"
|
||||||
|
msgstr "Nouvelle palette"
|
||||||
|
|
||||||
|
msgid "In drawing mode"
|
||||||
|
msgstr "Dans le mode dessin"
|
||||||
|
|
||||||
|
msgid "Draw"
|
||||||
|
msgstr "Dessiner"
|
||||||
|
|
||||||
|
msgid "Left click"
|
||||||
|
msgstr "Clic gauche"
|
||||||
|
|
||||||
|
msgid "Menu"
|
||||||
|
msgstr "Menu"
|
||||||
|
|
||||||
|
msgid "Right click"
|
||||||
|
msgstr "Clic droit"
|
||||||
|
|
||||||
|
msgid "Center click"
|
||||||
|
msgstr "Clic du milieu"
|
||||||
|
|
||||||
|
msgid "Increment/decrement line width"
|
||||||
|
msgstr "Augmenter/diminuer l’épaisseur du trait"
|
||||||
|
|
||||||
|
msgid "Scroll"
|
||||||
|
msgstr "Molette"
|
||||||
|
|
||||||
|
#. Translators: %s are key labels (Ctrl+F1 and Ctrl+F9)
|
||||||
|
msgid "Select color"
|
||||||
|
msgstr "Sélectionner une couleur"
|
||||||
|
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%s … %s"
|
||||||
|
msgstr "%s … %s"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
msgid "Ignore pointer movement"
|
||||||
|
msgstr "Ignorer le déplacement du pointeur"
|
||||||
|
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%s held"
|
||||||
|
msgstr "%s tenu"
|
||||||
|
|
||||||
|
msgid "Leave"
|
||||||
|
msgstr "Quitter"
|
||||||
|
|
||||||
|
msgid "Select eraser <span alpha=\"50%\">(while starting drawing)</span>"
|
||||||
|
msgstr ""
|
||||||
|
"Sélectionner la gomme <span alpha=\"50%\">(en commençant à dessiner)</span>"
|
||||||
|
|
||||||
|
msgid "Duplicate <span alpha=\"50%\">(while starting handling)</span>"
|
||||||
|
msgstr "Dupliquer <span alpha=\"50%\">(en commençant à manipuler)</span>"
|
||||||
|
|
||||||
|
msgid "Rotate rectangle, polygon, polyline"
|
||||||
|
msgstr "Faire pivoter un rectangle, un polygone ou une ligne brisée"
|
||||||
|
|
||||||
|
msgid "Extend circle to ellipse"
|
||||||
|
msgstr "Étirer un cercle en ellipse"
|
||||||
|
|
||||||
|
msgid "Curve line"
|
||||||
|
msgstr "Courber une ligne"
|
||||||
|
|
||||||
|
msgid "Smooth free drawing outline"
|
||||||
|
msgstr "Lisser le contour d’un tracé libre"
|
||||||
|
|
||||||
|
msgid "Do not preserve image ratio"
|
||||||
|
msgstr "Ne pas préserver le ratio d’une image"
|
||||||
|
|
||||||
|
msgid "Rotate <span alpha=\"50%\">(while moving)</span>"
|
||||||
|
msgstr "Faire pivoter <span alpha=\"50%\">(lors d’un déplacement)</span>"
|
||||||
|
|
||||||
|
msgid "Stretch <span alpha=\"50%\">(while resizing)</span>"
|
||||||
|
msgstr "Étirer <span alpha=\"50%\">(lors d’un redimensionnement)</span>"
|
||||||
|
|
||||||
|
msgid "Inverse <span alpha=\"50%\">(while mirroring)</span>"
|
||||||
|
msgstr "Inverser <span alpha=\"50%\">(lors d’une réflexion)</span>"
|
||||||
|
|
||||||
|
msgid "Drawing on the desktop"
|
||||||
|
msgstr "Dessin sur le bureau"
|
||||||
|
|
||||||
|
msgid "<i>Draw On Your Screen</i> becomes <i>Draw On Your Desktop</i>"
|
||||||
|
msgstr "<i>Dessine Sur Ton Écran</i> devient <i>Dessine Sur Ton Bureau</i>"
|
||||||
|
|
||||||
|
msgid "Erase all drawings"
|
||||||
|
msgstr "Effacer tous les dessins"
|
||||||
|
|
||||||
|
msgid "Disable panel indicator"
|
||||||
|
msgstr "Désactiver l’indicateur du panneau"
|
||||||
|
|
||||||
|
msgid "Disable on-screen notifications"
|
||||||
|
msgstr "Désactiver les notifications à l’écran"
|
||||||
|
|
||||||
|
msgid "Persistent over toggles"
|
||||||
|
msgstr "Persistant lors des basculements"
|
||||||
|
|
||||||
|
msgid "Drawing remains when toggling drawing mode"
|
||||||
|
msgstr "Le dessin n’est pas effacé à la sortie du mode dessin"
|
||||||
|
|
||||||
|
msgid "Persistent over restarts"
|
||||||
|
msgstr "Persistant lors d’un redémarrage"
|
||||||
|
|
||||||
|
msgid "Drawing is automatically saved to a file"
|
||||||
|
msgstr "Le dessin est automatiquement sauvegardé dans un fichier"
|
||||||
|
|
||||||
|
msgid "Enter/leave drawing mode"
|
||||||
|
msgstr "Entrer/sortir du mode dessin"
|
||||||
|
|
||||||
|
#. Translators: there is a similar text in GNOME Boxes (https://gitlab.gnome.org/GNOME/gnome-boxes/tree/master/po)
|
||||||
|
msgid "Grab/ungrab keyboard and pointer"
|
||||||
|
msgstr "Saisir/libérer le clavier et le pointeur"
|
||||||
|
|
||||||
|
msgid "Background color"
|
||||||
|
msgstr "Couleur en arrière-plan"
|
||||||
|
|
||||||
|
msgid "The color of the drawing area background"
|
||||||
|
msgstr "La couleur du fond de la zone de dessin"
|
||||||
|
|
||||||
|
msgid "Automatic dash array"
|
||||||
|
msgstr "Taille des pointillés automatique"
|
||||||
|
|
||||||
|
msgid "Compute the lengths from the line width"
|
||||||
|
msgstr "Calculer la taille en fonction de l’épaisseur du trait"
|
||||||
|
|
||||||
|
msgid "Dash array on"
|
||||||
|
msgstr "Taille des pointillés (plein)"
|
||||||
|
|
||||||
|
msgid "The dash length in pixels"
|
||||||
|
msgstr "La longueur des pointillés en pixels"
|
||||||
|
|
||||||
|
msgid "Dash array off"
|
||||||
|
msgstr "Taille des pointillés (vide)"
|
||||||
|
|
||||||
|
msgid "The gap between the dashes in pixels"
|
||||||
|
msgstr "L’espacement des pointillés en pixels"
|
||||||
|
|
||||||
|
msgid "Dash offset"
|
||||||
|
msgstr "Décalage des pointillés"
|
||||||
|
|
||||||
|
msgid "The dash offset in pixels"
|
||||||
|
msgstr "Le décalage des pointillés en pixels"
|
||||||
|
|
||||||
|
msgid "Grid overlay color"
|
||||||
|
msgstr "Couleur de la grille"
|
||||||
|
|
||||||
|
msgid "The color of the lines"
|
||||||
|
msgstr "La couleur des lignes"
|
||||||
|
|
||||||
|
msgid "Automatic grid overlay line"
|
||||||
|
msgstr "Dimension de la grille automatique"
|
||||||
|
|
||||||
|
msgid "Compute the lengths from the screen size"
|
||||||
|
msgstr "Calculer les dimensions en fonction de la taille de l’écran"
|
||||||
|
|
||||||
|
msgid "Grid overlay line spacing"
|
||||||
|
msgstr "Espacement des lignes de la grille"
|
||||||
|
|
||||||
|
msgid "The gap between lines in pixels"
|
||||||
|
msgstr "L’espacement des lignes en pixels"
|
||||||
|
|
||||||
|
msgid "Grid overlay line width"
|
||||||
|
msgstr "Épaisseur des lignes de la grille"
|
||||||
|
|
||||||
|
msgid "The line width in pixels"
|
||||||
|
msgstr "L’épaisseur des lignes en pixels"
|
||||||
|
|
||||||
|
msgid "Image location"
|
||||||
|
msgstr "Emplacement des images"
|
||||||
|
|
||||||
|
msgid "The location of the directory in which the image tool picks"
|
||||||
|
msgstr "L’emplacement du répertoire source pour l’outil image"
|
||||||
|
|
||||||
|
msgid "Color palettes"
|
||||||
|
msgstr "Palettes de couleurs"
|
||||||
|
|
||||||
|
msgid "The palettes of drawing colors"
|
||||||
|
msgstr "Les palettes de couleurs pour dessiner"
|
||||||
|
|
||||||
|
msgid "Automatic square area size"
|
||||||
|
msgstr "Taille de la zone carrée automatique"
|
||||||
|
|
||||||
|
msgid "Compute the area size from the screen size"
|
||||||
|
msgstr "Calculer la taille de la zone en fonction de la taille de l’écran"
|
||||||
|
|
||||||
|
msgid "Square area size"
|
||||||
|
msgstr "Taille de la zone carrée"
|
||||||
|
|
||||||
|
msgid "The size of the area in pixels"
|
||||||
|
msgstr "La taille de la zone en pixels"
|
||||||
|
|
||||||
|
msgid "Decrement line width"
|
||||||
|
msgstr "Diminuer l’épaisseur du trait"
|
||||||
|
|
||||||
|
msgid "Decrement line width even more"
|
||||||
|
msgstr "Diminuer encore plus l’épaisseur du trait"
|
||||||
|
|
||||||
|
msgid "Erase last brushstroke"
|
||||||
|
msgstr "Effacer le dernier tracé"
|
||||||
|
|
||||||
|
msgid "Export drawing to a SVG file"
|
||||||
|
msgstr "Exporter le dessin vers un fichier SVG"
|
||||||
|
|
||||||
|
msgid "Increment line width"
|
||||||
|
msgstr "Augmenter l’épaisseur du trait"
|
||||||
|
|
||||||
|
msgid "Increment line width even more"
|
||||||
|
msgstr "Augmenter encore plus l’épaisseur du trait"
|
||||||
|
|
||||||
|
msgid "Open next drawing"
|
||||||
|
msgstr "Ouvrir le dessin suivant"
|
||||||
|
|
||||||
|
msgid "Open preferences"
|
||||||
|
msgstr "Ouvrir les préférences"
|
||||||
|
|
||||||
|
msgid "Open previous drawing"
|
||||||
|
msgstr "Ouvrir le dessin précédent"
|
||||||
|
|
||||||
|
msgid "Add images from the clipboard"
|
||||||
|
msgstr "Ajouter des images depuis le presse-papiers"
|
||||||
|
|
||||||
|
msgid "Redo"
|
||||||
|
msgstr "Rétablir"
|
||||||
|
|
||||||
|
msgid "Save drawing"
|
||||||
|
msgstr "Enregistrer le dessin"
|
||||||
|
|
||||||
|
msgid "Select color 1"
|
||||||
|
msgstr "Sélectionner la couleur 1"
|
||||||
|
|
||||||
|
msgid "Select color 2"
|
||||||
|
msgstr "Sélectionner la couleur 2"
|
||||||
|
|
||||||
|
msgid "Select color 3"
|
||||||
|
msgstr "Sélectionner la couleur 3"
|
||||||
|
|
||||||
|
msgid "Select color 4"
|
||||||
|
msgstr "Sélectionner la couleur 4"
|
||||||
|
|
||||||
|
msgid "Select color 5"
|
||||||
|
msgstr "Sélectionner la couleur 5"
|
||||||
|
|
||||||
|
msgid "Select color 6"
|
||||||
|
msgstr "Sélectionner la couleur 6"
|
||||||
|
|
||||||
|
msgid "Select color 7"
|
||||||
|
msgstr "Sélectionner la couleur 7"
|
||||||
|
|
||||||
|
msgid "Select color 8"
|
||||||
|
msgstr "Sélectionner la couleur 8"
|
||||||
|
|
||||||
|
msgid "Select color 9"
|
||||||
|
msgstr "Sélectionner la couleur 9"
|
||||||
|
|
||||||
|
msgid "Select ellipse tool"
|
||||||
|
msgstr "Sélectionner l’outil ellipse"
|
||||||
|
|
||||||
|
msgid "Select image tool"
|
||||||
|
msgstr "Sélectionner l’outil image"
|
||||||
|
|
||||||
|
msgid "Select line tool"
|
||||||
|
msgstr "Sélectionner l’outil ligne"
|
||||||
|
|
||||||
|
msgid "Select mirror tool"
|
||||||
|
msgstr "Sélectionner l’outil miroir"
|
||||||
|
|
||||||
|
msgid "Select move tool"
|
||||||
|
msgstr "Sélectionner l’outil déplacement"
|
||||||
|
|
||||||
|
msgid "Select free drawing"
|
||||||
|
msgstr "Dessin libre"
|
||||||
|
|
||||||
|
msgid "Select polygon tool"
|
||||||
|
msgstr "Sélectionner l’outil polygone"
|
||||||
|
|
||||||
|
msgid "Select polyline tool"
|
||||||
|
msgstr "Sélectionner l’outil ligne brisée"
|
||||||
|
|
||||||
|
msgid "Select rectangle tool"
|
||||||
|
msgstr "Sélectionner l’outil rectangle"
|
||||||
|
|
||||||
|
msgid "Select resize tool"
|
||||||
|
msgstr "Sélectionner l’outil redimensionnement"
|
||||||
|
|
||||||
|
msgid "Select text tool"
|
||||||
|
msgstr "Sélectionner l’outil texte"
|
||||||
|
|
||||||
|
msgid "Smooth last brushstroke"
|
||||||
|
msgstr "Lisser le dernier tracé"
|
||||||
|
|
||||||
|
msgid "Change color palette"
|
||||||
|
msgstr "Changer la palette de couleurs"
|
||||||
|
|
||||||
|
msgid "Change color palette (reverse)"
|
||||||
|
msgstr "Changer la palette de couleurs (à rebours)"
|
||||||
|
|
||||||
|
msgid "Toggle fill/outline"
|
||||||
|
msgstr "Alterner remplissage/contour"
|
||||||
|
|
||||||
|
msgid "Toggle fill rule"
|
||||||
|
msgstr "Alterner la règle de remplissage"
|
||||||
|
|
||||||
|
msgid "Change font family"
|
||||||
|
msgstr "Changer de famille de font"
|
||||||
|
|
||||||
|
msgid "Change font family (reverse)"
|
||||||
|
msgstr "Changer de famille de font (à rebours)"
|
||||||
|
|
||||||
|
msgid "Change font style"
|
||||||
|
msgstr "Changer de style de font"
|
||||||
|
|
||||||
|
msgid "Change font weight"
|
||||||
|
msgstr "Changer de graisse de font"
|
||||||
|
|
||||||
|
msgid "Change image"
|
||||||
|
msgstr "Changer d’image"
|
||||||
|
|
||||||
|
msgid "Change image (reverse)"
|
||||||
|
msgstr "Changer d’image (à rebours)"
|
||||||
|
|
||||||
|
msgid "Change linecap"
|
||||||
|
msgstr "Modifier la forme de l’extrémité des lignes"
|
||||||
|
|
||||||
|
msgid "Change linejoin"
|
||||||
|
msgstr "Modifier la jointure des segments de ligne"
|
||||||
|
|
||||||
|
msgid "Change text alignment"
|
||||||
|
msgstr "Modifier l’alignement du texte"
|
||||||
|
|
||||||
|
msgid "Add a drawing background"
|
||||||
|
msgstr "Ajouter une couleur de fond au dessin"
|
||||||
|
|
||||||
|
msgid "Add a grid overlay"
|
||||||
|
msgstr "Ajouter une grille en surcouche"
|
||||||
|
|
||||||
|
msgid "Show help"
|
||||||
|
msgstr "Afficher l’aide"
|
||||||
|
|
||||||
|
msgid "Hide panel and dock"
|
||||||
|
msgstr "Cacher le panneau et le dock"
|
||||||
|
|
||||||
|
#. Translators: It is an action: "Make the drawing area a square"
|
||||||
|
msgid "Square drawing area"
|
||||||
|
msgstr "Rendre la zone de dessin carrée"
|
||||||
|
|
||||||
|
msgid "Undo"
|
||||||
|
msgstr "Retirer"
|
||||||
|
|
@ -0,0 +1,350 @@
|
||||||
|
# <language> translations for Draw On Your Screen.
|
||||||
|
# Copyright (C) 2019 Listed translators
|
||||||
|
#
|
||||||
|
# This file is distributed under the same license as Draw On Your Screen.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Draw On Your Desktop\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://codeberg.org/som/DrawOnYourScreen/issues\n"
|
||||||
|
"POT-Creation-Date: 2020-03-06 18:46+0100\n"
|
||||||
|
"PO-Revision-Date: 2020-03-06 19:05+0100\n"
|
||||||
|
"Language-Team: Albano Battistella <albano_battistella@hotmail.com>\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: Poedit 1.8.7.1\n"
|
||||||
|
"Last-Translator: albano battistella <albano_battistella@hotmail.com>\n"
|
||||||
|
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||||
|
"Language: it_IT\n"
|
||||||
|
|
||||||
|
# Add your name here, for example:
|
||||||
|
# (add "\n" as separator if there is many translators)
|
||||||
|
# msgid "translator-credits"
|
||||||
|
# msgstr "Me"
|
||||||
|
# or, with mail:
|
||||||
|
# msgid "translator-credits"
|
||||||
|
# msgstr "<a href=\"mailto:me@mail.org\">Me</a>"
|
||||||
|
# or, with page:
|
||||||
|
# msgid "translator-credits"
|
||||||
|
# msgstr "<a href=\"https://...\">Me</a>"
|
||||||
|
# else keep it empty.
|
||||||
|
# It will be displayed in about page
|
||||||
|
msgid "translator-credits"
|
||||||
|
msgstr "Albano Battistella"
|
||||||
|
|
||||||
|
#: extension.js
|
||||||
|
msgid "Leaving drawing mode"
|
||||||
|
msgstr "Lascia la modalità di disegno"
|
||||||
|
|
||||||
|
msgid "Press Ctrl + F1 for help"
|
||||||
|
msgstr "Premi Ctrl + F1 per aiuto"
|
||||||
|
|
||||||
|
msgid "Entering drawing mode"
|
||||||
|
msgstr "Entra in modalità disegno"
|
||||||
|
|
||||||
|
#: draw.js
|
||||||
|
msgid "Free drawing"
|
||||||
|
msgstr "Disegno libero"
|
||||||
|
|
||||||
|
msgid "Line"
|
||||||
|
msgstr "Linea"
|
||||||
|
|
||||||
|
msgid "Ellipse"
|
||||||
|
msgstr "Ellisse"
|
||||||
|
|
||||||
|
msgid "Rectangle"
|
||||||
|
msgstr "Rettangolo"
|
||||||
|
|
||||||
|
msgid "Text"
|
||||||
|
msgstr "Testo"
|
||||||
|
|
||||||
|
msgid "Fill"
|
||||||
|
msgstr "Riempi"
|
||||||
|
|
||||||
|
msgid "Stroke"
|
||||||
|
msgstr "Tratto"
|
||||||
|
|
||||||
|
msgid "Dashed line"
|
||||||
|
msgstr "Linea tratteggiata"
|
||||||
|
|
||||||
|
msgid "Full line"
|
||||||
|
msgstr "Linea piena"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Type your text\n"
|
||||||
|
"and press Enter"
|
||||||
|
msgstr ""
|
||||||
|
"Digita il tuo testo\n"
|
||||||
|
"e premere Invio"
|
||||||
|
|
||||||
|
msgid "Screenshot"
|
||||||
|
msgstr "Screenshot"
|
||||||
|
|
||||||
|
msgid "Screenshot to clipboard"
|
||||||
|
msgstr "Screenshot negli appunti"
|
||||||
|
|
||||||
|
msgid "Area screenshot"
|
||||||
|
msgstr "Area screenshot"
|
||||||
|
|
||||||
|
msgid "Area screenshot to clipboard"
|
||||||
|
msgstr "Area screenshot negli appunti"
|
||||||
|
|
||||||
|
msgid "System"
|
||||||
|
msgstr "Sistema"
|
||||||
|
|
||||||
|
msgid "Undo"
|
||||||
|
msgstr "Annulla"
|
||||||
|
|
||||||
|
msgid "Redo"
|
||||||
|
msgstr "Rifai"
|
||||||
|
|
||||||
|
msgid "Erase"
|
||||||
|
msgstr "Cancella"
|
||||||
|
|
||||||
|
msgid "Smooth"
|
||||||
|
msgstr "Liscio"
|
||||||
|
|
||||||
|
msgid "Dashed"
|
||||||
|
msgstr "Tratteggiato"
|
||||||
|
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Colore"
|
||||||
|
|
||||||
|
msgid "Open drawing"
|
||||||
|
msgstr "Apri disegno"
|
||||||
|
|
||||||
|
msgid "Save drawing"
|
||||||
|
msgstr "Salva disegno"
|
||||||
|
|
||||||
|
#: prefs.js
|
||||||
|
msgid "Preferences"
|
||||||
|
msgstr "Preferenze"
|
||||||
|
|
||||||
|
msgid "About"
|
||||||
|
msgstr "Informazioni su"
|
||||||
|
|
||||||
|
# GLOBAL_KEYBINDINGS
|
||||||
|
msgid "Enter/leave drawing mode"
|
||||||
|
msgstr "Entra/esci dalla modalità disegno"
|
||||||
|
|
||||||
|
msgid "Erase all drawings"
|
||||||
|
msgstr "Cancella tutti i disegni"
|
||||||
|
|
||||||
|
# INTERNAL_KEYBINDINGS
|
||||||
|
msgid "Undo last brushstroke"
|
||||||
|
msgstr "Annulla l'ultima pennellata"
|
||||||
|
|
||||||
|
msgid "Redo last brushstroke"
|
||||||
|
msgstr "Ripeti l'ultima pennellata"
|
||||||
|
|
||||||
|
msgid "Erase last brushstroke"
|
||||||
|
msgstr "Cancella l'ultima pennellata"
|
||||||
|
|
||||||
|
msgid "Smooth last brushstroke"
|
||||||
|
msgstr "Liscia l'ultima pennellata"
|
||||||
|
|
||||||
|
msgid "Select line"
|
||||||
|
msgstr "Seleziona la linea"
|
||||||
|
|
||||||
|
msgid "Select ellipse"
|
||||||
|
msgstr "Seleziona ellisse"
|
||||||
|
|
||||||
|
msgid "Select rectangle"
|
||||||
|
msgstr "Seleziona rettangolo"
|
||||||
|
|
||||||
|
msgid "Select text"
|
||||||
|
msgstr "Seleziona testo"
|
||||||
|
|
||||||
|
msgid "Unselect shape (free drawing)"
|
||||||
|
msgstr "Deseleziona forma (disegno libero)"
|
||||||
|
|
||||||
|
msgid "Toggle fill/stroke"
|
||||||
|
msgstr "Attiva/disattiva riempimento/tratto"
|
||||||
|
|
||||||
|
msgid "Increment line width"
|
||||||
|
msgstr "Incrementa la larghezza della linea"
|
||||||
|
|
||||||
|
msgid "Decrement line width"
|
||||||
|
msgstr "Decrementa la larghezza della linea"
|
||||||
|
|
||||||
|
msgid "Increment line width even more"
|
||||||
|
msgstr "Aumentare la larghezza della linea ancora di più"
|
||||||
|
|
||||||
|
msgid "Decrement line width even more"
|
||||||
|
msgstr "Decrementa la larghezza della linea ancora di più"
|
||||||
|
|
||||||
|
msgid "Change linejoin"
|
||||||
|
msgstr "Cambia entrata linea"
|
||||||
|
|
||||||
|
msgid "Change linecap"
|
||||||
|
msgstr "Cambia il limite di riga"
|
||||||
|
|
||||||
|
# already in draw.js
|
||||||
|
# msgid "Dashed line"
|
||||||
|
# msgstr ""
|
||||||
|
msgid "Change font family (generic name)"
|
||||||
|
msgstr "Cambia la famiglia del font (nome generico)"
|
||||||
|
|
||||||
|
msgid "Change font weight"
|
||||||
|
msgstr "Cambiare spessore del font"
|
||||||
|
|
||||||
|
msgid "Change font style"
|
||||||
|
msgstr "Cambia stile del font"
|
||||||
|
|
||||||
|
msgid "Hide panel and dock"
|
||||||
|
msgstr "Nascondi pannello e dock"
|
||||||
|
|
||||||
|
msgid "Add a drawing background"
|
||||||
|
msgstr "Aggiungi uno sfondo di disegno"
|
||||||
|
|
||||||
|
msgid "Square drawing area"
|
||||||
|
msgstr "Area di disegno quadrata"
|
||||||
|
|
||||||
|
msgid "Open previous drawing"
|
||||||
|
msgstr "Apri il disegno precedente"
|
||||||
|
|
||||||
|
msgid "Open next drawing"
|
||||||
|
msgstr "Apri il prossimo disegno"
|
||||||
|
|
||||||
|
# already in draw.js
|
||||||
|
# msgid "Save drawing"
|
||||||
|
# msgstr ""
|
||||||
|
msgid "Save drawing as a SVG file"
|
||||||
|
msgstr "Salva disegno come file SVG"
|
||||||
|
|
||||||
|
msgid "Edit style"
|
||||||
|
msgstr "Modifica stile"
|
||||||
|
|
||||||
|
msgid "Show help"
|
||||||
|
msgstr "Mostra aiuto"
|
||||||
|
|
||||||
|
# OTHER_SHORTCUTS
|
||||||
|
msgid "Draw"
|
||||||
|
msgstr "Disegno"
|
||||||
|
|
||||||
|
msgid "Left click"
|
||||||
|
msgstr "Clic sinistro"
|
||||||
|
|
||||||
|
msgid "Menu"
|
||||||
|
msgstr "Menu"
|
||||||
|
|
||||||
|
msgid "Right click"
|
||||||
|
msgstr "Clic destro"
|
||||||
|
|
||||||
|
msgid "Center click"
|
||||||
|
msgstr "Clic centrale"
|
||||||
|
|
||||||
|
msgid "Transform shape (when drawing)"
|
||||||
|
msgstr "Trasforma la forma (quando si disegna)"
|
||||||
|
|
||||||
|
msgid "Ctrl key"
|
||||||
|
msgstr "Tasto Ctrl"
|
||||||
|
|
||||||
|
msgid "Increment/decrement line width"
|
||||||
|
msgstr "Incrementa/decrementa larghezza della linea"
|
||||||
|
|
||||||
|
msgid "Scroll"
|
||||||
|
msgstr "Scorri"
|
||||||
|
|
||||||
|
msgid "Select color"
|
||||||
|
msgstr "Seleziona colore"
|
||||||
|
|
||||||
|
msgid "Ctrl+1...9"
|
||||||
|
msgstr "Ctrl+1...9"
|
||||||
|
|
||||||
|
msgid "Select eraser"
|
||||||
|
msgstr "Seleziona gomma"
|
||||||
|
|
||||||
|
msgid "Shift key held"
|
||||||
|
msgstr "Tasto MAIUSC premuto"
|
||||||
|
|
||||||
|
msgid "Ignore pointer movement"
|
||||||
|
msgstr "Ignora il movimento del puntatore"
|
||||||
|
|
||||||
|
msgid "Space key held"
|
||||||
|
msgstr "Tasto spazio tenuto"
|
||||||
|
|
||||||
|
msgid "Leave"
|
||||||
|
msgstr "Lascia"
|
||||||
|
|
||||||
|
msgid "Escape key"
|
||||||
|
msgstr "Tasto Esc"
|
||||||
|
|
||||||
|
# About page
|
||||||
|
# you are free to translate the extension name
|
||||||
|
# msgid "Draw On You Screen"
|
||||||
|
# msgstr ""
|
||||||
|
msgid "Version %d"
|
||||||
|
msgstr "Versione %d"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Start drawing with Super+Alt+D and save your beautiful work by taking a "
|
||||||
|
"screenshot"
|
||||||
|
msgstr ""
|
||||||
|
"Inizia a disegnare con Super+Alt+D e salva il tuo bellissimo lavoro "
|
||||||
|
"scattando uno screenshot"
|
||||||
|
|
||||||
|
# Prefs page
|
||||||
|
msgid "Global"
|
||||||
|
msgstr "Globale"
|
||||||
|
|
||||||
|
msgid "Persistent"
|
||||||
|
msgstr "Persistente"
|
||||||
|
|
||||||
|
msgid "Persistent drawing through session restart"
|
||||||
|
msgstr "Disegno persistente attraverso il riavvio della sessione"
|
||||||
|
|
||||||
|
msgid "Drawing on the desktop"
|
||||||
|
msgstr "Disegno sul desktop"
|
||||||
|
|
||||||
|
msgid "<i>Draw On Your Screen</i> becomes <i>Draw On Your Desktop</i>"
|
||||||
|
msgstr "<i>Draw On Your Screen</i> diventa <i>Draw On Your Desktop</i>"
|
||||||
|
|
||||||
|
msgid "Disable on-screen notifications"
|
||||||
|
msgstr "Disabilita le notifiche sullo schermo"
|
||||||
|
|
||||||
|
msgid "Disable panel indicator"
|
||||||
|
msgstr "Disabilita indicatore pannello"
|
||||||
|
|
||||||
|
msgid "Internal"
|
||||||
|
msgstr "Interno"
|
||||||
|
|
||||||
|
msgid "(in drawing mode)"
|
||||||
|
msgstr "(in modalità disegno)"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"By pressing <b>Ctrl</b> key <b>during</b> the drawing process, you can:\n"
|
||||||
|
" . rotate a rectangle or a text area\n"
|
||||||
|
" . extend and rotate an ellipse\n"
|
||||||
|
" . curve a line (cubic Bezier curve)\n"
|
||||||
|
" . smooth a free drawing stroke (you may prefer to smooth the stroke "
|
||||||
|
"afterward, see <i>“%s”</i>)"
|
||||||
|
msgstr ""
|
||||||
|
" . ruota un rettangolo o area di testo\n"
|
||||||
|
" . estendere e ruotare un'ellisse\n"
|
||||||
|
" . curva una lineA (curva cubica di Bezier)\n"
|
||||||
|
" . uniforma un tratto di disegno libero (in seguito se preferisci levigare "
|
||||||
|
"il tratto , vedi <i>“%s”</i>)"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"<b>Default</b> drawing style attributes (color palette, font, line, dash) "
|
||||||
|
"are defined in an editable <b>css</b> file.\n"
|
||||||
|
"See <i>“%s”</i>."
|
||||||
|
msgstr ""
|
||||||
|
"<b>Predefinito</b> gli attributi dello stile di disegno (tavolozza dei "
|
||||||
|
"colori, font, linea, tratto) sono definiti in modo modificabile <b>css</b> "
|
||||||
|
"file.\n"
|
||||||
|
"Vedi <i>“%s”</i>."
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"<u>Note</u>: When you save elements made with <b>eraser</b> in a <b>SVG</b> "
|
||||||
|
"file, they are colored with background color, transparent if it is "
|
||||||
|
"disabled.\n"
|
||||||
|
"See <i>“%s”</i> or edit the SVG file afterwards."
|
||||||
|
msgstr ""
|
||||||
|
"<u>Nota</u>: Quando salvi elementi realizzati con la <b>gomma</b> in un "
|
||||||
|
"<b>SVG</b> file, sono colorati con il colore di sfondo, trasparenti se "
|
||||||
|
"disabilitati.\n"
|
||||||
|
"Vedi <i>“%s”</i> o modificare il file SVG in seguito."
|
||||||
|
|
@ -0,0 +1,336 @@
|
||||||
|
# <language> translations for Draw On Your Screen.
|
||||||
|
# Copyright (C) 2019 Listed translators
|
||||||
|
#
|
||||||
|
# This file is distributed under the same license as Draw On Your Screen.
|
||||||
|
# Andrew Sazonow <sazonow1980.@gmail.com>, 2019.
|
||||||
|
#
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Draw On Your Screen VERSION\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://codeberg.org/som/DrawOnYourScreen/issues\n"
|
||||||
|
"POT-Creation-Date: 2019-03-04 16:40+0100\n"
|
||||||
|
"PO-Revision-Date: 2019-10-17 17:54+0300\n"
|
||||||
|
"Language-Team: \n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
"X-Generator: Poedit 2.2.1\n"
|
||||||
|
"Last-Translator: Andrew Sazonow <sazonow1980.@gmail.com>\n"
|
||||||
|
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||||
|
"%10<=4 && (n%100<12 || n%100>14) ? 1 : 2);\n"
|
||||||
|
"Language: ru_RU\n"
|
||||||
|
|
||||||
|
msgid "translator-credits"
|
||||||
|
msgstr "<a href=\"mailto:sazonow1980.@gmail.com\">Andrew Sazonow</a>"
|
||||||
|
|
||||||
|
#: extension.js
|
||||||
|
msgid "Leaving drawing mode"
|
||||||
|
msgstr "Выходя из режима рисования"
|
||||||
|
|
||||||
|
msgid "Press Ctrl + F1 for help"
|
||||||
|
msgstr "Нажмите Ctrl + F1 для справки"
|
||||||
|
|
||||||
|
msgid "Entering drawing mode"
|
||||||
|
msgstr "Вход в режим рисования"
|
||||||
|
|
||||||
|
#: draw.js
|
||||||
|
msgid "Free drawing"
|
||||||
|
msgstr "Свободный рисунок"
|
||||||
|
|
||||||
|
msgid "Line"
|
||||||
|
msgstr "Линия"
|
||||||
|
|
||||||
|
msgid "Ellipse"
|
||||||
|
msgstr "Эллипс"
|
||||||
|
|
||||||
|
msgid "Rectangle"
|
||||||
|
msgstr "Прямоугольник"
|
||||||
|
|
||||||
|
msgid "Text"
|
||||||
|
msgstr "Текст"
|
||||||
|
|
||||||
|
msgid "Fill"
|
||||||
|
msgstr "Заполнить"
|
||||||
|
|
||||||
|
msgid "Stroke"
|
||||||
|
msgstr "Ход"
|
||||||
|
|
||||||
|
msgid "Dashed line"
|
||||||
|
msgstr "Пунктирная линия"
|
||||||
|
|
||||||
|
msgid "Full line"
|
||||||
|
msgstr "Полная линия"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Type your text\n"
|
||||||
|
"and press Enter"
|
||||||
|
msgstr "Введите текст\n"
|
||||||
|
"и нажмите Enter"
|
||||||
|
|
||||||
|
msgid "Screenshot"
|
||||||
|
msgstr "Скриншот"
|
||||||
|
|
||||||
|
msgid "Screenshot to clipboard"
|
||||||
|
msgstr "Скриншот в буфер обмена"
|
||||||
|
|
||||||
|
msgid "Area screenshot"
|
||||||
|
msgstr "Скриншот области"
|
||||||
|
|
||||||
|
msgid "Area screenshot to clipboard"
|
||||||
|
msgstr "Скриншот области в буфер обмена"
|
||||||
|
|
||||||
|
msgid "System"
|
||||||
|
msgstr "Система"
|
||||||
|
|
||||||
|
msgid "Undo"
|
||||||
|
msgstr "Отменить"
|
||||||
|
|
||||||
|
msgid "Redo"
|
||||||
|
msgstr "Повтор"
|
||||||
|
|
||||||
|
msgid "Erase"
|
||||||
|
msgstr "Стереть"
|
||||||
|
|
||||||
|
msgid "Smooth"
|
||||||
|
msgstr "Гладкая"
|
||||||
|
|
||||||
|
msgid "Dashed"
|
||||||
|
msgstr "Пунктирная"
|
||||||
|
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "Цвет"
|
||||||
|
|
||||||
|
msgid "Open drawing"
|
||||||
|
msgstr "Открыть рисунок"
|
||||||
|
|
||||||
|
msgid "Save drawing"
|
||||||
|
msgstr "Сохранить рисунок"
|
||||||
|
|
||||||
|
#: prefs.js
|
||||||
|
msgid "Preferences"
|
||||||
|
msgstr "Настройки"
|
||||||
|
|
||||||
|
msgid "About"
|
||||||
|
msgstr "О программе"
|
||||||
|
|
||||||
|
# GLOBAL_KEYBINDINGS
|
||||||
|
msgid "Enter/leave drawing mode"
|
||||||
|
msgstr "Вход/выход в режим рисования"
|
||||||
|
|
||||||
|
msgid "Erase all drawings"
|
||||||
|
msgstr "Стереть все рисунки"
|
||||||
|
|
||||||
|
# INTERNAL_KEYBINDINGS
|
||||||
|
msgid "Undo last brushstroke"
|
||||||
|
msgstr "Отменить последний мазок"
|
||||||
|
|
||||||
|
msgid "Redo last brushstroke"
|
||||||
|
msgstr "Повтор последнего мазка"
|
||||||
|
|
||||||
|
msgid "Erase last brushstroke"
|
||||||
|
msgstr "Стереть последний мазок"
|
||||||
|
|
||||||
|
msgid "Smooth last brushstroke"
|
||||||
|
msgstr "Гладкая последнего мазка"
|
||||||
|
|
||||||
|
msgid "Select line"
|
||||||
|
msgstr "Выберите линии"
|
||||||
|
|
||||||
|
msgid "Select ellipse"
|
||||||
|
msgstr "Выберите эллипс"
|
||||||
|
|
||||||
|
msgid "Select rectangle"
|
||||||
|
msgstr "Выберите прямоугольник"
|
||||||
|
|
||||||
|
msgid "Select text"
|
||||||
|
msgstr "Выберите текст"
|
||||||
|
|
||||||
|
msgid "Unselect shape (free drawing)"
|
||||||
|
msgstr "Снимите форму (свободный рисунок)"
|
||||||
|
|
||||||
|
msgid "Toggle fill/stroke"
|
||||||
|
msgstr "Переключение заливки/обводки"
|
||||||
|
|
||||||
|
msgid "Increment line width"
|
||||||
|
msgstr "Приращение ширины линии"
|
||||||
|
|
||||||
|
msgid "Decrement line width"
|
||||||
|
msgstr "Ширина линии уменьшается"
|
||||||
|
|
||||||
|
msgid "Increment line width even more"
|
||||||
|
msgstr "Приращение ширины даже более"
|
||||||
|
|
||||||
|
msgid "Decrement line width even more"
|
||||||
|
msgstr "Уменьшение ширины линии еще больше"
|
||||||
|
|
||||||
|
msgid "Change linejoin"
|
||||||
|
msgstr "Изменить линию соединения"
|
||||||
|
|
||||||
|
msgid "Change linecap"
|
||||||
|
msgstr "Изменить линию крышки"
|
||||||
|
|
||||||
|
# already in draw.js
|
||||||
|
# msgid "Dashed line"
|
||||||
|
# msgstr ""
|
||||||
|
msgid "Change font family (generic name)"
|
||||||
|
msgstr "Изменять имя шрифта"
|
||||||
|
|
||||||
|
msgid "Change font weight"
|
||||||
|
msgstr "Изменение размер шрифта"
|
||||||
|
|
||||||
|
msgid "Change font style"
|
||||||
|
msgstr "Изменить стиль шрифта"
|
||||||
|
|
||||||
|
msgid "Hide panel and dock"
|
||||||
|
msgstr "Скрыть панель и док"
|
||||||
|
|
||||||
|
msgid "Add a drawing background"
|
||||||
|
msgstr "Добавить фон для рисования"
|
||||||
|
|
||||||
|
msgid "Square drawing area"
|
||||||
|
msgstr "Площадь рисования"
|
||||||
|
|
||||||
|
msgid "Open previous drawing"
|
||||||
|
msgstr "Открыть предыдущий рисунок"
|
||||||
|
|
||||||
|
msgid "Open next drawing"
|
||||||
|
msgstr "Открыть следующий рисунок"
|
||||||
|
|
||||||
|
# already in draw.js
|
||||||
|
# msgid "Save drawing"
|
||||||
|
# msgstr ""
|
||||||
|
msgid "Save drawing as a SVG file"
|
||||||
|
msgstr "Сохранить рисунок в SVG"
|
||||||
|
|
||||||
|
msgid "Edit style"
|
||||||
|
msgstr "Изменить стиль"
|
||||||
|
|
||||||
|
msgid "Show help"
|
||||||
|
msgstr "Показать справку"
|
||||||
|
|
||||||
|
# OTHER_SHORTCUTS
|
||||||
|
msgid "Draw"
|
||||||
|
msgstr "Рисовать"
|
||||||
|
|
||||||
|
msgid "Left click"
|
||||||
|
msgstr "Левый клик"
|
||||||
|
|
||||||
|
msgid "Menu"
|
||||||
|
msgstr "Меню"
|
||||||
|
|
||||||
|
msgid "Right click"
|
||||||
|
msgstr "Правый клик"
|
||||||
|
|
||||||
|
msgid "Center click"
|
||||||
|
msgstr "Центральный клик"
|
||||||
|
|
||||||
|
msgid "Transform shape (when drawing)"
|
||||||
|
msgstr "Преобразовать фигуру (при рисовании)"
|
||||||
|
|
||||||
|
msgid "Ctrl key"
|
||||||
|
msgstr "Клавиша Ctrl"
|
||||||
|
|
||||||
|
msgid "Increment/decrement line width"
|
||||||
|
msgstr "Увеличение/уменьшение ширины линии"
|
||||||
|
|
||||||
|
msgid "Scroll"
|
||||||
|
msgstr "Прокрутка"
|
||||||
|
|
||||||
|
msgid "Select color"
|
||||||
|
msgstr "Выберите цвет"
|
||||||
|
|
||||||
|
msgid "Ctrl+1...9"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
msgid "Select eraser"
|
||||||
|
msgstr "Выберите ластик"
|
||||||
|
|
||||||
|
msgid "Shift key held"
|
||||||
|
msgstr "Клавиша Shift удерживается"
|
||||||
|
|
||||||
|
msgid "Ignore pointer movement"
|
||||||
|
msgstr "Игнорировать движение указателя"
|
||||||
|
|
||||||
|
msgid "Space key held"
|
||||||
|
msgstr "Пробел удерживается"
|
||||||
|
|
||||||
|
msgid "Leave"
|
||||||
|
msgstr "Покинуть"
|
||||||
|
|
||||||
|
msgid "Escape key"
|
||||||
|
msgstr "Клавиша Escape"
|
||||||
|
|
||||||
|
# About page
|
||||||
|
# you are free to translate the extension name
|
||||||
|
# msgid "Draw On You Screen"
|
||||||
|
# msgstr ""
|
||||||
|
msgid "Version %d"
|
||||||
|
msgstr "Версия %d"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"Start drawing with Super+Alt+D and save your beautiful work by taking a "
|
||||||
|
"screenshot"
|
||||||
|
msgstr "Начните рисовать Super+Alt+D и сохранить, взяв скриншот"
|
||||||
|
|
||||||
|
# Prefs page
|
||||||
|
msgid "Global"
|
||||||
|
msgstr "Глобальные"
|
||||||
|
|
||||||
|
msgid "Persistent"
|
||||||
|
msgstr "Настойчивый"
|
||||||
|
|
||||||
|
msgid "Persistent drawing through session restart"
|
||||||
|
msgstr "Постоянное рисование через перезапуск сеанса"
|
||||||
|
|
||||||
|
msgid "Drawing on the desktop"
|
||||||
|
msgstr "Рисунок на рабочем столе"
|
||||||
|
|
||||||
|
msgid "<i>Draw On Your Screen</i> becomes <i>Draw On Your Desktop</i>"
|
||||||
|
msgstr "<i>Draw On Your Screen</i> будет <i>рисовать на рабочем столе</i>"
|
||||||
|
|
||||||
|
msgid "Disable on-screen notifications"
|
||||||
|
msgstr "Отключить экранные уведомления"
|
||||||
|
|
||||||
|
msgid "Disable panel indicator"
|
||||||
|
msgstr "Отключить индикатор панели"
|
||||||
|
|
||||||
|
msgid "Internal"
|
||||||
|
msgstr "Внутренний"
|
||||||
|
|
||||||
|
msgid "(in drawing mode)"
|
||||||
|
msgstr "(в режиме рисования)"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"By pressing <b>Ctrl</b> key <b>during</b> the drawing process, you can:\n"
|
||||||
|
" . rotate a rectangle or a text area\n"
|
||||||
|
" . extend and rotate an ellipse\n"
|
||||||
|
" . curve a line (cubic Bezier curve)\n"
|
||||||
|
" . smooth a free drawing stroke (you may prefer to smooth the stroke "
|
||||||
|
"afterward, see <i>“%s”</i>)"
|
||||||
|
msgstr ""
|
||||||
|
"Нажав клавишу <b>Ctrl</b> <b>во время</b> процесса рисования, вы можете:\n"
|
||||||
|
" . повернуть прямоугольник или текстовую область\n"
|
||||||
|
" . вытянуть и повернуть эллипс\n"
|
||||||
|
" . кривая линия (кубическая кривая Безье)\n"
|
||||||
|
" . сгладить свободный ход рисования (вы можете сгладить обводку "
|
||||||
|
"потом посмотреть <i>“%s”</i>)"
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"<b>Default</b> drawing style attributes (color palette, font, line, dash) "
|
||||||
|
"are defined in an editable <b>css</b> file.\n"
|
||||||
|
"See <i>“%s”</i>."
|
||||||
|
msgstr ""
|
||||||
|
"<b>Стандартные</b> атрибуты стиля рисования (цветовая палитра, шрифт, линия, тире) "
|
||||||
|
"определены в редактируемом <b>css</b> файле.\n"
|
||||||
|
"Смотреть <i>“%s”</i>."
|
||||||
|
|
||||||
|
msgid ""
|
||||||
|
"<u>Note</u>: When you save elements made with <b>eraser</b> in a <b>SVG</b> "
|
||||||
|
"file, they are colored with background color, transparent if it is "
|
||||||
|
"disabled.\n"
|
||||||
|
"See <i>“%s”</i> or edit the SVG file afterwards."
|
||||||
|
msgstr ""
|
||||||
|
"<u>Примечание</u>: При сохранении элементов, сделанные с помощью <b>ластика</b> в <b>SVG</b> "
|
||||||
|
"файл,\n"
|
||||||
|
"они окрашены в цвет фона, прозрачный, если он отключен.\n"
|
||||||
|
"Посмотрите <i>“%s”</i> или отредактируйте файл SVG позже."
|
||||||
|
|
@ -0,0 +1,717 @@
|
||||||
|
# <language> translations for Draw On Your Screen.
|
||||||
|
# Copyright (C) 2019 Listed translators
|
||||||
|
#
|
||||||
|
# This file is distributed under the same license as Draw On Your Screen.
|
||||||
|
# Aerowolf <aerowolf@tom.com>, 2019.
|
||||||
|
# tuberry <tuberry@example.com>, 2020.
|
||||||
|
#
|
||||||
|
# Some words refer to SVG attributes (font, line, fill rule ...).
|
||||||
|
# You are free to translate them or not.
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Draw On Your Screen\n"
|
||||||
|
"Report-Msgid-Bugs-To: https://codeberg.org/som/DrawOnYourScreen/issues\n"
|
||||||
|
"POT-Creation-Date: 2020-09-19 15:32+0200\n"
|
||||||
|
"PO-Revision-Date: 2020-09-20 16:00+0800\n"
|
||||||
|
"Last-Translator: tuberry <tuberry@example.com>\n"
|
||||||
|
"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
|
||||||
|
"Language: zh_CN\n"
|
||||||
|
"MIME-Version: 1.0\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid ""
|
||||||
|
"Press <i>%s</i> to get\n"
|
||||||
|
"a fourth control point"
|
||||||
|
msgstr "按 <i>%s</i> 获取第四个控制点"
|
||||||
|
|
||||||
|
msgid "Mark a point of symmetry"
|
||||||
|
msgstr "标对称点"
|
||||||
|
|
||||||
|
msgid "Draw a line of symmetry"
|
||||||
|
msgstr "作对称线"
|
||||||
|
|
||||||
|
#. Translators: initial content of the text area
|
||||||
|
msgctxt "text-area-content"
|
||||||
|
msgid "Text"
|
||||||
|
msgstr "文本框"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Press <i>%s</i> to mark vertices"
|
||||||
|
msgstr "按 <i>%s</i> 标记顶点"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Type your text and press <i>%s</i>"
|
||||||
|
msgstr "输入文本后按 <i>%s</i>"
|
||||||
|
|
||||||
|
#. Translators: It is displayed in an OSD notification to ask the user to start picking, so it should use the imperative mood.
|
||||||
|
msgctxt "osd-notification"
|
||||||
|
msgid "Pick a color"
|
||||||
|
msgstr "拾取颜色"
|
||||||
|
|
||||||
|
#. Translators: "released" as the opposite of "grabbed"
|
||||||
|
msgid "Keyboard and pointer released"
|
||||||
|
msgstr "键盘和鼠标已释放"
|
||||||
|
|
||||||
|
msgid "Keyboard and pointer grabbed"
|
||||||
|
msgstr "键盘和鼠标已捕获"
|
||||||
|
|
||||||
|
msgid "Leaving drawing mode"
|
||||||
|
msgstr "退出绘画模式"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Press <i>%s</i> for help"
|
||||||
|
msgstr "按 <i>%s</i> 获取帮助"
|
||||||
|
|
||||||
|
msgid "Entering drawing mode"
|
||||||
|
msgstr "进入绘画模式"
|
||||||
|
|
||||||
|
msgid "Global"
|
||||||
|
msgstr "全局快捷键"
|
||||||
|
|
||||||
|
msgid "Internal"
|
||||||
|
msgstr "内置快捷键"
|
||||||
|
|
||||||
|
msgid "System"
|
||||||
|
msgstr "系统快捷键"
|
||||||
|
|
||||||
|
msgid "Dashed line"
|
||||||
|
msgstr "虚线"
|
||||||
|
|
||||||
|
#. Translators: as the alternative to "Dashed line"
|
||||||
|
msgid "Full line"
|
||||||
|
msgstr "实线"
|
||||||
|
|
||||||
|
msgid "Fill"
|
||||||
|
msgstr "填充"
|
||||||
|
|
||||||
|
#. Translators: as the alternative to "Fill"
|
||||||
|
msgid "Outline"
|
||||||
|
msgstr "轮廓"
|
||||||
|
|
||||||
|
#. Translators: fill-rule SVG attribute
|
||||||
|
msgid "Nonzero"
|
||||||
|
msgstr "非零(Nonzero)"
|
||||||
|
|
||||||
|
msgid "Evenodd"
|
||||||
|
msgstr "偶奇(Evenodd)"
|
||||||
|
|
||||||
|
#. Translators: generic font-family SVG attribute
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Sans-Serif"
|
||||||
|
msgstr "无衬线体(Sans)"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Serif"
|
||||||
|
msgstr "衬线体(Serif)"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Monospace"
|
||||||
|
msgstr "等宽体(Mono)"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Cursive"
|
||||||
|
msgstr "手写体(Cursive)"
|
||||||
|
|
||||||
|
msgctxt "font-family"
|
||||||
|
msgid "Fantasy"
|
||||||
|
msgstr "梦幻体(Fantasy)"
|
||||||
|
|
||||||
|
#. Translators: font-style SVG attribute
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr "标准(Normal)"
|
||||||
|
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Oblique"
|
||||||
|
msgstr "倾斜(Oblique)"
|
||||||
|
|
||||||
|
msgctxt "font-style"
|
||||||
|
msgid "Italic"
|
||||||
|
msgstr "斜体(Italic)"
|
||||||
|
|
||||||
|
#. Translators: font-weight SVG attribute
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Thin"
|
||||||
|
msgstr "淡体(Thin)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Light"
|
||||||
|
msgstr "特细(Ultra-light)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Light"
|
||||||
|
msgstr "细体(Light)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Semi Light"
|
||||||
|
msgstr "次细(Semi-light)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Book"
|
||||||
|
msgstr "标准(Book)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Normal"
|
||||||
|
msgstr "标准(Normal)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Medium"
|
||||||
|
msgstr "适中(Medium)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Semi Bold"
|
||||||
|
msgstr "次粗(Semi-bold)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Bold"
|
||||||
|
msgstr "粗体(Bold)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Bold"
|
||||||
|
msgstr "特粗(Ultra-bold)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Heavy"
|
||||||
|
msgstr "浓体(Heavy)"
|
||||||
|
|
||||||
|
msgctxt "font-weight"
|
||||||
|
msgid "Ultra Heavy"
|
||||||
|
msgstr "特浓(Ultra Heavy)"
|
||||||
|
|
||||||
|
#. Translators: stroke-linecap SVG attribute
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Butt"
|
||||||
|
msgstr "对接(Butt)"
|
||||||
|
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Round"
|
||||||
|
msgstr "圆形(Round)"
|
||||||
|
|
||||||
|
msgctxt "stroke-linecap"
|
||||||
|
msgid "Square"
|
||||||
|
msgstr "方形(Square)"
|
||||||
|
|
||||||
|
#. Translators: stroke-linejoin SVG attribute
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Miter"
|
||||||
|
msgstr "尖角(Miter)"
|
||||||
|
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Round"
|
||||||
|
msgstr "圆角(Round)"
|
||||||
|
|
||||||
|
msgctxt "stroke-linejoin"
|
||||||
|
msgid "Bevel"
|
||||||
|
msgstr "斜角(Bevel)"
|
||||||
|
|
||||||
|
#. Translators: value in pixel unit (e.g. "5 px")
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%f px"
|
||||||
|
msgstr "%f px"
|
||||||
|
|
||||||
|
#. Translators: text alignment
|
||||||
|
msgid "Right aligned"
|
||||||
|
msgstr "右对齐"
|
||||||
|
|
||||||
|
msgid "Left aligned"
|
||||||
|
msgstr "左对齐"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Free drawing"
|
||||||
|
msgstr "任意"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Line"
|
||||||
|
msgstr "直线"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Ellipse"
|
||||||
|
msgstr "椭圆"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Rectangle"
|
||||||
|
msgstr "矩形"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Text"
|
||||||
|
msgstr "文本框"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Polygon"
|
||||||
|
msgstr "多边形"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Polyline"
|
||||||
|
msgstr "折线段"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Image"
|
||||||
|
msgstr "图像"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Move"
|
||||||
|
msgstr "移动位置"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Resize"
|
||||||
|
msgstr "调整尺寸"
|
||||||
|
|
||||||
|
msgctxt "drawing-tool"
|
||||||
|
msgid "Mirror"
|
||||||
|
msgstr "镜像翻转"
|
||||||
|
|
||||||
|
msgid "Undo"
|
||||||
|
msgstr "撤销"
|
||||||
|
|
||||||
|
msgid "Redo"
|
||||||
|
msgstr "重画"
|
||||||
|
|
||||||
|
msgid "Erase"
|
||||||
|
msgstr "擦除"
|
||||||
|
|
||||||
|
msgid "Smooth"
|
||||||
|
msgstr "平滑"
|
||||||
|
|
||||||
|
msgid "Open drawing"
|
||||||
|
msgstr "打开绘画"
|
||||||
|
|
||||||
|
msgid "Save drawing as…"
|
||||||
|
msgstr "另存绘画为…"
|
||||||
|
|
||||||
|
msgid "Palette"
|
||||||
|
msgstr "颜色表"
|
||||||
|
|
||||||
|
msgid "Color"
|
||||||
|
msgstr "颜色"
|
||||||
|
|
||||||
|
#. Translators: It is displayed in a menu button tooltip or as a shortcut action description, so it should NOT use the imperative mood.
|
||||||
|
msgid "Pick a color"
|
||||||
|
msgstr "拾色器"
|
||||||
|
|
||||||
|
msgid "Add to images"
|
||||||
|
msgstr "加入图像集"
|
||||||
|
|
||||||
|
msgid "Delete"
|
||||||
|
msgstr "删除"
|
||||||
|
|
||||||
|
msgid "Type a name"
|
||||||
|
msgstr "输入文件名"
|
||||||
|
|
||||||
|
#. Translators: "Preferences" page in preferences
|
||||||
|
msgid "Preferences"
|
||||||
|
msgstr "设置"
|
||||||
|
|
||||||
|
#. Translators: "Drawing" page in preferences
|
||||||
|
msgid "Drawing"
|
||||||
|
msgstr "绘画"
|
||||||
|
|
||||||
|
#. Translators: "About" page in preferences
|
||||||
|
msgid "About"
|
||||||
|
msgstr "关于"
|
||||||
|
|
||||||
|
#. Translators: you are free to translate the extension name, that is displayed in About page, or not
|
||||||
|
msgid "Draw On You Screen"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#. Translators: version number in "About" page
|
||||||
|
#, javascript-format
|
||||||
|
msgid "Version %f"
|
||||||
|
msgstr "版本号 %f"
|
||||||
|
|
||||||
|
#. Translators: you are free to translate the extension description, that is displayed in About page, or not
|
||||||
|
msgid ""
|
||||||
|
"Start drawing with Super+Alt+D and save your beautiful work by taking a "
|
||||||
|
"screenshot"
|
||||||
|
msgstr "按 Super+Alt+D 开始绘画,截图以保存您的作品"
|
||||||
|
|
||||||
|
#. Translators: add your name here or keep it empty, it will be displayed in about page, e.g.
|
||||||
|
#. msgstr ""
|
||||||
|
#. "translator1\n"
|
||||||
|
#. "<a href=\"mailto:translator2@mail.org\">translator2</a>\n"
|
||||||
|
#. "<a href=\"https://...\">translator3</a>"
|
||||||
|
msgid "translator-credits"
|
||||||
|
msgstr ""
|
||||||
|
"<a href=\"mailto:aerowolf@tom.com\">Aerowolf</a>\n"
|
||||||
|
"<a href=\"https://github.com/tuberry\">tuberry</a>"
|
||||||
|
|
||||||
|
msgid "Palettes"
|
||||||
|
msgstr "颜色表"
|
||||||
|
|
||||||
|
msgid "Add a new palette"
|
||||||
|
msgstr "新建颜色表"
|
||||||
|
|
||||||
|
msgid "Area"
|
||||||
|
msgstr "背景"
|
||||||
|
|
||||||
|
msgid "Auto"
|
||||||
|
msgstr "自动"
|
||||||
|
|
||||||
|
msgid "Grid overlay line"
|
||||||
|
msgstr "网格线"
|
||||||
|
|
||||||
|
msgid "Tools"
|
||||||
|
msgstr "工具"
|
||||||
|
|
||||||
|
msgid "Dash array"
|
||||||
|
msgstr "虚线范式(dasharray)"
|
||||||
|
|
||||||
|
msgid "Reset settings"
|
||||||
|
msgstr "重置全部"
|
||||||
|
|
||||||
|
msgid "Rename the palette"
|
||||||
|
msgstr "重命名颜色表"
|
||||||
|
|
||||||
|
msgid "Remove the palette"
|
||||||
|
msgstr "移除颜色表"
|
||||||
|
|
||||||
|
#. Translators: default name of a new palette
|
||||||
|
msgid "New palette"
|
||||||
|
msgstr "新颜色表"
|
||||||
|
|
||||||
|
msgid "In drawing mode"
|
||||||
|
msgstr "绘画时"
|
||||||
|
|
||||||
|
msgid "Draw"
|
||||||
|
msgstr "绘画"
|
||||||
|
|
||||||
|
msgid "Left click"
|
||||||
|
msgstr "左键"
|
||||||
|
|
||||||
|
msgid "Menu"
|
||||||
|
msgstr "菜单"
|
||||||
|
|
||||||
|
msgid "Right click"
|
||||||
|
msgstr "右键"
|
||||||
|
|
||||||
|
msgid "Center click"
|
||||||
|
msgstr "中键"
|
||||||
|
|
||||||
|
msgid "Increment/decrement line width"
|
||||||
|
msgstr "增大/减小线宽"
|
||||||
|
|
||||||
|
msgid "Scroll"
|
||||||
|
msgstr "滚轮"
|
||||||
|
|
||||||
|
#. Translators: %s are key labels (Ctrl+F1 and Ctrl+F9)
|
||||||
|
msgid "Select color"
|
||||||
|
msgstr "选择颜色"
|
||||||
|
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%s … %s"
|
||||||
|
msgstr "%s ~ %s"
|
||||||
|
|
||||||
|
#. Translators: %s is a key label
|
||||||
|
msgid "Ignore pointer movement"
|
||||||
|
msgstr "忽略鼠标移动"
|
||||||
|
|
||||||
|
#, javascript-format
|
||||||
|
msgid "%s held"
|
||||||
|
msgstr "按住%s"
|
||||||
|
|
||||||
|
msgid "Leave"
|
||||||
|
msgstr "退出"
|
||||||
|
|
||||||
|
msgid "Select eraser <span alpha=\"50%\">(while starting drawing)</span>"
|
||||||
|
msgstr "擦除<span alpha=\"50%\">(绘画时)</span>"
|
||||||
|
|
||||||
|
msgid "Duplicate <span alpha=\"50%\">(while starting handling)</span>"
|
||||||
|
msgstr "复制<span alpha=\"50%\">(操作时)</span>"
|
||||||
|
|
||||||
|
msgid "Rotate rectangle, polygon, polyline"
|
||||||
|
msgstr "旋转矩形、多边形与折线段"
|
||||||
|
|
||||||
|
msgid "Extend circle to ellipse"
|
||||||
|
msgstr "扩正圆为椭圆"
|
||||||
|
|
||||||
|
msgid "Curve line"
|
||||||
|
msgstr "拉直线为曲线"
|
||||||
|
|
||||||
|
msgid "Smooth free drawing outline"
|
||||||
|
msgstr "平滑任意轮廓"
|
||||||
|
|
||||||
|
msgid "Do not preserve image ratio"
|
||||||
|
msgstr "不保持图像纵横比"
|
||||||
|
|
||||||
|
msgid "Rotate <span alpha=\"50%\">(while moving)</span>"
|
||||||
|
msgstr "旋转<span alpha=\"50%\">(移动位置时)</span>"
|
||||||
|
|
||||||
|
msgid "Stretch <span alpha=\"50%\">(while resizing)</span>"
|
||||||
|
msgstr "伸缩<span alpha=\"50%\">(调整尺寸时)</span>"
|
||||||
|
|
||||||
|
msgid "Inverse <span alpha=\"50%\">(while mirroring)</span>"
|
||||||
|
msgstr "反向<span alpha=\"50%\">(镜像翻转时)</span>"
|
||||||
|
|
||||||
|
msgid "Drawing on the desktop"
|
||||||
|
msgstr "桌面显示绘画"
|
||||||
|
|
||||||
|
msgid "<i>Draw On Your Screen</i> becomes <i>Draw On Your Desktop</i>"
|
||||||
|
msgstr "<i>屏幕画板</i>变为<i>桌面画板</i>"
|
||||||
|
|
||||||
|
msgid "Erase all drawings"
|
||||||
|
msgstr "擦除所有绘画"
|
||||||
|
|
||||||
|
msgid "Disable panel indicator"
|
||||||
|
msgstr "禁用托盘图标"
|
||||||
|
|
||||||
|
msgid "Disable on-screen notifications"
|
||||||
|
msgstr "关闭屏内提示"
|
||||||
|
|
||||||
|
msgid "Persistent over toggles"
|
||||||
|
msgstr "切换继续绘画"
|
||||||
|
|
||||||
|
msgid "Drawing remains when toggling drawing mode"
|
||||||
|
msgstr "保留上次退出时的绘画"
|
||||||
|
|
||||||
|
msgid "Persistent over restarts"
|
||||||
|
msgstr "重启继续绘画"
|
||||||
|
|
||||||
|
msgid "Drawing is automatically saved to a file"
|
||||||
|
msgstr "保留上次关闭时的绘画(自动保存至文件)"
|
||||||
|
|
||||||
|
msgid "Enter/leave drawing mode"
|
||||||
|
msgstr "进入/退出绘画模式"
|
||||||
|
|
||||||
|
#. Translators: there is a similar text in GNOME Boxes (https://gitlab.gnome.org/GNOME/gnome-boxes/tree/master/po)
|
||||||
|
msgid "Grab/ungrab keyboard and pointer"
|
||||||
|
msgstr "捕获/释放键盘鼠标"
|
||||||
|
|
||||||
|
msgid "Background color"
|
||||||
|
msgstr "背景色"
|
||||||
|
|
||||||
|
msgid "The color of the drawing area background"
|
||||||
|
msgstr "画布颜色"
|
||||||
|
|
||||||
|
msgid "Automatic dash array"
|
||||||
|
msgstr "自动虚线范式"
|
||||||
|
|
||||||
|
msgid "Compute the lengths from the line width"
|
||||||
|
msgstr "以线宽为准计算"
|
||||||
|
|
||||||
|
msgid "Dash array on"
|
||||||
|
msgstr "开启虚线范式"
|
||||||
|
|
||||||
|
msgid "The dash length in pixels"
|
||||||
|
msgstr "虚线段长度(实线部分/像素)"
|
||||||
|
|
||||||
|
msgid "Dash array off"
|
||||||
|
msgstr "关闭虚线范式"
|
||||||
|
|
||||||
|
msgid "The gap between the dashes in pixels"
|
||||||
|
msgstr "虚线段间隔(空白部分/像素)"
|
||||||
|
|
||||||
|
msgid "Dash offset"
|
||||||
|
msgstr "虚线偏移(dashoffset)"
|
||||||
|
|
||||||
|
msgid "The dash offset in pixels"
|
||||||
|
msgstr "虚线偏移(首段偏移/像素)"
|
||||||
|
|
||||||
|
msgid "Grid overlay color"
|
||||||
|
msgstr "网格线颜色"
|
||||||
|
|
||||||
|
msgid "The color of the lines"
|
||||||
|
msgstr "网格线的颜色"
|
||||||
|
|
||||||
|
msgid "Automatic grid overlay line"
|
||||||
|
msgstr "自动网格线"
|
||||||
|
|
||||||
|
msgid "Compute the lengths from the screen size"
|
||||||
|
msgstr "以屏幕尺寸为准计算"
|
||||||
|
|
||||||
|
msgid "Grid overlay line spacing"
|
||||||
|
msgstr "网格大小"
|
||||||
|
|
||||||
|
msgid "The gap between lines in pixels"
|
||||||
|
msgstr "网格线间隔(像素)"
|
||||||
|
|
||||||
|
msgid "Grid overlay line width"
|
||||||
|
msgstr "网格线宽"
|
||||||
|
|
||||||
|
msgid "The line width in pixels"
|
||||||
|
msgstr "网格线的宽度(像素)"
|
||||||
|
|
||||||
|
msgid "Image location"
|
||||||
|
msgstr "图像位置"
|
||||||
|
|
||||||
|
msgid "The location of the directory in which the image tool picks"
|
||||||
|
msgstr "插入图像所存放的文件夹"
|
||||||
|
|
||||||
|
msgid "Color palettes"
|
||||||
|
msgstr "颜色集"
|
||||||
|
|
||||||
|
msgid "The palettes of drawing colors"
|
||||||
|
msgstr "绘画选取的颜色表"
|
||||||
|
|
||||||
|
msgid "Automatic square area size"
|
||||||
|
msgstr "自动方形区域大小"
|
||||||
|
|
||||||
|
msgid "Compute the area size from the screen size"
|
||||||
|
msgstr "以屏幕尺寸为准计算"
|
||||||
|
|
||||||
|
msgid "Square area size"
|
||||||
|
msgstr "方形区域大小"
|
||||||
|
|
||||||
|
msgid "The size of the area in pixels"
|
||||||
|
msgstr "方形区域的大小(像素)"
|
||||||
|
|
||||||
|
msgid "Decrement line width"
|
||||||
|
msgstr "减小线宽"
|
||||||
|
|
||||||
|
msgid "Decrement line width even more"
|
||||||
|
msgstr "大幅减小线宽"
|
||||||
|
|
||||||
|
msgid "Erase last brushstroke"
|
||||||
|
msgstr "擦除上一笔"
|
||||||
|
|
||||||
|
msgid "Export drawing to a SVG file"
|
||||||
|
msgstr "导出为 SVG 文件"
|
||||||
|
|
||||||
|
msgid "Increment line width"
|
||||||
|
msgstr "增大线宽"
|
||||||
|
|
||||||
|
msgid "Increment line width even more"
|
||||||
|
msgstr "大幅增大线宽"
|
||||||
|
|
||||||
|
msgid "Open next drawing"
|
||||||
|
msgstr "打开下一绘画"
|
||||||
|
|
||||||
|
msgid "Open preferences"
|
||||||
|
msgstr "打开设置"
|
||||||
|
|
||||||
|
msgid "Open previous drawing"
|
||||||
|
msgstr "打开上一绘画"
|
||||||
|
|
||||||
|
msgid "Add images from the clipboard"
|
||||||
|
msgstr "添加剪切板中的图像"
|
||||||
|
|
||||||
|
msgid "Redo last brushstroke"
|
||||||
|
msgstr "重画上一笔"
|
||||||
|
|
||||||
|
msgid "Save drawing"
|
||||||
|
msgstr "保存"
|
||||||
|
|
||||||
|
msgid "Select color 1"
|
||||||
|
msgstr "选择颜色1"
|
||||||
|
|
||||||
|
msgid "Select color 2"
|
||||||
|
msgstr "选择颜色2"
|
||||||
|
|
||||||
|
msgid "Select color 3"
|
||||||
|
msgstr "选择颜色3"
|
||||||
|
|
||||||
|
msgid "Select color 4"
|
||||||
|
msgstr "选择颜色4"
|
||||||
|
|
||||||
|
msgid "Select color 5"
|
||||||
|
msgstr "选择颜色5"
|
||||||
|
|
||||||
|
msgid "Select color 6"
|
||||||
|
msgstr "选择颜色6"
|
||||||
|
|
||||||
|
msgid "Select color 7"
|
||||||
|
msgstr "选择颜色7"
|
||||||
|
|
||||||
|
msgid "Select color 8"
|
||||||
|
msgstr "选择颜色8"
|
||||||
|
|
||||||
|
msgid "Select color 9"
|
||||||
|
msgstr "选择颜色9"
|
||||||
|
|
||||||
|
msgid "Select ellipse tool"
|
||||||
|
msgstr "选择椭圆"
|
||||||
|
|
||||||
|
msgid "Select image tool"
|
||||||
|
msgstr "选择图像"
|
||||||
|
|
||||||
|
msgid "Select line tool"
|
||||||
|
msgstr "选择直线"
|
||||||
|
|
||||||
|
msgid "Select mirror tool"
|
||||||
|
msgstr "选择镜像翻转"
|
||||||
|
|
||||||
|
msgid "Select move tool"
|
||||||
|
msgstr "选择移动位置"
|
||||||
|
|
||||||
|
msgid "Select free drawing"
|
||||||
|
msgstr "选择任意"
|
||||||
|
|
||||||
|
msgid "Select polygon tool"
|
||||||
|
msgstr "选择多边形"
|
||||||
|
|
||||||
|
msgid "Select polyline tool"
|
||||||
|
msgstr "选择折线段"
|
||||||
|
|
||||||
|
msgid "Select rectangle tool"
|
||||||
|
msgstr "选择矩形"
|
||||||
|
|
||||||
|
msgid "Select resize tool"
|
||||||
|
msgstr "选择调整尺寸"
|
||||||
|
|
||||||
|
msgid "Select text tool"
|
||||||
|
msgstr "选择文本框"
|
||||||
|
|
||||||
|
msgid "Smooth last brushstroke"
|
||||||
|
msgstr "平滑上一笔"
|
||||||
|
|
||||||
|
msgid "Change color palette"
|
||||||
|
msgstr "改变颜色表"
|
||||||
|
|
||||||
|
msgid "Change color palette (reverse)"
|
||||||
|
msgstr "改变颜色表(向后)"
|
||||||
|
|
||||||
|
msgid "Toggle fill/outline"
|
||||||
|
msgstr "切换填充/轮廓"
|
||||||
|
|
||||||
|
msgid "Toggle fill rule"
|
||||||
|
msgstr "切换填充规则"
|
||||||
|
|
||||||
|
msgid "Change font family"
|
||||||
|
msgstr "改变字体"
|
||||||
|
|
||||||
|
msgid "Change font family (reverse)"
|
||||||
|
msgstr "改变字体(向后)"
|
||||||
|
|
||||||
|
msgid "Change font style"
|
||||||
|
msgstr "改变字体风格"
|
||||||
|
|
||||||
|
msgid "Change font weight"
|
||||||
|
msgstr "改变字体粗细"
|
||||||
|
|
||||||
|
msgid "Change image"
|
||||||
|
msgstr "改变图像"
|
||||||
|
|
||||||
|
msgid "Change image (reverse)"
|
||||||
|
msgstr "改变图像(向后)"
|
||||||
|
|
||||||
|
msgid "Change linecap"
|
||||||
|
msgstr "改变端点样式(linecap)"
|
||||||
|
|
||||||
|
msgid "Change linejoin"
|
||||||
|
msgstr "改变笔锋形状(linejoin)"
|
||||||
|
|
||||||
|
msgid "Toggle text alignment"
|
||||||
|
msgstr "切换文本对齐方式"
|
||||||
|
|
||||||
|
msgid "Add a drawing background"
|
||||||
|
msgstr "添加绘画背景"
|
||||||
|
|
||||||
|
msgid "Add a grid overlay"
|
||||||
|
msgstr "添加网格线"
|
||||||
|
|
||||||
|
msgid "Show help"
|
||||||
|
msgstr "显示帮助"
|
||||||
|
|
||||||
|
msgid "Hide panel and dock"
|
||||||
|
msgstr "隐藏顶栏和停靠栏"
|
||||||
|
|
||||||
|
#. Translators: It is an action: "Make the drawing area a square"
|
||||||
|
msgid "Square drawing area"
|
||||||
|
msgstr "限定方形画布"
|
||||||
|
|
||||||
|
msgid "Undo last brushstroke"
|
||||||
|
msgstr "重画上一笔"
|
||||||
|
|
@ -0,0 +1,900 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019 Abakkk
|
||||||
|
*
|
||||||
|
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2019 Abakkk
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* jslint esversion: 6 */
|
||||||
|
/* exported DisplayStrings, DrawingMenu */
|
||||||
|
|
||||||
|
const Clutter = imports.gi.Clutter;
|
||||||
|
const GLib = imports.gi.GLib;
|
||||||
|
const GObject = imports.gi.GObject;
|
||||||
|
const Gtk = imports.gi.Gtk;
|
||||||
|
const Lang = imports.lang;
|
||||||
|
const St = imports.gi.St;
|
||||||
|
|
||||||
|
const BoxPointer = imports.ui.boxpointer;
|
||||||
|
const Config = imports.misc.config;
|
||||||
|
const Dash = imports.ui.dash;
|
||||||
|
const Main = imports.ui.main;
|
||||||
|
const PopupMenu = imports.ui.popupMenu;
|
||||||
|
const Slider = imports.ui.slider;
|
||||||
|
|
||||||
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
|
const Files = Me.imports.files;
|
||||||
|
const _ = imports.gettext.domain(Me.metadata['gettext-domain']).gettext;
|
||||||
|
const pgettext = imports.gettext.domain(Me.metadata['gettext-domain']).pgettext;
|
||||||
|
|
||||||
|
const GS_VERSION = Config.PACKAGE_VERSION;
|
||||||
|
// 150 labels with font-family style take ~15Mo
|
||||||
|
const FONT_FAMILY_STYLE = true;
|
||||||
|
// use 'login-dialog-message-warning' class in order to get GS theme warning color (default: #f57900)
|
||||||
|
const WARNING_COLOR_STYLE_CLASS_NAME = 'login-dialog-message-warning';
|
||||||
|
const UUID = Me.uuid.replace(/@/gi, '_at_').replace(/[^a-z0-9+_-]/gi, '_');
|
||||||
|
const TextAlignmentIcon = { 0: Files.Icons.LEFT_ALIGNED, 1: Files.Icons.CENTERED, 2: Files.Icons.RIGHT_ALIGNED };
|
||||||
|
|
||||||
|
const getActor = function(object) {
|
||||||
|
return GS_VERSION < '3.33.0' ? object.actor : object;
|
||||||
|
};
|
||||||
|
|
||||||
|
const getSummary = function(settingKey) {
|
||||||
|
return Me.internalShortcutSettings.settings_schema.get_key(settingKey).get_summary();
|
||||||
|
};
|
||||||
|
|
||||||
|
// Used by both menu and osd notifications.
|
||||||
|
var DisplayStrings = {
|
||||||
|
getDashedLine: function(dashed) {
|
||||||
|
return dashed ? _("Dashed line") :
|
||||||
|
// Translators: as the alternative to "Dashed line"
|
||||||
|
_("Full line");
|
||||||
|
},
|
||||||
|
|
||||||
|
getFill: function(fill) {
|
||||||
|
return fill ? _("Fill") :
|
||||||
|
// Translators: as the alternative to "Fill"
|
||||||
|
_("Outline");
|
||||||
|
},
|
||||||
|
|
||||||
|
get FillRule() {
|
||||||
|
if (!this._FillRule)
|
||||||
|
// Translators: fill-rule SVG attribute
|
||||||
|
this._FillRule = { 0: _("Nonzero"), 1: _("Evenodd") };
|
||||||
|
return this._FillRule;
|
||||||
|
},
|
||||||
|
|
||||||
|
getFontFamily: function(family) {
|
||||||
|
if (!this._FontGenericFamily)
|
||||||
|
// Translators: generic font-family SVG attribute
|
||||||
|
this._FontGenericFamily = { 'Sans-Serif': pgettext("font-family", "Sans-Serif"), 'Serif': pgettext("font-family", "Serif"),
|
||||||
|
'Monospace': pgettext("font-family", "Monospace"), 'Cursive': pgettext("font-family", "Cursive"),
|
||||||
|
'Fantasy': pgettext("font-family", "Fantasy") };
|
||||||
|
return this._FontGenericFamily[family] || family;
|
||||||
|
},
|
||||||
|
|
||||||
|
get FontStyle() {
|
||||||
|
if (!this._FontStyle)
|
||||||
|
// Translators: font-style SVG attribute
|
||||||
|
this._FontStyle = { 0: pgettext("font-style", "Normal"), 1: pgettext("font-style", "Oblique"), 2: pgettext("font-style", "Italic") };
|
||||||
|
return this._FontStyle;
|
||||||
|
},
|
||||||
|
|
||||||
|
FontStyleMarkup: { 0: 'normal', 1: 'oblique', 2: 'italic' },
|
||||||
|
|
||||||
|
get FontWeight() {
|
||||||
|
if (!this._FontWeight)
|
||||||
|
// Translators: font-weight SVG attribute
|
||||||
|
this._FontWeight = { 100: pgettext("font-weight", "Thin"), 200: pgettext("font-weight", "Ultra Light"), 300: pgettext("font-weight", "Light"),
|
||||||
|
350: pgettext("font-weight", "Semi Light"), 380: pgettext("font-weight", "Book"), 400: pgettext("font-weight", "Normal"),
|
||||||
|
500: pgettext("font-weight", "Medium"), 600: pgettext("font-weight", "Semi Bold"), 700: pgettext("font-weight", "Bold"),
|
||||||
|
800: pgettext("font-weight", "Ultra Bold"), 900: pgettext("font-weight", "Heavy"), 1000: pgettext("font-weight", "Ultra Heavy") };
|
||||||
|
return this._FontWeight;
|
||||||
|
},
|
||||||
|
|
||||||
|
get LineCap() {
|
||||||
|
if (!this._LineCap)
|
||||||
|
// Translators: stroke-linecap SVG attribute
|
||||||
|
this._LineCap = { 0: pgettext("stroke-linecap", "Butt"), 1: pgettext("stroke-linecap", "Round"), 2: pgettext("stroke-linecap", "Square") };
|
||||||
|
return this._LineCap;
|
||||||
|
},
|
||||||
|
|
||||||
|
get LineJoin() {
|
||||||
|
if (!this._LineJoin)
|
||||||
|
// Translators: stroke-linejoin SVG attribute
|
||||||
|
this._LineJoin = { 0: pgettext("stroke-linejoin", "Miter"), 1: pgettext("stroke-linejoin", "Round"), 2: pgettext("stroke-linejoin", "Bevel") };
|
||||||
|
return this._LineJoin;
|
||||||
|
},
|
||||||
|
|
||||||
|
getPixels(value) {
|
||||||
|
// Translators: value in pixel unit (e.g. "5 px")
|
||||||
|
return _("%f px").format(value);
|
||||||
|
},
|
||||||
|
|
||||||
|
get TextAlignment() {
|
||||||
|
// Translators: text alignment
|
||||||
|
if (!this._TextAlignment)
|
||||||
|
this._TextAlignment = { 0: _("Left aligned"), 1: _("Centered"), 2: _("Right aligned") };
|
||||||
|
|
||||||
|
return this._TextAlignment;
|
||||||
|
},
|
||||||
|
|
||||||
|
get Tool() {
|
||||||
|
if (!this._Tool)
|
||||||
|
this._Tool = { 0: pgettext("drawing-tool", "Free drawing"), 1: pgettext("drawing-tool", "Line"), 2: pgettext("drawing-tool", "Ellipse"),
|
||||||
|
3: pgettext("drawing-tool", "Rectangle"), 4: pgettext("drawing-tool", "Text"), 5: pgettext("drawing-tool", "Polygon"),
|
||||||
|
6: pgettext("drawing-tool", "Polyline"), 7: pgettext("drawing-tool", "Image"),
|
||||||
|
100: pgettext("drawing-tool", "Move"), 101: pgettext("drawing-tool", "Resize"), 102: pgettext("drawing-tool", "Mirror") };
|
||||||
|
return this._Tool;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var DrawingMenu = new Lang.Class({
|
||||||
|
Name: `${UUID}-DrawingMenu`,
|
||||||
|
|
||||||
|
_init: function(area, monitor, DrawingTool, areaManagerUtils) {
|
||||||
|
this.area = area;
|
||||||
|
this.monitor = monitor;
|
||||||
|
this.DrawingTool = DrawingTool;
|
||||||
|
this.areaManagerUtils = areaManagerUtils;
|
||||||
|
|
||||||
|
let side = Clutter.get_default_text_direction() == Clutter.TextDirection.RTL ? St.Side.RIGHT : St.Side.LEFT;
|
||||||
|
this.menu = new PopupMenu.PopupMenu(Main.layoutManager.dummyCursor, 0.25, side);
|
||||||
|
this.menuManager = new PopupMenu.PopupMenuManager(GS_VERSION < '3.33.0' ? { actor: this.area } : this.area);
|
||||||
|
this.menuManager.addMenu(this.menu);
|
||||||
|
|
||||||
|
Main.layoutManager.uiGroup.add_actor(this.menu.actor);
|
||||||
|
|
||||||
|
this.menu.actor.add_style_class_name('background-menu draw-on-your-screen-menu');
|
||||||
|
this.menu.actor.hide();
|
||||||
|
this.hasSeparators = monitor.height >= 750;
|
||||||
|
|
||||||
|
// do not close the menu on item activated
|
||||||
|
this.menu.itemActivated = () => {};
|
||||||
|
this.menu.connect('open-state-changed', this._onMenuOpenStateChanged.bind(this));
|
||||||
|
|
||||||
|
// Case where the menu is closed (escape key) while the save entry clutter_text is active:
|
||||||
|
// St.Entry clutter_text set the DEFAULT cursor on leave event with a delay and
|
||||||
|
// overrides the cursor set by area.updatePointerCursor().
|
||||||
|
// In order to update drawing cursor on menu closed, we need to leave the saveEntry before closing menu.
|
||||||
|
// Since escape key press event can't be captured easily, the job is done in the menu close function.
|
||||||
|
let menuCloseFunc = this.menu.close;
|
||||||
|
this.menu.close = (animate) => {
|
||||||
|
if (this.saveDrawingSubMenu && this.saveDrawingSubMenu.isOpen)
|
||||||
|
this.saveDrawingSubMenu.close();
|
||||||
|
menuCloseFunc.bind(this.menu)(animate);
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
disable: function() {
|
||||||
|
delete this.area;
|
||||||
|
delete this.DrawingTool;
|
||||||
|
delete this.areaManagerUtils;
|
||||||
|
this.menuManager.removeMenu(this.menu);
|
||||||
|
Main.layoutManager.uiGroup.remove_actor(this.menu.actor);
|
||||||
|
this.menu.destroy();
|
||||||
|
},
|
||||||
|
|
||||||
|
_onMenuOpenStateChanged: function(menu, open) {
|
||||||
|
if (open) {
|
||||||
|
this.area.setPointerCursor('DEFAULT');
|
||||||
|
} else {
|
||||||
|
this.area.updatePointerCursor();
|
||||||
|
// actionMode has changed, set previous actionMode in order to keep internal shortcuts working
|
||||||
|
this.area.updateActionMode();
|
||||||
|
this.area.grab_key_focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
let workArea = Main.layoutManager.getWorkAreaForMonitor(this.monitor.index);
|
||||||
|
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||||
|
let maxHeight = Math.round(workArea.height / scaleFactor);
|
||||||
|
this.menu.actor.set_style(`max-height:${maxHeight}px;`);
|
||||||
|
},
|
||||||
|
|
||||||
|
popup: function() {
|
||||||
|
if (this.menu.isOpen) {
|
||||||
|
this.close();
|
||||||
|
} else {
|
||||||
|
this.open();
|
||||||
|
this.menu.actor.navigate_focus(null, Gtk.DirectionType.TAB_FORWARD, false);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
open: function(x, y) {
|
||||||
|
if (this.menu.isOpen)
|
||||||
|
return;
|
||||||
|
if (x === undefined || y === undefined)
|
||||||
|
[x, y] = [this.area.monitor.x + this.area.monitor.width / 2, this.area.monitor.y + this.area.monitor.height / 2];
|
||||||
|
this._redisplay();
|
||||||
|
Main.layoutManager.setDummyCursorGeometry(x, y, 0, 0);
|
||||||
|
let monitor = this.area.monitor;
|
||||||
|
this.menu._arrowAlignment = (y - monitor.y) / monitor.height;
|
||||||
|
this.menu.open(BoxPointer.PopupAnimation.NONE);
|
||||||
|
this.menuManager.ignoreRelease();
|
||||||
|
},
|
||||||
|
|
||||||
|
close: function() {
|
||||||
|
if (this.menu.isOpen)
|
||||||
|
this.menu.close();
|
||||||
|
},
|
||||||
|
|
||||||
|
_redisplay: function() {
|
||||||
|
this.menu.removeAll();
|
||||||
|
|
||||||
|
let groupItem = new PopupMenu.PopupBaseMenuItem({ reactive: false, can_focus: false, style_class: 'draw-on-your-screen-menu-group-item' });
|
||||||
|
this.undoButton = new ActionButton(getSummary('undo'), 'edit-undo-symbolic', this.area.undo.bind(this.area), this._updateActionSensitivity.bind(this));
|
||||||
|
this.redoButton = new ActionButton(getSummary('redo'), 'edit-redo-symbolic', this.area.redo.bind(this.area), this._updateActionSensitivity.bind(this));
|
||||||
|
this.eraseButton = new ActionButton(_("Erase"), 'edit-clear-all-symbolic', this.area.deleteLastElement.bind(this.area), this._updateActionSensitivity.bind(this));
|
||||||
|
this.smoothButton = new ActionButton(_("Smooth"), Files.Icons.SMOOTH, this.area.smoothLastElement.bind(this.area), this._updateActionSensitivity.bind(this));
|
||||||
|
this.eraseButton.child.add_style_class_name('draw-on-your-screen-menu-destructive-button');
|
||||||
|
getActor(groupItem).add_child(this.undoButton);
|
||||||
|
getActor(groupItem).add_child(this.redoButton);
|
||||||
|
getActor(groupItem).add_child(this.eraseButton);
|
||||||
|
getActor(groupItem).add_child(this.smoothButton);
|
||||||
|
this.menu.addMenuItem(groupItem);
|
||||||
|
this._addSeparator(this.menu, true);
|
||||||
|
|
||||||
|
this.toolItem = this._addToolSubMenuItem(this.menu, this._updateSectionVisibility.bind(this));
|
||||||
|
this.paletteItem = this._addPaletteSubMenuItem(this.menu, Files.Icons.PALETTE);
|
||||||
|
this.colorItem = this._addColorSubMenuItem(this.menu, Files.Icons.COLOR);
|
||||||
|
this.fillItem = this._addSwitchItem(this.menu, DisplayStrings.getFill(true), Files.Icons.STROKE, Files.Icons.FILL, this.area, 'fill', this._updateSectionVisibility.bind(this));
|
||||||
|
this.fillSection = new PopupMenu.PopupMenuSection();
|
||||||
|
this.fillSection.itemActivated = () => {};
|
||||||
|
this.fillRuleItem = this._addSwitchItem(this.fillSection, DisplayStrings.FillRule[1], Files.Icons.FILLRULE_NONZERO, Files.Icons.FILLRULE_EVENODD, this.area, 'currentEvenodd');
|
||||||
|
this.menu.addMenuItem(this.fillSection);
|
||||||
|
this._addSeparator(this.menu);
|
||||||
|
|
||||||
|
let lineSection = new PopupMenu.PopupMenuSection();
|
||||||
|
this._addSliderItem(lineSection, this.area, 'currentLineWidth');
|
||||||
|
this._addSubMenuItem(lineSection, Files.Icons.LINEJOIN, DisplayStrings.LineJoin, this.area, 'currentLineJoin');
|
||||||
|
this._addSubMenuItem(lineSection, Files.Icons.LINECAP, DisplayStrings.LineCap, this.area, 'currentLineCap');
|
||||||
|
this._addSwitchItem(lineSection, DisplayStrings.getDashedLine(true), Files.Icons.FULL_LINE, Files.Icons.DASHED_LINE, this.area, 'dashedLine');
|
||||||
|
this._addSeparator(lineSection);
|
||||||
|
this.menu.addMenuItem(lineSection);
|
||||||
|
lineSection.itemActivated = () => {};
|
||||||
|
this.lineSection = lineSection;
|
||||||
|
|
||||||
|
let fontSection = new PopupMenu.PopupMenuSection();
|
||||||
|
this._addFontFamilySubMenuItem(fontSection, Files.Icons.FONT_FAMILY);
|
||||||
|
this._addSubMenuItem(fontSection, Files.Icons.FONT_WEIGHT, DisplayStrings.FontWeight, this.area, 'currentFontWeight');
|
||||||
|
this._addSubMenuItem(fontSection, Files.Icons.FONT_STYLE, DisplayStrings.FontStyle, this.area, 'currentFontStyle');
|
||||||
|
this._addTextAlignmentSubMenuItem(fontSection);
|
||||||
|
this._addSeparator(fontSection);
|
||||||
|
this.menu.addMenuItem(fontSection);
|
||||||
|
fontSection.itemActivated = () => {};
|
||||||
|
this.fontSection = fontSection;
|
||||||
|
|
||||||
|
let imageSection = new PopupMenu.PopupMenuSection();
|
||||||
|
this.imageItem = this._addImageSubMenuItem(imageSection);
|
||||||
|
this._addSeparator(imageSection);
|
||||||
|
this.menu.addMenuItem(imageSection);
|
||||||
|
imageSection.itemActivated = () => {};
|
||||||
|
this.imageSection = imageSection;
|
||||||
|
|
||||||
|
this._addSimpleSwitchItem(this.menu, getSummary('toggle-panel-and-dock-visibility'), !!this.areaManagerUtils.getHiddenList(), this.areaManagerUtils.togglePanelAndDockOpacity);
|
||||||
|
this._addSimpleSwitchItem(this.menu, getSummary('toggle-background'), this.area.hasBackground, this.area.toggleBackground.bind(this.area));
|
||||||
|
this._addSimpleSwitchItem(this.menu, getSummary('toggle-grid'), this.area.hasGrid, this.area.toggleGrid.bind(this.area));
|
||||||
|
this._addSimpleSwitchItem(this.menu, getSummary('toggle-square-area'), this.area.isSquareArea, this.area.toggleSquareArea.bind(this.area));
|
||||||
|
this._addSeparator(this.menu);
|
||||||
|
|
||||||
|
this._addDrawingNameItem(this.menu);
|
||||||
|
this._addOpenDrawingSubMenuItem(this.menu, _("Open drawing"), 'document-open-symbolic');
|
||||||
|
this._addSaveDrawingSubMenuItem(this.menu, _("Save drawing as…"), 'document-save-as-symbolic');
|
||||||
|
this._addSeparator(this.menu);
|
||||||
|
|
||||||
|
groupItem = new PopupMenu.PopupBaseMenuItem({ reactive: false, can_focus: false, style_class: 'draw-on-your-screen-menu-group-item' });
|
||||||
|
this.saveButton = new ActionButton(getSummary('save-as-json'), 'document-save-symbolic', this.area.saveAsJson.bind(this.area, false, this._onDrawingSaved.bind(this)), null);
|
||||||
|
this.svgButton = new ActionButton(getSummary('export-to-svg'), Files.Icons.DOCUMENT_EXPORT, this.area.exportToSvg.bind(this.area), null);
|
||||||
|
this.prefsButton = new ActionButton(getSummary('open-preferences'), 'document-page-setup-symbolic', this.areaManagerUtils.openPreferences, null);
|
||||||
|
this.helpButton = new ActionButton(getSummary('toggle-help'), 'preferences-desktop-keyboard-shortcuts-symbolic', () => { this.close(); this.area.toggleHelp(); }, null);
|
||||||
|
getActor(groupItem).add_child(this.saveButton);
|
||||||
|
getActor(groupItem).add_child(this.svgButton);
|
||||||
|
getActor(groupItem).add_child(this.prefsButton);
|
||||||
|
getActor(groupItem).add_child(this.helpButton);
|
||||||
|
this.menu.addMenuItem(groupItem);
|
||||||
|
|
||||||
|
this._updateActionSensitivity();
|
||||||
|
this._updateSectionVisibility();
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateActionSensitivity: function() {
|
||||||
|
this.undoButton.child.reactive = this.area.elements.length > 0;
|
||||||
|
this.redoButton.child.reactive = this.area.undoneElements.length > 0 || (this.area.elements.length && this.area.elements[this.area.elements.length - 1].canUndo);
|
||||||
|
this.eraseButton.child.reactive = this.area.elements.length > 0;
|
||||||
|
this.smoothButton.child.reactive = this.area.elements.length > 0 && this.area.elements[this.area.elements.length - 1].shape == this.DrawingTool.NONE;
|
||||||
|
this.saveButton.child.reactive = this.area.elements.length > 0;
|
||||||
|
this.svgButton.child.reactive = this.area.elements.length > 0;
|
||||||
|
this.saveDrawingSubMenuItem.setSensitive(this.area.elements.length > 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateSectionVisibility: function() {
|
||||||
|
let [isText, isImage] = [this.area.currentTool == this.DrawingTool.TEXT, this.area.currentTool == this.DrawingTool.IMAGE];
|
||||||
|
this.lineSection.actor.visible = !isText && !isImage;
|
||||||
|
this.fontSection.actor.visible = isText;
|
||||||
|
this.imageSection.actor.visible = isImage;
|
||||||
|
this.fillItem.setSensitive(!isText && !isImage);
|
||||||
|
this.fillSection.setSensitive(!isText && !isImage);
|
||||||
|
|
||||||
|
if (this.area.fill)
|
||||||
|
this.fillSection.actor.show();
|
||||||
|
else
|
||||||
|
this.fillSection.actor.hide();
|
||||||
|
},
|
||||||
|
|
||||||
|
_addSwitchItem: function(menu, label, iconFalse, iconTrue, target, targetProperty, onToggled) {
|
||||||
|
let item = new PopupMenu.PopupSwitchMenuItem(label, target[targetProperty]);
|
||||||
|
|
||||||
|
item.icon = new St.Icon({ style_class: 'popup-menu-icon' });
|
||||||
|
getActor(item).insert_child_at_index(item.icon, 1);
|
||||||
|
let icon = target[targetProperty] ? iconTrue : iconFalse;
|
||||||
|
if (icon)
|
||||||
|
item.icon.set_gicon(icon);
|
||||||
|
|
||||||
|
item.connect('toggled', (item, state) => {
|
||||||
|
target[targetProperty] = state;
|
||||||
|
let icon = target[targetProperty] ? iconTrue : iconFalse;
|
||||||
|
if (icon)
|
||||||
|
item.icon.set_gicon(icon);
|
||||||
|
if (onToggled)
|
||||||
|
onToggled();
|
||||||
|
});
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
return item;
|
||||||
|
},
|
||||||
|
|
||||||
|
_addSimpleSwitchItem: function(menu, label, active, onToggled) {
|
||||||
|
let item = new PopupMenu.PopupSwitchMenuItem(label, active);
|
||||||
|
item.connect('toggled', onToggled);
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addSliderItem: function(menu, target, targetProperty) {
|
||||||
|
let item = new PopupMenu.PopupBaseMenuItem({ activate: false });
|
||||||
|
let label = new St.Label({ text: DisplayStrings.getPixels(target[targetProperty]), style_class: 'draw-on-your-screen-menu-slider-label' });
|
||||||
|
let slider = new Slider.Slider(target[targetProperty] / 50);
|
||||||
|
|
||||||
|
if (GS_VERSION < '3.33.0') {
|
||||||
|
slider.connect('value-changed', (slider, value, property) => {
|
||||||
|
target[targetProperty] = Math.max(Math.round(value * 50), 0);
|
||||||
|
label.set_text(DisplayStrings.getPixels(target[targetProperty]));
|
||||||
|
if (target[targetProperty] === 0)
|
||||||
|
label.add_style_class_name(WARNING_COLOR_STYLE_CLASS_NAME);
|
||||||
|
else
|
||||||
|
label.remove_style_class_name(WARNING_COLOR_STYLE_CLASS_NAME);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
slider.connect('notify::value', () => {
|
||||||
|
target[targetProperty] = Math.max(Math.round(slider.value * 50), 0);
|
||||||
|
label.set_text(DisplayStrings.getPixels(target[targetProperty]));
|
||||||
|
if (target[targetProperty] === 0)
|
||||||
|
label.add_style_class_name(WARNING_COLOR_STYLE_CLASS_NAME);
|
||||||
|
else
|
||||||
|
label.remove_style_class_name(WARNING_COLOR_STYLE_CLASS_NAME);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
getActor(slider).x_expand = true;
|
||||||
|
getActor(item).add_child(getActor(slider));
|
||||||
|
getActor(item).add_child(label);
|
||||||
|
if (slider.onKeyPressEvent)
|
||||||
|
getActor(item).connect('key-press-event', slider.onKeyPressEvent.bind(slider));
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addSubMenuItem: function(menu, icon, obj, target, targetProperty) {
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem(String(obj[target[targetProperty]]), icon ? true : false);
|
||||||
|
|
||||||
|
item.icon.set_gicon(icon);
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
|
||||||
|
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||||
|
Object.keys(obj).forEach(key => {
|
||||||
|
let text = targetProperty == 'currentFontWeight' ? `<span font_weight="${key}">${obj[key]}</span>` :
|
||||||
|
targetProperty == 'currentFontStyle' ? `<span font_style="${DisplayStrings.FontStyleMarkup[key]}">${obj[key]}</span>` :
|
||||||
|
String(obj[key]);
|
||||||
|
|
||||||
|
let subItem = item.menu.addAction(text, () => {
|
||||||
|
item.label.set_text(String(obj[key]));
|
||||||
|
target[targetProperty] = Number(key);
|
||||||
|
});
|
||||||
|
|
||||||
|
subItem.label.get_clutter_text().set_use_markup(true);
|
||||||
|
getActor(subItem).connect('key-focus-in', updateSubMenuAdjustment);
|
||||||
|
});
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addToolSubMenuItem: function(menu, callback) {
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem('', true);
|
||||||
|
item.update = () => {
|
||||||
|
item.label.set_text(DisplayStrings.Tool[this.area.currentTool]);
|
||||||
|
let toolName = this.DrawingTool.getNameOf(this.area.currentTool);
|
||||||
|
item.icon.set_gicon(Files.Icons[`TOOL_${toolName}`]);
|
||||||
|
};
|
||||||
|
item.update();
|
||||||
|
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
|
||||||
|
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||||
|
Object.keys(DisplayStrings.Tool).forEach(key => {
|
||||||
|
let text = DisplayStrings.Tool[key];
|
||||||
|
let toolName = this.DrawingTool.getNameOf(key);
|
||||||
|
let subItemIcon = Files.Icons[`TOOL_${toolName}`];
|
||||||
|
let subItem = item.menu.addAction(text, () => {
|
||||||
|
this.area.currentTool = Number(key);
|
||||||
|
item.update();
|
||||||
|
callback();
|
||||||
|
}, subItemIcon);
|
||||||
|
|
||||||
|
subItem.label.get_clutter_text().set_use_markup(true);
|
||||||
|
getActor(subItem).connect('key-focus-in', updateSubMenuAdjustment);
|
||||||
|
|
||||||
|
// change the display order of tools
|
||||||
|
if (key == this.DrawingTool.POLYGON)
|
||||||
|
item.menu.moveMenuItem(subItem, Number(this.DrawingTool.TEXT));
|
||||||
|
else if (key == this.DrawingTool.POLYLINE)
|
||||||
|
item.menu.moveMenuItem(subItem, Number(this.DrawingTool.TEXT) + 1);
|
||||||
|
});
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
return item;
|
||||||
|
},
|
||||||
|
|
||||||
|
_addPaletteSubMenuItem: function(menu, icon) {
|
||||||
|
let text = _(this.area.currentPalette[0] || "Palette");
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem(text, true);
|
||||||
|
item.icon.set_gicon(icon);
|
||||||
|
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
|
||||||
|
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||||
|
this.area.palettes.forEach(palette => {
|
||||||
|
let [name, colors] = palette;
|
||||||
|
if (!colors[0])
|
||||||
|
return;
|
||||||
|
|
||||||
|
let subItem = item.menu.addAction(_(name || "Palette"), () => {
|
||||||
|
item.label.set_text(_(name || "Palette"));
|
||||||
|
this.area.currentPalette = palette;
|
||||||
|
this._populateColorSubMenu();
|
||||||
|
});
|
||||||
|
getActor(subItem).connect('key-focus-in', updateSubMenuAdjustment);
|
||||||
|
});
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
return item;
|
||||||
|
},
|
||||||
|
|
||||||
|
_addColorSubMenuItem: function(menu, icon) {
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem(_("Color"), true);
|
||||||
|
this.colorSubMenu = item.menu;
|
||||||
|
item.icon.set_gicon(icon);
|
||||||
|
item.icon.set_style(`color:${this.area.currentColor.to_string().slice(0, 7)};`);
|
||||||
|
|
||||||
|
if (GS_VERSION >= '3.30') {
|
||||||
|
let colorPickerCallback = () => {
|
||||||
|
this.close();
|
||||||
|
this.area.pickColor();
|
||||||
|
};
|
||||||
|
// Translators: It is displayed in a menu button tooltip or as a shortcut action description, so it should NOT use the imperative mood.
|
||||||
|
let colorPickerButton = new ActionButton(_("Pick a color"), Files.Icons.COLOR_PICKER, colorPickerCallback, null, true);
|
||||||
|
let index = getActor(item).get_children().length - 1;
|
||||||
|
getActor(item).insert_child_at_index(colorPickerButton, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
|
||||||
|
this._populateColorSubMenu();
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
return item;
|
||||||
|
},
|
||||||
|
|
||||||
|
_populateColorSubMenu: function() {
|
||||||
|
this.colorSubMenu.removeAll();
|
||||||
|
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||||
|
this.area.colors.forEach(color => {
|
||||||
|
let text = String(color);
|
||||||
|
let subItem = this.colorSubMenu.addAction(text, () => {
|
||||||
|
this.area.currentColor = color;
|
||||||
|
this.colorItem.icon.set_style(`color:${color.to_string().slice(0, 7)};`);
|
||||||
|
});
|
||||||
|
// Foreground color markup is not displayed since 3.36, use style instead but the transparency is lost.
|
||||||
|
subItem.label.set_style(`color:${color.to_string().slice(0, 7)};`);
|
||||||
|
getActor(subItem).connect('key-focus-in', updateSubMenuAdjustment);
|
||||||
|
});
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_addFontFamilySubMenuItem: function(menu, icon) {
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem(DisplayStrings.getFontFamily(this.area.currentFontFamily), true);
|
||||||
|
item.icon.set_gicon(icon);
|
||||||
|
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
item.menu.actor.add_style_class_name('draw-on-your-screen-menu-ellipsized');
|
||||||
|
|
||||||
|
item.menu.openOld = item.menu.open;
|
||||||
|
item.menu.open = (animate) => {
|
||||||
|
if (!item.menu.isOpen && item.menu.isEmpty()) {
|
||||||
|
this.area.fontFamilies.forEach(family => {
|
||||||
|
let subItem = item.menu.addAction(DisplayStrings.getFontFamily(family), () => {
|
||||||
|
item.label.set_text(DisplayStrings.getFontFamily(family));
|
||||||
|
this.area.currentFontFamily = family;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (FONT_FAMILY_STYLE)
|
||||||
|
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||||
|
subItem.label.set_style(`font-family:${family}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
getActor(subItem).connect('key-focus-in', updateSubMenuAdjustment);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
item.menu.openOld();
|
||||||
|
};
|
||||||
|
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addTextAlignmentSubMenuItem: function(menu) {
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem(DisplayStrings.TextAlignment[this.area.currentTextAlignment], true);
|
||||||
|
item.icon.set_gicon(TextAlignmentIcon[this.area.currentTextAlignment]);
|
||||||
|
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
|
||||||
|
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||||
|
Object.keys(TextAlignmentIcon).forEach(key => {
|
||||||
|
let subItem = item.menu.addAction(DisplayStrings.TextAlignment[key], () => {
|
||||||
|
item.label.set_text(DisplayStrings.TextAlignment[key]);
|
||||||
|
this.area.currentTextAlignment = key;
|
||||||
|
item.icon.set_gicon(TextAlignmentIcon[key]);
|
||||||
|
});
|
||||||
|
|
||||||
|
getActor(subItem).connect('key-focus-in', updateSubMenuAdjustment);
|
||||||
|
});
|
||||||
|
return GLib.SOURCE_REMOVE;
|
||||||
|
});
|
||||||
|
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addImageSubMenuItem: function(menu, images) {
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem('', true);
|
||||||
|
item.update = () => {
|
||||||
|
item.label.set_text(this.area.currentImage.toString());
|
||||||
|
item.icon.set_gicon(this.area.currentImage.gicon);
|
||||||
|
};
|
||||||
|
item.update();
|
||||||
|
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
item.menu.actor.add_style_class_name('draw-on-your-screen-menu-ellipsized');
|
||||||
|
|
||||||
|
item.menu.openOld = item.menu.open;
|
||||||
|
item.menu.open = (animate) => {
|
||||||
|
if (!item.menu.isOpen && item.menu.isEmpty()) {
|
||||||
|
Files.Images.getSorted().forEach(image => {
|
||||||
|
let subItem = item.menu.addAction(image.toString(), () => {
|
||||||
|
this.area.currentImage = image;
|
||||||
|
item.update();
|
||||||
|
}, Files.Icons.FAKE);
|
||||||
|
|
||||||
|
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||||
|
if (subItem.setIcon && image.thumbnailGicon)
|
||||||
|
subItem.setIcon(image.thumbnailGicon);
|
||||||
|
});
|
||||||
|
|
||||||
|
getActor(subItem).connect('key-focus-in', updateSubMenuAdjustment);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
item.menu.openOld();
|
||||||
|
};
|
||||||
|
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
return item;
|
||||||
|
},
|
||||||
|
|
||||||
|
_addDrawingNameItem: function(menu) {
|
||||||
|
this.drawingNameMenuItem = new PopupMenu.PopupMenuItem('', { reactive: false, activate: false });
|
||||||
|
this.drawingNameMenuItem.setSensitive(false);
|
||||||
|
getActor(this.drawingNameMenuItem).add_style_class_name('draw-on-your-screen-menu-ellipsized');
|
||||||
|
menu.addMenuItem(this.drawingNameMenuItem);
|
||||||
|
this._updateDrawingNameMenuItem();
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateDrawingNameMenuItem: function() {
|
||||||
|
getActor(this.drawingNameMenuItem).visible = this.area.currentJson ? true : false;
|
||||||
|
if (this.area.currentJson) {
|
||||||
|
let prefix = this.area.drawingContentsHasChanged ? "* " : "";
|
||||||
|
this.drawingNameMenuItem.label.set_text(`<i>${prefix}${this.area.currentJson.name}</i>`);
|
||||||
|
this.drawingNameMenuItem.label.get_clutter_text().set_use_markup(true);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
_addOpenDrawingSubMenuItem: function(menu, label, icon) {
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem(label, true);
|
||||||
|
this.openDrawingSubMenuItem = item;
|
||||||
|
this.openDrawingSubMenu = item.menu;
|
||||||
|
item.setSensitive(Boolean(Files.Jsons.getSorted().length));
|
||||||
|
item.icon.set_icon_name(icon);
|
||||||
|
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
item.menu.actor.add_style_class_name('draw-on-your-screen-menu-ellipsized');
|
||||||
|
|
||||||
|
item.menu.openOld = item.menu.open;
|
||||||
|
item.menu.open = (animate) => {
|
||||||
|
if (!item.menu.isOpen)
|
||||||
|
this._populateOpenDrawingSubMenu();
|
||||||
|
item.menu.openOld();
|
||||||
|
};
|
||||||
|
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
},
|
||||||
|
|
||||||
|
_populateOpenDrawingSubMenu: function() {
|
||||||
|
this.openDrawingSubMenu.removeAll();
|
||||||
|
Files.Jsons.getSorted().forEach(json => {
|
||||||
|
if (!json.gicon)
|
||||||
|
json.addSvgContents(...this.area.getSvgContentsForJson(json));
|
||||||
|
|
||||||
|
let subItem = this.openDrawingSubMenu.addAction(`<i>${String(json)}</i>`, () => {
|
||||||
|
this.area.loadJson(json);
|
||||||
|
this._updateDrawingNameMenuItem();
|
||||||
|
this._updateActionSensitivity();
|
||||||
|
}, Files.Icons.FAKE);
|
||||||
|
|
||||||
|
GLib.idle_add(GLib.PRIORITY_DEFAULT_IDLE, () => {
|
||||||
|
if (subItem.setIcon)
|
||||||
|
subItem.setIcon(json.gicon);
|
||||||
|
});
|
||||||
|
|
||||||
|
subItem.label.get_clutter_text().set_use_markup(true);
|
||||||
|
getActor(subItem).connect('key-focus-in', updateSubMenuAdjustment);
|
||||||
|
|
||||||
|
let expander = new St.Bin({
|
||||||
|
style_class: 'popup-menu-item-expander',
|
||||||
|
x_expand: true,
|
||||||
|
});
|
||||||
|
getActor(subItem).add_child(expander);
|
||||||
|
|
||||||
|
let insertCallback = () => {
|
||||||
|
this.area.currentImage = json.image;
|
||||||
|
this.imageItem.update();
|
||||||
|
this.area.currentTool = this.DrawingTool.IMAGE;
|
||||||
|
this.toolItem.update();
|
||||||
|
this._updateSectionVisibility();
|
||||||
|
};
|
||||||
|
let insertButton = new ActionButton(_("Add to images"), 'insert-image-symbolic', insertCallback, null, true);
|
||||||
|
getActor(subItem).add_child(insertButton);
|
||||||
|
|
||||||
|
let deleteCallback = () => {
|
||||||
|
json.delete();
|
||||||
|
subItem.destroy();
|
||||||
|
this.openDrawingSubMenuItem.setSensitive(!this.openDrawingSubMenu.isEmpty());
|
||||||
|
};
|
||||||
|
let deleteButton = new ActionButton(_("Delete"), 'edit-delete-symbolic', deleteCallback, null, true);
|
||||||
|
deleteButton.child.add_style_class_name('draw-on-your-screen-menu-destructive-button');
|
||||||
|
getActor(subItem).add_child(deleteButton);
|
||||||
|
});
|
||||||
|
|
||||||
|
this.openDrawingSubMenuItem.setSensitive(!this.openDrawingSubMenu.isEmpty());
|
||||||
|
},
|
||||||
|
|
||||||
|
_addSaveDrawingSubMenuItem: function(menu, label, icon) {
|
||||||
|
let item = new PopupMenu.PopupSubMenuMenuItem(label, true);
|
||||||
|
this.saveDrawingSubMenuItem = item;
|
||||||
|
this.saveDrawingSubMenu = item.menu;
|
||||||
|
item.icon.set_icon_name(icon);
|
||||||
|
|
||||||
|
item.menu.itemActivated = item.menu.close;
|
||||||
|
|
||||||
|
item.menu.openOld = item.menu.open;
|
||||||
|
item.menu.open = (animate) => {
|
||||||
|
if (!item.menu.isOpen)
|
||||||
|
this._populateSaveDrawingSubMenu();
|
||||||
|
item.menu.openOld();
|
||||||
|
};
|
||||||
|
menu.addMenuItem(item);
|
||||||
|
},
|
||||||
|
|
||||||
|
_updateSaveDrawingSubMenuItemSensitivity: function() {
|
||||||
|
this.saveDrawingSubMenuItem.setSensitive(this.area.elements.length > 0);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onDrawingSaved() {
|
||||||
|
this._updateDrawingNameMenuItem();
|
||||||
|
this.openDrawingSubMenuItem.setSensitive(true);
|
||||||
|
},
|
||||||
|
|
||||||
|
_populateSaveDrawingSubMenu: function() {
|
||||||
|
this.saveDrawingSubMenu.removeAll();
|
||||||
|
let saveEntry = new Entry({ initialTextGetter: () => this.area.currentJson ? this.area.currentJson.name : "",
|
||||||
|
hint_text: _("Type a name"),
|
||||||
|
entryActivateCallback: (text) => {
|
||||||
|
this.area.saveAsJsonWithName(text, this._onDrawingSaved.bind(this));
|
||||||
|
this.saveDrawingSubMenu.toggle();
|
||||||
|
},
|
||||||
|
invalidStrings: [Me.metadata['persistent-file-name'], '/'],
|
||||||
|
primaryIconName: 'insert-text' });
|
||||||
|
this.saveDrawingSubMenu.addMenuItem(saveEntry.item);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addSeparator: function(menu, thin) {
|
||||||
|
if (this.hasSeparators) {
|
||||||
|
let separatorItem = new PopupMenu.PopupSeparatorMenuItem(' ');
|
||||||
|
getActor(separatorItem).add_style_class_name('draw-on-your-screen-menu-separator-item');
|
||||||
|
if (thin)
|
||||||
|
getActor(separatorItem).add_style_class_name('draw-on-your-screen-menu-thin-separator-item');
|
||||||
|
menu.addMenuItem(separatorItem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// based on ApplicationsButton.scrollToButton , https://gitlab.gnome.org/GNOME/gnome-shell-extensions/blob/master/extensions/apps-menu/extension.js
|
||||||
|
const updateSubMenuAdjustment = function(itemActor) {
|
||||||
|
let scrollView = itemActor.get_parent().get_parent();
|
||||||
|
let adjustment = scrollView.get_vscroll_bar().get_adjustment();
|
||||||
|
let scrollViewAlloc = scrollView.get_allocation_box();
|
||||||
|
let currentScrollValue = adjustment.get_value();
|
||||||
|
let height = scrollViewAlloc.y2 - scrollViewAlloc.y1;
|
||||||
|
let itemActorAlloc = itemActor.get_allocation_box();
|
||||||
|
let newScrollValue = currentScrollValue;
|
||||||
|
if (currentScrollValue > itemActorAlloc.y1 - 10)
|
||||||
|
newScrollValue = itemActorAlloc.y1 - 10;
|
||||||
|
if (height + currentScrollValue < itemActorAlloc.y2 + 10)
|
||||||
|
newScrollValue = itemActorAlloc.y2 - height + 10;
|
||||||
|
if (newScrollValue != currentScrollValue)
|
||||||
|
adjustment.set_value(newScrollValue);
|
||||||
|
};
|
||||||
|
|
||||||
|
// An action button that uses upstream dash item tooltips.
|
||||||
|
const ActionButton = new Lang.Class({
|
||||||
|
Name: `${UUID}-DrawingMenuActionButton`,
|
||||||
|
Extends: St.Bin,
|
||||||
|
_labelShowing: false,
|
||||||
|
_resetHoverTimeoutId: 0,
|
||||||
|
_showLabelTimeoutId: 0,
|
||||||
|
showLabel: Dash.DashItemContainer.prototype.showLabel,
|
||||||
|
hideLabel: Dash.DashItemContainer.prototype.hideLabel,
|
||||||
|
_syncLabel: Dash.Dash.prototype._syncLabel,
|
||||||
|
|
||||||
|
_init: function(name, icon, callback, callbackAfter, inline) {
|
||||||
|
this._labelText = name;
|
||||||
|
|
||||||
|
let button = new St.Button({ track_hover: true,
|
||||||
|
x_align: Clutter.ActorAlign.CENTER,
|
||||||
|
accessible_name: name,
|
||||||
|
style_class: `button draw-on-your-screen-menu-${inline ? 'inline' : 'action'}-button` });
|
||||||
|
|
||||||
|
button.child = new St.Icon(typeof icon == 'string' ? { icon_name: icon } : { gicon: icon });
|
||||||
|
if (inline)
|
||||||
|
button.child.add_style_class_name('popup-menu-icon');
|
||||||
|
|
||||||
|
button.connect('clicked', () => {
|
||||||
|
callback();
|
||||||
|
if (callbackAfter)
|
||||||
|
callbackAfter();
|
||||||
|
});
|
||||||
|
button.bind_property('reactive', button, 'can_focus', GObject.BindingFlags.DEFAULT);
|
||||||
|
button.connect('notify::hover', () => this._syncLabel(this));
|
||||||
|
|
||||||
|
this.parent({ child: button, x_expand: inline ? false : true });
|
||||||
|
},
|
||||||
|
|
||||||
|
get label() {
|
||||||
|
if (!this._label) {
|
||||||
|
this._label = new St.Label({ style_class: 'dash-label' });
|
||||||
|
Main.layoutManager.uiGroup.add_actor(this._label);
|
||||||
|
this.connect('destroy', () => this._label.destroy());
|
||||||
|
}
|
||||||
|
|
||||||
|
return this._label;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// based on searchItem.js, https://github.com/leonardo-bartoli/gnome-shell-extension-Recents
|
||||||
|
const Entry = new Lang.Class({
|
||||||
|
Name: `${UUID}-DrawingMenuEntry`,
|
||||||
|
|
||||||
|
_init: function(params) {
|
||||||
|
this.params = params;
|
||||||
|
this.item = new PopupMenu.PopupBaseMenuItem({ style_class: 'draw-on-your-screen-menu-entry-item',
|
||||||
|
activate: false,
|
||||||
|
reactive: true,
|
||||||
|
can_focus: false });
|
||||||
|
|
||||||
|
this.itemActor = GS_VERSION < '3.33.0' ? this.item.actor : this.item;
|
||||||
|
|
||||||
|
this.entry = new St.Entry({
|
||||||
|
hint_text: params.hint_text || "",
|
||||||
|
style_class: 'search-entry draw-on-your-screen-menu-entry',
|
||||||
|
track_hover: true,
|
||||||
|
reactive: true,
|
||||||
|
can_focus: true,
|
||||||
|
x_expand: true
|
||||||
|
});
|
||||||
|
|
||||||
|
this.entry.set_primary_icon(new St.Icon({ style_class: 'search-entry-icon',
|
||||||
|
icon_name: this.params.primaryIconName }));
|
||||||
|
|
||||||
|
this.entry.clutter_text.connect('text-changed', this._onTextChanged.bind(this));
|
||||||
|
this.entry.clutter_text.connect('activate', this._onTextActivated.bind(this));
|
||||||
|
|
||||||
|
this.clearIcon = new St.Icon({
|
||||||
|
style_class: 'search-entry-icon',
|
||||||
|
icon_name: 'edit-clear-symbolic'
|
||||||
|
});
|
||||||
|
this.entry.connect('secondary-icon-clicked', this._reset.bind(this));
|
||||||
|
|
||||||
|
getActor(this.item).add_child(this.entry);
|
||||||
|
getActor(this.item).connect('notify::mapped', (actor) => {
|
||||||
|
if (actor.mapped) {
|
||||||
|
this.entry.set_text(this.params.initialTextGetter());
|
||||||
|
this.entry.clutter_text.grab_key_focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
|
_setError: function(hasError) {
|
||||||
|
if (hasError)
|
||||||
|
this.entry.add_style_class_name('draw-on-your-screen-menu-entry-error');
|
||||||
|
else
|
||||||
|
this.entry.remove_style_class_name('draw-on-your-screen-menu-entry-error');
|
||||||
|
},
|
||||||
|
|
||||||
|
_reset: function() {
|
||||||
|
this.entry.text = '';
|
||||||
|
this.entry.clutter_text.set_cursor_visible(true);
|
||||||
|
this.entry.clutter_text.set_selection(0, 0);
|
||||||
|
this._setError(false);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onTextActivated: function(clutterText) {
|
||||||
|
let text = clutterText.get_text();
|
||||||
|
if (text.length == 0)
|
||||||
|
return;
|
||||||
|
if (this._getIsInvalid())
|
||||||
|
return;
|
||||||
|
this._reset();
|
||||||
|
this.params.entryActivateCallback(text);
|
||||||
|
},
|
||||||
|
|
||||||
|
_onTextChanged: function(clutterText) {
|
||||||
|
let text = clutterText.get_text();
|
||||||
|
this.entry.set_secondary_icon(text.length ? this.clearIcon : null);
|
||||||
|
|
||||||
|
if (text.length)
|
||||||
|
this._setError(this._getIsInvalid());
|
||||||
|
},
|
||||||
|
|
||||||
|
_getIsInvalid: function() {
|
||||||
|
for (let i = 0; i < this.params.invalidStrings.length; i++) {
|
||||||
|
if (this.entry.text.indexOf(this.params.invalidStrings[i]) != -1)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,14 +1,23 @@
|
||||||
{
|
{
|
||||||
"name": "Draw On You Screen",
|
"name": "Draw On You Screen",
|
||||||
"description": "Start drawing with Super+Alt+D and save your beautiful work by taking a screenshot",
|
"description": "Start drawing with Super+Alt+D and save your beautiful work by taking a screenshot",
|
||||||
"version": 1,
|
"uuid": "draw-on-your-screen@som.codeberg.org",
|
||||||
"uuid": "drawOnYourScreen@abakkk.framagit.org",
|
"url": "https://codeberg.org/som/DrawOnYourScreen",
|
||||||
"url": "https://framagit.org/abakkk/DrawOnYourScreen",
|
|
||||||
"settings-schema": "org.gnome.shell.extensions.draw-on-your-screen",
|
"settings-schema": "org.gnome.shell.extensions.draw-on-your-screen",
|
||||||
"gettext-domain": "draw-on-your-screen",
|
"gettext-domain": "draw-on-your-screen",
|
||||||
|
"data-dir": "draw-on-your-screen",
|
||||||
|
"persistent-file-name": "persistent",
|
||||||
|
"svg-file-name": "DrawOnYourScreen",
|
||||||
"shell-version": [
|
"shell-version": [
|
||||||
|
"3.24",
|
||||||
"3.26",
|
"3.26",
|
||||||
"3.28",
|
"3.28",
|
||||||
"3.30"
|
"3.30",
|
||||||
]
|
"3.32",
|
||||||
|
"3.34",
|
||||||
|
"3.36",
|
||||||
|
"3.38",
|
||||||
|
"40"
|
||||||
|
],
|
||||||
|
"version": 11.1
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,185 +1,346 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<schemalist gettext-domain="gnome-shell-extensions">
|
<schemalist gettext-domain="draw-on-your-screen">
|
||||||
<schema path="/org/gnome/shell/extensions/draw-on-your-screen/" id="org.gnome.shell.extensions.draw-on-your-screen">
|
<schema path="/org/gnome/shell/extensions/draw-on-your-screen/" id="org.gnome.shell.extensions.draw-on-your-screen">
|
||||||
<key type="b" name="smoothed-stroke">
|
<child name="drawing" schema="org.gnome.shell.extensions.draw-on-your-screen.drawing"/>
|
||||||
|
<child name="internal-shortcuts" schema="org.gnome.shell.extensions.draw-on-your-screen.internal-shortcuts"/>
|
||||||
|
<key type="b" name="drawing-on-desktop">
|
||||||
<default>false</default>
|
<default>false</default>
|
||||||
<summary>smoothed stroke</summary>
|
<summary>Drawing on the desktop</summary>
|
||||||
<description>smoothed stroke</description>
|
<description><![CDATA[<i>Draw On Your Screen</i> becomes <i>Draw On Your Desktop</i>]]></description>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="erase-drawings">
|
||||||
|
<default>["<Alt><Super>e"]</default>
|
||||||
|
<summary>Erase all drawings</summary>
|
||||||
|
</key>
|
||||||
|
<key type="b" name="indicator-disabled">
|
||||||
|
<default>false</default>
|
||||||
|
<summary>Disable panel indicator</summary>
|
||||||
|
</key>
|
||||||
|
<key type="b" name="osd-disabled">
|
||||||
|
<default>false</default>
|
||||||
|
<summary>Disable on-screen notifications</summary>
|
||||||
|
</key>
|
||||||
|
<key type="b" name="persistent-over-toggles">
|
||||||
|
<default>true</default>
|
||||||
|
<summary>Persistent over toggles</summary>
|
||||||
|
<description>Drawing remains when toggling drawing mode</description>
|
||||||
|
</key>
|
||||||
|
<key type="b" name="persistent-over-restarts">
|
||||||
|
<default>false</default>
|
||||||
|
<summary>Persistent over restarts</summary>
|
||||||
|
<description>Drawing is automatically saved to a file</description>
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="toggle-drawing">
|
<key type="as" name="toggle-drawing">
|
||||||
<default>["<Alt><Super>d"]</default>
|
<default>["<Alt><Super>d"]</default>
|
||||||
<summary>toggle drawing</summary>
|
<summary>Enter/leave drawing mode</summary>
|
||||||
<description>enter or leave drawing mode</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="erase-drawing">
|
<key type="as" name="toggle-modal">
|
||||||
<default>["<Alt><Super>e"]</default>
|
<default>["<Primary><Alt><Super>d"]</default>
|
||||||
<summary>erase drawing</summary>
|
<!-- Translators: there is a similar text in GNOME Boxes (https://gitlab.gnome.org/GNOME/gnome-boxes/tree/master/po) -->
|
||||||
<description>erase drawing</description>
|
<summary>Grab/ungrab keyboard and pointer</summary>
|
||||||
|
<description></description>
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="undo">
|
</schema>
|
||||||
<default>["<Primary>z"]</default>
|
<schema path="/org/gnome/shell/extensions/draw-on-your-screen/drawing/" id="org.gnome.shell.extensions.draw-on-your-screen.drawing">
|
||||||
<summary>undo</summary>
|
<key type="s" name="background-color">
|
||||||
<description>undo</description>
|
<default>"#2e2e2e"</default>
|
||||||
|
<summary>Background color</summary>
|
||||||
|
<description>The color of the drawing area background</description>
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="redo">
|
<key type="b" name="dash-array-auto">
|
||||||
<default>["<Primary><Shift>z"]</default>
|
<default>true</default>
|
||||||
<summary>redo</summary>
|
<summary>Automatic dash array</summary>
|
||||||
<description>redo</description>
|
<description>Compute the lengths from the line width</description>
|
||||||
|
</key>
|
||||||
|
<key type="d" name="dash-array-on">
|
||||||
|
<range min="0.1" max="16384"/>
|
||||||
|
<default>5</default>
|
||||||
|
<summary>Dash array on</summary>
|
||||||
|
<description>The dash length in pixels</description>
|
||||||
|
</key>
|
||||||
|
<key type="d" name="dash-array-off">
|
||||||
|
<range min="0.1" max="16384"/>
|
||||||
|
<default>15</default>
|
||||||
|
<summary>Dash array off</summary>
|
||||||
|
<description>The gap between the dashes in pixels</description>
|
||||||
|
</key>
|
||||||
|
<key type="d" name="dash-offset">
|
||||||
|
<range min="-16384" max="16384"/>
|
||||||
|
<default>0</default>
|
||||||
|
<summary>Dash offset</summary>
|
||||||
|
<description>The dash offset in pixels</description>
|
||||||
|
</key>
|
||||||
|
<key type="s" name="grid-color">
|
||||||
|
<default>"Gray"</default>
|
||||||
|
<summary>Grid overlay color</summary>
|
||||||
|
<description>The color of the lines</description>
|
||||||
|
</key>
|
||||||
|
<key type="b" name="grid-line-auto">
|
||||||
|
<default>true</default>
|
||||||
|
<summary>Automatic grid overlay line</summary>
|
||||||
|
<description>Compute the lengths from the screen size</description>
|
||||||
|
</key>
|
||||||
|
<key type="u" name="grid-line-spacing">
|
||||||
|
<range min="1" max="16384"/>
|
||||||
|
<default>10</default>
|
||||||
|
<summary>Grid overlay line spacing</summary>
|
||||||
|
<description>The gap between lines in pixels</description>
|
||||||
|
</key>
|
||||||
|
<key type="d" name="grid-line-width">
|
||||||
|
<range min="0.1" max="10"/>
|
||||||
|
<default>0.5</default>
|
||||||
|
<summary>Grid overlay line width</summary>
|
||||||
|
<description>The line width in pixels</description>
|
||||||
|
</key>
|
||||||
|
<key type="s" name="image-location">
|
||||||
|
<default>""</default>
|
||||||
|
<summary>Image location</summary>
|
||||||
|
<description>The location of the directory in which the image tool picks</description>
|
||||||
|
</key>
|
||||||
|
<key type="a(sas)" name="palettes">
|
||||||
|
<default>
|
||||||
|
[
|
||||||
|
('Palette', ['HotPink', 'Cyan', 'yellow', 'Orangered', 'Chartreuse', 'DarkViolet', 'White', 'Gray', 'Black']),
|
||||||
|
('GNOME HIG lighter', ['rgb(153,193,241):Blue 1', 'rgb(143,240,164):Green 1', 'rgb(249,240,107):Yellow 1', 'rgb(255,190,111):Orange 1', 'rgb(246,97,81):Red 1', 'rgb(220,138,221):Purple 1', 'rgb(205,171,143):Brown 1', 'rgb(255,255,255):Light 1', 'rgb(119,118,123):Dark 1']),
|
||||||
|
('GNOME HIG light', ['rgb(98,160,234):Blue 2', 'rgb(87,227,137):Green 2', 'rgb(248,228,92):Yellow 2', 'rgb(255,163,72):Orange 2', 'rgb(237,51,59):Red 2', 'rgb(192,97,203):Purple 2', 'rgb(181,131,90):Brown 2', 'rgb(246,245,244):Light 2', 'rgb(94,92,100):Dark 2']),
|
||||||
|
('GNOME HIG normal', ['rgb(53,132,228):Blue 3', 'rgb(51,209,122):Green 3', 'rgb(246,211,45):Yellow 3', 'rgb(255,120,0):Orange 3', 'rgb(224,27,36):Red 3', 'rgb(145,65,172):Purple 3', 'rgb(152,106,68):Brown 3', 'rgb(222,221,218):Light 3', 'rgb(61,56,70):Dark 3']),
|
||||||
|
('GNOME HIG dark', ['rgb(28,113,216):Blue 4', 'rgb(46,194,126):Green 4', 'rgb(245,194,17):Yellow 4', 'rgb(230,97,0):Orange 4', 'rgb(192,28,40):Red 4', 'rgb(129,61,156):Purple 4', 'rgb(134,94,60):Brown 4', 'rgb(192,191,188):Light 4', 'rgb(36,31,49):Dark 4']),
|
||||||
|
('GNOME HIG darker', ['rgb(26,95,180):Blue 5', 'rgb(38,162,105):Green 5', 'rgb(229,165,10):Yellow 5', 'rgb(198,70,0):Orange 5', 'rgb(165,29,45):Red 5', 'rgb(97,53,131):Purple 5', 'rgb(99,69,44):Brown 5', 'rgb(154,153,150):Light 5', 'rgb(0,0,0):Dark 5'])
|
||||||
|
]
|
||||||
|
</default>
|
||||||
|
<summary>Color palettes</summary>
|
||||||
|
<description>The palettes of drawing colors</description>
|
||||||
|
</key>
|
||||||
|
<key type="b" name="square-area-auto">
|
||||||
|
<default>true</default>
|
||||||
|
<summary>Automatic square area size</summary>
|
||||||
|
<description>Compute the area size from the screen size</description>
|
||||||
|
</key>
|
||||||
|
<key type="u" name="square-area-size">
|
||||||
|
<range min="64" max="32768"/>
|
||||||
|
<default>512</default>
|
||||||
|
<summary>Square area size</summary>
|
||||||
|
<description>The size of the area in pixels</description>
|
||||||
|
</key>
|
||||||
|
</schema>
|
||||||
|
<schema path="/org/gnome/shell/extensions/draw-on-your-screen/internal-shortcuts/" id="org.gnome.shell.extensions.draw-on-your-screen.internal-shortcuts">
|
||||||
|
<key type="as" name="decrement-line-width">
|
||||||
|
<default><![CDATA[['<Primary>KP_Subtract','<Primary>minus','<Primary><Shift>minus']]]></default>
|
||||||
|
<summary>Decrement line width</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="decrement-line-width-more">
|
||||||
|
<default>["<Primary><Shift>KP_Subtract"]</default>
|
||||||
|
<summary>Decrement line width even more</summary>
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="delete-last-element">
|
<key type="as" name="delete-last-element">
|
||||||
<default>["Delete"]</default>
|
<default>["Delete"]</default>
|
||||||
<summary>delete last element</summary>
|
<summary>Erase last brushstroke</summary>
|
||||||
<description>delete last element</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="smooth-last-element">
|
<key type="as" name="export-to-svg">
|
||||||
<default>["<Primary>equal"]</default>
|
<default>["<Primary><Alt>s"]</default>
|
||||||
<summary>smooth last brushstroke</summary>
|
<summary>Export drawing to a SVG file</summary>
|
||||||
<description>smooth last brushstroke</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="toggle-background">
|
|
||||||
<default>["<Primary>b"]</default>
|
|
||||||
<summary>toggle background</summary>
|
|
||||||
<description>toggle background</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="toggle-panel-and-dock-visibility">
|
|
||||||
<default>["<Primary>h"]</default>
|
|
||||||
<summary>hide or show panel and dock</summary>
|
|
||||||
<description>hide or show panel and dock</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="select-ellipse-shape">
|
|
||||||
<default>["<Primary>e"]</default>
|
|
||||||
<summary>select cercle</summary>
|
|
||||||
<description>select a cercle</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="select-rectangle-shape">
|
|
||||||
<default>["<Primary>r"]</default>
|
|
||||||
<summary>select rectangle</summary>
|
|
||||||
<description>select rectangle</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="select-line-shape">
|
|
||||||
<default>["<Primary>l"]</default>
|
|
||||||
<summary>select line</summary>
|
|
||||||
<description>select a line</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="select-text-shape">
|
|
||||||
<default>["<Primary>t"]</default>
|
|
||||||
<summary>select text</summary>
|
|
||||||
<description>select text</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="select-none-shape">
|
|
||||||
<default>["<Primary>p"]</default>
|
|
||||||
<summary>unselect shape (free drawing)</summary>
|
|
||||||
<description>unselect shape (free drawing)</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="increment-line-width">
|
<key type="as" name="increment-line-width">
|
||||||
<default>["<Primary>KP_Add"]</default>
|
<default><![CDATA[['<Primary>KP_Add','<Primary><Shift>plus']]]></default>
|
||||||
<summary>increment the line width</summary>
|
<summary>Increment line width</summary>
|
||||||
<description>increment the line width</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="decrement-line-width">
|
|
||||||
<default>["<Primary>KP_Subtract"]</default>
|
|
||||||
<summary>decrement the line width</summary>
|
|
||||||
<description>decrement the line width</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="increment-line-width-more">
|
<key type="as" name="increment-line-width-more">
|
||||||
<default>["<Primary>Page_Up"]</default>
|
<default>["<Primary><Shift>KP_Add"]</default>
|
||||||
<summary>increment the line width even more</summary>
|
<summary>Increment line width even more</summary>
|
||||||
<description>increment the line width even more</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="decrement-line-width-more">
|
<key type="as" name="open-next-json">
|
||||||
<default>["<Primary>Page_Down"]</default>
|
<default>["<Primary>o"]</default>
|
||||||
<summary>decrement the line width even more</summary>
|
<summary>Open next drawing</summary>
|
||||||
<description>decrement the line width even more</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="toggle-linejoin">
|
<key type="as" name="open-preferences">
|
||||||
<default>["<Primary>j"]</default>
|
<default>["<Primary>comma"]</default>
|
||||||
<summary>toggle linejoin</summary>
|
<summary>Open preferences</summary>
|
||||||
<description>toggle linejoin</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="toggle-linecap">
|
<key type="as" name="open-previous-json">
|
||||||
<default>["<Primary>k"]</default>
|
<default>["<Primary><Shift>o"]</default>
|
||||||
<summary>toggle linecap</summary>
|
<summary>Open previous drawing</summary>
|
||||||
<description>toggle linecap</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="toggle-dash">
|
<key type="as" name="paste-image-files">
|
||||||
<default>["<Primary>a"]</default>
|
<default>["<Primary>v"]</default>
|
||||||
<summary>toggle dash</summary>
|
<summary>Add images from the clipboard</summary>
|
||||||
<description>toggle dash</description>
|
</key>
|
||||||
|
<key type="as" name="pick-color">
|
||||||
|
<default><![CDATA[['<Primary>KP_0','<Primary>0']]]></default>
|
||||||
|
<summary>Pick a color</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="redo">
|
||||||
|
<default>["<Primary><Shift>z"]</default>
|
||||||
|
<summary>Redo</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="save-as-json">
|
||||||
|
<default>["<Primary>s"]</default>
|
||||||
|
<summary>Save drawing</summary>
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color1">
|
<key type="as" name="select-color1">
|
||||||
<default><![CDATA[['<Primary>KP_1','<Primary>1']]]></default>
|
<default><![CDATA[['<Primary>KP_1','<Primary>1']]]></default>
|
||||||
<summary>select color1</summary>
|
<summary>Select color 1</summary>
|
||||||
<description>select color1</description>
|
<description></description>
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color2">
|
<key type="as" name="select-color2">
|
||||||
<default><![CDATA[['<Primary>KP_2','<Primary>2']]]></default>
|
<default><![CDATA[['<Primary>KP_2','<Primary>2']]]></default>
|
||||||
<summary>select color2</summary>
|
<summary>Select color 2</summary>
|
||||||
<description>select color2</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color3">
|
<key type="as" name="select-color3">
|
||||||
<default><![CDATA[['<Primary>KP_3','<Primary>3']]]></default>
|
<default><![CDATA[['<Primary>KP_3','<Primary>3']]]></default>
|
||||||
<summary>select color3</summary>
|
<summary>Select color 3</summary>
|
||||||
<description>select color3</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color4">
|
<key type="as" name="select-color4">
|
||||||
<default><![CDATA[['<Primary>KP_4','<Primary>4']]]></default>
|
<default><![CDATA[['<Primary>KP_4','<Primary>4']]]></default>
|
||||||
<summary>select color4</summary>
|
<summary>Select color 4</summary>
|
||||||
<description>select color4</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color5">
|
<key type="as" name="select-color5">
|
||||||
<default><![CDATA[['<Primary>KP_5','<Primary>5']]]></default>
|
<default><![CDATA[['<Primary>KP_5','<Primary>5']]]></default>
|
||||||
<summary>select color5</summary>
|
<summary>Select color 5</summary>
|
||||||
<description>select color5</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color6">
|
<key type="as" name="select-color6">
|
||||||
<default><![CDATA[['<Primary>KP_6','<Primary>6']]]></default>
|
<default><![CDATA[['<Primary>KP_6','<Primary>6']]]></default>
|
||||||
<summary>select color6</summary>
|
<summary>Select color 6</summary>
|
||||||
<description>select color6</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color7">
|
<key type="as" name="select-color7">
|
||||||
<default><![CDATA[['<Primary>KP_7','<Primary>7']]]></default>
|
<default><![CDATA[['<Primary>KP_7','<Primary>7']]]></default>
|
||||||
<summary>select color7</summary>
|
<summary>Select color 7</summary>
|
||||||
<description>select color7</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color8">
|
<key type="as" name="select-color8">
|
||||||
<default><![CDATA[['<Primary>KP_8','<Primary>8']]]></default>
|
<default><![CDATA[['<Primary>KP_8','<Primary>8']]]></default>
|
||||||
<summary>select color8</summary>
|
<summary>Select color 8</summary>
|
||||||
<description>select color8</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="select-color9">
|
<key type="as" name="select-color9">
|
||||||
<default><![CDATA[['<Primary>KP_9','<Primary>9']]]></default>
|
<default><![CDATA[['<Primary>KP_9','<Primary>9']]]></default>
|
||||||
<summary>select color9</summary>
|
<summary>Select color 9</summary>
|
||||||
<description>select color9</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="toggle-font-family">
|
<key type="as" name="select-ellipse-shape">
|
||||||
<default>["<Primary>f"]</default>
|
<default>["<Primary>e"]</default>
|
||||||
<summary>toggle font family</summary>
|
<summary>Select ellipse tool</summary>
|
||||||
<description>toggle font family</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="toggle-font-weight">
|
<key type="as" name="select-image-shape">
|
||||||
<default>["<Primary>w"]</default>
|
|
||||||
<summary>toggle font weight</summary>
|
|
||||||
<description>toggle font weight</description>
|
|
||||||
</key>
|
|
||||||
<key type="as" name="toggle-font-style">
|
|
||||||
<default>["<Primary>i"]</default>
|
<default>["<Primary>i"]</default>
|
||||||
<summary>toggle font style</summary>
|
<summary>Select image tool</summary>
|
||||||
<description>toggle font style</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="open-stylesheet">
|
<key type="as" name="select-line-shape">
|
||||||
<default>["<Primary>o"]</default>
|
<default>["<Primary>l"]</default>
|
||||||
<summary>open stylesheet</summary>
|
<summary>Select line tool</summary>
|
||||||
<description>open stylesheet</description>
|
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="save-as-svg">
|
<key type="as" name="select-mirror-tool">
|
||||||
<default>["<Primary>s"]</default>
|
<default>["<Primary>c"]</default>
|
||||||
<summary>Save drawing as a svg file</summary>
|
<summary>Select mirror tool</summary>
|
||||||
<description>Save drawing as a svg file</description>
|
</key>
|
||||||
|
<key type="as" name="select-move-tool">
|
||||||
|
<default>["<Primary>m"]</default>
|
||||||
|
<summary>Select move tool</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="select-none-shape">
|
||||||
|
<default>["<Primary>p"]</default>
|
||||||
|
<summary>Select free drawing</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="select-polygon-shape">
|
||||||
|
<default>["<Primary>y"]</default>
|
||||||
|
<summary>Select polygon tool</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="select-polyline-shape">
|
||||||
|
<default>["<Primary>u"]</default>
|
||||||
|
<summary>Select polyline tool</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="select-rectangle-shape">
|
||||||
|
<default>["<Primary>r"]</default>
|
||||||
|
<summary>Select rectangle tool</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="select-resize-tool">
|
||||||
|
<default>["<Primary>x"]</default>
|
||||||
|
<summary>Select resize tool</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="select-text-shape">
|
||||||
|
<default>["<Primary>t"]</default>
|
||||||
|
<summary>Select text tool</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="smooth-last-element">
|
||||||
|
<default>["<Primary>equal"]</default>
|
||||||
|
<summary>Smooth last brushstroke</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-color-palette">
|
||||||
|
<default>["<Primary>KP_Divide","<Primary>slash"]</default>
|
||||||
|
<summary>Change color palette</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-color-palette-reverse">
|
||||||
|
<default>["<Primary><Shift>KP_Divide","<Primary><Shift>slash"]</default>
|
||||||
|
<summary>Change color palette (reverse)</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-dash">
|
||||||
|
<default>["<Primary>period"]</default>
|
||||||
|
<summary>Dashed line</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-fill">
|
||||||
|
<default>["<Primary>a"]</default>
|
||||||
|
<summary>Toggle fill/outline</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-fill-rule">
|
||||||
|
<default><![CDATA[['<Primary>KP_Multiply','<Primary>asterisk','<Primary><Shift>asterisk']]]></default>
|
||||||
|
<summary>Toggle fill rule</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-font-family">
|
||||||
|
<default>["<Primary>f"]</default>
|
||||||
|
<summary>Change font family</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-font-family-reverse">
|
||||||
|
<default>["<Primary><Shift>f"]</default>
|
||||||
|
<summary>Change font family (reverse)</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-font-style">
|
||||||
|
<default>["<Primary><Alt>w"]</default>
|
||||||
|
<summary>Change font style</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-font-weight">
|
||||||
|
<default>["<Primary>w"]</default>
|
||||||
|
<summary>Change font weight</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-image-file">
|
||||||
|
<default>["<Primary><Alt>i"]</default>
|
||||||
|
<summary>Change image</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-image-file-reverse">
|
||||||
|
<default>["<Primary><Alt><Shift>i"]</default>
|
||||||
|
<summary>Change image (reverse)</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-linecap">
|
||||||
|
<default>["<Primary>k"]</default>
|
||||||
|
<summary>Change linecap</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-linejoin">
|
||||||
|
<default>["<Primary>j"]</default>
|
||||||
|
<summary>Change linejoin</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="switch-text-alignment">
|
||||||
|
<default>["<Primary><Alt>a"]</default>
|
||||||
|
<summary>Change text alignment</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="toggle-background">
|
||||||
|
<default>["<Primary>b"]</default>
|
||||||
|
<summary>Add a drawing background</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="toggle-grid">
|
||||||
|
<default>["<Primary>g"]</default>
|
||||||
|
<summary>Add a grid overlay</summary>
|
||||||
</key>
|
</key>
|
||||||
<key type="as" name="toggle-help">
|
<key type="as" name="toggle-help">
|
||||||
<default>["<Primary>F1"]</default>
|
<default>["<Primary>F1"]</default>
|
||||||
<summary>toggle help</summary>
|
<summary>Show help</summary>
|
||||||
<description>toggle help</description>
|
</key>
|
||||||
|
<key type="as" name="toggle-panel-and-dock-visibility">
|
||||||
|
<default>["<Primary>h"]</default>
|
||||||
|
<summary>Hide panel and dock</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="toggle-square-area">
|
||||||
|
<default>["<Primary>n"]</default>
|
||||||
|
<!-- Translators: It is an action: "Make the drawing area a square" -->
|
||||||
|
<summary>Square drawing area</summary>
|
||||||
|
</key>
|
||||||
|
<key type="as" name="undo">
|
||||||
|
<default>["<Primary>z"]</default>
|
||||||
|
<summary>Undo</summary>
|
||||||
</key>
|
</key>
|
||||||
</schema>
|
</schema>
|
||||||
</schemalist>
|
</schemalist>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,118 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2019 Abakkk
|
||||||
|
*
|
||||||
|
* 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 3 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, see <http://www.gnu.org/licenses/>.
|
||||||
|
*
|
||||||
|
* SPDX-FileCopyrightText: 2019 Abakkk
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* jslint esversion: 6 */
|
||||||
|
/* exported GLOBAL_KEYBINDINGS, INTERNAL_KEYBINDINGS, OTHERS */
|
||||||
|
|
||||||
|
const Gtk = imports.gi.Gtk;
|
||||||
|
const IS_GTK3 = Gtk.get_major_version() == 3;
|
||||||
|
|
||||||
|
const GS_VERSION = imports.misc.config.PACKAGE_VERSION;
|
||||||
|
const ExtensionUtils = imports.misc.extensionUtils;
|
||||||
|
const Me = ExtensionUtils.getCurrentExtension();
|
||||||
|
const Convenience = ExtensionUtils.getSettings && ExtensionUtils.initTranslations ? ExtensionUtils : Me.imports.convenience;
|
||||||
|
const _ = imports.gettext.domain(Me.metadata['gettext-domain']).gettext;
|
||||||
|
|
||||||
|
const internalShortcutsSchema = Convenience.getSettings(Me.metadata['settings-schema'] + '.internal-shortcuts').settings_schema;
|
||||||
|
|
||||||
|
const getKeyLabel = function(accel) {
|
||||||
|
let success_, keyval, mods;
|
||||||
|
if (IS_GTK3)
|
||||||
|
[keyval, mods] = Gtk.accelerator_parse(accel);
|
||||||
|
else
|
||||||
|
[success_, keyval, mods] = Gtk.accelerator_parse(accel);
|
||||||
|
return Gtk.accelerator_get_label(keyval, mods);
|
||||||
|
};
|
||||||
|
|
||||||
|
// The setting keys of the "org.gnome.shell.extensions.draw-on-your-screen" schema.
|
||||||
|
var GLOBAL_KEYBINDINGS = [
|
||||||
|
['toggle-drawing', 'toggle-modal', 'erase-drawings'],
|
||||||
|
];
|
||||||
|
|
||||||
|
// The setting keys of the "org.gnome.shell.extensions.draw-on-your-screen.internal-shortcuts" schema.
|
||||||
|
var INTERNAL_KEYBINDINGS = [
|
||||||
|
['undo', 'redo', 'delete-last-element', 'smooth-last-element'],
|
||||||
|
['select-none-shape', 'select-line-shape', 'select-ellipse-shape', 'select-rectangle-shape', 'select-polygon-shape', 'select-polyline-shape',
|
||||||
|
'select-text-shape', 'select-image-shape', 'select-move-tool', 'select-resize-tool', 'select-mirror-tool'],
|
||||||
|
['switch-fill', 'switch-fill-rule', 'switch-color-palette', 'switch-color-palette-reverse', 'pick-color'],
|
||||||
|
['increment-line-width', 'increment-line-width-more', 'decrement-line-width', 'decrement-line-width-more',
|
||||||
|
'switch-linejoin', 'switch-linecap', 'switch-dash'],
|
||||||
|
['switch-font-family', 'switch-font-family-reverse', 'switch-font-weight', 'switch-font-style', 'switch-text-alignment'],
|
||||||
|
['switch-image-file', 'switch-image-file-reverse', 'paste-image-files'],
|
||||||
|
['toggle-panel-and-dock-visibility', 'toggle-background', 'toggle-grid', 'toggle-square-area'],
|
||||||
|
['open-next-json', 'open-previous-json', 'save-as-json', 'export-to-svg', 'open-preferences', 'toggle-help'],
|
||||||
|
];
|
||||||
|
|
||||||
|
if (GS_VERSION < '3.30') {
|
||||||
|
// Remove 'pick-color' keybinding.
|
||||||
|
INTERNAL_KEYBINDINGS.forEach(settingKeys => {
|
||||||
|
let index = settingKeys.indexOf('pick-color');
|
||||||
|
if (index != -1)
|
||||||
|
settingKeys.splice(index, 1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (GS_VERSION < '3.36') {
|
||||||
|
// Remove 'open-preferences' keybinding.
|
||||||
|
INTERNAL_KEYBINDINGS.forEach(settingKeys => {
|
||||||
|
let index = settingKeys.indexOf('open-preferences');
|
||||||
|
if (index != -1)
|
||||||
|
settingKeys.splice(index, 1);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const getOthers = function() {
|
||||||
|
return [
|
||||||
|
[
|
||||||
|
[_("Draw"), _("Left click")],
|
||||||
|
[_("Menu"), _("Right click")],
|
||||||
|
[internalShortcutsSchema.get_key('switch-fill').get_summary(), _("Center click")],
|
||||||
|
[_("Increment/decrement line width"), _("Scroll")],
|
||||||
|
// Translators: %s are key labels (Ctrl+F1 and Ctrl+F9)
|
||||||
|
[_("Select color"), _("%s … %s").format(getKeyLabel('<Primary>1'), getKeyLabel('<Primary>9'))],
|
||||||
|
// Translators: %s is a key label
|
||||||
|
[_("Ignore pointer movement"), _("%s held").format(getKeyLabel('space'))],
|
||||||
|
[_("Leave"), getKeyLabel('Escape')],
|
||||||
|
], [
|
||||||
|
[_("Select eraser <span alpha=\"50%\">(while starting drawing)</span>"), getKeyLabel('<Shift>')],
|
||||||
|
[_("Duplicate <span alpha=\"50%\">(while starting handling)</span>"), getKeyLabel('<Shift>')],
|
||||||
|
[_("Rotate rectangle, polygon, polyline"), getKeyLabel('<Primary>')],
|
||||||
|
[_("Extend circle to ellipse"), getKeyLabel('<Primary>')],
|
||||||
|
[_("Curve line"), getKeyLabel('<Primary>')],
|
||||||
|
[_("Smooth free drawing outline"), getKeyLabel('<Primary>')],
|
||||||
|
[_("Do not preserve image ratio"), getKeyLabel('<Primary>')],
|
||||||
|
[_("Rotate <span alpha=\"50%\">(while moving)</span>"), getKeyLabel('<Primary>')],
|
||||||
|
[_("Stretch <span alpha=\"50%\">(while resizing)</span>"), getKeyLabel('<Primary>')],
|
||||||
|
[_("Inverse <span alpha=\"50%\">(while mirroring)</span>"), getKeyLabel('<Primary>')],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
let _OTHERS;
|
||||||
|
// Equivalent to "var OTHERS = [[ ... ]]", but as a getter so the translations are got after the initTranslations call.
|
||||||
|
// 'this' is the module.
|
||||||
|
Object.defineProperty(this, 'OTHERS', {
|
||||||
|
get: function() {
|
||||||
|
if (!_OTHERS)
|
||||||
|
_OTHERS = getOthers();
|
||||||
|
return _OTHERS;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
180
stylesheet.css
|
|
@ -1,73 +1,135 @@
|
||||||
/*
|
/* square area */
|
||||||
* Except for the font,
|
|
||||||
* you don't need to restart the extension.
|
|
||||||
* Just save this file and the changes will be applied for your next brushstroke.
|
|
||||||
*
|
|
||||||
* line-join (no string):
|
|
||||||
* 0 : miter, 1 : round, 2 : bevel
|
|
||||||
* line-cap (no string):
|
|
||||||
* 0 : butt, 1 : round, 2 : square
|
|
||||||
*
|
|
||||||
* dash:
|
|
||||||
* dash-array-on is the length of dashes (no dashes if 0, you can put 0.1 to get dots or square according to line-cap)
|
|
||||||
* dash-array-off is the length of gaps (no dashes if 0)
|
|
||||||
*
|
|
||||||
* font:
|
|
||||||
* only one family : no comma separated list of families like "font1, font2, ..., Sans-Serif"
|
|
||||||
* font family can be any font installed, or a generic family name (Serif, Sans-Serif, Monospace, Cursive, Fantasy)
|
|
||||||
* font weight and font style : no upper case when string
|
|
||||||
* weight <= 500 (or lighter, normal, medium) is rendered as normal
|
|
||||||
* weight > 500 (or bolder, bold) is rendered as bold
|
|
||||||
* oblique and italic style support depends on the font family and seem to be rendered identically
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
.draw-on-your-screen {
|
.draw-on-your-screen .draw-on-your-screen-square-area {
|
||||||
-drawing-line-width: 5px;
|
outline: 2px solid rgba(255, 0, 0, 0.7);
|
||||||
-drawing-line-join: 1;
|
|
||||||
-drawing-line-cap: 1;
|
|
||||||
-drawing-dash-array-on: 5px;
|
|
||||||
-drawing-dash-array-off: 15px;
|
|
||||||
-drawing-dash-offset: 0px;
|
|
||||||
-drawing-color1: HotPink;
|
|
||||||
-drawing-color2: Cyan;
|
|
||||||
-drawing-color3: yellow;
|
|
||||||
-drawing-color4: Orangered;
|
|
||||||
-drawing-color5: Chartreuse;
|
|
||||||
-drawing-color6: DarkViolet;
|
|
||||||
-drawing-color7: #ffffff;
|
|
||||||
-drawing-color8: rgba(130, 130, 130, 0.3);
|
|
||||||
-drawing-color9: rgb(0, 0, 0);
|
|
||||||
-drawing-background-color: #2e3436; /* GS osd_bg_color: #2e3436, GTK Adwaita-dark theme_base_color: #2d2c2e */
|
|
||||||
font-family: Cantarell;
|
|
||||||
font-weight: normal;
|
|
||||||
font-style: normal;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************/
|
.draw-on-your-screen:insensitive .draw-on-your-screen-square-area {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/* "Ctrl + F1" on-screen-display */
|
||||||
* The following styles don't affect the drawing,
|
|
||||||
* but the "Ctrl + F1" on-screen-display
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
.draw-on-your-screen-helper {
|
.draw-on-your-screen-helper {
|
||||||
margin: 0;
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-helper > StBoxLayout {
|
||||||
|
margin: 8px;
|
||||||
|
margin-right: 16px;
|
||||||
spacing: 0.5em;
|
spacing: 0.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.draw-on-your-screen-helper StBoxLayout {
|
.draw-on-your-screen-helper > StBoxLayout StBoxLayout {
|
||||||
spacing: 5em;
|
spacing: 7em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.draw-on-your-screen-helper StBoxLayout StLabel {
|
.draw-on-your-screen-helper > StBoxLayout StBoxLayout StLabel {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
}
|
}
|
||||||
|
|
||||||
.draw-on-your-screen-separator {
|
.draw-on-your-screen-helper-separator {
|
||||||
min-height: 0.6em;
|
min-height: 0.6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* context menu */
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu {
|
||||||
|
font-size: 0.97em; /* default: 1em */
|
||||||
|
min-width: 21em; /* like the aggregate menu */
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu .popup-menu-item {
|
||||||
|
padding-top: .3em; /* default: .4em */
|
||||||
|
padding-bottom: .3em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu .popup-menu-item > .popup-menu-icon {
|
||||||
|
icon-size: 1em; /* default: 1.09 */
|
||||||
|
padding-top: 0.03em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* max size for uncontrolled contents (font, image and drawing names) */
|
||||||
|
.draw-on-your-screen-menu-ellipsized {
|
||||||
|
max-width: 21em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu .toggle-switch {
|
||||||
|
height: 1.35em; /* default: 22px */
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-separator-item {
|
||||||
|
margin-top: 0;
|
||||||
|
padding-top: 0.14em;
|
||||||
|
padding-bottom: 0.14em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-separator-item StLabel {
|
||||||
|
font-size: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-separator-item .popup-separator-menu-item {
|
||||||
|
margin-top: 0.2em; /* default 6px */
|
||||||
|
margin-bottom: 0.2em; /* default 6px */
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-separator-item .popup-separator-menu-item-separator {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-thin-separator-item .popup-separator-menu-item-separator {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-destructive-button:hover {
|
||||||
|
color: #e01b24; /* upstream destructive color, light: #e01b24, dark: #b2161d */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* override .button upstream style class */
|
||||||
|
.draw-on-your-screen-menu-action-button {
|
||||||
|
min-height: 0;
|
||||||
|
min-width: 0;
|
||||||
|
border-radius: 32px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-action-button > StIcon {
|
||||||
|
icon-size: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-slider-label {
|
||||||
|
min-width: 3em;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-entry-item {
|
||||||
|
padding-right: 1.15em; /* default 1.75em */
|
||||||
|
spacing: 0; /* default 12px */
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-entry {
|
||||||
|
border: none;
|
||||||
|
border-radius: 3px;
|
||||||
|
padding: 0.35em 0.57em;
|
||||||
|
width: 10em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-entry-error {
|
||||||
|
color: #f57900; /* upstream warning_color */
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-entry:focus {
|
||||||
|
padding: 0.35em 0.57em;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* override .button upstream style class */
|
||||||
|
.draw-on-your-screen-menu-inline-button {
|
||||||
|
min-height: 1px;
|
||||||
|
padding: 2px 4px; /* default 3px 24px */
|
||||||
|
}
|
||||||
|
|
||||||
|
.draw-on-your-screen-menu-inline-button .popup-menu-icon {
|
||||||
|
icon-size: 0.85em; /* default 1.09 */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||