<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>297488</bug_id>
          
          <creation_ts>2012-04-04 18:53:29 +0000</creation_ts>
          <short_desc>Keyboard searches do not reset when entering directory</short_desc>
          <delta_ts>2012-05-05 09:38:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>dolphin</product>
          <component>view-engine: general</component>
          <version>2.0</version>
          <rep_platform>unspecified</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Leszek Lesner">leszek.lesner</reporter>
          <assigned_to name="Peter Penz">peter.penz19</assigned_to>
          <cc>christian</cc>
    
    <cc>finex</cc>
    
    <cc>frank78ac</cc>
    
    <cc>matt.ruffalo</cc>
    
    <cc>nitro</cc>
    
    <cc>ondrej.machulda</cc>
    
    <cc>stuffcorpse</cc>
          
          <cf_commitlink>http://commits.kde.org/kde-baseapps/68ce395a192362969783615e50a8004d3029eb7e</cf_commitlink>
          <cf_versionfixedin>4.8.3</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1242923</commentid>
    <comment_count>0</comment_count>
    <who name="Leszek Lesner">leszek.lesner</who>
    <bug_when>2012-04-04 18:53:29 +0000</bug_when>
    <thetext>Together with the change of 4.8.2 keyboard search delay a new bug appeared. 
When entering a directory with the help of keyboard search i.e.
I have one folder called downloads and a subfolder in downloads called work. 

I open dolphin type &quot;down&quot; (Downloads folder gets hightlighted) hit enter and then immediately  start typing &quot;wo&quot; nothing happens. I wait for 5 seconds type in &quot;wo&quot; and my work directory gets highlighted.

The keyboard search should be cleared when entering new directories to prevent this problem.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1243133</commentid>
    <comment_count>1</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-04-05 10:25:29 +0000</bug_when>
    <thetext>Thanks for the bug report! Sorry for that stupid regression (well, technically, it&apos;s not a regression because the bug has been there before, it was just not easy to see it because the timeout was so short).

I&apos;ll try to figure out a clean solution for this before KDE 4.8.3 is released.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1243142</commentid>
    <comment_count>2</comment_count>
    <who name="FiNeX">finex</who>
    <bug_when>2012-04-05 11:37:54 +0000</bug_when>
    <thetext>@Frank: I&apos;ve just experienced this bug... I want to add that there is something with the case of file names either. When you will work on this bug please try on a directory wih files with both lowercase and uppercase names like &quot;Folder one, folder two, example, Exams...&quot;... I didn&apos;t understand a pattern in order to reproduce this bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1243143</commentid>
    <comment_count>3</comment_count>
    <who name="FiNeX">finex</who>
    <bug_when>2012-04-05 11:39:11 +0000</bug_when>
    <thetext>P.S: This bug looks not related to bug #297458</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1243167</commentid>
    <comment_count>4</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-04-05 12:53:33 +0000</bug_when>
    <thetext>@FiNeX: I just tried keyboard searching in a folder with uppercase and lowercase names and noticed nothing unusual. Could you be a bit more specific about what kind of strange behaviour you noticed (preferably not here because this is off-topic for this bug report)? Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1243383</commentid>
    <comment_count>5</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-04-06 09:31:05 +0000</bug_when>
    <thetext>Git commit d8732a59d3b1f2d0bebf43f294df7e9f333abde4 by Frank Reininghaus.
Committed on 05/04/2012 at 18:59.
Pushed by freininghaus into branch &apos;KDE/4.8&apos;.

Reduce the timeout in KItemListKeyboardSearchManager to 1 second

It turned out that the longer timeout, introduced recently in
02eab49b2de51c31fe46a0d9501327b579b3648e, not only made multi-letter
keyboard searches easier, but also had some unwanted side effects. I
hope that 1 second, which is between the previous value of 5 seconds and
the pre-KDE 4.8.2 value of 0.4 seconds, is a compromise which will fit
most users&apos; needs.
We will try to improve the situation further in future releases by
providing visual feedback about the keyboard search, but such a change
would not be suitable for a bug-fix release.
Related: bug 297458

