After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 558322 - [KB-Fixed] Pressing "F2" on a highlighted Task List / Memo List / Address Book / Calendar should bring up the properties dialog box.
[KB-Fixed] Pressing "F2" on a highlighted Task List / Memo List / Address Boo...
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: general
2.22.x (obsolete)
Other All
: Normal enhancement
: ---
Assigned To: Evolution Shell Maintainers Team
Evolution QA team
evolution[kill-bonobo]
Depends on:
Blocks:
 
 
Reported: 2008-10-29 00:49 UTC by Nick Jenkins
Modified: 2009-08-30 05:52 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch for Evolution-Data-Server (4.47 KB, patch)
2008-10-31 04:51 UTC, Matthew Barnes
committed Details | Review
Screenshot Demonstration (158.58 KB, image/png)
2008-10-31 12:58 UTC, Matthew Barnes
  Details
Patch for Evolution trunk (5.11 KB, patch)
2008-11-07 21:24 UTC, Matthew Barnes
committed Details | Review

Description Nick Jenkins 2008-10-29 00:49:38 UTC
In Evolution's Mail component, if you have a mail folder highlighted, and press "F2", it will bring up a dialog box to rename that folder. This is good.

However, if you do the same thing in Tasks / Memos / Contacts / Calendar, and highlight a list / address book / calendar, and press "F2", then nothing happens.

Instead, pressing "F2" should bring up the properties dialog box (i.e. same as if the user had right-clicked on the list and clicked "Properties"), so that the user can rename that list.
Comment 1 Matthew Barnes 2008-10-29 04:53:44 UTC
I'd like to go a bit further with this and have the highlighted item in the left pane be directly editable in response to an F2 keypress or selecting a Rename item from the right-click menu (which doesn't currently exist).
Comment 2 Nick Jenkins 2008-10-29 08:17:19 UTC
> I'd like to go a bit further with this and have the highlighted item in
> the left pane be directly editable in response to an F2 keypress or
> selecting a Rename item from the right-click menu (which doesn't 
> currently exist).

I completely agree that is more desirable as the ultimate goal.

Bringing up the current properties dialog on F2 is intended as an improvement that (I am naively presuming) would require less resources to implement. I.e. it's an incremental improvement that can reuse current functionality.
Comment 3 Matthew Barnes 2008-10-31 04:51:58 UTC
Created attachment 121710 [details] [review]
Patch for Evolution-Data-Server

Here's the first half of the solution.  This adds a new function to the ESourceSelector API that handles renaming the source by letting the user edit the name directly in the tree view.

I'm implementing the other half of the solution in my "kill-bonobo" branch rather than on the main development branch, so I don't have to deal with Bonobo.  That part adds a "Rename..." item to the popup menus for address books, calendars, task lists and memo lists; along with the F2 key binding.
Comment 4 Matthew Barnes 2008-10-31 12:58:59 UTC
Created attachment 121725 [details]
Screenshot Demonstration

Here's a screenshot of the inline renaming in action.  Again, this is only on my "kill-bonobo" branch and is not yet part of the main 2.25.x code base.
Comment 5 Nick Jenkins 2008-11-01 04:10:35 UTC
Looks fantastic! Big thumbs up from me, and sincerely hope this becomes part of the main tree.
Comment 6 Milan Crha 2008-11-06 13:57:00 UTC
Patch looks good, just few comments:

a) text_cell_edited_cb, please check for non-NULL/non-empty 'new_name', we do not want sources with empty names.

b) Could be text_cell_edited_cb call for group names too? if so, then the source can be NULL there. (I do not want to change group names there).

c) under your 'XXX', you 'g_list_delete_link', why?

d) not about patch, what about dbl-click calls properties? It's quite common, I believe, we just do not have it implemented.

Bad thing is the full test would be possible after you merge. You can commit now, if you wish.
Comment 7 Matthew Barnes 2008-11-06 15:48:27 UTC
(In reply to comment #6)
> a) text_cell_edited_cb, please check for non-NULL/non-empty 'new_name', we do
> not want sources with empty names.

Good point.  I'll add a check for that before committing.


> b) Could be text_cell_edited_cb call for group names too? if so, then the
> source can be NULL there. (I do not want to change group names there).

Not a problem.  Only the selected item can be edited, and group names can't be selected.


> c) under your 'XXX', you 'g_list_delete_link', why?

I'm eating the list -- freeing elements as I iterate over them.  Saves me from having to use a separate list iterator variable.


> d) not about patch, what about dbl-click calls properties? It's quite common,
> I believe, we just do not have it implemented.

I think pop-up dialogs for simple tasks look kind of amateurish, so I prefer avoiding them whenever possible.  Renaming a source is a simple task that we can do directly in the main window.

Eventually I'd like to do this for mail folders as well, probably after the merge.  The folder rename dialog is just embarrassing.
Comment 8 Matthew Barnes 2008-11-06 15:57:56 UTC
(In reply to comment #6)
> d) not about patch, what about dbl-click calls properties? It's quite common, I
> believe, we just do not have it implemented.

I think I misunderstood your question in my previous comment.

Double clicking a source to open the Properties dialog?  I suspect it might be too easy to trigger by accident, and would prove more annoying than useful.  But maybe I'm wrong.  You could always try implementing it and see for yourself.
Comment 9 Milan Crha 2008-11-06 18:55:45 UTC
(In reply to comment #8)
> I think I misunderstood your question in my previous comment.

Yup, a little bit :) but you corrected it :)
It was just an idea, nothing crucial.
Comment 10 Matthew Barnes 2008-11-07 21:16:51 UTC
Committed the evolution-data-server patch with the check for empty names (revision 9743).
Comment 11 Matthew Barnes 2008-11-07 21:24:08 UTC
Created attachment 122205 [details] [review]
Patch for Evolution trunk

Here's a partial solution that can be applied to trunk.  This adds the "Rename" item to the various source selector popup menus, as I've done on my branch.  I say "partial" solution because I can't figure how to associate shortcut keys with EPopup items.  So "F2" still won't trigger a rename of the highlighted source, which is what this bug is _really_ about, but it still demonstrates the inline renaming enhancement.
Comment 12 Milan Crha 2008-11-13 17:54:01 UTC
Looks good, feel free to commit to trunk. The F2 feature will work just after the merger, I believe and hope.
Comment 13 Matthew Barnes 2008-11-17 19:31:13 UTC
Patch committed (revision 36791), but I'll leave this open until we get the F2 binding working.
Comment 14 Matthew Barnes 2008-11-19 11:02:26 UTC
Bug #217066 requests inline renames in the mailer's folder tree.
Comment 15 Matthew Barnes 2009-08-30 05:52:45 UTC
The "kill-bonobo" branch has been merged into "master" and will debut as Evolution 2.29.1.  We believe the branch has addressed the reported issue.  If you find the issue still exists in version 2.29 or later please feel free to re-open this bug.

Closing as FIXED.