Closed
Bug 149836
Opened 23 years ago
Closed 22 years ago
Rename Bookmarks By Click-and-Type (inline editing)
Categories
(Camino Graveyard :: Bookmarks, enhancement)
Tracking
(Not tracked)
VERIFIED
FIXED
People
(Reporter: tenbrook, Assigned: sfraser_bugs)
References
Details
Attachments
(1 file, 3 obsolete files)
12.75 KB,
patch
|
Details | Diff | Splinter Review |
Chimera Navigator 0.3 build 20020604x
[RFE] Allow click and type to change bookmark names in sidebar.
Expected behavior: Click a bookmark name in the sidebar to highlight; click a
second time after pause and a blinking insertion point allows editing of the name.
Actual behavior: Click the bookmark name to highlight. Clicking a second time
after pause does nothing. Always reproducible.
Comment 1•23 years ago
|
||
we actually tried to do this already, but Cocoa can't quite handle inline text
editing in combination with the icon. Lame, but true. When that gets fixed we
can ditch the dialog and go to inline editing.
Status: NEW → ASSIGNED
*** Bug 160823 has been marked as a duplicate of this bug. ***
Oh, the icon part is the most trivial of this all! I've implemented such a thing in the past.
The *hard* part is to get NSOutlineView to behave well for editing of item similar to the
Finder. In my case I ended up rewriting mouseDown - very very nasty. If you don't do this,
you get all sorts of behaviour which you may or may not like. I think somebody should
force some Apple engineers to try to write a Finder like outlineview... afterwards, they will
be much easier to convience to add some simple attributes to NSOutlineView that will
make this trivial (it would be easy for them to do, it's hard for normal mortals as they have
to overload mouseDown for this).
Also, there are some bugs in the NSOutlineView code (like, changing the selection
doesn't correctly abortEditing etc.)
I will take a look at this anyway.
This patch implements the desired features. Note that it makes use of NSCell
subclass which can be found as part of the Apple Dev tool examples:
/Developer/Examples/AppKit/DragNDropOutlineView/ImageAndTextCell.[mh]
Apple explicitly allows anybody to reuse this class. To use my patch, copy
these two files into the chimera source directory, and add them to the project
file, then apply my patch. Youg might want to rename the ImageAndTextCell class
& files to match your naming conventions, and change the legal header in them,
of course (Apple requests that if you redistribute changed versions of their
stuff - although we don't change the code, yet :-)
I changed return to start editing, to match Finder/Internet Explorer, but it
should be easy enough to change it back. You can still activate editing by
Alt-Clickin on an item, or by clicking again on an already selected item (just
like Finder does it). Also note that the bookmark items look slightly different
now (IMHO better).
I forgot to call BookmarkChanged after editing.
In addition, this patch now includes the setWrap mentioned in my previous
comment, and uses spaces instead of tabs in some places.
Attachment #93941 -
Attachment is obsolete: true
Hm, seems my setWrap comment never made it here, ouch. Basically, I call setWrap:NO
on the custom cell. Wrapping is on by default for new cells, but the default cell for a
NSOutline/TableView has it off. Wrap = on looks weird, wrap = off looks much better.
This fixes a smallbuglet: when you double clicked an already selected item, it
would start editing, which is not correct - the double click opens the
bookmark, it shouldn't start edit mode.
Maybe more importantly, I added a heap of new comments to the custom mouseDown
method, I hope it's now possible to understand what is done why (Hopefuly
that'll make Mike happy :-)
Attachment #94046 -
Attachment is obsolete: true
Attachment #94172 -
Attachment is obsolete: true
Updated•23 years ago
|
QA Contact: winnie → sairuh
Updated•23 years ago
|
Summary: [RFE] Rename Bookmarks By Click-and-Type → Rename Bookmarks By Click-and-Type
Comment 9•23 years ago
|
||
should this be dup'd in favor of bug 180183?
Assignee | ||
Comment 10•23 years ago
|
||
*** Bug 180183 has been marked as a duplicate of this bug. ***
Comment 11•23 years ago
|
||
to simon
Assignee: saari → sfraser
Status: ASSIGNED → NEW
Summary: Rename Bookmarks By Click-and-Type → Rename Bookmarks By Click-and-Type (inline editing)
Comment 12•23 years ago
|
||
Does the patch also let us do area select, like in the Finder?
Comment 13•23 years ago
|
||
"Area select"? You mean the rubber band that allows you to select multiple
items? I don't know why you think this is related to this this item - IMHO it is
not related at all
On another note, the patch in here of course won't apply anymore, it's 4 months
old. I don't have the resources to update a patch over months in the hopes that
somebody gets around looking at it some day, sorry. :-/
Comment 14•22 years ago
|
||
I hate to see a good patch go to waste. Can anyone resuscitate this bug? This
would be a very nice feature to have.
Comment 15•22 years ago
|
||
i plan on incorporating this patch into some of the new bookmark UI work i'm
doing. fear not!
Comment 16•22 years ago
|
||
this has landed.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•