[meld] settings: Migrate flat-file logic; this does nothing however
- From: Kai Willadsen <kaiw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [meld] settings: Migrate flat-file logic; this does nothing however
- Date: Fri, 6 Dec 2013 23:26:51 +0000 (UTC)
commit a1815622d7d77035c8362bb902c4b8788e104cea
Author: Kai Willadsen <kai willadsen gmail com>
Date: Sat Dec 7 08:50:27 2013 +1000
settings: Migrate flat-file logic; this does nothing however
The keyfile backend isn't available to introspection; see
https://bugzilla.gnome.org/show_bug.cgi?id=682702
meld/settings.py | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/meld/settings.py b/meld/settings.py
index 2955139..121ad7c 100644
--- a/meld/settings.py
+++ b/meld/settings.py
@@ -14,20 +14,32 @@
# this program; if not, write to the Free Software Foundation, Inc., 51
# Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+import os
+
from gi.repository import Gio
+from gi.repository import GLib
from gi.repository import GObject
from gi.repository import Pango
import meld.conf
import meld.filters
+
schema_source = Gio.SettingsSchemaSource.new_from_directory(
meld.conf.DATADIR,
Gio.SettingsSchemaSource.get_default(),
False,
)
schema = schema_source.lookup('org.gnome.meld', False)
-settings = Gio.Settings.new_full(schema, None, None)
+backend = None
+
+force_ini = os.path.exists(
+ os.path.join(GLib.get_user_config_dir(), 'meld', 'use-rc-prefs'))
+if force_ini:
+ # TODO: Use GKeyfileSettingsBackend once available (see bgo#682702)
+ print("Using a flat-file settings backend is not yet supported")
+ backend = None
+settings = Gio.Settings.new_full(schema, backend, None)
interface_settings = Gio.Settings.new('org.gnome.desktop.interface')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]