gtkclist and delete selections



Hi everyone,

I tried to delete selected entry by the following way, but always ended up deleting entries not in the 
selection and I can't find much reference on dealing with selection variable of gtkclist directly, what did I 
do wrong?  Thanks.

void list_delete ( GtkWidget * item, gpointer list ) {

        gpointer pdata;
  GList * p;

  gtk_clist_freeze ( GTK_CLIST ( list ) );
        p = GTK_CLIST ( list )->selection;

  while (p != NULL) {
                g_assert ( p != NULL );
          pdata = gtk_clist_get_row_data ( GTK_CLIST ( list ), (gint) p->data );
    gtk_clist_remove ( GTK_CLIST ( list ), GPOINTER_TO_UINT ( p->data ) );
                p = p->next;

        }

        gtk_clist_thaw ( GTK_CLIST ( list ) );

}





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