Re: GtkClist signals and double click



On Sun, 6 Aug 2000, Salvador Ramirez wrote:

> Vlad Harchev wrote:
> > >  Well, I am still trying to get this working. I know GtkClist elements
> > > have a member structure called selection of type GList. When there is
> > > nothing selected, selection is NULL? selection have a pointer called
> > > data, this data is the data available on the selected row? what is
> > > its format? I tried to print out this data pointer casted to (char *)
> > > but I got a segmentation fault.
> > > Any help will be very appreciated,
> > 
> >  See FAQs. As I remember, 'selection' is NULL if nothing is selected, if it's
> > not NULL, then if selection mode is SINGLE or BROWSE, then selection->data is
> > the index of selected row, otherwise it or the very 'selection' is a GList* of
> > selected row indices. See documentation.
> 
> I couldn't find documentation on what information contain
> selection->data. The GTK+
> manual does not cover this. Where can I find information on this? I mean
> on how
> to get the index (or data itself) of the selected row of a gtk_clist
> double click?
 
 See in GTK FAQ how to detect double clicks. 

 As for selections - I already told you what the value of clist->selection
means for several selection modes. As for others - just do a small guesswork
(coupled with a testsuite) and you'll discover what it means.

> I tried to write a callback for the select_row and unselect_row signal
> where I
> keep the selected row index on a variable but the problems arises when I
> have 
> already selected a row on the gtk_clist and then do the double click on
> the same
> row because with the first click I unselect the already selected row.

 Don't use this approach.

> Thanks
> 
> ---sram
> 

 Best regards,
  -Vlad





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