[Geany-devel] More Per-Project Configuration Options

Thomas Martitz thomas.martitz at xxxxx
Tue Jul 10 06:56:07 UTC 2012


Am 10.07.2012 07:37, schrieb Matthew Brush:
> On 12-07-09 04:57 PM, Braden Walters wrote:
>> Hi. I noticed a problem that affected me back in 0.2x that thankfully is
>> (mostly) solved in 1.22. When I say mostly, I mean it fixes how the
>> problem affects me right now, but possibly not for others, and I feel
>> this may also affect me again eventually. The problem I noticed is that
>> not all configuration options that may change from project-to-project
>> are actually settings you can change on a per-project basis. The options
>> that concern me the most are those that deal with the format of the
>> saved file (line ending characters, new line at end of file (fixed in
>> 1.22), tabs/spaces (not a problem), file encoding). I'm interested in
>> the developers' opinions on this.
>>
>> Someone in IRC also mentioned that if many more options become
>> configurable per-project, the global application options might be
>> rendered useless (as project settings will override everything). Perhaps
>> this could be solved by having a way to reset individual project options
>> (perhaps a list of all things that have been changed, and a "Reset to
>> Global" button to reset that individual item so it does not appear in
>> that project's file).
>>
>> I'm curious what the core developers' opinion is on this. If it sounds
>> good, I'd definitely be interested in helping make it possible (although
>> I don't know the Geany code base, I could learn my way around relevant
>> parts).
>
> Hi,
>
> What about just adding new settings to the project config file without 
> messing with the UI? Those who need them can RTM and see what settings 
> are available, those who are content with what exists currently can go 
> on happily ever after. You can add as many project preferences as you 
> care to code and document this way.


I hate needing to edit config files directly. This is not user friendly.


>
> If a user sets something in the project config file, it overrides the 
> global config file when that project is open, end of story, no UI 
> tricks needed to tell her this, it's "just how it is" (documented).
>
> The other way(s) discussed seem like they would Eclipse the UI's 
> usability.
>


I actually quite like how Eclipse handles this, it should be considered 
for Geany too:

Each global settings tab (given it can be overridden by a project) has a 
line at the top saying that it can be overridden on a per-project basis.

Then, for each project, each tab in the project preferences have a 
checkbox at the top that choose whether to inherit from global settings 
or override all settings in the tab. Unchecking the checkbox immediatly 
applies the global settings to the project. Checking the box prefills 
the settings with the values from the current global settings but can be 
changed obviously.

Note that settings are grouped in tabs, so there is not one checkbox per 
setting, but per tab.

This UI makes it easy to discover if stuff can be/is overriden by a 
project. It makes it easy to revert to global settings. It makes it 
possible without a massive amount new per-setting checkboxes to decide 
whether to override.

PS: Eclipse's way to handle per-file settings is also quite OK IMO but I 
guess that's another topic.

Best regards.



More information about the Devel mailing list