Open Bug 1319052 Opened 3 years ago Updated 3 years ago

Implement F2 keyboard shortcut, Rename dialogue, and cmd_rename for all directory types in Address Book

Categories

(MailNews Core :: Address Book, enhancement)

enhancement
Not set

Tracking

(Not tracked)

People

(Reporter: bugzilla2007, Unassigned)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

(4 keywords, Whiteboard: [good first bug][lang=js][lang=xul])

+++ This bug was initially created as a clone of Bug #1319040 +++

Short of doing inline renaming (for which we don't have the manpower), can we at least have a simple way of renaming things in Address Book's directory tree using Windows standard shortcut key for renaming, F2? This is 21st century, and certain swiss-knife methods should just work...

STR

1) Select a directory in TB main address book
- an AB or LDAP Dir
- a mailing list
2) Press F2 on keyboard (Windows standard shortcut for renaming anything), expecting to rename the directory

Actual
- nothing

Expected
- something simple to rename the directory

I think the easiest, realistic implementation of this would be a one-for all rename dialogue, as we have for attachments.
Then we just pass the current name of the object (also for dynamic dialogue title: [Rename %Oldname]) into that dialogue.
Technically, probably implement a cmd_rename with F2 as key.
Whiteboard: [good first bug]
Depends on: 1319409
Depends on: 1319493
Depends on: 1320475
No longer depends on: 196135
What language is this based on?
(In reply to pass2pawan from comment #1)
> What language is this based on?

I'm not sure if I understand the question, but this bug is cross-language.
Dialogues will have to be translated by l10n teams.

Oh, programming language?

XUL/Javascript.
XUL is an XML flavor, if you know HTML you're covered.
XUL is also very well documented, Google will easily bring up MDC references.
Functions for getting the directory name are available.

So this needs one new .xul dialogue, and I think we can get away with putting the functionality into abcommon.js (rather than having a separate rename.js which looks overkill to me).
The <key> for the shortcut needs to go into addressbook.xul, then link up the function to show the dialogue.

https://dxr.mozilla.org/comm-central/source/
Search for: file:addressbook.xul
Whiteboard: [good first bug] → [good first bug][lang=js][lang=xul]
You need to log in before you can comment on or make changes to this bug.