Commit 4eb001b
Fix FmDelete command (#64)
* Fix FmDelete command
Commit 5f1b64c intends to enable us to
individually select files to delete from the quick panel.
1. The following changes are made to the new functionality:
a) Don't close a related view, as the file won't be deleted, if
removed from the quick panel.
b) Don't refresh the sidebar folder as nothing is changed, if a
file is removed from the quick panel.
(Also avoids refreshing the sidbear twice)
2. Ensures the public `run()` to be the first method in the class.
3. Avoids calling `len(self.path)` multiple times.
4. Use list arithmetic to create the quick panel items.
* Apply requested review changes
OK, a `num_paths` variable is considered useless even though it avoids
duplicated evaluations of `self.path`, ... ? Lets remove it and the
other useless temporary variables, which are used once only.
The first 2 quick panel items can easily be created in-place.
The number of "format()" calls is reduced for cheaper item creation.
There is no need to display the number of items to delete in both items. So we can use the description line of "Cancel All" command to
describe how to remove individual items from the list of "to-delete"
files.1 parent d463c82 commit 4eb001b
1 file changed
Lines changed: 34 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
8 | 38 | | |
9 | 39 | | |
10 | 40 | | |
11 | 41 | | |
12 | 42 | | |
13 | 43 | | |
| 44 | + | |
14 | 45 | | |
15 | 46 | | |
16 | 47 | | |
17 | 48 | | |
18 | 49 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | 50 | | |
24 | | - | |
25 | | - | |
| 51 | + | |
26 | 52 | | |
| 53 | + | |
| 54 | + | |
27 | 55 | | |
28 | | - | |
29 | 56 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
0 commit comments