Callback from which window???

Hi list, :-)

   I need a program with two identical windows, so I did:

 GtkWidget *winA;
 GtkWidget *winB;
 winA = create_winmon ();   // <- creates my window with a button
 gtk_widget_show (winA);
 winB = create_winmon ();   // <- creates another window just like the other
 gtk_widget_show (winB);

   But there is a problem... both windows have a button1 with "clicked" event that calls function "on_button1_clicked".

   If I click the button1 in winA it calls on_button1_clicked.
   If I click the button1 in winB it calls on_button1_clicked.

   How can I know inside on_button1_clicked function which window was it called from?

     Thanks in advance,

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