Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.ly is missing by saving #16

Closed
Musix opened this issue Jan 17, 2012 · 13 comments
Closed

.ly is missing by saving #16

Musix opened this issue Jan 17, 2012 · 13 comments

Comments

@Musix
Copy link

Musix commented Jan 17, 2012

hi there

when i save e.g. "song1" in frescobaldi 2.0.1, it saves as "song1" instead of "song1.ly". i think, the .ly should be added automatically (manually is ok)

best regards

musix

@wbsoft
Copy link
Collaborator

wbsoft commented Jan 17, 2012

will look into this. Some dialog (e.g. KDE4, when KDE is running, and probably Windows) already add the .ly automatically.

So when I implement that, I should do it cautiously :-)

@Musix
Copy link
Author

Musix commented Jan 17, 2012

well, fine. i forgot to mention that i use a minimal installation of debian-sid and a parallel installation with gnome and debian-squeeze. in both installation no .ly ist automatically added.

@wbsoft
Copy link
Collaborator

wbsoft commented Feb 2, 2012

I have looked somewhat deeper into this and the issue is somewhat complicated.

On Windows, the default extension (the first of the extensions given in the filename filter) IS added.

On KDE too (there is even a button "Append '.ly' extension" that is checked by default).

On Mac OS X, it seems that only an extension is added if the currently selected filter has only one extension (e.g. *.ly). (Which is not always the case, as Frescobaldi also looks for *.ily and *.lyi as those are often used as include-lilypond extension.)

But indeed the default Qt4 file dialog and apparently the gnome dialog don't add the default extension.

Now here's the hairy issue: When I force Frescobaldi to use the Qt4-provided file dialog, I can set a default suffix.

But then you loose the possibility to use the platform-native file dialogs.
One might think I could also add the extension after the user has entered a filename, but then the overwrite check is not done by the dialog and I must implement that manually. And that can cause the question 'do you want to overwrite this file' being asked twice: once by the file dialog and then again by my own code.

So, to solve this really, I should make a preference checkbox in Frescobaldi "Use platform native file dialogs", probably checked by default. And if the user unchecks it, the Qt4 filedialog will be used and there I can implement the automatic addition of the extension, using the QFileDialog.defaultSuffix property.

@Musix
Copy link
Author

Musix commented Feb 2, 2012

well, shit, that sounds complicated. i think the solution you described is the best temporarily!

@fedelibre
Copy link
Member

I reported the same problem on the mailing list on March.
I like the solution proposed by wbsoft

@dliessi
Copy link
Collaborator

dliessi commented Dec 14, 2013

On Mac OS X, it seems that only an extension is added if the currently selected filter has only one extension (e.g. *.ly). (Which is not always the case, as Frescobaldi also looks for *.ily and *.lyi as those are often used as include-lilypond extension.)

Not on my machine: when I save a new file and the extension filter is ".ly .ily .lyi" and I don't specify an extension, the .ly extension is always automatically added.

@uliska
Copy link
Collaborator

uliska commented Dec 14, 2013

On my machines (different Linux distros) I also have to add the extension manually.

@wbsoft
Copy link
Collaborator

wbsoft commented Jan 17, 2015

Now Frescobaldi uses a default filename when saving a document for the first time, with an extension added. Does this help in these cases?

@uliska
Copy link
Collaborator

uliska commented Jan 17, 2015

It is much less likely to happen as (only) the 'untitled' is pre-selected. So when I click 'Save' and start entering a filename the .ly is kept.

But still when I enter a name without extension the file is saved without extension (on Debian/Gnome).

@fedelibre
Copy link
Member

I'm testing Frescobaldi 3.3.0 (flatpak) on Fedora 38 (GNOME) and when I save a new file the (GTK4) file dialog proposes Untitled.ly (where Untitled is focused so I can start typing and change the file name without losing the .ly extension).

We should check other desktop environments and operating systems and see if we can close this issue.

@fedelibre
Copy link
Member

3.3.0 behaves correctly even on Windows (10):

immagine

@jeanas
Copy link
Member

jeanas commented May 30, 2023

.ly used to be missing for me, but now it's there. I didn't pay attention to it at the time, but I guess it was when I upgraded from Fedora 37 to Fedora 38 (GNOME 43 → 44).

@fedelibre
Copy link
Member

For the records, I've launched a poll on lilypond-user mailing list and so far almost all users (Mac and Linux) have .ly when saving a file.

There's one exception: MXLinux 21.3, based on Debian 11.7, KDE Plasma 5.20.5.
Probably because it's an old version. Another KDE user wrote:

On UbuntuStudio, Kubuntu 23.04, the .ly extension was automatic.

Let's wait for more reports, but I would be tempted to close this issue by end of the week.

@fedelibre fedelibre closed this as not planned Won't fix, can't repro, duplicate, stale Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants