Re: How to get id of/remove a default handler?



I must admit that what I was trying to do was probably not intended to be
done this way but that's the exercise I received and everyone here is aware
that it's probably a bad thing to do...

Anyway, it's all clear to me now. Thank you for the nice explanation, it's
mostly a new stuff to me and I appreciate all your help guys (-:


David Nečas (Yeti)-2 wrote:
> 
> On Sat, Aug 01, 2009 at 09:27:01AM -0700, machinegodzilla wrote:
>> 
>> I think I understand but I still don't know how to proceed with my case
>> (-:
>> In your example what arguments would you pass to the
>> g_signal_handlers_block_by_func() function? How do I get the 'func' one
>> ("The C closure callback of the handlers") in my case?
> 
> You can't.  Of course, you can subclass GstBin, override the class
> handler in the subclass and avoid chaining to the original hanlder in
> the new handler if you don't want it to be invoked.
> 
> Don't do that.
> 
> If there is a class closure then the class implementation expects it to
> be invoked.  If it is not invoked when it should be the object can get
> into an inconsistent state because something that was assumed to happen
> did not happen.
> 
> It might seem work now but it can break any time.
> 
> You can never know.
> 
> So, instead the questions are:
> - what precise action of the class handler you need to prevent?
> - why?
> - if because it results in something invoked in your code you want to
>   prevent, you can prevent that in your code.
> - if the action is necessary for the object to maintain its internal
>   state then you simply cannot avoid it.
> - if it is not strictly necessary or could be performed differently
>   then ask for a gstreamer ehnancement that enable to control how or
>   whether it is done.
> 
> Yeti
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-get-id-of-remove-a-default-handler--tp24755772p24772681.html
Sent from the Gtk+ - General mailing list archive at Nabble.com.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]