M  +1    -1    dolphin/src/kitemviews/kitemlistkeyboardsearchmanager.cpp

http://commits.kde.org/kde-baseapps/d8732a59d3b1f2d0bebf43f294df7e9f333abde4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1243445</commentid>
    <comment_count>6</comment_count>
    <who name="Christian Authmann">christian</who>
    <bug_when>2012-04-06 13:45:40 +0000</bug_when>
    <thetext>Regardless of the actual timeout, IMHO the search should be cleared when:
* the location changes / a new folder is opened
* any action is done that&apos;s unrelated to keyboard search, e.g. mouseclicks, hotkeys etc
* the window loses focus
* the user starts navigating with the cursor keys
* the user hits escape

The last one is important when you misspell a search and wish to retry without waiting for the timeout to happen.
Clearing on cursor keys, enter and esc would cover the most common cases (for me) without touching too many areas of the code.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1243690</commentid>
    <comment_count>7</comment_count>
      <attachid>70206</attachid>
    <who name="Leszek Lesner">leszek.lesner</who>
    <bug_when>2012-04-07 11:03:30 +0000</bug_when>
    <thetext>Created attachment 70206
Keyboardsearch fix

As we were not satisfied with setting the keyboardsearch timeout to 1 second. I decided to write another patch which is now included in Neptune. 
It will delete the keyboard search item whenever enter key is pressed and if you accidently typed in something wrong you can also delete the search by pressing escape. 
Sorry Christian but I did not see your comment before writing the patch so I only implemented the first and last point of your lrequest list. But I guess with the way its implemented now(with this patch) it should be no problem to adapt the patch to your request.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1244045</commentid>
    <comment_count>8</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-04-08 18:48:15 +0000</bug_when>
    <thetext>Thanks for the patch! It&apos;s definitely a step into the right direction :-) However, as Christian wrote, one would also expect the search to be cancelled in a couple more situations. Doing that (and providing some visual feedback about the search string) would require quite a few code changes, Nevertheless, I think that it might make sense to use your patch at least in the 4.8 branch to improve the current situation, in particular because it&apos;s a very small change that looks unlikely to break anything (although I&apos;ve learned now that you can never be sure about that). Let&apos;s wait for feedback from Peter about this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1244417</commentid>
    <comment_count>9</comment_count>
    <who name="Matt Ruffalo">matt.ruffalo</who>
    <bug_when>2012-04-09 18:19:45 +0000</bug_when>
    <thetext>Thank you very much for fixing this. I can confirm that a timeout of 1 second is *way* too high -- I know my folder structure pretty well and before 4.8.2 I could navigate to a specific directory 4 or 5 levels deep in under 3 seconds (Doc &lt;enter&gt; res &lt;enter&gt; pap &lt;enter&gt; map &lt;enter&gt; fig &lt;enter&gt;). I can&apos;t quite time myself since I&apos;m using 4.8.2 everywhere though :)

I&apos;m looking forward to 4.8.3 mostly to get this patch; thanks again.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1244433</commentid>
    <comment_count>10</comment_count>
    <who name="Peter Penz">peter.penz19</who>
    <bug_when>2012-04-09 19:09:31 +0000</bug_when>
    <thetext>@Leszek: Thanks for the patch, but if Frank&apos;s patch to decrease the timeout to 1 second is still not sufficient I&apos;d prefer going back to 0.4 seconds for 4.8.x instead of applying the patch. Although the patch resolves the problem for the keyboard navigation, I don&apos;t like the approach to hardcode this as part of the controller. I&apos;d say the correct fix would be to reset the keyboard-timeout whenever the items of the model have been cleared and to let the keyboard-manager internally handle this situation. But this is more a 4.9 thing from my point of view.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1249407</commentid>
    <comment_count>11</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-04-25 07:09:33 +0000</bug_when>
    <thetext>Git commit 68ce395a192362969783615e50a8004d3029eb7e by Frank Reininghaus.
Committed on 25/04/2012 at 09:01.
Pushed by freininghaus into branch &apos;KDE/4.8&apos;.

When the current item is removed, make -1 the current index temporarily

This fixes two problems:
1. KItemListKeyboardSearchManger can cancel the current search when a
   new folder is opened (note that this action removes the current item
   from the view).
