Re: meta-data browser: EntryWidget + treemodel = chicken/egg problem

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

 



On 07/12/2009 03:12 PM, Roman Joost wrote:
>   When I enter the first characters in the entry, the following happens:
>
>      1. the schema is set (row-changed signal is emitted)
>      2. the property *value* is set (another row-changed signal)
>
>   That raises actually to a big problem, because when I populate two
>   of my Entry widgets in the browser I get a pingpong going on between
>   the Entries. Funny, but not usable.
>    

When a listener makes changes to a the thing it listens to, it typically 
will want to have 
g_signal_handlers_block_by_func()/g_signal_handlers_unblock_by_func() 
around the piece of code that does the change, and/or "if (new_value == 
current_value) return;" at the beginning of the callback to prevent the 
pingpong you are describing. Sometimes it's tricky to get this right.

HTH,
Martin

_______________________________________________
Gimp-developer mailing list
Gimp-developer@xxxxxxxxxxxxxxxxxxxxxx
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux