After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 152257 - default handlers should never return true
default handlers should never return true
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-09-09 16:23 UTC by Stephen Kennedy
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Stephen Kennedy 2004-09-09 16:23:17 UTC
Here are three common use cases for responding to signals:
1) I want the default behaviour.
2) I want to override the default behaviour.
3) I want default plus additional behaviour (before or after default).

I'm no signals expert, but it seems the following steps are necessary
for the three use cases above. Or perhaps there's an easier way?
1) no action needed.
2) block default handler, install handler.
3) find, remember and disconnect default handler
  a) (before) connect custom, reconnect default
  b) (after) connect a proxy which calls default and returns false
             connect custom handler after

Why don't the builtin signal handlers use "connect_after" and never
stop the signal chain (always return false)? Then we have the much
simpler:
1) no action needed.
2) use connect and return true from handler.
3) use either connect or connect_after depending on need.
Comment 1 Owen Taylor 2004-09-09 17:35:27 UTC
Changing anything here isn't compatible.