Re: [CList] Making a CList user-modifiable
- From: "Jean-Christophe Berthon" <jean-christophe berthon cgey com>
- To: "Charlie Schmidt" <ishamael themes org>
- Cc: "Gtk List" <gtk-list gnome org>
- Subject: Re: [CList] Making a CList user-modifiable
- Date: Tue, 10 Jul 2001 09:14:17 +0200
Thanks a lot Charlie,
It's working pretty fine. I'm going to try to tune it a bit now (the entry
is a bit big in comparison to the cells...).
Thanks again,
Best regards,
---
Jean-Christophe Berthon
Cap Gemini -- Ernst & Young
Toulouse FR
Skill Aerospace -- Image Quality
Email: Jean-Christophe Berthon cgey com
Tel : (+33) 561 31 6639
----- Original Message -----
From: "Charlie Schmidt" <ishamael themes org>
To: "Jean-Christophe Berthon" <jberthon capgemini fr>
Sent: Monday, July 09, 2001 10:49 PM
Subject: Re: [CList] Making a CList user-modifiable
> -
>
> Well, the best thing i could come up with for making an entry editable,
> but not making it editable right away (so that you could still drag and
> reorder) and not making it editable on what should be a normal click to
> select was to add a timeout. So basically, when the ProntoList recieves
> a 'button_press_event' it checks the button that was pressed (and its
> hard coded to button #2), then loads a timeout to show the entrybox.
>
> static gboolean list_button_press(GtkWidget *list,GdkEventButton
> *event,ProntoList *pl)
> {
> if (pl->reparented) {
> gdk_window_hide(pl->entry->window);
> }
>
> if (event->button == 2) {
> gtk_object_set_data(GTK_OBJECT(pl),"eventbutton",event);
> pl->timeout =
> gtk_timeout_add(1000,(GtkFunction)list_timeout,pl);
> }
>
> return TRUE;
> }
>
> Its pretty bad, imho. But it does what i wanted it to. It would be easy
> enough to modify to add a constructor that takes a 'button' argument for
> which button should show the entry window, or to specify a timeout
> interval, besides the hardcoded values there.
>
>
> As for gtkclist.c & GTK_CELL_WIDGET, the idea was that the Gtk+ authors
> started to write widget support for CList cells, but never finished it.
> They stopped at GtkCell (text) and GtkCellPixmap. There is a
> GtkCellWidget structure, with what (i think) you would need to write the
> routines, they just never bothered I guess.
>
> Anyways, I hope this is some help, and if you've any more questions
> please do ask or pop on irc, Im almost always available in #pronto on
> irc.openprojects.net.
>
>
> From: Jean-Christophe Berthon
> Subject: Re: [CList] Making a CList user-modifiable
> Date: Mon, 9 Jul 2001 17:52:08 +0200
>
>
> > Hy,
> >
> > I've check out your solution and it is quite interesting. But I have a
small
> > question that the source code didn't manage to enlight me:
> >
> > 1) About Pronto_List:
> > I've try to create a pronto_list (and it seems to work because I can
see it)
> > But I didn't succeed to edit a cell. I've try to read the code of
> > pronto_list and I saw that an entry box should be shown on the
"activate"
> > event (well at least that what I thought after reading that, but I'm
still
> > too new to gtk to be sure of what I say). But nothing happends, and I
also
> > didn't see any "activate" event in the clist... Am I thinking wrong
about
> > the implementation? Do I miss something? (down follow my code example)
> >
> >
> > PS: I've looked at the gtkclist.c file and indeed I saw the code you
wrote,
> > but I didn't really get what was exactly this GTK_CELL_WIDGET... And so
I
> > didn't really know what kind of code should be put there... (some kind
of
> > conception idea...) In fact I didn't really manage to understand what
was
> > this type of data exactly doing. Maybe if you can enlight me on that, I
can
> > do something...
> >
>
> [snip]
>
> >
> > Best regards,
> > ---
> > Jean-Christophe Berthon
> >
> >
> >
> > ----- Original Message -----
> > From: "Charlie Schmidt" <ishamael themes org>
> > To: <gtk-list gnome org>
> > Sent: Sunday, July 08, 2001 1:01 AM
> > Subject: Re: [CList] Making a CList user-modifiable
> >
> >
> > > -
> > >
> > > youre not the only one who has asked, and though im rather embarrased
by
> > > the code, you could take a look at
> > > http://www.students.uiuc.edu/~cbschmid/pronto_widgets/ im willing to
> > > answer any questions you may have about them.
> > >
> > > alternatively, someone could finish this part (and others) of
gtkclist.c
> > >
> > > static void
> > > set_cell_contents (GtkCList *clist,
> > > {
> > >
> > > [...]
> > >
> > > case GTK_CELL_PIXTEXT:
> > > old_text = GTK_CELL_PIXTEXT (clist_row->cell[column])->text;
> > > old_pixmap = GTK_CELL_PIXTEXT
(clist_row->cell[column])->pixmap;
> > > old_mask = GTK_CELL_PIXTEXT (clist_row->cell[column])->mask;
> > > break;
> > > case GTK_CELL_WIDGET:
> > > /* unimplimented */
> > > break;
> > > default:
> > > break;
> > >
> > > anyways, i hope this helps.
> > >
> > >
> > > From: Jean-Christophe Berthon
> > > Subject: [CList] Making a CList user-modifiable
> > > Date: Fri, 6 Jul 2001 10:21:18 +0200
> > >
> > >
> > > > Hello,
> > > >
> > > > I've sent an email (subject "About CList" 5th July) about the
CList and
> > if
> > > > they were a possibility for the user to modify an element in the
same
> > way as
> > > > with a spreadsheet (like gnumeric or excel).
> > > > If this object cannot do it, it there a workaround? Or tips? Or
maybe
> > > > another similar object which can do it.
> > > >
> > > > I've tried to have a look at gnumeric but it seems that they built
> > there own
> > > > spreadsheet, drawing each lines, etc. I've pitily not enough time
to
> > think
> > > > of something similar. I'd need an already built widget doing that
kind
> > of
> > > > work.
> > > >
> > > > Thanks a lot in advance for any answer. Every tips or suggestion
will
> > be
> > > > really useful,
> > > > Have a nice day.
> > > >
> > > >
> > > > Best regards,
> > > > ---
> > > > Jean-Christophe Berthon
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > gtk-list mailing list
> > > > gtk-list gnome org
> > > > http://mail.gnome.org/mailman/listinfo/gtk-list
> > > >
> > > >
> > >
> > > --
> > > Charlie Schmidt - <ishamael themes org>
> > >
> > >
> > > _______________________________________________
> > > gtk-list mailing list
> > > gtk-list gnome org
> > > http://mail.gnome.org/mailman/listinfo/gtk-list
> >
> >
> >
> >
>
> --
> Charlie Schmidt - <ishamael themes org>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]