[Glade-users] signal question

Jim Bodkikns (Dakotacom) wrote:
  Is there a way to connect a button clicked event to an entries 
activate signal? Odd, I know.

If I read you literally; you cant.

Signals dont "connect to eachother".

So the question is, what do you want ? do you want the button
to visually get "pressed" when the entry emits "activate" ?
(iirc thats pressing ENTER in the entry right ?)

Do you want the entry's "activate" signal to be fired when
the button is pressed ?

You can easily do either, maybe what you want is:
     o Connect handler foo_activated to the "activate" signal
     o Connect handler foo_pressed to the "clicked" event of the button
     o in foo_activated() {... gtk_button_clicked (button) ... }
       (programaticly make the button get clicked)
     o in foo_pressed() {... do stuff when either the entry gets
       activated or the button gets pressed in one code segment ... }


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