Re: found one warning



On Sun, Mar 23, 2003 at 08:31:20PM -0800, Carl B. Constantine wrote: 
> Well, as I mentioned, I *do* have a toggled signal defined

No you don't. ;-) If you had subclassed GtkCheckButton to define a
signal, then the error message would say "MySubclass" not
"GtkCheckButton" - and anyway GObject isn't going to let you define a
signal "toggled" when the base class alrady has one, I don't think.

"toggled" is a signal built in to GtkToggleButton and its subclass,
GtkCheckButton.

> and a handler defined for it.

That's different. The error is about the signal, not the handler.

> I know that's not it. Now the bit about being activatable is
> interesting. What do you mean by activatable in this context?

Activatable means the signal has the G_SIGNAL_ACTION flag. 
It means "can be connected to an accelerator" more or less.
The correct signal to use here is "clicked" (which will end up
emitting "toggled" as a side effect).

> Why wouldn't the signal be activatable?

Because it isn't an activatable signal. Some signals are meant to be
the target of a keybinding and some aren't.
 
> >  - it has the activatable signal but it has arguments
> 
> I'm not sure I understand this statement. Why would a signal not have
> arguments? The handler has two arguments to it for example. Would this
> mean I need a second handler just to handle this accelerator? I haven't
> need to do that for other buttons where I have an accelerator key
> defined.

Signal arguments are the things that are not the emitting object or
the user data. Emitting object and user data are arguments to signal
handlers, but are not arguments to signals.

> > In this case, I believe 'toggled' is not activatable. So it can't be
> > used in this context. 'clicked' should work on a check button, though.
> 
> Again, would this would mean I need two separate handlers to do the same
> thing?

No, since "toggled" will be emitted as a side effect of clicked.

> > For the size_request warning, the height passed in is not >= -1,
> > pretty simple. Don't pass in a negative height. ;-) 
> 
> I actually found this one in the debugger and fixed it. What happened is
> I had a size set in Glade for width but not height. I just removed it
> and all is well, though I'm a little unsure as to why.

Sounds like a glade bug.

Havoc





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