Git Product home page Git Product logo

Comments (13)

wbsoft avatar wbsoft commented on May 23, 2024

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 :-)

from frescobaldi.

Musix avatar Musix commented on May 23, 2024

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.

from frescobaldi.

wbsoft avatar wbsoft commented on May 23, 2024

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.

from frescobaldi.

Musix avatar Musix commented on May 23, 2024

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

from frescobaldi.

fedelibre avatar fedelibre commented on May 23, 2024

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

from frescobaldi.

dliessi avatar dliessi commented on May 23, 2024

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.

from frescobaldi.

uliska avatar uliska commented on May 23, 2024

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

from frescobaldi.

wbsoft avatar wbsoft commented on May 23, 2024

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

from frescobaldi.

uliska avatar uliska commented on May 23, 2024

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).

from frescobaldi.

fedelibre avatar fedelibre commented on May 23, 2024

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.

from frescobaldi.

fedelibre avatar fedelibre commented on May 23, 2024

3.3.0 behaves correctly even on Windows (10):

immagine

from frescobaldi.

jeanas avatar jeanas commented on May 23, 2024

.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).

from frescobaldi.

fedelibre avatar fedelibre commented on May 23, 2024

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.

from frescobaldi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.