Option to rename entire file by default

Share any ideas you have on improving Explorer++
Post Reply
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Option to rename entire file by default

Post by twinsen »

When renaming a file you can press F2 to cycle renaming the filename only, extension only or both. But selecting filename without extension is the default. I often use renaming to copy the entire filename, so I want with the extension the default.

Could there be an option to change between initially selecting the file part or the entire file with extension?

At the moment I've just done this to get the desired behaviour:

In:
explorer++_1.2_src\Explorer++\Explorer++\ListViewHandler.cpp

Code: Select all

BOOL CContainer::OnListViewBeginLabelEdit(LPARAM lParam)
Change:

Code: Select all

	m_ListViewEditingStage = LISTVIEW_RENAME_FILENAME;
To:

Code: Select all

	m_ListViewEditingStage = LISTVIEW_RENAME_ENTIRE;
In

Code: Select all

CContainer::ListViewEditProc
Change

Code: Select all

					if(bExtensionFound)
					{
						wParam = 0;
						lParam = i;
					}
To:

Code: Select all

					if(bExtensionFound && m_ListViewEditingStage == LISTVIEW_RENAME_FILENAME)
					{
						wParam = 0;
						lParam = i;
					}
Attachments
Select_All_Rename_v187_patch.7z
(565 Bytes) Downloaded 469 times
Last edited by twinsen on Sun Feb 06, 2011 7:15 pm, edited 1 time in total.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Option to rename entire file by default

Post by ajs »

Hi twinsen,
I didn't know about the "cycling renaming" pressing F2 multiple times. Thanks.

Related to your request, what about this idea:
1) pressing F2 keeps working as it is now
2) pressing Shift-F2 will select the full filename+extension, which is what you want.

If you like it, I will implement that as soon as David has merged all the pending patches.
twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Option to rename entire file by default

Post by twinsen »

I'd rather just a groupbox "initial renaming selection", with radio buttons "entire file", "file name only" in options and the value saved.
F2 can work exactly as it currently does.

I just want clicking a file to work like windows explorer does, without having to press F2 or shift F2. So clicking the "entire file" radio button would make it work like I expect (and I can still use F2).

It should be fairly trivial to make the gui change the value of m_ListViewEditingStage for the initial selection. But it might be best to wait for all the other changes to be merged first.
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Option to rename entire file by default

Post by ajs »

ok, i got your point. I will do two things:
1) add a radio button or checkbox for "initial renaming selection" (full or name only) as you suggested, keeping F2 functionality as it is.
2) implement the Shift-F2 key to do the other action.
Sometimes I need full selection, sometimes only the name, so having both options available on the same key would be good I think.
neminem
Posts: 43
Joined: Thu Nov 11, 2010 3:51 am

Re: Option to rename entire file by default

Post by neminem »

I like it, for the record (I agree, sometimes I like the default file rename action, and sometimes it bugs me, so having both available with different keybindings would be optimal. The ability to set which is plain-f2 is good, too).
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Option to rename entire file by default

Post by ajs »

Post Reply