Hello,
Attached a little patch concerning the file saving dialog. I may have missed some use cases, but it works on all cases mentioned in the commit message.
The main point is about the âRenameâ, the unsaved file one (last commit message line) is a bonus.
Cheers,
Le 03/05/2012 13:41, Quentin Glidic a écrit :
Hello,
Hi,
Attached a little patch concerning the file saving dialog. I may have missed some use cases, but it works on all cases mentioned in the commit message.
The main point is about the âRenameâ, the unsaved file one (last commit message line) is a bonus.
I agree that "Open in new tab" shouldn't have precedence over "Rename".
However, I'm not completely sure about the change on "Open in new tab" behavior, e.g. that it has no effect either when renaming or when the file wasn't yet saved. Upon rename, I agree it doesn't seem to make much sense, because the original tab would become "orphaned", and would show a "hey, I'm not found on disk!". But I can imagine one would save to file while keeping the unsaved buffer open (maybe to save it to another file again later on) -- OK, I don't have such use-case myself.
So, on this subject, open question: what do other think? I'm OK with the proposed behavior, but as said I could understand somebody wanting to keep "open in new tab" with unsaved files; but if no one cares it probably makes the thing more intuitive to remove it (e.g. no unsaved file after save).
Anyway, the UI should reflect the behavior, e.g. the "Open in new tab" checkbox should be sensitive only if it will be used (with your patch, when doc->file_name != NULL).
Regards, Colomban
PS: BTW, please stick to ASCII in commit messages :)
I can't find the mail with the patch quickly so I havn't looked at it.
On 6 November 2012 02:02, Colomban Wendling lists.ban@herbesfolles.orgwrote:
Le 03/05/2012 13:41, Quentin Glidic a écrit :
Hello,
Hi,
Attached a little patch concerning the file saving dialog. I may have missed some use cases, but it works on all cases mentioned in the commit message.
The main point is about the “Rename†, the unsaved file one (last commit message line) is a bonus.
I agree that "Open in new tab" shouldn't have precedence over "Rename".
However, I'm not completely sure about the change on "Open in new tab" behavior, e.g. that it has no effect either when renaming or when the file wasn't yet saved. Upon rename, I agree it doesn't seem to make much sense, because the original tab would become "orphaned", and would show a "hey, I'm not found on disk!". But I can imagine one would save to file while keeping the unsaved buffer open (maybe to save it to another file again later on) -- OK, I don't have such use-case myself.
It makes sense to me when used on the save-as dialog, ie keep the old file open in another tab as well as saving this one under a new filename. But I agree it doesn't make sense on rename, but how to know that the user is going to rename to grey it out?
But neither open in new tab or rename makes sense on the save dialog, its just that we are too lazy to define different save dialog versions IIUC :)
If save and save-as are to remain the same dialog then only save and cancel should be sensitive on the save dialog.
Cheers Lex
So, on this subject, open question: what do other think? I'm OK with the proposed behavior, but as said I could understand somebody wanting to keep "open in new tab" with unsaved files; but if no one cares it probably makes the thing more intuitive to remove it (e.g. no unsaved file after save).
Anyway, the UI should reflect the behavior, e.g. the "Open in new tab" checkbox should be sensitive only if it will be used (with your patch, when doc->file_name != NULL).
Regards, Colomban
PS: BTW, please stick to ASCII in commit messages :) _______________________________________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-bin/mailman/listinfo/devel
Am 05.11.2012 23:45, schrieb Lex Trotman:
If save and save-as are to remain the same dialog then only save and cancel should be sensitive on the save dialog.
Just save doesn't need a dialog. Plus, IMO, rename makes perfectly sense in "save as..." and is very convenient.
Best regards.
On 9 November 2012 20:31, Thomas Martitz < thomas.martitz@student.htw-berlin.de> wrote:
Am 05.11.2012 23:45, schrieb Lex Trotman:
If save and save-as are to remain the same dialog then only save and cancel should be sensitive on the save dialog.
Just save doesn't need a dialog.
True, except the first time when it needs a name, but after that no, and AFAIK it doesn't open after the first time anyway.
Plus, IMO, rename makes perfectly sense in "save as..." and is very convenient.
In case I wasn't clear, save dialog only save and cancel, save-as dialog, open-in-new-tab, rename, save, cancel
Cheers Lex
Best regards.
______________________________**_________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/develhttps://lists.geany.org/cgi-bin/mailman/listinfo/devel
Am 09.11.2012 10:40, schrieb Lex Trotman:
On 9 November 2012 20:31, Thomas Martitz <thomas.martitz@student.htw-berlin.de mailto:thomas.martitz@student.htw-berlin.de> wrote:
Am 05.11.2012 23:45, schrieb Lex Trotman: If save and save-as are to remain the same dialog then only save and cancel should be sensitive on the save dialog. Just save doesn't need a dialog.
True, except the first time when it needs a name, but after that no, and AFAIK it doesn't open after the first time anyway.
It isn't clear to me why that is, or should be, different to save as.
Best regards.
On 9 November 2012 20:43, Thomas Martitz < thomas.martitz@student.htw-berlin.de> wrote:
Am 09.11.2012 10:40, schrieb Lex Trotman:
On 9 November 2012 20:31, Thomas Martitz <thomas.martitz@student.htw-** berlin.de thomas.martitz@student.htw-berlin.de <mailto:thomas.martitz@* *student.htw-berlin.de thomas.martitz@student.htw-berlin.de>> wrote:
Am 05.11.2012 23:45, schrieb Lex Trotman: If save and save-as are to remain the same dialog then only save and cancel should be sensitive on the save dialog. Just save doesn't need a dialog.
True, except the first time when it needs a name, but after that no, and AFAIK it doesn't open after the first time anyway.
It isn't clear to me why that is, or should be, different to save as.
Well, when it doesn't have a name (ie the first time a buffer is saved), it doesn't make sense to have a rename option. But once it has a name then plain save can just save it and not open the dialog.
Cheers Lex
Best regards. ______________________________**_________________ Devel mailing list Devel@lists.geany.org https://lists.geany.org/cgi-**bin/mailman/listinfo/develhttps://lists.geany.org/cgi-bin/mailman/listinfo/devel
Am 05.11.2012 16:02, schrieb Colomban Wendling:
Le 03/05/2012 13:41, Quentin Glidic a écrit :
Hello,
Hi,
Attached a little patch concerning the file saving dialog. I may have missed some use cases, but it works on all cases mentioned in the commit message.
The main point is about the âRenameâ, the unsaved file one (last commit message line) is a bonus.
I agree that "Open in new tab" shouldn't have precedence over "Rename".
However, I'm not completely sure about the change on "Open in new tab" behavior, e.g. that it has no effect either when renaming or when the file wasn't yet saved. Upon rename, I agree it doesn't seem to make much sense, because the original tab would become "orphaned", and would show a "hey, I'm not found on disk!". But I can imagine one would save to file while keeping the unsaved buffer open (maybe to save it to another file again later on) -- OK, I don't have such use-case myself.
So, on this subject, open question: what do other think? I'm OK with the proposed behavior, but as said I could understand somebody wanting to keep "open in new tab" with unsaved files; but if no one cares it probably makes the thing more intuitive to remove it (e.g. no unsaved file after save).
Uhm, I guess I have this use case, but I always did it it differently (mostly because I ever overlooked the rename button and open in new tab check box).
I sometimes happen to want to back up the current file under a different name before starting new work on on it (keeping the name). For this, however, I always copy&pasted the content into a new, empty file and saved it under a different name.
However, I'm fine in continuing to do it that way and it's probably not worth to add code for this case (and not just for me anyway).
Best regards.