GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Mon Aug 29, 2016 9:35 pm

All times are UTC

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Gedit plugin
PostPosted: Tue Oct 18, 2011 6:40 am 

Joined: Tue Oct 18, 2011 6:25 am
Posts: 1
I have a problem an hope that you can help me solve it.
I'm writing a simple plugin for gedit (gnome 3). My plugin class looks like this:

class Plug(GObject.Object, Gedit.WindowActivatable, PeasGtk.Configurable):
def __init__(self):
def do_activate(self):

def do_create_configure_widget(self):
rb1.connect("toggled", self.change, "a")
rb2.connect("toggled", self.change, "b")
rb2.connect("toggled", self.change, "c")
return widget

def change(self, widget, data):

The problem is, when I change the selection in configuration widget, variable bla doesn't change.
What am I doing wrong?

Thank you

 Post subject: Re: Gedit plugin
PostPosted: Wed Oct 19, 2011 1:03 pm 
Never Seen the Sunlight

Joined: Wed Jul 23, 2008 10:31 am
Posts: 2406
Location: Slovenia
Hello and welcome to the GTK+ forums!

You're probably having troubles because GtkToggleButton::toggled signal is emitted twice when radio buttons are operated (first button is deselected and second button is selected). You'll probably want to filter out the first signal emission by checking for active flag of your button.


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: Yahoo [Bot] and 4 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group