The fact the "Tree Browser" plug-in appears after "Scope Debugger" in the sidebar, after I re-open Geany has been annoying me for ages. So I used to de- and re-activate the "Scope Debugger" after each launch of Geany to send it to the end. This pull request fixed this problem, in a test run locally on Linux. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/3919
-- Commit Summary --
* preserve the plugins order in the sidebar
-- File Changes --
M src/plugins.c (14)
-- Patch Links --
https://github.com/geany/geany/pull/3919.patch https://github.com/geany/geany/pull/3919.diff
@b4n requested changes on this pull request.
I don't think that following the plugin activation order makes much sense, OK it allows you to trick this, but it would feel pretty random to me (and applies to the prefs and other things as well).
If this is a real issue, maybe there could be a real way of acting on this, either by sorting the tabs themselves to user prefs, or by having the plugins try to order their tabs another way
I don't agree about the point about randomness. The sorting affects the order of tabs after closing and re-openning Geany, so at least the sidebar tabs order is more random with sorting. I don't think the Plugin Preferences tabs that become dependent on activation order is an issue as that dialog is used only once a while. Additionally, dialog tabs are not sorted elsewhere neither.
For the sake of simplicity, I am not in favour of adding other user prefs for tab orders that are different between the sidebar and the Plugin Preferences neither. Additionally, tabs order cannot be controlled by individual plugins, well other than they try to compete for the name with top alphabetical spot!
FYI, previously I tried to change the Tree Browser plugin name to make it alphabetically more competitive!, but I was told here that I can edit the geany.conf file to set the order of plugins in the sidebar, and it worked. In Geany-1.38, which is default in Ubuntu-22.04, it works too, but not in the master branch. The plugin entries are now in session.conf file and I suppose that is where the regression has occurred. I suppose those changes were to solve some other problem but I will not try to track them down further.
What is the actual problem here? Is it that the order of tabs can't be set by the user and isn't restored?
If so thats the problem to fix by making the tabs draggable like the edit pane tabs and to save and restore the order on shutdown and restart. Not apply some sorting which may/may not suit any individual user.
@elextr , yes that is the issue.
I agree with @b4n in that the order of tabs in Plugins Preferences shall remain sorted (this pull request breaks that).
Implementing draggable tabs requires some refactoring as two of the tabs are hard-coded (tab indices 0 and 1 which are used for Symbols and Documents lists). I am not experienced in gtk, so I think it shall be left for another pull-request.
The functionality to save and reload plugins is already there, the problem is that they get sorted so their order gets lost after re-openning Geany, which is the reason for pull request.
I suggest I revise this pull request and make tabs in Plugins Preferences sorted alphabetically again (but not in sidebar), and resubmit. I don't know how resubmitting work, but I can create a new pull request.
@aliraeini pushed 1 commit.
4cbce5e2897082b8a2a0f12900b6c7169af78ac8 Keep Plugin Preferences tab order alphabetical
@aliraeini pushed 1 commit.
903ffd95986a434d35506c4d08581b5be18a7474 Merge branch 'geany:master' into master
@aliraeini pushed 3 commits.
39674cedced87530cc9093fc9109cc398ae91eae add Dockerfile with dark GRK theme 09f571c4c786c0ff9cc2f70e27eedfb011bfb9b2 set defaults based on personal preferences f944047795e0440c80e538fa2be498db49cc4064 add dark color scheme
@aliraeini pushed 1 commit.
55df4c1abed2957114dfae9a4b7e584ea10b8c5c make screenshot blak!
github-comments@lists.geany.org