Bug 291064

Summary: Select/focus on newly created folder
Product: [Applications] dolphin Reporter: Pascal d'Hermilly <pascal>
Component: generalAssignee: Peter Penz <peter.penz19>
Status: RESOLVED FIXED    
Severity: normal CC: frank78ac, franz.trischberger, nitro
Priority: NOR Keywords: reproducible
Version: 2.0   
Target Milestone: ---   
Platform: Unlisted Binaries   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.4
Attachments: Patch to select newly created items
reworked patch according to suggestions

Description Pascal d'Hermilly 2012-01-09 15:59:33 UTC
Version:           2.0
OS:                Linux

After having created a folder it would be nice if it becomes select so a subsequent "Enter" would navigate dolphin into that folder. 

Reproducible: Didn't try

Steps to Reproduce:
right click -> create -> new folder
Press Enter to create

Actual Results:  
Created folder. folder not selected.

Expected Results:  
Created folder. folder selected.

OS: Linux (x86_64) release 3.0.0-14-generic
Compiler: gcc
Comment 1 Peter Penz 2012-01-09 16:05:26 UTC
This worked already with the previous Dolphin version, so I've changed it from "wishlist" to "normal" as it is a regression.
Comment 2 Franz Trischberger 2012-05-04 12:30:05 UTC
Can I help to implement this? Some advice where and how (class-wise) you would like to get it done would be nice.
Comment 3 Peter Penz 2012-05-04 19:05:59 UTC
@Franz: Any help is welcome. The implementation for this is done in the class DolphinView. It should be sufficient to port the commented code in DolphinView::selectAndScrollToCreatedItem() to the new view-engine.
Comment 4 Franz Trischberger 2012-05-05 08:24:30 UTC
Created attachment 70870 [details]
Patch to select newly created items

Was easier then expected :)
Comment 5 Frank Reininghaus 2012-05-05 08:41:58 UTC
Very nice work! One regression less that's left over from the Dolphin 2.0 porting :-)

I would change just two very small things:

1. Rename "dirIndex" to "index". In Dolphin 1.x, we had two different models (dir model and proxy model), which is why "dirIndex" and "proxyIndex" were often used to distinguish between their indices. This is not necessary any more, so I would just call it "index" to be more consistent with other Dolphin code.

2. According to the coding style, there should be a space between "if" and the opening "(":

if (index != -1) {

But these are just cosmetic changes, the rest looks good!
Comment 6 Franz Trischberger 2012-05-05 08:51:06 UTC
Created attachment 70871 [details]
reworked patch according to suggestions

> Very nice work! One regression less that's left over from the Dolphin 2.0 porting :-)
Thx :)
Is there a list (or meta-bug) with those regressions? Or do I need to query bugs.kde.org?
Comment 7 Frank Reininghaus 2012-05-05 09:09:07 UTC
(In reply to comment #6)
> > Very nice work! One regression less that's left over from the Dolphin 2.0 porting :-)
> Thx :)
> Is there a list (or meta-bug) with those regressions? Or do I need to query
> bugs.kde.org?

There is a wiki page listing some known regressions, but it is not complete:

http://community.kde.org/Dolphin/Dolphin-2.0-Status

Another way to find some regressions is to do a Bugzilla search for Dolphin bugs with the "regression" keyword, but this does not yield a complete list either.
Comment 8 Franz Trischberger 2012-05-05 09:40:07 UTC
OK, thx for the info.

Should I still post the patch on reviewboard?
Comment 9 Peter Penz 2012-05-05 09:42:32 UTC
No, this is not necessary: The people who would have reviewed it on the reviewboard (= Frank and me) have done the review already here ;-)
Comment 10 Peter Penz 2012-05-05 19:58:39 UTC
Git commit 0139537a35d636356fa088c61557baf13bb2e71b by Peter Penz.
Committed on 05/05/2012 at 21:51.
Pushed by ppenz into branch 'KDE/4.8'.

Assure that a newly created item gets selected/focused and visible

Thanks to Franz Fellner for the patch!
FIXED-IN: 4.8.4
CCMAIL: alpine.art.de@googlemail.com

M  +11   -11   dolphin/src/views/dolphinview.cpp

http://commits.kde.org/kde-baseapps/0139537a35d636356fa088c61557baf13bb2e71b
Comment 11 Peter Penz 2012-05-05 20:03:45 UTC
Git commit ab877d6d9bd465d4a0ad29588fd299ef14ac56c2 by Peter Penz.
Committed on 05/05/2012 at 22:02.
Pushed by ppenz into branch 'master'.

Assure that a newly created item gets selected/focused and visible

Thanks to Franz Fellner for the patch!
CCMAIL: alpine.art.de@googlemail.com

M  +11   -11   dolphin/src/views/dolphinview.cpp

http://commits.kde.org/kde-baseapps/ab877d6d9bd465d4a0ad29588fd299ef14ac56c2