sailfish-keyboard / presage

Fork of Presage (http://presage.sourceforge.net/)
GNU General Public License v2.0
6 stars 10 forks source link

make configuration XML path configurable #7

Closed rinigus closed 6 years ago

rinigus commented 6 years ago

Add ability to load configuration from arbitrary path. For example, it can be option in constructor

This will allow to skip installation of presage-data on SFOS

rinigus commented 6 years ago

See https://sourceforge.net/p/presage/bugs/14/ :

Creator: Márton Miklós

Hello Matteo,

I would like to ask that the following snippled in the profileManager.cpp around the line 117 is intentional?

void ProfileManager::init_profiles (const std::string& profilename)
{
std::list<std::string> profiles;

{
    // load default profile values
    DefaultProfile default_profile ("");
default_profile.read_into_configuration (config);
}

// system etc directory

This makes the presage always load the compiled in XML file and the users are not able to use customized presage.xml file.

If it is just a mistake I can came up with a PR. Thanks in advance!

rinigus commented 6 years ago

As a workaround, empty database is provided as a part of presage-data. This allows to load default configuration and change it later without touching corresponding sections of presage code.