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 577623 - support detailed signal declaration
support detailed signal declaration
Status: RESOLVED FIXED
Product: vala
Classification: Core
Component: Objects
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Vala maintainers
Vala maintainers
Depends on:
Blocks:
 
 
Reported: 2009-04-01 16:54 UTC by Allison Karlitskaya (desrt)
Modified: 2010-03-20 13:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Reworked version, using a [Signal] attribute with parameters (3.68 KB, patch)
2009-09-17 17:39 UTC, Jens Georg
none Details | Review

Description Allison Karlitskaya (desrt) 2009-04-01 16:54:10 UTC
currently the flags for signals declared on vala-written objects are hardcoded to G_SIGNAL_RUN_LAST.

unfortunately, in order to use 'detail' with gobject signals, you need to give G_SIGNAL_DETAILED when registering the new signal.

some sort of [Detailed] attribute on the signal might be helpful.  it might also be helpful to have a more generic mechanism by which we can specify things about signals (other flags, accumulator behaviour, etc).
Comment 1 Jens Georg 2009-09-12 12:32:15 UTC
I added the suggested [Detailed] attribute here:

http://github.com/phako/vala/commit/4d6c513583e38a398a0b46a349a0b88738330bab
Comment 2 Jens Georg 2009-09-17 17:39:50 UTC
Created attachment 143389 [details] [review]
Reworked version, using a [Signal] attribute with parameters

This is a reworked version of the previous patch; Instead of using a [Detailed] attribute it implements a [Signal] attribute with the following parameters:

  - detailed (bool) -> G_SIGNAL_DETAILED
  - run (string) ["first", "last", "cleanup"] -> G_SIGNAL_RUN_*
  - no_recurse (bool) -> G_SIGNAL_NO_RECURSE
  - action (bool) -> G_SIGNAL_ACTION
  - no_hooks (bool) -> G_SIGNAL_NO_HOOKS

The default is unchanged (G_SIGNAL_RUN_LAST and nothing else)
Comment 3 Jürg Billeter 2010-03-20 13:25:18 UTC
commit ef604756c677206c12088b2dcd9d1b886b3f9545
Author: Jens Georg <mail@jensge.org>
Date:   Sat Sep 12 14:25:45 2009 +0200

    Add Signal attribute for signal declarations
    
    This supports the following arguments:
      - detailed (bool) -> G_SIGNAL_DETAILED
      - run (string) ["first", "last", "cleanup"] -> G_SIGNAL_RUN_*
      - no_recurse (bool) -> G_SIGNAL_NO_RECURSE
      - action (bool) -> G_SIGNAL_ACTION
      - no_hooks (bool) -> G_SIGNAL_NO_HOOKS
    
    The default is unchanged (G_SIGNAL_RUN_LAST and nothing else).
    
    Fixes bug 577623.