little offtopic: multi-level signal handling
- From: Stefan Kost <kost imn htwk-leipzig de>
- To: gtk-app-devel-list gnome org
- Subject: little offtopic: multi-level signal handling
- Date: Wed, 08 Dec 2004 15:24:03 +0100
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
--
\|/ 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]