mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-02-23 13:31:31 -05:00
look for the palettes in various places
This commit is contained in:
parent
66aa8fa6a1
commit
c2d227b403
@ -78,14 +78,20 @@ FractoriumEmberController<T>::FractoriumEmberController(Fractorium* fractorium)
|
|||||||
|
|
||||||
//Initial combo change event to fill the palette table will be called automatically later.
|
//Initial combo change event to fill the palette table will be called automatically later.
|
||||||
|
|
||||||
// TODO: Use QStandardPaths::DataLocation(), on linux one of the paths it
|
// Look for a palette in:
|
||||||
// returns should be "/usr/share/fractorium". It might have to be lowercased
|
// - the folder where the binary is, QCoreApplication::applicationDirPath()
|
||||||
// to make sure.
|
// - shared data folder, QStandardPaths::DataLocation()
|
||||||
//
|
// - /usr/local/share/fractorium
|
||||||
// http://doc.qt.io/qt-5/qstandardpaths.html#StandardLocation-enum
|
// - /usr/share/fractorium
|
||||||
|
|
||||||
if (!InitPaletteList(QString("/usr/share/fractorium").toLocal8Bit().data()))
|
// TODO: use QStandardPaths::DataLocation too.
|
||||||
throw "No palettes found, exiting.";
|
|
||||||
|
if ( ! (InitPaletteList(QCoreApplication::applicationDirPath().toLocal8Bit().data()) ||
|
||||||
|
InitPaletteList(QString("/usr/local/share/fractorium").toLocal8Bit().data()) ||
|
||||||
|
InitPaletteList(QString("/usr/share/fractorium").toLocal8Bit().data())) )
|
||||||
|
{
|
||||||
|
throw "No palettes found, exiting.";
|
||||||
|
}
|
||||||
|
|
||||||
BackgroundChanged(QColor(0, 0, 0));//Default to black.
|
BackgroundChanged(QColor(0, 0, 0));//Default to black.
|
||||||
ClearUndo();
|
ClearUndo();
|
||||||
|
Loading…
Reference in New Issue
Block a user