I'm not sure what the issue is here. Your image of the sort menu looks like it is active. I tried changing the sort options of a directory and didn't have any problems on my end. Could you provide a bit more detail?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Indeed, the feature works OK in Windows (being rather convenient, see attachments), but in Debian GNU/Linux it fails.
I'm not fooling you. In Debian, the Sort submenu is really inactive, it's seen as to the selection: the Sort item is selected while in its submenu there is no selection at all. The submenu reacts to the clicks with closing itself and there are no results of clicking. See the attached video.
Weird. Can you tell me if you see a ".tkesort" file created in the directory which is being sorted? You will need to use the command-line or other file browser to see this as TKE will hide this file from view. Also, are you seeing any error messages in the debug logfile when this happens?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
There are no .tkesort file, no errors in logfile. See attachment.
I tried to play with sidebar preferences ("hide binary files" is a valuable option btw) and different directories, but got no result.
The .tkesort file would be placed in the "add_shortcuts" directory if it was working properly. The user guide spells out what happens to allow for sorting, but to quickly summarize, a file called ".tkesort" will be placed in the directory if sorting options are changed. This way, whenever TKE is closed/reopened, it will be able to correctly re-apply the previously set ordering options by reading this file. So if you changed the standard order to "Decreasing" or "Manual", it would create the .tkesort file in the effected directory.
Manualy sorting (for me) is useful in creating documentation. I can drag/drop Markdown files in the order that I want them to appear in a document and then use the "Publish Markdown" plugin to generate the documentation for an entire directory tree of Markdown files. Pretty sweet.
I haven't been able to reproduce this problem in macOS, Windows or elementary OS yet. I may have to add some debugging information to this code and have you run with it to see if we can figure out what is going wrong in your Debian environment.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
After making the change, restart TKE, make sure the Tcl console is displayed, and then attempt to change the sorting method to "Manual". Let me know what the Tcl console output is after performing this action.
Also, what version of Tcl/Tk are you using again?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
...the submenu doesn't allow to activate "Decreasing" or "Manual"
...so no output of your code is seen.
I tried the code by calling "wish tke.tcl" in CLI ==> no output as well.
That said I don't see why the Sort submenu is not activated (though seen), while all submenus of main menu are working OK.
Versions:
Tcl/Tk 8.6.8 in Windows
Tcl/Tk 8.6.6 in Debian
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
According to the video that you attached, the menu items were "activateable" (i.e., the state of the menu entries were all "normal" -- no menu items were greyed out). So clicking on a menu entry in that submenu should cause the "sort_updated" procedure to be called.
Now if the command is not being called, then the next time that you display the menu, it will not have changed states so the checkmarks would stay the same.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is Tk not doing what it is supposed to be doing.... ugh! From the Tcl console, do you see any output when you do the following?
Select the directory in the sidebar to change the sorting by, bring up the sidebar menu and make sure that the sorting submenu is displayed, then in the Tcl console enter the following commands:
The first command should display "sidebar::sort_updated". The second command would hopefully display the output that we added to sort_updated (and actually cause the sort to occur).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now I should inform you, that I was able to call the Sort menu items, by these steps:
1) activating the popup menu by mouse
2) going to "Sort" item with Arrow down key
3) activating "Sort" submenu with Arrow right key
4) using Arrow down key and Enter key to call the menu command
Can it be due to Moving Mouse event not processed properly?
I would try all these tomorrow in more details.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If this has been fixed by you, Trevor, then ... you have all rights to let them Tk developers know how to fix it.
I tried this issue in the independent code (attached as well as the video of its run) and as a result I supposed it's the Tk 8.6.6 issue. I'd mistaken.
Big fix!
I'm not sure what the issue is here. Your image of the sort menu looks like it is active. I tried changing the sort options of a directory and didn't have any problems on my end. Could you provide a bit more detail?
Indeed, the feature works OK in Windows (being rather convenient, see attachments), but in Debian GNU/Linux it fails.
I'm not fooling you. In Debian, the Sort submenu is really inactive, it's seen as to the selection: the Sort item is selected while in its submenu there is no selection at all. The submenu reacts to the clicks with closing itself and there are no results of clicking. See the attached video.
Last edit: Alex Plotnikov 2018-12-05
Weird. Can you tell me if you see a ".tkesort" file created in the directory which is being sorted? You will need to use the command-line or other file browser to see this as TKE will hide this file from view. Also, are you seeing any error messages in the debug logfile when this happens?
There are no .tkesort file, no errors in logfile. See attachment.
I tried to play with sidebar preferences ("hide binary files" is a valuable option btw) and different directories, but got no result.
The .tkesort file would be placed in the "add_shortcuts" directory if it was working properly. The user guide spells out what happens to allow for sorting, but to quickly summarize, a file called ".tkesort" will be placed in the directory if sorting options are changed. This way, whenever TKE is closed/reopened, it will be able to correctly re-apply the previously set ordering options by reading this file. So if you changed the standard order to "Decreasing" or "Manual", it would create the .tkesort file in the effected directory.
Manualy sorting (for me) is useful in creating documentation. I can drag/drop Markdown files in the order that I want them to appear in a document and then use the "Publish Markdown" plugin to generate the documentation for an entire directory tree of Markdown files. Pretty sweet.
I haven't been able to reproduce this problem in macOS, Windows or elementary OS yet. I may have to add some debugging information to this code and have you run with it to see if we can figure out what is going wrong in your Debian environment.
okay, send me the code to try it
...
the submenu doesn't allow to activate "Decreasing" or "Manual", so it even doesn't reach the creation of .tkesort
If you are willing to edit TKE source code on your end, add the following line to sidebar.tcl, line 1017:
puts "sortby: $sortby, sortdir: $sortdir, selection: [$widgets(tl) selection]"
After making the change, restart TKE, make sure the Tcl console is displayed, and then attempt to change the sorting method to "Manual". Let me know what the Tcl console output is after performing this action.
Also, what version of Tcl/Tk are you using again?
...the submenu doesn't allow to activate "Decreasing" or "Manual"
...so no output of your code is seen.
I tried the code by calling "wish tke.tcl" in CLI ==> no output as well.
That said I don't see why the Sort submenu is not activated (though seen), while all submenus of main menu are working OK.
Versions:
Tcl/Tk 8.6.8 in Windows
Tcl/Tk 8.6.6 in Debian
According to the video that you attached, the menu items were "activateable" (i.e., the state of the menu entries were all "normal" -- no menu items were greyed out). So clicking on a menu entry in that submenu should cause the "sort_updated" procedure to be called.
Now if the command is not being called, then the next time that you display the menu, it will not have changed states so the checkmarks would stay the same.
Just so on the video. If the submenu disappears it means that I clicked its item - Manually or Decreasing. But no menu command is called at that.
That is Tk not doing what it is supposed to be doing.... ugh! From the Tcl console, do you see any output when you do the following?
Select the directory in the sidebar to change the sorting by, bring up the sidebar menu and make sure that the sorting submenu is displayed, then in the Tcl console enter the following commands:
$sidebar::widgets(sortmenu) entrycget "Manually" -command
$sidebar::widgets(sortmenu) invoke "Manually"
The first command should display "sidebar::sort_updated". The second command would hopefully display the output that we added to sort_updated (and actually cause the sort to occur).
Now I should inform you, that I was able to call the Sort menu items, by these steps:
1) activating the popup menu by mouse
2) going to "Sort" item with Arrow down key
3) activating "Sort" submenu with Arrow right key
4) using Arrow down key and Enter key to call the menu command
Can it be due to Moving Mouse event not processed properly?
I would try all these tomorrow in more details.
This has been fixed and submitted to the default branch. It will be generally available in the next development and stable releases.
If this has been fixed by you, Trevor, then ... you have all rights to let them Tk developers know how to fix it.
I tried this issue in the independent code (attached as well as the video of its run) and as a result I supposed it's the Tk 8.6.6 issue. I'd mistaken.
Big fix!
Works okay on my machine (Windows, Debian).
Available in the 3.6 release.