diff options
Diffstat (limited to 'devel/dconf/files')
-rw-r--r-- | devel/dconf/files/patch-client_Makefile.in | 40 | ||||
-rw-r--r-- | devel/dconf/files/patch-dbus-1_Makefile.in | 51 | ||||
-rw-r--r-- | devel/dconf/files/patch-editor_Makefile.in | 20 | ||||
-rw-r--r-- | devel/dconf/files/patch-editor_dconf-editor.vala | 157 | ||||
-rw-r--r-- | devel/dconf/files/patch-editor_dconf-model.vala | 212 | ||||
-rw-r--r-- | devel/dconf/files/patch-editor_dconf-schema.vala | 129 | ||||
-rw-r--r-- | devel/dconf/files/patch-editors_dconf-view.vala | 11 | ||||
-rw-r--r-- | devel/dconf/files/patch-test_Makefile.am | 21 | ||||
-rw-r--r-- | devel/dconf/files/patch-test_Makefile.in | 21 |
9 files changed, 662 insertions, 0 deletions
diff --git a/devel/dconf/files/patch-client_Makefile.in b/devel/dconf/files/patch-client_Makefile.in new file mode 100644 index 000000000..c53b723b7 --- /dev/null +++ b/devel/dconf/files/patch-client_Makefile.in @@ -0,0 +1,40 @@ +--- client/Makefile.orig.in 2013-03-26 19:40:26.085263743 +0000 ++++ client/Makefile.in 2013-03-26 19:40:33.384265230 +0000 +@@ -55,7 +55,7 @@ + DIST_COMMON = $(dconfclientinclude_HEADERS) $(dconfinclude_HEADERS) \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(srcdir)/dconf.pc.in $(top_srcdir)/Makefile.gtester +-shlib_PROGRAMS = libdconf.so.1.0.0$(EXEEXT) ++shlib_PROGRAMS = libdconf.so.1$(EXEEXT) + subdir = client + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.ac +@@ -416,12 +416,12 @@ + + clean-shlibPROGRAMS: + -test -z "$(shlib_PROGRAMS)" || rm -f $(shlib_PROGRAMS) +-libdconf.so.1.0.0$(EXEEXT): $(libdconf_so_1_0_0_OBJECTS) $(libdconf_so_1_0_0_DEPENDENCIES) $(EXTRA_libdconf_so_1_0_0_DEPENDENCIES) ++libdconf.so.1$(EXEEXT): $(libdconf_so_1_0_0_OBJECTS) $(libdconf_so_1_0_0_DEPENDENCIES) $(EXTRA_libdconf_so_1_0_0_DEPENDENCIES) + @rm -f libdconf.so.1.0.0$(EXEEXT) + $(AM_V_CCLD)$(libdconf_so_1_0_0_LINK) $(libdconf_so_1_0_0_OBJECTS) $(libdconf_so_1_0_0_LDADD) $(LIBS) ++ $(AM_V_GEN) ln -fs libdconf.so.1 libdconf.so + + mostlyclean-compile: +- -rm -f *.$(OBJEXT) + + distclean-compile: + -rm -f *.tab.c +@@ -838,12 +838,8 @@ + # run tests in cwd as part of make check + check-local: test-nonrecursive + +-libdconf.so.1 libdconf.so: libdconf.so.1.0.0 +- $(AM_V_GEN) ln -fs libdconf.so.1.0.0 $@ +- + install-data-hook: +- ln -fs libdconf.so.1.0.0 $(DESTDIR)$(shlibdir)/libdconf.so.1 +- ln -fs libdconf.so.1.0.0 $(DESTDIR)$(shlibdir)/libdconf.so ++ ln -fs libdconf.so.1 $(DESTDIR)$(shlibdir)/libdconf.so + + uninstall-hook: + rm -f $(DESTDIR)$(shlibdir)/libdconf.so.1 diff --git a/devel/dconf/files/patch-dbus-1_Makefile.in b/devel/dconf/files/patch-dbus-1_Makefile.in new file mode 100644 index 000000000..2cabd14fb --- /dev/null +++ b/devel/dconf/files/patch-dbus-1_Makefile.in @@ -0,0 +1,51 @@ +--- dbus-1/Makefile.orig.in 2013-03-26 19:18:48.870352031 +0000 ++++ dbus-1/Makefile.in 2013-03-26 19:18:57.583352154 +0000 +@@ -55,7 +55,7 @@ + DIST_COMMON = $(dconf_dbus_1include_HEADERS) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/dconf-dbus-1.pc.in \ + $(top_srcdir)/Makefile.gtester +-shlib_PROGRAMS = libdconf-dbus-1.so.0.0.0$(EXEEXT) ++shlib_PROGRAMS = libdconf-dbus-1.so.0$(EXEEXT) + subdir = dbus-1 + ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 + am__aclocal_m4_deps = $(top_srcdir)/configure.ac +@@ -341,7 +341,7 @@ + + libdconf_dbus_1_so_0_0_0_LDFLAGS = -shared -Wl,-soname=libdconf-dbus-1.so.0 + libdconf_dbus_1_so_0_0_0_SOURCES = dconf-dbus-1.c +-nodist_noinst_DATA = libdconf-dbus-1.so libdconf-dbus-1.so.0 ++nodist_noinst_DATA = libdconf-dbus-1.so.0 + CLEANFILES = libdconf-dbus-1.so.0 libdconf-dbus-1.so + all: all-am + +@@ -430,13 +430,12 @@ + cd "$(DESTDIR)$(shlibdir)" && rm -f $$files + + clean-shlibPROGRAMS: +- -test -z "$(shlib_PROGRAMS)" || rm -f $(shlib_PROGRAMS) +-libdconf-dbus-1.so.0.0.0$(EXEEXT): $(libdconf_dbus_1_so_0_0_0_OBJECTS) $(libdconf_dbus_1_so_0_0_0_DEPENDENCIES) $(EXTRA_libdconf_dbus_1_so_0_0_0_DEPENDENCIES) +- @rm -f libdconf-dbus-1.so.0.0.0$(EXEEXT) ++libdconf-dbus-1.so.0$(EXEEXT): $(libdconf_dbus_1_so_0_0_0_OBJECTS) $(libdconf_dbus_1_so_0_0_0_DEPENDENCIES) $(EXTRA_libdconf_dbus_1_so_0_0_0_DEPENDENCIES) ++ @rm -f libdconf-dbus-1.so.0$(EXEEXT) + $(AM_V_CCLD)$(libdconf_dbus_1_so_0_0_0_LINK) $(libdconf_dbus_1_so_0_0_0_OBJECTS) $(libdconf_dbus_1_so_0_0_0_LDADD) $(LIBS) ++ $(AM_V_GEN) ln -fs libdconf-dbus-1.so.0 libdconf-dbus-1.so + + mostlyclean-compile: +- -rm -f *.$(OBJEXT) + + distclean-compile: + -rm -f *.tab.c +@@ -821,12 +820,8 @@ + # run tests in cwd as part of make check + check-local: test-nonrecursive + +-libdconf-dbus-1.so.0 libdconf-dbus-1.so: libdconf-dbus-1.so.0.0.0 +- $(AM_V_GEN) ln -fs libdconf-dbus-1.so.0.0.0 $@ +- + install-data-hook: +- ln -fs libdconf-dbus-1.so.0.0.0 $(DESTDIR)$(shlibdir)/libdconf-dbus-1.so.0 +- ln -fs libdconf-dbus-1.so.0.0.0 $(DESTDIR)$(shlibdir)/libdconf-dbus-1.so ++ ln -fs libdconf-dbus-1.so.0 $(DESTDIR)$(shlibdir)/libdconf-dbus-1.so + + uninstall-hook: + rm -f $(DESTDIR)$(shlibdir)/libdconf-dbus-1.so.0 diff --git a/devel/dconf/files/patch-editor_Makefile.in b/devel/dconf/files/patch-editor_Makefile.in new file mode 100644 index 000000000..f9935dd33 --- /dev/null +++ b/devel/dconf/files/patch-editor_Makefile.in @@ -0,0 +1,20 @@ +--- editor/Makefile.orig.in 2013-03-26 19:20:12.623348896 +0000 ++++ editor/Makefile.in 2013-03-26 19:21:40.077341977 +0000 +@@ -72,7 +72,7 @@ + dconf_editor-dconf-view.$(OBJEXT) + dconf_editor_OBJECTS = $(am_dconf_editor_OBJECTS) + am__DEPENDENCIES_1 = +-dconf_editor_DEPENDENCIES = ../client/libdconf.so.1 \ ++dconf_editor_DEPENDENCIES = -ldconf \ + $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) + dconf_editor_LINK = $(CCLD) $(dconf_editor_CFLAGS) $(CFLAGS) \ +@@ -297,7 +297,7 @@ + INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/client + 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 \ ++ -ldconf \ + $(gtk_LIBS) \ + $(gee_LIBS) \ + $(gmodule_LIBS) \ diff --git a/devel/dconf/files/patch-editor_dconf-editor.vala b/devel/dconf/files/patch-editor_dconf-editor.vala new file mode 100644 index 000000000..3c03fa220 --- /dev/null +++ b/devel/dconf/files/patch-editor_dconf-editor.vala @@ -0,0 +1,157 @@ +--- editor/dconf-editor.vala.orig 2013-05-01 21:48:10.000000000 +0000 ++++ editor/dconf-editor.vala 2013-05-01 21:50:26.000000000 +0000 +@@ -5,6 +5,10 @@ + private Settings settings; + private Gtk.Builder ui; + private Gtk.ApplicationWindow window; ++ private int window_width = 0; ++ private int window_height = 0; ++ private bool window_is_maximized = false; ++ private bool window_is_fullscreen = false; + private Gtk.TreeView dir_tree_view; + private Gtk.TreeView key_tree_view; + private Gtk.Grid key_info_grid; +@@ -72,8 +76,10 @@ + } + set_app_menu((MenuModel)menu_ui.get_object("menu")); + +- window.set_default_size (settings.get_int ("width"), settings.get_int ("height")); +- if (settings.get_boolean ("maximized")) ++ window.set_default_size (settings.get_int ("window-width"), settings.get_int ("window-height")); ++ if (settings.get_boolean ("window-is-fullscreen")) ++ window.fullscreen (); ++ else if (settings.get_boolean ("window-is-maximized")) + window.maximize (); + + dir_tree_view = new DConfDirView(); +@@ -124,6 +130,15 @@ + window.present(); + } + ++ protected override void shutdown () ++ { ++ base.shutdown(); ++ settings.set_int ("window-width", window_width); ++ settings.set_int ("window-height", window_height); ++ settings.set_boolean ("window-is-maximized", window_is_maximized); ++ settings.set_boolean ("window-is-fullscreen", window_is_fullscreen); ++ } ++ + private void dir_selected_cb() + { + KeyModel? key_model = null; +@@ -201,11 +216,16 @@ + { + if (selected_key.schema != null) + { ++ var gettext_domain = selected_key.schema.gettext_domain; + schema_name = selected_key.schema.schema.id; + if (selected_key.schema.summary != null) + summary = selected_key.schema.summary; ++ if (gettext_domain != null && summary != "") ++ summary = dgettext(gettext_domain, summary); + if (selected_key.schema.description != null) + description = selected_key.schema.description; ++ if (gettext_domain != null && description != "") ++ description = dgettext(gettext_domain, description); + type = key_to_description(selected_key); + default_value = selected_key.schema.default_value.print(false); + } +@@ -236,10 +256,10 @@ + + private bool main_window_configure_event_cb (Gtk.Widget widget, Gdk.EventConfigure event) + { +- if (!settings.get_boolean ("maximized")) ++ if (!window_is_maximized && !window_is_fullscreen) + { +- settings.set_int ("width", event.width); +- settings.set_int ("height", event.height); ++ window_width = event.width; ++ window_height = event.height; + } + + return false; +@@ -248,10 +268,9 @@ + private bool main_window_window_state_event_cb (Gtk.Widget widget, Gdk.EventWindowState event) + { + if ((event.changed_mask & Gdk.WindowState.MAXIMIZED) != 0) +- { +- var is_maximized = (event.new_window_state & Gdk.WindowState.MAXIMIZED) != 0; +- settings.set_boolean ("maximized", is_maximized); +- } ++ window_is_maximized = (event.new_window_state & Gdk.WindowState.MAXIMIZED) != 0; ++ if ((event.changed_mask & Gdk.WindowState.FULLSCREEN) != 0) ++ window_is_fullscreen = (event.new_window_state & Gdk.WindowState.FULLSCREEN) != 0; + + return false; + } +@@ -266,6 +285,7 @@ + { + search_label.set_text(""); + ++ /* Get the current position in the tree */ + Gtk.TreeIter iter; + var key_iter = Gtk.TreeIter(); + var have_key_iter = false; +@@ -283,17 +303,31 @@ + else if (!model.get_iter_first(out iter)) + return; + ++ var on_first_directory = true; + do + { ++ /* Select next directory that matches */ + var dir = model.get_directory(iter); + if (!have_key_iter) ++ { + have_key_iter = dir.key_model.get_iter_first(out key_iter); ++ if (!on_first_directory && dir.name.index_of(search_entry.text) >= 0) ++ { ++ dir_tree_view.expand_to_path(model.get_path(iter)); ++ dir_tree_view.get_selection().select_iter(iter); ++ dir_tree_view.scroll_to_cell(model.get_path(iter), null, false, 0, 0); ++ return; ++ } ++ } ++ on_first_directory = false; ++ ++ /* Select next key that matches */ + if (have_key_iter) + { + do + { + var key = dir.key_model.get_key(key_iter); +- if (key.name.index_of (search_entry.text) >= 0) ++ if (key_matches(key, search_entry.text)) + { + dir_tree_view.expand_to_path(model.get_path(iter)); + dir_tree_view.get_selection().select_iter(iter); +@@ -310,6 +344,28 @@ + search_label.set_text(_("Not found")); + } + ++ private bool key_matches (Key key, string text) ++ { ++ /* Check key name */ ++ if (key.name.index_of(text) >= 0) ++ return true; ++ ++ /* Check key schema (description) */ ++ if (key.schema != null) ++ { ++ if (key.schema.summary != null && key.schema.summary.index_of(text) >= 0) ++ return true; ++ if (key.schema.description != null && key.schema.description.index_of(text) >= 0) ++ return true; ++ } ++ ++ /* Check key value */ ++ if (key.value.is_of_type(VariantType.STRING) && key.value.get_string().index_of(text) >= 0) ++ return true; ++ ++ return false; ++ } ++ + private bool get_next_iter(ref Gtk.TreeIter iter) + { + /* Search children next */ diff --git a/devel/dconf/files/patch-editor_dconf-model.vala b/devel/dconf/files/patch-editor_dconf-model.vala new file mode 100644 index 000000000..58077d674 --- /dev/null +++ b/devel/dconf/files/patch-editor_dconf-model.vala @@ -0,0 +1,212 @@ +--- editor/dconf-model.vala.orig 2013-05-01 21:47:59.000000000 +0000 ++++ editor/dconf-model.vala 2013-05-01 21:50:26.000000000 +0000 +@@ -254,7 +254,7 @@ + string[] tokens = path.split("/", 2); + string name = tokens[0]; + +- Directory directory = get_child(name); ++ var directory = get_child(name); + directory.load_schema(schema, tokens[1]); + } + } +@@ -341,8 +341,10 @@ + return (Key)iter.user_data; + } + +- public bool get_iter(ref Gtk.TreeIter iter, Gtk.TreePath path) ++ public bool get_iter(out Gtk.TreeIter iter, Gtk.TreePath path) + { ++ iter = Gtk.TreeIter(); ++ + if (path.get_depth() != 1) + return false; + +@@ -391,11 +393,14 @@ + return true; + } + +- public bool iter_children(ref Gtk.TreeIter iter, Gtk.TreeIter? parent) ++ public bool iter_children(out Gtk.TreeIter iter, Gtk.TreeIter? parent) + { ++ iter = Gtk.TreeIter(); ++ + if (parent != null || directory.keys.length() == 0) + return false; + set_iter(ref iter, directory.keys.nth_data(0)); ++ + return true; + } + +@@ -412,8 +417,10 @@ + return 0; + } + +- public bool iter_nth_child(ref Gtk.TreeIter iter, Gtk.TreeIter? parent, int n) ++ public bool iter_nth_child(out Gtk.TreeIter iter, Gtk.TreeIter? parent, int n) + { ++ iter = Gtk.TreeIter(); ++ + if (parent != null) + return false; + +@@ -423,8 +430,9 @@ + return true; + } + +- public bool iter_parent(ref Gtk.TreeIter iter, Gtk.TreeIter child) ++ public bool iter_parent(out Gtk.TreeIter iter, Gtk.TreeIter child) + { ++ iter = Gtk.TreeIter(); + return false; + } + +@@ -479,8 +487,10 @@ + return (SchemaValue)iter.user_data; + } + +- public bool get_iter(ref Gtk.TreeIter iter, Gtk.TreePath path) ++ public bool get_iter(out Gtk.TreeIter iter, Gtk.TreePath path) + { ++ iter = Gtk.TreeIter(); ++ + if (path.get_depth() != 1) + return false; + +@@ -513,11 +523,15 @@ + return true; + } + +- public bool iter_children(ref Gtk.TreeIter iter, Gtk.TreeIter? parent) ++ public bool iter_children(out Gtk.TreeIter iter, Gtk.TreeIter? parent) + { ++ iter = Gtk.TreeIter(); ++ + if (parent != null || schema_enum.values.length() == 0) + return false; ++ + set_iter(ref iter, schema_enum.values.nth_data(0)); ++ + return true; + } + +@@ -534,8 +548,10 @@ + return 0; + } + +- public bool iter_nth_child(ref Gtk.TreeIter iter, Gtk.TreeIter? parent, int n) ++ public bool iter_nth_child(out Gtk.TreeIter iter, Gtk.TreeIter? parent, int n) + { ++ iter = Gtk.TreeIter(); ++ + if (parent != null) + return false; + +@@ -545,8 +561,9 @@ + return true; + } + +- public bool iter_parent(ref Gtk.TreeIter iter, Gtk.TreeIter child) ++ public bool iter_parent(out Gtk.TreeIter iter, Gtk.TreeIter child) + { ++ iter = Gtk.TreeIter(); + return false; + } + +@@ -586,9 +603,14 @@ + schemas = new SchemaList(); + try + { +- foreach (var dir in GLib.Environment.get_system_data_dirs()) ++ var dirs = GLib.Environment.get_system_data_dirs(); ++ ++ /* Walk directories in reverse so the schemas in the ++ * directory which appears first in the XDG_DATA_DIRS are ++ * not overridden. */ ++ for (int i = dirs.length - 1; i >= 0; i--) + { +- var path = Path.build_filename (dir, "glib-2.0", "schemas", null); ++ var path = Path.build_filename (dirs[i], "glib-2.0", "schemas"); + if (File.new_for_path (path).query_exists ()) + schemas.load_directory (path); + } +@@ -601,7 +623,7 @@ + } + + /* Add keys for the values in the schemas */ +- foreach (var schema in schemas.schemas) ++ foreach (var schema in schemas.schemas.get_values()) + root.load_schema(schema, schema.path[1:schema.path.length]); + } + +@@ -639,8 +661,10 @@ + return (Directory)iter.user_data; + } + +- public bool get_iter(ref Gtk.TreeIter iter, Gtk.TreePath path) ++ public bool get_iter(out Gtk.TreeIter iter, Gtk.TreePath path) + { ++ iter = Gtk.TreeIter(); ++ + if (!iter_nth_child(out iter, null, path.get_indices()[0])) + return false; + +@@ -672,19 +696,23 @@ + + public bool iter_next(ref Gtk.TreeIter iter) + { +- Directory directory = get_directory(iter); ++ var directory = get_directory(iter); + if (directory.index >= directory.parent.children.length() - 1) + return false; + set_iter(ref iter, directory.parent.children.nth_data(directory.index+1)); ++ + return true; + } + +- public bool iter_children(ref Gtk.TreeIter iter, Gtk.TreeIter? parent) ++ public bool iter_children(out Gtk.TreeIter iter, Gtk.TreeIter? parent) + { +- Directory directory = get_directory(parent); ++ iter = Gtk.TreeIter(); ++ ++ var directory = get_directory(parent); + if (directory.children.length() == 0) + return false; + set_iter(ref iter, directory.children.nth_data(0)); ++ + return true; + } + +@@ -698,21 +726,28 @@ + return (int) get_directory(iter).children.length(); + } + +- public bool iter_nth_child(ref Gtk.TreeIter iter, Gtk.TreeIter? parent, int n) ++ public bool iter_nth_child(out Gtk.TreeIter iter, Gtk.TreeIter? parent, int n) + { +- Directory directory = get_directory(parent); ++ iter = Gtk.TreeIter(); ++ ++ var directory = get_directory(parent); + if (n >= directory.children.length()) + return false; + set_iter(ref iter, directory.children.nth_data(n)); ++ + return true; + } + +- public bool iter_parent(ref Gtk.TreeIter iter, Gtk.TreeIter child) ++ public bool iter_parent(out Gtk.TreeIter iter, Gtk.TreeIter child) + { +- Directory directory = get_directory(child); ++ iter = Gtk.TreeIter(); ++ ++ var directory = get_directory(child); + if (directory.parent == root) + return false; ++ + set_iter(ref iter, directory.parent); ++ + return true; + } + diff --git a/devel/dconf/files/patch-editor_dconf-schema.vala b/devel/dconf/files/patch-editor_dconf-schema.vala new file mode 100644 index 000000000..2c624560c --- /dev/null +++ b/devel/dconf/files/patch-editor_dconf-schema.vala @@ -0,0 +1,129 @@ +--- editor/dconf-schema.vala.orig 2013-05-01 21:48:04.000000000 +0000 ++++ editor/dconf-schema.vala 2013-05-01 21:50:26.000000000 +0000 +@@ -44,7 +44,7 @@ + { + try + { +- default_value = Variant.parse(new VariantType(type), child->children->content); ++ default_value = Variant.parse(new VariantType(type), child->get_content()); + } + catch (VariantParseError e) + { +@@ -52,9 +52,9 @@ + } + } + else if (child->name == "summary") +- summary = child->children == null ? "" : child->children->content; ++ summary = child->get_content(); + else if (child->name == "description") +- description = child->children == null ? "" : child->children->content; ++ description = child->get_content(); + else if (child->name == "range") + range = new SchemaValueRange.from_xml(type, child); + else if (child->name == "choices") +@@ -345,7 +345,7 @@ + + public class SchemaList + { +- public GLib.List<Schema> schemas = new GLib.List<Schema>(); ++ public GLib.HashTable<string, Schema> schemas = new GLib.HashTable<string, Schema>(str_hash, str_equal); + public GLib.HashTable<string, SchemaKey> keys = new GLib.HashTable<string, SchemaKey>(str_hash, str_equal); + public GLib.HashTable<string, SchemaEnum> enums = new GLib.HashTable<string, SchemaEnum>(str_hash, str_equal); + public GLib.HashTable<string, SchemaFlags> flags = new GLib.HashTable<string, SchemaFlags>(str_hash, str_equal); +@@ -385,7 +385,7 @@ + string full_name = schema.path + key.name; + keys.insert(full_name, key); + } +- schemas.append(schema); ++ schemas.insert(schema.id, schema); + } + else if (node->name == "enum") + { +@@ -407,19 +407,79 @@ + delete doc; + } + ++ public void parse_override(string path) ++ { ++ var keyfile = new KeyFile(); ++ try ++ { ++ keyfile.load_from_file(path, KeyFileFlags.NONE); ++ } ++ catch (Error e) ++ { ++ warning("Failed to load override file %s: %s", path, e.message); ++ return; ++ } ++ ++ foreach (var group in keyfile.get_groups()) ++ { ++ var schema = schemas.lookup(group); ++ if (schema == null) ++ continue; ++ ++ string[] keys; ++ try { keys = keyfile.get_keys(group); } catch (Error e) { continue; } ++ ++ foreach (var key_name in keys) ++ { ++ string value; ++ try { value = keyfile.get_value(group, key_name); } catch (Error e) { continue; } ++ ++ var key = schema.keys.lookup (key_name); ++ if (key == null) ++ continue; ++ ++ Variant default_value; ++ try ++ { ++ default_value = Variant.parse(new VariantType(key.type), value); ++ } ++ catch (VariantParseError e) ++ { ++ // ... ++ continue; ++ } ++ ++ key.default_value = default_value; ++ } ++ } ++ } ++ + public void load_directory(string dir) throws Error + { +- File directory = File.new_for_path(dir); ++ var directory = File.new_for_path(dir); ++ + var i = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0, null); +- FileInfo info; +- while ((info = i.next_file (null)) != null) { +- string name = info.get_name(); ++ while (true) ++ { ++ var info = i.next_file (null); ++ if (info == null) ++ break; ++ var name = info.get_name(); + +- if (!name.has_suffix(".gschema.xml") && !name.has_suffix(".enums.xml")) +- continue; ++ if (name.has_suffix(".gschema.xml") || name.has_suffix(".enums.xml")) ++ parse_file(Path.build_filename(dir, name, null)); ++ } ++ ++ i = directory.enumerate_children (FileAttribute.STANDARD_NAME, 0, null); ++ while (true) ++ { ++ var info = i.next_file (null); ++ if (info == null) ++ break; ++ var name = info.get_name(); + +- string path = Path.build_filename(dir, name, null); +- parse_file(path); ++ if (name.has_suffix(".override")) ++ parse_override(Path.build_filename(dir, name, null)); + } + } + } diff --git a/devel/dconf/files/patch-editors_dconf-view.vala b/devel/dconf/files/patch-editors_dconf-view.vala new file mode 100644 index 000000000..70998f181 --- /dev/null +++ b/devel/dconf/files/patch-editors_dconf-view.vala @@ -0,0 +1,11 @@ +--- editor/dconf-view.vala.orig 2013-05-01 21:48:19.000000000 +0000 ++++ editor/dconf-view.vala 2013-05-01 21:50:26.000000000 +0000 +@@ -270,7 +270,7 @@ + + private void spin_edited_cb(Gtk.CellRendererText renderer, string path, string text) + { +- Key key = get_key_from_path(path); ++ var key = get_key_from_path(path); + switch (key.type_string) + { + case "y": diff --git a/devel/dconf/files/patch-test_Makefile.am b/devel/dconf/files/patch-test_Makefile.am new file mode 100644 index 000000000..a3288f9e6 --- /dev/null +++ b/devel/dconf/files/patch-test_Makefile.am @@ -0,0 +1,21 @@ +--- tests/Makefile.orig.am 2013-03-26 21:34:03.467621533 +0100 ++++ tests/Makefile.am 2013-03-26 21:34:43.396618710 +0100 +@@ -28,8 +28,7 @@ + shm_CFLAGS = $(glib_CFLAGS) + shm_LDADD = \ + ../shm/libdconf-shm.a \ +- $(glib_LIBS) \ +- -ldl ++ $(glib_LIBS) + shm_SOURCES = \ + shm.c \ + tmpdir.h \ +@@ -79,7 +78,7 @@ + ../common/libdconf-common.a \ + libdconf-mock.a \ + $(glib_LIBS) \ +- -ldl -lm ++ -lm + engine_SOURCES = engine.c + EXTRA_DIST += \ + profile/broken-profile \ diff --git a/devel/dconf/files/patch-test_Makefile.in b/devel/dconf/files/patch-test_Makefile.in new file mode 100644 index 000000000..cdd5f47a0 --- /dev/null +++ b/devel/dconf/files/patch-test_Makefile.in @@ -0,0 +1,21 @@ +--- tests/Makefile.orig.in 2013-03-26 21:34:10.705623412 +0100 ++++ tests/Makefile.in 2013-03-26 21:34:54.686617478 +0100 +@@ -349,8 +349,7 @@ + shm_CFLAGS = $(glib_CFLAGS) + shm_LDADD = \ + ../shm/libdconf-shm.a \ +- $(glib_LIBS) \ +- -ldl ++ $(glib_LIBS) + + shm_SOURCES = \ + shm.c \ +@@ -395,7 +394,7 @@ + ../common/libdconf-common.a \ + libdconf-mock.a \ + $(glib_LIBS) \ +- -ldl -lm ++ -lm + + engine_SOURCES = engine.c + client_CFLAGS = $(gio_CFLAGS) -DSRCDIR=\"$(abs_srcdir)\" |