Re: editing-canceled signal for GtkCellRendererText
- From: Michael Natterer <mitch gimp org>
- To: Federico Mena Quintero <federico ximian com>
- Cc: GTK+ development mailing list <gtk-devel-list gnome org>
- Subject: Re: editing-canceled signal for GtkCellRendererText
- Date: Fri, 09 Jan 2004 16:57:55 +0100
Federico Mena Quintero <federico ximian com> writes:
> Hi,
>
> Please see the patch attached to
>
> http://bugzilla.gnome.org/show_bug.cgi?id=130969
>
> This adds an "editing-canceled" signal to GtkCellRendererText. I need
> this functionality in the file chooser so that the "New Folder" button's
> action can be implemented beautifully within the file list. The idea is
> that you hit "New Folder", a new row appears in the file list, the user
> types the name of the new folder, hits Enter, and the folder gets
> created.
>
> If the user hits Escape, however, this row must be removed. However,
> right now there is no way to get notified when a text cell's editing
> process gets canceled --- the "edited" signal only gets emitted when
> editing is confirmed. Moreover, the corresponding GtkCellEditable is
> not visible from the public API, so there is no way to connect to its
> own "editing-done" signal.
>
> The patch adds an "editing-canceled" signal to GtkCellRendererText and
> removes one of the corresponding expansion slots in the class vtable.
>
> This makes the file chooser's UI rather elegant when creating new
> folders, so it would be great to get it into 2.4. Otherwise, I guess we
> can use a ugly dialog box with a single entry line to type in the new
> folder name :)
Oh yes please! I have been asking for exactly this for months
on #gtk+ :) I just never came around to do a patch...
In GIMP, we have a similar problem: In our generic tree views of
things (brushes, patterns etc.), there is a "name" column which
does not really show the object's name, but a description like
"Round Brush (12) (12 x 12)".
When the user clicks the name to edit it, it is replaced by the
object's real name for editing. Currently we do very evil hacks
to figure when editing has been canceled (we somehow need to
restore the text with the "(12 x 12)" extension appended).
So please please please ;) let this patch go in before 2.4.
ciao,
--mitch
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]