9
9
* This library is distributed in the hope that it will be useful,
10
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12
12
* See the GNU Library General Public License 3 for more details.
14
14
* You should have received a copy of the GNU Library General Public
147
147
GSettings *conf_get_base_settings() {
148
148
// Return GSettings (base) object. This points to /apps/audio-recorder/.
151
// This code failed on some Linux-distributions. Reverting to g_settings_new().
153
// Ref: http://developer.gnome.org/gio/2.32/gio-GSettingsSchema-GSettingsSchemaSource.html
154
GSettingsSchemaSource *source = g_settings_schema_source_get_default();
155
GSettingsSchema *schema = g_settings_schema_source_lookup(source, APPLICATION_SETTINGS_SCHEMA, TRUE);
157
// Check if schema has been installed
159
g_printerr("Error: Cannot find settings for %s in GNOME's registry. "
160
"Please run \"make install\" as sudo or root user.\n", "/apps/audio-recorder/");
163
GSettings *settings = g_settings_new_full(schema, NULL, NULL);
164
g_settings_schema_unref(schema);
151
// This code failed on some Linux-distributions. Reverting to g_settings_new().
153
// Ref: http://developer.gnome.org/gio/2.32/gio-GSettingsSchema-GSettingsSchemaSource.html
154
GSettingsSchemaSource *source = g_settings_schema_source_get_default();
155
GSettingsSchema *schema = g_settings_schema_source_lookup(source, APPLICATION_SETTINGS_SCHEMA, TRUE);
157
// Check if schema has been installed
159
g_printerr("Error: Cannot find settings for %s in GNOME's registry. "
160
"Please run \"make install\" as sudo or root user.\n", "/apps/audio-recorder/");
163
GSettings *settings = g_settings_new_full(schema, NULL, NULL);
164
g_settings_schema_unref(schema);
167
167
GSettings *settings = g_settings_new(APPLICATION_SETTINGS_SCHEMA);
168
168
if (!G_IS_SETTINGS(settings)) {
169
g_printerr("Error: Cannot find settings for %s in GNOME's registry. "
169
g_printerr("Error: Cannot find settings for %s in GNOME's registry. "
170
170
"Please run \"make install\" as sudo or root user.\n", "/apps/audio-recorder/");