[Geany-devel] Color Schemes Menu Patches
mbrush at xxxxx
Sat Apr 30 22:52:59 UTC 2011
On 04/30/11 09:29, Nick Treleaven wrote:
> 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.
Agreed that the menu items are ok, but it would be nice to have it in
the preferences dialog. Also editing of the themes through the
GUI/Prefs Dialog would be an *amazing* feature, but unless someone is
willing to actually do it, there's no point discussing it further.
>> 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
> 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
I personally think since the values are directly displayed as UI
elements/text that they should be allowed to be translated the way
GKeyFile allows for. Breaking this just to keep consistent with other
code that doesn't read in UI element text directly seems odd to me.
> I also used ui_widget_set_tooltip_text(), which works on GTK 2.8.
Cool, I didn't realize there was a wrapper for this.
More information about the Devel