You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/2074
-- Commit Summary --
* Make Symbols tab "Sort by Name" case insensitive
-- File Changes --
M src/symbols.c (4)
-- Patch Links --
https://github.com/geany/geany/pull/2074.patch https://github.com/geany/geany/pull/2074.diff
https://github.com/geany/geany/issues/2077
Why not, but what's the rationale? Especially if it's changing the way it currently works, there should be reasoning why it's a better behavior and why it won't adversely affect current users.
I just find it's much more useful this way - if I'm looking for a symbol, I can't always remember whether the first letter is upper or lower case, particularly in legacy code with mixed styles. I can't imagine anyone would prefer case-sensitive sorting though maybe I have a limited imagination!
@StephenWassell to be blunt, its a personal preference. Please do not impose your preference on others when current behaviour is different. That just leads to fruitless arguments.
As I commented on the commit, provide an option so users can choose either way.
Ok, where would you prefer it? Preferences gui, various preferences, or symbols tab right click?
We always prefer to NOT use various, its intended to be for things that are VERY rarely touched, indeed originally those settings had no GUI. Unfortunately its become somewhat of a dumping ground, so thanks for offering alternatives.
The preferences GUI sets the default symbol sort order for new documents and the right click sets it for the current documents symbols only, so they are not mutually exclusive and so the right answer actually is "both of these".
Since you probably want to be able to make it default you need to add it to the preferences GUI, but be aware that needs you to use Glade 3.8 to support GTK2 properly (3.8.5 to 3.8.6.1 should work IIUC). Unfortunately its rarely available in repositories so you have to download source from the Glade site and compile.
Please don't edit the Glade file manually, you don't know where Glade would have put stuff if it had added it, so it often makes many ordering changes next time its used after a manual edit, making reviewing harder.
The popup is created by code [here](https://github.com/geany/geany/blob/bf5c9eddd8a500577719af7fc7f1c1ffb8044a49...).
I guess name and appearance sort options should expand to name case, name non-case and appearance options.
@elextr are you suggesting that case-insensitive sort should become another method next to case-sensitive sort? I would rather like to see a toggle that changes the sort-by-name behavior globally so the pop-up wouldn't be concerned.
@kugel- currently each document can be sorted differently, the prefs sets the default unless overridden by the filetype, and the popup sets the current document. It seemed reasonable to continue this capability on to the case sensitivity since I suspect its appropriate for some documents but not all, but sure if having a single setting suits the implementer then thats fine with me.
`Edit->Preferences->Interface->Interface` after the `Default sorting mode` line.
Either way so long as the default behaviour is the same as now.
@StephenWassell let me get in ahead of time and remind you about documenting whatever you do in the manual :grin:
@StephenWassell Also would prefer case insensitve (option is beeter ofc). Do you think of going on with this?
If a global pref is wanted, I think a Various pref is a low impact way to move forward, otherwise we add work for translators and use up dialog space. #2176 makes various prefs look a lot cleaner IMO.
Rather than per document, I think a per file type setting would be more useful here. IIRC there's already a filetype setting for default symbol sort mode. As Go uses capitalisation to set symbol visibility, Go might benefit from case insensitive sorting.
@ntrel As noted above, "Various" preferences should not be used as a catch all just to move ahead. Its for those preferences that shouldn't be modified unless the user knows what they are doing, like the saving methods.
A symbol sort order default isn't like that, it should be where users can find it, probably in the dialog next to the current default for sorting by name or appearance where a user can find it.
"Various" preferences is also a convenient catch-all for obscure preferences nobody will ever use :)
"Various" preferences is also a convenient catch-all for obscure preferences nobody will ever use :)
Yes, thats its point, but as I said above, there already is a section of the prefs dialog dealing with default sorting of the symbols list. Thats where this should go, even if its going to be rarely used.
Thats where this should go, even if its going to be rarely used.
The same could be said about most "various" preferences, thus defeating the purpose of tucking obscure preferences away in the Various tab; to avoid cluttering up the preferences people will use more often. Anyway, I don't really care, just pointing out that this kind of obscure preference is what "Various" prefs (and hidden prefs before it) was designed for, as opposed to "super user" type of preferences only.
Well, my point is that I don't think its "obscure", its simply another option on an already extant set of symbol sorting preferences.
github-comments@lists.geany.org