[Geany-devel] Color Schemes Menu Patches

Matthew Brush mbrush at xxxxx
Sat Apr 30 06:49:00 UTC 2011


On 04/29/11 09:59, Nick Treleaven wrote:
> On Sun, 03 Apr 2011 23:54:03 -0700
> Matthew Brush<mbrush at codebrainz.ca>  wrote:
>
>> Hi,
>>
>> I have made some minor changes to the Color Schemes menu, I wanted to
>> see if they look ok.  One of my concerns is that maybe opening/reading
>> each color scheme file like this might be "too slow", but it seems to
>> only happen once, so I'm not sure whether it's significant.  It "feels"
>> fine when I use it with all of the geany-themes color schemes.
>
> Sorry for the late response.
>
> I think the color scheme menu should probably be replaced with a dialog
> instead. That way the color scheme files don't need to be read unless
> the dialog is shown. Although this is not a noticeable performance
> problem, I think it would be good practice to do this, and using a
> dialog is more flexible.

I have actually started a little bit with this previously, I've added a 
new tab under Editor tab called Colors, which has a combo box to select 
a theme, below that is a list view (GtkTreeView) which lists the lexer 
states for each theme to be edited in the list for; use default, fg 
color, bg color, bold, italic, underline columns in each row.  So far I 
have only edited the glade file to add the UI elements, I wrote very 
little actual code for it so far.  This would be quite an ambitious 
undertaking, which is why I didn't proceed much further yet.

Tomorrow I will try and find what I have and push a branch to at least 
serve as some ideas and/or starting point.

In the interim, assuming that the performance isn't an issue, and that 
it only occurs on load (where all the tags for open files and stuff are 
being loaded anyway), the main patch (0001-...) is, imo, pretty clean 
and low-impact, could it be applied?  It's nice to see a proper name for 
the themes, like 'Slush and Poppies' rather than something like 
'slush_and_poppies.conf' and it allows a description of the theme in the 
tooltip.

The main patch is applied in my 'colorschemes_fixup' branch on GitHub[1] 
if you want to try it out and also see the state of the merging of 
geany-themes into the main Geany code.

Cheers,
Matthew Brush

[1] https://github.com/codebrainz/geany/tree/colorscheme_fixup




More information about the Devel mailing list