diff options
author | Ryan Lortie <desrt@desrt.ca> | 2012-07-13 14:14:04 -0400 |
---|---|---|
committer | Ryan Lortie <desrt@desrt.ca> | 2012-07-13 14:14:04 -0400 |
commit | 68a2895ca9896c795aa1644d30ac1ea8f129805b (patch) | |
tree | 9202d21fffcdcbb13304afff1959090f20355a94 /editor | |
parent | bdce5c2b1780b9f6b4381fe2877f472335ecb050 (diff) | |
parent | 0bd2f8ee907b2c3e74b20c3cd58b0da1b6a586fb (diff) | |
download | dconf-68a2895ca9896c795aa1644d30ac1ea8f129805b.tar.gz |
Merge branch 'wip/reorg'
Conflicts:
bin/dconf-dump.vala
configure.ac
editor/Makefile.am
Diffstat (limited to 'editor')
-rw-r--r-- | editor/Makefile.am | 37 | ||||
-rw-r--r-- | editor/dconf-model.vala | 26 |
2 files changed, 38 insertions, 25 deletions
diff --git a/editor/Makefile.am b/editor/Makefile.am index a030c7d..3fa76f6 100644 --- a/editor/Makefile.am +++ b/editor/Makefile.am @@ -1,10 +1,33 @@ +include $(top_srcdir)/Makefile.gtester + +INCLUDES = -I$(top_srcdir)/common -I$(top_srcdir)/client + bin_PROGRAMS = dconf-editor -AM_CFLAGS = $(gtk_CFLAGS) $(libxml_CFLAGS) -I$(top_srcdir)/common -I$(top_srcdir)/client -DPKGDATADIR=\"@datadir@/dconf-editor\" -DVERSION=\"$(VERSION)\" -DGETTEXT_PACKAGE=\"dconf-editor\" -AM_VALAFLAGS = --vapidir ../client --pkg gtk+-3.0 --pkg libxml-2.0 --pkg dconf -CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -dconf_editor_LDADD = ../client/libdconf.so.0 $(gtk_LIBS) $(gee_LIBS) $(libxml_LIBS) -dconf_editor_SOURCES = config.vapi dconf-editor.vala dconf-model.vala dconf-schema.vala dconf-view.vala +dconf_editor_VALAFLAGS = --vapidir ../client --pkg gtk+-3.0 --pkg gmodule-2.0 --pkg libxml-2.0 --pkg dconf + +dconf_editor_LDADD = \ + ../client/libdconf.so.1 \ + $(gtk_LIBS) \ + $(gee_LIBS) \ + $(gmodule_LIBS) \ + $(libxml_LIBS) + +dconf_editor_CFLAGS = \ + $(gtk_CFLAGS) \ + $(gee_CFLAGS) \ + $(libxml_CFLAGS) \ + -DPKGDATADIR=\"$(pkgdatadir)\" \ + -DVERSION=\"$(VERSION)\" \ + -DGETTEXT_PACKAGE=\"dconf-editor\" \ + -w + +dconf_editor_SOURCES = \ + config.vapi \ + dconf-editor.vala \ + dconf-model.vala \ + dconf-schema.vala \ + dconf-view.vala desktopdir = $(datadir)/applications desktop_in_files = dconf-editor.desktop.in.in @@ -28,7 +51,7 @@ update-icon-cache: gtk-update-icon-cache -f -t $(datadir)/icons/hicolor; \ fi -uidir = $(datadir)/dconf-editor -dist_ui_DATA = dconf-editor.ui dconf-editor-menu.ui +pkgdatadir = $(datadir)/dconf-editor +dist_pkgdata_DATA = dconf-editor.ui dconf-editor-menu.ui EXTRA_DIST = $(gsettings_SCHEMAS) $(icons) diff --git a/editor/dconf-model.vala b/editor/dconf-model.vala index 46afa3e..ff45a29 100644 --- a/editor/dconf-model.vala +++ b/editor/dconf-model.vala @@ -52,7 +52,7 @@ public class Key : GLib.Object _value = value; try { - model.client.write(full_name, value); + model.client.write_sync(full_name, value); } catch (GLib.Error e) { @@ -143,7 +143,7 @@ public class Key : GLib.Object _value = null; try { - model.client.write(full_name, null); + model.client.write_sync(full_name, null); } catch (GLib.Error e) { @@ -570,28 +570,18 @@ public class SettingsModel: GLib.Object, Gtk.TreeModel public signal void item_changed (string key); - void watch_func (DConf.Client client, string path, string[] items, string tag) { - if (items.length == 0) { - item_changed (path); - } else { - foreach (var item in items) { - item_changed (path + item); - } + void watch_func (DConf.Client client, string path, string[] items, string? tag) { + foreach (var item in items) { + item_changed (path + item); } } public SettingsModel() { - client = new DConf.Client (null, watch_func); + client = new DConf.Client (); + client.changed.connect (watch_func); root = new Directory(this, null, "/", "/"); - try - { - client.watch ("/"); - } - catch (Error e) - { - warning ("Failed to watch all keys: %s", e.message); - } + client.watch_sync ("/"); schemas = new SchemaList(); try |