1 diff --git a/proxy/gnome/gproxyresolvergnome.c b/proxy/gnome/gproxyresolvergnome.c
2 index 50b63cd..4364116 100644
3 --- a/proxy/gnome/gproxyresolvergnome.c
4 +++ b/proxy/gnome/gproxyresolvergnome.c
7 resolver->base_resolver = g_simple_proxy_resolver_new (NULL, NULL);
9 - resolver->proxy_settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
11 + GSettingsSchemaSource *schema_source;
12 + GSettingsSchema *schema;
13 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
14 + g_settings_schema_source_get_default(),
16 + schema = g_settings_schema_source_lookup(schema_source,
17 + GNOME_PROXY_SETTINGS_SCHEMA,
19 + resolver->proxy_settings = g_settings_new_full(schema, NULL, NULL);
20 + g_settings_schema_source_unref(schema_source);
21 + g_settings_schema_unref(schema);
23 g_signal_connect (resolver->proxy_settings, "changed",
24 G_CALLBACK (gsettings_changed), resolver);
25 - resolver->http_settings = g_settings_get_child (resolver->proxy_settings,
26 - GNOME_PROXY_HTTP_CHILD_SCHEMA);
28 + GSettingsSchemaSource *schema_source;
29 + GSettingsSchema *schema;
30 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
31 + g_settings_schema_source_get_default(),
33 + schema = g_settings_schema_source_lookup(schema_source,
34 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
36 + resolver->http_settings = g_settings_new_full(schema, NULL, NULL);
37 + g_settings_schema_source_unref(schema_source);
38 + g_settings_schema_unref(schema);
40 g_signal_connect (resolver->http_settings, "changed",
41 G_CALLBACK (gsettings_changed), resolver);
42 - resolver->https_settings = g_settings_get_child (resolver->proxy_settings,
43 - GNOME_PROXY_HTTPS_CHILD_SCHEMA);
45 + GSettingsSchemaSource *schema_source;
46 + GSettingsSchema *schema;
47 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
48 + g_settings_schema_source_get_default(),
50 + schema = g_settings_schema_source_lookup(schema_source,
51 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
53 + resolver->https_settings = g_settings_new_full(schema, NULL, NULL);
54 + g_settings_schema_source_unref(schema_source);
55 + g_settings_schema_unref(schema);
57 g_signal_connect (resolver->https_settings, "changed",
58 G_CALLBACK (gsettings_changed), resolver);
59 - resolver->ftp_settings = g_settings_get_child (resolver->proxy_settings,
60 - GNOME_PROXY_FTP_CHILD_SCHEMA);
62 + GSettingsSchemaSource *schema_source;
63 + GSettingsSchema *schema;
64 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
65 + g_settings_schema_source_get_default(),
67 + schema = g_settings_schema_source_lookup(schema_source,
68 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
70 + resolver->ftp_settings = g_settings_new_full(schema, NULL, NULL);
71 + g_settings_schema_source_unref(schema_source);
72 + g_settings_schema_unref(schema);
74 g_signal_connect (resolver->ftp_settings, "changed",
75 G_CALLBACK (gsettings_changed), resolver);
76 - resolver->socks_settings = g_settings_get_child (resolver->proxy_settings,
77 - GNOME_PROXY_SOCKS_CHILD_SCHEMA);
79 + GSettingsSchemaSource *schema_source;
80 + GSettingsSchema *schema;
81 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
82 + g_settings_schema_source_get_default(),
84 + schema = g_settings_schema_source_lookup(schema_source,
85 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
87 + resolver->socks_settings = g_settings_new_full(schema, NULL, NULL);
88 + g_settings_schema_source_unref(schema_source);
89 + g_settings_schema_unref(schema);
91 g_signal_connect (resolver->socks_settings, "changed",
92 G_CALLBACK (gsettings_changed), resolver);
94 diff --git a/proxy/tests/gnome.c b/proxy/tests/gnome.c
95 index f76b094..54751e3 100644
96 --- a/proxy/tests/gnome.c
97 +++ b/proxy/tests/gnome.c
100 GSettings *settings, *child;
102 - settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
104 + GSettingsSchemaSource *schema_source;
105 + GSettingsSchema *schema;
106 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
107 + g_settings_schema_source_get_default(),
109 + schema = g_settings_schema_source_lookup(schema_source,
110 + GNOME_PROXY_SETTINGS_SCHEMA,
112 + settings = g_settings_new_full(schema, NULL, NULL);
113 + g_settings_schema_source_unref(schema_source);
114 + g_settings_schema_unref(schema);
116 g_settings_reset (settings, GNOME_PROXY_MODE_KEY);
117 g_settings_reset (settings, GNOME_PROXY_USE_SAME_PROXY_KEY);
119 - child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
121 + GSettingsSchemaSource *schema_source;
122 + GSettingsSchema *schema;
123 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
124 + g_settings_schema_source_get_default(),
126 + schema = g_settings_schema_source_lookup(schema_source,
127 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
129 + child = g_settings_new_full(schema, NULL, NULL);
130 + g_settings_schema_source_unref(schema_source);
131 + g_settings_schema_unref(schema);
133 g_settings_reset (child, GNOME_PROXY_HTTP_HOST_KEY);
134 g_settings_reset (child, GNOME_PROXY_HTTP_PORT_KEY);
135 g_object_unref (child);
137 - child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
139 + GSettingsSchemaSource *schema_source;
140 + GSettingsSchema *schema;
141 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
142 + g_settings_schema_source_get_default(),
144 + schema = g_settings_schema_source_lookup(schema_source,
145 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
147 + child = g_settings_new_full(schema, NULL, NULL);
148 + g_settings_schema_source_unref(schema_source);
149 + g_settings_schema_unref(schema);
151 g_settings_reset (child, GNOME_PROXY_HTTPS_HOST_KEY);
152 g_settings_reset (child, GNOME_PROXY_HTTPS_PORT_KEY);
153 g_object_unref (child);
155 - child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
157 + GSettingsSchemaSource *schema_source;
158 + GSettingsSchema *schema;
159 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
160 + g_settings_schema_source_get_default(),
162 + schema = g_settings_schema_source_lookup(schema_source,
163 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
165 + child = g_settings_new_full(schema, NULL, NULL);
166 + g_settings_schema_source_unref(schema_source);
167 + g_settings_schema_unref(schema);
169 g_settings_reset (child, GNOME_PROXY_FTP_HOST_KEY);
170 g_settings_reset (child, GNOME_PROXY_FTP_PORT_KEY);
171 g_object_unref (child);
173 - child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
175 + GSettingsSchemaSource *schema_source;
176 + GSettingsSchema *schema;
177 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
178 + g_settings_schema_source_get_default(),
180 + schema = g_settings_schema_source_lookup(schema_source,
181 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
183 + child = g_settings_new_full(schema, NULL, NULL);
184 + g_settings_schema_source_unref(schema_source);
185 + g_settings_schema_unref(schema);
187 g_settings_reset (child, GNOME_PROXY_SOCKS_HOST_KEY);
188 g_settings_reset (child, GNOME_PROXY_SOCKS_PORT_KEY);
189 g_object_unref (child);
192 GSettings *settings, *child;
194 - settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
196 + GSettingsSchemaSource *schema_source;
197 + GSettingsSchema *schema;
198 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
199 + g_settings_schema_source_get_default(),
201 + schema = g_settings_schema_source_lookup(schema_source,
202 + GNOME_PROXY_SETTINGS_SCHEMA,
204 + settings = g_settings_new_full(schema, NULL, NULL);
205 + g_settings_schema_source_unref(schema_source);
206 + g_settings_schema_unref(schema);
208 g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
209 g_settings_set_boolean (settings, GNOME_PROXY_USE_SAME_PROXY_KEY, TRUE);
211 - child = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
213 + GSettingsSchemaSource *schema_source;
214 + GSettingsSchema *schema;
215 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
216 + g_settings_schema_source_get_default(),
218 + schema = g_settings_schema_source_lookup(schema_source,
219 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
221 + child = g_settings_new_full(schema, NULL, NULL);
222 + g_settings_schema_source_unref(schema_source);
223 + g_settings_schema_unref(schema);
225 g_settings_set_string (child, GNOME_PROXY_HTTP_HOST_KEY, "proxy.example.com");
226 g_settings_set_int (child, GNOME_PROXY_HTTP_PORT_KEY, 8080);
227 g_object_unref (child);
229 - child = g_settings_get_child (settings, GNOME_PROXY_HTTPS_CHILD_SCHEMA);
231 + GSettingsSchemaSource *schema_source;
232 + GSettingsSchema *schema;
233 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
234 + g_settings_schema_source_get_default(),
236 + schema = g_settings_schema_source_lookup(schema_source,
237 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTPS_CHILD_SCHEMA,
239 + child = g_settings_new_full(schema, NULL, NULL);
240 + g_settings_schema_source_unref(schema_source);
241 + g_settings_schema_unref(schema);
243 g_settings_set_string (child, GNOME_PROXY_HTTPS_HOST_KEY, "proxy-s.example.com");
244 g_settings_set_int (child, GNOME_PROXY_HTTPS_PORT_KEY, 7070);
245 g_object_unref (child);
247 - child = g_settings_get_child (settings, GNOME_PROXY_FTP_CHILD_SCHEMA);
249 + GSettingsSchemaSource *schema_source;
250 + GSettingsSchema *schema;
251 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
252 + g_settings_schema_source_get_default(),
254 + schema = g_settings_schema_source_lookup(schema_source,
255 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_FTP_CHILD_SCHEMA,
257 + child = g_settings_new_full(schema, NULL, NULL);
258 + g_settings_schema_source_unref(schema_source);
259 + g_settings_schema_unref(schema);
261 g_settings_set_string (child, GNOME_PROXY_FTP_HOST_KEY, "proxy-f.example.com");
262 g_settings_set_int (child, GNOME_PROXY_FTP_PORT_KEY, 6060);
263 g_object_unref (child);
264 @@ -119,12 +227,36 @@
265 GSettings *settings, *child;
266 const gchar *ignore_hosts[2] = { "127.0.0.1", NULL };
268 - settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
270 + GSettingsSchemaSource *schema_source;
271 + GSettingsSchema *schema;
272 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
273 + g_settings_schema_source_get_default(),
275 + schema = g_settings_schema_source_lookup(schema_source,
276 + GNOME_PROXY_SETTINGS_SCHEMA,
278 + settings = g_settings_new_full(schema, NULL, NULL);
279 + g_settings_schema_source_unref(schema_source);
280 + g_settings_schema_unref(schema);
282 g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
283 g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
284 "@as", g_variant_new_strv (ignore_hosts, -1));
286 - child = g_settings_get_child (settings, GNOME_PROXY_SOCKS_CHILD_SCHEMA);
288 + GSettingsSchemaSource *schema_source;
289 + GSettingsSchema *schema;
290 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
291 + g_settings_schema_source_get_default(),
293 + schema = g_settings_schema_source_lookup(schema_source,
294 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_SOCKS_CHILD_SCHEMA,
296 + child = g_settings_new_full(schema, NULL, NULL);
297 + g_settings_schema_source_unref(schema_source);
298 + g_settings_schema_unref(schema);
300 g_settings_set_string (child, GNOME_PROXY_SOCKS_HOST_KEY, "proxy.example.com");
301 g_settings_set_int (child, GNOME_PROXY_SOCKS_PORT_KEY, 1234);
302 g_object_unref (child);
303 @@ -139,12 +271,36 @@
305 GSettings *settings, *http;
307 - settings = g_settings_new (GNOME_PROXY_SETTINGS_SCHEMA);
309 + GSettingsSchemaSource *schema_source;
310 + GSettingsSchema *schema;
311 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
312 + g_settings_schema_source_get_default(),
314 + schema = g_settings_schema_source_lookup(schema_source,
315 + GNOME_PROXY_SETTINGS_SCHEMA,
317 + settings = g_settings_new_full(schema, NULL, NULL);
318 + g_settings_schema_source_unref(schema_source);
319 + g_settings_schema_unref(schema);
321 g_settings_set_enum (settings, GNOME_PROXY_MODE_KEY, G_DESKTOP_PROXY_MODE_MANUAL);
322 g_settings_set (settings, GNOME_PROXY_IGNORE_HOSTS_KEY,
323 "@as", g_variant_new_strv (ignore_hosts, n_ignore_hosts));
325 - http = g_settings_get_child (settings, GNOME_PROXY_HTTP_CHILD_SCHEMA);
327 + GSettingsSchemaSource *schema_source;
328 + GSettingsSchema *schema;
329 + schema_source = g_settings_schema_source_new_from_directory("@gds_gsettings_path@",
330 + g_settings_schema_source_get_default(),
332 + schema = g_settings_schema_source_lookup(schema_source,
333 + GNOME_PROXY_SETTINGS_SCHEMA "." GNOME_PROXY_HTTP_CHILD_SCHEMA,
335 + http = g_settings_new_full(schema, NULL, NULL);
336 + g_settings_schema_source_unref(schema_source);
337 + g_settings_schema_unref(schema);
339 g_settings_set_string (http, GNOME_PROXY_HTTP_HOST_KEY, "localhost");
340 g_settings_set_int (http, GNOME_PROXY_HTTP_PORT_KEY, 8080);