[Glade-users] CList question



Fethiye Akbulut wrote:
I hope I was clear.

Yes, I think I understand.  Here is how I would solve this problem.

When the child process is forked and the row is added to the GtkCList,
record the pid in the row somehow.  The function gtk_clist_set_row_data
is the one to use.  Store the pid, or a pointer to a structure
containing the pid.

/usr/include/gtk/gtkclist.h:

/* sets a arbitrary data pointer for a given row */
void gtk_clist_set_row_data (GtkCList *clist,
                             gint      row,
                             gpointer  data);


When the SIGCHLD is received, and you have the pid, look for it in the
GtkCList, and you will be given a row number which you can then delete.

/usr/include/gtk/gtkclist.h:

/* givin a data pointer, find the first (and hopefully only!)
 * row that points to that data, or -1 if none do
 */
gint gtk_clist_find_row_from_data (GtkCList *clist,
                                   gpointer  data);

-- 
James Cameron                                      (cameron stl dec com)

OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.

"Specialisation is for insects." -- Robert Heinlein.





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