GNOME Bugzilla – Bug 324491
"already open" doesn't offer "show"
Last modified: 2006-08-06 11:26:31 UTC
In the latest gedit, opening an already-open file, shows the yellow message header thing with [Edit anyway] and [Don't Edit]. But most of the time I just want to see+edit the file in the existing tab. Furthermore, [Don't Edit] would probably be clearer as [Open as Read-Only], and "in non-editable way" should probably be "as non-editable", though I can't think of a non-awful way to say it. At the least there should be a "a" before non-editable to be gramatically correct.
Thanks for the suggestion on how to rephrase, it's definately something where we really need help by native speakers. We should probably go through a revision of all these messages before the UI freeze. About the buttons, I agree that swtiching to the already opened document is a desiderable action, however I am not thrilled by a message area with three buttons... something has to give, IMHO. Paolo (Maggi) what do you think? Do you still have the logs of when we first discussed this choice? At the moment to me "Go to the already opened document" and "Edit anyway" seem the two most common actions... If we go this route we also need to find a button label which means "Go to the already opened document", suggestions?
String freeze is in 11 days... May these labels be ok ? "Show edited document" "Open as read-only"
It seems to me that just switching to the currently-open version of the file, without asking any questions at all, would be the right behaviour. I want to edit the file, I should be given the file to edit. (this is my expected behaviour, based on bbedit, which is my _other_ platform's editor..)
Yes, that's what I want ultimately. But some people complain that they sometimes want to open the same file twice. I think that is unusual behaviour that shouldn't get in the way of the overwhelmingly common case, and it's something that's worked for decades on MacOS X.
This is something that's annoyed me for gedit for quite some time. Every time I open a file twice (and I do a lot, from the terminal and such) I'd want it focusing on the tab with that file open, instead of offering me two choices I dont want. Opening a file multiple times should in my opinion either be a plugin/have a configuration option, which should be off per default. This bug has been here since 2005 now, and the current defaults are quite horrible.
Created attachment 70258 [details] [review] switch to the current open file This patch implements the 'if trying to open the same file, bring forward the tab that has it already open' mentioned by Murray Cumming comment 4 and Anders Aagaard comment 5. Cases tested: 1. File -> Open same file twice. 2. File -> Open, then File New, then File -> Open the same file. 3. Commandline 'gedit file.txt file.txt' 4. Commandline 'gedit file.txt' and then 'gedit file.txt' 5. File -> Open, then commandline. 6. 2 gedit windows open. Open same file in same window. 6. 2 gedit windows open. Open same file in second window. Note. If you have multiple gedit windows, and you try to open the same file in the second window, the tab will be raised, but the edit window is _not_ raised. I can, or someone else, can implement that, if this patch gets devs condsideration. Note. Code that implements "opening an already-open file, shows the yellow message header thing with [Edit anyway] and [Don't Edit]" needs to be removed if this patch gets applied.
thanks for the patch craig... unfortunately this issue has been lingering for quite sometime. Some time ago we discussed things a bit and proposed a slightly different solution: the tab is raised if you open the same file in the same window, while is opened with the current warning if you open it in a separate window. In fact http://bugzilla.gnome.org/show_bug.cgi?id=143646 even has a patch, can you take a look at the patch there and bring it up to cvs HEAD and compare it/merge it with yours?
bug 143646 comment 29 by Paolo Maggi does the same as my patch. It applies to head. However, if you open 2 gedit windows, Paolo Maggi's patch allows you open the same file twice. It warns you when you attempt to save. So if users want the same file open twice, they can - use two windows. If you open file from the commandline, it will check if that file already open in the most recent used gedit window. I think Paolo Maggi patch provides what most people want. Drop my patch.
Paolo's patch has been committed. Closing as fixed.