Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline Rename #468

Closed
MggMuggins opened this issue Apr 6, 2017 · 13 comments
Closed

Inline Rename #468

MggMuggins opened this issue Apr 6, 2017 · 13 comments

Comments

@MggMuggins
Copy link

A feature suggested in #465 but moved here; Inline Renaming of files. I've seen it in mac's finder (the implementation I like, that takes a slow double-click to rename the file), but is also included in numerous other FM's. This would be a handy feature to have for PCManFM-Qt.

@tsujan
Copy link
Member

tsujan commented Apr 6, 2017

I have an extra reason why this should be added to pcmanfm-qt (as an option?): KWin isn't happy with the rename dialog. When a file is going to be renamed in a window while there's another window in another desktop, KWin brings that window to the current desktop.

This may be a bug in kwin or even in pcmanfm-qt but inline renaming is something that many users see as a natural way of renaming files -- although I don't ;)

@MggMuggins
Copy link
Author

Which is of course why it should be included as an optional (although enabled by default I would think) feature. Don't want to go forcing features on people.

@tsujan
Copy link
Member

tsujan commented Apr 6, 2017

OK, I succeeded in adding inline renaming in an easy but "lousy" way. It needs a lot of polishing and decisions should be taken about how to add it as a feature instead of replacing the current renaming. I'll work on it in my free time.

@MggMuggins
Copy link
Author

Cool. Where can I get the source for your "lousy" implementation?

@tsujan
Copy link
Member

tsujan commented Apr 6, 2017

I'll tell you when it's worth a PR.

@tsujan
Copy link
Member

tsujan commented Apr 6, 2017

One of several problems I've encountered is how inline renaming should start:

(1) Double-click isn't an option (it's used to open files);
(2) Middle and right clicks are also reserved by other actions;
(3) Renaming just by selecting an item and typing is too easy and may cause problems.

I chose the shortcut Ctrl+; for code testing, so that dialog renaming and inline renaming could coexist.

@MggMuggins, any suggestion? Is a keyboard shortcut acceptable?

@MggMuggins
Copy link
Author

Is it possible to use a slow double-click? That is what OSX uses and works really well. However, there would have to be something in Qt to do that, and I just don't know.
I usually find keyboard shortcuts really annoying and a pain to use. The right-click menu would be more useful to me, if there weren't a double-click option.

@tsujan
Copy link
Member

tsujan commented Apr 6, 2017

Even if there was a slow double click, it wouldn't be easy to use -- anyhow, there isn't any.

How could a keyboard shortcut be annoying when this is about typing a name?! In such cases, using mouse can be annoying.

I don't want to add yet another item to the right-click menu. I don't like to make dialog renaming and inline renaming mutually exclusive either.

@MggMuggins
Copy link
Author

I agree that the slow double-click can be annoying. How much configuration for keyboard shortcuts is there? If there were a complete controls Dialogue, it would really reduce this kind of argument over what would be the best keystroke. You put in a Ctrl+ as default and then if I don't like it, then I can go and change it. Costumizablility is really nice...

@tsujan
Copy link
Member

tsujan commented Apr 6, 2017

Almost done -- this time, in a clean way:

1

After some more polishing and testing it for a day or two, I'll make a PR.

I agree that the slow double-click can be annoying.

Who knows, maybe later it could be implemented too.

If there were a complete controls Dialogue

If you mean customizing shortcuts in pcmanfm-qt, it isn't implemented (yet) because most shortcuts are standard. You could open another issue for it but I think most users don't need it.

@MggMuggins
Copy link
Author

No reason to implement that kind of customization unless it's necessary. However, if there were some configuration available (especially for actions that would commonly be bound to mouse buttons...), that would be great. I'm considering learning Qt in C++, but this program is so big and complicated I'm not sure where to start.
Btw, I love your dark theme. What OS are you running?

@tsujan
Copy link
Member

tsujan commented Apr 7, 2017

I'm considering learning Qt in C++, but this program is so big and complicated I'm not sure where to start.

An app like pcmanfm-qt can't be a starting point for learning Qt, especially because its core is based on GLib -- unless you have experience with GLib.

What OS are you running?

Manjaro and Debian but the style is here.

tsujan added a commit to lxqt/libfm-qt that referenced this issue Apr 7, 2017
Fixes lxqt/pcmanfm-qt#468.

This is one of the possible implementations of inline renaming as a property of list views (icon, thumbnail and compact views) and independent of pcmanfm-qt, so that it's available to lximage-qt too. It coexists with dialog renaming and shares the same error dialogs with it.

Renaming of the current item is started by the context-menu "Rename" item when only one file/folder is selected, or by `Ctrl+R`. It is finished by Enter/Return or by removing focus from the item, and canceled by Esc. (`F2` is still for dialog renaming.)

If several items are selected, the context-menu "Rename" item will behave as before, namely it will call the rename dialog.

NOTE: Due to a design problem in pcmanfm-qt, desktop has its own `QStyledItemDelegate`. Therefore, its inline renaming should be implemented separately. I will make another PR for it.
This was referenced Apr 7, 2017
tsujan added a commit to lxqt/libfm-qt that referenced this issue Jul 7, 2017
Fixes lxqt/pcmanfm-qt#468 by implementing inline renaming for the icon, thumbnail and compact views (the detailed list view needs a separate handling).

Inline renaming of the current item is started by the context menu-item `Rename` or `F2` when only one file/folder is selected. It is finished by Enter/Return or by removing focus from the item, and canceled by Esc. If several items are selected, renaming will be done as before, i.e. by calling the rename dialog.

For user convenience, wheel scrolling is disabled for the folder view during inline renaming.

Another PR will follow this one for inline renaming on desktop.
@tsujan
Copy link
Member

tsujan commented Jul 7, 2017

The up-to-date PR is here.

tsujan added a commit to lxqt/libfm-qt that referenced this issue Jul 17, 2017
Fixes lxqt/pcmanfm-qt#468 by implementing inline renaming for the icon, thumbnail and compact views (the detailed list view needs a separate handling).

Inline renaming of the current item is started by the context menu-item `Rename` or `F2` when only one file/folder is selected. It is finished by Enter/Return or by removing focus from the item, and canceled by Esc. If several items are selected, renaming will be done as before, i.e. by calling the rename dialog.

For user convenience, wheel scrolling is disabled for the folder view during inline renaming.

Another PR will follow this one for inline renaming on desktop.
agaida pushed a commit to lxqt/libfm-qt that referenced this issue Jul 20, 2017
Fixes lxqt/pcmanfm-qt#468 by implementing inline renaming for the icon, thumbnail and compact views (the detailed list view needs a separate handling).

Inline renaming of the current item is started by the context menu-item `Rename` or `F2` when only one file/folder is selected. It is finished by Enter/Return or by removing focus from the item, and canceled by Esc. If several items are selected, renaming will be done as before, i.e. by calling the rename dialog.

For user convenience, wheel scrolling is disabled for the folder view during inline renaming.

Another PR will follow this one for inline renaming on desktop.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants