Re: little offtopic: multi-level signal handling



hi hi,

solved it my self, properly destoying object releases the signal that are
attached to them and therefore the issue I described does not really exist

Stefan

Stefan Kost wrote:
hi hi,

how would one handle the following scenario properly in gtk?

we have a gui that has multiple views. when the user changes data signals are
emitted so that the other views can redraw.
Problem is, that when a new file is loaded such signals would be triggered
multiple times (because e.g. 20 items are added).

I basically see two ways to handle it, which both look not so nice:

#1 the loader code can set some flag (bulk-change) in objects that it changes.
this flag is checked before emitting signals

#2 the gui code can set a flag before invoking an action that does bulk-changes
and then signal-handlers ignore the signals when the flag is set

Hope it is understandable.

Ciao
  Stefan


------------------------------------------------------------------------

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

-- 
      \|/            Stefan Kost
     <@ @>           private            business
+-oOO-(_)-OOo------------------------------------------------------ - - -  -   -
|       __  Address  Simildenstr. 5     HTWK Leipzig, Fb IMN, Postfach 301166
|      ///           04277 Leipzig      04251 Leipzig
| __  ///            Germany            Germany
| \\\///    Phone    +49341 2253538     +49341 30766101
|  \__/     EMail    st_kost_at_gmx.net kost_at_imn.htwk-leipzig.de
|           WWW      www.sonicpulse.de  www.imn.htwk-leipzig.de/~kost/about.html
===-=-=--=---=---------------------------------- - - -  -    -


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