On mardi 7 février 2017 01:05:31 CET D. Michael McIntyre wrote:
> 14977 brought us full circle, except without the hideous stylesheet[1].
Yes and without the ugly old "Windows" style being applied to the file dialog
:-)
> I had set the option to use native file dialogs, experimentally, because
> Qt file dialogs in a KDE5 environment are seriously broken. No icons of
> any kind, no way to distinguish files from folders. They are similarly
> broken again, just not awash in black.
Oh, I thought you had fixed your mimetype issues on your setup.
What you describe here is again some XDG_DATA_DIRS issue,
or oxygen/breeze not installed. In the same environment, dolphin-qt5 shows
everything fine?
> I feel like going with native dialogs was probably a step in the right
> direction. The native KDE dialogs were better in every way than the Qt
> dialogs, which were never that good on their best day.
Yeah, I'd much rather use the native KDE dialog, for sure.
> However, we do
> need some other way to provide functionality similar to the sidebar.
>
> Upon further experimentation, I discovered I could add those paths to my
> KDE file dialog manually. Those extra paths only appear from
> Rosegarden. It must be some bit of configuration in some dotfile somewhere.
Indeed. These "bookmarks" are added to ~/.local/share/user-places.xbel.
"<OnlyInApp>Rosegarden</OnlyInApp>" can be used so they only show up in
rosegarden.
> How do you feel about having Rosegarden just write that configuration
> quietly, to establish these extra sidebar directories for KDE users?
That sounds like a good solution. I suppose the real solution is to implement
support for sidebarUrls() in the kde file dialog, but I'm not that motivated
and that wouldn't help you with Qt4 or current KF5 versions anyway.
> If that would bother you, how do you feel about "Rosegarden would like
> permission to add useful directories to your file dialog sidebar?" as a
> runtime question?
That would bother me as a user. It's less intrusive to pollute my rosegarden
filedialog with useless entries that I can ignore, than to ask me a question I
can't ignore ;)
I'll let you implement the addition of the sidebar entries into user-
places.xbel. I recommend an entry in rosegarden's QSettings to remember that
it happened, to save time on subsequent runs and so that the user can delete
stuff without it reappearing. Make it a version number rather than a bool,
just in case you want to add more entries later.
To find the xbel file, don't hardcode ~/.local/share, but use
QStandardPaths::writableLocation(GenericDataLocation) (requires Qt5)
If you really want to still support qt4, use qgetenv("XDG_DATA_HOME")
defaulting to ~/.local/share, but maybe it's time to ditch qt4...
And of course use XML API to edit the file. It's shared with other desktop
environments, so you can't assume newlines will be where they are in yours,
for instance.
> 1. I still can't believe the stylesheet monster is gone, and your new
> implementation got as close as it did to working on the first go.
Heh, "first go"... I must have spent more than 30 hours on this overall ;)
> It needs delicate tweaking here and there, and I'm more than willing to go
> deal with that trivia and not trouble you with it. I need to go study
> what you did in any case, because I'm sure it will be highly instructive.
OK. Feel free to ask if anything is unclear.
One thing about widget styles: the API docs only tell 10% of the story.
The code of the widgets and widget styles is where the truth is.
If anyone is looking for small tasks: the remaining uses of setStyleSheet in
individual widgets should be ported to QPalette (I already did many of these,
but there are some left).
About the "Special Parameters" dockwidget, do we agree on turning that into a
simple splitter then? (with the menuitem that allows to hide it or show it).
Or maybe even just a layouted widget, no splitter? (i.e. never bothering the
user to have to manually resize it if it shows up too small, as is sometimes
does).
--
David Faure, [email protected], http://www.davidfaure.fr
Working on KDE Frameworks 5
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel