← Back to team overview

ayatana-commits team mailing list archive

Re: [Merge] lp:~mterry/dbusmenu/disconnect-when-done into lp:dbusmenu

 

I ended up not bothering with IDs, but solving my robustness concern a different way.  My concern was that the label that we originally connected to wouldn't be the one we disconnected from (or maybe even widget or action(?) though less likely).  Signal-connection IDs was one way to get around that, but ended up being slightly more work to deal with.

So I record the widgets themselves in a tiny little struct I attach to each menuitem.  And use weak pointers to make sure everything stays in sync.

I also noticed that object_cache_freed just wouldn't work.  It's only called currently when the widget is destroyed, as we never swap out the cached menuitem.  And we are likely destroying the menuitem at the same time, so the signals still get disconnected.  So it's not an important function to fix, but we should still probably figure that bit out at some point.
-- 
https://code.launchpad.net/~mterry/dbusmenu/disconnect-when-done/+merge/48361
Your team ayatana-commits is subscribed to branch lp:dbusmenu.



References