GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 2:56 am

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Possible to change a textbuffer without activating signal?
PostPosted: Sat Oct 29, 2011 1:43 am 
Offline

Joined: Mon Oct 17, 2011 11:39 pm
Posts: 4
Is it possible to change the textbuffer's text without activating the changed event?

I have code in the changed event that will actually change the text... so i don't want them firing changed again.


Top
 Profile  
 
 Post subject: Re: Possible to change a textbuffer without activating signa
PostPosted: Sat Oct 29, 2011 8:15 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 764
Location: UK
Hi,

it is possible to temporary disable the signal emission.

Your would normally connect you signal using some thng like this.
Code:
    gulong  handler_id = g_signal_connect(instance, detailed_signal, c_handler, data)

You can then block and unblock by using the following functions.
Code:
void                g_signal_handler_block              (gpointer instance,
                                                         gulong handler_id);

void                g_signal_handler_unblock            (gpointer instance,
                                                         gulong handler_id);


More information can be found at the on-line documentation http://developer.gnome.org/gobject/stable/gobject-Signals.html#g-signal-handler-block.

E.

_________________
E.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group