Comments (13)
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.
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.
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.
well, shit, that sounds complicated. i think the solution you described is the best temporarily!
from frescobaldi.
I reported the same problem on the mailing list on March.
I like the solution proposed by wbsoft
from frescobaldi.
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.
On my machines (different Linux distros) I also have to add the extension manually.
from frescobaldi.
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.
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.
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.
3.3.0 behaves correctly even on Windows (10):
from frescobaldi.
.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.
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)
- RuntimeError: wrapped C/C object of type TabBar has been deleted HOT 1
- AttributeError: 'NoneType' object has no attribute 'document' HOT 1
- AttributeError: 'WebEngineDummy' object has no attribute 'view' HOT 1
- Music view: prefer to show most recent output file HOT 2
- RuntimeError: wrapped C/C object of type TabBar has been deleted HOT 3
- Upgrade to pyqt6? HOT 1
- RuntimeError: wrapped C/C object of type QAction has been deleted HOT 1
- Frescobaldi fails to process files with a semicolon in their filename HOT 1
- Feature Request: Simple Midi Record / fast edit
- api-ms-win-core-path-l1-1-0.dll missing HOT 3
- Asking for compatibility of Windows 7 with previous versions of Frescobaldi and Lilypond HOT 1
- Weird issues with UI scaling on high screen resolution
- TypeError: cannot create weak reference to 'NoneType' object
- RecursionError: maximum recursion depth exceeded while calling a Python object
- Freezes on restart HOT 1
- RuntimeError: wrapped C/C object of type TabBar has been deleted HOT 1
- RuntimeError: wrapped C/C object of type QAction has been deleted
- Copy as Colored HTML does not work in Linux unless "plain text" setting is checked HOT 4
- RuntimeError: wrapped C/C object of type TabBar has been deleted HOT 1
- Patterns to match in text (including comments) regexes not saving
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frescobaldi.