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 60364 - Allow customization of character clumping behavior
Allow customization of character clumping behavior
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: Widget: GtkTextView
1.3.x
Other Linux
: Normal enhancement
: future
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2001-09-11 01:15 UTC by Joshua N Pritikin
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
patch & discussion (7.07 KB, tar/bzip2)
2001-09-11 01:16 UTC, Joshua N Pritikin
Details

Description Joshua N Pritikin 2001-09-11 01:15:43 UTC
The attached tar/bzip2 archive contains the patch and
some of the surrounding discussion.
Comment 1 Joshua N Pritikin 2001-09-11 01:16:31 UTC
Created attachment 5581 [details]
patch & discussion
Comment 2 Joshua N Pritikin 2001-09-11 22:06:44 UTC
On Mon, Sep 10, 2001 at 07:33:06PM -0400, Havoc Pennington wrote:
>   - simply that allowing "treat multiple chars as a single object"
>     should be a tag property? since e.g. you also need to handle
>     this when selecting, you should be able to select only all
>     or none of the email address

Actually, this is a great idea.  With this type of tag property
i wouldn't need to customize delete_interactive.
Comment 3 Owen Taylor 2001-09-19 19:00:30 UTC
This sounds like a post-2.0 API addition to me, but I'll
let Havoc decide.
Comment 4 Joshua N Pritikin 2001-09-26 16:34:00 UTC
From: Steven Ashe <steve.ashe@minolta-qms.com>
To: gtk-devel-list@gnome.org
Subject: textview virtual function is, or isn't?
Date: Mon, 24 Sep 2001 17:49:04 -0600

When is a function in a class' virtual table truly virtual?
Take a look at gtk_text_view_delete_from_cursor.  Here is
a virtual function (actually the default handler for the
"delete_from_cursor" signal) that also functions as
a bona fide C proc.

Consider this scenario: within a textview I wish to treat
groups of characters as a single entity.  Not so strange,
if for instance I was writing a binary-file editor.  The
groups of characters are hex representations of bytes in the
subject file.  Certainly it would be nice if tags could be
used to bind groups of characters that behave as a signal
character, but since they can't, it seems I have two choices:
1) subclass textwidget, and replace the default handlers
for the basic editing functions with ones that handle
our character-groups appropriately, or
2) put a "before" sort of handler on the delete_from_cursor
and other such signals, do things my way, and then stop
the signal.

However, the way gtk_text_view is coded, it appears that neither
will work.  To the naive code reader, it appears that
gtk_text_view_commit_handler calls
gtk_text_view_delete_from_cursor directly, bypassing the latter's
role as a virtual function and bypassing its role as a signal
handler.  (gtk_text_view_commit_handler is itself a signal
handler that cannot be overridden, but this doesn't seem
particularly relevant to the problem.)

If this is an oversight of some sort, or something that puzzles
someone else, then I will at least be relieved that I'm not the
only one to get muddied tiptoeing through the conceptual
morass of what are true -- and what are ersatz -- signal handlers
and emitters in gtk.  ;-)

Comment 5 Joshua N Pritikin 2002-09-23 10:13:10 UTC
i don't need this feature anymore.  i can get by well enough without it.