GNOME Bugzilla – Bug 697246
external tools should be alphabetized immediately in menu and dialog
Last modified: 2019-03-23 20:34:30 UTC
To see the problem: 1. Open the Manage External Tools dialog. 2. Press the + button to add a new tool. The new tool entry appears in alphabetical position for its initial text ("New tool"). Type a tool name which is first alphabetically, such as "Aardvark", then press Enter. Notice that the tool stays in the alphabetical position for "New tool" rather than moving to the start of the list. 3. Close the dialog, and open the Tools->External Tools menu. Notice that your new tool appears at the *end* of the list. 4. Open the Manage External Tools dialog again. Now all tools are in alphabetical order. 5. Restart gedit. Now all the tools in the Tools->External Tools menu are alphabetized. I think tools should always appear in alphabetical order both in the dialog and in the menu.
I was having a look at this problem and to be honest I have no idea why it does not work already. When the "edited" signal is emitted we explicitly call row_changed for the rows that contain the specific tool. Any idea what's the right way to tell the tree view that it should reorder the items?
Created attachment 246884 [details] [review] Bug 697246 - Fix the sorting of the external tools menu items Before it was depending on the ToolLibrary to sort the subdirs and tools for it. It also seems that reusing action names causes some problems. This commit fixed the issue in the dialog: https://git.gnome.org/browse/gedit/commit/plugins/externaltools?id=71e12b411a08e169e34dc8b2cfa808739bf90a8f
*** Bug 697248 has been marked as a duplicate of this bug. ***
Review of attachment 246884 [details] [review]: Go ahead and backport
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.