0

What generally causes this?

What strategies can I use to track the problem down?

I have 6 buttons in a glade (gtk3.0) file - I see 6 warnings..., initially I wasn't getting these errors unitl after editing the glade file and making some (unrelated?) changes to my source - (I implemented an extra signal handler which amongst other things changes the buttons image to one of two (toggles) specified in the glade file)

Chris Camacho
  • 1,164
  • 1
  • 9
  • 31

2 Answers2

0

I tracked it down to some changes to unrealised widgets I was attempting to make.

In the end I had to comment out sections of code to gradually track down where the error was, the fact that even with debug info included the asserts don't give any hint of a line number is rather sub optimal....

Chris Camacho
  • 1,164
  • 1
  • 9
  • 31
0

You want to change the image in a togglebutton when that button is toggled, right? do like this:

def on_foo_button_toggled(btn):
    if btn.get_active():
        // set image1.
    else:
        // set image2.

and bind this function to "toggled" event of that togglebutton.

Benjamin Loison
  • 3,782
  • 4
  • 16
  • 33
LiuLang
  • 773
  • 4
  • 4
  • I've never seen the point of toggle button when you can just change a buttons image in its clicked slot... See my answer for what was causing the problem... – Chris Camacho May 18 '13 at 14:40