mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-25 16:11:39 +00:00
Compare commits
1074 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
edcff588e2 | ||
|
|
26aad6e948 | ||
|
|
c303a490ef | ||
|
|
6ed4499a97 | ||
|
|
aa7499aa12 | ||
|
|
63558d647a | ||
|
|
eb3f7d65de | ||
|
|
ac8a336c4a | ||
|
|
0206f2fd15 | ||
|
|
b41d3f7efc | ||
|
|
c43d37582e | ||
|
|
30a278719b | ||
|
|
87ef46ca15 | ||
|
|
9f3ec065ed | ||
|
|
e19056048c | ||
|
|
76e5817ff3 | ||
|
|
20dc2d63fd | ||
|
|
28d2aa8197 | ||
|
|
5be9d537a5 | ||
|
|
b97e89d4d8 | ||
|
|
0f4992de47 | ||
|
|
55ad9ef33a | ||
|
|
e69a1764a0 | ||
|
|
215307df93 | ||
|
|
3aa99c396b | ||
|
|
9f2c3e7732 | ||
|
|
d660cef245 | ||
|
|
bdd404ce0e | ||
|
|
df9f72d9bf | ||
|
|
53bbc5901c | ||
|
|
0959f4581e | ||
|
|
b1ef3dc8fe | ||
|
|
334f4dd2ae | ||
|
|
fbdd1d866e | ||
|
|
64e86c9ff9 | ||
|
|
80f659858c | ||
|
|
ef8f8f0e44 | ||
|
|
b7a7282c2a | ||
|
|
668821301c | ||
|
|
13fb06a693 | ||
|
|
61b219ff43 | ||
|
|
c4aeda0bd0 | ||
|
|
76f3332d36 | ||
|
|
b47b1e11af | ||
|
|
168d94910b | ||
|
|
ca3172044f | ||
|
|
f66849b09d | ||
|
|
8c1078aa71 | ||
|
|
b780816e3c | ||
|
|
fb8a384a6a | ||
|
|
2be4ae8f65 | ||
|
|
f8686ffb55 | ||
|
|
3093a42553 | ||
|
|
83d934fd4f | ||
|
|
f3c09c7a8d | ||
|
|
a65077f871 | ||
|
|
d4919054f9 | ||
|
|
773f6651e6 | ||
|
|
9a25670552 | ||
|
|
8c9ef3ea29 | ||
|
|
7256adb4d4 | ||
|
|
ad45a6e16e | ||
|
|
c865f84c16 | ||
|
|
7d749779f2 | ||
|
|
8b878b7b13 | ||
|
|
0056f696df | ||
|
|
abd2f3a9d6 | ||
|
|
5c57a2a8fc | ||
|
|
dc76f9744e | ||
|
|
130581db53 | ||
|
|
9ed4b7abf0 | ||
|
|
a0a90e8ef8 | ||
|
|
197acbf5b3 | ||
|
|
09d5243648 | ||
|
|
10169bee9c | ||
|
|
bb8a41f8c5 | ||
|
|
bb1f0f5be6 | ||
|
|
4b6f8b45e2 | ||
|
|
2ed1b82ecf | ||
|
|
de9122c3cb | ||
|
|
632650b483 | ||
|
|
c05f01853d | ||
|
|
15539eb3c5 | ||
|
|
b9874cc7ed | ||
|
|
13a2868dd2 | ||
|
|
abb1345c49 | ||
|
|
9c53b2218c | ||
|
|
4b3c1e2828 | ||
|
|
b64f9f5ec0 | ||
|
|
40d9a486e2 | ||
|
|
6930e092e0 | ||
|
|
6b41223a22 | ||
|
|
d15321a8e9 | ||
|
|
d6533cbfa2 | ||
|
|
43974f9ebd | ||
|
|
0068e7b85a | ||
|
|
23b29eb5c3 | ||
|
|
dba231cf21 | ||
|
|
f25b1f9f46 | ||
|
|
60dd73f634 | ||
|
|
3b6fe992c0 | ||
|
|
6d263215ad | ||
|
|
bba20f4218 | ||
|
|
bb9908abb4 | ||
|
|
e7076bc3bd | ||
|
|
fc16ea8c49 | ||
|
|
0c07046ec4 | ||
|
|
943a6570d8 | ||
|
|
854a253d9f | ||
|
|
4e477104a6 | ||
|
|
79800bc6ed | ||
|
|
6e7b95b2cf | ||
|
|
bf09c4ce8a | ||
|
|
b4a73771c2 | ||
|
|
2166a0996c | ||
|
|
24643a9b5d | ||
|
|
045051ce06 | ||
|
|
7c3728ca47 | ||
|
|
91be1c7336 | ||
|
|
162378bb0a | ||
|
|
4e3cad5702 | ||
|
|
321f8ab406 | ||
|
|
5b3d5f5d1c | ||
|
|
372a682610 | ||
|
|
44266273bf | ||
|
|
ac32305532 | ||
|
|
87c2fa2573 | ||
|
|
db63b63cfd | ||
|
|
6725b2bf0f | ||
|
|
990e73c383 | ||
|
|
9e9e73aa6b | ||
|
|
8434befe1f | ||
|
|
1114ac5613 | ||
|
|
f5f29d775c | ||
|
|
ebd7f1b4ce | ||
|
|
279b7ad10c | ||
|
|
878205fc49 | ||
|
|
b16df32150 | ||
|
|
04b06f7704 | ||
|
|
c6ea1c62d4 | ||
|
|
6ce0f66601 | ||
|
|
ac3a9e3ba8 | ||
|
|
903d2f9183 | ||
|
|
ca709a60cf | ||
|
|
a9b4ce5529 | ||
|
|
9b82ceca67 | ||
|
|
4c7c279dd2 | ||
|
|
79db31685e | ||
|
|
ba13b700b0 | ||
|
|
640561a534 | ||
|
|
e4f81cbf04 | ||
|
|
4be4825112 | ||
|
|
7d107d8efa | ||
|
|
10d1363334 | ||
|
|
b76820ebde | ||
|
|
72b3cfb364 | ||
|
|
8b83ed0e5c | ||
|
|
781f13ae1a | ||
|
|
8193bbae6e | ||
|
|
4cafeaff91 | ||
|
|
95c6a7d41f | ||
|
|
a29e007475 | ||
|
|
d924d7797a | ||
|
|
33c217ecc8 | ||
|
|
c9035046ae | ||
|
|
ad31016825 | ||
|
|
c809066a93 | ||
|
|
60ca27b5e1 | ||
|
|
1104e24408 | ||
|
|
f66db94ffd | ||
|
|
d98b5b22da | ||
|
|
937748e838 | ||
|
|
37ebf36cee | ||
|
|
1c84bdd198 | ||
|
|
4a2fa7cd2c | ||
|
|
7d4110f6d3 | ||
|
|
8497343d7f | ||
|
|
235a2c2904 | ||
|
|
25169cfc20 | ||
|
|
152f5f37ce | ||
|
|
3e42ad8469 | ||
|
|
7ba2e38cd6 | ||
|
|
c7c7a73384 | ||
|
|
46f8984bdc | ||
|
|
c7d306b7d5 | ||
|
|
47e636e949 | ||
|
|
0562729d8b | ||
|
|
4a36227a18 | ||
|
|
28b8b2e415 | ||
|
|
fd82464564 | ||
|
|
418acf6e5e | ||
|
|
d14d076989 | ||
|
|
cb8bb5a70e | ||
|
|
563c9aeff3 | ||
|
|
a0cc1f2e03 | ||
|
|
01403a3f92 | ||
|
|
7116674663 | ||
|
|
b6bc5de79c | ||
|
|
5a275db67d | ||
|
|
31395d8794 | ||
|
|
3734bd6f6c | ||
|
|
da06ef8cad | ||
|
|
0b00171655 | ||
|
|
c1cfa86ad1 | ||
|
|
c34c9562d3 | ||
|
|
0e542577b0 | ||
|
|
42be49da83 | ||
|
|
398ac9b7c6 | ||
|
|
508e9a5d94 | ||
|
|
cc5ea1dbc1 | ||
|
|
3b8d355b9e | ||
|
|
10dbfa9b38 | ||
|
|
e8c42740cf | ||
|
|
4b6c4f048d | ||
|
|
7594cccf8c | ||
|
|
1d9573cf6f | ||
|
|
76f45fb5a6 | ||
|
|
12cf9b800b | ||
|
|
ba7e6494c6 | ||
|
|
72d8160b28 | ||
|
|
6d53511cee | ||
|
|
64d3c211e6 | ||
|
|
fad112f554 | ||
|
|
a563327723 | ||
|
|
096e2bb78a | ||
|
|
5a8cb6f5e3 | ||
|
|
664d630b96 | ||
|
|
a4256d3d2b | ||
|
|
8e65f15e1a | ||
|
|
9ea9f60e92 | ||
|
|
8efefaf0bf | ||
|
|
33d9569427 | ||
|
|
2fdfacb34e | ||
|
|
97fcf1ffa8 | ||
|
|
350b2c64e0 | ||
|
|
dcc57a7afb | ||
|
|
8b510994ad | ||
|
|
4a4d1bbfcd | ||
|
|
78c3c8ec2d | ||
|
|
e99e2b18e0 | ||
|
|
ae1283f2e1 | ||
|
|
cc76f3ca87 | ||
|
|
be8efea081 | ||
|
|
7e8f9036d8 | ||
|
|
8a8ac027f5 | ||
|
|
1d9d09fdf7 | ||
|
|
5dc956870d | ||
|
|
d8f48cbd42 | ||
|
|
39d24817f6 | ||
|
|
2364e44707 | ||
|
|
3e2249bf89 | ||
|
|
38acb6f91c | ||
|
|
9bcb28d5e2 | ||
|
|
d0a3f081da | ||
|
|
d11ec557e7 | ||
|
|
b9124a497c | ||
|
|
502715cfd6 | ||
|
|
e1f532e2fd | ||
|
|
a71033d9d6 | ||
|
|
a15a62f55c | ||
|
|
2fe5cdcf02 | ||
|
|
21c64545e5 | ||
|
|
c93a88f8b0 | ||
|
|
86a81eab4e | ||
|
|
1c779cb3ec | ||
|
|
04949c853d | ||
|
|
ff782a09f5 | ||
|
|
e5ce6680ca | ||
|
|
8e15d89a2e | ||
|
|
d874f26f06 | ||
|
|
80a99ff29e | ||
|
|
b11b97dd7c | ||
|
|
386a5f2c64 | ||
|
|
c13a2f207c | ||
|
|
d36710ef38 | ||
|
|
bbc9b003c6 | ||
|
|
3edba28f0b | ||
|
|
9304f42f69 | ||
|
|
375963ebfd | ||
|
|
7891fb5396 | ||
|
|
bdd5f0a515 | ||
|
|
db0901b1de | ||
|
|
9225697053 | ||
|
|
097b949763 | ||
|
|
60701c2a5c | ||
|
|
3ef1281450 | ||
|
|
af4e74a130 | ||
|
|
422fb2670d | ||
|
|
94a469205a | ||
|
|
95623f9b47 | ||
|
|
a65c246a2e | ||
|
|
045d496a98 | ||
|
|
5ed98b3d92 | ||
|
|
5799e3548b | ||
|
|
b01ed1e9f3 | ||
|
|
49839b8b8e | ||
|
|
500468ed1c | ||
|
|
de6f50ab12 | ||
|
|
2c6339f7a2 | ||
|
|
96c3d63557 | ||
|
|
e86b23259c | ||
|
|
89955aa96a | ||
|
|
39a601e393 | ||
|
|
3b9e11d14f | ||
|
|
81a7c4d6a6 | ||
|
|
35a162faf4 | ||
|
|
70e505ad92 | ||
|
|
aa3cf9700d | ||
|
|
e4b949abf6 | ||
|
|
2e23303d7e | ||
|
|
2fcaacd285 | ||
|
|
6627f0dbea | ||
|
|
a64b42de65 | ||
|
|
6dddcb1a47 | ||
|
|
4a8ce9b6c4 | ||
|
|
d4e6632e7e | ||
|
|
0ced3e39c8 | ||
|
|
26d923e175 | ||
|
|
592eba9eaa | ||
|
|
11450ae56a | ||
|
|
008bd1414e | ||
|
|
62f6cc3705 | ||
|
|
e16041c703 | ||
|
|
1103b58ec5 | ||
|
|
dc8b1b3b02 | ||
|
|
36b214443a | ||
|
|
d11e20f6ba | ||
|
|
477f73ffa4 | ||
|
|
0b5cd61540 | ||
|
|
17b5703885 | ||
|
|
7cac0b5d6e | ||
|
|
a4003b6072 | ||
|
|
fb26d7d077 | ||
|
|
f2cbb513d3 | ||
|
|
8c36218150 | ||
|
|
7637e493a6 | ||
|
|
62be8da6f9 | ||
|
|
b1c2941616 | ||
|
|
8efd3033a3 | ||
|
|
d417dbd2e3 | ||
|
|
3a717a86d8 | ||
|
|
e1f7260774 | ||
|
|
bfc1ee90ec | ||
|
|
93a5fd01b5 | ||
|
|
b028670250 | ||
|
|
dff141e800 | ||
|
|
f49c7dee96 | ||
|
|
5da793b029 | ||
|
|
a56258f8b3 | ||
|
|
ab6e0945a7 | ||
|
|
8ac035c8a9 | ||
|
|
1c15b0114b | ||
|
|
e78b14f9a2 | ||
|
|
573d088088 | ||
|
|
75b08125c0 | ||
|
|
20320f539f | ||
|
|
24771af955 | ||
|
|
2bfe9960f1 | ||
|
|
215bcb0d76 | ||
|
|
2dbf8b80ae | ||
|
|
470cd92030 | ||
|
|
111edc3ce5 | ||
|
|
df30a31782 | ||
|
|
91f3a59523 | ||
|
|
3441e51c0e | ||
|
|
a99c40b5d8 | ||
|
|
5b4de58c38 | ||
|
|
cd83b16dbd | ||
|
|
b67db988ab | ||
|
|
7ebea44cb0 | ||
|
|
4de40af1b0 | ||
|
|
54988650d7 | ||
|
|
a47c208f45 | ||
|
|
c321427a8f | ||
|
|
26c77a18fd | ||
|
|
9f19451ac7 | ||
|
|
bcd9d7e7d0 | ||
|
|
b42b0be512 | ||
|
|
d90764a9ea | ||
|
|
c5c4e02bf4 | ||
|
|
fae3a6ac3a | ||
|
|
09b91aab66 | ||
|
|
b5a219cc00 | ||
|
|
9cb62e0544 | ||
|
|
653668dd96 | ||
|
|
5a5a74d0e1 | ||
|
|
5247ac8abd | ||
|
|
f992599beb | ||
|
|
51f8c51ef3 | ||
|
|
fcdc692b61 | ||
|
|
deb5260c6a | ||
|
|
81df280ea6 | ||
|
|
4f097a3a89 | ||
|
|
8cd1e13814 | ||
|
|
7e81e6c93f | ||
|
|
b19d6c9a27 | ||
|
|
977fb606eb | ||
|
|
9e7d27dcda | ||
|
|
caf04f0d3f | ||
|
|
a2553da578 | ||
|
|
3cd44705f8 | ||
|
|
0cf6987083 | ||
|
|
a67f7e2c9e | ||
|
|
5a3b6883fa | ||
|
|
b0f9a94375 | ||
|
|
ad5c4a954c | ||
|
|
292d993dce | ||
|
|
1fe42f673f | ||
|
|
244af5b652 | ||
|
|
abe9041a67 | ||
|
|
a2d73b216c | ||
|
|
f08b593acb | ||
|
|
cb35dc7897 | ||
|
|
903ecd9eae | ||
|
|
79e9251511 | ||
|
|
81daef6145 | ||
|
|
6a7af81685 | ||
|
|
b3db7c6842 | ||
|
|
85e5b4cfa7 | ||
|
|
79e6020982 | ||
|
|
b7e7e67c99 | ||
|
|
1017e3c730 | ||
|
|
b74e33f4b0 | ||
|
|
2d0facdb14 | ||
|
|
c34004ed94 | ||
|
|
4db5fae38b | ||
|
|
5d5670d4be | ||
|
|
e21a7e18b4 | ||
|
|
a29ed235f6 | ||
|
|
fd706e752f | ||
|
|
729db49183 | ||
|
|
a68e4310ee | ||
|
|
500314859d | ||
|
|
b6d457f908 | ||
|
|
6850c7e2f8 | ||
|
|
9e5630fe99 | ||
|
|
f1a21e62cd | ||
|
|
7cc2defa35 | ||
|
|
24a11ee4bd | ||
|
|
e2b23ca961 | ||
|
|
8fabb14b8b | ||
|
|
07de7d6f0e | ||
|
|
e0b844f617 | ||
|
|
a7bc76bf7c | ||
|
|
89fb531f3d | ||
|
|
f22baa8d5a | ||
|
|
7c2e601a30 | ||
|
|
16e4a5fddd | ||
|
|
4200f2a090 | ||
|
|
45c8291645 | ||
|
|
89f8214bce | ||
|
|
16e1ee93d0 | ||
|
|
222ae73590 | ||
|
|
21c0292154 | ||
|
|
a7eb90894a | ||
|
|
64baf2a10c | ||
|
|
392a802ef1 | ||
|
|
8efeab7b40 | ||
|
|
8a86ecee38 | ||
|
|
3e79b57409 | ||
|
|
362e020585 | ||
|
|
df5c8ddf22 | ||
|
|
70cc48d51f | ||
|
|
dccffd9516 | ||
|
|
04056c1597 | ||
|
|
69b2e37368 | ||
|
|
05478591a4 | ||
|
|
ead3b1e651 | ||
|
|
27f4c290c4 | ||
|
|
4f248ee981 | ||
|
|
d7397c0125 | ||
|
|
e4430168f7 | ||
|
|
78c2ae150d | ||
|
|
806e3917e3 | ||
|
|
6c62c2d563 | ||
|
|
7a768bd0e6 | ||
|
|
a6c01f6868 | ||
|
|
721591d3e3 | ||
|
|
1171705921 | ||
|
|
65d2581f74 | ||
|
|
2128d1787a | ||
|
|
cbf2ab82ce | ||
|
|
adef5a9dfa | ||
|
|
0c9e5c90a3 | ||
|
|
787f546c17 | ||
|
|
2d4ecf1122 | ||
|
|
1836003506 | ||
|
|
44d34f56f7 | ||
|
|
24c3d7ed00 | ||
|
|
8f7657573d | ||
|
|
c03c7f2be1 | ||
|
|
91a157cb2b | ||
|
|
7ced1e7b9d | ||
|
|
f4b8efff50 | ||
|
|
4c0545189e | ||
|
|
21af7b2fcd | ||
|
|
df9af9a796 | ||
|
|
933474400c | ||
|
|
b2c8e779bd | ||
|
|
e570a308bb | ||
|
|
69c01a658b | ||
|
|
0741cbe17b | ||
|
|
ad4ccfe347 | ||
|
|
57375f83f6 | ||
|
|
2d75ffefa7 | ||
|
|
87aa181e4b | ||
|
|
1f359e0391 | ||
|
|
c8af8ccc61 | ||
|
|
2daaaee893 | ||
|
|
03712860b1 | ||
|
|
9e1f79c152 | ||
|
|
edc385cfbc | ||
|
|
0f62917b55 | ||
|
|
515c195780 | ||
|
|
c63df97dd6 | ||
|
|
1f312d8532 | ||
|
|
fa547bb95e | ||
|
|
b500b34ef1 | ||
|
|
23cb71b522 | ||
|
|
720d2fce83 | ||
|
|
97f447fc27 | ||
|
|
6ee56dc55c | ||
|
|
771f22f208 | ||
|
|
80ff5f64f7 | ||
|
|
d0bfa2a6ca | ||
|
|
04a547656e | ||
|
|
657f6743c2 | ||
|
|
42b57431e0 | ||
|
|
3fc83d6245 | ||
|
|
ae16845477 | ||
|
|
49a7043b4d | ||
|
|
878c744c21 | ||
|
|
b4b9393e14 | ||
|
|
bf17eb715a | ||
|
|
cd9f54163b | ||
|
|
ef0a66f794 | ||
|
|
5fb7742cf4 | ||
|
|
22de2d803a | ||
|
|
188aa4bf2e | ||
|
|
05552c160c | ||
|
|
dd70bd6d41 | ||
|
|
70f88ba39c | ||
|
|
496f29b5c3 | ||
|
|
b0818f2bdf | ||
|
|
e0efd660f6 | ||
|
|
4592000464 | ||
|
|
93781a0f35 | ||
|
|
7dfb42fb41 | ||
|
|
a1fc64cd36 | ||
|
|
b12b70b0a1 | ||
|
|
9457a43993 | ||
|
|
ab201bfae0 | ||
|
|
66204ff0b5 | ||
|
|
95f77aef3f | ||
|
|
1e96b6f9c4 | ||
|
|
f813673d6c | ||
|
|
1da325a56b | ||
|
|
d885bf0b18 | ||
|
|
5f7e7fbb13 | ||
|
|
757f8569e6 | ||
|
|
bf86f56371 | ||
|
|
7d0948cd23 | ||
|
|
c4824b0f16 | ||
|
|
ea32af04fb | ||
|
|
e519e41e42 | ||
|
|
c937f2b20f | ||
|
|
fc477ab3b5 | ||
|
|
c53ddcdee1 | ||
|
|
9e668b11b8 | ||
|
|
f53a4c261c | ||
|
|
9a2554d24e | ||
|
|
b9ac135b89 | ||
|
|
235d3ae521 | ||
|
|
a487e83f3c | ||
|
|
4aaff8ffb1 | ||
|
|
302050b2d6 | ||
|
|
1b571f6fd2 | ||
|
|
baa2177439 | ||
|
|
29796e87b7 | ||
|
|
017e483b5a | ||
|
|
7a167208d0 | ||
|
|
475f2c7238 | ||
|
|
9392f818cc | ||
|
|
58347bc36f | ||
|
|
55db21f3e0 | ||
|
|
950cd0c341 | ||
|
|
937ea73c87 | ||
|
|
7bce70c128 | ||
|
|
f9ced08e6d | ||
|
|
4c8ce4b52d | ||
|
|
0d78201548 | ||
|
|
45d4915d88 | ||
|
|
a699a2ef45 | ||
|
|
f6dd1a6a42 | ||
|
|
e6819781f6 | ||
|
|
12467c9493 | ||
|
|
0c7d73854d | ||
|
|
a7eeb7db89 | ||
|
|
989026051c | ||
|
|
56fd94e205 | ||
|
|
c8e00cf0f7 | ||
|
|
0cca745d0d | ||
|
|
80043ccbea | ||
|
|
d62bfac95e | ||
|
|
f636333938 | ||
|
|
01f1e5e46e | ||
|
|
7ce72b1998 | ||
|
|
c4f95a4901 | ||
|
|
5b0d9f311c | ||
|
|
11d8f824e9 | ||
|
|
ceaf2ee4ba | ||
|
|
3b80de869a | ||
|
|
08813ce39c | ||
|
|
478f462ecc | ||
|
|
be53b6de76 | ||
|
|
ca602480d9 | ||
|
|
185cdbb6fa | ||
|
|
2d4903da26 | ||
|
|
98954bd582 | ||
|
|
f862f32fb4 | ||
|
|
804a5a1bbf | ||
|
|
f004535820 | ||
|
|
2abd932709 | ||
|
|
2a78b8ce41 | ||
|
|
2301082307 | ||
|
|
168546608d | ||
|
|
27c1a03496 | ||
|
|
d382cec0fe | ||
|
|
c5b7f6b3d5 | ||
|
|
725f9d51db | ||
|
|
b4815d91c7 | ||
|
|
28e5924633 | ||
|
|
66303a2076 | ||
|
|
d3918724c0 | ||
|
|
fa294ea142 | ||
|
|
565c58b3a9 | ||
|
|
d8970ca6b4 | ||
|
|
1b7068bfe9 | ||
|
|
756190cb8e | ||
|
|
3342b32882 | ||
|
|
561b469e41 | ||
|
|
69fbda5d2c | ||
|
|
63180eaa5b | ||
|
|
25faa458b9 | ||
|
|
760e4085fa | ||
|
|
fbe66d27c9 | ||
|
|
08fd17f208 | ||
|
|
f8af6dbd18 | ||
|
|
54d6fb080c | ||
|
|
8409a01bcc | ||
|
|
1e136d2703 | ||
|
|
25afe54be3 | ||
|
|
d9ae967439 | ||
|
|
9226a4fb7c | ||
|
|
fc5a0d914b | ||
|
|
fca66d5108 | ||
|
|
0571151c5f | ||
|
|
7e95404903 | ||
|
|
eb83b830df | ||
|
|
0b1bf79796 | ||
|
|
6ab074decb | ||
|
|
b7462f1d17 | ||
|
|
a2a8397e78 | ||
|
|
5c0d9411e5 | ||
|
|
cd2afeb32b | ||
|
|
b2fd022d07 | ||
|
|
878046b579 | ||
|
|
428a400848 | ||
|
|
8aa5826080 | ||
|
|
6b5d1e9894 | ||
|
|
07a6a37502 | ||
|
|
dd0af2fe15 | ||
|
|
df6d7141f1 | ||
|
|
81d4cdde33 | ||
|
|
88a613268d | ||
|
|
b7aa4a1ad8 | ||
|
|
6c75d3afdf | ||
|
|
771f26ba0f | ||
|
|
30676fd20b | ||
|
|
607433d918 | ||
|
|
29db39f144 | ||
|
|
49e49d5e1a | ||
|
|
b9b84c9b7d | ||
|
|
d80a56db78 | ||
|
|
036026d64a | ||
|
|
13ef2fae90 | ||
|
|
54731e4ba0 | ||
|
|
aa341bc5ed | ||
|
|
4426f924e2 | ||
|
|
a6deb04049 | ||
|
|
806d6be36c | ||
|
|
152a8772da | ||
|
|
5885ead5ab | ||
|
|
6fc5ce4bad | ||
|
|
a4ae503bd4 | ||
|
|
020746be10 | ||
|
|
436a8e686d | ||
|
|
b6d66f6d0b | ||
|
|
5284decd67 | ||
|
|
73d22de752 | ||
|
|
26e496a051 | ||
|
|
75f0ed14aa | ||
|
|
27cecb0dbc | ||
|
|
094d6702ba | ||
|
|
f8750dd392 | ||
|
|
76b873a504 | ||
|
|
dd031ffa1d | ||
|
|
a0991745e2 | ||
|
|
3553d1a458 | ||
|
|
1b855ad64b | ||
|
|
9a7a20472d | ||
|
|
9fac97c147 | ||
|
|
11aa2c147c | ||
|
|
2c260742f6 | ||
|
|
b8ac192d2a | ||
|
|
ae21ff988a | ||
|
|
8102c89802 | ||
|
|
48e2acf0a2 | ||
|
|
01731a8277 | ||
|
|
abe25d6967 | ||
|
|
669e4b390b | ||
|
|
1fafe04f19 | ||
|
|
43c4dcb267 | ||
|
|
b44e52689f | ||
|
|
f0441db88a | ||
|
|
0da1947902 | ||
|
|
3b4ea50119 | ||
|
|
e21627bbde | ||
|
|
70689ce057 | ||
|
|
60462698ac | ||
|
|
f2164924f7 | ||
|
|
f730f4f55a | ||
|
|
841b249b67 | ||
|
|
0f12103616 | ||
|
|
edac54c5e6 | ||
|
|
818bc908a0 | ||
|
|
26e81a8cbf | ||
|
|
664803c2ca | ||
|
|
5a26f1c2ae | ||
|
|
880f0787ce | ||
|
|
549e3e1f3b | ||
|
|
cf606a494c | ||
|
|
90f9493ccc | ||
|
|
3ec2a3ef81 | ||
|
|
b65c9b8c9a | ||
|
|
2dc588e0fd | ||
|
|
9c30486f14 | ||
|
|
518228a368 | ||
|
|
ff228035a3 | ||
|
|
eeb7f84601 | ||
|
|
ee24234156 | ||
|
|
d462fd44c4 | ||
|
|
22fedc4ee4 | ||
|
|
548bd84a4b | ||
|
|
d66afca753 | ||
|
|
7222ec3f02 | ||
|
|
f2d77bb60b | ||
|
|
4b9cba4d7f | ||
|
|
47c9d39150 | ||
|
|
14aba2b507 | ||
|
|
bb2faa27f9 | ||
|
|
e10e9a6976 | ||
|
|
73ba4954c1 | ||
|
|
2c8c077b82 | ||
|
|
f7a3e78870 | ||
|
|
38638a90f1 | ||
|
|
11cff312f5 | ||
|
|
17656d8e7c | ||
|
|
42cb788d35 | ||
|
|
327fe0b660 | ||
|
|
2cad94941b | ||
|
|
d93b5d65b9 | ||
|
|
9bf9dd330a | ||
|
|
4449831ace | ||
|
|
303cf52d6a | ||
|
|
21b1a63687 | ||
|
|
b1dce31542 | ||
|
|
a64ddcb804 | ||
|
|
905c194cdd | ||
|
|
e61c698b03 | ||
|
|
77f70d120a | ||
|
|
3df35be0cf | ||
|
|
04938bb573 | ||
|
|
df57d993f6 | ||
|
|
b74984f3b6 | ||
|
|
0bbdeb0846 | ||
|
|
5441da4630 | ||
|
|
366a55b27d | ||
|
|
34a1b5d9b5 | ||
|
|
2ba3584b7e | ||
|
|
99e3c34060 | ||
|
|
577cee1a38 | ||
|
|
734b790581 | ||
|
|
526bcf2566 | ||
|
|
56207f4dbb | ||
|
|
cd9fd3a10b | ||
|
|
4399fe9d17 | ||
|
|
2a6f524a5b | ||
|
|
caee5e37f0 | ||
|
|
bbd9d68dfd | ||
|
|
16b1b00906 | ||
|
|
7183408535 | ||
|
|
591b4c7c6a | ||
|
|
8b1170a82b | ||
|
|
1f26fbeacc | ||
|
|
cc7ccff48e | ||
|
|
a0809333c1 | ||
|
|
8975f78a5f | ||
|
|
56bc1c1373 | ||
|
|
417233a47f | ||
|
|
59eaf5305a | ||
|
|
275c6be108 | ||
|
|
a0e2b11663 | ||
|
|
de23ce90d8 | ||
|
|
9d5f3029d0 | ||
|
|
33ee220933 | ||
|
|
23d36b58c8 | ||
|
|
39b895f01b | ||
|
|
5f4252cddc | ||
|
|
fc54a1ea39 | ||
|
|
285f338dce | ||
|
|
379e420577 | ||
|
|
0b20b35ffb | ||
|
|
d887cd118c | ||
|
|
54ffcfab79 | ||
|
|
f28ffc680a | ||
|
|
f33f30eabf | ||
|
|
279d44b7f3 | ||
|
|
0fea59007c | ||
|
|
54720b15ca | ||
|
|
39fc7a91d7 | ||
|
|
7f9c322d48 | ||
|
|
b2ff02c773 | ||
|
|
2c242aedfd | ||
|
|
70e4e6f5af | ||
|
|
ebeb068042 | ||
|
|
731e68f164 | ||
|
|
fa0c3aeb78 | ||
|
|
5a36f15667 | ||
|
|
b96fae74b6 | ||
|
|
404743a27f | ||
|
|
58c8fd0f09 | ||
|
|
fb3d3a135d | ||
|
|
96bddd1995 | ||
|
|
6e60ea6984 | ||
|
|
e410f88926 | ||
|
|
1b52feb8b8 | ||
|
|
ec8e915830 | ||
|
|
0bdbbbdf16 | ||
|
|
92e0647f19 | ||
|
|
69498147a2 | ||
|
|
4249c528e9 | ||
|
|
084068852e | ||
|
|
c524a85897 | ||
|
|
d39d46be5a | ||
|
|
b8980b4667 | ||
|
|
e0adec7b2b | ||
|
|
eb8b9d663f | ||
|
|
fa4b0cf9ec | ||
|
|
f72db8dd1d | ||
|
|
c5bf0f228a | ||
|
|
e150b26cab | ||
|
|
da41d07dae | ||
|
|
c885cb35d8 | ||
|
|
7c38217308 | ||
|
|
a88519b814 | ||
|
|
0aa91b170c | ||
|
|
e9bb1c01f7 | ||
|
|
883875e88e | ||
|
|
4cab6b0ad2 | ||
|
|
91a2664830 | ||
|
|
6abbeaf987 | ||
|
|
21efef42f7 | ||
|
|
9d0e8d94ca | ||
|
|
0f57ca698c | ||
|
|
69c572e875 | ||
|
|
4083b60ff3 | ||
|
|
41fbeb7ec9 | ||
|
|
1162357b9b | ||
|
|
a2a526866f | ||
|
|
d3338b699e | ||
|
|
6c60e76b55 | ||
|
|
8a0d31f612 | ||
|
|
6fc7e5ace1 | ||
|
|
8175762e74 | ||
|
|
f48e14af8a | ||
|
|
cd2a61d926 | ||
|
|
f45997afe4 | ||
|
|
b6f56721cb | ||
|
|
f9e7e82772 | ||
|
|
dbcd7b63d8 | ||
|
|
bf807684dd | ||
|
|
f02fcb5e4b | ||
|
|
2c127adf59 | ||
|
|
7f8a357019 | ||
|
|
99daf5b7b7 | ||
|
|
42cff20710 | ||
|
|
04d7880a0c | ||
|
|
e7d26e3f82 | ||
|
|
19308bf686 | ||
|
|
92970489c5 | ||
|
|
d51f5184d7 | ||
|
|
30eb26af7d | ||
|
|
3ea43f8213 | ||
|
|
9833067ba7 | ||
|
|
ad3114c56b | ||
|
|
9da9c269c1 | ||
|
|
0a22bb8469 | ||
|
|
c9fd1b1a17 | ||
|
|
19b40d45c0 | ||
|
|
90e2a1cda0 | ||
|
|
5e47b9f4a7 | ||
|
|
50b6948250 | ||
|
|
3ef118c9fa | ||
|
|
064707db43 | ||
|
|
8f71a1318d | ||
|
|
1b8ab35fdd | ||
|
|
4a1fe2f8ab | ||
|
|
e6e4e14781 | ||
|
|
d139157234 | ||
|
|
94104f4e03 | ||
|
|
8bea978715 | ||
|
|
eefe464fba | ||
|
|
33c0ba808c | ||
|
|
e0cc8ecda2 | ||
|
|
2d423b2358 | ||
|
|
b5b27b141c | ||
|
|
800a879927 | ||
|
|
f6806e42db | ||
|
|
3aae21b810 | ||
|
|
75239d6a64 | ||
|
|
09082955a3 | ||
|
|
6a6f2d51aa | ||
|
|
7b0d3ea8ac | ||
|
|
1c88b6bb26 | ||
|
|
e5e8e5d908 | ||
|
|
92fadd26b7 | ||
|
|
45d783ac43 | ||
|
|
ea9e76e7ae | ||
|
|
28426c0e91 | ||
|
|
3a9f51b600 | ||
|
|
f1b4db368e | ||
|
|
95efac187b | ||
|
|
6770d22438 | ||
|
|
4ce97613c4 | ||
|
|
030eb8eb6e | ||
|
|
c9da8e26e6 | ||
|
|
7ddf9772df | ||
|
|
0382ad1534 | ||
|
|
1b6e1369a0 | ||
|
|
835050c337 | ||
|
|
ca6a42e6eb | ||
|
|
a2e4d893ac | ||
|
|
657520b0b3 | ||
|
|
ea4b87895c | ||
|
|
19db500a19 | ||
|
|
1366cfd478 | ||
|
|
56a6df1f68 | ||
|
|
a1b35a8abf | ||
|
|
8a8a181186 | ||
|
|
463a551f7d | ||
|
|
fc613fb325 | ||
|
|
4517bea664 | ||
|
|
81dcfbe6ae | ||
|
|
fa8e64d04a | ||
|
|
562123b219 | ||
|
|
b217309618 | ||
|
|
357a02c74b | ||
|
|
508eeffa6e | ||
|
|
31555aa473 | ||
|
|
d2f968def7 | ||
|
|
d574bc611b | ||
|
|
a50a3b0123 | ||
|
|
5b6891dd45 | ||
|
|
4886982d43 | ||
|
|
7360f57beb | ||
|
|
491279b7a8 | ||
|
|
05b79f81af | ||
|
|
96ef2f2dd3 | ||
|
|
2542af17b6 | ||
|
|
c86bc649ff | ||
|
|
4b8e48ed88 | ||
|
|
a1addfd416 | ||
|
|
a1a57d8933 | ||
|
|
864970b860 | ||
|
|
a056be0842 | ||
|
|
c672e75739 | ||
|
|
7b5dd3f964 | ||
|
|
a6072f608b | ||
|
|
06462c65a5 | ||
|
|
359f9c0680 | ||
|
|
01db7c4948 | ||
|
|
f67f14a78d | ||
|
|
0a64d653e1 | ||
|
|
456a835285 | ||
|
|
0d8ed92a68 | ||
|
|
9bd093a03c | ||
|
|
361d4698a9 | ||
|
|
b342b15011 | ||
|
|
95638a3a80 | ||
|
|
2204fe3355 | ||
|
|
abcd774c9d | ||
|
|
ee209f8f88 | ||
|
|
b1f2e1c191 | ||
|
|
33f372f6c6 | ||
|
|
8e5c2a8875 | ||
|
|
36f3638ae4 | ||
|
|
d10210011f | ||
|
|
e867840d81 | ||
|
|
fb7e3189a8 | ||
|
|
5733c0143b | ||
|
|
ac4881f231 | ||
|
|
939efd7dab | ||
|
|
a93d96d742 | ||
|
|
f21804c769 | ||
|
|
4bc05a8d46 | ||
|
|
eebe2b0e80 | ||
|
|
250a496a78 | ||
|
|
29163ed053 | ||
|
|
cc05661f9e | ||
|
|
89409c22d1 | ||
|
|
e2f240ebc9 | ||
|
|
8d56f4c33b | ||
|
|
36eccb7122 | ||
|
|
c8827769b4 | ||
|
|
12e6c400b9 | ||
|
|
4c273a7910 | ||
|
|
58da335b17 | ||
|
|
5b2d506462 | ||
|
|
531430d44a | ||
|
|
7450eec7eb | ||
|
|
3a5802435f | ||
|
|
1b6b058097 | ||
|
|
a5797a2350 | ||
|
|
e81a5147c5 | ||
|
|
565c990687 | ||
|
|
0ccdfe0e26 | ||
|
|
f8a558e3a7 | ||
|
|
c5fa195cc6 | ||
|
|
3a821edd45 | ||
|
|
854d194f88 | ||
|
|
fb79daad6a | ||
|
|
b2ae0e8759 | ||
|
|
09f73988b3 | ||
|
|
9e6f289319 | ||
|
|
d2a55ffd31 | ||
|
|
793c2aa423 | ||
|
|
5daa332b6c | ||
|
|
d5511a857c | ||
|
|
7fecd21331 | ||
|
|
88b79e512f | ||
|
|
853bf63777 | ||
|
|
ff16fea54a | ||
|
|
a03e2a69d4 | ||
|
|
56a39df635 | ||
|
|
ac1593ff75 | ||
|
|
4d66b4667c | ||
|
|
fdde538b66 | ||
|
|
de1147219c | ||
|
|
371426a08e | ||
|
|
75eb005ba0 | ||
|
|
601b67145c | ||
|
|
c65afbc057 | ||
|
|
378589a473 | ||
|
|
fa264972a4 | ||
|
|
6b10e01c03 | ||
|
|
5a6d74ab37 | ||
|
|
73f1bb6968 | ||
|
|
d1a7f51859 | ||
|
|
2ae16396a6 | ||
|
|
ef090a5dc5 | ||
|
|
5c0799e82b | ||
|
|
fa2ee01d3f | ||
|
|
d6ba80bd3f |
5
.ctags
Normal file
5
.ctags
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
-R
|
||||||
|
--exclude=build
|
||||||
|
--exclude=env
|
||||||
|
--exclude=.tox
|
||||||
|
--python-kinds=-i
|
||||||
21
.gitignore
vendored
Normal file
21
.gitignore
vendored
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
.DS_Store
|
||||||
|
__pycache__
|
||||||
|
*.so
|
||||||
|
*.mo
|
||||||
|
*.waf*
|
||||||
|
.lock-waf*
|
||||||
|
.tox
|
||||||
|
/tags
|
||||||
|
|
||||||
|
build
|
||||||
|
dist
|
||||||
|
env
|
||||||
|
/deps
|
||||||
|
cocoa/autogen
|
||||||
|
|
||||||
|
/run.py
|
||||||
|
/cocoa/*/Info.plist
|
||||||
|
/cocoa/*/build
|
||||||
|
/qt/*_rc.py
|
||||||
|
/help/*/conf.py
|
||||||
|
/help/*/changelog.rst
|
||||||
12
.gitmodules
vendored
Normal file
12
.gitmodules
vendored
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
[submodule "qtlib"]
|
||||||
|
path = qtlib
|
||||||
|
url = https://github.com/hsoft/qtlib.git
|
||||||
|
[submodule "hscommon"]
|
||||||
|
path = hscommon
|
||||||
|
url = https://github.com/hsoft/hscommon.git
|
||||||
|
[submodule "cocoalib"]
|
||||||
|
path = cocoalib
|
||||||
|
url = https://github.com/hsoft/cocoalib.git
|
||||||
|
[submodule "cocoa/Sparkle"]
|
||||||
|
path = cocoa/Sparkle
|
||||||
|
url = https://github.com/sparkle-project/Sparkle.git
|
||||||
25
.hgignore
25
.hgignore
@@ -1,25 +0,0 @@
|
|||||||
syntax: glob
|
|
||||||
|
|
||||||
.DS_Store
|
|
||||||
*.pyc
|
|
||||||
*.so
|
|
||||||
*.mode1v3
|
|
||||||
*.pbxuser
|
|
||||||
*.tm_build_errors
|
|
||||||
*.pyd
|
|
||||||
conf.yaml
|
|
||||||
build
|
|
||||||
cocoa/*/Info.plist
|
|
||||||
cocoa/*/build
|
|
||||||
cocoa/*/dg_cocoa.plugin
|
|
||||||
qt/base/*_rc.py
|
|
||||||
qt/base/*_ui.py
|
|
||||||
qt/*/*_ui.py
|
|
||||||
qt/*/build
|
|
||||||
qt/*/dist
|
|
||||||
qt/*/install
|
|
||||||
qt/*/logdict*.log
|
|
||||||
qt/*/warn*.txt
|
|
||||||
help_se/dupeguru_help
|
|
||||||
help_me/dupeguru_me_help
|
|
||||||
help_pe/dupeguru_pe_help
|
|
||||||
17
.hgtags
17
.hgtags
@@ -1,17 +0,0 @@
|
|||||||
0ef0ca83b49ad009c896f55824189acc932bcf22 se2.8.2
|
|
||||||
0ef0ca83b49ad009c896f55824189acc932bcf22 me5.6.6
|
|
||||||
0ef0ca83b49ad009c896f55824189acc932bcf22 pe1.7.8
|
|
||||||
a8f232f880b6f9ada565d472996a627ebf69b6e9 before-tiger-drop
|
|
||||||
321d15e818cf9a3f1fc037543090bb2fca2cccd7 me5.7.0
|
|
||||||
adc73ccd14b1386cb04dee773c53a2d126800e31 se2.9.0
|
|
||||||
cbcf9c80fee4c908ef2efbf1c143c9e47676c9b2 pe1.8.0
|
|
||||||
61c4101851bdea3cb37dfb76f0d404c78c7c594c se2.9.1
|
|
||||||
0e923897a3389331d4ab3debbc40b8dd616199d9 pe1.8.1
|
|
||||||
2c454eca9ebe93b6cf34916068f828a6a39e3eaf me5.7.1
|
|
||||||
19e40bab20521d4256acf325dba9b32e95e135c5 pe1.8.2
|
|
||||||
7b7c5a66ebee4e4b8125330d24fe9ce1a070ff25 se2.9.2
|
|
||||||
1cef6d39855f85d4be728646bc78b860e6d4e398 pe1.8.3
|
|
||||||
90ed56ee602666db2f267f73eac6f824347039b5 me5.7.2
|
|
||||||
4c3cb1e671a333eabde1151c7c6ffb3609cab025 pe1.8.4
|
|
||||||
0a71306434bca51bea9a5d5ae54fe1bf0e4900d8 pe1.8.5
|
|
||||||
556baf4a410779e9bbf43129de133e4c4b26d679 pe1.8.6
|
|
||||||
21
.tx/config
Normal file
21
.tx/config
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
[main]
|
||||||
|
host = https://www.transifex.com
|
||||||
|
|
||||||
|
[dupeguru.core]
|
||||||
|
file_filter = locale/<lang>/LC_MESSAGES/core.po
|
||||||
|
source_file = locale/core.pot
|
||||||
|
source_lang = en
|
||||||
|
type = PO
|
||||||
|
|
||||||
|
[dupeguru.columns]
|
||||||
|
file_filter = locale/<lang>/LC_MESSAGES/columns.po
|
||||||
|
source_file = locale/columns.pot
|
||||||
|
source_lang = en
|
||||||
|
type = PO
|
||||||
|
|
||||||
|
[dupeguru.ui]
|
||||||
|
file_filter = locale/<lang>/LC_MESSAGES/ui.po
|
||||||
|
source_file = locale/ui.pot
|
||||||
|
source_lang = en
|
||||||
|
type = PO
|
||||||
|
|
||||||
19
CREDITS
Normal file
19
CREDITS
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
To know who contributed to dupeGuru, you can look at the commit log, but not all contributions
|
||||||
|
result in a commit. This file lists contributors who don't necessarily appear in the commit log.
|
||||||
|
|
||||||
|
* Jérôme Cantin, Main icon
|
||||||
|
* Gregor Tätzner, German localization
|
||||||
|
* Frank Weber, German localization
|
||||||
|
* Eric Dee, Chinese localization
|
||||||
|
* Aleš Nehyba, Czech localization
|
||||||
|
* Paolo Rossi, Italian localization
|
||||||
|
* Hrant Ohanyan, Armenian localization
|
||||||
|
* Igor Pavlov, Russian localization
|
||||||
|
* Kyrill Detinov, Russian localization
|
||||||
|
* Yuri Petrashko, Ukrainian localization
|
||||||
|
* Nickolas Pohilets, Ukrainian localization
|
||||||
|
* Victor Figueiredo, Brazilian localization
|
||||||
|
* Phan Anh, Vietnamese localization
|
||||||
|
* Gabriel Koutilellis, Greek localization
|
||||||
|
|
||||||
|
Thanks!
|
||||||
627
LICENSE
627
LICENSE
@@ -1,11 +1,622 @@
|
|||||||
Copyright 2010 Hardcoded Software Inc. (http://www.hardcoded.net)
|
GNU GENERAL PUBLIC LICENSE
|
||||||
All rights reserved.
|
Version 3, 29 June 2007
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
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.
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
Preamble
|
||||||
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
||||||
* Neither the name of Hardcoded Software Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
The GNU General Public License is a free, copyleft license for
|
||||||
* If the source code has been published less than two years ago, any redistribution, in whole or in part, must retain full licensing functionality, without any attempt to change, obscure or in other ways circumvent its intent.
|
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
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
111
Makefile
Normal file
111
Makefile
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
PYTHON ?= python3
|
||||||
|
REQ_MINOR_VERSION = 4
|
||||||
|
PREFIX ?= /usr/local
|
||||||
|
|
||||||
|
# If you're installing into a path that is not going to be the final path prefix (such as a
|
||||||
|
# sandbox), set DESTDIR to that path.
|
||||||
|
|
||||||
|
# Our build scripts are not very "make like" yet and perform their task in a bundle. For now, we
|
||||||
|
# use one of each file to act as a representative, a target, of these groups.
|
||||||
|
submodules_target = hscommon/__init__.py
|
||||||
|
|
||||||
|
packages = hscommon qtlib core qt
|
||||||
|
localedirs = $(wildcard locale/*/LC_MESSAGES)
|
||||||
|
pofiles = $(wildcard locale/*/LC_MESSAGES/*.po)
|
||||||
|
mofiles = $(patsubst %.po,%.mo,$(pofiles))
|
||||||
|
|
||||||
|
vpath %.po $(localedirs)
|
||||||
|
vpath %.mo $(localedirs)
|
||||||
|
|
||||||
|
all : | run.py
|
||||||
|
@echo "Build complete! You can run dupeGuru with 'make run'"
|
||||||
|
|
||||||
|
run.py : | env i18n modules qt/dg_rc.py
|
||||||
|
cp qt/run_template.py run.py
|
||||||
|
|
||||||
|
run: | run.py
|
||||||
|
./env/bin/python run.py
|
||||||
|
|
||||||
|
pyc:
|
||||||
|
${PYTHON} -m compileall ${packages}
|
||||||
|
|
||||||
|
reqs :
|
||||||
|
@ret=`${PYTHON} -c "import sys; print(int(sys.version_info[:2] >= (3, ${REQ_MINOR_VERSION})))"`; \
|
||||||
|
if [ $${ret} -ne 1 ]; then \
|
||||||
|
echo "Python 3.${REQ_MINOR_VERSION}+ required. Aborting."; \
|
||||||
|
exit 1; \
|
||||||
|
fi
|
||||||
|
@${PYTHON} -m venv -h > /dev/null || \
|
||||||
|
echo "Creation of our virtualenv failed. If you're on Ubuntu, you probably need python3-venv."
|
||||||
|
@${PYTHON} -c 'import PyQt5' >/dev/null 2>&1 || \
|
||||||
|
{ echo "PyQt 5.4+ required. Install it and try again. Aborting"; exit 1; }
|
||||||
|
|
||||||
|
# Ensure that submodules are initialized
|
||||||
|
$(submodules_target) :
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
|
||||||
|
env : | $(submodules_target) reqs
|
||||||
|
@echo "Creating our virtualenv"
|
||||||
|
${PYTHON} -m venv env --system-site-packages
|
||||||
|
./env/bin/python -m pip install -r requirements.txt
|
||||||
|
|
||||||
|
build/help : | env
|
||||||
|
./env/bin/python build.py --doc
|
||||||
|
|
||||||
|
qt/dg_rc.py : qt/dg.qrc
|
||||||
|
pyrcc5 qt/dg.qrc > qt/dg_rc.py
|
||||||
|
|
||||||
|
i18n: $(mofiles)
|
||||||
|
|
||||||
|
%.mo : %.po
|
||||||
|
msgfmt -o $@ $<
|
||||||
|
|
||||||
|
core/pe/_block.*.so : core/pe/modules/block.c core/pe/modules/common.c | env
|
||||||
|
./env/bin/python hscommon/build_ext.py $^ _block
|
||||||
|
mv _block.*.so core/pe
|
||||||
|
|
||||||
|
core/pe/_cache.*.so : core/pe/modules/cache.c core/pe/modules/common.c | env
|
||||||
|
./env/bin/python hscommon/build_ext.py $^ _cache
|
||||||
|
mv _cache.*.so core/pe
|
||||||
|
|
||||||
|
qt/pe/_block_qt.*.so : qt/pe/modules/block.c | env
|
||||||
|
./env/bin/python hscommon/build_ext.py $^ _block_qt
|
||||||
|
mv _block_qt.*.so qt/pe
|
||||||
|
|
||||||
|
modules : core/pe/_block.*.so core/pe/_cache.*.so qt/pe/_block_qt.*.so
|
||||||
|
|
||||||
|
mergepot :
|
||||||
|
./env/bin/python build.py --mergepot
|
||||||
|
|
||||||
|
normpo :
|
||||||
|
./env/bin/python build.py --normpo
|
||||||
|
|
||||||
|
srcpkg :
|
||||||
|
./scripts/srcpkg.sh
|
||||||
|
|
||||||
|
install: build/help | all pyc
|
||||||
|
mkdir -p ${DESTDIR}${PREFIX}/share/dupeguru
|
||||||
|
cp -rf ${packages} locale build/help ${DESTDIR}${PREFIX}/share/dupeguru
|
||||||
|
cp -f run.py ${DESTDIR}${PREFIX}/share/dupeguru/run.py
|
||||||
|
chmod 755 ${DESTDIR}${PREFIX}/share/dupeguru/run.py
|
||||||
|
mkdir -p ${DESTDIR}${PREFIX}/bin
|
||||||
|
ln -sf ${PREFIX}/share/dupeguru/run.py ${DESTDIR}${PREFIX}/bin/dupeguru
|
||||||
|
mkdir -p ${DESTDIR}${PREFIX}/share/applications
|
||||||
|
cp -f pkg/dupeguru.desktop ${DESTDIR}${PREFIX}/share/applications
|
||||||
|
mkdir -p ${DESTDIR}${PREFIX}/share/pixmaps
|
||||||
|
cp -f images/dgse_logo_128.png ${DESTDIR}${PREFIX}/share/pixmaps/dupeguru.png
|
||||||
|
|
||||||
|
uninstall :
|
||||||
|
rm -rf "${DESTDIR}${PREFIX}/share/dupeguru"
|
||||||
|
rm -f "${DESTDIR}${PREFIX}/bin/dupeguru"
|
||||||
|
rm -f "${DESTDIR}${PREFIX}/share/applications/dupeguru.desktop"
|
||||||
|
rm -f "${DESTDIR}${PREFIX}/share/pixmaps/dupeguru.png"
|
||||||
|
|
||||||
|
clean:
|
||||||
|
-rm run.py
|
||||||
|
-rm -rf build
|
||||||
|
-rm locale/*/LC_MESSAGES/*.mo
|
||||||
|
-rm core/pe/*.so qt/pe/*.so
|
||||||
|
|
||||||
|
.PHONY : clean srcpkg normpo mergepot modules i18n reqs run pyc install uninstall all
|
||||||
74
README
74
README
@@ -1,74 +0,0 @@
|
|||||||
Contents
|
|
||||||
=====
|
|
||||||
|
|
||||||
This package contains the source for dupeGuru. To learns how to build it, refer to the "Build dupeGuru" section. Below is the description of the various subfolders:
|
|
||||||
|
|
||||||
- core: Contains the core logic code for dupeGuru. It's Python code written in TDD style.
|
|
||||||
- core_*: Edition-specific-cross-toolkit code written in Python.
|
|
||||||
- cocoa: UI code for the Cocoa toolkit. It's Objective-C code.
|
|
||||||
- qt: UI code for the Qt toolkit. It's written in Python and uses PyQt. Before redistributing changes in this part of the code, read the "qt/WARNING" file.
|
|
||||||
- images: Images used by the different UI codebases.
|
|
||||||
|
|
||||||
There are also other sub-folder that comes from external repositories (automatically checked out
|
|
||||||
with svn:externals):
|
|
||||||
|
|
||||||
- hsutil: A collection of helpers used across HS applications.
|
|
||||||
- hsdocgen: An ad-hoc document generation used across HS project (used for help files)
|
|
||||||
- hsmedia: A library to read audio file metadata, used in dupeGuru ME.
|
|
||||||
- cocoalib: A collection of helpers used across Cocoa UI codebases of HS applications.
|
|
||||||
- qtlib: A collection of helpers used across Qt UI codebases of HS applications.
|
|
||||||
|
|
||||||
dupeGuru Dependencies
|
|
||||||
=====
|
|
||||||
|
|
||||||
Before being able to build dupeGuru, a few dependencies have to be installed:
|
|
||||||
|
|
||||||
General dependencies
|
|
||||||
-----
|
|
||||||
|
|
||||||
- Python 2.6 (http://www.python.org)
|
|
||||||
- Send2Trash (http://hg.hardcoded.net/send2trash)
|
|
||||||
- lxml, to read and write XML files. (http://codespeak.net/lxml/)
|
|
||||||
- Mako, to generate help files. (http://www.makotemplates.org/)
|
|
||||||
- PyYaml, for help files and the build system. (http://pyyaml.org/)
|
|
||||||
- Nose, to run unit tests. (http://somethingaboutorange.com/mrl/projects/nose/)
|
|
||||||
|
|
||||||
OS X prerequisites
|
|
||||||
-----
|
|
||||||
|
|
||||||
- XCode 3.1 (http://developer.apple.com/TOOLS/xcode/)
|
|
||||||
- Sparkle (http://sparkle.andymatuschak.org/)
|
|
||||||
- PyObjC 2.2. (http://pyobjc.sourceforge.net/)
|
|
||||||
- py2app (http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html)
|
|
||||||
|
|
||||||
Windows prerequisites
|
|
||||||
---
|
|
||||||
|
|
||||||
- Visual Studio 2008 (Express is enough) is needed to build C extensions. (http://www.microsoft.com/Express/)
|
|
||||||
- PyQt 4.6 (http://www.riverbankcomputing.co.uk/news)
|
|
||||||
- Python Imaging Library for dupeGuru PE. (http://www.pythonware.com/products/pil/)
|
|
||||||
- cx_Freeze, if you want to build a exe. You don't need it if you just want to run dupeGuru. (http://cx-freeze.sourceforge.net/)
|
|
||||||
- Advanced Installer, if you want to build the installer file. (http://www.advancedinstaller.com/)
|
|
||||||
|
|
||||||
Building dupeGuru
|
|
||||||
=====
|
|
||||||
|
|
||||||
First, make sure you meet the dependencies listed in the section above. Then you need to configure your build with:
|
|
||||||
|
|
||||||
python configure.py
|
|
||||||
|
|
||||||
If you want, you can specify a UI to use with the `--ui` option. So, if you want to build dupeGuru with Qt on OS X, then you have to type `python configure.py --ui=qt`. You can also use the `--dev` flag to indicate a dev build (it will build `dg_cocoa.plugin` in alias mode and use the "dev" config in XCode).
|
|
||||||
|
|
||||||
Then, just build the thing and then run it with:
|
|
||||||
|
|
||||||
python build.py
|
|
||||||
python run.py
|
|
||||||
|
|
||||||
If you want to create ready-to-upload package, run:
|
|
||||||
|
|
||||||
python package.py
|
|
||||||
|
|
||||||
64-bit on OS X
|
|
||||||
---
|
|
||||||
|
|
||||||
The "release" configuration of dupeGuru's XCode project build with archs "i386 x86_64 ppc". However there are currently problems with py2app and 64 bit. If you want to correctly build 64-bit apps, refer to http://www.hardcoded.net/articles/building-64-bit-pyobjc-applications-with-py2app.htm .
|
|
||||||
171
README.md
Normal file
171
README.md
Normal file
@@ -0,0 +1,171 @@
|
|||||||
|
# dupeGuru
|
||||||
|
|
||||||
|
[dupeGuru][dupeguru] is a cross-platform (Linux and OS X) GUI tool to find duplicate files in
|
||||||
|
a system. It's written mostly in Python 3 and has the peculiarity of using
|
||||||
|
[multiple GUI toolkits][cross-toolkit], all using the same core Python code. On OS X, the UI layer
|
||||||
|
is written in Objective-C and uses Cocoa. On Linux, it's written in Python and uses Qt5.
|
||||||
|
|
||||||
|
## Current status: People wanted
|
||||||
|
|
||||||
|
dupeGuru has currently only one maintainer, me. This is a dangerous situation that needs to be
|
||||||
|
corrected.
|
||||||
|
|
||||||
|
The goal is to eventually have another active maintainer, but before we can get there, the project
|
||||||
|
needs more contributors. It is very much lacking on that side right now.
|
||||||
|
|
||||||
|
Whatever your skills, if you are remotely interestested in being a contributor, I'm interested in
|
||||||
|
mentoring you. If that's the case, please refer to [the open ticket on the subject][contrib-issue]
|
||||||
|
and let's get started.
|
||||||
|
|
||||||
|
### Slowed development
|
||||||
|
|
||||||
|
Until I manage to find contributors, I'm slowing the development pace of dupeGuru. I'm not much
|
||||||
|
interested in maintaining it alone, I personally have no use for this app (it's been a *loooong*,
|
||||||
|
time since I had dupe problems :) )
|
||||||
|
|
||||||
|
I don't want to let it die, however, so I will still do normal maintainership, that is, issue
|
||||||
|
triaging, code review, critical bugfixes, releases management.
|
||||||
|
|
||||||
|
But anything non-critical, I'm not going to implement it myself because I see every issue as a
|
||||||
|
contribution opportunity.
|
||||||
|
|
||||||
|
### Windows maintainer wanted
|
||||||
|
|
||||||
|
As [described on my website][nowindows], dupeGuru v4.0 dropped Windows support
|
||||||
|
because there isn't anyone to bear the burden of Windows maintenance. If
|
||||||
|
you're a Windows developer and are interested in taking this task, [don't
|
||||||
|
hesitate to let me know][contrib-issue].
|
||||||
|
|
||||||
|
### OS X maintainer wanted
|
||||||
|
|
||||||
|
My Mac Mini is already a couple of years old and is likely to be my last Apple purchase. When it
|
||||||
|
dies, I will be unable maintain the OS X version of moneyGuru. I've already stopped paying for the
|
||||||
|
Mac Developer membership so I can't sign the apps anymore (in the "official way" I mean. The
|
||||||
|
download is still PGP signed) If you're a Mac developer and are interested in taking this task,
|
||||||
|
[don't hesitate to let me know][contrib-issue].
|
||||||
|
|
||||||
|
## Contents of this folder
|
||||||
|
|
||||||
|
This folder contains the source for dupeGuru. Its documentation is in `help`, but is also
|
||||||
|
[available online][documentation] in its built form. Here's how this source tree is organised:
|
||||||
|
|
||||||
|
* core: Contains the core logic code for dupeGuru. It's Python code.
|
||||||
|
* cocoa: UI code for the Cocoa toolkit. It's Objective-C code.
|
||||||
|
* qt: UI code for the Qt toolkit. It's written in Python and uses PyQt.
|
||||||
|
* images: Images used by the different UI codebases.
|
||||||
|
* pkg: Skeleton files required to create different packages
|
||||||
|
* help: Help document, written for Sphinx.
|
||||||
|
* locale: .po files for localisation.
|
||||||
|
|
||||||
|
There are also other sub-folder that comes from external repositories and are part of this repo as
|
||||||
|
git submodules:
|
||||||
|
|
||||||
|
* Sparkle: An auto-update library for the OS X version.
|
||||||
|
* hscommon: A collection of helpers used across HS applications.
|
||||||
|
* cocoalib: A collection of helpers used across Cocoa UI codebases of HS applications.
|
||||||
|
* qtlib: A collection of helpers used across Qt UI codebases of HS applications.
|
||||||
|
|
||||||
|
## How to build dupeGuru from source
|
||||||
|
|
||||||
|
### make
|
||||||
|
|
||||||
|
If you're on linux, you can build the ap for local development with `make`:
|
||||||
|
|
||||||
|
$ make
|
||||||
|
$ make run
|
||||||
|
|
||||||
|
The `Makefile` is a recent addition, however. You might have to fallback to the legacy build
|
||||||
|
scripts.
|
||||||
|
|
||||||
|
### Legacy build
|
||||||
|
|
||||||
|
If you're on OS X or that if the `make` method didn't work, you can build dupeGuru with the
|
||||||
|
legacy scripts.
|
||||||
|
|
||||||
|
There's a bootstrap script that will make building very easy. There might be some things that you
|
||||||
|
need to install manually on your system, but the bootstrap script will tell you when what you need
|
||||||
|
to install. You can run the bootstrap with:
|
||||||
|
|
||||||
|
$ ./bootstrap.sh
|
||||||
|
|
||||||
|
and follow instructions from the script.
|
||||||
|
|
||||||
|
### Prerequisites installation
|
||||||
|
|
||||||
|
Prerequisites are installed through `pip`. However, some of them are not "pip installable" and have
|
||||||
|
to be installed manually.
|
||||||
|
|
||||||
|
* All systems: [Python 3.4+][python]
|
||||||
|
* Mac OS X: OS X 10.10+ with XCode command line tools.
|
||||||
|
* Linux: PyQt5
|
||||||
|
|
||||||
|
On Ubuntu (14.04+), the apt-get command to install all pre-requisites is:
|
||||||
|
|
||||||
|
$ apt-get install python3-dev python3-pyqt5 pyqt5-dev-tools python3-venv
|
||||||
|
|
||||||
|
### OS X and pyenv
|
||||||
|
|
||||||
|
[pyenv][pyenv] is a popular way to manage multiple python versions. However, be aware that dupeGuru
|
||||||
|
will not compile with a pyenv's python unless it's been built with `--enable-framework`. You can do
|
||||||
|
this with:
|
||||||
|
|
||||||
|
$ env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install 3.4.3
|
||||||
|
|
||||||
|
### Setting up the virtual environment
|
||||||
|
|
||||||
|
*This is done automatically by the bootstrap script. This is a reference in case you need to do it
|
||||||
|
manually.*
|
||||||
|
|
||||||
|
Use Python's built-in `pyvenv` to create a virtual environment in which we're going to install our.
|
||||||
|
Python-related dependencies. In that environment, we then install our requirements with pip.
|
||||||
|
|
||||||
|
For Linux (`--system-site-packages` is to be able to import PyQt):
|
||||||
|
|
||||||
|
$ pyvenv --system-site-packages env
|
||||||
|
$ source env/bin/activate
|
||||||
|
$ pip install -r requirements.txt
|
||||||
|
|
||||||
|
For OS X:
|
||||||
|
|
||||||
|
$ pyvenv env
|
||||||
|
$ source env/bin/activate
|
||||||
|
$ pip install -r requirements-osx.txt
|
||||||
|
|
||||||
|
### Actual building and running
|
||||||
|
|
||||||
|
With your virtualenv activated, you can build and run dupeGuru with these commands:
|
||||||
|
|
||||||
|
$ python build.py
|
||||||
|
$ python run.py
|
||||||
|
|
||||||
|
You can also package dupeGuru into an installable package with:
|
||||||
|
|
||||||
|
$ python package.py
|
||||||
|
|
||||||
|
|
||||||
|
### Generate Ubuntu packages
|
||||||
|
|
||||||
|
$ bash -c "pyvenv --system-site-packages env && source env/bin/activate && pip install -r requirements.txt && python3 build.py --clean && python3 package.py"
|
||||||
|
|
||||||
|
### Running tests
|
||||||
|
|
||||||
|
The complete test suite is ran with [Tox 1.7+][tox]. If you have it installed system-wide, you
|
||||||
|
don't even need to set up a virtualenv. Just `cd` into the root project folder and run `tox`.
|
||||||
|
|
||||||
|
If you don't have Tox system-wide, install it in your virtualenv with `pip install tox` and then
|
||||||
|
run `tox`.
|
||||||
|
|
||||||
|
You can also run automated tests without Tox. Extra requirements for running tests are in
|
||||||
|
`requirements-extra.txt`. So, you can do `pip install -r requirements-extra.txt` inside your
|
||||||
|
virtualenv and then `py.test core hscommon`
|
||||||
|
|
||||||
|
[dupeguru]: http://www.hardcoded.net/dupeguru/
|
||||||
|
[cross-toolkit]: http://www.hardcoded.net/articles/cross-toolkit-software
|
||||||
|
[contrib-issue]: https://github.com/hsoft/dupeguru/issues/300
|
||||||
|
[nowindows]: https://www.hardcoded.net/archive2015#2015-11-01
|
||||||
|
[documentation]: http://www.hardcoded.net/dupeguru/help/en/
|
||||||
|
[python]: http://www.python.org/
|
||||||
|
[pyqt]: http://www.riverbankcomputing.com
|
||||||
|
[pyenv]: https://github.com/yyuu/pyenv
|
||||||
|
[tox]: https://tox.readthedocs.org/en/latest/
|
||||||
|
|
||||||
41
bootstrap.sh
Executable file
41
bootstrap.sh
Executable file
@@ -0,0 +1,41 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
PYTHON=python3
|
||||||
|
ret=`$PYTHON -c "import sys; print(int(sys.version_info[:2] >= (3, 4)))"`
|
||||||
|
if [ $ret -ne 1 ]; then
|
||||||
|
echo "Python 3.4+ required. Aborting."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
if [ -d ".git" ]; then
|
||||||
|
git submodule init
|
||||||
|
git submodule update
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "env" ]; then
|
||||||
|
echo "No virtualenv. Creating one"
|
||||||
|
# We need a "system-site-packages" env to have PyQt, but we also need to ensure a local pip
|
||||||
|
# install. To achieve our latter goal, we start with a normal venv, which we later upgrade to
|
||||||
|
# a system-site-packages once pip is installed.
|
||||||
|
if ! $PYTHON -m venv env ; then
|
||||||
|
echo "Creation of our virtualenv failed. If you're on Ubuntu, you probably need python3-venv."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
if [ "$(uname)" != "Darwin" ]; then
|
||||||
|
$PYTHON -m venv env --upgrade --system-site-packages
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
source env/bin/activate
|
||||||
|
|
||||||
|
echo "Installing pip requirements"
|
||||||
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
|
./env/bin/pip install -r requirements-osx.txt
|
||||||
|
else
|
||||||
|
./env/bin/python -c "import PyQt5" >/dev/null 2>&1 || { echo >&2 "PyQt 5.4+ required. Install it and try again. Aborting"; exit 1; }
|
||||||
|
./env/bin/pip install -r requirements.txt
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Bootstrapping complete! You can now configure, build and run dupeGuru with:"
|
||||||
|
echo ". env/bin/activate && python build.py && python run.py"
|
||||||
450
build.py
450
build.py
@@ -1,106 +1,382 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||||
# Created By: Virgil Dupras
|
|
||||||
# Created On: 2009-12-30
|
|
||||||
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
#
|
#
|
||||||
# This software is licensed under the "HS" License as described in the "LICENSE" file,
|
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
# which should be included with this package. The terms are also available at
|
# which should be included with this package. The terms are also available at
|
||||||
# http://www.hardcoded.net/licenses/hs_license
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import os.path as op
|
import os.path as op
|
||||||
|
from optparse import OptionParser
|
||||||
import shutil
|
import shutil
|
||||||
|
import compileall
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup, Extension
|
||||||
import yaml
|
|
||||||
|
|
||||||
from hsdocgen import generate_help, filters
|
from hscommon import sphinxgen
|
||||||
from hsutil.build import add_to_pythonpath, print_and_do, build_all_qt_ui, copy_packages
|
from hscommon.build import (
|
||||||
|
add_to_pythonpath, print_and_do, copy_packages, filereplace,
|
||||||
|
get_module_version, move_all, copy_all, OSXAppStructure,
|
||||||
|
build_cocoalib_xibless, fix_qt_resource_file, build_cocoa_ext, copy_embeddable_python_dylib,
|
||||||
|
collect_stdlib_dependencies
|
||||||
|
)
|
||||||
|
from hscommon import loc
|
||||||
|
from hscommon.plat import ISOSX
|
||||||
|
from hscommon.util import ensure_folder, delete_files_with_pattern
|
||||||
|
|
||||||
def build_cocoa(edition, dev, help_destpath):
|
def parse_args():
|
||||||
if not dev:
|
usage = "usage: %prog [options]"
|
||||||
print "Building help index"
|
parser = OptionParser(usage=usage)
|
||||||
os.system('open -a /Developer/Applications/Utilities/Help\\ Indexer.app {0}'.format(help_destpath))
|
parser.add_option(
|
||||||
|
'--clean', action='store_true', dest='clean',
|
||||||
print "Building dg_cocoa.plugin"
|
help="Clean build folder before building"
|
||||||
if op.exists('build'):
|
|
||||||
shutil.rmtree('build')
|
|
||||||
os.mkdir('build')
|
|
||||||
if not dev:
|
|
||||||
specific_packages = {
|
|
||||||
'se': ['core_se'],
|
|
||||||
'me': ['core_me', 'hsmedia'],
|
|
||||||
'pe': ['core_pe'],
|
|
||||||
}[edition]
|
|
||||||
copy_packages(['core', 'hsutil'] + specific_packages, 'build')
|
|
||||||
cocoa_project_path = 'cocoa/{0}'.format(edition)
|
|
||||||
shutil.copy(op.join(cocoa_project_path, 'dg_cocoa.py'), 'build')
|
|
||||||
os.chdir('build')
|
|
||||||
script_args = ['py2app', '-A'] if dev else ['py2app']
|
|
||||||
setup(
|
|
||||||
script_args = script_args,
|
|
||||||
plugin = ['dg_cocoa.py'],
|
|
||||||
setup_requires = ['py2app'],
|
|
||||||
)
|
)
|
||||||
os.chdir('..')
|
parser.add_option(
|
||||||
pluginpath = op.join(cocoa_project_path, 'dg_cocoa.plugin')
|
'--doc', action='store_true', dest='doc',
|
||||||
if op.exists(pluginpath):
|
help="Build only the help file"
|
||||||
shutil.rmtree(pluginpath)
|
)
|
||||||
shutil.move('build/dist/dg_cocoa.plugin', pluginpath)
|
parser.add_option(
|
||||||
if dev:
|
'--ui', dest='ui',
|
||||||
# In alias mode, the tweakings we do to the pythonpath aren't counted in. We have to
|
help="Type of UI to build. 'qt' or 'cocoa'. Default is determined by your system."
|
||||||
# manually put a .pth in the plugin
|
)
|
||||||
pthpath = op.join(pluginpath, 'Contents/Resources/dev.pth')
|
parser.add_option(
|
||||||
open(pthpath, 'w').write(op.abspath('.'))
|
'--dev', action='store_true', dest='dev', default=False,
|
||||||
os.chdir(cocoa_project_path)
|
help="If this flag is set, will configure for dev builds."
|
||||||
print "Building the XCode project"
|
)
|
||||||
args = []
|
parser.add_option(
|
||||||
if dev:
|
'--loc', action='store_true', dest='loc',
|
||||||
args.append('-configuration dev')
|
help="Build only localization"
|
||||||
else:
|
)
|
||||||
args.append('-configuration release')
|
parser.add_option(
|
||||||
args = ' '.join(args)
|
'--cocoa-ext', action='store_true', dest='cocoa_ext',
|
||||||
os.system('xcodebuild {0}'.format(args))
|
help="Build only Cocoa extensions"
|
||||||
os.chdir('..')
|
)
|
||||||
|
parser.add_option(
|
||||||
|
'--cocoa-compile', action='store_true', dest='cocoa_compile',
|
||||||
|
help="Build only Cocoa executable"
|
||||||
|
)
|
||||||
|
parser.add_option(
|
||||||
|
'--xibless', action='store_true', dest='xibless',
|
||||||
|
help="Build only xibless UIs"
|
||||||
|
)
|
||||||
|
parser.add_option(
|
||||||
|
'--updatepot', action='store_true', dest='updatepot',
|
||||||
|
help="Generate .pot files from source code."
|
||||||
|
)
|
||||||
|
parser.add_option(
|
||||||
|
'--mergepot', action='store_true', dest='mergepot',
|
||||||
|
help="Update all .po files based on .pot files."
|
||||||
|
)
|
||||||
|
parser.add_option(
|
||||||
|
'--normpo', action='store_true', dest='normpo',
|
||||||
|
help="Normalize all PO files (do this before commit)."
|
||||||
|
)
|
||||||
|
(options, args) = parser.parse_args()
|
||||||
|
return options
|
||||||
|
|
||||||
def build_qt(edition, dev):
|
def cocoa_app():
|
||||||
build_all_qt_ui(op.join('qtlib', 'ui'))
|
app_path = 'build/dupeGuru.app'
|
||||||
build_all_qt_ui(op.join('qt', 'base'))
|
return OSXAppStructure(app_path)
|
||||||
build_all_qt_ui(op.join('qt', edition))
|
|
||||||
print_and_do("pyrcc4 {0} > {1}".format(op.join('qt', 'base', 'dg.qrc'), op.join('qt', 'base', 'dg_rc.py')))
|
def build_xibless(dest='cocoa/autogen'):
|
||||||
if edition == 'pe':
|
import xibless
|
||||||
os.chdir(op.join('qt', edition))
|
ensure_folder(dest)
|
||||||
os.system('python gen.py')
|
FNPAIRS = [
|
||||||
|
('ignore_list_dialog.py', 'IgnoreListDialog_UI'),
|
||||||
|
('deletion_options.py', 'DeletionOptions_UI'),
|
||||||
|
('problem_dialog.py', 'ProblemDialog_UI'),
|
||||||
|
('directory_panel.py', 'DirectoryPanel_UI'),
|
||||||
|
('prioritize_dialog.py', 'PrioritizeDialog_UI'),
|
||||||
|
('result_window.py', 'ResultWindow_UI'),
|
||||||
|
('main_menu.py', 'MainMenu_UI'),
|
||||||
|
('details_panel.py', 'DetailsPanel_UI'),
|
||||||
|
('details_panel_picture.py', 'DetailsPanelPicture_UI'),
|
||||||
|
]
|
||||||
|
for srcname, dstname in FNPAIRS:
|
||||||
|
xibless.generate(
|
||||||
|
op.join('cocoa', 'ui', srcname), op.join(dest, dstname),
|
||||||
|
localizationTable='Localizable'
|
||||||
|
)
|
||||||
|
for appmode in ('standard', 'music', 'picture'):
|
||||||
|
xibless.generate(
|
||||||
|
op.join('cocoa', 'ui', 'preferences_panel.py'),
|
||||||
|
op.join(dest, 'PreferencesPanel%s_UI' % appmode.capitalize()),
|
||||||
|
localizationTable='Localizable',
|
||||||
|
args={'appmode': appmode},
|
||||||
|
)
|
||||||
|
|
||||||
|
def build_cocoa(dev):
|
||||||
|
sparkle_framework_path = op.join('cocoa', 'Sparkle', 'build', 'Release', 'Sparkle.framework')
|
||||||
|
if not op.exists(sparkle_framework_path):
|
||||||
|
print("Building Sparkle")
|
||||||
|
os.chdir(op.join('cocoa', 'Sparkle'))
|
||||||
|
print_and_do('make build')
|
||||||
os.chdir(op.join('..', '..'))
|
os.chdir(op.join('..', '..'))
|
||||||
|
print("Creating OS X app structure")
|
||||||
|
app = cocoa_app()
|
||||||
|
app_version = get_module_version('core')
|
||||||
|
cocoa_project_path = 'cocoa'
|
||||||
|
filereplace(op.join(cocoa_project_path, 'InfoTemplate.plist'), op.join('build', 'Info.plist'), version=app_version)
|
||||||
|
app.create(op.join('build', 'Info.plist'))
|
||||||
|
print("Building localizations")
|
||||||
|
build_localizations('cocoa')
|
||||||
|
print("Building xibless UIs")
|
||||||
|
build_cocoalib_xibless()
|
||||||
|
build_xibless()
|
||||||
|
print("Building Python extensions")
|
||||||
|
build_cocoa_proxy_module()
|
||||||
|
build_cocoa_bridging_interfaces()
|
||||||
|
print("Building the cocoa layer")
|
||||||
|
copy_embeddable_python_dylib('build')
|
||||||
|
pydep_folder = op.join(app.resources, 'py')
|
||||||
|
if not op.exists(pydep_folder):
|
||||||
|
os.mkdir(pydep_folder)
|
||||||
|
shutil.copy(op.join(cocoa_project_path, 'dg_cocoa.py'), 'build')
|
||||||
|
tocopy = [
|
||||||
|
'core', 'hscommon', 'cocoa/inter', 'cocoalib/cocoa', 'objp', 'send2trash', 'hsaudiotag',
|
||||||
|
]
|
||||||
|
copy_packages(tocopy, pydep_folder, create_links=dev)
|
||||||
|
sys.path.insert(0, 'build')
|
||||||
|
# ModuleFinder can't seem to correctly detect the multiprocessing dependency, so we have
|
||||||
|
# to manually specify it.
|
||||||
|
extra_deps = ['multiprocessing']
|
||||||
|
collect_stdlib_dependencies('build/dg_cocoa.py', pydep_folder, extra_deps=extra_deps)
|
||||||
|
del sys.path[0]
|
||||||
|
# Views are not referenced by python code, so they're not found by the collector.
|
||||||
|
copy_all('build/inter/*.so', op.join(pydep_folder, 'inter'))
|
||||||
|
if not dev:
|
||||||
|
# Important: Don't ever run delete_files_with_pattern('*.py') on dev builds because you'll
|
||||||
|
# be deleting all py files in symlinked folders.
|
||||||
|
compileall.compile_dir(pydep_folder, force=True, legacy=True)
|
||||||
|
delete_files_with_pattern(pydep_folder, '*.py')
|
||||||
|
delete_files_with_pattern(pydep_folder, '__pycache__')
|
||||||
|
print("Compiling with WAF")
|
||||||
|
os.chdir('cocoa')
|
||||||
|
print_and_do('{0} waf configure && {0} waf'.format(sys.executable))
|
||||||
|
os.chdir('..')
|
||||||
|
app.copy_executable('cocoa/build/dupeGuru')
|
||||||
|
build_help()
|
||||||
|
print("Copying resources and frameworks")
|
||||||
|
image_path = 'cocoa/dupeguru.icns'
|
||||||
|
resources = [image_path, 'cocoa/dsa_pub.pem', 'build/dg_cocoa.py', 'build/help']
|
||||||
|
app.copy_resources(*resources, use_symlinks=dev)
|
||||||
|
app.copy_frameworks('build/Python', sparkle_framework_path)
|
||||||
|
print("Creating the run.py file")
|
||||||
|
tmpl = open('cocoa/run_template.py', 'rt').read()
|
||||||
|
run_contents = tmpl.replace('{{app_path}}', app.dest)
|
||||||
|
open('run.py', 'wt').write(run_contents)
|
||||||
|
|
||||||
|
def build_qt(dev):
|
||||||
|
print("Building localizations")
|
||||||
|
build_localizations('qt')
|
||||||
|
print("Building Qt stuff")
|
||||||
|
print_and_do("pyrcc5 {0} > {1}".format(op.join('qt', 'dg.qrc'), op.join('qt', 'dg_rc.py')))
|
||||||
|
fix_qt_resource_file(op.join('qt', 'dg_rc.py'))
|
||||||
|
build_help()
|
||||||
|
print("Creating the run.py file")
|
||||||
|
shutil.copy(op.join('qt', 'run_template.py'), 'run.py')
|
||||||
|
|
||||||
|
def build_help():
|
||||||
|
print("Generating Help")
|
||||||
|
current_path = op.abspath('.')
|
||||||
|
help_basepath = op.join(current_path, 'help', 'en')
|
||||||
|
help_destpath = op.join(current_path, 'build', 'help')
|
||||||
|
changelog_path = op.join(current_path, 'help', 'changelog')
|
||||||
|
tixurl = "https://github.com/hsoft/dupeguru/issues/{}"
|
||||||
|
confrepl = {'language': 'en'}
|
||||||
|
changelogtmpl = op.join(current_path, 'help', 'changelog.tmpl')
|
||||||
|
conftmpl = op.join(current_path, 'help', 'conf.tmpl')
|
||||||
|
sphinxgen.gen(help_basepath, help_destpath, changelog_path, tixurl, confrepl, conftmpl, changelogtmpl)
|
||||||
|
|
||||||
|
def build_qt_localizations():
|
||||||
|
loc.compile_all_po(op.join('qtlib', 'locale'))
|
||||||
|
loc.merge_locale_dir(op.join('qtlib', 'locale'), 'locale')
|
||||||
|
|
||||||
|
def build_localizations(ui):
|
||||||
|
loc.compile_all_po('locale')
|
||||||
|
if ui == 'cocoa':
|
||||||
|
app = cocoa_app()
|
||||||
|
loc.build_cocoa_localizations(app, en_stringsfile=op.join('cocoa', 'en.lproj', 'Localizable.strings'))
|
||||||
|
locale_dest = op.join(app.resources, 'locale')
|
||||||
|
elif ui == 'qt':
|
||||||
|
build_qt_localizations()
|
||||||
|
locale_dest = op.join('build', 'locale')
|
||||||
|
if op.exists(locale_dest):
|
||||||
|
shutil.rmtree(locale_dest)
|
||||||
|
shutil.copytree('locale', locale_dest, ignore=shutil.ignore_patterns('*.po', '*.pot'))
|
||||||
|
|
||||||
|
def build_updatepot():
|
||||||
|
if ISOSX:
|
||||||
|
print("Updating Cocoa strings file.")
|
||||||
|
build_cocoalib_xibless('cocoalib/autogen')
|
||||||
|
loc.generate_cocoa_strings_from_code('cocoalib', 'cocoalib/en.lproj')
|
||||||
|
build_xibless()
|
||||||
|
loc.generate_cocoa_strings_from_code('cocoa', 'cocoa/en.lproj')
|
||||||
|
print("Building .pot files from source files")
|
||||||
|
print("Building core.pot")
|
||||||
|
loc.generate_pot(['core'], op.join('locale', 'core.pot'), ['tr'])
|
||||||
|
print("Building columns.pot")
|
||||||
|
loc.generate_pot(['core'], op.join('locale', 'columns.pot'), ['coltr'])
|
||||||
|
print("Building ui.pot")
|
||||||
|
# When we're not under OS X, we don't want to overwrite ui.pot because it contains Cocoa locs
|
||||||
|
# We want to merge the generated pot with the old pot in the most preserving way possible.
|
||||||
|
ui_packages = ['qt', op.join('cocoa', 'inter')]
|
||||||
|
loc.generate_pot(ui_packages, op.join('locale', 'ui.pot'), ['tr'], merge=(not ISOSX))
|
||||||
|
print("Building qtlib.pot")
|
||||||
|
loc.generate_pot(['qtlib'], op.join('qtlib', 'locale', 'qtlib.pot'), ['tr'])
|
||||||
|
if ISOSX:
|
||||||
|
print("Building cocoalib.pot")
|
||||||
|
cocoalib_pot = op.join('cocoalib', 'locale', 'cocoalib.pot')
|
||||||
|
os.remove(cocoalib_pot)
|
||||||
|
loc.strings2pot(op.join('cocoalib', 'en.lproj', 'cocoalib.strings'), cocoalib_pot)
|
||||||
|
print("Enhancing ui.pot with Cocoa's strings files")
|
||||||
|
loc.strings2pot(
|
||||||
|
op.join('cocoa', 'en.lproj', 'Localizable.strings'),
|
||||||
|
op.join('locale', 'ui.pot')
|
||||||
|
)
|
||||||
|
|
||||||
|
def build_mergepot():
|
||||||
|
print("Updating .po files using .pot files")
|
||||||
|
loc.merge_pots_into_pos('locale')
|
||||||
|
loc.merge_pots_into_pos(op.join('qtlib', 'locale'))
|
||||||
|
loc.merge_pots_into_pos(op.join('cocoalib', 'locale'))
|
||||||
|
|
||||||
|
def build_normpo():
|
||||||
|
loc.normalize_all_pos('locale')
|
||||||
|
loc.normalize_all_pos(op.join('qtlib', 'locale'))
|
||||||
|
loc.normalize_all_pos(op.join('cocoalib', 'locale'))
|
||||||
|
|
||||||
|
def build_cocoa_proxy_module():
|
||||||
|
print("Building Cocoa Proxy")
|
||||||
|
import objp.p2o
|
||||||
|
objp.p2o.generate_python_proxy_code('cocoalib/cocoa/CocoaProxy.h', 'build/CocoaProxy.m')
|
||||||
|
build_cocoa_ext(
|
||||||
|
"CocoaProxy", 'cocoalib/cocoa',
|
||||||
|
[
|
||||||
|
'cocoalib/cocoa/CocoaProxy.m', 'build/CocoaProxy.m', 'build/ObjP.m',
|
||||||
|
'cocoalib/HSErrorReportWindow.m', 'cocoa/autogen/HSErrorReportWindow_UI.m'
|
||||||
|
],
|
||||||
|
['AppKit', 'CoreServices'],
|
||||||
|
['cocoalib', 'cocoa/autogen']
|
||||||
|
)
|
||||||
|
|
||||||
|
def build_cocoa_bridging_interfaces():
|
||||||
|
print("Building Cocoa Bridging Interfaces")
|
||||||
|
import objp.o2p
|
||||||
|
import objp.p2o
|
||||||
|
add_to_pythonpath('cocoa')
|
||||||
|
add_to_pythonpath('cocoalib')
|
||||||
|
from cocoa.inter import (
|
||||||
|
PyGUIObject, GUIObjectView, PyColumns, ColumnsView, PyOutline,
|
||||||
|
OutlineView, PySelectableList, SelectableListView, PyTable, TableView, PyBaseApp,
|
||||||
|
PyTextField, ProgressWindowView, PyProgressWindow
|
||||||
|
)
|
||||||
|
from inter.deletion_options import PyDeletionOptions, DeletionOptionsView
|
||||||
|
from inter.details_panel import PyDetailsPanel, DetailsPanelView
|
||||||
|
from inter.directory_outline import PyDirectoryOutline, DirectoryOutlineView
|
||||||
|
from inter.prioritize_dialog import PyPrioritizeDialog, PrioritizeDialogView
|
||||||
|
from inter.prioritize_list import PyPrioritizeList, PrioritizeListView
|
||||||
|
from inter.problem_dialog import PyProblemDialog
|
||||||
|
from inter.ignore_list_dialog import PyIgnoreListDialog, IgnoreListDialogView
|
||||||
|
from inter.result_table import PyResultTable, ResultTableView
|
||||||
|
from inter.stats_label import PyStatsLabel, StatsLabelView
|
||||||
|
from inter.app import PyDupeGuru, DupeGuruView
|
||||||
|
allclasses = [
|
||||||
|
PyGUIObject, PyColumns, PyOutline, PySelectableList, PyTable, PyBaseApp,
|
||||||
|
PyDetailsPanel, PyDirectoryOutline, PyPrioritizeDialog, PyPrioritizeList, PyProblemDialog,
|
||||||
|
PyIgnoreListDialog, PyDeletionOptions, PyResultTable, PyStatsLabel, PyDupeGuru,
|
||||||
|
PyTextField, PyProgressWindow
|
||||||
|
]
|
||||||
|
for class_ in allclasses:
|
||||||
|
objp.o2p.generate_objc_code(class_, 'cocoa/autogen', inherit=True)
|
||||||
|
allclasses = [
|
||||||
|
GUIObjectView, ColumnsView, OutlineView, SelectableListView, TableView,
|
||||||
|
DetailsPanelView, DirectoryOutlineView, PrioritizeDialogView, PrioritizeListView,
|
||||||
|
IgnoreListDialogView, DeletionOptionsView, ResultTableView, StatsLabelView,
|
||||||
|
ProgressWindowView, DupeGuruView
|
||||||
|
]
|
||||||
|
clsspecs = [objp.o2p.spec_from_python_class(class_) for class_ in allclasses]
|
||||||
|
objp.p2o.generate_python_proxy_code_from_clsspec(clsspecs, 'build/CocoaViews.m')
|
||||||
|
build_cocoa_ext('CocoaViews', 'cocoa/inter', ['build/CocoaViews.m', 'build/ObjP.m'])
|
||||||
|
|
||||||
|
def build_pe_modules(ui):
|
||||||
|
print("Building PE Modules")
|
||||||
|
exts = [
|
||||||
|
Extension(
|
||||||
|
"_block",
|
||||||
|
[op.join('core', 'pe', 'modules', 'block.c'), op.join('core', 'pe', 'modules', 'common.c')]
|
||||||
|
),
|
||||||
|
Extension(
|
||||||
|
"_cache",
|
||||||
|
[op.join('core', 'pe', 'modules', 'cache.c'), op.join('core', 'pe', 'modules', 'common.c')]
|
||||||
|
),
|
||||||
|
]
|
||||||
|
if ui == 'qt':
|
||||||
|
exts.append(Extension("_block_qt", [op.join('qt', 'pe', 'modules', 'block.c')]))
|
||||||
|
elif ui == 'cocoa':
|
||||||
|
exts.append(Extension(
|
||||||
|
"_block_osx",
|
||||||
|
[op.join('core', 'pe', 'modules', 'block_osx.m'), op.join('core', 'pe', 'modules', 'common.c')],
|
||||||
|
extra_link_args=[
|
||||||
|
"-framework", "CoreFoundation",
|
||||||
|
"-framework", "Foundation",
|
||||||
|
"-framework", "ApplicationServices",
|
||||||
|
]
|
||||||
|
))
|
||||||
|
setup(
|
||||||
|
script_args=['build_ext', '--inplace'],
|
||||||
|
ext_modules=exts,
|
||||||
|
)
|
||||||
|
move_all('_block_qt*', op.join('qt', 'pe'))
|
||||||
|
move_all('_block*', op.join('core', 'pe'))
|
||||||
|
move_all('_cache*', op.join('core', 'pe'))
|
||||||
|
|
||||||
|
def build_normal(ui, dev):
|
||||||
|
print("Building dupeGuru with UI {}".format(ui))
|
||||||
|
add_to_pythonpath('.')
|
||||||
|
print("Building dupeGuru")
|
||||||
|
build_pe_modules(ui)
|
||||||
|
if ui == 'cocoa':
|
||||||
|
build_cocoa(dev)
|
||||||
|
elif ui == 'qt':
|
||||||
|
build_qt(dev)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
conf = yaml.load(open('conf.yaml'))
|
options = parse_args()
|
||||||
edition = conf['edition']
|
ui = options.ui
|
||||||
ui = conf['ui']
|
if ui not in ('cocoa', 'qt'):
|
||||||
dev = conf['dev']
|
ui = 'cocoa' if ISOSX else 'qt'
|
||||||
print "Building dupeGuru {0} with UI {1}".format(edition.upper(), ui)
|
if options.dev:
|
||||||
if dev:
|
print("Building in Dev mode")
|
||||||
print "Building in Dev mode"
|
if options.clean:
|
||||||
add_to_pythonpath('.')
|
for path in ['build', op.join('cocoa', 'build'), op.join('cocoa', 'autogen')]:
|
||||||
print "Generating Help"
|
if op.exists(path):
|
||||||
windows = sys.platform == 'win32'
|
shutil.rmtree(path)
|
||||||
tix = filters.tixgen("https://hardcoded.lighthouseapp.com/projects/31699-dupeguru/tickets/{0}")
|
if not op.exists('build'):
|
||||||
help_dir = 'help_{0}'.format(edition)
|
os.mkdir('build')
|
||||||
dest_dir = 'dupeguru_{0}_help'.format(edition) if edition != 'se' else 'dupeguru_help'
|
if options.doc:
|
||||||
help_basepath = op.abspath(help_dir)
|
build_help()
|
||||||
help_destpath = op.abspath(op.join(help_dir, dest_dir))
|
elif options.loc:
|
||||||
generate_help.main(help_basepath, help_destpath, force_render=not dev, tix=tix, windows=windows)
|
build_localizations(ui)
|
||||||
|
elif options.updatepot:
|
||||||
print "Building dupeGuru"
|
build_updatepot()
|
||||||
if edition == 'pe':
|
elif options.mergepot:
|
||||||
os.chdir('core_pe')
|
build_mergepot()
|
||||||
os.system('python gen.py')
|
elif options.normpo:
|
||||||
|
build_normpo()
|
||||||
|
elif options.cocoa_ext:
|
||||||
|
build_cocoa_proxy_module()
|
||||||
|
build_cocoa_bridging_interfaces()
|
||||||
|
elif options.cocoa_compile:
|
||||||
|
os.chdir('cocoa')
|
||||||
|
print_and_do('{0} waf configure && {0} waf'.format(sys.executable))
|
||||||
os.chdir('..')
|
os.chdir('..')
|
||||||
if ui == 'cocoa':
|
cocoa_app().copy_executable('cocoa/build/dupeGuru')
|
||||||
build_cocoa(edition, dev, help_destpath)
|
elif options.xibless:
|
||||||
elif ui == 'qt':
|
build_cocoalib_xibless()
|
||||||
build_qt(edition, dev)
|
build_xibless()
|
||||||
|
else:
|
||||||
|
build_normal(ui, options.dev)
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
|||||||
82
cocoa/AppDelegate.h
Normal file
82
cocoa/AppDelegate.h
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <Sparkle/SUUpdater.h>
|
||||||
|
#import "PyDupeGuru.h"
|
||||||
|
#import "ResultWindow.h"
|
||||||
|
#import "ResultTable.h"
|
||||||
|
#import "DetailsPanel.h"
|
||||||
|
#import "DirectoryPanel.h"
|
||||||
|
#import "IgnoreListDialog.h"
|
||||||
|
#import "ProblemDialog.h"
|
||||||
|
#import "DeletionOptions.h"
|
||||||
|
#import "HSAboutBox.h"
|
||||||
|
#import "HSRecentFiles.h"
|
||||||
|
#import "HSProgressWindow.h"
|
||||||
|
|
||||||
|
@interface AppDelegate : NSObject <NSFileManagerDelegate>
|
||||||
|
{
|
||||||
|
NSMenu *recentResultsMenu;
|
||||||
|
NSMenu *columnsMenu;
|
||||||
|
SUUpdater *updater;
|
||||||
|
|
||||||
|
PyDupeGuru *model;
|
||||||
|
ResultWindow *_resultWindow;
|
||||||
|
DirectoryPanel *_directoryPanel;
|
||||||
|
DetailsPanel *_detailsPanel;
|
||||||
|
IgnoreListDialog *_ignoreListDialog;
|
||||||
|
ProblemDialog *_problemDialog;
|
||||||
|
DeletionOptions *_deletionOptions;
|
||||||
|
HSProgressWindow *_progressWindow;
|
||||||
|
NSWindowController *_preferencesPanel;
|
||||||
|
HSAboutBox *_aboutBox;
|
||||||
|
HSRecentFiles *_recentResults;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) NSMenu *recentResultsMenu;
|
||||||
|
@property (readwrite, retain) NSMenu *columnsMenu;
|
||||||
|
@property (readwrite, retain) SUUpdater *updater;
|
||||||
|
|
||||||
|
/* Virtual */
|
||||||
|
+ (NSDictionary *)defaultPreferences;
|
||||||
|
- (PyDupeGuru *)model;
|
||||||
|
- (DetailsPanel *)createDetailsPanel;
|
||||||
|
- (void)setScanOptions;
|
||||||
|
|
||||||
|
/* Public */
|
||||||
|
- (void)finalizeInit;
|
||||||
|
- (ResultWindow *)resultWindow;
|
||||||
|
- (DirectoryPanel *)directoryPanel;
|
||||||
|
- (DetailsPanel *)detailsPanel;
|
||||||
|
- (HSRecentFiles *)recentResults;
|
||||||
|
- (NSInteger)getAppMode;
|
||||||
|
- (void)setAppMode:(NSInteger)appMode;
|
||||||
|
|
||||||
|
/* Delegate */
|
||||||
|
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification;
|
||||||
|
- (void)applicationWillBecomeActive:(NSNotification *)aNotification;
|
||||||
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender;
|
||||||
|
- (void)applicationWillTerminate:(NSNotification *)aNotification;
|
||||||
|
- (void)recentFileClicked:(NSString *)path;
|
||||||
|
|
||||||
|
/* Actions */
|
||||||
|
- (void)clearPictureCache;
|
||||||
|
- (void)loadResults;
|
||||||
|
- (void)openWebsite;
|
||||||
|
- (void)openHelp;
|
||||||
|
- (void)showAboutBox;
|
||||||
|
- (void)showDirectoryWindow;
|
||||||
|
- (void)showPreferencesPanel;
|
||||||
|
- (void)showResultWindow;
|
||||||
|
- (void)showIgnoreList;
|
||||||
|
- (void)startScanning;
|
||||||
|
|
||||||
|
/* model --> view */
|
||||||
|
- (void)showMessage:(NSString *)msg;
|
||||||
|
@end
|
||||||
402
cocoa/AppDelegate.m
Normal file
402
cocoa/AppDelegate.m
Normal file
@@ -0,0 +1,402 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
#import "ProgressController.h"
|
||||||
|
#import "HSPyUtil.h"
|
||||||
|
#import "Consts.h"
|
||||||
|
#import "Dialogs.h"
|
||||||
|
#import "Utils.h"
|
||||||
|
#import "ValueTransformers.h"
|
||||||
|
#import "DetailsPanelPicture.h"
|
||||||
|
#import "PreferencesPanelStandard_UI.h"
|
||||||
|
#import "PreferencesPanelMusic_UI.h"
|
||||||
|
#import "PreferencesPanelPicture_UI.h"
|
||||||
|
|
||||||
|
@implementation AppDelegate
|
||||||
|
|
||||||
|
@synthesize recentResultsMenu;
|
||||||
|
@synthesize columnsMenu;
|
||||||
|
@synthesize updater;
|
||||||
|
|
||||||
|
+ (NSDictionary *)defaultPreferences
|
||||||
|
{
|
||||||
|
NSMutableDictionary *d = [NSMutableDictionary dictionary];
|
||||||
|
[d setObject:i2n(1) forKey:@"scanTypeStandard"];
|
||||||
|
[d setObject:i2n(3) forKey:@"scanTypeMusic"];
|
||||||
|
[d setObject:i2n(0) forKey:@"scanTypePicture"];
|
||||||
|
[d setObject:i2n(95) forKey:@"minMatchPercentage"];
|
||||||
|
[d setObject:i2n(30) forKey:@"smallFileThreshold"];
|
||||||
|
[d setObject:b2n(YES) forKey:@"wordWeighting"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"matchSimilarWords"];
|
||||||
|
[d setObject:b2n(YES) forKey:@"ignoreSmallFiles"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"scanTagTrack"];
|
||||||
|
[d setObject:b2n(YES) forKey:@"scanTagArtist"];
|
||||||
|
[d setObject:b2n(YES) forKey:@"scanTagAlbum"];
|
||||||
|
[d setObject:b2n(YES) forKey:@"scanTagTitle"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"scanTagGenre"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"scanTagYear"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"matchScaled"];
|
||||||
|
[d setObject:i2n(1) forKey:@"recreatePathType"];
|
||||||
|
[d setObject:i2n(11) forKey:TableFontSize];
|
||||||
|
[d setObject:b2n(YES) forKey:@"mixFileKind"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"useRegexpFilter"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"ignoreHardlinkMatches"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"removeEmptyFolders"];
|
||||||
|
[d setObject:b2n(NO) forKey:@"DebugMode"];
|
||||||
|
[d setObject:@"" forKey:@"CustomCommand"];
|
||||||
|
[d setObject:[NSArray array] forKey:@"recentDirectories"];
|
||||||
|
[d setObject:[NSArray array] forKey:@"columnsOrder"];
|
||||||
|
[d setObject:[NSDictionary dictionary] forKey:@"columnsWidth"];
|
||||||
|
return d;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ (void)initialize
|
||||||
|
{
|
||||||
|
HSVTAdd *vt = [[[HSVTAdd alloc] initWithValue:4] autorelease];
|
||||||
|
[NSValueTransformer setValueTransformer:vt forName:@"vtRowHeightOffset"];
|
||||||
|
NSDictionary *d = [self defaultPreferences];
|
||||||
|
[[NSUserDefaultsController sharedUserDefaultsController] setInitialValues:d];
|
||||||
|
[[NSUserDefaults standardUserDefaults] registerDefaults:d];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id)init
|
||||||
|
{
|
||||||
|
self = [super init];
|
||||||
|
model = [[PyDupeGuru alloc] init];
|
||||||
|
[model bindCallback:createCallback(@"DupeGuruView", self)];
|
||||||
|
[self setUpdater:[SUUpdater sharedUpdater]];
|
||||||
|
NSMutableIndexSet *contentsIndexes = [NSMutableIndexSet indexSet];
|
||||||
|
[contentsIndexes addIndex:1];
|
||||||
|
[contentsIndexes addIndex:2];
|
||||||
|
VTIsIntIn *vt = [[[VTIsIntIn alloc] initWithValues:contentsIndexes reverse:YES] autorelease];
|
||||||
|
[NSValueTransformer setValueTransformer:vt forName:@"vtScanTypeIsNotContent"];
|
||||||
|
NSMutableIndexSet *i = [NSMutableIndexSet indexSetWithIndex:0];
|
||||||
|
VTIsIntIn *vtScanTypeIsFuzzy = [[[VTIsIntIn alloc] initWithValues:i reverse:NO] autorelease];
|
||||||
|
[NSValueTransformer setValueTransformer:vtScanTypeIsFuzzy forName:@"vtScanTypeIsFuzzy"];
|
||||||
|
i = [NSMutableIndexSet indexSetWithIndex:4];
|
||||||
|
VTIsIntIn *vtScanTypeIsNotContent = [[[VTIsIntIn alloc] initWithValues:i reverse:YES] autorelease];
|
||||||
|
[NSValueTransformer setValueTransformer:vtScanTypeIsNotContent forName:@"vtScanTypeMusicIsNotContent"];
|
||||||
|
VTIsIntIn *vtScanTypeIsTag = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:3] reverse:NO] autorelease];
|
||||||
|
[NSValueTransformer setValueTransformer:vtScanTypeIsTag forName:@"vtScanTypeIsTag"];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)finalizeInit
|
||||||
|
{
|
||||||
|
// We can only finalize initialization once the main menu has been created, which cannot happen
|
||||||
|
// before AppDelegate is created.
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
/* Because the pref pane is lazily loaded, we have to manually do the update check if the
|
||||||
|
preference is set.
|
||||||
|
*/
|
||||||
|
if ([ud boolForKey:@"SUEnableAutomaticChecks"]) {
|
||||||
|
[[SUUpdater sharedUpdater] checkForUpdatesInBackground];
|
||||||
|
}
|
||||||
|
_recentResults = [[HSRecentFiles alloc] initWithName:@"recentResults" menu:recentResultsMenu];
|
||||||
|
[_recentResults setDelegate:self];
|
||||||
|
_directoryPanel = [[DirectoryPanel alloc] initWithParentApp:self];
|
||||||
|
_ignoreListDialog = [[IgnoreListDialog alloc] initWithPyRef:[model ignoreListDialog]];
|
||||||
|
_problemDialog = [[ProblemDialog alloc] initWithPyRef:[model problemDialog]];
|
||||||
|
_deletionOptions = [[DeletionOptions alloc] initWithPyRef:[model deletionOptions]];
|
||||||
|
_progressWindow = [[HSProgressWindow alloc] initWithPyRef:[[self model] progressWindow] view:nil];
|
||||||
|
[_progressWindow setParentWindow:[_directoryPanel window]];
|
||||||
|
// Lazily loaded
|
||||||
|
_aboutBox = nil;
|
||||||
|
_preferencesPanel = nil;
|
||||||
|
_resultWindow = nil;
|
||||||
|
_detailsPanel = nil;
|
||||||
|
[[[self directoryPanel] window] makeKeyAndOrderFront:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Virtual */
|
||||||
|
|
||||||
|
- (PyDupeGuru *)model
|
||||||
|
{
|
||||||
|
return model;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (DetailsPanel *)createDetailsPanel
|
||||||
|
{
|
||||||
|
NSInteger appMode = [self getAppMode];
|
||||||
|
if (appMode == AppModePicture) {
|
||||||
|
return [[DetailsPanelPicture alloc] initWithApp:model];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return [[DetailsPanel alloc] initWithPyRef:[model detailsPanel]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setScanOptions
|
||||||
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
NSString *scanTypeOptionName;
|
||||||
|
NSInteger appMode = [self getAppMode];
|
||||||
|
if (appMode == AppModePicture) {
|
||||||
|
scanTypeOptionName = @"scanTypePicture";
|
||||||
|
}
|
||||||
|
else if (appMode == AppModeMusic) {
|
||||||
|
scanTypeOptionName = @"scanTypeMusic";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
scanTypeOptionName = @"scanTypeStandard";
|
||||||
|
}
|
||||||
|
[model setScanType:n2i([ud objectForKey:scanTypeOptionName])];
|
||||||
|
[model setMinMatchPercentage:n2i([ud objectForKey:@"minMatchPercentage"])];
|
||||||
|
[model setWordWeighting:n2b([ud objectForKey:@"wordWeighting"])];
|
||||||
|
[model setMixFileKind:n2b([ud objectForKey:@"mixFileKind"])];
|
||||||
|
[model setIgnoreHardlinkMatches:n2b([ud objectForKey:@"ignoreHardlinkMatches"])];
|
||||||
|
[model setMatchSimilarWords:n2b([ud objectForKey:@"matchSimilarWords"])];
|
||||||
|
int smallFileThreshold = [ud integerForKey:@"smallFileThreshold"]; // In KB
|
||||||
|
int sizeThreshold = [ud boolForKey:@"ignoreSmallFiles"] ? smallFileThreshold * 1024 : 0; // The py side wants bytes
|
||||||
|
[model setSizeThreshold:sizeThreshold];
|
||||||
|
[model enable:n2b([ud objectForKey:@"scanTagTrack"]) scanForTag:@"track"];
|
||||||
|
[model enable:n2b([ud objectForKey:@"scanTagArtist"]) scanForTag:@"artist"];
|
||||||
|
[model enable:n2b([ud objectForKey:@"scanTagAlbum"]) scanForTag:@"album"];
|
||||||
|
[model enable:n2b([ud objectForKey:@"scanTagTitle"]) scanForTag:@"title"];
|
||||||
|
[model enable:n2b([ud objectForKey:@"scanTagGenre"]) scanForTag:@"genre"];
|
||||||
|
[model enable:n2b([ud objectForKey:@"scanTagYear"]) scanForTag:@"year"];
|
||||||
|
[model setMatchScaled:n2b([ud objectForKey:@"matchScaled"])];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Public */
|
||||||
|
- (ResultWindow *)resultWindow
|
||||||
|
{
|
||||||
|
return _resultWindow;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (DirectoryPanel *)directoryPanel
|
||||||
|
{
|
||||||
|
return _directoryPanel;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (DetailsPanel *)detailsPanel
|
||||||
|
{
|
||||||
|
return _detailsPanel;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (HSRecentFiles *)recentResults
|
||||||
|
{
|
||||||
|
return _recentResults;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSInteger)getAppMode
|
||||||
|
{
|
||||||
|
return [model getAppMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setAppMode:(NSInteger)appMode
|
||||||
|
{
|
||||||
|
[model setAppMode:appMode];
|
||||||
|
if (_preferencesPanel != nil) {
|
||||||
|
[_preferencesPanel release];
|
||||||
|
_preferencesPanel = nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Actions */
|
||||||
|
- (void)clearPictureCache
|
||||||
|
{
|
||||||
|
NSString *msg = NSLocalizedString(@"Do you really want to remove all your cached picture analysis?", @"");
|
||||||
|
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
|
||||||
|
return;
|
||||||
|
[model clearPictureCache];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)loadResults
|
||||||
|
{
|
||||||
|
NSOpenPanel *op = [NSOpenPanel openPanel];
|
||||||
|
[op setCanChooseFiles:YES];
|
||||||
|
[op setCanChooseDirectories:NO];
|
||||||
|
[op setCanCreateDirectories:NO];
|
||||||
|
[op setAllowsMultipleSelection:NO];
|
||||||
|
[op setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
||||||
|
[op setTitle:NSLocalizedString(@"Select a results file to load", @"")];
|
||||||
|
if ([op runModal] == NSOKButton) {
|
||||||
|
NSString *filename = [[[op URLs] objectAtIndex:0] path];
|
||||||
|
[model loadResultsFrom:filename];
|
||||||
|
[[self recentResults] addFile:filename];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)openWebsite
|
||||||
|
{
|
||||||
|
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.hardcoded.net/dupeguru/"]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)openHelp
|
||||||
|
{
|
||||||
|
NSBundle *b = [NSBundle mainBundle];
|
||||||
|
NSString *p = [b pathForResource:@"index" ofType:@"html" inDirectory:@"help"];
|
||||||
|
NSURL *u = [NSURL fileURLWithPath:p];
|
||||||
|
[[NSWorkspace sharedWorkspace] openURL:u];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showAboutBox
|
||||||
|
{
|
||||||
|
if (_aboutBox == nil) {
|
||||||
|
_aboutBox = [[HSAboutBox alloc] initWithApp:model];
|
||||||
|
}
|
||||||
|
[[_aboutBox window] makeKeyAndOrderFront:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showDirectoryWindow
|
||||||
|
{
|
||||||
|
[[[self directoryPanel] window] makeKeyAndOrderFront:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showPreferencesPanel
|
||||||
|
{
|
||||||
|
if (_preferencesPanel == nil) {
|
||||||
|
NSWindow *window;
|
||||||
|
NSInteger appMode = [model getAppMode];
|
||||||
|
if (appMode == AppModePicture) {
|
||||||
|
window = createPreferencesPanelPicture_UI(nil);
|
||||||
|
}
|
||||||
|
else if (appMode == AppModeMusic) {
|
||||||
|
window = createPreferencesPanelMusic_UI(nil);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
window = createPreferencesPanelStandard_UI(nil);
|
||||||
|
}
|
||||||
|
_preferencesPanel = [[NSWindowController alloc] initWithWindow:window];
|
||||||
|
}
|
||||||
|
[_preferencesPanel showWindow:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showResultWindow
|
||||||
|
{
|
||||||
|
[[[self resultWindow] window] makeKeyAndOrderFront:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showIgnoreList
|
||||||
|
{
|
||||||
|
[model showIgnoreList];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)startScanning
|
||||||
|
{
|
||||||
|
[[self directoryPanel] startDuplicateScan];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Delegate */
|
||||||
|
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
[model loadSession];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
if (![[[self directoryPanel] window] isVisible]) {
|
||||||
|
[[self directoryPanel] showWindow:NSApp];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender
|
||||||
|
{
|
||||||
|
if ([model resultsAreModified]) {
|
||||||
|
NSString *msg = NSLocalizedString(@"You have unsaved results, do you really want to quit?", @"");
|
||||||
|
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) { // NO
|
||||||
|
return NSTerminateCancel;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NSTerminateNow;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)applicationWillTerminate:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
NSInteger sc = [ud integerForKey:@"sessionCountSinceLastIgnorePurge"];
|
||||||
|
if (sc >= 10) {
|
||||||
|
sc = -1;
|
||||||
|
[model purgeIgnoreList];
|
||||||
|
}
|
||||||
|
sc++;
|
||||||
|
[model saveSession];
|
||||||
|
[ud setInteger:sc forKey:@"sessionCountSinceLastIgnorePurge"];
|
||||||
|
// NSApplication does not release nib instances objects, we must do it manually
|
||||||
|
// Well, it isn't needed because the memory is freed anyway (we are quitting the application
|
||||||
|
// But I need to release HSRecentFiles so it saves the user defaults
|
||||||
|
[_directoryPanel release];
|
||||||
|
[_recentResults release];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)recentFileClicked:(NSString *)path
|
||||||
|
{
|
||||||
|
[model loadResultsFrom:path];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* model --> view */
|
||||||
|
- (void)showMessage:(NSString *)msg
|
||||||
|
{
|
||||||
|
[Dialogs showMessage:msg];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)askYesNoWithPrompt:(NSString *)prompt
|
||||||
|
{
|
||||||
|
return [Dialogs askYesNo:prompt] == NSAlertFirstButtonReturn;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)createResultsWindow
|
||||||
|
{
|
||||||
|
if (_resultWindow != nil) {
|
||||||
|
[_resultWindow release];
|
||||||
|
}
|
||||||
|
if (_detailsPanel != nil) {
|
||||||
|
[_detailsPanel release];
|
||||||
|
}
|
||||||
|
// Warning: creation order is important
|
||||||
|
// If the details panel is not created first and that there are some results in the model
|
||||||
|
// (happens if we load results), a dupe selection event triggers a details refresh in the
|
||||||
|
// core before we have the chance to initialize it, and then we crash.
|
||||||
|
_detailsPanel = [self createDetailsPanel];
|
||||||
|
_resultWindow = [[ResultWindow alloc] initWithParentApp:self];
|
||||||
|
}
|
||||||
|
- (void)showResultsWindow
|
||||||
|
{
|
||||||
|
[[[self resultWindow] window] makeKeyAndOrderFront:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)showProblemDialog
|
||||||
|
{
|
||||||
|
[_problemDialog showWindow:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)selectDestFolderWithPrompt:(NSString *)prompt
|
||||||
|
{
|
||||||
|
NSOpenPanel *op = [NSOpenPanel openPanel];
|
||||||
|
[op setCanChooseFiles:NO];
|
||||||
|
[op setCanChooseDirectories:YES];
|
||||||
|
[op setCanCreateDirectories:YES];
|
||||||
|
[op setAllowsMultipleSelection:NO];
|
||||||
|
[op setTitle:prompt];
|
||||||
|
if ([op runModal] == NSOKButton) {
|
||||||
|
return [[[op URLs] objectAtIndex:0] path];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSString *)selectDestFileWithPrompt:(NSString *)prompt extension:(NSString *)extension
|
||||||
|
{
|
||||||
|
NSSavePanel *sp = [NSSavePanel savePanel];
|
||||||
|
[sp setCanCreateDirectories:YES];
|
||||||
|
[sp setAllowedFileTypes:[NSArray arrayWithObject:extension]];
|
||||||
|
[sp setTitle:prompt];
|
||||||
|
if ([sp runModal] == NSOKButton) {
|
||||||
|
return [[sp URL] path];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return nil;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
24
cocoa/Consts.h
Normal file
24
cocoa/Consts.h
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#define JobStarted @"JobStarted"
|
||||||
|
#define JobInProgress @"JobInProgress"
|
||||||
|
#define TableFontSize @"TableFontSize"
|
||||||
|
|
||||||
|
#define jobLoad @"job_load"
|
||||||
|
#define jobScan @"job_scan"
|
||||||
|
#define jobCopy @"job_copy"
|
||||||
|
#define jobMove @"job_move"
|
||||||
|
#define jobDelete @"job_delete"
|
||||||
|
|
||||||
|
#define DGPrioritizeIndexPasteboardType @"DGPrioritizeIndexPasteboardType"
|
||||||
|
#define ImageLoadedNotification @"ImageLoadedNotification"
|
||||||
|
|
||||||
|
#define AppModeStandard 0
|
||||||
|
#define AppModeMusic 1
|
||||||
|
#define AppModePicture 2
|
||||||
33
cocoa/DeletionOptions.h
Normal file
33
cocoa/DeletionOptions.h
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "PyDeletionOptions.h"
|
||||||
|
|
||||||
|
@interface DeletionOptions : NSWindowController
|
||||||
|
{
|
||||||
|
|
||||||
|
PyDeletionOptions *model;
|
||||||
|
|
||||||
|
NSTextField *messageTextField;
|
||||||
|
NSButton *linkButton;
|
||||||
|
NSMatrix *linkTypeRadio;
|
||||||
|
NSButton *directButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) NSTextField *messageTextField;
|
||||||
|
@property (readwrite, retain) NSButton *linkButton;
|
||||||
|
@property (readwrite, retain) NSMatrix *linkTypeRadio;
|
||||||
|
@property (readwrite, retain) NSButton *directButton;
|
||||||
|
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef;
|
||||||
|
|
||||||
|
- (void)updateOptions;
|
||||||
|
- (void)proceed;
|
||||||
|
- (void)cancel;
|
||||||
|
@end
|
||||||
72
cocoa/DeletionOptions.m
Normal file
72
cocoa/DeletionOptions.m
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "DeletionOptions.h"
|
||||||
|
#import "DeletionOptions_UI.h"
|
||||||
|
#import "HSPyUtil.h"
|
||||||
|
|
||||||
|
@implementation DeletionOptions
|
||||||
|
|
||||||
|
@synthesize messageTextField;
|
||||||
|
@synthesize linkButton;
|
||||||
|
@synthesize linkTypeRadio;
|
||||||
|
@synthesize directButton;
|
||||||
|
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef
|
||||||
|
{
|
||||||
|
self = [super initWithWindow:nil];
|
||||||
|
model = [[PyDeletionOptions alloc] initWithModel:aPyRef];
|
||||||
|
[self setWindow:createDeletionOptions_UI(self)];
|
||||||
|
[model bindCallback:createCallback(@"DeletionOptionsView", self)];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[model release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateOptions
|
||||||
|
{
|
||||||
|
[model setLinkDeleted:[linkButton state] == NSOnState];
|
||||||
|
[model setUseHardlinks:[linkTypeRadio selectedColumn] == 1];
|
||||||
|
[model setDirect:[directButton state] == NSOnState];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)proceed
|
||||||
|
{
|
||||||
|
[NSApp stopModalWithCode:NSOKButton];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)cancel
|
||||||
|
{
|
||||||
|
[NSApp stopModalWithCode:NSCancelButton];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* model --> view */
|
||||||
|
- (void)updateMsg:(NSString *)msg
|
||||||
|
{
|
||||||
|
[messageTextField setStringValue:msg];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)show
|
||||||
|
{
|
||||||
|
[linkButton setState:NSOffState];
|
||||||
|
[directButton setState:NSOffState];
|
||||||
|
[linkTypeRadio selectCellAtRow:0 column:0];
|
||||||
|
NSInteger r = [NSApp runModalForWindow:[self window]];
|
||||||
|
[[self window] close];
|
||||||
|
return r == NSOKButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setHardlinkOptionEnabled:(BOOL)enabled
|
||||||
|
{
|
||||||
|
[linkTypeRadio setEnabled:enabled];
|
||||||
|
}
|
||||||
|
@end
|
||||||
31
cocoa/DetailsPanel.h
Normal file
31
cocoa/DetailsPanel.h
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <Python.h>
|
||||||
|
#import "PyDetailsPanel.h"
|
||||||
|
|
||||||
|
@interface DetailsPanel : NSWindowController <NSTableViewDataSource>
|
||||||
|
{
|
||||||
|
NSTableView *detailsTable;
|
||||||
|
|
||||||
|
PyDetailsPanel *model;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) NSTableView *detailsTable;
|
||||||
|
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef;
|
||||||
|
- (PyDetailsPanel *)model;
|
||||||
|
|
||||||
|
- (NSWindow *)createWindow;
|
||||||
|
- (BOOL)isVisible;
|
||||||
|
- (void)toggleVisibility;
|
||||||
|
|
||||||
|
/* Python --> Cocoa */
|
||||||
|
- (void)refresh;
|
||||||
|
@end
|
||||||
81
cocoa/DetailsPanel.m
Normal file
81
cocoa/DetailsPanel.m
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "DetailsPanel.h"
|
||||||
|
#import "HSPyUtil.h"
|
||||||
|
#import "DetailsPanel_UI.h"
|
||||||
|
|
||||||
|
@implementation DetailsPanel
|
||||||
|
|
||||||
|
@synthesize detailsTable;
|
||||||
|
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef
|
||||||
|
{
|
||||||
|
self = [super initWithWindow:nil];
|
||||||
|
[self setWindow:[self createWindow]];
|
||||||
|
model = [[PyDetailsPanel alloc] initWithModel:aPyRef];
|
||||||
|
[model bindCallback:createCallback(@"DetailsPanelView", self)];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[model release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (PyDetailsPanel *)model
|
||||||
|
{
|
||||||
|
return (PyDetailsPanel *)model;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSWindow *)createWindow
|
||||||
|
{
|
||||||
|
return createDetailsPanel_UI(self);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)refreshDetails
|
||||||
|
{
|
||||||
|
[detailsTable reloadData];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)isVisible
|
||||||
|
{
|
||||||
|
return [[self window] isVisible];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)toggleVisibility
|
||||||
|
{
|
||||||
|
if ([self isVisible]) {
|
||||||
|
[[self window] close];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[self refreshDetails]; // selection might have changed since last time
|
||||||
|
[[self window] orderFront:nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* NSTableView Delegate */
|
||||||
|
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
|
||||||
|
{
|
||||||
|
return [[self model] numberOfRows];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)column row:(NSInteger)row
|
||||||
|
{
|
||||||
|
return [[self model] valueForColumn:[column identifier] row:row];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Python --> Cocoa */
|
||||||
|
- (void)refresh
|
||||||
|
{
|
||||||
|
if ([[self window] isVisible]) {
|
||||||
|
[self refreshDetails];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@end
|
||||||
32
cocoa/DetailsPanelPicture.h
Normal file
32
cocoa/DetailsPanelPicture.h
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "DetailsPanel.h"
|
||||||
|
#import "PyDupeGuru.h"
|
||||||
|
|
||||||
|
@interface DetailsPanelPicture : DetailsPanel
|
||||||
|
{
|
||||||
|
NSImageView *dupeImage;
|
||||||
|
NSProgressIndicator *dupeProgressIndicator;
|
||||||
|
NSImageView *refImage;
|
||||||
|
NSProgressIndicator *refProgressIndicator;
|
||||||
|
|
||||||
|
PyDupeGuru *pyApp;
|
||||||
|
BOOL _needsRefresh;
|
||||||
|
NSString *_dupePath;
|
||||||
|
NSString *_refPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) NSImageView *dupeImage;
|
||||||
|
@property (readwrite, retain) NSProgressIndicator *dupeProgressIndicator;
|
||||||
|
@property (readwrite, retain) NSImageView *refImage;
|
||||||
|
@property (readwrite, retain) NSProgressIndicator *refProgressIndicator;
|
||||||
|
|
||||||
|
- (id)initWithApp:(PyDupeGuru *)aApp;
|
||||||
|
@end
|
||||||
@@ -1,28 +1,40 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
which should be included with this package. The terms are also available at
|
which should be included with this package. The terms are also available at
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "Utils.h"
|
#import "Utils.h"
|
||||||
#import "NSNotificationAdditions.h"
|
#import "NSNotificationAdditions.h"
|
||||||
#import "NSImageAdditions.h"
|
#import "NSImageAdditions.h"
|
||||||
#import "PyDupeGuru.h"
|
#import "PyDupeGuru.h"
|
||||||
#import "DetailsPanel.h"
|
#import "DetailsPanelPicture.h"
|
||||||
#import "Consts.h"
|
#import "Consts.h"
|
||||||
|
#import "DetailsPanelPicture_UI.h"
|
||||||
|
|
||||||
@implementation DetailsPanelPE
|
@implementation DetailsPanelPicture
|
||||||
- (id)initWithPy:(PyApp *)aPy
|
|
||||||
|
@synthesize dupeImage;
|
||||||
|
@synthesize dupeProgressIndicator;
|
||||||
|
@synthesize refImage;
|
||||||
|
@synthesize refProgressIndicator;
|
||||||
|
|
||||||
|
- (id)initWithApp:(PyDupeGuru *)aApp
|
||||||
{
|
{
|
||||||
self = [super initWithPy:aPy];
|
self = [super initWithPyRef:[aApp detailsPanel]];
|
||||||
pyApp = aPy;
|
pyApp = aApp;
|
||||||
_needsRefresh = YES;
|
_needsRefresh = YES;
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(imageLoaded:) name:ImageLoadedNotification object:self];
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(imageLoaded:) name:ImageLoadedNotification object:self];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (NSWindow *)createWindow
|
||||||
|
{
|
||||||
|
return createDetailsPanelPicture_UI(self);
|
||||||
|
}
|
||||||
|
|
||||||
- (void)loadImageAsync:(NSString *)imagePath
|
- (void)loadImageAsync:(NSString *)imagePath
|
||||||
{
|
{
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
@@ -42,12 +54,12 @@ http://www.hardcoded.net/licenses/hs_license
|
|||||||
return;
|
return;
|
||||||
[detailsTable reloadData];
|
[detailsTable reloadData];
|
||||||
|
|
||||||
NSString *refPath = [(PyDupeGuru *)pyApp getSelectedDupeRefPath];
|
NSString *refPath = [pyApp getSelectedDupeRefPath];
|
||||||
if (_refPath != nil)
|
if (_refPath != nil)
|
||||||
[_refPath autorelease];
|
[_refPath autorelease];
|
||||||
_refPath = [refPath retain];
|
_refPath = [refPath retain];
|
||||||
[NSThread detachNewThreadSelector:@selector(loadImageAsync:) toTarget:self withObject:refPath];
|
[NSThread detachNewThreadSelector:@selector(loadImageAsync:) toTarget:self withObject:refPath];
|
||||||
NSString *dupePath = [(PyDupeGuru *)pyApp getSelectedDupePath];
|
NSString *dupePath = [pyApp getSelectedDupePath];
|
||||||
if (_dupePath != nil)
|
if (_dupePath != nil)
|
||||||
[_dupePath autorelease];
|
[_dupePath autorelease];
|
||||||
_dupePath = [dupePath retain];
|
_dupePath = [dupePath retain];
|
||||||
21
cocoa/DirectoryOutline.h
Normal file
21
cocoa/DirectoryOutline.h
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <Python.h>
|
||||||
|
#import "HSOutline.h"
|
||||||
|
#import "PyDirectoryOutline.h"
|
||||||
|
|
||||||
|
#define DGAddedFoldersNotification @"DGAddedFoldersNotification"
|
||||||
|
|
||||||
|
@interface DirectoryOutline : HSOutline {}
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef outlineView:(HSOutlineView *)aOutlineView;
|
||||||
|
- (PyDirectoryOutline *)model;
|
||||||
|
|
||||||
|
- (void)selectAll;
|
||||||
|
@end;
|
||||||
@@ -1,31 +1,31 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
which should be included with this package. The terms are also available at
|
which should be included with this package. The terms are also available at
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#import "DirectoryOutline.h"
|
#import "DirectoryOutline.h"
|
||||||
|
|
||||||
@implementation DirectoryOutline
|
@implementation DirectoryOutline
|
||||||
- (id)initWithPyParent:(id)aPyParent view:(HSOutlineView *)aOutlineView
|
- (id)initWithPyRef:(PyObject *)aPyRef outlineView:(HSOutlineView *)aOutlineView
|
||||||
{
|
{
|
||||||
self = [super initWithPyClassName:@"PyDirectoryOutline" pyParent:aPyParent view:aOutlineView];
|
self = [super initWithPyRef:aPyRef wrapperClass:[PyDirectoryOutline class]
|
||||||
[outlineView registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
|
callbackClassName:@"DirectoryOutlineView" view:aOutlineView];
|
||||||
[self connect];
|
[[self view] registerForDraggedTypes:[NSArray arrayWithObject:NSFilenamesPboardType]];
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)dealloc
|
- (PyDirectoryOutline *)model
|
||||||
{
|
{
|
||||||
[self disconnect];
|
return (PyDirectoryOutline *)model;
|
||||||
[super dealloc];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (PyDirectoryOutline *)py
|
/* Public */
|
||||||
|
- (void)selectAll
|
||||||
{
|
{
|
||||||
return (PyDirectoryOutline *)py;
|
[[self model] selectAll];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Delegate */
|
/* Delegate */
|
||||||
@@ -49,12 +49,15 @@ http://www.hardcoded.net/licenses/hs_license
|
|||||||
sourceDragMask = [info draggingSourceOperationMask];
|
sourceDragMask = [info draggingSourceOperationMask];
|
||||||
pboard = [info draggingPasteboard];
|
pboard = [info draggingPasteboard];
|
||||||
if ([[pboard types] containsObject:NSFilenamesPboardType]) {
|
if ([[pboard types] containsObject:NSFilenamesPboardType]) {
|
||||||
NSArray *filenames = [pboard propertyListForType:NSFilenamesPboardType];
|
NSArray *foldernames = [pboard propertyListForType:NSFilenamesPboardType];
|
||||||
if (!(sourceDragMask & NSDragOperationLink))
|
if (!(sourceDragMask & NSDragOperationLink))
|
||||||
return NO;
|
return NO;
|
||||||
for (NSString *filename in filenames) {
|
for (NSString *foldername in foldernames) {
|
||||||
[[self py] addDirectory:filename];
|
[[self model] addDirectory:foldername];
|
||||||
}
|
}
|
||||||
|
NSDictionary *userInfo = [NSDictionary dictionaryWithObject:foldernames forKey:@"foldernames"];
|
||||||
|
[[NSNotificationCenter defaultCenter] postNotificationName:DGAddedFoldersNotification
|
||||||
|
object:self userInfo:userInfo];
|
||||||
}
|
}
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
@@ -64,7 +67,7 @@ http://www.hardcoded.net/licenses/hs_license
|
|||||||
if ([cell isKindOfClass:[NSTextFieldCell class]]) {
|
if ([cell isKindOfClass:[NSTextFieldCell class]]) {
|
||||||
NSTextFieldCell *textCell = cell;
|
NSTextFieldCell *textCell = cell;
|
||||||
NSIndexPath *path = item;
|
NSIndexPath *path = item;
|
||||||
BOOL selected = [path isEqualTo:[outlineView selectedPath]];
|
BOOL selected = [path isEqualTo:[[self view] selectedPath]];
|
||||||
if (selected) {
|
if (selected) {
|
||||||
[textCell setTextColor:[NSColor blackColor]];
|
[textCell setTextColor:[NSColor blackColor]];
|
||||||
return;
|
return;
|
||||||
57
cocoa/DirectoryPanel.h
Normal file
57
cocoa/DirectoryPanel.h
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "HSOutlineView.h"
|
||||||
|
#import "HSRecentFiles.h"
|
||||||
|
#import "DirectoryOutline.h"
|
||||||
|
#import "PyDupeGuru.h"
|
||||||
|
|
||||||
|
@class AppDelegate;
|
||||||
|
|
||||||
|
@interface DirectoryPanel : NSWindowController <NSOpenSavePanelDelegate>
|
||||||
|
{
|
||||||
|
AppDelegate *_app;
|
||||||
|
PyDupeGuru *model;
|
||||||
|
HSRecentFiles *_recentDirectories;
|
||||||
|
DirectoryOutline *outline;
|
||||||
|
BOOL _alwaysShowPopUp;
|
||||||
|
NSSegmentedControl *appModeSelector;
|
||||||
|
NSPopUpButton *scanTypePopup;
|
||||||
|
NSPopUpButton *addButtonPopUp;
|
||||||
|
NSPopUpButton *loadRecentButtonPopUp;
|
||||||
|
HSOutlineView *outlineView;
|
||||||
|
NSButton *removeButton;
|
||||||
|
NSButton *loadResultsButton;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) NSSegmentedControl *appModeSelector;
|
||||||
|
@property (readwrite, retain) NSPopUpButton *scanTypePopup;
|
||||||
|
@property (readwrite, retain) NSPopUpButton *addButtonPopUp;
|
||||||
|
@property (readwrite, retain) NSPopUpButton *loadRecentButtonPopUp;
|
||||||
|
@property (readwrite, retain) HSOutlineView *outlineView;
|
||||||
|
@property (readwrite, retain) NSButton *removeButton;
|
||||||
|
@property (readwrite, retain) NSButton *loadResultsButton;
|
||||||
|
|
||||||
|
- (id)initWithParentApp:(AppDelegate *)aParentApp;
|
||||||
|
|
||||||
|
- (void)fillPopUpMenu;
|
||||||
|
- (void)fillScanTypeMenu;
|
||||||
|
- (void)adjustUIToLocalization;
|
||||||
|
|
||||||
|
- (void)askForDirectory;
|
||||||
|
- (void)popupAddDirectoryMenu:(id)sender;
|
||||||
|
- (void)popupLoadRecentMenu:(id)sender;
|
||||||
|
- (void)removeSelectedDirectory;
|
||||||
|
- (void)startDuplicateScan;
|
||||||
|
|
||||||
|
- (void)addDirectory:(NSString *)directory;
|
||||||
|
- (void)refreshRemoveButtonText;
|
||||||
|
- (void)markAll;
|
||||||
|
|
||||||
|
@end
|
||||||
256
cocoa/DirectoryPanel.m
Normal file
256
cocoa/DirectoryPanel.m
Normal file
@@ -0,0 +1,256 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "DirectoryPanel.h"
|
||||||
|
#import "DirectoryPanel_UI.h"
|
||||||
|
#import "Dialogs.h"
|
||||||
|
#import "Utils.h"
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
#import "Consts.h"
|
||||||
|
|
||||||
|
@implementation DirectoryPanel
|
||||||
|
|
||||||
|
@synthesize appModeSelector;
|
||||||
|
@synthesize scanTypePopup;
|
||||||
|
@synthesize addButtonPopUp;
|
||||||
|
@synthesize loadRecentButtonPopUp;
|
||||||
|
@synthesize outlineView;
|
||||||
|
@synthesize removeButton;
|
||||||
|
@synthesize loadResultsButton;
|
||||||
|
|
||||||
|
- (id)initWithParentApp:(AppDelegate *)aParentApp
|
||||||
|
{
|
||||||
|
self = [super initWithWindow:nil];
|
||||||
|
[self setWindow:createDirectoryPanel_UI(self)];
|
||||||
|
_app = aParentApp;
|
||||||
|
model = [_app model];
|
||||||
|
[[self window] setTitle:[model appName]];
|
||||||
|
self.appModeSelector.selectedSegment = 0;
|
||||||
|
[self fillScanTypeMenu];
|
||||||
|
_alwaysShowPopUp = NO;
|
||||||
|
[self fillPopUpMenu];
|
||||||
|
_recentDirectories = [[HSRecentFiles alloc] initWithName:@"recentDirectories" menu:[addButtonPopUp menu]];
|
||||||
|
[_recentDirectories setDelegate:self];
|
||||||
|
outline = [[DirectoryOutline alloc] initWithPyRef:[model directoryTree] outlineView:outlineView];
|
||||||
|
[self refreshRemoveButtonText];
|
||||||
|
[self adjustUIToLocalization];
|
||||||
|
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(directorySelectionChanged:)
|
||||||
|
name:NSOutlineViewSelectionDidChangeNotification object:outlineView];
|
||||||
|
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(outlineAddedFolders:)
|
||||||
|
name:DGAddedFoldersNotification object:outline];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[outline release];
|
||||||
|
[_recentDirectories release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Private */
|
||||||
|
|
||||||
|
- (void)fillPopUpMenu
|
||||||
|
{
|
||||||
|
NSMenu *m = [addButtonPopUp menu];
|
||||||
|
NSMenuItem *mi = [m addItemWithTitle:NSLocalizedString(@"Add New Folder...", @"") action:@selector(askForDirectory) keyEquivalent:@""];
|
||||||
|
[mi setTarget:self];
|
||||||
|
[m addItem:[NSMenuItem separatorItem]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)fillScanTypeMenu
|
||||||
|
{
|
||||||
|
[[self scanTypePopup] unbind:@"selectedIndex"];
|
||||||
|
[[self scanTypePopup] removeAllItems];
|
||||||
|
[[self scanTypePopup] addItemsWithTitles:[[_app model] getScanOptions]];
|
||||||
|
NSString *keypath;
|
||||||
|
NSInteger appMode = [_app getAppMode];
|
||||||
|
if (appMode == AppModePicture) {
|
||||||
|
keypath = @"values.scanTypePicture";
|
||||||
|
}
|
||||||
|
else if (appMode == AppModeMusic) {
|
||||||
|
keypath = @"values.scanTypeMusic";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
keypath = @"values.scanTypeStandard";
|
||||||
|
}
|
||||||
|
[[self scanTypePopup] bind:@"selectedIndex" toObject:[NSUserDefaultsController sharedUserDefaultsController] withKeyPath:keypath options:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)adjustUIToLocalization
|
||||||
|
{
|
||||||
|
NSString *lang = [[NSBundle preferredLocalizationsFromArray:[[NSBundle mainBundle] localizations]] objectAtIndex:0];
|
||||||
|
NSInteger loadResultsWidthDelta = 0;
|
||||||
|
if ([lang isEqual:@"ru"]) {
|
||||||
|
loadResultsWidthDelta = 50;
|
||||||
|
}
|
||||||
|
else if ([lang isEqual:@"uk"]) {
|
||||||
|
loadResultsWidthDelta = 70;
|
||||||
|
}
|
||||||
|
else if ([lang isEqual:@"hy"]) {
|
||||||
|
loadResultsWidthDelta = 30;
|
||||||
|
}
|
||||||
|
if (loadResultsWidthDelta) {
|
||||||
|
NSRect r = [loadResultsButton frame];
|
||||||
|
r.size.width += loadResultsWidthDelta;
|
||||||
|
r.origin.x -= loadResultsWidthDelta;
|
||||||
|
[loadResultsButton setFrame:r];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Actions */
|
||||||
|
|
||||||
|
- (void)askForDirectory
|
||||||
|
{
|
||||||
|
NSOpenPanel *op = [NSOpenPanel openPanel];
|
||||||
|
[op setCanChooseFiles:YES];
|
||||||
|
[op setCanChooseDirectories:YES];
|
||||||
|
[op setAllowsMultipleSelection:YES];
|
||||||
|
[op setTitle:NSLocalizedString(@"Select a folder to add to the scanning list", @"")];
|
||||||
|
[op setDelegate:self];
|
||||||
|
if ([op runModal] == NSOKButton) {
|
||||||
|
for (NSURL *directoryURL in [op URLs]) {
|
||||||
|
[self addDirectory:[directoryURL path]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)changeAppMode:(id)sender
|
||||||
|
{
|
||||||
|
NSInteger appMode;
|
||||||
|
NSUInteger selectedSegment = self.appModeSelector.selectedSegment;
|
||||||
|
if (selectedSegment == 2) {
|
||||||
|
appMode = AppModePicture;
|
||||||
|
}
|
||||||
|
else if (selectedSegment == 1) {
|
||||||
|
appMode = AppModeMusic;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
appMode = AppModeStandard;
|
||||||
|
}
|
||||||
|
[_app setAppMode:appMode];
|
||||||
|
[self fillScanTypeMenu];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)popupAddDirectoryMenu:(id)sender
|
||||||
|
{
|
||||||
|
if ((!_alwaysShowPopUp) && ([[_recentDirectories filepaths] count] == 0)) {
|
||||||
|
[self askForDirectory];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[addButtonPopUp selectItem:nil];
|
||||||
|
[[addButtonPopUp cell] performClickWithFrame:[sender frame] inView:[sender superview]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)popupLoadRecentMenu:(id)sender
|
||||||
|
{
|
||||||
|
if ([[[_app recentResults] filepaths] count] > 0) {
|
||||||
|
NSMenu *m = [loadRecentButtonPopUp menu];
|
||||||
|
while ([m numberOfItems] > 0) {
|
||||||
|
[m removeItemAtIndex:0];
|
||||||
|
}
|
||||||
|
NSMenuItem *mi = [m addItemWithTitle:NSLocalizedString(@"Load from file...", @"") action:@selector(loadResults) keyEquivalent:@""];
|
||||||
|
[mi setTarget:_app];
|
||||||
|
[m addItem:[NSMenuItem separatorItem]];
|
||||||
|
[[_app recentResults] fillMenu:m];
|
||||||
|
[loadRecentButtonPopUp selectItem:nil];
|
||||||
|
[[loadRecentButtonPopUp cell] performClickWithFrame:[sender frame] inView:[sender superview]];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[_app loadResults];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)removeSelectedDirectory
|
||||||
|
{
|
||||||
|
[[self window] makeKeyAndOrderFront:nil];
|
||||||
|
[[outline model] removeSelectedDirectory];
|
||||||
|
[self refreshRemoveButtonText];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)startDuplicateScan
|
||||||
|
{
|
||||||
|
if ([model resultsAreModified]) {
|
||||||
|
if ([Dialogs askYesNo:NSLocalizedString(@"You have unsaved results, do you really want to continue?", @"")] == NSAlertSecondButtonReturn) // NO
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[_app setScanOptions];
|
||||||
|
[model doScan];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Public */
|
||||||
|
- (void)addDirectory:(NSString *)directory
|
||||||
|
{
|
||||||
|
[model addDirectory:directory];
|
||||||
|
[_recentDirectories addFile:directory];
|
||||||
|
[[self window] makeKeyAndOrderFront:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)refreshRemoveButtonText
|
||||||
|
{
|
||||||
|
if ([outlineView selectedRow] < 0) {
|
||||||
|
[removeButton setEnabled:NO];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[removeButton setEnabled:YES];
|
||||||
|
NSIndexPath *path = [outline selectedIndexPath];
|
||||||
|
if (path != nil) {
|
||||||
|
NSInteger state = [outline intProperty:@"state" valueAtPath:path];
|
||||||
|
BOOL shouldDisplayArrow = ([path length] > 1) && (state == 2);
|
||||||
|
NSString *imgName = shouldDisplayArrow ? @"NSGoLeftTemplate" : @"NSRemoveTemplate";
|
||||||
|
[removeButton setImage:[NSImage imageNamed:imgName]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)markAll
|
||||||
|
{
|
||||||
|
/* markAll isn't very descriptive of what we do, but since we re-use the Mark All button from
|
||||||
|
the result window, we don't have much choice.
|
||||||
|
*/
|
||||||
|
[outline selectAll];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Delegate */
|
||||||
|
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)path
|
||||||
|
{
|
||||||
|
BOOL isdir;
|
||||||
|
[[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isdir];
|
||||||
|
return isdir;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)recentFileClicked:(NSString *)path
|
||||||
|
{
|
||||||
|
[self addDirectory:path];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
||||||
|
{
|
||||||
|
if ([item action] == @selector(markAll)) {
|
||||||
|
[item setTitle:NSLocalizedString(@"Select All", @"")];
|
||||||
|
}
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notifications */
|
||||||
|
|
||||||
|
- (void)directorySelectionChanged:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
[self refreshRemoveButtonText];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)outlineAddedFolders:(NSNotification *)aNotification
|
||||||
|
{
|
||||||
|
NSArray *foldernames = [[aNotification userInfo] objectForKey:@"foldernames"];
|
||||||
|
for (NSString *foldername in foldernames) {
|
||||||
|
[_recentDirectories addFile:foldername];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@end
|
||||||
25
cocoa/IgnoreListDialog.h
Normal file
25
cocoa/IgnoreListDialog.h
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "PyIgnoreListDialog.h"
|
||||||
|
#import "HSTable.h"
|
||||||
|
|
||||||
|
@interface IgnoreListDialog : NSWindowController
|
||||||
|
{
|
||||||
|
PyIgnoreListDialog *model;
|
||||||
|
HSTable *ignoreListTable;
|
||||||
|
NSTableView *ignoreListTableView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) PyIgnoreListDialog *model;
|
||||||
|
@property (readwrite, retain) NSTableView *ignoreListTableView;
|
||||||
|
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef;
|
||||||
|
- (void)initializeColumns;
|
||||||
|
@end
|
||||||
51
cocoa/IgnoreListDialog.m
Normal file
51
cocoa/IgnoreListDialog.m
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "IgnoreListDialog.h"
|
||||||
|
#import "IgnoreListDialog_UI.h"
|
||||||
|
#import "HSPyUtil.h"
|
||||||
|
|
||||||
|
@implementation IgnoreListDialog
|
||||||
|
|
||||||
|
@synthesize model;
|
||||||
|
@synthesize ignoreListTableView;
|
||||||
|
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef
|
||||||
|
{
|
||||||
|
self = [super initWithWindow:nil];
|
||||||
|
self.model = [[[PyIgnoreListDialog alloc] initWithModel:aPyRef] autorelease];
|
||||||
|
[self.model bindCallback:createCallback(@"IgnoreListDialogView", self)];
|
||||||
|
[self setWindow:createIgnoreListDialog_UI(self)];
|
||||||
|
ignoreListTable = [[HSTable alloc] initWithPyRef:[model ignoreListTable] tableView:ignoreListTableView];
|
||||||
|
[self initializeColumns];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[ignoreListTable release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)initializeColumns
|
||||||
|
{
|
||||||
|
HSColumnDef defs[] = {
|
||||||
|
{@"path1", 240, 40, 0, NO, nil},
|
||||||
|
{@"path2", 240, 40, 0, NO, nil},
|
||||||
|
nil
|
||||||
|
};
|
||||||
|
[[ignoreListTable columns] initializeColumns:defs];
|
||||||
|
[[ignoreListTable columns] setColumnsAsReadOnly];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* model --> view */
|
||||||
|
- (void)show
|
||||||
|
{
|
||||||
|
[self showWindow:self];
|
||||||
|
}
|
||||||
|
@end
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
<key>CFBundleDevelopmentRegion</key>
|
<key>CFBundleDevelopmentRegion</key>
|
||||||
<string>English</string>
|
<string>English</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>dupeGuru</string>
|
||||||
<key>CFBundleHelpBookFolder</key>
|
<key>CFBundleHelpBookFolder</key>
|
||||||
<string>dupeguru_help</string>
|
<string>dupeguru_help</string>
|
||||||
<key>CFBundleHelpBookName</key>
|
<key>CFBundleHelpBookName</key>
|
||||||
@@ -13,25 +13,25 @@
|
|||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string>dupeguru</string>
|
<string>dupeguru</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.hardcoded_software.dupeguru</string>
|
<string>com.hardcoded-software.dupeguru</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
<string>${PRODUCT_NAME}</string>
|
<string>dupeGuru</string>
|
||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>hsft</string>
|
<string>hsft</string>
|
||||||
|
<key>CFBundleShortVersionString</key>
|
||||||
|
<string>{version}</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>2.10.0</string>
|
<string>{version}</string>
|
||||||
<key>NSMainNibFile</key>
|
|
||||||
<string>MainMenu</string>
|
|
||||||
<key>NSPrincipalClass</key>
|
<key>NSPrincipalClass</key>
|
||||||
<string>NSApplication</string>
|
<string>NSApplication</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>© Hardcoded Software, 2010</string>
|
<string>© Hardcoded Software, 2016</string>
|
||||||
<key>SUFeedURL</key>
|
<key>SUFeedURL</key>
|
||||||
<string>http://www.hardcoded.net/updates/dupeguru.appcast</string>
|
<string>https://www.hardcoded.net/updates/dupeguru.appcast</string>
|
||||||
<key>SUPublicDSAKeyFile</key>
|
<key>SUPublicDSAKeyFile</key>
|
||||||
<string>dsa_pub.pem</string>
|
<string>dsa_pub.pem</string>
|
||||||
</dict>
|
</dict>
|
||||||
37
cocoa/PrioritizeDialog.h
Normal file
37
cocoa/PrioritizeDialog.h
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "PyPrioritizeDialog.h"
|
||||||
|
#import "HSPopUpList.h"
|
||||||
|
#import "HSSelectableList.h"
|
||||||
|
#import "PrioritizeList.h"
|
||||||
|
#import "PyDupeGuru.h"
|
||||||
|
|
||||||
|
@interface PrioritizeDialog : NSWindowController
|
||||||
|
{
|
||||||
|
NSPopUpButton *categoryPopUpView;
|
||||||
|
NSTableView *criteriaTableView;
|
||||||
|
NSTableView *prioritizationTableView;
|
||||||
|
|
||||||
|
PyPrioritizeDialog *model;
|
||||||
|
HSPopUpList *categoryPopUp;
|
||||||
|
HSSelectableList *criteriaList;
|
||||||
|
PrioritizeList *prioritizationList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) NSPopUpButton *categoryPopUpView;
|
||||||
|
@property (readwrite, retain) NSTableView *criteriaTableView;
|
||||||
|
@property (readwrite, retain) NSTableView *prioritizationTableView;
|
||||||
|
|
||||||
|
- (id)initWithApp:(PyDupeGuru *)aApp;
|
||||||
|
- (PyPrioritizeDialog *)model;
|
||||||
|
|
||||||
|
- (void)ok;
|
||||||
|
- (void)cancel;
|
||||||
|
@end;
|
||||||
56
cocoa/PrioritizeDialog.m
Normal file
56
cocoa/PrioritizeDialog.m
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "PrioritizeDialog.h"
|
||||||
|
#import "PrioritizeDialog_UI.h"
|
||||||
|
#import "HSPyUtil.h"
|
||||||
|
|
||||||
|
@implementation PrioritizeDialog
|
||||||
|
|
||||||
|
@synthesize categoryPopUpView;
|
||||||
|
@synthesize criteriaTableView;
|
||||||
|
@synthesize prioritizationTableView;
|
||||||
|
|
||||||
|
- (id)initWithApp:(PyDupeGuru *)aApp
|
||||||
|
{
|
||||||
|
self = [super initWithWindowNibName:@"PrioritizeDialog"];
|
||||||
|
model = [[PyPrioritizeDialog alloc] initWithApp:[aApp pyRef]];
|
||||||
|
[self setWindow:createPrioritizeDialog_UI(self)];
|
||||||
|
categoryPopUp = [[HSPopUpList alloc] initWithPyRef:[[self model] categoryList] popupView:categoryPopUpView];
|
||||||
|
criteriaList = [[HSSelectableList alloc] initWithPyRef:[[self model] criteriaList] tableView:criteriaTableView];
|
||||||
|
prioritizationList = [[PrioritizeList alloc] initWithPyRef:[[self model] prioritizationList] tableView:prioritizationTableView];
|
||||||
|
[model bindCallback:createCallback(@"PrioritizeDialogView", self)];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[categoryPopUp release];
|
||||||
|
[criteriaList release];
|
||||||
|
[prioritizationList release];
|
||||||
|
[model release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (PyPrioritizeDialog *)model
|
||||||
|
{
|
||||||
|
return (PyPrioritizeDialog *)model;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)ok
|
||||||
|
{
|
||||||
|
[NSApp stopModal];
|
||||||
|
[self close];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)cancel
|
||||||
|
{
|
||||||
|
[NSApp abortModal];
|
||||||
|
[self close];
|
||||||
|
}
|
||||||
|
@end
|
||||||
16
cocoa/PrioritizeList.h
Normal file
16
cocoa/PrioritizeList.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "HSSelectableList.h"
|
||||||
|
#import "PyPrioritizeList.h"
|
||||||
|
|
||||||
|
@interface PrioritizeList : HSSelectableList {}
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef tableView:(NSTableView *)aTableView;
|
||||||
|
- (PyPrioritizeList *)model;
|
||||||
|
@end
|
||||||
58
cocoa/PrioritizeList.m
Normal file
58
cocoa/PrioritizeList.m
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "PrioritizeList.h"
|
||||||
|
#import "Utils.h"
|
||||||
|
#import "Consts.h"
|
||||||
|
|
||||||
|
@implementation PrioritizeList
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef tableView:(NSTableView *)aTableView
|
||||||
|
{
|
||||||
|
self = [super initWithPyRef:aPyRef wrapperClass:[PyPrioritizeList class]
|
||||||
|
callbackClassName:@"PrioritizeListView" view:aTableView];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (PyPrioritizeList *)model
|
||||||
|
{
|
||||||
|
return (PyPrioritizeList *)model;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setView:(NSTableView *)aTableView
|
||||||
|
{
|
||||||
|
[super setView:aTableView];
|
||||||
|
[[self view] registerForDraggedTypes:[NSArray arrayWithObject:DGPrioritizeIndexPasteboardType]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)tableView:(NSTableView *)tv writeRowsWithIndexes:(NSIndexSet *)rowIndexes toPasteboard:(NSPasteboard*)pboard
|
||||||
|
{
|
||||||
|
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:rowIndexes];
|
||||||
|
[pboard declareTypes:[NSArray arrayWithObject:DGPrioritizeIndexPasteboardType] owner:self];
|
||||||
|
[pboard setData:data forType:DGPrioritizeIndexPasteboardType];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSDragOperation)tableView:(NSTableView*)tv validateDrop:(id <NSDraggingInfo>)info proposedRow:(NSInteger)row
|
||||||
|
proposedDropOperation:(NSTableViewDropOperation)op
|
||||||
|
{
|
||||||
|
if (op == NSTableViewDropAbove) {
|
||||||
|
return NSDragOperationMove;
|
||||||
|
}
|
||||||
|
return NSDragOperationNone;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)tableView:(NSTableView *)aTableView acceptDrop:(id <NSDraggingInfo>)info
|
||||||
|
row:(NSInteger)row dropOperation:(NSTableViewDropOperation)operation
|
||||||
|
{
|
||||||
|
NSPasteboard* pboard = [info draggingPasteboard];
|
||||||
|
NSData* rowData = [pboard dataForType:DGPrioritizeIndexPasteboardType];
|
||||||
|
NSIndexSet* rowIndexes = [NSKeyedUnarchiver unarchiveObjectWithData:rowData];
|
||||||
|
[[self model] moveIndexes:[Utils indexSet2Array:rowIndexes] toIndex:row];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
@end
|
||||||
26
cocoa/ProblemDialog.h
Normal file
26
cocoa/ProblemDialog.h
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "PyProblemDialog.h"
|
||||||
|
#import "HSTable.h"
|
||||||
|
|
||||||
|
@interface ProblemDialog : NSWindowController
|
||||||
|
{
|
||||||
|
PyProblemDialog *model;
|
||||||
|
HSTable *problemTable;
|
||||||
|
NSTableView *problemTableView;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) PyProblemDialog *model;
|
||||||
|
@property (readwrite, retain) NSTableView *problemTableView;
|
||||||
|
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef;
|
||||||
|
|
||||||
|
- (void)initializeColumns;
|
||||||
|
@end
|
||||||
44
cocoa/ProblemDialog.m
Normal file
44
cocoa/ProblemDialog.m
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "ProblemDialog.h"
|
||||||
|
#import "ProblemDialog_UI.h"
|
||||||
|
#import "Utils.h"
|
||||||
|
|
||||||
|
@implementation ProblemDialog
|
||||||
|
|
||||||
|
@synthesize model;
|
||||||
|
@synthesize problemTableView;
|
||||||
|
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef
|
||||||
|
{
|
||||||
|
self = [super initWithWindow:nil];
|
||||||
|
self.model = [[PyProblemDialog alloc] initWithModel:aPyRef];
|
||||||
|
[self setWindow:createProblemDialog_UI(self)];
|
||||||
|
problemTable = [[HSTable alloc] initWithPyRef:[self.model problemTable] tableView:problemTableView];
|
||||||
|
[self initializeColumns];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[problemTable release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)initializeColumns
|
||||||
|
{
|
||||||
|
HSColumnDef defs[] = {
|
||||||
|
{@"path", 202, 40, 0, NO, nil},
|
||||||
|
{@"msg", 228, 40, 0, NO, nil},
|
||||||
|
nil
|
||||||
|
};
|
||||||
|
[[problemTable columns] initializeColumns:defs];
|
||||||
|
[[problemTable columns] setColumnsAsReadOnly];
|
||||||
|
}
|
||||||
|
@end
|
||||||
23
cocoa/ResultTable.h
Normal file
23
cocoa/ResultTable.h
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <Quartz/Quartz.h>
|
||||||
|
#import "HSTable.h"
|
||||||
|
#import "PyResultTable.h"
|
||||||
|
|
||||||
|
@interface ResultTable : HSTable <QLPreviewPanelDataSource, QLPreviewPanelDelegate>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef view:(NSTableView *)aTableView;
|
||||||
|
- (PyResultTable *)model;
|
||||||
|
- (BOOL)powerMarkerMode;
|
||||||
|
- (void)setPowerMarkerMode:(BOOL)aPowerMarkerMode;
|
||||||
|
- (BOOL)deltaValuesMode;
|
||||||
|
- (void)setDeltaValuesMode:(BOOL)aDeltaValuesMode;
|
||||||
|
@end;
|
||||||
180
cocoa/ResultTable.m
Normal file
180
cocoa/ResultTable.m
Normal file
@@ -0,0 +1,180 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "ResultTable.h"
|
||||||
|
#import "Dialogs.h"
|
||||||
|
#import "Utils.h"
|
||||||
|
#import "HSQuicklook.h"
|
||||||
|
|
||||||
|
@interface HSTable (private)
|
||||||
|
- (void)setPySelection;
|
||||||
|
- (void)setViewSelection;
|
||||||
|
@end
|
||||||
|
|
||||||
|
@implementation ResultTable
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef view:(NSTableView *)aTableView
|
||||||
|
{
|
||||||
|
self = [super initWithPyRef:aPyRef wrapperClass:[PyResultTable class] callbackClassName:@"ResultTableView" view:aTableView];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (PyResultTable *)model
|
||||||
|
{
|
||||||
|
return (PyResultTable *)model;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Private */
|
||||||
|
- (void)updateQuicklookIfNeeded
|
||||||
|
{
|
||||||
|
if ([[QLPreviewPanel sharedPreviewPanel] dataSource] == self) {
|
||||||
|
[[QLPreviewPanel sharedPreviewPanel] reloadData];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setPySelection
|
||||||
|
{
|
||||||
|
[super setPySelection];
|
||||||
|
[self updateQuicklookIfNeeded];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setViewSelection
|
||||||
|
{
|
||||||
|
[super setViewSelection];
|
||||||
|
[self updateQuicklookIfNeeded];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Public */
|
||||||
|
- (BOOL)powerMarkerMode
|
||||||
|
{
|
||||||
|
return [[self model] powerMarkerMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setPowerMarkerMode:(BOOL)aPowerMarkerMode
|
||||||
|
{
|
||||||
|
[[self model] setPowerMarkerMode:aPowerMarkerMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)deltaValuesMode
|
||||||
|
{
|
||||||
|
return [[self model] deltaValuesMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)setDeltaValuesMode:(BOOL)aDeltaValuesMode
|
||||||
|
{
|
||||||
|
[[self model] setDeltaValuesMode:aDeltaValuesMode];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Datasource */
|
||||||
|
- (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)column row:(NSInteger)row
|
||||||
|
{
|
||||||
|
NSString *identifier = [column identifier];
|
||||||
|
if ([identifier isEqual:@"marked"]) {
|
||||||
|
return [[self model] valueForColumn:@"marked" row:row];
|
||||||
|
}
|
||||||
|
return [[self model] valueForRow:row column:identifier];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)tableView:(NSTableView *)aTableView setObjectValue:(id)object forTableColumn:(NSTableColumn *)column row:(NSInteger)row
|
||||||
|
{
|
||||||
|
NSString *identifier = [column identifier];
|
||||||
|
if ([identifier isEqual:@"marked"]) {
|
||||||
|
[[self model] setValue:object forColumn:identifier row:row];
|
||||||
|
}
|
||||||
|
else if ([identifier isEqual:@"name"]) {
|
||||||
|
NSString *oldName = [[self model] valueForRow:row column:identifier];
|
||||||
|
NSString *newName = object;
|
||||||
|
if (![newName isEqual:oldName]) {
|
||||||
|
BOOL renamed = [[self model] renameSelected:newName];
|
||||||
|
if (!renamed) {
|
||||||
|
[Dialogs showMessage:[NSString stringWithFormat:NSLocalizedString(@"The name '%@' already exists.", @""), newName]];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[[self view] setNeedsDisplay:YES];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Delegate */
|
||||||
|
- (void)tableView:(NSTableView *)aTableView didClickTableColumn:(NSTableColumn *)tableColumn
|
||||||
|
{
|
||||||
|
if ([[[self view] sortDescriptors] count] < 1)
|
||||||
|
return;
|
||||||
|
NSSortDescriptor *sd = [[[self view] sortDescriptors] objectAtIndex:0];
|
||||||
|
[[self model] sortBy:[sd key] ascending:[sd ascending]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)tableView:(NSTableView *)aTableView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)column row:(NSInteger)row
|
||||||
|
{
|
||||||
|
BOOL isSelected = [[self view] isRowSelected:row];
|
||||||
|
BOOL isMarkable = n2b([[self model] valueForColumn:@"markable" row:row]);
|
||||||
|
if ([[column identifier] isEqual:@"marked"]) {
|
||||||
|
[cell setEnabled:isMarkable];
|
||||||
|
// Low-tech solution, for indentation, but it works...
|
||||||
|
NSCellImagePosition pos = isMarkable ? NSImageRight : NSImageLeft;
|
||||||
|
[cell setImagePosition:pos];
|
||||||
|
}
|
||||||
|
if ([cell isKindOfClass:[NSTextFieldCell class]]) {
|
||||||
|
NSColor *color = [NSColor textColor];
|
||||||
|
if (isSelected) {
|
||||||
|
color = [NSColor selectedTextColor];
|
||||||
|
}
|
||||||
|
else if (isMarkable) {
|
||||||
|
if ([[self model] isDeltaAtRow:row column:[column identifier]]) {
|
||||||
|
color = [NSColor orangeColor];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
color = [NSColor blueColor];
|
||||||
|
}
|
||||||
|
[(NSTextFieldCell *)cell setTextColor:color];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)tableViewHadDeletePressed:(NSTableView *)tableView
|
||||||
|
{
|
||||||
|
[[self model] removeSelected];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)tableViewHadSpacePressed:(NSTableView *)tableView
|
||||||
|
{
|
||||||
|
[[self model] markSelected];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Quicklook */
|
||||||
|
- (NSInteger)numberOfPreviewItemsInPreviewPanel:(QLPreviewPanel *)panel
|
||||||
|
{
|
||||||
|
return [[[self model] selectedRows] count];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (id <QLPreviewItem>)previewPanel:(QLPreviewPanel *)panel previewItemAtIndex:(NSInteger)index
|
||||||
|
{
|
||||||
|
NSArray *selectedRows = [[self model] selectedRows];
|
||||||
|
NSInteger absIndex = n2i([selectedRows objectAtIndex:index]);
|
||||||
|
NSString *path = [[self model] pathAtIndex:absIndex];
|
||||||
|
return [[HSQLPreviewItem alloc] initWithUrl:[NSURL fileURLWithPath:path] title:path];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)previewPanel:(QLPreviewPanel *)panel handleEvent:(NSEvent *)event
|
||||||
|
{
|
||||||
|
// redirect all key down events to the table view
|
||||||
|
if ([event type] == NSKeyDown) {
|
||||||
|
[[self view] keyDown:event];
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
return NO;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Python --> Cocoa */
|
||||||
|
- (void)invalidateMarkings
|
||||||
|
{
|
||||||
|
[[self view] setNeedsDisplay:YES];
|
||||||
|
}
|
||||||
|
@end
|
||||||
76
cocoa/ResultWindow.h
Normal file
76
cocoa/ResultWindow.h
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <Quartz/Quartz.h>
|
||||||
|
#import "StatsLabel.h"
|
||||||
|
#import "ResultTable.h"
|
||||||
|
#import "HSTableView.h"
|
||||||
|
#import "PyDupeGuru.h"
|
||||||
|
|
||||||
|
@class AppDelegate;
|
||||||
|
|
||||||
|
@interface ResultWindow : NSWindowController
|
||||||
|
{
|
||||||
|
@protected
|
||||||
|
NSSegmentedControl *optionsSwitch;
|
||||||
|
NSToolbarItem *optionsToolbarItem;
|
||||||
|
HSTableView *matches;
|
||||||
|
NSTextField *stats;
|
||||||
|
NSSearchField *filterField;
|
||||||
|
|
||||||
|
AppDelegate *app;
|
||||||
|
PyDupeGuru *model;
|
||||||
|
ResultTable *table;
|
||||||
|
StatsLabel *statsLabel;
|
||||||
|
QLPreviewPanel* previewPanel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (readwrite, retain) NSSegmentedControl *optionsSwitch;
|
||||||
|
@property (readwrite, retain) NSToolbarItem *optionsToolbarItem;
|
||||||
|
@property (readwrite, retain) HSTableView *matches;
|
||||||
|
@property (readwrite, retain) NSTextField *stats;
|
||||||
|
@property (readwrite, retain) NSSearchField *filterField;
|
||||||
|
|
||||||
|
- (id)initWithParentApp:(AppDelegate *)app;
|
||||||
|
|
||||||
|
/* Helpers */
|
||||||
|
- (void)fillColumnsMenu;
|
||||||
|
- (void)updateOptionSegments;
|
||||||
|
- (void)adjustUIToLocalization;
|
||||||
|
- (void)initResultColumns:(ResultTable *)aTable;
|
||||||
|
|
||||||
|
/* Actions */
|
||||||
|
- (void)changeOptions;
|
||||||
|
- (void)copyMarked;
|
||||||
|
- (void)trashMarked;
|
||||||
|
- (void)filter;
|
||||||
|
- (void)focusOnFilterField;
|
||||||
|
- (void)ignoreSelected;
|
||||||
|
- (void)invokeCustomCommand;
|
||||||
|
- (void)markAll;
|
||||||
|
- (void)markInvert;
|
||||||
|
- (void)markNone;
|
||||||
|
- (void)markSelected;
|
||||||
|
- (void)moveMarked;
|
||||||
|
- (void)openClicked;
|
||||||
|
- (void)openSelected;
|
||||||
|
- (void)removeMarked;
|
||||||
|
- (void)removeSelected;
|
||||||
|
- (void)renameSelected;
|
||||||
|
- (void)reprioritizeResults;
|
||||||
|
- (void)resetColumnsToDefault;
|
||||||
|
- (void)revealSelected;
|
||||||
|
- (void)saveResults;
|
||||||
|
- (void)switchSelected;
|
||||||
|
- (void)toggleColumn:(id)sender;
|
||||||
|
- (void)toggleDelta;
|
||||||
|
- (void)toggleDetailsPanel;
|
||||||
|
- (void)togglePowerMarker;
|
||||||
|
- (void)toggleQuicklookPanel;
|
||||||
|
@end
|
||||||
406
cocoa/ResultWindow.m
Normal file
406
cocoa/ResultWindow.m
Normal file
@@ -0,0 +1,406 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "ResultWindow.h"
|
||||||
|
#import "ResultWindow_UI.h"
|
||||||
|
#import "Dialogs.h"
|
||||||
|
#import "ProgressController.h"
|
||||||
|
#import "Utils.h"
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
#import "Consts.h"
|
||||||
|
#import "PrioritizeDialog.h"
|
||||||
|
|
||||||
|
@implementation ResultWindow
|
||||||
|
|
||||||
|
@synthesize optionsSwitch;
|
||||||
|
@synthesize optionsToolbarItem;
|
||||||
|
@synthesize matches;
|
||||||
|
@synthesize stats;
|
||||||
|
@synthesize filterField;
|
||||||
|
|
||||||
|
- (id)initWithParentApp:(AppDelegate *)aApp;
|
||||||
|
{
|
||||||
|
self = [super initWithWindow:nil];
|
||||||
|
app = aApp;
|
||||||
|
model = [app model];
|
||||||
|
[self setWindow:createResultWindow_UI(self)];
|
||||||
|
[[self window] setTitle:fmt(NSLocalizedString(@"%@ Results", @""), [model appName])];
|
||||||
|
/* Put a cute iTunes-like bottom bar */
|
||||||
|
[[self window] setContentBorderThickness:28 forEdge:NSMinYEdge];
|
||||||
|
table = [[ResultTable alloc] initWithPyRef:[model resultTable] view:matches];
|
||||||
|
statsLabel = [[StatsLabel alloc] initWithPyRef:[model statsLabel] view:stats];
|
||||||
|
[self initResultColumns:table];
|
||||||
|
[[table columns] setColumnsAsReadOnly];
|
||||||
|
[self fillColumnsMenu];
|
||||||
|
[matches setTarget:self];
|
||||||
|
[matches setDoubleAction:@selector(openClicked)];
|
||||||
|
[self adjustUIToLocalization];
|
||||||
|
return self;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)dealloc
|
||||||
|
{
|
||||||
|
[table release];
|
||||||
|
[statsLabel release];
|
||||||
|
[super dealloc];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Helpers */
|
||||||
|
- (void)fillColumnsMenu
|
||||||
|
{
|
||||||
|
[[app columnsMenu] removeAllItems];
|
||||||
|
NSArray *menuItems = [[[table columns] model] menuItems];
|
||||||
|
for (NSInteger i=0; i < [menuItems count]; i++) {
|
||||||
|
NSArray *pair = [menuItems objectAtIndex:i];
|
||||||
|
NSString *display = [pair objectAtIndex:0];
|
||||||
|
BOOL marked = n2b([pair objectAtIndex:1]);
|
||||||
|
NSMenuItem *mi = [[app columnsMenu] addItemWithTitle:display action:@selector(toggleColumn:) keyEquivalent:@""];
|
||||||
|
[mi setTarget:self];
|
||||||
|
[mi setState:marked ? NSOnState : NSOffState];
|
||||||
|
[mi setTag:i];
|
||||||
|
}
|
||||||
|
[[app columnsMenu] addItem:[NSMenuItem separatorItem]];
|
||||||
|
NSMenuItem *mi = [[app columnsMenu] addItemWithTitle:NSLocalizedString(@"Reset to Default", @"")
|
||||||
|
action:@selector(resetColumnsToDefault) keyEquivalent:@""];
|
||||||
|
[mi setTarget:self];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)updateOptionSegments
|
||||||
|
{
|
||||||
|
[optionsSwitch setSelected:[[app detailsPanel] isVisible] forSegment:0];
|
||||||
|
[optionsSwitch setSelected:[table powerMarkerMode] forSegment:1];
|
||||||
|
[optionsSwitch setSelected:[table deltaValuesMode] forSegment:2];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)adjustUIToLocalization
|
||||||
|
{
|
||||||
|
NSString *lang = [[NSBundle preferredLocalizationsFromArray:[[NSBundle mainBundle] localizations]] objectAtIndex:0];
|
||||||
|
NSInteger seg1delta = 0;
|
||||||
|
NSInteger seg2delta = 0;
|
||||||
|
if ([lang isEqual:@"ru"]) {
|
||||||
|
seg2delta = 20;
|
||||||
|
}
|
||||||
|
else if ([lang isEqual:@"uk"]) {
|
||||||
|
seg2delta = 20;
|
||||||
|
}
|
||||||
|
else if ([lang isEqual:@"hy"]) {
|
||||||
|
seg1delta = 20;
|
||||||
|
}
|
||||||
|
if (seg1delta || seg2delta) {
|
||||||
|
[optionsSwitch setWidth:[optionsSwitch widthForSegment:0]+seg1delta forSegment:0];
|
||||||
|
[optionsSwitch setWidth:[optionsSwitch widthForSegment:1]+seg2delta forSegment:1];
|
||||||
|
NSSize s = [optionsToolbarItem maxSize];
|
||||||
|
s.width += seg1delta + seg2delta;
|
||||||
|
[optionsToolbarItem setMaxSize:s];
|
||||||
|
[optionsToolbarItem setMinSize:s];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)initResultColumns:(ResultTable *)aTable
|
||||||
|
{
|
||||||
|
NSInteger appMode = [app getAppMode];
|
||||||
|
if (appMode == AppModePicture) {
|
||||||
|
HSColumnDef defs[] = {
|
||||||
|
{@"marked", 26, 26, 26, YES, [NSButtonCell class]},
|
||||||
|
{@"name", 162, 16, 0, YES, nil},
|
||||||
|
{@"folder_path", 142, 16, 0, YES, nil},
|
||||||
|
{@"size", 63, 16, 0, YES, nil},
|
||||||
|
{@"extension", 40, 16, 0, YES, nil},
|
||||||
|
{@"dimensions", 73, 16, 0, YES, nil},
|
||||||
|
{@"exif_timestamp", 120, 16, 0, YES, nil},
|
||||||
|
{@"mtime", 120, 16, 0, YES, nil},
|
||||||
|
{@"percentage", 58, 16, 0, YES, nil},
|
||||||
|
{@"dupe_count", 80, 16, 0, YES, nil},
|
||||||
|
nil
|
||||||
|
};
|
||||||
|
[[aTable columns] initializeColumns:defs];
|
||||||
|
NSTableColumn *c = [[aTable view] tableColumnWithIdentifier:@"marked"];
|
||||||
|
[[c dataCell] setButtonType:NSSwitchButton];
|
||||||
|
[[c dataCell] setControlSize:NSSmallControlSize];
|
||||||
|
c = [[aTable view] tableColumnWithIdentifier:@"size"];
|
||||||
|
[[c dataCell] setAlignment:NSRightTextAlignment];
|
||||||
|
}
|
||||||
|
else if (appMode == AppModeMusic) {
|
||||||
|
HSColumnDef defs[] = {
|
||||||
|
{@"marked", 26, 26, 26, YES, [NSButtonCell class]},
|
||||||
|
{@"name", 235, 16, 0, YES, nil},
|
||||||
|
{@"folder_path", 120, 16, 0, YES, nil},
|
||||||
|
{@"size", 63, 16, 0, YES, nil},
|
||||||
|
{@"duration", 50, 16, 0, YES, nil},
|
||||||
|
{@"bitrate", 50, 16, 0, YES, nil},
|
||||||
|
{@"samplerate", 60, 16, 0, YES, nil},
|
||||||
|
{@"extension", 40, 16, 0, YES, nil},
|
||||||
|
{@"mtime", 120, 16, 0, YES, nil},
|
||||||
|
{@"title", 120, 16, 0, YES, nil},
|
||||||
|
{@"artist", 120, 16, 0, YES, nil},
|
||||||
|
{@"album", 120, 16, 0, YES, nil},
|
||||||
|
{@"genre", 80, 16, 0, YES, nil},
|
||||||
|
{@"year", 40, 16, 0, YES, nil},
|
||||||
|
{@"track", 40, 16, 0, YES, nil},
|
||||||
|
{@"comment", 120, 16, 0, YES, nil},
|
||||||
|
{@"percentage", 57, 16, 0, YES, nil},
|
||||||
|
{@"words", 120, 16, 0, YES, nil},
|
||||||
|
{@"dupe_count", 80, 16, 0, YES, nil},
|
||||||
|
nil
|
||||||
|
};
|
||||||
|
[[aTable columns] initializeColumns:defs];
|
||||||
|
NSTableColumn *c = [[aTable view] tableColumnWithIdentifier:@"marked"];
|
||||||
|
[[c dataCell] setButtonType:NSSwitchButton];
|
||||||
|
[[c dataCell] setControlSize:NSSmallControlSize];
|
||||||
|
c = [[aTable view] tableColumnWithIdentifier:@"size"];
|
||||||
|
[[c dataCell] setAlignment:NSRightTextAlignment];
|
||||||
|
c = [[aTable view] tableColumnWithIdentifier:@"duration"];
|
||||||
|
[[c dataCell] setAlignment:NSRightTextAlignment];
|
||||||
|
c = [[aTable view] tableColumnWithIdentifier:@"bitrate"];
|
||||||
|
[[c dataCell] setAlignment:NSRightTextAlignment];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
HSColumnDef defs[] = {
|
||||||
|
{@"marked", 26, 26, 26, YES, [NSButtonCell class]},
|
||||||
|
{@"name", 195, 16, 0, YES, nil},
|
||||||
|
{@"folder_path", 183, 16, 0, YES, nil},
|
||||||
|
{@"size", 63, 16, 0, YES, nil},
|
||||||
|
{@"extension", 40, 16, 0, YES, nil},
|
||||||
|
{@"mtime", 120, 16, 0, YES, nil},
|
||||||
|
{@"percentage", 60, 16, 0, YES, nil},
|
||||||
|
{@"words", 120, 16, 0, YES, nil},
|
||||||
|
{@"dupe_count", 80, 16, 0, YES, nil},
|
||||||
|
nil
|
||||||
|
};
|
||||||
|
[[aTable columns] initializeColumns:defs];
|
||||||
|
NSTableColumn *c = [[aTable view] tableColumnWithIdentifier:@"marked"];
|
||||||
|
[[c dataCell] setButtonType:NSSwitchButton];
|
||||||
|
[[c dataCell] setControlSize:NSSmallControlSize];
|
||||||
|
c = [[aTable view] tableColumnWithIdentifier:@"size"];
|
||||||
|
[[c dataCell] setAlignment:NSRightTextAlignment];
|
||||||
|
}
|
||||||
|
[[aTable columns] restoreColumns];
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Actions */
|
||||||
|
- (void)changeOptions
|
||||||
|
{
|
||||||
|
NSInteger seg = [optionsSwitch selectedSegment];
|
||||||
|
if (seg == 0) {
|
||||||
|
[self toggleDetailsPanel];
|
||||||
|
}
|
||||||
|
else if (seg == 1) {
|
||||||
|
[self togglePowerMarker];
|
||||||
|
}
|
||||||
|
else if (seg == 2) {
|
||||||
|
[self toggleDelta];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)copyMarked
|
||||||
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
[model setRemoveEmptyFolders:n2b([ud objectForKey:@"removeEmptyFolders"])];
|
||||||
|
[model setCopyMoveDestType:n2i([ud objectForKey:@"recreatePathType"])];
|
||||||
|
[model copyMarked];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)trashMarked
|
||||||
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
[model setRemoveEmptyFolders:n2b([ud objectForKey:@"removeEmptyFolders"])];
|
||||||
|
[model deleteMarked];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)filter
|
||||||
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
[model setEscapeFilterRegexp:!n2b([ud objectForKey:@"useRegexpFilter"])];
|
||||||
|
[model applyFilter:[filterField stringValue]];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)focusOnFilterField
|
||||||
|
{
|
||||||
|
[[self window] makeFirstResponder:filterField];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)ignoreSelected
|
||||||
|
{
|
||||||
|
[model addSelectedToIgnoreList];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)invokeCustomCommand
|
||||||
|
{
|
||||||
|
[model invokeCustomCommand];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)markAll
|
||||||
|
{
|
||||||
|
[model markAll];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)markInvert
|
||||||
|
{
|
||||||
|
[model markInvert];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)markNone
|
||||||
|
{
|
||||||
|
[model markNone];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)markSelected
|
||||||
|
{
|
||||||
|
[model toggleSelectedMark];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)moveMarked
|
||||||
|
{
|
||||||
|
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
||||||
|
[model setRemoveEmptyFolders:n2b([ud objectForKey:@"removeEmptyFolders"])];
|
||||||
|
[model setCopyMoveDestType:n2i([ud objectForKey:@"recreatePathType"])];
|
||||||
|
[model moveMarked];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)openClicked
|
||||||
|
{
|
||||||
|
if ([matches clickedRow] < 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
[matches selectRowIndexes:[NSIndexSet indexSetWithIndex:[matches clickedRow]] byExtendingSelection:NO];
|
||||||
|
[model openSelected];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)openSelected
|
||||||
|
{
|
||||||
|
[model openSelected];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)removeMarked
|
||||||
|
{
|
||||||
|
[model removeMarked];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)removeSelected
|
||||||
|
{
|
||||||
|
[model removeSelected];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)renameSelected
|
||||||
|
{
|
||||||
|
NSInteger col = [matches columnWithIdentifier:@"name"];
|
||||||
|
NSInteger row = [matches selectedRow];
|
||||||
|
[matches editColumn:col row:row withEvent:[NSApp currentEvent] select:YES];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)reprioritizeResults
|
||||||
|
{
|
||||||
|
PrioritizeDialog *dlg = [[PrioritizeDialog alloc] initWithApp:model];
|
||||||
|
NSInteger result = [NSApp runModalForWindow:[dlg window]];
|
||||||
|
if (result == NSRunStoppedResponse) {
|
||||||
|
[[dlg model] performReprioritization];
|
||||||
|
}
|
||||||
|
[dlg release];
|
||||||
|
[[self window] makeKeyAndOrderFront:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)resetColumnsToDefault
|
||||||
|
{
|
||||||
|
[[[table columns] model] resetToDefaults];
|
||||||
|
[self fillColumnsMenu];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)revealSelected
|
||||||
|
{
|
||||||
|
[model revealSelected];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)saveResults
|
||||||
|
{
|
||||||
|
NSSavePanel *sp = [NSSavePanel savePanel];
|
||||||
|
[sp setCanCreateDirectories:YES];
|
||||||
|
[sp setAllowedFileTypes:[NSArray arrayWithObject:@"dupeguru"]];
|
||||||
|
[sp setTitle:NSLocalizedString(@"Select a file to save your results to", @"")];
|
||||||
|
if ([sp runModal] == NSOKButton) {
|
||||||
|
[model saveResultsAs:[[sp URL] path]];
|
||||||
|
[[app recentResults] addFile:[[sp URL] path]];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)switchSelected
|
||||||
|
{
|
||||||
|
[model makeSelectedReference];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)toggleColumn:(id)sender
|
||||||
|
{
|
||||||
|
NSMenuItem *mi = sender;
|
||||||
|
BOOL checked = [[[table columns] model] toggleMenuItem:[mi tag]];
|
||||||
|
[mi setState:checked ? NSOnState : NSOffState];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)toggleDetailsPanel
|
||||||
|
{
|
||||||
|
[[app detailsPanel] toggleVisibility];
|
||||||
|
[self updateOptionSegments];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)toggleDelta
|
||||||
|
{
|
||||||
|
[table setDeltaValuesMode:![table deltaValuesMode]];
|
||||||
|
[self updateOptionSegments];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)togglePowerMarker
|
||||||
|
{
|
||||||
|
[table setPowerMarkerMode:![table powerMarkerMode]];
|
||||||
|
[self updateOptionSegments];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)toggleQuicklookPanel
|
||||||
|
{
|
||||||
|
if ([QLPreviewPanel sharedPreviewPanelExists] && [[QLPreviewPanel sharedPreviewPanel] isVisible]) {
|
||||||
|
[[QLPreviewPanel sharedPreviewPanel] orderOut:nil];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
[[QLPreviewPanel sharedPreviewPanel] makeKeyAndOrderFront:nil];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Quicklook */
|
||||||
|
- (BOOL)acceptsPreviewPanelControl:(QLPreviewPanel *)panel;
|
||||||
|
{
|
||||||
|
return YES;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)beginPreviewPanelControl:(QLPreviewPanel *)panel
|
||||||
|
{
|
||||||
|
// This document is now responsible of the preview panel
|
||||||
|
// It is allowed to set the delegate, data source and refresh panel.
|
||||||
|
previewPanel = [panel retain];
|
||||||
|
panel.delegate = table;
|
||||||
|
panel.dataSource = table;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)endPreviewPanelControl:(QLPreviewPanel *)panel
|
||||||
|
{
|
||||||
|
// This document loses its responsisibility on the preview panel
|
||||||
|
// Until the next call to -beginPreviewPanelControl: it must not
|
||||||
|
// change the panel's delegate, data source or refresh it.
|
||||||
|
[previewPanel release];
|
||||||
|
previewPanel = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)validateToolbarItem:(NSToolbarItem *)theItem
|
||||||
|
{
|
||||||
|
return ![[ProgressController mainProgressController] isShown];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
||||||
|
{
|
||||||
|
if ([item action] == @selector(markAll)) {
|
||||||
|
[item setTitle:NSLocalizedString(@"Mark All", @"")];
|
||||||
|
}
|
||||||
|
return ![[ProgressController mainProgressController] isShown];
|
||||||
|
}
|
||||||
|
@end
|
||||||
1
cocoa/Sparkle
Submodule
1
cocoa/Sparkle
Submodule
Submodule cocoa/Sparkle added at 1c8d54166b
17
cocoa/StatsLabel.h
Normal file
17
cocoa/StatsLabel.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import "HSGUIController.h"
|
||||||
|
#import "PyStatsLabel.h"
|
||||||
|
|
||||||
|
@interface StatsLabel : HSGUIController {}
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef view:(NSTextField *)aLabelView;
|
||||||
|
- (PyStatsLabel *)model;
|
||||||
|
- (NSTextField *)labelView;
|
||||||
|
@end
|
||||||
34
cocoa/StatsLabel.m
Normal file
34
cocoa/StatsLabel.m
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import "StatsLabel.h"
|
||||||
|
#import "Utils.h"
|
||||||
|
|
||||||
|
@implementation StatsLabel
|
||||||
|
- (id)initWithPyRef:(PyObject *)aPyRef view:(NSTextField *)aLabelView
|
||||||
|
{
|
||||||
|
return [super initWithPyRef:aPyRef wrapperClass:[PyStatsLabel class]
|
||||||
|
callbackClassName:@"StatsLabelView" view:aLabelView];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (PyStatsLabel *)model
|
||||||
|
{
|
||||||
|
return (PyStatsLabel *)model;
|
||||||
|
}
|
||||||
|
|
||||||
|
- (NSTextField *)labelView
|
||||||
|
{
|
||||||
|
return (NSTextField *)view;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Python --> Cocoa */
|
||||||
|
- (void)refresh
|
||||||
|
{
|
||||||
|
[[self labelView] setStringValue:[[self model] display]];
|
||||||
|
}
|
||||||
|
@end
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "RecentDirectories.h"
|
|
||||||
#import "PyDupeGuru.h"
|
|
||||||
#import "ResultWindow.h"
|
|
||||||
#import "DetailsPanel.h"
|
|
||||||
#import "DirectoryPanel.h"
|
|
||||||
|
|
||||||
@interface AppDelegateBase : NSObject
|
|
||||||
{
|
|
||||||
IBOutlet PyDupeGuruBase *py;
|
|
||||||
IBOutlet RecentDirectories *recentDirectories;
|
|
||||||
IBOutlet NSMenuItem *unlockMenuItem;
|
|
||||||
IBOutlet ResultWindowBase *result;
|
|
||||||
|
|
||||||
DirectoryPanel *_directoryPanel;
|
|
||||||
DetailsPanel *_detailsPanel;
|
|
||||||
BOOL _savedResults;
|
|
||||||
}
|
|
||||||
- (IBAction)unlockApp:(id)sender;
|
|
||||||
|
|
||||||
- (PyDupeGuruBase *)py;
|
|
||||||
- (RecentDirectories *)recentDirectories;
|
|
||||||
- (DirectoryPanel *)directoryPanel;
|
|
||||||
- (DetailsPanel *)detailsPanel;
|
|
||||||
- (void)saveResults;
|
|
||||||
@end
|
|
||||||
@@ -1,117 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "AppDelegate.h"
|
|
||||||
#import "ProgressController.h"
|
|
||||||
#import "RegistrationInterface.h"
|
|
||||||
#import "Utils.h"
|
|
||||||
#import "Consts.h"
|
|
||||||
#import <Sparkle/SUUpdater.h>
|
|
||||||
|
|
||||||
@implementation AppDelegateBase
|
|
||||||
- (IBAction)unlockApp:(id)sender
|
|
||||||
{
|
|
||||||
if ([[self py] isRegistered])
|
|
||||||
return;
|
|
||||||
RegistrationInterface *ri = [[RegistrationInterface alloc] initWithApp:[self py]];
|
|
||||||
if ([ri enterCode] == NSOKButton)
|
|
||||||
{
|
|
||||||
NSString *menuTitle = [NSString stringWithFormat:@"Thanks for buying %@!",[py appName]];
|
|
||||||
[unlockMenuItem setTitle:menuTitle];
|
|
||||||
}
|
|
||||||
[ri release];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (PyDupeGuruBase *)py { return py; }
|
|
||||||
- (RecentDirectories *)recentDirectories { return recentDirectories; }
|
|
||||||
- (DirectoryPanel *)directoryPanel
|
|
||||||
{
|
|
||||||
if (!_directoryPanel)
|
|
||||||
_directoryPanel = [[DirectoryPanel alloc] initWithParentApp:self];
|
|
||||||
return _directoryPanel;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (DetailsPanel *)detailsPanel
|
|
||||||
{
|
|
||||||
if (!_detailsPanel)
|
|
||||||
_detailsPanel = [[DetailsPanel alloc] initWithPy:py];
|
|
||||||
return _detailsPanel;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)saveResults
|
|
||||||
{
|
|
||||||
if (_savedResults) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
[py saveIgnoreList];
|
|
||||||
[py saveResults];
|
|
||||||
_savedResults = YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Delegate */
|
|
||||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
[[ProgressController mainProgressController] setWorker:py];
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
//Restore Columns
|
|
||||||
NSArray *columnsOrder = [ud arrayForKey:@"columnsOrder"];
|
|
||||||
NSDictionary *columnsWidth = [ud dictionaryForKey:@"columnsWidth"];
|
|
||||||
if ([columnsOrder count])
|
|
||||||
[result restoreColumnsPosition:columnsOrder widths:columnsWidth];
|
|
||||||
else
|
|
||||||
[result resetColumnsToDefault:nil];
|
|
||||||
//Reg stuff
|
|
||||||
if ([RegistrationInterface showNagWithApp:[self py]])
|
|
||||||
[unlockMenuItem setTitle:[NSString stringWithFormat:@"Thanks for buying %@!",[py appName]]];
|
|
||||||
//Restore results
|
|
||||||
[py loadIgnoreList];
|
|
||||||
[py loadResults];
|
|
||||||
_savedResults = NO;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)applicationWillBecomeActive:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
if (![[result window] isVisible])
|
|
||||||
[result showWindow:NSApp];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)applicationWillTerminate:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
[ud setObject: [result getColumnsOrder] forKey:@"columnsOrder"];
|
|
||||||
[ud setObject: [result getColumnsWidth] forKey:@"columnsWidth"];
|
|
||||||
[self saveResults];
|
|
||||||
NSInteger sc = [ud integerForKey:@"sessionCountSinceLastIgnorePurge"];
|
|
||||||
if (sc >= 10)
|
|
||||||
{
|
|
||||||
sc = -1;
|
|
||||||
[py purgeIgnoreList];
|
|
||||||
}
|
|
||||||
sc++;
|
|
||||||
[ud setInteger:sc forKey:@"sessionCountSinceLastIgnorePurge"];
|
|
||||||
// NSApplication does not release nib instances objects, we must do it manually
|
|
||||||
// Well, it isn't needed because the memory is freed anyway (we are quitting the application
|
|
||||||
// But I need to release RecentDirectories so it saves the user defaults
|
|
||||||
[recentDirectories release];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)recentDirecoryClicked:(NSString *)directory
|
|
||||||
{
|
|
||||||
[[self directoryPanel] addDirectory:directory];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* SUUpdater delegate */
|
|
||||||
|
|
||||||
- (BOOL)updater:(SUUpdater *)updater shouldPostponeRelaunchForUpdate:(SUAppcastItem *)update untilInvoking:(NSInvocation *)invocation;
|
|
||||||
{
|
|
||||||
/* If results aren't saved now, we might get a weird utf-8 lookup error when saving later.
|
|
||||||
**/
|
|
||||||
[self saveResults];
|
|
||||||
return NO;
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
|
|
||||||
#define RegistrationRequired @"RegistrationRequired"
|
|
||||||
#define JobStarted @"JobStarted"
|
|
||||||
#define JobInProgress @"JobInProgress"
|
|
||||||
|
|
||||||
#define jobLoad @"job_load"
|
|
||||||
#define jobScan @"job_scan"
|
|
||||||
#define jobCopy @"job_copy"
|
|
||||||
#define jobMove @"job_move"
|
|
||||||
#define jobDelete @"job_delete"
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "HSWindowController.h"
|
|
||||||
#import "PyApp.h"
|
|
||||||
#import "PyDetailsPanel.h"
|
|
||||||
|
|
||||||
@interface DetailsPanel : HSWindowController
|
|
||||||
{
|
|
||||||
IBOutlet NSTableView *detailsTable;
|
|
||||||
}
|
|
||||||
- (id)initWithPy:(PyApp *)aPy;
|
|
||||||
- (PyDetailsPanel *)py;
|
|
||||||
|
|
||||||
- (void)toggleVisibility;
|
|
||||||
|
|
||||||
/* Python --> Cocoa */
|
|
||||||
- (void)refresh;
|
|
||||||
@end
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "DetailsPanel.h"
|
|
||||||
#import "Utils.h"
|
|
||||||
|
|
||||||
@implementation DetailsPanel
|
|
||||||
- (id)initWithPy:(PyApp *)aPy
|
|
||||||
{
|
|
||||||
self = [super initWithNibName:@"DetailsPanel" pyClassName:@"PyDetailsPanel" pyParent:aPy];
|
|
||||||
[self window]; //So the detailsTable is initialized.
|
|
||||||
[self connect];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc
|
|
||||||
{
|
|
||||||
[self disconnect];
|
|
||||||
[super dealloc];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (PyDetailsPanel *)py
|
|
||||||
{
|
|
||||||
return (PyDetailsPanel *)py;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)refreshDetails
|
|
||||||
{
|
|
||||||
[detailsTable reloadData];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)toggleVisibility
|
|
||||||
{
|
|
||||||
if ([[self window] isVisible]) {
|
|
||||||
[[self window] close];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[self refreshDetails]; // selection might have changed since last time
|
|
||||||
[[self window] orderFront:nil];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* NSTableView Delegate */
|
|
||||||
- (NSInteger)numberOfRowsInTableView:(NSTableView *)tableView
|
|
||||||
{
|
|
||||||
return [[self py] numberOfRows];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id)tableView:(NSTableView *)tableView objectValueForTableColumn:(NSTableColumn *)column row:(NSInteger)row
|
|
||||||
{
|
|
||||||
return [[self py] valueForColumn:[column identifier] row:row];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Python --> Cocoa */
|
|
||||||
- (void)refresh
|
|
||||||
{
|
|
||||||
if ([[self window] isVisible]) {
|
|
||||||
[self refreshDetails];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "HSOutline.h"
|
|
||||||
#import "PyDirectoryOutline.h"
|
|
||||||
|
|
||||||
@interface DirectoryOutline : HSOutline {}
|
|
||||||
- (id)initWithPyParent:(id)aPyParent view:(HSOutlineView *)aOutlineView;
|
|
||||||
- (PyDirectoryOutline *)py;
|
|
||||||
@end;
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "RecentDirectories.h"
|
|
||||||
#import "HSOutlineView.h"
|
|
||||||
#import "DirectoryOutline.h"
|
|
||||||
#import "PyDupeGuru.h"
|
|
||||||
|
|
||||||
@interface DirectoryPanel : NSWindowController
|
|
||||||
{
|
|
||||||
IBOutlet NSPopUpButton *addButtonPopUp;
|
|
||||||
IBOutlet HSOutlineView *outlineView;
|
|
||||||
IBOutlet NSButton *removeButton;
|
|
||||||
|
|
||||||
PyDupeGuruBase *_py;
|
|
||||||
RecentDirectories *_recentDirectories;
|
|
||||||
DirectoryOutline *outline;
|
|
||||||
}
|
|
||||||
- (id)initWithParentApp:(id)aParentApp;
|
|
||||||
|
|
||||||
- (IBAction)askForDirectory:(id)sender;
|
|
||||||
- (IBAction)popupAddDirectoryMenu:(id)sender;
|
|
||||||
- (IBAction)removeSelectedDirectory:(id)sender;
|
|
||||||
- (IBAction)toggleVisible:(id)sender;
|
|
||||||
|
|
||||||
- (void)addDirectory:(NSString *)directory;
|
|
||||||
- (void)refreshRemoveButtonText;
|
|
||||||
@end
|
|
||||||
@@ -1,142 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "DirectoryPanel.h"
|
|
||||||
#import "Dialogs.h"
|
|
||||||
#import "Utils.h"
|
|
||||||
#import "AppDelegate.h"
|
|
||||||
|
|
||||||
@implementation DirectoryPanel
|
|
||||||
- (id)initWithParentApp:(id)aParentApp
|
|
||||||
{
|
|
||||||
self = [super initWithWindowNibName:@"DirectoryPanel"];
|
|
||||||
[self window];
|
|
||||||
AppDelegateBase *app = aParentApp;
|
|
||||||
_py = [app py];
|
|
||||||
_recentDirectories = [app recentDirectories];
|
|
||||||
outline = [[DirectoryOutline alloc] initWithPyParent:_py view:outlineView];
|
|
||||||
[self refreshRemoveButtonText];
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(directorySelectionChanged:)
|
|
||||||
name:NSOutlineViewSelectionDidChangeNotification object:outlineView];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc
|
|
||||||
{
|
|
||||||
[outline release];
|
|
||||||
[super dealloc];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Actions */
|
|
||||||
|
|
||||||
- (IBAction)askForDirectory:(id)sender
|
|
||||||
{
|
|
||||||
NSOpenPanel *op = [NSOpenPanel openPanel];
|
|
||||||
[op setCanChooseFiles:YES];
|
|
||||||
[op setCanChooseDirectories:YES];
|
|
||||||
[op setAllowsMultipleSelection:NO];
|
|
||||||
[op setTitle:@"Select a directory to add to the scanning list"];
|
|
||||||
[op setDelegate:self];
|
|
||||||
if ([op runModalForTypes:nil] == NSOKButton)
|
|
||||||
{
|
|
||||||
NSString *directory = [[op filenames] objectAtIndex:0];
|
|
||||||
[self addDirectory:directory];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)popupAddDirectoryMenu:(id)sender
|
|
||||||
{
|
|
||||||
if ([[_recentDirectories directories] count] == 0)
|
|
||||||
{
|
|
||||||
[self askForDirectory:sender];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
NSMenu *m = [addButtonPopUp menu];
|
|
||||||
while ([m numberOfItems] > 0)
|
|
||||||
[m removeItemAtIndex:0];
|
|
||||||
NSMenuItem *mi = [m addItemWithTitle:@"Add New Directory..." action:@selector(askForDirectory:) keyEquivalent:@""];
|
|
||||||
[mi setTarget:self];
|
|
||||||
[m addItem:[NSMenuItem separatorItem]];
|
|
||||||
[_recentDirectories fillMenu:m];
|
|
||||||
[addButtonPopUp selectItem:nil];
|
|
||||||
[[addButtonPopUp cell] performClickWithFrame:[sender frame] inView:[sender superview]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)removeSelectedDirectory:(id)sender
|
|
||||||
{
|
|
||||||
[[self window] makeKeyAndOrderFront:nil];
|
|
||||||
if ([outlineView selectedRow] < 0)
|
|
||||||
return;
|
|
||||||
NSIndexPath *path = [outline selectedIndexPath];
|
|
||||||
NSInteger state = [outline intProperty:@"state" valueAtPath:path];
|
|
||||||
if (([path length] == 1) && (state != 2)) {
|
|
||||||
[_py removeDirectory:i2n([path indexAtPosition:0])];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
NSInteger newState = state == 2 ? 0 : 2; // If excluded, put it back
|
|
||||||
[outline setIntProperty:@"state" value:newState atPath:path];
|
|
||||||
[outlineView display];
|
|
||||||
}
|
|
||||||
[self refreshRemoveButtonText];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)toggleVisible:(id)sender
|
|
||||||
{
|
|
||||||
[[self window] makeKeyAndOrderFront:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
- (void)addDirectory:(NSString *)directory
|
|
||||||
{
|
|
||||||
NSInteger r = [[_py addDirectory:directory] intValue];
|
|
||||||
if (r) {
|
|
||||||
NSString *m;
|
|
||||||
switch (r) {
|
|
||||||
case 1: {
|
|
||||||
m = @"This directory already is in the list.";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case 2: {
|
|
||||||
m = @"This directory does not exist.";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
[Dialogs showMessage:m];
|
|
||||||
}
|
|
||||||
[_recentDirectories addDirectory:directory];
|
|
||||||
[[self window] makeKeyAndOrderFront:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)refreshRemoveButtonText
|
|
||||||
{
|
|
||||||
if ([outlineView selectedRow] < 0) {
|
|
||||||
[removeButton setEnabled:NO];
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
[removeButton setEnabled:YES];
|
|
||||||
NSInteger state = [outline intProperty:@"state" valueAtPath:[outline selectedIndexPath]];
|
|
||||||
NSString *buttonText = state == 2 ? @"Put Back" : @"Remove";
|
|
||||||
[removeButton setTitle:buttonText];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Delegate */
|
|
||||||
- (BOOL)panel:(id)sender shouldShowFilename:(NSString *)path
|
|
||||||
{
|
|
||||||
BOOL isdir;
|
|
||||||
[[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isdir];
|
|
||||||
return isdir;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Notifications */
|
|
||||||
|
|
||||||
- (void)directorySelectionChanged:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
[self refreshRemoveButtonText];
|
|
||||||
}
|
|
||||||
|
|
||||||
@end
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "HSWindowController.h"
|
|
||||||
#import "PyApp.h"
|
|
||||||
#import "PyProblemDialog.h"
|
|
||||||
#import "HSTable.h"
|
|
||||||
|
|
||||||
@interface ProblemDialog : HSWindowController
|
|
||||||
{
|
|
||||||
IBOutlet NSTableView *problemTableView;
|
|
||||||
|
|
||||||
HSTable *problemTable;
|
|
||||||
}
|
|
||||||
- (id)initWithPy:(PyApp *)aPy;
|
|
||||||
- (PyProblemDialog *)py;
|
|
||||||
|
|
||||||
- (IBAction)revealSelected:(id)sender;
|
|
||||||
@end
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "ProblemDialog.h"
|
|
||||||
#import "Utils.h"
|
|
||||||
|
|
||||||
@implementation ProblemDialog
|
|
||||||
- (id)initWithPy:(PyApp *)aPy
|
|
||||||
{
|
|
||||||
self = [super initWithNibName:@"ProblemDialog" pyClassName:@"PyProblemDialog" pyParent:aPy];
|
|
||||||
[self window]; //So the detailsTable is initialized.
|
|
||||||
problemTable = [[HSTable alloc] initWithPyClassName:@"PyProblemTable" pyParent:[self py] view:problemTableView];
|
|
||||||
[self connect];
|
|
||||||
[problemTable connect];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc
|
|
||||||
{
|
|
||||||
[problemTable disconnect];
|
|
||||||
[self disconnect];
|
|
||||||
[problemTable release];
|
|
||||||
[super dealloc];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (PyProblemDialog *)py
|
|
||||||
{
|
|
||||||
return (PyProblemDialog *)py;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)revealSelected:(id)sender
|
|
||||||
{
|
|
||||||
[[self py] revealSelected];
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "PyGUI.h"
|
|
||||||
|
|
||||||
@interface PyDetailsPanel : PyGUI
|
|
||||||
- (NSInteger)numberOfRows;
|
|
||||||
- (id)valueForColumn:(NSString *)column row:(NSInteger)row;
|
|
||||||
@end
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "PyOutline.h"
|
|
||||||
|
|
||||||
@interface PyDirectoryOutline : PyOutline
|
|
||||||
- (void)addDirectory:(NSString *)directoryPath;
|
|
||||||
@end
|
|
||||||
@@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "PyApp.h"
|
|
||||||
|
|
||||||
@interface PyDupeGuruBase : PyApp
|
|
||||||
//Actions
|
|
||||||
- (NSNumber *)addDirectory:(NSString *)name;
|
|
||||||
- (void)removeDirectory:(NSNumber *)index;
|
|
||||||
- (void)loadResults;
|
|
||||||
- (void)saveResults;
|
|
||||||
- (void)loadIgnoreList;
|
|
||||||
- (void)saveIgnoreList;
|
|
||||||
- (void)clearIgnoreList;
|
|
||||||
- (void)purgeIgnoreList;
|
|
||||||
- (NSString *)exportToXHTMLwithColumns:(NSArray *)aColIds;
|
|
||||||
- (void)invokeCommand:(NSString *)cmd;
|
|
||||||
|
|
||||||
- (NSNumber *)doScan;
|
|
||||||
|
|
||||||
- (void)toggleSelectedMark;
|
|
||||||
- (void)markAll;
|
|
||||||
- (void)markInvert;
|
|
||||||
- (void)markNone;
|
|
||||||
|
|
||||||
- (void)addSelectedToIgnoreList;
|
|
||||||
- (void)openSelected;
|
|
||||||
- (void)revealSelected;
|
|
||||||
- (void)makeSelectedReference;
|
|
||||||
- (void)applyFilter:(NSString *)filter;
|
|
||||||
|
|
||||||
- (void)copyOrMove:(NSNumber *)aCopy markedTo:(NSString *)destination recreatePath:(NSNumber *)aRecreateType;
|
|
||||||
- (void)deleteMarked;
|
|
||||||
- (void)removeMarked;
|
|
||||||
|
|
||||||
//Data
|
|
||||||
- (NSNumber *)getIgnoreListCount;
|
|
||||||
- (NSNumber *)getMarkCount;
|
|
||||||
- (BOOL)scanWasProblematic;
|
|
||||||
|
|
||||||
//Scanning options
|
|
||||||
- (void)setMinMatchPercentage:(NSNumber *)percentage;
|
|
||||||
- (void)setMixFileKind:(NSNumber *)mix_file_kind;
|
|
||||||
- (void)setEscapeFilterRegexp:(NSNumber *)escape_filter_regexp;
|
|
||||||
- (void)setRemoveEmptyFolders:(NSNumber *)remove_empty_folders;
|
|
||||||
- (void)setSizeThreshold:(NSInteger)size_threshold;
|
|
||||||
@end
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "PyGUI.h"
|
|
||||||
|
|
||||||
@interface PyProblemDialog : PyGUI
|
|
||||||
- (void)revealSelected;
|
|
||||||
@end
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "PyOutline.h"
|
|
||||||
|
|
||||||
@interface PyResultTree : PyOutline
|
|
||||||
- (BOOL)powerMarkerMode;
|
|
||||||
- (void)setPowerMarkerMode:(BOOL)aPowerMarkerMode;
|
|
||||||
- (BOOL)deltaValuesMode;
|
|
||||||
- (void)setDeltaValuesMode:(BOOL)aDeltaValuesMode;
|
|
||||||
|
|
||||||
- (NSString *)valueForPath:(NSArray *)aPath column:(NSInteger)aColumn;
|
|
||||||
- (BOOL)renameSelected:(NSString *)aNewName;
|
|
||||||
- (void)sortBy:(NSInteger)aIdentifier ascending:(BOOL)aAscending;
|
|
||||||
- (void)markSelected;
|
|
||||||
- (void)removeSelected;
|
|
||||||
- (NSArray *)rootChildrenCounts;
|
|
||||||
@end
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "PyGUI.h"
|
|
||||||
|
|
||||||
@interface PyStatsLabel : PyGUI
|
|
||||||
- (NSString *)display;
|
|
||||||
@end
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "HSOutline.h"
|
|
||||||
#import "PyResultTree.h"
|
|
||||||
|
|
||||||
@interface ResultOutline : HSOutline
|
|
||||||
{
|
|
||||||
NSIndexSet *_deltaColumns;
|
|
||||||
NSArray *_rootChildrenCounts;
|
|
||||||
}
|
|
||||||
- (PyResultTree *)py;
|
|
||||||
- (BOOL)powerMarkerMode;
|
|
||||||
- (void)setPowerMarkerMode:(BOOL)aPowerMarkerMode;
|
|
||||||
- (BOOL)deltaValuesMode;
|
|
||||||
- (void)setDeltaValuesMode:(BOOL)aDeltaValuesMode;
|
|
||||||
- (void)setDeltaColumns:(NSIndexSet *)aDeltaColumns;
|
|
||||||
- (NSInteger)selectedDupeCount;
|
|
||||||
- (void)removeSelected;
|
|
||||||
@end;
|
|
||||||
@@ -1,207 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "ResultOutline.h"
|
|
||||||
#import "Dialogs.h"
|
|
||||||
#import "Utils.h"
|
|
||||||
#import "Consts.h"
|
|
||||||
|
|
||||||
@implementation ResultOutline
|
|
||||||
- (id)initWithPyParent:(id)aPyParent view:(HSOutlineView *)aOutlineView
|
|
||||||
{
|
|
||||||
self = [super initWithPyClassName:@"PyResultOutline" pyParent:aPyParent view:aOutlineView];
|
|
||||||
_rootChildrenCounts = nil;
|
|
||||||
[self connect];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc
|
|
||||||
{
|
|
||||||
[self disconnect];
|
|
||||||
[_deltaColumns release];
|
|
||||||
[super dealloc];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (PyResultTree *)py
|
|
||||||
{
|
|
||||||
return (PyResultTree *)py;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
- (BOOL)powerMarkerMode
|
|
||||||
{
|
|
||||||
return [[self py] powerMarkerMode];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setPowerMarkerMode:(BOOL)aPowerMarkerMode
|
|
||||||
{
|
|
||||||
[[self py] setPowerMarkerMode:aPowerMarkerMode];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)deltaValuesMode
|
|
||||||
{
|
|
||||||
return [[self py] deltaValuesMode];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setDeltaValuesMode:(BOOL)aDeltaValuesMode
|
|
||||||
{
|
|
||||||
[[self py] setDeltaValuesMode:aDeltaValuesMode];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)setDeltaColumns:(NSIndexSet *)aDeltaColumns
|
|
||||||
{
|
|
||||||
[_deltaColumns release];
|
|
||||||
_deltaColumns = [aDeltaColumns retain];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSInteger)selectedDupeCount
|
|
||||||
{
|
|
||||||
NSArray *selected = [self selectedIndexPaths];
|
|
||||||
if ([self powerMarkerMode]) {
|
|
||||||
return [selected count];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
NSInteger r = 0;
|
|
||||||
for (NSIndexPath *path in selected) {
|
|
||||||
if ([path length] == 2) {
|
|
||||||
r++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)removeSelected
|
|
||||||
{
|
|
||||||
NSInteger selectedDupeCount = [self selectedDupeCount];
|
|
||||||
if (!selectedDupeCount)
|
|
||||||
return;
|
|
||||||
NSString *msg = [NSString stringWithFormat:@"You are about to remove %d files from results. Continue?",selectedDupeCount];
|
|
||||||
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
|
|
||||||
return;
|
|
||||||
[[self py] removeSelected];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Datasource */
|
|
||||||
- (NSInteger)outlineView:(NSOutlineView *)aOutlineView numberOfChildrenOfItem:(id)item
|
|
||||||
{
|
|
||||||
NSIndexPath *path = item;
|
|
||||||
if ((path != nil) && ([path length] == 1)) {
|
|
||||||
if (_rootChildrenCounts == nil) {
|
|
||||||
_rootChildrenCounts = [[[self py] rootChildrenCounts] retain];
|
|
||||||
}
|
|
||||||
NSInteger index = [path indexAtPosition:0];
|
|
||||||
return n2i([_rootChildrenCounts objectAtIndex:index]);
|
|
||||||
}
|
|
||||||
return [super outlineView:aOutlineView numberOfChildrenOfItem:item];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id)outlineView:(NSOutlineView *)outlineView objectValueForTableColumn:(NSTableColumn *)column byItem:(id)item
|
|
||||||
{
|
|
||||||
NSIndexPath *path = item;
|
|
||||||
NSString *identifier = [column identifier];
|
|
||||||
if ([identifier isEqual:@"marked"]) {
|
|
||||||
return b2n([self boolProperty:@"marked" valueAtPath:path]);
|
|
||||||
}
|
|
||||||
NSInteger columnId = [identifier integerValue];
|
|
||||||
return [[self py] valueForPath:p2a(path) column:columnId];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)outlineView:(NSOutlineView *)aOutlineView setObjectValue:(id)object forTableColumn:(NSTableColumn *)tableColumn byItem:(id)item
|
|
||||||
{
|
|
||||||
if ([[tableColumn identifier] isEqual:@"0"]) {
|
|
||||||
NSIndexPath *path = item;
|
|
||||||
NSString *oldName = [[self py] valueForPath:p2a(path) column:0];
|
|
||||||
NSString *newName = object;
|
|
||||||
if (![newName isEqual:oldName]) {
|
|
||||||
BOOL renamed = [[self py] renameSelected:newName];
|
|
||||||
if (!renamed) {
|
|
||||||
[Dialogs showMessage:[NSString stringWithFormat:@"The name '%@' already exists.", newName]];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[self refreshItemAtPath:path];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[super outlineView:aOutlineView setObjectValue:object forTableColumn:tableColumn byItem:item];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Delegate */
|
|
||||||
- (void)outlineView:(NSOutlineView *)aOutlineView didClickTableColumn:(NSTableColumn *)tableColumn
|
|
||||||
{
|
|
||||||
if ([[outlineView sortDescriptors] count] < 1)
|
|
||||||
return;
|
|
||||||
NSSortDescriptor *sd = [[outlineView sortDescriptors] objectAtIndex:0];
|
|
||||||
[[self py] sortBy:[[sd key] integerValue] ascending:[sd ascending]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)outlineView:(NSOutlineView *)outlineView willDisplayCell:(id)cell forTableColumn:(NSTableColumn *)tableColumn item:(id)item
|
|
||||||
{
|
|
||||||
NSIndexPath *path = item;
|
|
||||||
BOOL isMarkable = [self boolProperty:@"markable" valueAtPath:path];
|
|
||||||
if ([[tableColumn identifier] isEqual:@"marked"]) {
|
|
||||||
[cell setEnabled:isMarkable];
|
|
||||||
}
|
|
||||||
if ([cell isKindOfClass:[NSTextFieldCell class]]) {
|
|
||||||
// Determine if the text color will be blue due to directory being reference.
|
|
||||||
NSTextFieldCell *textCell = cell;
|
|
||||||
if (isMarkable) {
|
|
||||||
[textCell setTextColor:[NSColor blackColor]];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[textCell setTextColor:[NSColor blueColor]];
|
|
||||||
}
|
|
||||||
if (([self deltaValuesMode]) && ([self powerMarkerMode] || ([path length] > 1))) {
|
|
||||||
NSInteger i = [[tableColumn identifier] integerValue];
|
|
||||||
if ([_deltaColumns containsIndex:i]) {
|
|
||||||
[textCell setTextColor:[NSColor orangeColor]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)tableViewHadDeletePressed:(NSTableView *)tableView
|
|
||||||
{
|
|
||||||
[self removeSelected];
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)tableViewHadSpacePressed:(NSTableView *)tableView
|
|
||||||
{
|
|
||||||
[[self py] markSelected];
|
|
||||||
return YES;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* don't calls saveEdits and cancelEdits */
|
|
||||||
- (void)outlineViewDidEndEditing:(HSOutlineView *)outlineView
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)outlineViewCancelsEdition:(HSOutlineView *)outlineView
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Python --> Cocoa */
|
|
||||||
- (void)refresh /* Override */
|
|
||||||
{
|
|
||||||
[_rootChildrenCounts release];
|
|
||||||
_rootChildrenCounts = nil;
|
|
||||||
[super refresh];
|
|
||||||
[outlineView expandItem:nil expandChildren:YES];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)invalidateMarkings
|
|
||||||
{
|
|
||||||
for (NSMutableDictionary *props in [itemData objectEnumerator]) {
|
|
||||||
[props removeObjectForKey:@"marked"];
|
|
||||||
}
|
|
||||||
[outlineView setNeedsDisplay:YES];
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "HSOutlineView.h"
|
|
||||||
#import "StatsLabel.h"
|
|
||||||
#import "ResultOutline.h"
|
|
||||||
#import "ProblemDialog.h"
|
|
||||||
#import "PyDupeGuru.h"
|
|
||||||
|
|
||||||
@interface ResultWindowBase : NSWindowController
|
|
||||||
{
|
|
||||||
@protected
|
|
||||||
IBOutlet PyDupeGuruBase *py;
|
|
||||||
IBOutlet id app;
|
|
||||||
IBOutlet NSSegmentedControl *deltaSwitch;
|
|
||||||
IBOutlet HSOutlineView *matches;
|
|
||||||
IBOutlet NSSegmentedControl *pmSwitch;
|
|
||||||
IBOutlet NSTextField *stats;
|
|
||||||
IBOutlet NSMenu *columnsMenu;
|
|
||||||
IBOutlet NSSearchField *filterField;
|
|
||||||
|
|
||||||
NSMutableArray *_resultColumns;
|
|
||||||
NSWindowController *preferencesPanel;
|
|
||||||
ResultOutline *outline;
|
|
||||||
StatsLabel *statsLabel;
|
|
||||||
ProblemDialog *problemDialog;
|
|
||||||
}
|
|
||||||
/* Helpers */
|
|
||||||
- (void)fillColumnsMenu;
|
|
||||||
- (NSTableColumn *)getColumnForIdentifier:(NSInteger)aIdentifier title:(NSString *)aTitle width:(NSInteger)aWidth refCol:(NSTableColumn *)aColumn;
|
|
||||||
- (NSArray *)getColumnsOrder;
|
|
||||||
- (NSDictionary *)getColumnsWidth;
|
|
||||||
- (void)initResultColumns;
|
|
||||||
- (void)restoreColumnsPosition:(NSArray *)aColumnsOrder widths:(NSDictionary *)aColumnsWidth;
|
|
||||||
|
|
||||||
/* Actions */
|
|
||||||
- (IBAction)clearIgnoreList:(id)sender;
|
|
||||||
- (IBAction)changeDelta:(id)sender;
|
|
||||||
- (IBAction)changePowerMarker:(id)sender;
|
|
||||||
- (IBAction)copyMarked:(id)sender;
|
|
||||||
- (IBAction)deleteMarked:(id)sender;
|
|
||||||
- (IBAction)exportToXHTML:(id)sender;
|
|
||||||
- (IBAction)filter:(id)sender;
|
|
||||||
- (IBAction)ignoreSelected:(id)sender;
|
|
||||||
- (IBAction)invokeCustomCommand:(id)sender;
|
|
||||||
- (IBAction)markAll:(id)sender;
|
|
||||||
- (IBAction)markInvert:(id)sender;
|
|
||||||
- (IBAction)markNone:(id)sender;
|
|
||||||
- (IBAction)markSelected:(id)sender;
|
|
||||||
- (IBAction)moveMarked:(id)sender;
|
|
||||||
- (IBAction)openClicked:(id)sender;
|
|
||||||
- (IBAction)openSelected:(id)sender;
|
|
||||||
- (IBAction)removeMarked:(id)sender;
|
|
||||||
- (IBAction)removeSelected:(id)sender;
|
|
||||||
- (IBAction)renameSelected:(id)sender;
|
|
||||||
- (IBAction)resetColumnsToDefault:(id)sender;
|
|
||||||
- (IBAction)revealSelected:(id)sender;
|
|
||||||
- (IBAction)showPreferencesPanel:(id)sender;
|
|
||||||
- (IBAction)startDuplicateScan:(id)sender;
|
|
||||||
- (IBAction)switchSelected:(id)sender;
|
|
||||||
- (IBAction)toggleColumn:(id)sender;
|
|
||||||
- (IBAction)toggleDelta:(id)sender;
|
|
||||||
- (IBAction)toggleDetailsPanel:(id)sender;
|
|
||||||
- (IBAction)togglePowerMarker:(id)sender;
|
|
||||||
|
|
||||||
/* Notifications */
|
|
||||||
- (void)jobCompleted:(NSNotification *)aNotification;
|
|
||||||
@end
|
|
||||||
@@ -1,433 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "ResultWindow.h"
|
|
||||||
#import "Dialogs.h"
|
|
||||||
#import "ProgressController.h"
|
|
||||||
#import "Utils.h"
|
|
||||||
#import "RegistrationInterface.h"
|
|
||||||
#import "AppDelegate.h"
|
|
||||||
#import "Consts.h"
|
|
||||||
|
|
||||||
@implementation ResultWindowBase
|
|
||||||
- (void)awakeFromNib
|
|
||||||
{
|
|
||||||
[self window];
|
|
||||||
preferencesPanel = [[NSWindowController alloc] initWithWindowNibName:@"Preferences"];
|
|
||||||
outline = [[ResultOutline alloc] initWithPyParent:py view:matches];
|
|
||||||
statsLabel = [[StatsLabel alloc] initWithPyParent:py labelView:stats];
|
|
||||||
problemDialog = [[ProblemDialog alloc] initWithPy:py];
|
|
||||||
[self initResultColumns];
|
|
||||||
[self fillColumnsMenu];
|
|
||||||
[deltaSwitch setSelectedSegment:0];
|
|
||||||
[pmSwitch setSelectedSegment:0];
|
|
||||||
[matches setTarget:self];
|
|
||||||
[matches setDoubleAction:@selector(openClicked:)];
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(registrationRequired:) name:RegistrationRequired object:nil];
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jobCompleted:) name:JobCompletedNotification object:nil];
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jobStarted:) name:JobStarted object:nil];
|
|
||||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(jobInProgress:) name:JobInProgress object:nil];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc
|
|
||||||
{
|
|
||||||
[outline release];
|
|
||||||
[preferencesPanel release];
|
|
||||||
[statsLabel release];
|
|
||||||
[problemDialog release];
|
|
||||||
[super dealloc];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Helpers */
|
|
||||||
- (void)fillColumnsMenu
|
|
||||||
{
|
|
||||||
// The columns menu is supposed to be empty and initResultColumns must have been called
|
|
||||||
for (NSTableColumn *col in _resultColumns)
|
|
||||||
{
|
|
||||||
NSMenuItem *mi = [columnsMenu addItemWithTitle:[[col headerCell] stringValue] action:@selector(toggleColumn:) keyEquivalent:@""];
|
|
||||||
[mi setTag:[[col identifier] integerValue]];
|
|
||||||
[mi setTarget:self];
|
|
||||||
if ([[matches tableColumns] containsObject:col])
|
|
||||||
[mi setState:NSOnState];
|
|
||||||
}
|
|
||||||
[columnsMenu addItem:[NSMenuItem separatorItem]];
|
|
||||||
NSMenuItem *mi = [columnsMenu addItemWithTitle:@"Reset to Default" action:@selector(resetColumnsToDefault:) keyEquivalent:@""];
|
|
||||||
[mi setTarget:self];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSTableColumn *)getColumnForIdentifier:(NSInteger)aIdentifier title:(NSString *)aTitle width:(NSInteger)aWidth refCol:(NSTableColumn *)aColumn
|
|
||||||
{
|
|
||||||
NSNumber *n = [NSNumber numberWithInteger:aIdentifier];
|
|
||||||
NSTableColumn *col = [[NSTableColumn alloc] initWithIdentifier:[n stringValue]];
|
|
||||||
[col setWidth:aWidth];
|
|
||||||
[col setEditable:NO];
|
|
||||||
[[col dataCell] setFont:[[aColumn dataCell] font]];
|
|
||||||
[[col headerCell] setStringValue:aTitle];
|
|
||||||
[col setResizingMask:NSTableColumnUserResizingMask];
|
|
||||||
[col setSortDescriptorPrototype:[[NSSortDescriptor alloc] initWithKey:[n stringValue] ascending:YES]];
|
|
||||||
return col;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Returns an array of identifiers, in order.
|
|
||||||
- (NSArray *)getColumnsOrder
|
|
||||||
{
|
|
||||||
NSMutableArray *result = [NSMutableArray array];
|
|
||||||
for (NSTableColumn *col in [matches tableColumns]) {
|
|
||||||
NSString *colId = [col identifier];
|
|
||||||
[result addObject:colId];
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSDictionary *)getColumnsWidth
|
|
||||||
{
|
|
||||||
NSMutableDictionary *result = [NSMutableDictionary dictionary];
|
|
||||||
for (NSTableColumn *col in [matches tableColumns]) {
|
|
||||||
NSString *colId = [col identifier];
|
|
||||||
NSNumber *width = [NSNumber numberWithDouble:[col width]];
|
|
||||||
[result setObject:width forKey:colId];
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)initResultColumns
|
|
||||||
{
|
|
||||||
// Virtual
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)restoreColumnsPosition:(NSArray *)aColumnsOrder widths:(NSDictionary *)aColumnsWidth
|
|
||||||
{
|
|
||||||
for (NSMenuItem *mi in [columnsMenu itemArray]) {
|
|
||||||
if ([mi state] == NSOnState) {
|
|
||||||
[self toggleColumn:mi];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
//Add columns and set widths
|
|
||||||
for (NSString *colId in aColumnsOrder) {
|
|
||||||
NSInteger colIndex = [colId integerValue];
|
|
||||||
if ((colIndex == 0) && (![colId isEqual:@"0"])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
NSTableColumn *col = [_resultColumns objectAtIndex:colIndex];
|
|
||||||
NSNumber *width = [aColumnsWidth objectForKey:[col identifier]];
|
|
||||||
NSMenuItem *mi = [columnsMenu itemWithTag:colIndex];
|
|
||||||
if (width) {
|
|
||||||
[col setWidth:[width floatValue]];
|
|
||||||
}
|
|
||||||
[self toggleColumn:mi];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Actions */
|
|
||||||
- (IBAction)clearIgnoreList:(id)sender
|
|
||||||
{
|
|
||||||
NSInteger i = n2i([py getIgnoreListCount]);
|
|
||||||
if (!i)
|
|
||||||
return;
|
|
||||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"Do you really want to remove all %d items from the ignore list?",i]] == NSAlertSecondButtonReturn) // NO
|
|
||||||
return;
|
|
||||||
[py clearIgnoreList];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)changeDelta:(id)sender
|
|
||||||
{
|
|
||||||
[outline setDeltaValuesMode:[deltaSwitch selectedSegment] == 1];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)changePowerMarker:(id)sender
|
|
||||||
{
|
|
||||||
[outline setPowerMarkerMode:[pmSwitch selectedSegment] == 1];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)copyMarked:(id)sender
|
|
||||||
{
|
|
||||||
NSInteger mark_count = [[py getMarkCount] intValue];
|
|
||||||
if (!mark_count)
|
|
||||||
return;
|
|
||||||
NSOpenPanel *op = [NSOpenPanel openPanel];
|
|
||||||
[op setCanChooseFiles:NO];
|
|
||||||
[op setCanChooseDirectories:YES];
|
|
||||||
[op setCanCreateDirectories:YES];
|
|
||||||
[op setAllowsMultipleSelection:NO];
|
|
||||||
[op setTitle:@"Select a directory to copy marked files to"];
|
|
||||||
if ([op runModalForTypes:nil] == NSOKButton)
|
|
||||||
{
|
|
||||||
NSString *directory = [[op filenames] objectAtIndex:0];
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
[py copyOrMove:b2n(YES) markedTo:directory recreatePath:[ud objectForKey:@"recreatePathType"]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)deleteMarked:(id)sender
|
|
||||||
{
|
|
||||||
NSInteger mark_count = [[py getMarkCount] intValue];
|
|
||||||
if (!mark_count)
|
|
||||||
return;
|
|
||||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"You are about to send %d files to Trash. Continue?",mark_count]] == NSAlertSecondButtonReturn) // NO
|
|
||||||
return;
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
[py setRemoveEmptyFolders:[ud objectForKey:@"removeEmptyFolders"]];
|
|
||||||
[py deleteMarked];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)exportToXHTML:(id)sender
|
|
||||||
{
|
|
||||||
NSString *exported = [py exportToXHTMLwithColumns:[self getColumnsOrder]];
|
|
||||||
[[NSWorkspace sharedWorkspace] openFile:exported];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)filter:(id)sender
|
|
||||||
{
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
[py setEscapeFilterRegexp:b2n(!n2b([ud objectForKey:@"useRegexpFilter"]))];
|
|
||||||
[py applyFilter:[filterField stringValue]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)ignoreSelected:(id)sender
|
|
||||||
{
|
|
||||||
NSInteger selectedDupeCount = [outline selectedDupeCount];
|
|
||||||
if (!selectedDupeCount)
|
|
||||||
return;
|
|
||||||
NSString *msg = [NSString stringWithFormat:@"All selected %d matches are going to be ignored in all subsequent scans. Continue?",selectedDupeCount];
|
|
||||||
if ([Dialogs askYesNo:msg] == NSAlertSecondButtonReturn) // NO
|
|
||||||
return;
|
|
||||||
[py addSelectedToIgnoreList];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)invokeCustomCommand:(id)sender
|
|
||||||
{
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
NSString *cmd = [ud stringForKey:@"CustomCommand"];
|
|
||||||
if ((cmd != nil) && ([cmd length] > 0)) {
|
|
||||||
[py invokeCommand:cmd];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[Dialogs showMessage:@"You have no custom command set up. Set it up in your preferences."];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)markAll:(id)sender
|
|
||||||
{
|
|
||||||
[py markAll];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)markInvert:(id)sender
|
|
||||||
{
|
|
||||||
[py markInvert];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)markNone:(id)sender
|
|
||||||
{
|
|
||||||
[py markNone];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)markSelected:(id)sender
|
|
||||||
{
|
|
||||||
[py toggleSelectedMark];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)moveMarked:(id)sender
|
|
||||||
{
|
|
||||||
NSInteger mark_count = [[py getMarkCount] intValue];
|
|
||||||
if (!mark_count)
|
|
||||||
return;
|
|
||||||
NSOpenPanel *op = [NSOpenPanel openPanel];
|
|
||||||
[op setCanChooseFiles:NO];
|
|
||||||
[op setCanChooseDirectories:YES];
|
|
||||||
[op setCanCreateDirectories:YES];
|
|
||||||
[op setAllowsMultipleSelection:NO];
|
|
||||||
[op setTitle:@"Select a directory to move marked files to"];
|
|
||||||
if ([op runModalForTypes:nil] == NSOKButton)
|
|
||||||
{
|
|
||||||
NSString *directory = [[op filenames] objectAtIndex:0];
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
[py setRemoveEmptyFolders:[ud objectForKey:@"removeEmptyFolders"]];
|
|
||||||
[py copyOrMove:b2n(NO) markedTo:directory recreatePath:[ud objectForKey:@"recreatePathType"]];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)openClicked:(id)sender
|
|
||||||
{
|
|
||||||
if ([matches clickedRow] < 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
[matches selectRowIndexes:[NSIndexSet indexSetWithIndex:[matches clickedRow]] byExtendingSelection:NO];
|
|
||||||
[py openSelected];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)openSelected:(id)sender
|
|
||||||
{
|
|
||||||
[py openSelected];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)removeMarked:(id)sender
|
|
||||||
{
|
|
||||||
int mark_count = [[py getMarkCount] intValue];
|
|
||||||
if (!mark_count)
|
|
||||||
return;
|
|
||||||
if ([Dialogs askYesNo:[NSString stringWithFormat:@"You are about to remove %d files from results. Continue?",mark_count]] == NSAlertSecondButtonReturn) // NO
|
|
||||||
return;
|
|
||||||
[py removeMarked];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)removeSelected:(id)sender
|
|
||||||
{
|
|
||||||
[outline removeSelected];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)renameSelected:(id)sender
|
|
||||||
{
|
|
||||||
NSInteger col = [matches columnWithIdentifier:@"0"];
|
|
||||||
NSInteger row = [matches selectedRow];
|
|
||||||
[matches editColumn:col row:row withEvent:[NSApp currentEvent] select:YES];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)resetColumnsToDefault:(id)sender
|
|
||||||
{
|
|
||||||
// Virtual
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)revealSelected:(id)sender
|
|
||||||
{
|
|
||||||
[py revealSelected];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)showPreferencesPanel:(id)sender
|
|
||||||
{
|
|
||||||
[preferencesPanel showWindow:sender];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)startDuplicateScan:(id)sender
|
|
||||||
{
|
|
||||||
// Virtual
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)switchSelected:(id)sender
|
|
||||||
{
|
|
||||||
[py makeSelectedReference];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)toggleColumn:(id)sender
|
|
||||||
{
|
|
||||||
NSMenuItem *mi = sender;
|
|
||||||
NSString *colId = [NSString stringWithFormat:@"%d",[mi tag]];
|
|
||||||
NSTableColumn *col = [matches tableColumnWithIdentifier:colId];
|
|
||||||
if (col == nil)
|
|
||||||
{
|
|
||||||
//Add Column
|
|
||||||
col = [_resultColumns objectAtIndex:[mi tag]];
|
|
||||||
[matches addTableColumn:col];
|
|
||||||
[mi setState:NSOnState];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//Remove column
|
|
||||||
[matches removeTableColumn:col];
|
|
||||||
[mi setState:NSOffState];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)toggleDelta:(id)sender
|
|
||||||
{
|
|
||||||
if ([deltaSwitch selectedSegment] == 1)
|
|
||||||
[deltaSwitch setSelectedSegment:0];
|
|
||||||
else
|
|
||||||
[deltaSwitch setSelectedSegment:1];
|
|
||||||
[self changeDelta:sender];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)toggleDetailsPanel:(id)sender
|
|
||||||
{
|
|
||||||
[[(AppDelegateBase *)app detailsPanel] toggleVisibility];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)togglePowerMarker:(id)sender
|
|
||||||
{
|
|
||||||
if ([pmSwitch selectedSegment] == 1)
|
|
||||||
[pmSwitch setSelectedSegment:0];
|
|
||||||
else
|
|
||||||
[pmSwitch setSelectedSegment:1];
|
|
||||||
[self changePowerMarker:sender];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Notifications */
|
|
||||||
- (void)windowWillClose:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
[NSApp hide:NSApp];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)jobCompleted:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
id lastAction = [[ProgressController mainProgressController] jobId];
|
|
||||||
if ([lastAction isEqualTo:jobCopy]) {
|
|
||||||
if ([py scanWasProblematic]) {
|
|
||||||
[problemDialog showWindow:self];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[Dialogs showMessage:@"All marked files were copied sucessfully."];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ([lastAction isEqualTo:jobMove]) {
|
|
||||||
if ([py scanWasProblematic]) {
|
|
||||||
[problemDialog showWindow:self];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[Dialogs showMessage:@"All marked files were moved sucessfully."];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ([lastAction isEqualTo:jobDelete]) {
|
|
||||||
if ([py scanWasProblematic]) {
|
|
||||||
[problemDialog showWindow:self];
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
[Dialogs showMessage:@"All marked files were sucessfully sent to Trash."];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if ([lastAction isEqualTo:jobScan]) {
|
|
||||||
NSInteger groupCount = [outline intProperty:@"children_count" valueAtPath:nil];
|
|
||||||
if (groupCount == 0)
|
|
||||||
[Dialogs showMessage:@"No duplicates found."];
|
|
||||||
}
|
|
||||||
|
|
||||||
// Re-activate toolbar items right after the progress bar stops showing instead of waiting until
|
|
||||||
// a mouse-over is performed
|
|
||||||
[[[self window] toolbar] validateVisibleItems];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)jobInProgress:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
[Dialogs showMessage:@"A previous action is still hanging in there. You can't start a new one yet. Wait a few seconds, then try again."];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)jobStarted:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
NSDictionary *ui = [aNotification userInfo];
|
|
||||||
NSString *desc = [ui valueForKey:@"desc"];
|
|
||||||
[[ProgressController mainProgressController] setJobDesc:desc];
|
|
||||||
NSString *jobid = [ui valueForKey:@"jobid"];
|
|
||||||
[[ProgressController mainProgressController] setJobId:jobid];
|
|
||||||
[[ProgressController mainProgressController] showSheetForParent:[self window]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)registrationRequired:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
NSString *msg = @"This is a demo version, which only allows you 10 delete/copy/move actions per session. You cannot continue.";
|
|
||||||
[Dialogs showMessage:msg];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)validateToolbarItem:(NSToolbarItem *)theItem
|
|
||||||
{
|
|
||||||
return ![[ProgressController mainProgressController] isShown];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (BOOL)validateMenuItem:(NSMenuItem *)item
|
|
||||||
{
|
|
||||||
return ![[ProgressController mainProgressController] isShown];
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "HSGUIController.h"
|
|
||||||
#import "PyStatsLabel.h"
|
|
||||||
|
|
||||||
@interface StatsLabel : HSGUIController
|
|
||||||
{
|
|
||||||
NSTextField *labelView;
|
|
||||||
}
|
|
||||||
- (id)initWithPyParent:(id)aPyParent labelView:(NSTextField *)aLabelView;
|
|
||||||
- (PyStatsLabel *)py;
|
|
||||||
@end
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "StatsLabel.h"
|
|
||||||
#import "Utils.h"
|
|
||||||
|
|
||||||
@implementation StatsLabel
|
|
||||||
- (id)initWithPyParent:(id)aPyParent labelView:(NSTextField *)aLabelView
|
|
||||||
{
|
|
||||||
self = [super initWithPyClassName:@"PyStatsLabel" pyParent:aPyParent];
|
|
||||||
labelView = [aLabelView retain];
|
|
||||||
[self connect];
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (void)dealloc
|
|
||||||
{
|
|
||||||
[self disconnect];
|
|
||||||
[labelView release];
|
|
||||||
[super dealloc];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (PyStatsLabel *)py
|
|
||||||
{
|
|
||||||
return (PyStatsLabel *)py;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Python --> Cocoa */
|
|
||||||
- (void)refresh
|
|
||||||
{
|
|
||||||
[labelView setStringValue:[[self py] display]];
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
17
cocoa/dg_cocoa.py
Normal file
17
cocoa/dg_cocoa.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
#
|
||||||
|
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
# which should be included with this package. The terms are also available at
|
||||||
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
from hscommon.trans import install_gettext_trans_under_cocoa
|
||||||
|
install_gettext_trans_under_cocoa()
|
||||||
|
|
||||||
|
from cocoa.inter import PySelectableList, PyColumns, PyTable
|
||||||
|
|
||||||
|
from inter.all import *
|
||||||
|
from inter.app import PyDupeGuru
|
||||||
|
|
||||||
|
# When built under virtualenv, the dependency collector misses this module, so we have to force it
|
||||||
|
# to see the module.
|
||||||
|
import distutils.sysconfig
|
||||||
140
cocoa/en.lproj/Localizable.strings
Normal file
140
cocoa/en.lproj/Localizable.strings
Normal file
@@ -0,0 +1,140 @@
|
|||||||
|
|
||||||
|
"%@ Results" = "%@ Results";
|
||||||
|
"About dupeGuru" = "About dupeGuru";
|
||||||
|
"Action" = "Action";
|
||||||
|
"Actions" = "Actions";
|
||||||
|
"Add criteria to the right box and click OK to send the dupes that correspond the best to these criteria to their respective group's reference position. Read the help file for more information." = "Add criteria to the right box and click OK to send the dupes that correspond the best to these criteria to their respective group's reference position. Read the help file for more information.";
|
||||||
|
"Add New Folder..." = "Add New Folder...";
|
||||||
|
"Add Selected to Ignore List" = "Add Selected to Ignore List";
|
||||||
|
"Advanced" = "Advanced";
|
||||||
|
"After having deleted a duplicate, place a link targeting the reference file to replace the deleted file." = "After having deleted a duplicate, place a link targeting the reference file to replace the deleted file.";
|
||||||
|
"Album" = "Album";
|
||||||
|
"Application Mode:" = "Application Mode:";
|
||||||
|
"Artist" = "Artist";
|
||||||
|
"Attribute" = "Attribute";
|
||||||
|
"Automatically check for updates" = "Automatically check for updates";
|
||||||
|
"Basic" = "Basic";
|
||||||
|
"Bring All to Front" = "Bring All to Front";
|
||||||
|
"Can mix file kind" = "Can mix file kind";
|
||||||
|
"Cancel" = "Cancel";
|
||||||
|
"Check for update..." = "Check for update...";
|
||||||
|
"Clear" = "Clear";
|
||||||
|
"Clear Picture Cache" = "Clear Picture Cache";
|
||||||
|
"Close" = "Close";
|
||||||
|
"Close Window" = "Close Window";
|
||||||
|
"Columns" = "Columns";
|
||||||
|
"Copy" = "Copy";
|
||||||
|
"Copy and Move:" = "Copy and Move:";
|
||||||
|
"Copy Marked to..." = "Copy Marked to...";
|
||||||
|
"Custom command (arguments: %d for dupe, %r for ref):" = "Custom command (arguments: %d for dupe, %r for ref):";
|
||||||
|
"Cut" = "Cut";
|
||||||
|
"Debug mode (restart required)" = "Debug mode (restart required)";
|
||||||
|
"Deletion Options" = "Deletion Options";
|
||||||
|
"Delta" = "Delta";
|
||||||
|
"Details" = "Details";
|
||||||
|
"Details of Selected File" = "Details of Selected File";
|
||||||
|
"Details Panel" = "Details Panel";
|
||||||
|
"Directly delete files" = "Directly delete files";
|
||||||
|
"Directories" = "Directories";
|
||||||
|
"Do you really want to remove all your cached picture analysis?" = "Do you really want to remove all your cached picture analysis?";
|
||||||
|
"dupeGuru" = "dupeGuru";
|
||||||
|
"dupeGuru Help" = "dupeGuru Help";
|
||||||
|
"dupeGuru Preferences" = "dupeGuru Preferences";
|
||||||
|
"dupeGuru Results" = "dupeGuru Results";
|
||||||
|
"dupeGuru Website" = "dupeGuru Website";
|
||||||
|
"Dupes Only" = "Dupes Only";
|
||||||
|
"Edit" = "Edit";
|
||||||
|
"Excluded" = "Excluded";
|
||||||
|
"Export Results to CSV" = "Export Results to CSV";
|
||||||
|
"Export Results to XHTML" = "Export Results to XHTML";
|
||||||
|
"Fewer results" = "Fewer results";
|
||||||
|
"File" = "File";
|
||||||
|
"Filter" = "Filter";
|
||||||
|
"Filter hardness:" = "Filter hardness:";
|
||||||
|
"Filter Results..." = "Filter Results...";
|
||||||
|
"Folder Selection Window" = "Folder Selection Window";
|
||||||
|
"Font Size:" = "Font Size:";
|
||||||
|
"Genre" = "Genre";
|
||||||
|
"Help" = "Help";
|
||||||
|
"Hide dupeGuru" = "Hide dupeGuru";
|
||||||
|
"Hide Others" = "Hide Others";
|
||||||
|
"Ignore duplicates hardlinking to the same file" = "Ignore duplicates hardlinking to the same file";
|
||||||
|
"Ignore files smaller than:" = "Ignore files smaller than:";
|
||||||
|
"Ignore List" = "Ignore List";
|
||||||
|
"Instead of sending files to trash, delete them directly. This option is usually used as a workaround when the normal deletion method doesn't work." = "Instead of sending files to trash, delete them directly. This option is usually used as a workaround when the normal deletion method doesn't work.";
|
||||||
|
"Invert Marking" = "Invert Marking";
|
||||||
|
"Invoke Custom Command" = "Invoke Custom Command";
|
||||||
|
"KB" = "KB";
|
||||||
|
"Link deleted files" = "Link deleted files";
|
||||||
|
"Load from file..." = "Load from file...";
|
||||||
|
"Load Recent Results" = "Load Recent Results";
|
||||||
|
"Load Results" = "Load Results";
|
||||||
|
"Load Results..." = "Load Results...";
|
||||||
|
"Make Selected into Reference" = "Make Selected into Reference";
|
||||||
|
"Mark All" = "Mark All";
|
||||||
|
"Mark None" = "Mark None";
|
||||||
|
"Mark Selected" = "Mark Selected";
|
||||||
|
"Match pictures of different dimensions" = "Match pictures of different dimensions";
|
||||||
|
"Match similar words" = "Match similar words";
|
||||||
|
"Minimize" = "Minimize";
|
||||||
|
"Mode" = "Mode";
|
||||||
|
"More results" = "More results";
|
||||||
|
"Move Marked to..." = "Move Marked to...";
|
||||||
|
"Music" = "Music";
|
||||||
|
"Name" = "Name";
|
||||||
|
"Normal" = "Normal";
|
||||||
|
"Ok" = "Ok";
|
||||||
|
"Open Selected with Default Application" = "Open Selected with Default Application";
|
||||||
|
"Options" = "Options";
|
||||||
|
"Paste" = "Paste";
|
||||||
|
"Picture" = "Picture";
|
||||||
|
"Preferences..." = "Preferences...";
|
||||||
|
"Problems!" = "Problems!";
|
||||||
|
"Proceed" = "Proceed";
|
||||||
|
"Quick Look" = "Quick Look";
|
||||||
|
"Quit dupeGuru" = "Quit dupeGuru";
|
||||||
|
"Re-Prioritize duplicates" = "Re-Prioritize duplicates";
|
||||||
|
"Re-Prioritize Results..." = "Re-Prioritize Results...";
|
||||||
|
"Recreate absolute path" = "Recreate absolute path";
|
||||||
|
"Recreate relative path" = "Recreate relative path";
|
||||||
|
"Reference" = "Reference";
|
||||||
|
"Remove empty folders on delete or move" = "Remove empty folders on delete or move";
|
||||||
|
"Remove Marked from Results" = "Remove Marked from Results";
|
||||||
|
"Remove Selected" = "Remove Selected";
|
||||||
|
"Remove Selected from Results" = "Remove Selected from Results";
|
||||||
|
"Rename Selected" = "Rename Selected";
|
||||||
|
"Reset to Default" = "Reset to Default";
|
||||||
|
"Reset To Defaults" = "Reset To Defaults";
|
||||||
|
"Results Window" = "Results Window";
|
||||||
|
"Reveal" = "Reveal";
|
||||||
|
"Reveal Selected in Finder" = "Reveal Selected in Finder";
|
||||||
|
"Right in destination" = "Right in destination";
|
||||||
|
"Save Results..." = "Save Results...";
|
||||||
|
"Scan" = "Scan";
|
||||||
|
"Scan Type:" = "Scan Type:";
|
||||||
|
"Select a file to save your results to" = "Select a file to save your results to";
|
||||||
|
"Select a folder to add to the scanning list" = "Select a folder to add to the scanning list";
|
||||||
|
"Select a results file to load" = "Select a results file to load";
|
||||||
|
"Select All" = "Select All";
|
||||||
|
"Select folders to scan and press \"Scan\"." = "Select folders to scan and press \"Scan\".";
|
||||||
|
"Selected" = "Selected";
|
||||||
|
"Send Marked to Trash..." = "Send Marked to Trash...";
|
||||||
|
"Services" = "Services";
|
||||||
|
"Show All" = "Show All";
|
||||||
|
"Show Delta Values" = "Show Delta Values";
|
||||||
|
"Show Dupes Only" = "Show Dupes Only";
|
||||||
|
"Standard" = "Standard";
|
||||||
|
"Start Duplicate Scan" = "Start Duplicate Scan";
|
||||||
|
"State" = "State";
|
||||||
|
"Tags to scan:" = "Tags to scan:";
|
||||||
|
"The name '%@' already exists." = "The name '%@' already exists.";
|
||||||
|
"There were problems processing some (or all) of the files. The cause of these problems are described in the table below. Those files were not removed from your results." = "There were problems processing some (or all) of the files. The cause of these problems are described in the table below. Those files were not removed from your results.";
|
||||||
|
"Title" = "Title";
|
||||||
|
"Track" = "Track";
|
||||||
|
"Use regular expressions when filtering" = "Use regular expressions when filtering";
|
||||||
|
"Window" = "Window";
|
||||||
|
"Word weighting" = "Word weighting";
|
||||||
|
"Year" = "Year";
|
||||||
|
"You have unsaved results, do you really want to continue?" = "You have unsaved results, do you really want to continue?";
|
||||||
|
"You have unsaved results, do you really want to quit?" = "You have unsaved results, do you really want to quit?";
|
||||||
|
"Zoom" = "Zoom";
|
||||||
10
cocoa/inter/all.py
Normal file
10
cocoa/inter/all.py
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
from cocoa.inter import PyTextField, PyProgressWindow
|
||||||
|
from .deletion_options import PyDeletionOptions
|
||||||
|
from .details_panel import PyDetailsPanel
|
||||||
|
from .directory_outline import PyDirectoryOutline
|
||||||
|
from .prioritize_dialog import PyPrioritizeDialog
|
||||||
|
from .prioritize_list import PyPrioritizeList
|
||||||
|
from .problem_dialog import PyProblemDialog
|
||||||
|
from .ignore_list_dialog import PyIgnoreListDialog
|
||||||
|
from .result_table import PyResultTable
|
||||||
|
from .stats_label import PyStatsLabel
|
||||||
251
cocoa/inter/app.py
Normal file
251
cocoa/inter/app.py
Normal file
@@ -0,0 +1,251 @@
|
|||||||
|
import logging
|
||||||
|
|
||||||
|
from objp.util import pyref, dontwrap
|
||||||
|
from hscommon.path import Path, pathify
|
||||||
|
from cocoa import install_exception_hook, install_cocoa_logger, patch_threaded_job_performer
|
||||||
|
from cocoa.inter import PyBaseApp, BaseAppView
|
||||||
|
|
||||||
|
import core.pe.photo
|
||||||
|
from core.app import DupeGuru as DupeGuruBase, AppMode
|
||||||
|
from .directories import Directories, Bundle
|
||||||
|
from .photo import Photo
|
||||||
|
|
||||||
|
class DupeGuru(DupeGuruBase):
|
||||||
|
def __init__(self, view):
|
||||||
|
DupeGuruBase.__init__(self, view)
|
||||||
|
self.directories = Directories()
|
||||||
|
|
||||||
|
def selected_dupe_path(self):
|
||||||
|
if not self.selected_dupes:
|
||||||
|
return None
|
||||||
|
return self.selected_dupes[0].path
|
||||||
|
|
||||||
|
def selected_dupe_ref_path(self):
|
||||||
|
if not self.selected_dupes:
|
||||||
|
return None
|
||||||
|
ref = self.results.get_group_of_duplicate(self.selected_dupes[0]).ref
|
||||||
|
if ref is self.selected_dupes[0]: # we don't want the same pic to be displayed on both sides
|
||||||
|
return None
|
||||||
|
return ref.path
|
||||||
|
|
||||||
|
def _get_fileclasses(self):
|
||||||
|
result = DupeGuruBase._get_fileclasses(self)
|
||||||
|
if self.app_mode == AppMode.Standard:
|
||||||
|
result = [Bundle] + result
|
||||||
|
return result
|
||||||
|
|
||||||
|
class DupeGuruView(BaseAppView):
|
||||||
|
def askYesNoWithPrompt_(self, prompt: str) -> bool: pass
|
||||||
|
def createResultsWindow(self): pass
|
||||||
|
def showResultsWindow(self): pass
|
||||||
|
def showProblemDialog(self): pass
|
||||||
|
def selectDestFolderWithPrompt_(self, prompt: str) -> str: pass
|
||||||
|
def selectDestFileWithPrompt_extension_(self, prompt: str, extension: str) -> str: pass
|
||||||
|
|
||||||
|
class PyDupeGuru(PyBaseApp):
|
||||||
|
@dontwrap
|
||||||
|
def __init__(self):
|
||||||
|
core.pe.photo.PLAT_SPECIFIC_PHOTO_CLASS = Photo
|
||||||
|
logging.basicConfig(level=logging.WARNING, format='%(levelname)s %(message)s')
|
||||||
|
install_exception_hook('https://github.com/hsoft/dupeguru/issues')
|
||||||
|
install_cocoa_logger()
|
||||||
|
patch_threaded_job_performer()
|
||||||
|
self.model = DupeGuru(self)
|
||||||
|
|
||||||
|
#---Sub-proxies
|
||||||
|
def detailsPanel(self) -> pyref:
|
||||||
|
return self.model.details_panel
|
||||||
|
|
||||||
|
def directoryTree(self) -> pyref:
|
||||||
|
return self.model.directory_tree
|
||||||
|
|
||||||
|
def problemDialog(self) -> pyref:
|
||||||
|
return self.model.problem_dialog
|
||||||
|
|
||||||
|
def statsLabel(self) -> pyref:
|
||||||
|
return self.model.stats_label
|
||||||
|
|
||||||
|
def resultTable(self) -> pyref:
|
||||||
|
return self.model.result_table
|
||||||
|
|
||||||
|
def ignoreListDialog(self) -> pyref:
|
||||||
|
return self.model.ignore_list_dialog
|
||||||
|
|
||||||
|
def progressWindow(self) -> pyref:
|
||||||
|
return self.model.progress_window
|
||||||
|
|
||||||
|
def deletionOptions(self) -> pyref:
|
||||||
|
return self.model.deletion_options
|
||||||
|
|
||||||
|
#---Directories
|
||||||
|
def addDirectory_(self, directory: str):
|
||||||
|
self.model.add_directory(directory)
|
||||||
|
|
||||||
|
#---Results
|
||||||
|
def doScan(self):
|
||||||
|
self.model.start_scanning()
|
||||||
|
|
||||||
|
def exportToXHTML(self):
|
||||||
|
self.model.export_to_xhtml()
|
||||||
|
|
||||||
|
def exportToCSV(self):
|
||||||
|
self.model.export_to_csv()
|
||||||
|
|
||||||
|
def loadSession(self):
|
||||||
|
self.model.load()
|
||||||
|
|
||||||
|
def loadResultsFrom_(self, filename: str):
|
||||||
|
self.model.load_from(filename)
|
||||||
|
|
||||||
|
def markAll(self):
|
||||||
|
self.model.mark_all()
|
||||||
|
|
||||||
|
def markNone(self):
|
||||||
|
self.model.mark_none()
|
||||||
|
|
||||||
|
def markInvert(self):
|
||||||
|
self.model.mark_invert()
|
||||||
|
|
||||||
|
def purgeIgnoreList(self):
|
||||||
|
self.model.purge_ignore_list()
|
||||||
|
|
||||||
|
def toggleSelectedMark(self):
|
||||||
|
self.model.toggle_selected_mark_state()
|
||||||
|
|
||||||
|
def saveSession(self):
|
||||||
|
self.model.save()
|
||||||
|
|
||||||
|
def saveResultsAs_(self, filename: str):
|
||||||
|
self.model.save_as(filename)
|
||||||
|
|
||||||
|
#---Actions
|
||||||
|
def addSelectedToIgnoreList(self):
|
||||||
|
self.model.add_selected_to_ignore_list()
|
||||||
|
|
||||||
|
def deleteMarked(self):
|
||||||
|
self.model.delete_marked()
|
||||||
|
|
||||||
|
def applyFilter_(self, filter: str):
|
||||||
|
self.model.apply_filter(filter)
|
||||||
|
|
||||||
|
def makeSelectedReference(self):
|
||||||
|
self.model.make_selected_reference()
|
||||||
|
|
||||||
|
def copyMarked(self):
|
||||||
|
self.model.copy_or_move_marked(copy=True)
|
||||||
|
|
||||||
|
def moveMarked(self):
|
||||||
|
self.model.copy_or_move_marked(copy=False)
|
||||||
|
|
||||||
|
def openSelected(self):
|
||||||
|
self.model.open_selected()
|
||||||
|
|
||||||
|
def removeMarked(self):
|
||||||
|
self.model.remove_marked()
|
||||||
|
|
||||||
|
def removeSelected(self):
|
||||||
|
self.model.remove_selected()
|
||||||
|
|
||||||
|
def revealSelected(self):
|
||||||
|
self.model.reveal_selected()
|
||||||
|
|
||||||
|
def invokeCustomCommand(self):
|
||||||
|
self.model.invoke_custom_command()
|
||||||
|
|
||||||
|
def showIgnoreList(self):
|
||||||
|
self.model.ignore_list_dialog.show()
|
||||||
|
|
||||||
|
def clearPictureCache(self):
|
||||||
|
self.model.clear_picture_cache()
|
||||||
|
|
||||||
|
#---Information
|
||||||
|
def getScanOptions(self) -> list:
|
||||||
|
return [o.label for o in self.model.SCANNER_CLASS.get_scan_options()]
|
||||||
|
|
||||||
|
def resultsAreModified(self) -> bool:
|
||||||
|
return self.model.results.is_modified
|
||||||
|
|
||||||
|
def getSelectedDupePath(self) -> str:
|
||||||
|
return str(self.model.selected_dupe_path())
|
||||||
|
|
||||||
|
def getSelectedDupeRefPath(self) -> str:
|
||||||
|
return str(self.model.selected_dupe_ref_path())
|
||||||
|
|
||||||
|
#---Properties
|
||||||
|
def getAppMode(self) -> int:
|
||||||
|
return self.model.app_mode
|
||||||
|
|
||||||
|
def setAppMode_(self, app_mode: int):
|
||||||
|
self.model.app_mode = app_mode
|
||||||
|
|
||||||
|
def setScanType_(self, scan_type_index: int):
|
||||||
|
scan_options = self.model.SCANNER_CLASS.get_scan_options()
|
||||||
|
try:
|
||||||
|
so = scan_options[scan_type_index]
|
||||||
|
self.model.options['scan_type'] = so.scan_type
|
||||||
|
except IndexError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
def setMinMatchPercentage_(self, percentage: int):
|
||||||
|
self.model.options['min_match_percentage'] = int(percentage)
|
||||||
|
|
||||||
|
def setWordWeighting_(self, words_are_weighted: bool):
|
||||||
|
self.model.options['word_weighting'] = words_are_weighted
|
||||||
|
|
||||||
|
def setMatchSimilarWords_(self, match_similar_words: bool):
|
||||||
|
self.model.options['match_similar_words'] = match_similar_words
|
||||||
|
|
||||||
|
def setSizeThreshold_(self, size_threshold: int):
|
||||||
|
self.model.options['size_threshold'] = size_threshold
|
||||||
|
|
||||||
|
def enable_scanForTag_(self, enable: bool, scan_tag: str):
|
||||||
|
if 'scanned_tags' not in self.model.options:
|
||||||
|
self.model.options['scanned_tags'] = set()
|
||||||
|
if enable:
|
||||||
|
self.model.options['scanned_tags'].add(scan_tag)
|
||||||
|
else:
|
||||||
|
self.model.options['scanned_tags'].discard(scan_tag)
|
||||||
|
|
||||||
|
def setMatchScaled_(self, match_scaled: bool):
|
||||||
|
self.model.options['match_scaled'] = match_scaled
|
||||||
|
|
||||||
|
def setMixFileKind_(self, mix_file_kind: bool):
|
||||||
|
self.model.options['mix_file_kind'] = mix_file_kind
|
||||||
|
|
||||||
|
def setEscapeFilterRegexp_(self, escape_filter_regexp: bool):
|
||||||
|
self.model.options['escape_filter_regexp'] = escape_filter_regexp
|
||||||
|
|
||||||
|
def setRemoveEmptyFolders_(self, remove_empty_folders: bool):
|
||||||
|
self.model.options['clean_empty_dirs'] = remove_empty_folders
|
||||||
|
|
||||||
|
def setIgnoreHardlinkMatches_(self, ignore_hardlink_matches: bool):
|
||||||
|
self.model.options['ignore_hardlink_matches'] = ignore_hardlink_matches
|
||||||
|
|
||||||
|
def setCopyMoveDestType_(self, copymove_dest_type: int):
|
||||||
|
self.model.options['copymove_dest_type'] = copymove_dest_type
|
||||||
|
|
||||||
|
#--- model --> view
|
||||||
|
@dontwrap
|
||||||
|
def ask_yes_no(self, prompt):
|
||||||
|
return self.callback.askYesNoWithPrompt_(prompt)
|
||||||
|
|
||||||
|
@dontwrap
|
||||||
|
def create_results_window(self):
|
||||||
|
self.callback.createResultsWindow()
|
||||||
|
|
||||||
|
@dontwrap
|
||||||
|
def show_results_window(self):
|
||||||
|
self.callback.showResultsWindow()
|
||||||
|
|
||||||
|
@dontwrap
|
||||||
|
def show_problem_dialog(self):
|
||||||
|
self.callback.showProblemDialog()
|
||||||
|
|
||||||
|
@dontwrap
|
||||||
|
def select_dest_folder(self, prompt):
|
||||||
|
return self.callback.selectDestFolderWithPrompt_(prompt)
|
||||||
|
|
||||||
|
@dontwrap
|
||||||
|
def select_dest_file(self, prompt, extension):
|
||||||
|
return self.callback.selectDestFileWithPrompt_extension_(prompt, extension)
|
||||||
|
|
||||||
37
cocoa/inter/deletion_options.py
Normal file
37
cocoa/inter/deletion_options.py
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
# Created On: 2012-05-30
|
||||||
|
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
#
|
||||||
|
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
# which should be included with this package. The terms are also available at
|
||||||
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
from objp.util import dontwrap
|
||||||
|
from cocoa.inter import PyGUIObject, GUIObjectView
|
||||||
|
|
||||||
|
class DeletionOptionsView(GUIObjectView):
|
||||||
|
def updateMsg_(self, msg: str): pass
|
||||||
|
def show(self) -> bool: pass
|
||||||
|
def setHardlinkOptionEnabled_(self, enabled: bool): pass
|
||||||
|
|
||||||
|
class PyDeletionOptions(PyGUIObject):
|
||||||
|
def setLinkDeleted_(self, link_deleted: bool):
|
||||||
|
self.model.link_deleted = link_deleted
|
||||||
|
|
||||||
|
def setUseHardlinks_(self, use_hardlinks: bool):
|
||||||
|
self.model.use_hardlinks = use_hardlinks
|
||||||
|
|
||||||
|
def setDirect_(self, direct: bool):
|
||||||
|
self.model.direct = direct
|
||||||
|
|
||||||
|
#--- model --> view
|
||||||
|
@dontwrap
|
||||||
|
def update_msg(self, msg):
|
||||||
|
self.callback.updateMsg_(msg)
|
||||||
|
|
||||||
|
@dontwrap
|
||||||
|
def show(self):
|
||||||
|
return self.callback.show()
|
||||||
|
|
||||||
|
@dontwrap
|
||||||
|
def set_hardlink_option_enabled(self, enabled):
|
||||||
|
self.callback.setHardlinkOptionEnabled_(enabled)
|
||||||
11
cocoa/inter/details_panel.py
Normal file
11
cocoa/inter/details_panel.py
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
from cocoa.inter import PyGUIObject, GUIObjectView
|
||||||
|
|
||||||
|
class DetailsPanelView(GUIObjectView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class PyDetailsPanel(PyGUIObject):
|
||||||
|
def numberOfRows(self) -> int:
|
||||||
|
return self.model.row_count()
|
||||||
|
|
||||||
|
def valueForColumn_row_(self, column: str, row: int) -> object:
|
||||||
|
return self.model.row(row)[int(column)]
|
||||||
53
cocoa/inter/directories.py
Normal file
53
cocoa/inter/directories.py
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
#
|
||||||
|
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
# which should be included with this package. The terms are also available at
|
||||||
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
from cocoa import proxy
|
||||||
|
from hscommon.path import Path, pathify
|
||||||
|
from core.se import fs
|
||||||
|
from core.directories import Directories as DirectoriesBase, DirectoryState
|
||||||
|
|
||||||
|
def is_bundle(str_path):
|
||||||
|
uti = proxy.getUTI_(str_path)
|
||||||
|
if uti is None:
|
||||||
|
logging.warning('There was an error trying to detect the UTI of %s', str_path)
|
||||||
|
return proxy.type_conformsToType_(uti, 'com.apple.bundle') or proxy.type_conformsToType_(uti, 'com.apple.package')
|
||||||
|
|
||||||
|
class Bundle(fs.Folder):
|
||||||
|
@classmethod
|
||||||
|
@pathify
|
||||||
|
def can_handle(cls, path: Path):
|
||||||
|
return not path.islink() and path.isdir() and is_bundle(str(path))
|
||||||
|
|
||||||
|
class Directories(DirectoriesBase):
|
||||||
|
ROOT_PATH_TO_EXCLUDE = list(map(Path, ['/Library', '/Volumes', '/System', '/bin', '/sbin', '/opt', '/private', '/dev']))
|
||||||
|
HOME_PATH_TO_EXCLUDE = [Path('Library')]
|
||||||
|
|
||||||
|
def _default_state_for_path(self, path):
|
||||||
|
result = DirectoriesBase._default_state_for_path(self, path)
|
||||||
|
if result is not None:
|
||||||
|
return result
|
||||||
|
if path in self.ROOT_PATH_TO_EXCLUDE:
|
||||||
|
return DirectoryState.Excluded
|
||||||
|
if path[:2] == Path('/Users') and path[3:] in self.HOME_PATH_TO_EXCLUDE:
|
||||||
|
return DirectoryState.Excluded
|
||||||
|
|
||||||
|
def _get_folders(self, from_folder, j):
|
||||||
|
# We don't want to scan bundle's subfolder even in Folders mode. Bundle's integrity has to
|
||||||
|
# stay intact.
|
||||||
|
if is_bundle(str(from_folder.path)):
|
||||||
|
# just yield the current folder and bail
|
||||||
|
state = self.get_state(from_folder.path)
|
||||||
|
if state != DirectoryState.Excluded:
|
||||||
|
from_folder.is_ref = state == DirectoryState.Reference
|
||||||
|
yield from_folder
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
yield from DirectoriesBase._get_folders(self, from_folder, j)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_subfolders(path):
|
||||||
|
result = DirectoriesBase.get_subfolders(path)
|
||||||
|
return [p for p in result if not is_bundle(str(p))]
|
||||||
21
cocoa/inter/directory_outline.py
Normal file
21
cocoa/inter/directory_outline.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
from objp.util import dontwrap
|
||||||
|
from cocoa.inter import PyOutline, GUIObjectView
|
||||||
|
|
||||||
|
class DirectoryOutlineView(GUIObjectView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class PyDirectoryOutline(PyOutline):
|
||||||
|
def addDirectory_(self, path: str):
|
||||||
|
self.model.add_directory(path)
|
||||||
|
|
||||||
|
def removeSelectedDirectory(self):
|
||||||
|
self.model.remove_selected()
|
||||||
|
|
||||||
|
def selectAll(self):
|
||||||
|
self.model.select_all()
|
||||||
|
|
||||||
|
# python --> cocoa
|
||||||
|
@dontwrap
|
||||||
|
def refresh_states(self):
|
||||||
|
# Under cocoa, both refresh() and refresh_states() do the same thing.
|
||||||
|
self.callback.refresh()
|
||||||
21
cocoa/inter/ignore_list_dialog.py
Normal file
21
cocoa/inter/ignore_list_dialog.py
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
from objp.util import pyref, dontwrap
|
||||||
|
from cocoa.inter import PyGUIObject, GUIObjectView
|
||||||
|
|
||||||
|
class IgnoreListDialogView(GUIObjectView):
|
||||||
|
def show(self): pass
|
||||||
|
|
||||||
|
class PyIgnoreListDialog(PyGUIObject):
|
||||||
|
def ignoreListTable(self) -> pyref:
|
||||||
|
return self.model.ignore_list_table
|
||||||
|
|
||||||
|
def removeSelected(self):
|
||||||
|
self.model.remove_selected()
|
||||||
|
|
||||||
|
def clear(self):
|
||||||
|
self.model.clear()
|
||||||
|
|
||||||
|
#--- model --> view
|
||||||
|
@dontwrap
|
||||||
|
def show(self):
|
||||||
|
self.callback.show()
|
||||||
|
|
||||||
35
cocoa/inter/photo.py
Normal file
35
cocoa/inter/photo.py
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Copyright 2016 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
#
|
||||||
|
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
# which should be included with this package. The terms are also available at
|
||||||
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
|
||||||
|
from cocoa import proxy
|
||||||
|
from core.pe import _block_osx
|
||||||
|
from core.pe.photo import Photo as PhotoBase
|
||||||
|
|
||||||
|
class Photo(PhotoBase):
|
||||||
|
HANDLED_EXTS = PhotoBase.HANDLED_EXTS.copy()
|
||||||
|
HANDLED_EXTS.update({'psd', 'nef', 'cr2', 'orf'})
|
||||||
|
|
||||||
|
def _plat_get_dimensions(self):
|
||||||
|
return _block_osx.get_image_size(str(self.path))
|
||||||
|
|
||||||
|
def _plat_get_blocks(self, block_count_per_side, orientation):
|
||||||
|
try:
|
||||||
|
blocks = _block_osx.getblocks(str(self.path), block_count_per_side, orientation)
|
||||||
|
except Exception as e:
|
||||||
|
raise IOError('The reading of "%s" failed with "%s"' % (str(self.path), str(e)))
|
||||||
|
if not blocks:
|
||||||
|
raise IOError('The picture %s could not be read' % str(self.path))
|
||||||
|
return blocks
|
||||||
|
|
||||||
|
def _get_exif_timestamp(self):
|
||||||
|
exifdata = proxy.readExifData_(str(self.path))
|
||||||
|
if exifdata:
|
||||||
|
try:
|
||||||
|
return exifdata['{Exif}']['DateTimeOriginal']
|
||||||
|
except KeyError:
|
||||||
|
return ''
|
||||||
|
else:
|
||||||
|
return ''
|
||||||
29
cocoa/inter/prioritize_dialog.py
Normal file
29
cocoa/inter/prioritize_dialog.py
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
from objp.util import pyref
|
||||||
|
from cocoa.inter import PyGUIObject, GUIObjectView
|
||||||
|
from core.gui.prioritize_dialog import PrioritizeDialog
|
||||||
|
|
||||||
|
class PrioritizeDialogView(GUIObjectView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class PyPrioritizeDialog(PyGUIObject):
|
||||||
|
def __init__(self, app: pyref):
|
||||||
|
model = PrioritizeDialog(app.model)
|
||||||
|
PyGUIObject.__init__(self, model)
|
||||||
|
|
||||||
|
def categoryList(self) -> pyref:
|
||||||
|
return self.model.category_list
|
||||||
|
|
||||||
|
def criteriaList(self) -> pyref:
|
||||||
|
return self.model.criteria_list
|
||||||
|
|
||||||
|
def prioritizationList(self) -> pyref:
|
||||||
|
return self.model.prioritization_list
|
||||||
|
|
||||||
|
def addSelected(self):
|
||||||
|
self.model.add_selected()
|
||||||
|
|
||||||
|
def removeSelected(self):
|
||||||
|
self.model.remove_selected()
|
||||||
|
|
||||||
|
def performReprioritization(self):
|
||||||
|
self.model.perform_reprioritization()
|
||||||
8
cocoa/inter/prioritize_list.py
Normal file
8
cocoa/inter/prioritize_list.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from cocoa.inter import PySelectableList, SelectableListView
|
||||||
|
|
||||||
|
class PrioritizeListView(SelectableListView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class PyPrioritizeList(PySelectableList):
|
||||||
|
def moveIndexes_toIndex_(self, indexes: list, dest_index: int):
|
||||||
|
self.model.move_indexes(indexes, dest_index)
|
||||||
9
cocoa/inter/problem_dialog.py
Normal file
9
cocoa/inter/problem_dialog.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from objp.util import pyref
|
||||||
|
from cocoa.inter import PyGUIObject
|
||||||
|
|
||||||
|
class PyProblemDialog(PyGUIObject):
|
||||||
|
def problemTable(self) -> pyref:
|
||||||
|
return self.model.problem_table
|
||||||
|
|
||||||
|
def revealSelected(self):
|
||||||
|
self.model.reveal_selected_dupe()
|
||||||
50
cocoa/inter/result_table.py
Normal file
50
cocoa/inter/result_table.py
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
from objp.util import dontwrap
|
||||||
|
from cocoa.inter import PyTable, TableView
|
||||||
|
|
||||||
|
class ResultTableView(TableView):
|
||||||
|
def invalidateMarkings(self): pass
|
||||||
|
|
||||||
|
class PyResultTable(PyTable):
|
||||||
|
def powerMarkerMode(self) -> bool:
|
||||||
|
return self.model.power_marker
|
||||||
|
|
||||||
|
def setPowerMarkerMode_(self, value: bool):
|
||||||
|
self.model.power_marker = value
|
||||||
|
|
||||||
|
def deltaValuesMode(self) -> bool:
|
||||||
|
return self.model.delta_values
|
||||||
|
|
||||||
|
def setDeltaValuesMode_(self, value: bool):
|
||||||
|
self.model.delta_values = value
|
||||||
|
|
||||||
|
def valueForRow_column_(self, row_index: int, column: str) -> object:
|
||||||
|
return self.model.get_row_value(row_index, column)
|
||||||
|
|
||||||
|
def isDeltaAtRow_column_(self, row_index: int, column: str) -> bool:
|
||||||
|
row = self.model[row_index]
|
||||||
|
return row.is_cell_delta(column)
|
||||||
|
|
||||||
|
def renameSelected_(self, newname: str) -> bool:
|
||||||
|
return self.model.rename_selected(newname)
|
||||||
|
|
||||||
|
def sortBy_ascending_(self, key: str, asc: bool):
|
||||||
|
self.model.sort(key, asc)
|
||||||
|
|
||||||
|
def markSelected(self):
|
||||||
|
self.model.app.toggle_selected_mark_state()
|
||||||
|
|
||||||
|
def removeSelected(self):
|
||||||
|
self.model.app.remove_selected()
|
||||||
|
|
||||||
|
def selectedDupeCount(self) -> int:
|
||||||
|
return self.model.selected_dupe_count
|
||||||
|
|
||||||
|
def pathAtIndex_(self, index: int) -> str:
|
||||||
|
row = self.model[index]
|
||||||
|
return str(row._dupe.path)
|
||||||
|
|
||||||
|
# python --> cocoa
|
||||||
|
@dontwrap
|
||||||
|
def invalidate_markings(self):
|
||||||
|
self.callback.invalidateMarkings()
|
||||||
|
|
||||||
9
cocoa/inter/stats_label.py
Normal file
9
cocoa/inter/stats_label.py
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
from cocoa.inter import PyGUIObject, GUIObjectView
|
||||||
|
|
||||||
|
class StatsLabelView(GUIObjectView):
|
||||||
|
pass
|
||||||
|
|
||||||
|
class PyStatsLabel(PyGUIObject):
|
||||||
|
|
||||||
|
def display(self) -> str:
|
||||||
|
return self.model.display
|
||||||
49
cocoa/main.m
Normal file
49
cocoa/main.m
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
||||||
|
|
||||||
|
This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
||||||
|
which should be included with this package. The terms are also available at
|
||||||
|
http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
#import <Cocoa/Cocoa.h>
|
||||||
|
#import <Python.h>
|
||||||
|
#import <wchar.h>
|
||||||
|
#import <locale.h>
|
||||||
|
#import "AppDelegate.h"
|
||||||
|
#import "MainMenu_UI.h"
|
||||||
|
|
||||||
|
int main(int argc, char *argv[])
|
||||||
|
{
|
||||||
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
|
/* We have to set the locate to UTF8 for mbstowcs() to correctly convert non-ascii chars in paths */
|
||||||
|
setlocale(LC_ALL, "en_US.UTF-8");
|
||||||
|
NSString *respath = [[NSBundle mainBundle] resourcePath];
|
||||||
|
NSString *mainpy = [respath stringByAppendingPathComponent:@"dg_cocoa.py"];
|
||||||
|
wchar_t wPythonPath[PATH_MAX+1];
|
||||||
|
NSString *pypath = [respath stringByAppendingPathComponent:@"py"];
|
||||||
|
mbstowcs(wPythonPath, [pypath fileSystemRepresentation], PATH_MAX+1);
|
||||||
|
Py_SetPath(wPythonPath);
|
||||||
|
Py_SetPythonHome(wPythonPath);
|
||||||
|
Py_Initialize();
|
||||||
|
PyEval_InitThreads();
|
||||||
|
PyGILState_STATE gilState = PyGILState_Ensure();
|
||||||
|
FILE* fp = fopen([mainpy UTF8String], "r");
|
||||||
|
PyRun_SimpleFile(fp, [mainpy UTF8String]);
|
||||||
|
fclose(fp);
|
||||||
|
PyGILState_Release(gilState);
|
||||||
|
if (gilState == PyGILState_LOCKED) {
|
||||||
|
PyThreadState_Swap(NULL);
|
||||||
|
PyEval_ReleaseLock();
|
||||||
|
}
|
||||||
|
|
||||||
|
[NSApplication sharedApplication];
|
||||||
|
AppDelegate *appDelegate = [[AppDelegate alloc] init];
|
||||||
|
[NSApp setDelegate:appDelegate];
|
||||||
|
[NSApp setMainMenu:createMainMenu_UI(appDelegate)];
|
||||||
|
[appDelegate finalizeInit];
|
||||||
|
[pool release];
|
||||||
|
[NSApp run];
|
||||||
|
Py_Finalize();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@@ -1,19 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "../base/AppDelegate.h"
|
|
||||||
#import "ResultWindow.h"
|
|
||||||
#import "PyDupeGuru.h"
|
|
||||||
|
|
||||||
@interface AppDelegate : AppDelegateBase {}
|
|
||||||
- (IBAction)openWebsite:(id)sender;
|
|
||||||
- (IBAction)toggleDirectories:(id)sender;
|
|
||||||
|
|
||||||
- (PyDupeGuru *)py;
|
|
||||||
@end
|
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "AppDelegate.h"
|
|
||||||
#import "../../cocoalib/ProgressController.h"
|
|
||||||
#import "../../cocoalib/RegistrationInterface.h"
|
|
||||||
#import "../../cocoalib/Utils.h"
|
|
||||||
#import "../../cocoalib/ValueTransformers.h"
|
|
||||||
#import "../../cocoalib/Dialogs.h"
|
|
||||||
#import "DetailsPanel.h"
|
|
||||||
#import "DirectoryPanel.h"
|
|
||||||
#import "Consts.h"
|
|
||||||
|
|
||||||
@implementation AppDelegate
|
|
||||||
+ (void)initialize
|
|
||||||
{
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
NSMutableDictionary *d = [NSMutableDictionary dictionaryWithCapacity:10];
|
|
||||||
[d setObject:i2n(3) forKey:@"scanType"];
|
|
||||||
[d setObject:i2n(80) forKey:@"minMatchPercentage"];
|
|
||||||
[d setObject:i2n(1) forKey:@"recreatePathType"];
|
|
||||||
[d setObject:b2n(NO) forKey:@"wordWeighting"];
|
|
||||||
[d setObject:b2n(NO) forKey:@"matchSimilarWords"];
|
|
||||||
[d setObject:b2n(YES) forKey:@"mixFileKind"];
|
|
||||||
[d setObject:b2n(NO) forKey:@"useRegexpFilter"];
|
|
||||||
[d setObject:b2n(NO) forKey:@"removeEmptyFolders"];
|
|
||||||
[d setObject:b2n(NO) forKey:@"debug"];
|
|
||||||
[d setObject:b2n(NO) forKey:@"scanTagTrack"];
|
|
||||||
[d setObject:b2n(YES) forKey:@"scanTagArtist"];
|
|
||||||
[d setObject:b2n(YES) forKey:@"scanTagAlbum"];
|
|
||||||
[d setObject:b2n(YES) forKey:@"scanTagTitle"];
|
|
||||||
[d setObject:b2n(NO) forKey:@"scanTagGenre"];
|
|
||||||
[d setObject:b2n(NO) forKey:@"scanTagYear"];
|
|
||||||
[d setObject:[NSArray array] forKey:@"recentDirectories"];
|
|
||||||
[d setObject:[NSArray array] forKey:@"columnsOrder"];
|
|
||||||
[d setObject:[NSDictionary dictionary] forKey:@"columnsWidth"];
|
|
||||||
[[NSUserDefaultsController sharedUserDefaultsController] setInitialValues:d];
|
|
||||||
[ud registerDefaults:d];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (id)init
|
|
||||||
{
|
|
||||||
self = [super init];
|
|
||||||
NSMutableIndexSet *i = [NSMutableIndexSet indexSetWithIndex:4];
|
|
||||||
[i addIndex:5];
|
|
||||||
VTIsIntIn *vtScanTypeIsNotContent = [[[VTIsIntIn alloc] initWithValues:i reverse:YES] autorelease];
|
|
||||||
[NSValueTransformer setValueTransformer:vtScanTypeIsNotContent forName:@"vtScanTypeIsNotContent"];
|
|
||||||
VTIsIntIn *vtScanTypeIsTag = [[[VTIsIntIn alloc] initWithValues:[NSIndexSet indexSetWithIndex:3] reverse:NO] autorelease];
|
|
||||||
[NSValueTransformer setValueTransformer:vtScanTypeIsTag forName:@"vtScanTypeIsTag"];
|
|
||||||
_directoryPanel = nil;
|
|
||||||
return self;
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)openWebsite:(id)sender
|
|
||||||
{
|
|
||||||
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"http://www.hardcoded.net/dupeguru_me"]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)toggleDirectories:(id)sender
|
|
||||||
{
|
|
||||||
[[self directoryPanel] toggleVisible:sender];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (DirectoryPanel *)directoryPanel
|
|
||||||
{
|
|
||||||
if (!_directoryPanel)
|
|
||||||
_directoryPanel = [[DirectoryPanelME alloc] initWithParentApp:self];
|
|
||||||
return _directoryPanel;
|
|
||||||
}
|
|
||||||
- (PyDupeGuru *)py { return (PyDupeGuru *)py; }
|
|
||||||
|
|
||||||
//Delegate
|
|
||||||
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
NSMenu *actionsMenu = [[[NSApp mainMenu] itemWithTitle:@"Actions"] submenu];
|
|
||||||
// index 3 is just after "Export Results to XHTML"
|
|
||||||
NSMenuItem *mi = [actionsMenu insertItemWithTitle:@"Remove Dead Tracks in iTunes"
|
|
||||||
action:@selector(removeDeadTracks:) keyEquivalent:@"" atIndex:3];
|
|
||||||
[mi setTarget:result];
|
|
||||||
[super applicationDidFinishLaunching:aNotification];
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "../base/Consts.h"
|
|
||||||
|
|
||||||
#define jobScanDeadTracks @"jobScanDeadTracks"
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "../base/DirectoryPanel.h"
|
|
||||||
|
|
||||||
@interface DirectoryPanelME : DirectoryPanel
|
|
||||||
{
|
|
||||||
}
|
|
||||||
- (IBAction)addiTunes:(id)sender;
|
|
||||||
@end
|
|
||||||
@@ -1,31 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "DirectoryPanel.h"
|
|
||||||
|
|
||||||
@implementation DirectoryPanelME
|
|
||||||
- (IBAction)addiTunes:(id)sender
|
|
||||||
{
|
|
||||||
[self addDirectory:[@"~/Music/iTunes/iTunes Music" stringByExpandingTildeInPath]];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)popupAddDirectoryMenu:(id)sender
|
|
||||||
{
|
|
||||||
NSMenu *m = [addButtonPopUp menu];
|
|
||||||
while ([m numberOfItems] > 0)
|
|
||||||
[m removeItemAtIndex:0];
|
|
||||||
NSMenuItem *mi = [m addItemWithTitle:@"Add New Directory..." action:@selector(askForDirectory:) keyEquivalent:@""];
|
|
||||||
[mi setTarget:self];
|
|
||||||
mi = [m addItemWithTitle:@"Add iTunes Directory" action:@selector(addiTunes:) keyEquivalent:@""];
|
|
||||||
[mi setTarget:self];
|
|
||||||
[m addItem:[NSMenuItem separatorItem]];
|
|
||||||
[_recentDirectories fillMenu:m];
|
|
||||||
[addButtonPopUp selectItem: nil];
|
|
||||||
[[addButtonPopUp cell] performClickWithFrame:[sender frame] inView:[sender superview]];
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
||||||
<plist version="1.0">
|
|
||||||
<dict>
|
|
||||||
<key>CFBundleDevelopmentRegion</key>
|
|
||||||
<string>English</string>
|
|
||||||
<key>CFBundleExecutable</key>
|
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
|
||||||
<key>CFBundleHelpBookFolder</key>
|
|
||||||
<string>dupeguru_me_help</string>
|
|
||||||
<key>CFBundleHelpBookName</key>
|
|
||||||
<string>dupeGuru ME Help</string>
|
|
||||||
<key>CFBundleIconFile</key>
|
|
||||||
<string>dupeguru</string>
|
|
||||||
<key>CFBundleIdentifier</key>
|
|
||||||
<string>com.hardcoded_software.dupeguru_me</string>
|
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
|
||||||
<string>6.0</string>
|
|
||||||
<key>CFBundleName</key>
|
|
||||||
<string>${PRODUCT_NAME}</string>
|
|
||||||
<key>CFBundlePackageType</key>
|
|
||||||
<string>APPL</string>
|
|
||||||
<key>CFBundleSignature</key>
|
|
||||||
<string>hsft</string>
|
|
||||||
<key>CFBundleVersion</key>
|
|
||||||
<string>5.7.2</string>
|
|
||||||
<key>NSMainNibFile</key>
|
|
||||||
<string>MainMenu</string>
|
|
||||||
<key>NSPrincipalClass</key>
|
|
||||||
<string>NSApplication</string>
|
|
||||||
<key>NSHumanReadableCopyright</key>
|
|
||||||
<string>© Hardcoded Software, 2010</string>
|
|
||||||
<key>SUFeedURL</key>
|
|
||||||
<string>http://www.hardcoded.net/updates/dupeguru_me.appcast</string>
|
|
||||||
<key>SUPublicDSAKeyFile</key>
|
|
||||||
<string>dsa_pub.pem</string>
|
|
||||||
</dict>
|
|
||||||
</plist>
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "../base/PyDupeGuru.h"
|
|
||||||
|
|
||||||
@interface PyDupeGuru : PyDupeGuruBase
|
|
||||||
//Scanning options
|
|
||||||
- (void)setScanType:(NSNumber *)scan_type;
|
|
||||||
- (void)setMinWordCount:(NSNumber *)word_count;
|
|
||||||
- (void)setMinWordLength:(NSNumber *)word_length;
|
|
||||||
- (void)setWordWeighting:(NSNumber *)words_are_weighted;
|
|
||||||
- (void)setMatchSimilarWords:(NSNumber *)match_similar_words;
|
|
||||||
- (void)enable:(NSNumber *)enable scanForTag:(NSString *)tag;
|
|
||||||
- (void)scanDeadTracks;
|
|
||||||
- (void)removeDeadTracks;
|
|
||||||
- (NSInteger)deadTrackCount;
|
|
||||||
@end
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "../base/ResultWindow.h"
|
|
||||||
#import "DirectoryPanel.h"
|
|
||||||
|
|
||||||
@interface ResultWindow : ResultWindowBase {}
|
|
||||||
- (IBAction)removeDeadTracks:(id)sender;
|
|
||||||
@end
|
|
||||||
@@ -1,133 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import "ResultWindow.h"
|
|
||||||
#import "../../cocoalib/Dialogs.h"
|
|
||||||
#import "../../cocoalib/ProgressController.h"
|
|
||||||
#import "../../cocoalib/RegistrationInterface.h"
|
|
||||||
#import "../../cocoalib/Utils.h"
|
|
||||||
#import "AppDelegate.h"
|
|
||||||
#import "Consts.h"
|
|
||||||
|
|
||||||
@implementation ResultWindow
|
|
||||||
/* Override */
|
|
||||||
- (void)awakeFromNib
|
|
||||||
{
|
|
||||||
[super awakeFromNib];
|
|
||||||
[[self window] setTitle:@"dupeGuru Music Edition"];
|
|
||||||
NSMutableIndexSet *deltaColumns = [NSMutableIndexSet indexSetWithIndexesInRange:NSMakeRange(2,7)];
|
|
||||||
[deltaColumns removeIndex:6];
|
|
||||||
[outline setDeltaColumns:deltaColumns];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Actions */
|
|
||||||
- (IBAction)removeDeadTracks:(id)sender
|
|
||||||
{
|
|
||||||
[(PyDupeGuru *)py scanDeadTracks];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)resetColumnsToDefault:(id)sender
|
|
||||||
{
|
|
||||||
NSMutableArray *columnsOrder = [NSMutableArray array];
|
|
||||||
[columnsOrder addObject:@"0"];
|
|
||||||
[columnsOrder addObject:@"2"];
|
|
||||||
[columnsOrder addObject:@"3"];
|
|
||||||
[columnsOrder addObject:@"4"];
|
|
||||||
[columnsOrder addObject:@"16"];
|
|
||||||
NSMutableDictionary *columnsWidth = [NSMutableDictionary dictionary];
|
|
||||||
[columnsWidth setObject:i2n(214) forKey:@"0"];
|
|
||||||
[columnsWidth setObject:i2n(63) forKey:@"2"];
|
|
||||||
[columnsWidth setObject:i2n(50) forKey:@"3"];
|
|
||||||
[columnsWidth setObject:i2n(50) forKey:@"4"];
|
|
||||||
[columnsWidth setObject:i2n(57) forKey:@"16"];
|
|
||||||
[self restoreColumnsPosition:columnsOrder widths:columnsWidth];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (IBAction)startDuplicateScan:(id)sender
|
|
||||||
{
|
|
||||||
if ([matches numberOfRows] > 0)
|
|
||||||
{
|
|
||||||
if ([Dialogs askYesNo:@"Are you sure you want to start a new duplicate scan?"] == NSAlertSecondButtonReturn) // NO
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];
|
|
||||||
PyDupeGuru *_py = (PyDupeGuru *)py;
|
|
||||||
[_py setScanType:[ud objectForKey:@"scanType"]];
|
|
||||||
[_py enable:[ud objectForKey:@"scanTagTrack"] scanForTag:@"track"];
|
|
||||||
[_py enable:[ud objectForKey:@"scanTagArtist"] scanForTag:@"artist"];
|
|
||||||
[_py enable:[ud objectForKey:@"scanTagAlbum"] scanForTag:@"album"];
|
|
||||||
[_py enable:[ud objectForKey:@"scanTagTitle"] scanForTag:@"title"];
|
|
||||||
[_py enable:[ud objectForKey:@"scanTagGenre"] scanForTag:@"genre"];
|
|
||||||
[_py enable:[ud objectForKey:@"scanTagYear"] scanForTag:@"year"];
|
|
||||||
[_py setMinMatchPercentage:[ud objectForKey:@"minMatchPercentage"]];
|
|
||||||
[_py setWordWeighting:[ud objectForKey:@"wordWeighting"]];
|
|
||||||
[_py setMixFileKind:[ud objectForKey:@"mixFileKind"]];
|
|
||||||
[_py setMatchSimilarWords:[ud objectForKey:@"matchSimilarWords"]];
|
|
||||||
NSInteger r = n2i([py doScan]);
|
|
||||||
if (r == 1)
|
|
||||||
[Dialogs showMessage:@"You cannot make a duplicate scan with only reference directories."];
|
|
||||||
if (r == 3)
|
|
||||||
{
|
|
||||||
[Dialogs showMessage:@"The selected directories contain no scannable file."];
|
|
||||||
[app toggleDirectories:nil];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Public */
|
|
||||||
- (void)initResultColumns
|
|
||||||
{
|
|
||||||
NSTableColumn *refCol = [matches tableColumnWithIdentifier:@"0"];
|
|
||||||
_resultColumns = [[NSMutableArray alloc] init];
|
|
||||||
[_resultColumns addObject:[matches tableColumnWithIdentifier:@"0"]]; // File Name
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:1 title:@"Directory" width:120 refCol:refCol]];
|
|
||||||
NSTableColumn *sizeCol = [self getColumnForIdentifier:2 title:@"Size (MB)" width:63 refCol:refCol];
|
|
||||||
[[sizeCol dataCell] setAlignment:NSRightTextAlignment];
|
|
||||||
[_resultColumns addObject:sizeCol];
|
|
||||||
NSTableColumn *timeCol = [self getColumnForIdentifier:3 title:@"Time" width:50 refCol:refCol];
|
|
||||||
[[timeCol dataCell] setAlignment:NSRightTextAlignment];
|
|
||||||
[_resultColumns addObject:timeCol];
|
|
||||||
NSTableColumn *brCol = [self getColumnForIdentifier:4 title:@"Bitrate" width:50 refCol:refCol];
|
|
||||||
[[brCol dataCell] setAlignment:NSRightTextAlignment];
|
|
||||||
[_resultColumns addObject:brCol];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:5 title:@"Sample Rate" width:60 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:6 title:@"Kind" width:40 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:7 title:@"Creation" width:120 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:8 title:@"Modification" width:120 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:9 title:@"Title" width:120 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:10 title:@"Artist" width:120 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:11 title:@"Album" width:120 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:12 title:@"Genre" width:80 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:13 title:@"Year" width:40 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:14 title:@"Track Number" width:40 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:15 title:@"Comment" width:120 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:16 title:@"Match %" width:57 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:17 title:@"Words Used" width:120 refCol:refCol]];
|
|
||||||
[_resultColumns addObject:[self getColumnForIdentifier:18 title:@"Dupe Count" width:80 refCol:refCol]];
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Notifications */
|
|
||||||
- (void)jobCompleted:(NSNotification *)aNotification
|
|
||||||
{
|
|
||||||
[super jobCompleted:aNotification];
|
|
||||||
id lastAction = [[ProgressController mainProgressController] jobId];
|
|
||||||
if ([lastAction isEqualTo:jobScanDeadTracks])
|
|
||||||
{
|
|
||||||
NSInteger deadTrackCount = [(PyDupeGuru *)py deadTrackCount];
|
|
||||||
if (deadTrackCount > 0)
|
|
||||||
{
|
|
||||||
NSString *msg = @"Your iTunes Library contains %d dead tracks ready to be removed. Continue?";
|
|
||||||
if ([Dialogs askYesNo:[NSString stringWithFormat:msg,deadTrackCount]] == NSAlertFirstButtonReturn)
|
|
||||||
[(PyDupeGuru *)py removeDeadTracks];
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
[Dialogs showMessage:@"You have no dead tracks in your iTunes Library"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@end
|
|
||||||
@@ -1,69 +0,0 @@
|
|||||||
# Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
#
|
|
||||||
# This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
# which should be included with this package. The terms are also available at
|
|
||||||
# http://www.hardcoded.net/licenses/hs_license
|
|
||||||
|
|
||||||
from hsutil.cocoa import signature
|
|
||||||
|
|
||||||
from core.app_cocoa_inter import PyDupeGuruBase, PyDetailsPanel
|
|
||||||
from core_me.app_cocoa import DupeGuruME
|
|
||||||
from core.scanner import (SCAN_TYPE_FILENAME, SCAN_TYPE_FIELDS, SCAN_TYPE_FIELDS_NO_ORDER,
|
|
||||||
SCAN_TYPE_TAG, SCAN_TYPE_CONTENT, SCAN_TYPE_CONTENT_AUDIO)
|
|
||||||
|
|
||||||
# Fix py2app imports which chokes on relative imports and other stuff
|
|
||||||
from core_me import app_cocoa, data, fs, scanner
|
|
||||||
from hsmedia import aiff, flac, genres, id3v1, id3v2, mp4, mpeg, ogg, wma
|
|
||||||
from lxml import etree, _elementpath
|
|
||||||
import gzip
|
|
||||||
|
|
||||||
class PyDupeGuru(PyDupeGuruBase):
|
|
||||||
def init(self):
|
|
||||||
self = super(PyDupeGuru,self).init()
|
|
||||||
self.py = DupeGuruME()
|
|
||||||
return self
|
|
||||||
|
|
||||||
def removeDeadTracks(self):
|
|
||||||
self.py.remove_dead_tracks()
|
|
||||||
|
|
||||||
def scanDeadTracks(self):
|
|
||||||
self.py.scan_dead_tracks()
|
|
||||||
|
|
||||||
#---Information
|
|
||||||
@signature('i@:')
|
|
||||||
def deadTrackCount(self):
|
|
||||||
return len(self.py.dead_tracks)
|
|
||||||
|
|
||||||
#---Properties
|
|
||||||
def setMinMatchPercentage_(self, percentage):
|
|
||||||
self.py.scanner.min_match_percentage = int(percentage)
|
|
||||||
|
|
||||||
def setScanType_(self, scan_type):
|
|
||||||
try:
|
|
||||||
self.py.scanner.scan_type = [
|
|
||||||
SCAN_TYPE_FILENAME,
|
|
||||||
SCAN_TYPE_FIELDS,
|
|
||||||
SCAN_TYPE_FIELDS_NO_ORDER,
|
|
||||||
SCAN_TYPE_TAG,
|
|
||||||
SCAN_TYPE_CONTENT,
|
|
||||||
SCAN_TYPE_CONTENT_AUDIO
|
|
||||||
][scan_type]
|
|
||||||
except IndexError:
|
|
||||||
pass
|
|
||||||
|
|
||||||
def setWordWeighting_(self, words_are_weighted):
|
|
||||||
self.py.scanner.word_weighting = words_are_weighted
|
|
||||||
|
|
||||||
def setMatchSimilarWords_(self, match_similar_words):
|
|
||||||
self.py.scanner.match_similar_words = match_similar_words
|
|
||||||
|
|
||||||
def enable_scanForTag_(self, enable, scan_tag):
|
|
||||||
if enable:
|
|
||||||
self.py.scanner.scanned_tags.add(scan_tag)
|
|
||||||
else:
|
|
||||||
self.py.scanner.scanned_tags.discard(scan_tag)
|
|
||||||
|
|
||||||
#---Registration
|
|
||||||
def appName(self):
|
|
||||||
return "dupeGuru Music Edition"
|
|
||||||
|
|
||||||
Binary file not shown.
@@ -1,584 +0,0 @@
|
|||||||
// !$*UTF8*$!
|
|
||||||
{
|
|
||||||
archiveVersion = 1;
|
|
||||||
classes = {
|
|
||||||
};
|
|
||||||
objectVersion = 44;
|
|
||||||
objects = {
|
|
||||||
|
|
||||||
/* Begin PBXAppleScriptBuildPhase section */
|
|
||||||
CE6B288A0AFB7FC900508D93 /* AppleScript */ = {
|
|
||||||
isa = PBXAppleScriptBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
contextName = "";
|
|
||||||
files = (
|
|
||||||
);
|
|
||||||
isSharedContext = 0;
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXAppleScriptBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXBuildFile section */
|
|
||||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
|
||||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
|
||||||
CE003CC611242D00004B0AA7 /* HSGUIController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE003CB411242D00004B0AA7 /* HSGUIController.m */; };
|
|
||||||
CE003CC711242D00004B0AA7 /* HSOutline.m in Sources */ = {isa = PBXBuildFile; fileRef = CE003CB611242D00004B0AA7 /* HSOutline.m */; };
|
|
||||||
CE003CC811242D00004B0AA7 /* HSWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE003CB811242D00004B0AA7 /* HSWindowController.m */; };
|
|
||||||
CE003CC911242D00004B0AA7 /* NSEventAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE003CBA11242D00004B0AA7 /* NSEventAdditions.m */; };
|
|
||||||
CE003CCA11242D00004B0AA7 /* HSOutlineView.m in Sources */ = {isa = PBXBuildFile; fileRef = CE003CC111242D00004B0AA7 /* HSOutlineView.m */; };
|
|
||||||
CE003CCB11242D00004B0AA7 /* NSIndexPathAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE003CC311242D00004B0AA7 /* NSIndexPathAdditions.m */; };
|
|
||||||
CE003CCC11242D00004B0AA7 /* NSTableViewAdditions.m in Sources */ = {isa = PBXBuildFile; fileRef = CE003CC511242D00004B0AA7 /* NSTableViewAdditions.m */; };
|
|
||||||
CE003CD011242D2C004B0AA7 /* DirectoryOutline.m in Sources */ = {isa = PBXBuildFile; fileRef = CE003CCE11242D2C004B0AA7 /* DirectoryOutline.m */; };
|
|
||||||
CE073F6309CAE1A3005C1D2F /* dupeguru_me_help in Resources */ = {isa = PBXBuildFile; fileRef = CE073F5409CAE1A3005C1D2F /* dupeguru_me_help */; };
|
|
||||||
CE0B3D6711243F83009A7A30 /* ResultOutline.m in Sources */ = {isa = PBXBuildFile; fileRef = CE0B3D6611243F83009A7A30 /* ResultOutline.m */; };
|
|
||||||
CE1425890AFB718500BD5167 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE1425880AFB718500BD5167 /* Sparkle.framework */; };
|
|
||||||
CE14259F0AFB719300BD5167 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE1425880AFB718500BD5167 /* Sparkle.framework */; };
|
|
||||||
CE381C9609914ACE003581CE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CE381C9409914ACE003581CE /* AppDelegate.m */; };
|
|
||||||
CE381C9C09914ADF003581CE /* ResultWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CE381C9A09914ADF003581CE /* ResultWindow.m */; };
|
|
||||||
CE381D0509915304003581CE /* dg_cocoa.plugin in Resources */ = {isa = PBXBuildFile; fileRef = CE381CF509915304003581CE /* dg_cocoa.plugin */; };
|
|
||||||
CE3FBDD31094637800B72D77 /* DetailsPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE3FBDD11094637800B72D77 /* DetailsPanel.xib */; };
|
|
||||||
CE3FBDD41094637800B72D77 /* DirectoryPanel.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE3FBDD21094637800B72D77 /* DirectoryPanel.xib */; };
|
|
||||||
CE49DEF60FDFEB810098617B /* BRSingleLineFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = CE49DEF30FDFEB810098617B /* BRSingleLineFormatter.m */; };
|
|
||||||
CE4B59C81119919700C06C9E /* ErrorReportWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE4B59C51119919700C06C9E /* ErrorReportWindow.xib */; };
|
|
||||||
CE4B59C91119919700C06C9E /* progress.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE4B59C61119919700C06C9E /* progress.xib */; };
|
|
||||||
CE4B59CA1119919700C06C9E /* registration.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE4B59C71119919700C06C9E /* registration.xib */; };
|
|
||||||
CE515DF30FC6C12E00EC695D /* Dialogs.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DE10FC6C12E00EC695D /* Dialogs.m */; };
|
|
||||||
CE515DF40FC6C12E00EC695D /* HSErrorReportWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DE30FC6C12E00EC695D /* HSErrorReportWindow.m */; };
|
|
||||||
CE515DF60FC6C12E00EC695D /* ProgressController.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DE70FC6C12E00EC695D /* ProgressController.m */; };
|
|
||||||
CE515DF70FC6C12E00EC695D /* RecentDirectories.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DEA0FC6C12E00EC695D /* RecentDirectories.m */; };
|
|
||||||
CE515DF80FC6C12E00EC695D /* RegistrationInterface.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DEC0FC6C12E00EC695D /* RegistrationInterface.m */; };
|
|
||||||
CE515DFA0FC6C12E00EC695D /* Utils.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DF00FC6C12E00EC695D /* Utils.m */; };
|
|
||||||
CE515DFB0FC6C12E00EC695D /* ValueTransformers.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515DF20FC6C12E00EC695D /* ValueTransformers.m */; };
|
|
||||||
CE515E1D0FC6C19300EC695D /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515E160FC6C19300EC695D /* AppDelegate.m */; };
|
|
||||||
CE515E1E0FC6C19300EC695D /* DirectoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515E190FC6C19300EC695D /* DirectoryPanel.m */; };
|
|
||||||
CE515E1F0FC6C19300EC695D /* ResultWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CE515E1C0FC6C19300EC695D /* ResultWindow.m */; };
|
|
||||||
CE6032C00FE6784C007E33FF /* DetailsPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE6032BF0FE6784C007E33FF /* DetailsPanel.m */; };
|
|
||||||
CE68EE6809ABC48000971085 /* DirectoryPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE68EE6609ABC48000971085 /* DirectoryPanel.m */; };
|
|
||||||
CE6E0E9F1054EB97008D9390 /* dsa_pub.pem in Resources */ = {isa = PBXBuildFile; fileRef = CE6E0E9E1054EB97008D9390 /* dsa_pub.pem */; };
|
|
||||||
CE848A1909DD85810004CB44 /* Consts.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE848A1809DD85810004CB44 /* Consts.h */; };
|
|
||||||
CE900AD2109B238600754048 /* Preferences.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE900AD1109B238600754048 /* Preferences.xib */; };
|
|
||||||
CE900AD7109B2A9B00754048 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE900AD6109B2A9B00754048 /* MainMenu.xib */; };
|
|
||||||
CEDF07A3112493B200EE5BC0 /* StatsLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = CEDF07A2112493B200EE5BC0 /* StatsLabel.m */; };
|
|
||||||
CEEB135209C837A2004D2330 /* dupeguru.icns in Resources */ = {isa = PBXBuildFile; fileRef = CEEB135109C837A2004D2330 /* dupeguru.icns */; };
|
|
||||||
CEFC294609C89E3D00D9F998 /* folder32.png in Resources */ = {isa = PBXBuildFile; fileRef = CEFC294509C89E3D00D9F998 /* folder32.png */; };
|
|
||||||
CEFC295509C89FF200D9F998 /* details32.png in Resources */ = {isa = PBXBuildFile; fileRef = CEFC295309C89FF200D9F998 /* details32.png */; };
|
|
||||||
CEFC295609C89FF200D9F998 /* preferences32.png in Resources */ = {isa = PBXBuildFile; fileRef = CEFC295409C89FF200D9F998 /* preferences32.png */; };
|
|
||||||
/* End PBXBuildFile section */
|
|
||||||
|
|
||||||
/* Begin PBXCopyFilesBuildPhase section */
|
|
||||||
CECC02B709A36E8200CC0A94 /* CopyFiles */ = {
|
|
||||||
isa = PBXCopyFilesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
dstPath = "";
|
|
||||||
dstSubfolderSpec = 10;
|
|
||||||
files = (
|
|
||||||
CE14259F0AFB719300BD5167 /* Sparkle.framework in CopyFiles */,
|
|
||||||
CE848A1909DD85810004CB44 /* Consts.h in CopyFiles */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXCopyFilesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
|
||||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
|
|
||||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
|
|
||||||
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
|
|
||||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
|
||||||
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; };
|
|
||||||
8D1107320486CEB800E47090 /* dupeGuru ME.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "dupeGuru ME.app"; sourceTree = BUILT_PRODUCTS_DIR; };
|
|
||||||
CE003CB311242D00004B0AA7 /* HSGUIController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSGUIController.h; sourceTree = "<group>"; };
|
|
||||||
CE003CB411242D00004B0AA7 /* HSGUIController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSGUIController.m; sourceTree = "<group>"; };
|
|
||||||
CE003CB511242D00004B0AA7 /* HSOutline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSOutline.h; sourceTree = "<group>"; };
|
|
||||||
CE003CB611242D00004B0AA7 /* HSOutline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSOutline.m; sourceTree = "<group>"; };
|
|
||||||
CE003CB711242D00004B0AA7 /* HSWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSWindowController.h; sourceTree = "<group>"; };
|
|
||||||
CE003CB811242D00004B0AA7 /* HSWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSWindowController.m; sourceTree = "<group>"; };
|
|
||||||
CE003CB911242D00004B0AA7 /* NSEventAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NSEventAdditions.h; path = ../../cocoalib/NSEventAdditions.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE003CBA11242D00004B0AA7 /* NSEventAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NSEventAdditions.m; path = ../../cocoalib/NSEventAdditions.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE003CBC11242D00004B0AA7 /* PyGUI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PyGUI.h; sourceTree = "<group>"; };
|
|
||||||
CE003CBD11242D00004B0AA7 /* PyOutline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PyOutline.h; sourceTree = "<group>"; };
|
|
||||||
CE003CBE11242D00004B0AA7 /* PyRegistrable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyRegistrable.h; path = ../../cocoalib/PyRegistrable.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE003CC011242D00004B0AA7 /* HSOutlineView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSOutlineView.h; sourceTree = "<group>"; };
|
|
||||||
CE003CC111242D00004B0AA7 /* HSOutlineView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSOutlineView.m; sourceTree = "<group>"; };
|
|
||||||
CE003CC211242D00004B0AA7 /* NSIndexPathAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSIndexPathAdditions.h; sourceTree = "<group>"; };
|
|
||||||
CE003CC311242D00004B0AA7 /* NSIndexPathAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSIndexPathAdditions.m; sourceTree = "<group>"; };
|
|
||||||
CE003CC411242D00004B0AA7 /* NSTableViewAdditions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSTableViewAdditions.h; sourceTree = "<group>"; };
|
|
||||||
CE003CC511242D00004B0AA7 /* NSTableViewAdditions.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSTableViewAdditions.m; sourceTree = "<group>"; };
|
|
||||||
CE003CCD11242D2C004B0AA7 /* DirectoryOutline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryOutline.h; path = ../base/DirectoryOutline.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE003CCE11242D2C004B0AA7 /* DirectoryOutline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DirectoryOutline.m; path = ../base/DirectoryOutline.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE003CCF11242D2C004B0AA7 /* PyDirectoryOutline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyDirectoryOutline.h; path = ../base/PyDirectoryOutline.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE073F5409CAE1A3005C1D2F /* dupeguru_me_help */ = {isa = PBXFileReference; lastKnownFileType = folder; name = dupeguru_me_help; path = ../../help_me/dupeguru_me_help; sourceTree = "<group>"; };
|
|
||||||
CE0B3D6411243F83009A7A30 /* PyResultTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyResultTree.h; path = ../base/PyResultTree.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE0B3D6511243F83009A7A30 /* ResultOutline.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ResultOutline.h; path = ../base/ResultOutline.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE0B3D6611243F83009A7A30 /* ResultOutline.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ResultOutline.m; path = ../base/ResultOutline.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE1425880AFB718500BD5167 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = /Library/Frameworks/Sparkle.framework; sourceTree = "<absolute>"; };
|
|
||||||
CE381C9409914ACE003581CE /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE381C9509914ACE003581CE /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE381C9A09914ADF003581CE /* ResultWindow.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = ResultWindow.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE381C9B09914ADF003581CE /* ResultWindow.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = ResultWindow.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE381CF509915304003581CE /* dg_cocoa.plugin */ = {isa = PBXFileReference; lastKnownFileType = folder; path = dg_cocoa.plugin; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE3FBDD11094637800B72D77 /* DetailsPanel.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = DetailsPanel.xib; path = ../../base/xib/DetailsPanel.xib; sourceTree = "<group>"; };
|
|
||||||
CE3FBDD21094637800B72D77 /* DirectoryPanel.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = DirectoryPanel.xib; path = ../../base/xib/DirectoryPanel.xib; sourceTree = "<group>"; };
|
|
||||||
CE49DEF20FDFEB810098617B /* BRSingleLineFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BRSingleLineFormatter.h; path = ../../cocoalib/brsinglelineformatter/BRSingleLineFormatter.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE49DEF30FDFEB810098617B /* BRSingleLineFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = BRSingleLineFormatter.m; path = ../../cocoalib/brsinglelineformatter/BRSingleLineFormatter.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE4B59C51119919700C06C9E /* ErrorReportWindow.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ErrorReportWindow.xib; sourceTree = "<group>"; };
|
|
||||||
CE4B59C61119919700C06C9E /* progress.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = progress.xib; sourceTree = "<group>"; };
|
|
||||||
CE4B59C71119919700C06C9E /* registration.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = registration.xib; sourceTree = "<group>"; };
|
|
||||||
CE515DE00FC6C12E00EC695D /* Dialogs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Dialogs.h; path = ../../cocoalib/Dialogs.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DE10FC6C12E00EC695D /* Dialogs.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Dialogs.m; path = ../../cocoalib/Dialogs.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DE20FC6C12E00EC695D /* HSErrorReportWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HSErrorReportWindow.h; path = ../../cocoalib/HSErrorReportWindow.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DE30FC6C12E00EC695D /* HSErrorReportWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HSErrorReportWindow.m; path = ../../cocoalib/HSErrorReportWindow.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DE60FC6C12E00EC695D /* ProgressController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProgressController.h; path = ../../cocoalib/ProgressController.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DE70FC6C12E00EC695D /* ProgressController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ProgressController.m; path = ../../cocoalib/ProgressController.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DE80FC6C12E00EC695D /* PyApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyApp.h; path = ../../cocoalib/PyApp.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DE90FC6C12E00EC695D /* RecentDirectories.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RecentDirectories.h; path = ../../cocoalib/RecentDirectories.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DEA0FC6C12E00EC695D /* RecentDirectories.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RecentDirectories.m; path = ../../cocoalib/RecentDirectories.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DEB0FC6C12E00EC695D /* RegistrationInterface.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RegistrationInterface.h; path = ../../cocoalib/RegistrationInterface.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DEC0FC6C12E00EC695D /* RegistrationInterface.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RegistrationInterface.m; path = ../../cocoalib/RegistrationInterface.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DEF0FC6C12E00EC695D /* Utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Utils.h; path = ../../cocoalib/Utils.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DF00FC6C12E00EC695D /* Utils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = Utils.m; path = ../../cocoalib/Utils.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DF10FC6C12E00EC695D /* ValueTransformers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ValueTransformers.h; path = ../../cocoalib/ValueTransformers.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515DF20FC6C12E00EC695D /* ValueTransformers.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ValueTransformers.m; path = ../../cocoalib/ValueTransformers.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515E150FC6C19300EC695D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../base/AppDelegate.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515E160FC6C19300EC695D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = ../base/AppDelegate.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515E170FC6C19300EC695D /* Consts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Consts.h; path = ../base/Consts.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515E180FC6C19300EC695D /* DirectoryPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DirectoryPanel.h; path = ../base/DirectoryPanel.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515E190FC6C19300EC695D /* DirectoryPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DirectoryPanel.m; path = ../base/DirectoryPanel.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515E1A0FC6C19300EC695D /* PyDupeGuru.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyDupeGuru.h; path = ../base/PyDupeGuru.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515E1B0FC6C19300EC695D /* ResultWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ResultWindow.h; path = ../base/ResultWindow.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE515E1C0FC6C19300EC695D /* ResultWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ResultWindow.m; path = ../base/ResultWindow.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE6032BE0FE6784C007E33FF /* DetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DetailsPanel.h; path = ../base/DetailsPanel.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE6032BF0FE6784C007E33FF /* DetailsPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DetailsPanel.m; path = ../base/DetailsPanel.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE68EE6509ABC48000971085 /* DirectoryPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DirectoryPanel.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE68EE6609ABC48000971085 /* DirectoryPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DirectoryPanel.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CE6E0E9E1054EB97008D9390 /* dsa_pub.pem */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = dsa_pub.pem; path = ../base/dsa_pub.pem; sourceTree = "<group>"; };
|
|
||||||
CE848A1809DD85810004CB44 /* Consts.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Consts.h; sourceTree = "<group>"; };
|
|
||||||
CE900AD1109B238600754048 /* Preferences.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Preferences.xib; sourceTree = "<group>"; };
|
|
||||||
CE900AD6109B2A9B00754048 /* MainMenu.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = MainMenu.xib; path = ../../base/xib/MainMenu.xib; sourceTree = "<group>"; };
|
|
||||||
CECA899A09DB132E00A3D774 /* DetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DetailsPanel.h; sourceTree = "<group>"; };
|
|
||||||
CECA899B09DB132E00A3D774 /* DetailsPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DetailsPanel.m; sourceTree = "<group>"; };
|
|
||||||
CED0A591111C9FD10020AD7D /* PyDetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyDetailsPanel.h; path = ../base/PyDetailsPanel.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CEDF07A0112493B200EE5BC0 /* PyStatsLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyStatsLabel.h; path = ../base/PyStatsLabel.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CEDF07A1112493B200EE5BC0 /* StatsLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatsLabel.h; path = ../base/StatsLabel.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
CEDF07A2112493B200EE5BC0 /* StatsLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = StatsLabel.m; path = ../base/StatsLabel.m; sourceTree = SOURCE_ROOT; };
|
|
||||||
CEEB135109C837A2004D2330 /* dupeguru.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = dupeguru.icns; sourceTree = "<group>"; };
|
|
||||||
CEFC294509C89E3D00D9F998 /* folder32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = folder32.png; path = ../../images/folder32.png; sourceTree = SOURCE_ROOT; };
|
|
||||||
CEFC295309C89FF200D9F998 /* details32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = details32.png; path = ../../images/details32.png; sourceTree = SOURCE_ROOT; };
|
|
||||||
CEFC295409C89FF200D9F998 /* preferences32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = preferences32.png; path = ../../images/preferences32.png; sourceTree = SOURCE_ROOT; };
|
|
||||||
CEFF18A009A4D387005E6321 /* PyDupeGuru.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = PyDupeGuru.h; sourceTree = SOURCE_ROOT; };
|
|
||||||
/* End PBXFileReference section */
|
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
|
||||||
8D11072E0486CEB800E47090 /* Frameworks */ = {
|
|
||||||
isa = PBXFrameworksBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
|
|
||||||
CE1425890AFB718500BD5167 /* Sparkle.framework in Frameworks */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXFrameworksBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXGroup section */
|
|
||||||
080E96DDFE201D6D7F000001 /* Classes */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE381C9509914ACE003581CE /* AppDelegate.h */,
|
|
||||||
CE381C9409914ACE003581CE /* AppDelegate.m */,
|
|
||||||
CE848A1809DD85810004CB44 /* Consts.h */,
|
|
||||||
CECA899A09DB132E00A3D774 /* DetailsPanel.h */,
|
|
||||||
CECA899B09DB132E00A3D774 /* DetailsPanel.m */,
|
|
||||||
CE68EE6509ABC48000971085 /* DirectoryPanel.h */,
|
|
||||||
CE68EE6609ABC48000971085 /* DirectoryPanel.m */,
|
|
||||||
CEFF18A009A4D387005E6321 /* PyDupeGuru.h */,
|
|
||||||
CE381C9B09914ADF003581CE /* ResultWindow.h */,
|
|
||||||
CE381C9A09914ADF003581CE /* ResultWindow.m */,
|
|
||||||
);
|
|
||||||
name = Classes;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE1425880AFB718500BD5167 /* Sparkle.framework */,
|
|
||||||
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
|
|
||||||
);
|
|
||||||
name = "Linked Frameworks";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
|
|
||||||
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
|
|
||||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
|
|
||||||
);
|
|
||||||
name = "Other Frameworks";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
19C28FACFE9D520D11CA2CBB /* Products */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
8D1107320486CEB800E47090 /* dupeGuru ME.app */,
|
|
||||||
);
|
|
||||||
name = Products;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
29B97314FDCFA39411CA2CEA /* dupeguru */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
080E96DDFE201D6D7F000001 /* Classes */,
|
|
||||||
CE515E140FC6C17900EC695D /* dgbase */,
|
|
||||||
CE515DDD0FC6C09400EC695D /* cocoalib */,
|
|
||||||
29B97315FDCFA39411CA2CEA /* Other Sources */,
|
|
||||||
29B97317FDCFA39411CA2CEA /* Resources */,
|
|
||||||
29B97323FDCFA39411CA2CEA /* Frameworks */,
|
|
||||||
19C28FACFE9D520D11CA2CBB /* Products */,
|
|
||||||
);
|
|
||||||
name = dupeguru;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
29B97316FDCFA39411CA2CEA /* main.m */,
|
|
||||||
);
|
|
||||||
name = "Other Sources";
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
29B97317FDCFA39411CA2CEA /* Resources */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE3FBDD01094637800B72D77 /* xib */,
|
|
||||||
CE073F5409CAE1A3005C1D2F /* dupeguru_me_help */,
|
|
||||||
CE381CF509915304003581CE /* dg_cocoa.plugin */,
|
|
||||||
CEFC294309C89E0000D9F998 /* images */,
|
|
||||||
CEEB135109C837A2004D2330 /* dupeguru.icns */,
|
|
||||||
8D1107310486CEB800E47090 /* Info.plist */,
|
|
||||||
CE6E0E9E1054EB97008D9390 /* dsa_pub.pem */,
|
|
||||||
);
|
|
||||||
name = Resources;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
|
|
||||||
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
|
|
||||||
);
|
|
||||||
name = Frameworks;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
CE003CB211242D00004B0AA7 /* controllers */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE003CB311242D00004B0AA7 /* HSGUIController.h */,
|
|
||||||
CE003CB411242D00004B0AA7 /* HSGUIController.m */,
|
|
||||||
CE003CB511242D00004B0AA7 /* HSOutline.h */,
|
|
||||||
CE003CB611242D00004B0AA7 /* HSOutline.m */,
|
|
||||||
CE003CB711242D00004B0AA7 /* HSWindowController.h */,
|
|
||||||
CE003CB811242D00004B0AA7 /* HSWindowController.m */,
|
|
||||||
);
|
|
||||||
name = controllers;
|
|
||||||
path = ../../cocoalib/controllers;
|
|
||||||
sourceTree = SOURCE_ROOT;
|
|
||||||
};
|
|
||||||
CE003CBB11242D00004B0AA7 /* proxies */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE003CBC11242D00004B0AA7 /* PyGUI.h */,
|
|
||||||
CE003CBD11242D00004B0AA7 /* PyOutline.h */,
|
|
||||||
);
|
|
||||||
name = proxies;
|
|
||||||
path = ../../cocoalib/proxies;
|
|
||||||
sourceTree = SOURCE_ROOT;
|
|
||||||
};
|
|
||||||
CE003CBF11242D00004B0AA7 /* views */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE003CC011242D00004B0AA7 /* HSOutlineView.h */,
|
|
||||||
CE003CC111242D00004B0AA7 /* HSOutlineView.m */,
|
|
||||||
CE003CC211242D00004B0AA7 /* NSIndexPathAdditions.h */,
|
|
||||||
CE003CC311242D00004B0AA7 /* NSIndexPathAdditions.m */,
|
|
||||||
CE003CC411242D00004B0AA7 /* NSTableViewAdditions.h */,
|
|
||||||
CE003CC511242D00004B0AA7 /* NSTableViewAdditions.m */,
|
|
||||||
);
|
|
||||||
name = views;
|
|
||||||
path = ../../cocoalib/views;
|
|
||||||
sourceTree = SOURCE_ROOT;
|
|
||||||
};
|
|
||||||
CE3FBDD01094637800B72D77 /* xib */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE900AD6109B2A9B00754048 /* MainMenu.xib */,
|
|
||||||
CE3FBDD11094637800B72D77 /* DetailsPanel.xib */,
|
|
||||||
CE3FBDD21094637800B72D77 /* DirectoryPanel.xib */,
|
|
||||||
CE900AD1109B238600754048 /* Preferences.xib */,
|
|
||||||
);
|
|
||||||
path = xib;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
CE49DEF10FDFEB810098617B /* brsinglelineformatter */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE49DEF20FDFEB810098617B /* BRSingleLineFormatter.h */,
|
|
||||||
CE49DEF30FDFEB810098617B /* BRSingleLineFormatter.m */,
|
|
||||||
);
|
|
||||||
name = brsinglelineformatter;
|
|
||||||
path = ../../cocoalib/brsinglelineformatter;
|
|
||||||
sourceTree = SOURCE_ROOT;
|
|
||||||
};
|
|
||||||
CE4B59C41119919700C06C9E /* xib */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE4B59C51119919700C06C9E /* ErrorReportWindow.xib */,
|
|
||||||
CE4B59C61119919700C06C9E /* progress.xib */,
|
|
||||||
CE4B59C71119919700C06C9E /* registration.xib */,
|
|
||||||
);
|
|
||||||
name = xib;
|
|
||||||
path = ../../cocoalib/xib;
|
|
||||||
sourceTree = SOURCE_ROOT;
|
|
||||||
};
|
|
||||||
CE515DDD0FC6C09400EC695D /* cocoalib */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE003CB211242D00004B0AA7 /* controllers */,
|
|
||||||
CE003CBB11242D00004B0AA7 /* proxies */,
|
|
||||||
CE003CBF11242D00004B0AA7 /* views */,
|
|
||||||
CE4B59C41119919700C06C9E /* xib */,
|
|
||||||
CE49DEF10FDFEB810098617B /* brsinglelineformatter */,
|
|
||||||
CE515DE00FC6C12E00EC695D /* Dialogs.h */,
|
|
||||||
CE515DE10FC6C12E00EC695D /* Dialogs.m */,
|
|
||||||
CE515DE20FC6C12E00EC695D /* HSErrorReportWindow.h */,
|
|
||||||
CE515DE30FC6C12E00EC695D /* HSErrorReportWindow.m */,
|
|
||||||
CE003CB911242D00004B0AA7 /* NSEventAdditions.h */,
|
|
||||||
CE003CBA11242D00004B0AA7 /* NSEventAdditions.m */,
|
|
||||||
CE515DE60FC6C12E00EC695D /* ProgressController.h */,
|
|
||||||
CE515DE70FC6C12E00EC695D /* ProgressController.m */,
|
|
||||||
CE515DE80FC6C12E00EC695D /* PyApp.h */,
|
|
||||||
CE003CBE11242D00004B0AA7 /* PyRegistrable.h */,
|
|
||||||
CE515DE90FC6C12E00EC695D /* RecentDirectories.h */,
|
|
||||||
CE515DEA0FC6C12E00EC695D /* RecentDirectories.m */,
|
|
||||||
CE515DEB0FC6C12E00EC695D /* RegistrationInterface.h */,
|
|
||||||
CE515DEC0FC6C12E00EC695D /* RegistrationInterface.m */,
|
|
||||||
CE515DEF0FC6C12E00EC695D /* Utils.h */,
|
|
||||||
CE515DF00FC6C12E00EC695D /* Utils.m */,
|
|
||||||
CE515DF10FC6C12E00EC695D /* ValueTransformers.h */,
|
|
||||||
CE515DF20FC6C12E00EC695D /* ValueTransformers.m */,
|
|
||||||
);
|
|
||||||
name = cocoalib;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
CE515E140FC6C17900EC695D /* dgbase */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CE003CCD11242D2C004B0AA7 /* DirectoryOutline.h */,
|
|
||||||
CE003CCE11242D2C004B0AA7 /* DirectoryOutline.m */,
|
|
||||||
CE003CCF11242D2C004B0AA7 /* PyDirectoryOutline.h */,
|
|
||||||
CE515E150FC6C19300EC695D /* AppDelegate.h */,
|
|
||||||
CE515E160FC6C19300EC695D /* AppDelegate.m */,
|
|
||||||
CE515E170FC6C19300EC695D /* Consts.h */,
|
|
||||||
CE6032BE0FE6784C007E33FF /* DetailsPanel.h */,
|
|
||||||
CE6032BF0FE6784C007E33FF /* DetailsPanel.m */,
|
|
||||||
CE515E180FC6C19300EC695D /* DirectoryPanel.h */,
|
|
||||||
CE515E190FC6C19300EC695D /* DirectoryPanel.m */,
|
|
||||||
CE515E1B0FC6C19300EC695D /* ResultWindow.h */,
|
|
||||||
CE515E1C0FC6C19300EC695D /* ResultWindow.m */,
|
|
||||||
CE0B3D6511243F83009A7A30 /* ResultOutline.h */,
|
|
||||||
CE0B3D6611243F83009A7A30 /* ResultOutline.m */,
|
|
||||||
CEDF07A1112493B200EE5BC0 /* StatsLabel.h */,
|
|
||||||
CEDF07A2112493B200EE5BC0 /* StatsLabel.m */,
|
|
||||||
CE515E1A0FC6C19300EC695D /* PyDupeGuru.h */,
|
|
||||||
CED0A591111C9FD10020AD7D /* PyDetailsPanel.h */,
|
|
||||||
CE0B3D6411243F83009A7A30 /* PyResultTree.h */,
|
|
||||||
CEDF07A0112493B200EE5BC0 /* PyStatsLabel.h */,
|
|
||||||
);
|
|
||||||
name = dgbase;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
CEFC294309C89E0000D9F998 /* images */ = {
|
|
||||||
isa = PBXGroup;
|
|
||||||
children = (
|
|
||||||
CEFC295309C89FF200D9F998 /* details32.png */,
|
|
||||||
CEFC295409C89FF200D9F998 /* preferences32.png */,
|
|
||||||
CEFC294509C89E3D00D9F998 /* folder32.png */,
|
|
||||||
);
|
|
||||||
name = images;
|
|
||||||
sourceTree = "<group>";
|
|
||||||
};
|
|
||||||
/* End PBXGroup section */
|
|
||||||
|
|
||||||
/* Begin PBXNativeTarget section */
|
|
||||||
8D1107260486CEB800E47090 /* dupeguru */ = {
|
|
||||||
isa = PBXNativeTarget;
|
|
||||||
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dupeguru" */;
|
|
||||||
buildPhases = (
|
|
||||||
8D1107290486CEB800E47090 /* Resources */,
|
|
||||||
8D11072C0486CEB800E47090 /* Sources */,
|
|
||||||
8D11072E0486CEB800E47090 /* Frameworks */,
|
|
||||||
CECC02B709A36E8200CC0A94 /* CopyFiles */,
|
|
||||||
CE6B288A0AFB7FC900508D93 /* AppleScript */,
|
|
||||||
);
|
|
||||||
buildRules = (
|
|
||||||
);
|
|
||||||
dependencies = (
|
|
||||||
);
|
|
||||||
name = dupeguru;
|
|
||||||
productInstallPath = "$(HOME)/Applications";
|
|
||||||
productName = dupeguru;
|
|
||||||
productReference = 8D1107320486CEB800E47090 /* dupeGuru ME.app */;
|
|
||||||
productType = "com.apple.product-type.application";
|
|
||||||
};
|
|
||||||
/* End PBXNativeTarget section */
|
|
||||||
|
|
||||||
/* Begin PBXProject section */
|
|
||||||
29B97313FDCFA39411CA2CEA /* Project object */ = {
|
|
||||||
isa = PBXProject;
|
|
||||||
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "dupeguru" */;
|
|
||||||
compatibilityVersion = "Xcode 3.0";
|
|
||||||
hasScannedForEncodings = 1;
|
|
||||||
mainGroup = 29B97314FDCFA39411CA2CEA /* dupeguru */;
|
|
||||||
projectDirPath = "";
|
|
||||||
projectRoot = "";
|
|
||||||
targets = (
|
|
||||||
8D1107260486CEB800E47090 /* dupeguru */,
|
|
||||||
);
|
|
||||||
};
|
|
||||||
/* End PBXProject section */
|
|
||||||
|
|
||||||
/* Begin PBXResourcesBuildPhase section */
|
|
||||||
8D1107290486CEB800E47090 /* Resources */ = {
|
|
||||||
isa = PBXResourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
CE381D0509915304003581CE /* dg_cocoa.plugin in Resources */,
|
|
||||||
CE073F6309CAE1A3005C1D2F /* dupeguru_me_help in Resources */,
|
|
||||||
CEEB135209C837A2004D2330 /* dupeguru.icns in Resources */,
|
|
||||||
CEFC294609C89E3D00D9F998 /* folder32.png in Resources */,
|
|
||||||
CEFC295509C89FF200D9F998 /* details32.png in Resources */,
|
|
||||||
CEFC295609C89FF200D9F998 /* preferences32.png in Resources */,
|
|
||||||
CE6E0E9F1054EB97008D9390 /* dsa_pub.pem in Resources */,
|
|
||||||
CE3FBDD31094637800B72D77 /* DetailsPanel.xib in Resources */,
|
|
||||||
CE3FBDD41094637800B72D77 /* DirectoryPanel.xib in Resources */,
|
|
||||||
CE900AD2109B238600754048 /* Preferences.xib in Resources */,
|
|
||||||
CE900AD7109B2A9B00754048 /* MainMenu.xib in Resources */,
|
|
||||||
CE4B59C81119919700C06C9E /* ErrorReportWindow.xib in Resources */,
|
|
||||||
CE4B59C91119919700C06C9E /* progress.xib in Resources */,
|
|
||||||
CE4B59CA1119919700C06C9E /* registration.xib in Resources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXResourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin PBXSourcesBuildPhase section */
|
|
||||||
8D11072C0486CEB800E47090 /* Sources */ = {
|
|
||||||
isa = PBXSourcesBuildPhase;
|
|
||||||
buildActionMask = 2147483647;
|
|
||||||
files = (
|
|
||||||
8D11072D0486CEB800E47090 /* main.m in Sources */,
|
|
||||||
CE381C9609914ACE003581CE /* AppDelegate.m in Sources */,
|
|
||||||
CE381C9C09914ADF003581CE /* ResultWindow.m in Sources */,
|
|
||||||
CE68EE6809ABC48000971085 /* DirectoryPanel.m in Sources */,
|
|
||||||
CE515DF30FC6C12E00EC695D /* Dialogs.m in Sources */,
|
|
||||||
CE515DF40FC6C12E00EC695D /* HSErrorReportWindow.m in Sources */,
|
|
||||||
CE515DF60FC6C12E00EC695D /* ProgressController.m in Sources */,
|
|
||||||
CE515DF70FC6C12E00EC695D /* RecentDirectories.m in Sources */,
|
|
||||||
CE515DF80FC6C12E00EC695D /* RegistrationInterface.m in Sources */,
|
|
||||||
CE515DFA0FC6C12E00EC695D /* Utils.m in Sources */,
|
|
||||||
CE515DFB0FC6C12E00EC695D /* ValueTransformers.m in Sources */,
|
|
||||||
CE515E1D0FC6C19300EC695D /* AppDelegate.m in Sources */,
|
|
||||||
CE515E1E0FC6C19300EC695D /* DirectoryPanel.m in Sources */,
|
|
||||||
CE515E1F0FC6C19300EC695D /* ResultWindow.m in Sources */,
|
|
||||||
CE49DEF60FDFEB810098617B /* BRSingleLineFormatter.m in Sources */,
|
|
||||||
CE6032C00FE6784C007E33FF /* DetailsPanel.m in Sources */,
|
|
||||||
CE003CC611242D00004B0AA7 /* HSGUIController.m in Sources */,
|
|
||||||
CE003CC711242D00004B0AA7 /* HSOutline.m in Sources */,
|
|
||||||
CE003CC811242D00004B0AA7 /* HSWindowController.m in Sources */,
|
|
||||||
CE003CC911242D00004B0AA7 /* NSEventAdditions.m in Sources */,
|
|
||||||
CE003CCA11242D00004B0AA7 /* HSOutlineView.m in Sources */,
|
|
||||||
CE003CCB11242D00004B0AA7 /* NSIndexPathAdditions.m in Sources */,
|
|
||||||
CE003CCC11242D00004B0AA7 /* NSTableViewAdditions.m in Sources */,
|
|
||||||
CE003CD011242D2C004B0AA7 /* DirectoryOutline.m in Sources */,
|
|
||||||
CE0B3D6711243F83009A7A30 /* ResultOutline.m in Sources */,
|
|
||||||
CEDF07A3112493B200EE5BC0 /* StatsLabel.m in Sources */,
|
|
||||||
);
|
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
|
||||||
};
|
|
||||||
/* End PBXSourcesBuildPhase section */
|
|
||||||
|
|
||||||
/* Begin XCBuildConfiguration section */
|
|
||||||
C01FCF4C08A954540054247B /* release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
|
||||||
INFOPLIST_FILE = Info.plist;
|
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
|
||||||
PRODUCT_NAME = "dupeGuru ME";
|
|
||||||
WRAPPER_EXTENSION = app;
|
|
||||||
};
|
|
||||||
name = release;
|
|
||||||
};
|
|
||||||
C01FCF5008A954540054247B /* release */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ARCHS = (
|
|
||||||
i386,
|
|
||||||
x86_64,
|
|
||||||
ppc,
|
|
||||||
);
|
|
||||||
GCC_C_LANGUAGE_STANDARD = c99;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
|
||||||
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
|
|
||||||
};
|
|
||||||
name = release;
|
|
||||||
};
|
|
||||||
CED596C5111AF56D00C0CF2B /* dev */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
ARCHS = "$(NATIVE_ARCH_ACTUAL)";
|
|
||||||
GCC_C_LANGUAGE_STANDARD = c99;
|
|
||||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
|
||||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
|
||||||
MACOSX_DEPLOYMENT_TARGET = 10.5;
|
|
||||||
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
|
|
||||||
};
|
|
||||||
name = dev;
|
|
||||||
};
|
|
||||||
CED596C6111AF56D00C0CF2B /* dev */ = {
|
|
||||||
isa = XCBuildConfiguration;
|
|
||||||
buildSettings = {
|
|
||||||
INFOPLIST_FILE = Info.plist;
|
|
||||||
INSTALL_PATH = "$(HOME)/Applications";
|
|
||||||
PRODUCT_NAME = "dupeGuru ME";
|
|
||||||
WRAPPER_EXTENSION = app;
|
|
||||||
};
|
|
||||||
name = dev;
|
|
||||||
};
|
|
||||||
/* End XCBuildConfiguration section */
|
|
||||||
|
|
||||||
/* Begin XCConfigurationList section */
|
|
||||||
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dupeguru" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
C01FCF4C08A954540054247B /* release */,
|
|
||||||
CED596C6111AF56D00C0CF2B /* dev */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = release;
|
|
||||||
};
|
|
||||||
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "dupeguru" */ = {
|
|
||||||
isa = XCConfigurationList;
|
|
||||||
buildConfigurations = (
|
|
||||||
C01FCF5008A954540054247B /* release */,
|
|
||||||
CED596C5111AF56D00C0CF2B /* dev */,
|
|
||||||
);
|
|
||||||
defaultConfigurationIsVisible = 0;
|
|
||||||
defaultConfigurationName = release;
|
|
||||||
};
|
|
||||||
/* End XCConfigurationList section */
|
|
||||||
};
|
|
||||||
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
/*
|
|
||||||
Copyright 2010 Hardcoded Software (http://www.hardcoded.net)
|
|
||||||
|
|
||||||
This software is licensed under the "HS" License as described in the "LICENSE" file,
|
|
||||||
which should be included with this package. The terms are also available at
|
|
||||||
http://www.hardcoded.net/licenses/hs_license
|
|
||||||
*/
|
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
|
||||||
#import "Utils.h"
|
|
||||||
|
|
||||||
int main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
|
||||||
[Utils setPluginName:@"dg_cocoa"];
|
|
||||||
NSString *pluginPath = [[NSBundle mainBundle]
|
|
||||||
pathForResource:@"dg_cocoa"
|
|
||||||
ofType:@"plugin"];
|
|
||||||
NSBundle *pluginBundle = [NSBundle bundleWithPath:pluginPath];
|
|
||||||
[pluginBundle load];
|
|
||||||
[pool release];
|
|
||||||
return NSApplicationMain(argc, (const char **) argv);
|
|
||||||
}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user