On mercredi 11 janvier 2017 21:36:23 CET D. Michael McIntyre wrote:
> On 01/10/2017 04:15 AM, David Faure wrote:
> > Step 1 can be tested separately with "kmimetypefinder5 myfile".
> 
> Yields "audio/x-rosegarden" as expected.

For which type of file?
A *.rg file should yield application/x-rosegarden-composition,
according to share/mime/packages/rosegarden.xml as installed by rosegarden,
and it does here.

I don't see a mimetype definition for audio/x-rosegarden anywhere,
including in shared-mime-info.

Can you `grep -r audio/x-rosegarden /usr/share/mime/packages` ?
and if that doesn't return anything then check the other locations in your 
XDG_DATA_DIRS, similarly.

Do you have a /usr/share/mime/packages/rosegarden.xml file?

> XDG_DATA_DIRS=/usr/share:/usr/share/xsessions/plasma:/usr/local/share:/var/l
> ib/snapd/desktop

OK the most important part is here (/usr/share) but I really wonder what's in 
your /usr/share/xsessions/plasma (for my curiosity, can you do a `find` there, 
to show me?)

> Note that fixing this environment variable had no effect on anything.

It depends on what you meant by fixing ;)

> > When you say MIME icons aren't working, do you mean for ALL files, or only
> > for Rosegarden documents?
> 
> Some MIME icons are working, but none of the Rosegarden ones.

Yeah, with a wrong mimetype that is not exactly surprising.

The way it's supposed to work is that installing rosegarden into /usr, or into 
a prefix listed in XDG_DATA_DIRS, then that should make both the mimetype 
definitions and the icons available.

PREFIX/share/mime/packages/rosegarden.xml
PREFIX/share/icons/hicolor/32x32/mimetypes/application-x-rosegarden-
composition.png

*However* there is an extra step missing, which is likely the issue here.
The program `update-mime-database` needs to be run after installing a mimetype 
definition.

Where do you install rosegarden?

Are your mimetype problems solved if you run
  update-mime-database PREFIX/share
where PREFIX is your rosegarden installation prefix,
and if you add PREFIX/share to XDG_DATA_DIRS?
(of course you'll have to run rosegarden and dolphin from the terminal where 
you modified XDG_DATA_DIRS).

> > The icons themselves come from the icon theme. Do you have oxygen/or and
> > breeze installed? What does `kiconfinder5 folder` return?
> 
> /usr/share/icons/breeze/places/32/folder.svg

OK. And after you fix the setup, then you should see
`kiconfinder5 application-x-rosegarden-composition`
working.
 
> > I am actually using a dark color theme in Plasma 5, and it seems to work
> > just fine (from other apps). See attached screenshot. No stylesheet hacks
> > there, just "Breeze Dark" chosen in `kcmshell5 colors`.
> 
> The problems come from the infectious stylesheet.

Agreed.

> > Well, that would be the case, if your stylesheet didn't infect the whole
> > Qt application :-)
> 
> I acknowledge that the stylesheet is an absolute nightmare.  Anyway,
> Spriter Pro has the same problem, so I feel better.

OK... :)
 
> > I don't think there's anything I can do in the KDE file dialog to prevent
> > it from being affected by the application stylesheet or widget style.
> > It's Qt's design that the application widget style and palette affect all
> > widgets in the process, including the file dialog.
> 
> I agree.  I think it's a flaw in Qt.  I can't think of any way to hack
> around this short of launching the file dialogs from a stand-alone
> application.

Which btw can be done (kdialog --getopenfilename) but that is a somewhat 
horrible solution.

How about not using a stylesheet? I hate stylesheets anyway, they are slow, 
inflexible, limited....
A palette and a widget style can do everything a stylesheet does, and more
(though with much more tricky code, in some cases).

-- 
David Faure, [email protected], http://www.davidfaure.fr
Working on KDE Frameworks 5


------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to