Thank you all guys, you're incredible! :)
I've finally implemented the Jon Zabala's answer, I think it's the easiest.
Thank you again!!
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gtk-app-deve
On Mon, Oct 28, 2013 at 04:22:38PM +0100, Borja Mon Serrano wrote:
> The point here is: how can I know what button was pressed in order to
> remove a row?
(a) by passing something that identifies the button within user_data
when you do g_signal_connect...
(b) using something along the lines o
Borja Mon Serrano wrote:
The point here is: how can I know what button was pressed in order to
remove a row?
You need to attach to the "clicked" signal on each button[1]. Each button could
call a separate function or you can pass a pointer to different values to know
which button is which.
t; Date: Mon, 28 Oct 2013 17:29:18 +0200
> From: fr33domlo...@mailoo.org
> To: gtk-app-devel-list@gnome.org
> Subject: Re: Signal of a button dynamically created
>
>
>
> I'm not experienced but here's a quick idea:
>
> Create a new derived Button class whi
Le 28/10/2013 16:22, Borja Mon Serrano a écrit :
> [...]
>
> The point here is: how can I know what button was pressed in order to
> remove a row?
When you connect a handler to a signal, there is a "data" parameter,
just pass in some info identifying the row through it:
g_signal_connect(
I'm not experienced but here's a quick idea:
Create a new derived Button class which handles its own click by
overriding the virtual method, and in that method it emits a signal
which passes the button ID/row number as a parameter. Then listen to
this signal from all buttons :-)
:כתב Borja M