[Geany-Devel] [Geany-devel] Moving RC styles to a file
Colomban Wendling
lists.ban at herbesfolles.org
Mon Oct 8 17:56:38 UTC 2012
Le 30/09/2012 11:39, Matthew Brush a écrit :
> On 12-09-29 11:43 AM, Colomban Wendling wrote:
>> Hi guys,
>>
>> I'm considering moving our hard-coded custom styles (notebook tab button
>> sizing, monospaced search entries and unmatched search entries) to an
>> external resource file (geany.gtkrc in the datadir) -- patch attached.
>>
>> The main reason to do this is to make it easier to replace this by a CSS
>> file for my GTK3 port (attempt). However, we can see a few other
>> interesting (or not) points:
>>
>> + this removes some hard-coded stuff in a few places;
>> + this actually removes an overall of 16 lines, and actually 39 lines
>> of code (those 23 lines being in the resource file);
>> + easier to replace with a CSS file in the GTK3 port (and gives the
>> same advantages than with the RC files);
>> - that's another file to load.
>
> + less memory required for the whole runtime (ie. file contents can be
> freed from memory after parsing).
Right, but it's not like we had tons of custom styles in static strings,
so I doubt it'd make a really measurable difference. Still valid point
though.
>> So the question is, are we happy to load another file at startup,
>> besides the Glade XML? I don't think it's a performance problem,
>> moreover the file being probably stored in a near location to the Glade
>> file, but since we always tried to load as less files as possible, do we
>> want to add this file?
>>
>> Since now we need to load the Glade file anyway, I think it's less of a
>> concern to add additional external files. If we think external files
>> are OK, maybe we'd like to also move our custom images out of images.c
>> to normal files in out datadir. Actually, we currently have 7 inline
>> images (aladin (logo), build, close all, and two save all, and the two
>> used in the completion popup), but also "normal" icons (for the symbol
>> list for example).
>>
>> So, what do you think?
>>
>
> Sounds reasonable to me.
Committed.
Cheers,
Colomban
More information about the Devel
mailing list