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

Musescore 3.7 does not remember favorite paths in open/save dialog. #436

Open
zorba77 opened this issue Apr 23, 2024 · 19 comments
Open

Musescore 3.7 does not remember favorite paths in open/save dialog. #436

zorba77 opened this issue Apr 23, 2024 · 19 comments

Comments

@zorba77
Copy link

zorba77 commented Apr 23, 2024

Step to reproduce:

  • Open MS 3.7
  • CTRL+O to open a file
  • On the left there are the standard paths: "/home/username/", Spartiti, bin, demos
  • Drag one or more directory from the right panel to the favorite panel on the left
  • Directories are shown and accessible via click
  • Close and reopen MS 3.7
  • user defined favorite paths are lost. Only default paths are present

The same for file save dialog (except that the demos path is absent)

OS: Ubuntu 22.04.4 LTS, Arch.: x86_64, MuseScore version (64-bit): 3.7.0.8678350200, revision: acbfac0

@Jojo-Schmitz
Copy link
Owner

Jojo-Schmitz commented Apr 23, 2024

a) does 3.6.2 behave differently, i.e. is it a regression?
b) does any 4.x behave differently, i.e. is it a new feature which I missed to port over?

@zorba77
Copy link
Author

zorba77 commented Apr 23, 2024

a) 3.6.2 works fine, it's a regression. When I open MS 3.7 it delete also old 3.6.2 favorite paths
b) 4.2.1 works fine, and it's independent from 3.X settings (favorite paths are not deleted by MS 3.7).
4.X seems to use another file dialog, it does not seem the kde dialog, but I don't know

@Jojo-Schmitz
Copy link
Owner

OK, so a regression :-(

@zorba77
Copy link
Author

zorba77 commented Jul 10, 2024

Any news for this regression in the open/save dialog?

@Jojo-Schmitz
Copy link
Owner

Jojo-Schmitz commented Jul 10, 2024

As under Windows there is no such favorites panel (using the natiive file dialogs), I'm having a hard time reproducing the issue, the file open dialog looks and works exactly the same in 3.6.2 and 3.7, under Windows

@Jojo-Schmitz
Copy link
Owner

And yes, 4.x after 4.2.1 doesn't use the KDE file dialog (under Linux) anymore as far as I know

@zorba77
Copy link
Author

zorba77 commented Jul 10, 2024

I suppose that also on Windows' file dialog there's a panel on the left with standard folders, but I don't remember.
How can I help you to find the problem?

@Jojo-Schmitz
Copy link
Owner

Jojo-Schmitz commented Jul 10, 2024

There is such a panel:
image
But no favourites

@zorba77
Copy link
Author

zorba77 commented Jul 10, 2024

dialog
this is the Kubuntu open dialog.
It seems that favorite paths are stored in the file $HOME/.config/QtProject.conf
shortcuts=file:///home/ab, file:///home/ab/Documenti/MuseScore3/Spartiti, ...

@zorba77
Copy link
Author

zorba77 commented Jul 10, 2024

  1. Open MS 3.6.2, open file dialog, add a new folder on the left by dragging
  2. close MS 3.6.2, the file $HOME/.config/QtProject.conf is written with a new voice in the variable "shortcuts"
  3. Open MS 3.6.2, the new path is loaded and is present in the file dialog
  4. Close MS 3.6.2
  5. Open MS 3.7, in the file dialog there isn't the new path, so, probably, the file QtProject.conf is ignored (or something goes wrong)
  6. Close MS 3.7, the file QtProject.conf is written without the new path, only default paths are restored

@zorba77
Copy link
Author

zorba77 commented Jul 10, 2024

is this useful?
https://musescore.org/en/node/75306

@zorba77
Copy link
Author

zorba77 commented Jul 18, 2024

image
this is the 3.6.2 file dialog. It's different than 3.7, see above.
The file dialog seems created in file "file.cpp", function "QStringList MuseScore::getOpenScoreNames", line 1109 and following.
See line 1143:
// setup side bar urls
QList urls = sidebarUrls();
Is it this the function that populates the side bar?
Use the native dialog may resolve the bug?

In file preferences.cpp

#if defined(Q_OS_MAC) || defined(Q_OS_WIN) // use system native file dialog, Qt file dialog is very slow on Windows and Mac
            {PREF_UI_APP_USENATIVEDIALOGS,                         new BoolPreference(true)},
#else // don't use system native file dialog, this is causing issues on some Linuxes
            {PREF_UI_APP_USENATIVEDIALOGS,                         new BoolPreference(false)},

So, only under Linux native dialogs are not used

@Jojo-Schmitz
Copy link
Owner

Jojo-Schmitz commented Jul 18, 2024

I don't see any significalt difference between those 2 screenshots, just the section to the right.
And yes, only Linux by default uses, the non-native file dialogs (which means it uses the Qt dialogs), but you can configure that in the advanced preferences

You're quoting the code wrongly BTW:

#if defined(Q_OS_MAC) || defined(Q_OS_WIN) // use system native file dialog, Qt file dialog is very slow on Windows and Mac
            {PREF_UI_APP_USENATIVEDIALOGS,                         new BoolPreference(true)},
#else // don't use system native file dialog, this is causing issues on some Linuxes
            {PREF_UI_APP_USENATIVEDIALOGS,                         new BoolPreference(false)},  // false, not true
#endif

@zorba77
Copy link
Author

zorba77 commented Jul 18, 2024

Yes, because I was working on the code , sorry.
Using the native dialog also on Linux fix the problem. I suppose it's better, for non advanced users, make this option the default also on linux.
Otherwise it's necessary to investigate why the side bar isn't populated on qtdialog

@zorba77
Copy link
Author

zorba77 commented Jul 18, 2024

but you can configure that in the advanced preferences

this doesn't work, neither on MS 3.6.2 or 3.7
The native dialog appears only if I set it in the file preferences.cpp, like Windows and MacOs

@Jojo-Schmitz
Copy link
Owner

Jojo-Schmitz commented Jul 18, 2024

It certainly works for me, on Windows, to switch to the non-native dialog, 3.6.2 and 3.7:
image

And it doesn't remember the favorite paths (those in the left hand part of the dialog), not in 3.6.2 nor in 3.7, so no regression there (but indeed I guess it should remeber them).

Mu4 doesn't use the non-native dialogs at all anymore IIRC

@zorba77
Copy link
Author

zorba77 commented Jul 21, 2024

Yes, now also 3.6.2 doesn't remember favorite paths (strange, in previous tests it worked), almost on Linux. The use of Native dialogs resolve the issue, so I suppose the best solution is to make it the default choice also on Linux, like Windows and Macos, modifying the file preferences.cpp.

@Jojo-Schmitz
Copy link
Owner

But see https://musescore.org/en/node/366348

@Jojo-Schmitz Jojo-Schmitz added wontfix and removed regression Regression vs. 3.6.2 labels Jul 22, 2024
@Jojo-Schmitz
Copy link
Owner

Jojo-Schmitz commented Jul 22, 2024

is this useful?
https://musescore.org/en/node/75306

Yes it might be careful indeed.
Indicating that this probably is a Qt issue which I'd be unable to fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants