Bug 282069 - Bad default in the New Text File dialog
Summary: Bad default in the New Text File dialog
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.4.0-beta1 "Migration"
Platform: Ubuntu Linux
: NOR minor
Target Milestone: ---
Assignee: Nikita Melnichenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-15 10:40 UTC by Victor Varvaryuk
Modified: 2018-07-15 07:07 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
if i am expected to enter file name, why there is a path (25.22 KB, image/png)
2011-09-15 10:40 UTC, Victor Varvaryuk
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Varvaryuk 2011-09-15 10:40:13 UTC
Created attachment 63658 [details]
if i am expected to enter file name, why there is a path

Version:           2.4.0 (using KDE 4.7.0) 
OS:                Linux

When i press Shift+F4 to create and edit a new text file, a dialog appears which asks me for the file name. There is a label 'Enter the filename to edit:' and a text box, which shows me the current path.

Well, if i am expected to enter file name, why there is a path? Just show me an empty field, or some default value like '.txt'.

The is no sense in entering a path, as the file is expected to be created in the current directory.

Reproducible: Always

Steps to Reproduce:
Press Shift+F4

Actual Results:  
In the text box is shown current path

Expected Results:  
Show empty field
Comment 1 Nikolai Kosjar 2012-03-29 18:52:15 UTC
"the file is expected to be created in the current directory." - why?

Showing the current path selected is fine:
1) If you want to enter a file name, just go ahead and type (since the path is selected, you will replace it by your typed file name; no difference to an initial empty field)
2) You can edit the path easily and create the file somewhere else (one or two dirs up?)
Comment 2 Victor Varvaryuk 2012-03-30 05:01:00 UTC
> "the file is expected to be created in the current directory." - why?

This is Total Commander behavior.

Because file manager has current folder in the active tab. So i am working in a context and every my action is expected to be applied to the current context.

When i am suggested with full path of the current dir i am must verify what it is and if it's indeed current dir - needless mental effort.

I understand the reasons you mentioned, but i think if you want to create a file using Krusader, you usually want to work with it immediately in Krusader (copy, compare, etc.). Why create it several dirs up and then go there? Usually you go to the destination and create a file there, it being immediately visible in the current folder.

IMHO
Comment 3 Nikita Melnichenko 2018-06-28 06:45:48 UTC
We'll show the current file name like in Total Commander.
Comment 4 Nikita Melnichenko 2018-06-28 06:56:20 UTC
Git commit e85741cb8823bd7380d985100df501ac82a240ae by Nikita Melnichenko.
Committed on 28/06/2018 at 06:49.
Pushed by melnichenko into branch 'master'.

Improved default values in Edit New File and View File dialogs

Use current file name as a selected default in the dialogs.
This is a Total Commander behavior and it's proved to be useful.

I could not find any case where FileSystem::ensureTrailingSlash
is actually needed.

FIXED: [ 282069 ] Bad default in the New Text File dialog

Differential Revision: https://phabricator.kde.org/D13671

M  +1    -1    krusader/Dialogs/krdialogs.cpp
M  +2    -2    krusader/Panel/panelfunc.cpp

https://commits.kde.org/krusader/e85741cb8823bd7380d985100df501ac82a240ae
Comment 5 Nikita Melnichenko 2018-07-15 07:07:54 UTC
Git commit cb6bed7ed0ac59bad78ac45c102b31a14ac6f70c by Nikita Melnichenko.
Committed on 15/07/2018 at 07:04.
Pushed by melnichenko into branch '2.7'.

Improved default values in Edit New File and View File dialogs

Use current file name as a selected default in the dialogs.
This is a Total Commander behavior and it's proved to be useful.

I could not find any case where FileSystem::ensureTrailingSlash
is actually needed.

FIXED: [ 282069 ] Bad default in the New Text File dialog

Differential Revision: https://phabricator.kde.org/D13671

(cherry picked from commit e85741cb8823bd7380d985100df501ac82a240ae)

M  +1    -1    krusader/Dialogs/krdialogs.cpp
M  +2    -2    krusader/Panel/panelfunc.cpp

https://commits.kde.org/krusader/cb6bed7ed0ac59bad78ac45c102b31a14ac6f70c