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 609832 - “Undo close tab” would be nice.
“Undo close tab” would be nice.
Status: RESOLVED FIXED
Product: empathy
Classification: Core
Component: Chat
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: empathy-maint
Depends on:
Blocks:
 
 
Reported: 2010-02-13 14:15 UTC by Will Thompson
Modified: 2011-08-29 10:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Will Thompson 2010-02-13 14:15:21 UTC
I often hit ^W or click the wrong × and end up losing conversations I was in the middle of, sometimes with a half-composed message.

Most web browsers now sport a list of recently closed tabs, with ctrl-shift-t reopening the most recent one; the better implementations of this also remember the contents of unsubmitted forms. It would be nice to have something similar in Empathy:

• Open a chat to Bob;
• Start typing an essay;
• Accidentally hit ctrl-w;
• Curse;
• Hit Ctrl-Shift-T;
• Rejoice and praise Empathy!

The Nokia N900's Conversations application has an alternative model which serves the same goal: its main view is a list of recent conversations, and if you close a conversation window with a half-composed message or SMS, it remembers it and restores it when you next open that conversation. Empathy could always remember half-composed messages, even if you restore the conversation from the contact list, which would resolve half of my issue; and a recent conversations view for the contact list would resolve the other half, except that the ctrl-shift-t keystroke is pretty hard-wired now, and it would save rootling around for the contact list window.
Comment 1 Will Thompson 2010-02-13 14:19:42 UTC
(I don't think this would necessarily make bug #591756 unnecessary. Oh yeah, I promised Guillaume I'd finish that branch...)
Comment 2 Jonny Lamb 2010-02-28 19:12:37 UTC
I woke up this morning suddenly, with a firm idea in my mind: Empathy needs more managers.

And with that, I give you EmpathyChatManager:

http://git.collabora.co.uk/?p=user/jonny/empathy.git;a=shortlog;h=refs/heads/undo-close-tab

More seriously, I couldn't think of a better place to hold the queue of chats closed. Something that could be added in time is to make the menu item insensitive if there are no chats to undo closing, but that's for another day.

I made Ctrl+Shift+T work in the main window too, but didn't add a menu option as I was unsure where to put it, but it could be our little secret!
Comment 3 Cosimo Cecchi 2010-03-01 09:58:36 UTC
Cool, the branch looks fine to me; unfortunately we're in UI freeze right now, so this probably has to wait until 2.31 (unless we ask for an UI freeze break)?
I'd also like to have the menu item sensitivity issue fixed before merging; let's wait for Guillaume's comment!
Comment 4 Jonny Lamb 2010-03-01 11:34:15 UTC
I've updated the branch with the menu item sensitivity issue. I didn't touch the first commit in the branch, so if you've already reviewed that, it can be ignored.
Comment 5 Cosimo Cecchi 2010-03-01 12:00:19 UTC
Nice, the patch looks good to me.
Comment 6 Jonny Lamb 2010-03-01 13:29:08 UTC
Great, thanks for the review.

Guillaume, let me know if you are alright with this getting merged or not.
Comment 7 Guillaume Desmottes 2010-03-01 17:44:03 UTC
Great; very nice feature!

I didn't look at the code but a fast testing failed to re-open a jabber muc tab.

Any way, this branch breaks 3 freazes (feature, UI and strings) so I prefer to postpone it to 2.32.
Comment 8 Jonny Lamb 2010-03-01 18:34:06 UTC
Yeah, it only works for 1-to-1 chats. I guess now this has been postponed, I've got all the time in the world to slowly add MUC support though.
Comment 9 Jonny Lamb 2010-03-06 11:04:30 UTC
(In reply to comment #7)
> I didn't look at the code but a fast testing failed to re-open a jabber muc
> tab.

My branch has now been updated so it handles MUCs too.
Comment 10 Guillaume Desmottes 2010-03-08 09:01:31 UTC
Looks good to me. Please merge once 2.30 is branched.
Comment 11 Guillaume Desmottes 2010-03-30 10:50:48 UTC
Branched; feel free to merge.
Comment 12 Jonny Lamb 2010-03-30 14:22:57 UTC
Yay, merged!