2. The view can underline the new current item (which is the item that
   used to be below the removed item). Note that this did not work
   before because the view did not receive a currentChanged() signal in
   this case and therefore did not update the &quot;current item&quot; status of
   the new current item.
Related: bug 298782
FIXED-IN: 4.8.3
REVIEW: 104709

M  +2    -0    dolphin/src/kitemviews/kitemlistcontroller.cpp
M  +10   -0    dolphin/src/kitemviews/kitemlistkeyboardsearchmanager.cpp
M  +4    -0    dolphin/src/kitemviews/kitemlistkeyboardsearchmanager_p.h
M  +6    -3    dolphin/src/kitemviews/kitemlistselectionmanager.cpp

http://commits.kde.org/kde-baseapps/68ce395a192362969783615e50a8004d3029eb7e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1249416</commentid>
    <comment_count>12</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-04-25 07:22:11 +0000</bug_when>
    <thetext>Git commit 922742762f2b1655ba55756b590e327acb00ce77 by Frank Reininghaus.
Committed on 25/04/2012 at 09:20.
Pushed by freininghaus into branch &apos;master&apos;.

When the current item is removed, make -1 the current index temporarily

This fixes two problems:
1. KItemListKeyboardSearchManger can cancel the current search when a
   new folder is opened (note that this action removes the current item
   from the view).
2. The view can underline the new current item (which is the item that
   used to be below the removed item). Note that this did not work
   before because the view did not receive a currentChanged() signal in
   this case and therefore did not update the &quot;current item&quot; status of
   the new current item.
Related: bug 298782
REVIEW: 104709
(cherry picked from commit 68ce395a192362969783615e50a8004d3029eb7e)

M  +2    -0    dolphin/src/kitemviews/kitemlistcontroller.cpp
M  +6    -3    dolphin/src/kitemviews/kitemlistselectionmanager.cpp
M  +10   -0    dolphin/src/kitemviews/private/kitemlistkeyboardsearchmanager.cpp
M  +4    -0    dolphin/src/kitemviews/private/kitemlistkeyboardsearchmanager.h

http://commits.kde.org/kde-baseapps/922742762f2b1655ba55756b590e327acb00ce77</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1252225</commentid>
    <comment_count>13</comment_count>
    <who name="Frank Reininghaus">frank78ac</who>
    <bug_when>2012-05-05 09:38:51 +0000</bug_when>
    <thetext>*** Bug 299196 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>70206</attachid>
            <date>2012-04-07 11:03:30 +0000</date>
            <delta_ts>2012-04-07 11:03:30 +0000</delta_ts>
            <desc>Keyboardsearch fix</desc>
            <filename>keyboardsearch-fix.patch</filename>
            <type>text/plain</type>
            <size>2322</size>
            <attacher name="Leszek Lesner">leszek.lesner</attacher>
            
              <data encoding="base64">RGVzY3JpcHRpb246IEZpeGVzIGtleWJvYXJkc2VhcmNoIHVwc3RyZWFtIGJ1ZyAjMjk3NDg4CiBE
ZWxldGUga2V5Ym9hcmRzZWFyY2ggaWYgZW50ZXJpbmcgZGlyZWN0b3J5IHdpdGggdGhlIEVudGVy
IGtleSBvcgogaWYgRXNjYXBlIGlzIHByZXNzZWQKIC4KIGtkZS1iYXNlYXBwcyAoNDo0LjguMi1u
ZXB0dW5lMikgdW5zdGFibGU7IHVyZ2VuY3k9bG93CiAuCiAgICogRml4ZWQgZG9scGhpbnMga2l0
ZW1saXN0a2V5Ym9hcmRzZWFyY2htYW5hZ2VyIHRvIGRlbGV0ZSBzZWFyY2hlcyB3aGVuCiAgICAg
ZW50ZXJpbmcgYSBuZXcgZm9sZGVyCiAgICogQWRkZWQgc3VwcG9ydCBmb3IgZGVsZXRpbmcga2V5
Ym9hcmRzZWFyY2hlcyB3aXRoIHR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