Stopping a signal from being called
mark at kingant.net
Sat Aug 11 14:14:13 EDT 2007
In onSwitchPage(), which tab are you removing, exactly? Are you removing the
tab that you just switched away from? In that case, wouldn't it already have
been removed (or maybe about to be removed)? And if so, couldn't you just
detect that and not delete it?
This can't be infinite recursing because at some point you're going to run out
of tabs to delete.
On Sat, 11 Aug 2007 16:13:10 +0530, Prekshu Ajmera wrote
> Basically, I have a function onSwitchPage() which is called when I change
> the current active tab in the notebook .. To do this I use the signal
> 'switch-page'. But in the function onSwitchPage() I also remove a
> page using gtk_notebook_remove_page () which also results in a call
> to onSwitchPage(). Thus infinite recursion occurs :(
> On 8/11/07, Sadrul Habib Chowdhury <imadil at gmail.com> wrote:
> > * Prekshu Ajmera had this to say on [11 Aug 2007, 12:47:22 +0530]:
> > > Hello,
> > >
> > > Is it possible to stop a signal from being called ?
> > > For eg. I don't want 'switch-page' signal being called when I call the
> > > function gtk_notebook_remove_page ()
> > You can try looking at g_signal_handlers_block_matched and/or
> > g_signal_stop_emission family of function/macros.
> > What is it that you are trying to do? Perhaps you don't really want to
> > stop the signal from being emitted?
More information about the Devel