Closed JakeSFR closed 3 years ago
Hmm not reproduced. The tooltip text is fine.
for (i=0; i < G_N_ELEMENTS(sort_names); i++)
-> for (i=0; i < G_N_ELEMENTS(sorts); i++)
works?
if (current == -1 || eb == 2) {
very smart!
I think SORT_DATEC I changed broked it.
Hmm not reproduced. The tooltip text is fine.
for (i=0; i < G_N_ELEMENTS(sort_names); i++) -> for (i=0; i < G_N_ELEMENTS(sorts); i++) works?
No, makes no difference, it's the same number of elements, anyway.
Ok, maybe you left-clicked a few times, before right-clicking and your starting position was not 'by name, ascending'? In such a case you need to keep right-clicking until the "loop of 4" kicks in.
Adding this at the end of toolbar_sort_clicked()
:
printf("> %s: %d, %s\n",
eb == 1 ? "Left-click" : "Right-Click",
next_wrapped,
dir == GTK_SORT_ASCENDING ? _("ascending") : _("descending"));
opening a ROX window, left-clicking a few times and then right-clicking, should give you this:
Left-click: 1, ascending Left-click: 2, ascending Left-click: 3, ascending Left-click: 4, ascending Left-click: 5, ascending Left-click: 6, ascending Right-Click: 5, ascending Right-Click: 4, ascending Right-Click: 3, ascending Right-Click: 2, ascending Right-Click: 1, ascending Right-Click: 0, ascending Right-Click: 1, descending Right-Click: 0, descending Right-Click: 1, ascending Right-Click: 0, ascending Right-Click: 1, descending Right-Click: 0, descending Right-Click: 1, ascending
and so on...
if (current == -1 || eb == 2) {
very smart!
Thanks!
I think SORT_DATEC I changed broked it.
I don't think so. The problem seems to be:
next_wrapped = next % G_N_ELEMENTS(sorts);
It will wrap from 7 to 0 when you left-clicking (next = current + 1
), but won't wrap from -1 to 6, when you right-clicking (next = current - 1
).
Ah sorry I get it. I will pull when PR is made.
BTW can I invite you as a collaborator? these process are not bad but if you have minor fixes, being a collaborator is good I think.
Ah sorry I get it. I will pull when PR is made.
No worries, done: https://github.com/jun7/rox-filer/pull/226
BTW can I invite you as a collaborator? these process are not bad but if you have minor fixes, being a collaborator is good I think.
Sure, why not. For small time commits like typos it would definitely be convenient. Thank you! :)
Thank you for reporting!
When you open ROX window and keep right-clicking the "Change sort criteria" icon, it rotates only through these 4:
whereas it should be:
Looks like it used to work, but got broken in this commit from 2003, which was apparently an attempt to simplify it: https://github.com/jun7/rox-filer/commit/f6d7ea77cc5a2569cb1a9ecfa9524943e7520333#diff-e6aed3e68ecc5151ca322f12adc2413d1efab0999ed3794c31c76f693ce58e43
I've backported the previous code to the current codebase and it seems to work fine now:
I also added a middle-click (which is currently an alias for right-click) action to instantly return to the default view, which is very useful when one is in the middle of some strange sort criteria. That was actually my original intention, until I noticed that sorting doesn't work the way it should.
If it looks ok to you, I'll make a PR.