[Geany-devel] Color Schemes Menu Patches

Nick Treleaven nick.treleaven at xxxxx
Sat Apr 30 16:29:24 UTC 2011


On Fri, 29 Apr 2011 23:49:00 -0700
Matthew Brush <mbrush at codebrainz.ca> wrote:

> > 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.

I was just thinking a dialog listing all color schemes and descriptions
visible at once. I'm not keen on adding GUI editing of styles really.

But the menu items could stay, they're not bad.

> 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.

I've now applied it, with changes. The patch only read the keys from
the user config file, not system one. Also it used
g_key_file_get_locale_string - we use g_key_file_get_string everywhere
else.

I also used ui_widget_set_tooltip_text(), which works on GTK 2.8.

Regards,
Nick



More information about the Devel mailing list