[Digikam-devel] Review Request 108382: Make tagging more accessible by keyboard
Markus Leuthold
kusi at forum.titlis.org
Tue Jan 22 22:14:41 GMT 2013
may I commit?
best regards,
Markus
On Tuesday 15 January 2013 22.27:22 Markus Leuthold wrote:
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/108382/
On January 13th, 2013, 6:20 p.m. UTC, Marcel Wiesweg wrote:
The only changes I dont understand without explanation are those to
AddTagsCompletionBox::setItems. What is achieved here?
Assume you have three tags "Albert", "Alice" and "Bertha" (parent tag is
"People"). You want to assign "Alice" to your photo. With current digikam, you
get the following situation after each keystroke:
keystroke:items displayed
"A":"Create A in People", "Albert","Alice","Create A" (Case A as labeled in
sourcecode)
"l":"Create Al in People", "Albert","Alice","Create Al" (Case A)
"i":"Create Ali in People","Alice","Create Ali" (Case A)
"c":"Create Alic in People","Alice","Create Alic" (Case A)
"e":"Alice","Create Alice" (Case C)
Please note that only after the fifth character, you can press enter to commit
your tag. The first item is always selected, you can only press enter if your
desired item is at position one. Now let's look at my patch, same scenario
"A":"Albert","Alice","Create A in People","Create A" (Case A)
"l":"Albert","Alice","Create Al in People","Create Al" (Case A)
"i":"Alice","Create Ali in People","Create Ali" (Case A)
After the 3rd character, you can press enter. Since I remember the chosen
tags, "Alice" will be the first item for another photo (this logic is not in
the setItems function, though). Assume you want to tag a second photo with
"Alice"
"A":"Alice" "Albert" "Create A in People" "Create A"
Now you can already press enter after the first character, and you're done.
With the current digikam version, you need to write the entire name.
What I have to admit: I don't know how you can actually get into case B (no
item selected at all). I checked with debug statements, and didn't figure out
a way to hit that codepath, with current digikam as well as with my patch
applied. But if this codepath is hit, the code should behave correctly.
Does it become more clear to you what my modifications in setItems do?
- Markus
On January 13th, 2013, 10:16 a.m. UTC, Markus Leuthold wrote:
Review request for Digikam, Gilles Caulier and Marcel Wiesweg.
By Markus Leuthold.
Updated Jan. 13, 2013, 10:16 a.m.
Description
Make tagging more accessible by keyboard
* Pressing "T" will focus the tagedit-box.
* The tag is applied by pressing enter. Pressing enter a second time will
focus the mainwindow and advance to the next image.
* The dropdown of the tagedit-box remembers already entered tags, the
order of the dropdown items are sorted such that already entered tags
appear first.
Testing
I successfully use this feature on a regular basis. Also tested with current
HEAD, works fine.
Diffs
digikam/main/digikamapp.cpp (f9a1206faa0ff2c5f174b74728d45e660bfea599)
digikam/main/digikamapp_p.h (e4924fc0818715e79919e3ac1de74fbd07e26152)
digikam/tags/addtagscompletionbox.cpp
(266421c34fe6d939b094d0c0b1dea77065e024ee)
digikam/tags/addtagslineedit.h (1eec38c090eaefd592e4cc5c4561fadf04b9de26)
digikam/tags/addtagslineedit.cpp (abcf5b1f9d9a0340a9838b267faa2637f989bd96)
digikam/views/digikamview.h (418dc019256300315a1623d45ad1a7d6e6c484f7)
digikam/views/digikamview.cpp (b8c2f6408d59a638c0c400b81516eedd5d1a621b)
libs/database/albumdb.cpp (2d04b1568e46d59a162be0bfdc2105a6d5bb7d2a)
libs/imageproperties/imagedescedittab.h
(9b229e451c0d14b34b39c510749f2088b259ef34)
libs/imageproperties/imagedescedittab.cpp
(d607c73ae4a4c19074f18539be8e785fd3110b5f)
libs/imageproperties/imagepropertiessidebar.h
(f6703339fc2e1a5762f8db898e7ad69dddab7868)
View Diff
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/digikam-devel/attachments/20130122/450c28b1/attachment.html>
More information about the Digikam-devel
mailing list