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 537319 - EntryCompletion not emitting signal_match_selected ()
EntryCompletion not emitting signal_match_selected ()
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.13.x
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2008-06-08 23:39 UTC by Marko Anastasov
Modified: 2008-09-30 15:06 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24


Attachments
test case patch, apply within gtkmm-documentation/examples/book/entry/completion (3.35 KB, text/plain)
2008-06-08 23:41 UTC, Marko Anastasov
  Details
proposed addition to the signal proxy doc text (1.33 KB, patch)
2008-09-30 12:18 UTC, Marko Anastasov
none Details | Review

Description Marko Anastasov 2008-06-08 23:39:46 UTC
Something's wrong with EntryCompletion::signal_match_selected (). The code connected to that signal is never executed, although I haven't had time today to look into it in more detail. I'm attaching a patch for the example in gtkmm-documentation which should be a sufficient test case, including a C (gobj()) version of this that works as expected.
Comment 1 Marko Anastasov 2008-06-08 23:41:16 UTC
Created attachment 112377 [details]
test case patch, apply within gtkmm-documentation/examples/book/entry/completion
Comment 2 Murray Cumming 2008-06-10 06:48:40 UTC
I notice that this returns a bool. Does it make a difference to connect before rather than after the default signal handler?
Comment 3 Marko Anastasov 2008-06-15 11:17:26 UTC
From looking at the code, I think that the condition if(obj && obj->is_derived_()) in EntryCompletion_Class::match_selected_callback_custom() is preventing the handler from being invoked. That allows only derived classes to set a custom handler function.
Comment 4 Murray Cumming 2008-06-15 17:39:49 UTC
> That allows only derived classes to set a custom handler function.

That deals only with default signal handler, so I don't think it's relevant. You can't override a default signal handler without deriving. That's just an optimization.
Comment 5 Marko Anastasov 2008-06-15 17:56:48 UTC
Ok. Connecting before does make the custom handler be invoked. I guess we could add a comment about this in code documentation?
Comment 6 Murray Cumming 2008-08-04 11:44:48 UTC
A patch would be welcome.
Comment 7 Marko Anastasov 2008-09-30 12:18:09 UTC
Created attachment 119640 [details] [review]
proposed addition to the signal proxy doc text
Comment 8 Murray Cumming 2008-09-30 12:29:12 UTC
Please apply, but mention a little more about about why. For instance, "so that it is called before the default signal handler, which would otherwise claim to have fully handled the signal by returning false/true/iforget"
Comment 9 Marko Anastasov 2008-09-30 15:06:23 UTC
Committed, with an explanation in the doc.