After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 130969 - editing-canceled signal for GtkCellRendererText
editing-canceled signal for GtkCellRendererText
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkTreeView
2.3.x
Other All
: Normal normal
: ---
Assigned To: gtktreeview-bugs
gtktreeview-bugs
Depends on:
Blocks:
 
 
Reported: 2004-01-09 05:57 UTC by Federico Mena Quintero
Modified: 2011-02-04 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch that adds an "editing-canceled" signal to GtkCellRendererText (2.12 KB, patch)
2004-01-09 05:58 UTC, Federico Mena Quintero
none Details | Review
Updated patch with a GtkCellRenderer::editing-canceled signal (4.70 KB, patch)
2004-01-16 18:21 UTC, Federico Mena Quintero
none Details | Review

Description Federico Mena Quintero 2004-01-09 05:57:53 UTC
Right now GtkCellRendererText has an "edited" signal that gets emitted when
editing is done by pressing Enter. However, if editing is canceled with
Esc, there is no way to get notified as the GtkCellEditable is not visible
from the public API.

The file chooser needs this functionality.  The attached patch implements
this signal.
Comment 1 Federico Mena Quintero 2004-01-09 05:58:41 UTC
Created attachment 23146 [details] [review]
Patch that adds an "editing-canceled" signal to GtkCellRendererText
Comment 2 Michael Natterer 2004-01-09 08:52:07 UTC
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.
Comment 3 Jonathan Blandford 2004-01-15 02:10:21 UTC
Federico, why did you put this signal on GtkCellRendererText as
opposed to GtkCellRenderer?
Comment 4 Federico Mena Quintero 2004-01-15 03:00:33 UTC
Because the "edited" signal is in GtkCellRendererText. 
GtkCellRenderer has no signals.
Comment 5 Federico Mena Quintero 2004-01-16 18:21:04 UTC
Attaching new patch with the signal on GtkCellRenderer, following
JRB's comments.
Comment 6 Federico Mena Quintero 2004-01-16 18:21:46 UTC
Created attachment 23452 [details] [review]
Updated patch with a GtkCellRenderer::editing-canceled signal
Comment 7 Jonathan Blandford 2004-01-16 18:41:18 UTC
Looks good. Please commit.
Comment 8 Federico Mena Quintero 2004-01-16 19:19:29 UTC
Thanks!  Committed.