Re: [gtk-list] Re: CList: Menu on right-click



On Wed, Nov 25, 1998 at 10:45:06AM -0600, Michael Hicks wrote:
>     if (selection != NULL) {
>       printf ("selection != NULL\n");
>       if (selection->data  != NULL) {
>         printf ("selection->data != NULL\n");
>         row_start = (GtkCListRow *) selection->data;
>         row_end = (GtkCListRow *) selection_end->data;
>         /* Is that correct?  Am I totally wrong? */
>         /* some stuff involving getting the names of the selected
> files... */
>         /* Anyone know how to do this? */
>       }
>     }

Someone else on this list just helped me.  What is stored in the .data
member is a `gint' which is the row that was selected.  So what you want is:

	gint row_start, row_end;

	row_start = (gint) selection->data;
	row_end = (gint) selection_end->data;

HTH,
me



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