Re: GtkBuildable type resolver



Owen Taylor wrote:
> On Tue, 2007-06-05 at 11:23 -0400, Owen Taylor wrote:
>> On Mon, 2007-06-04 at 23:00 +0300, Markku Vire wrote:
>>> Hi,
>>>
>>> I faced similar scenario while writing a tiny gobject code generator. 
>>> I ended up to use similar techinique than your second alternative. It
>>> works nicely in 99% of the cases, but cannot handle cases like:
>>>
>>>   GtkIMContext => gtk_i_m_context_get_type != gtk_im_context_get_type
>>>
>>> Otherwise this would be a nice way to force everybody to use GObject
>>> naming conventions ;)
>> Actually, GtkIMContext fits the standard naming rules we have for
>> mixed-case names:
>>
>> They are something like:
>>
>>  NAME := INITIAL_WORD WORD+
>>  INITIAL_WORD := [A-Z][a-z0-9]*
>>  WORD := [A_Z]{2,} | [A-Z][a-z0-9]+
> 
> As I said, "something like" ... to correct myself:
>                         
>  WORD := [A-Z]{1,2}[a-z0-9]+ | [A_Z]{2,}
> 
> Not that anybody probably would have noticed...

Good point, I think you just found a bug in the implementation I wrote,
where GtkUIManager needed a special case since the guessing heuristic
resolved at gtk_ui_manager_get_type, GtkVBox is handled properly though.

-- 
Johan Dahlin <jdahlin async com br>
Async Open Source



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]