~ubuntu-branches/ubuntu/oneiric/gnome-panel/oneiric

« back to all changes in this revision

Viewing changes to libpanel-applet/panel-applet-gconf.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher, Sebastien Bacher, Jeremy Bicha
  • Date: 2011-05-30 11:04:49 UTC
  • mfrom: (1.13.10 upstream) (2.2.5 experimental)
  • Revision ID: james.westby@ubuntu.com-20110530110449-hinl17kxkcefjw6x
Tags: 1:3.0.2-0ubuntu1
[ Sebastien Bacher ]
* New upstream version
* debian/control.in:
  - the new libgweather version is in oneiric, use it
  - drop the python and python-gconf depends, 
    they were added for gnome-panel-add which is still using gconf and buggy
* debian/gnome-panel-data.install:
  - don't install the apport hook, it's only getting gconf datas which 
    doesn't work since gnome-panel uses gsettings
* debian/patches/90_build_fixes.patch:
  - restore build fix from git not applied in the new serie
* debian/patches/01_panel_submenus.patch:
  - don't take that Debian diff, the .menus use the upstream naming in Ubuntu
* debian/patches/06_no_resize_grip.patch:
  - dropped, the issue is fixed in the new version
* debian/patches/50_fix-potfiles.patch:
  - dropped, the issue is fixed in the new version
* debian/watch:
  - track unstable series as well

Drop those delta, since gnome-panel is not the default Ubuntu session now we
can go back to an experience closer to the upstream one: 
* debian/control.in:
  - drop the indicators recommends, unity-2d is the ubuntu fallback session
    so we can get back to use an upstream config for gnome-panel and reduce
    the delta we carry
* debian/patches/04_default_panel_config.patch:
  - don't modify the upstream layout
* debian/patches/05_no_session_delay.patch:
  - no need to tweak the upstream session to optimize it
* debian/patches/16_compiz_workspace_switcher.patch:
  - go back to the upstream switcher behaviour    
* debian/patches/25_dynamic_fusa_detection.patch:
  - not needed since we use the upstream layout, could be ported if someone
    is wanting to do the work though
* debian/patches/30_disable-initial-animation.patch, debian/rules:
  - drop the --disable-initial-animation, that was some login optimization
    but since it's not the default desktop you should go back to the 
    upstream behaviour

[ Jeremy Bicha ]   
* New upstream version
* Merge from Debian experimental, remaining Ubuntu changes:
* debian/control:
  - Recommends gnome-settings-daemon which has the timezone polkit service
* debian/rules:
  - Update translations template.
* debian/gnome-panel-data.install:
  - Install apport hook
  - Install the "About Ubuntu" menu item.
* debian/patches/01_layout.patch:
  - Disabled, Help & About Ubuntu don't fit as well in Gnome Panel 3
* debian/patches/01_panel_submenus.patch.
  - Dropped
* debian/patches/03_dnd_places_link.patch:
  - Disabled, when using Drag'n'Drop from Places menu, install a link launcher
    (.desktop file) instead of copying the entire directory.
* debian/patches/17_about-ubuntu-translation.patch:
  - List ubuntu-about.desktop for translation.
* debian/patches/40_unset_menuproxy.patch:
  - Make sure gnome-panel and the applets don't pick up menu proxies.
* debian/patches/50_fix-potfiles.patch
  - Fix i18n
* debian/patches/85_disable_shutdown_on_ltsp.patch:
  - Suppress the shutdown option in the panel if LTSP_CLIENT is set.
* debian/patches/71_change_bookmark_submenu_limit_value.patch
  - Dropped, picked up by Debian
* debian/patches/18_lockdown_lock_editor.patch:
* debian/patches/90_git_wnck_show_realize.patch:
* debian/patches/90_fix_linking_DSO_link.patch:
* debian/patches/91_gir_annotations.patch
* debian/patches/92_git_calendar_day.patch
* debian/patches/92_git_fix_applets_in_multiscreen.patch:
  - Dropped, applied upstream
* debian/watch:
  - watch unstable versions

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
#include "panel-applet-gconf.h"
28
28
 
 
29
/**
 
30
 * SECTION:gconf
 
31
 * @short_description: utility API to use GConf with applets.
 
32
 * @stability: Unstable
 
33
 *
 
34
 * The <function>panel_applet_gconf_*()</function> set of API provides
 
35
 * convenience functions to access GConf keys that are specific to an
 
36
 * applet instance.
 
37
 *
 
38
 * Keep in mind that it might be worth considering using <link
 
39
 * linkend="getting-started.settings">global settings</link> for your applet,
 
40
 * instead of settings specific to an instance.
 
41
 */
 
42
 
29
43
static GConfClient *
30
44
panel_applet_gconf_get_client (void)
31
45
{
37
51
        return client;
38
52
}
39
53
 
 
54
/**
 
55
 * panel_applet_gconf_get_full_key:
 
56
 * @applet: a #PanelApplet.
 
57
 * @key: a GConf key name.
 
58
 *
 
59
 * Returns the full GConf path of @key, in the per-instance GConf directory of
 
60
 * @applet. The string should be freed by the caller.
 
61
 *
 
62
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
63
 **/
40
64
gchar *
41
65
panel_applet_gconf_get_full_key (PanelApplet *applet,
42
66
                                 const gchar *key)
58
82
        return full_key;
59
83
}
60
84
 
 
85
/**
 
86
 * panel_applet_gconf_set_bool:
 
87
 * @applet: a #PanelApplet.
 
88
 * @key: a GConf key name.
 
89
 * @the_bool: new value for @key.
 
90
 * @error: a #GError, or %NULL.
 
91
 *
 
92
 * Convenience wrapper around gconf_client_set_bool() to update @key in the
 
93
 * per-instance GConf directory of @applet.
 
94
 *
 
95
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
96
 **/
61
97
void
62
98
panel_applet_gconf_set_bool (PanelApplet  *applet,
63
99
                             const gchar  *key,
64
100
                             gboolean      the_bool,
65
 
                             GError      **opt_error)
 
101
                             GError      **error)
66
102
{
67
103
        GConfClient  *client;
68
104
        gchar        *full_key;
69
 
        GError      **error = NULL;
70
 
        GError       *our_error = NULL;
71
105
 
72
106
        g_return_if_fail (PANEL_IS_APPLET (applet));
73
107
 
74
 
        if (opt_error)
75
 
                error = opt_error;
76
 
        else
77
 
                error = &our_error;
78
 
 
79
108
        full_key = panel_applet_gconf_get_full_key (applet, key);
80
109
 
81
110
        client = panel_applet_gconf_get_client ();
83
112
        gconf_client_set_bool (client, full_key, the_bool, error);
84
113
 
85
114
        g_free (full_key);
86
 
 
87
 
        if (!opt_error && our_error) {
88
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
89
 
                g_error_free (our_error);
90
 
        }
91
115
}
92
116
 
 
117
/**
 
118
 * panel_applet_gconf_set_int:
 
119
 * @applet: a #PanelApplet.
 
120
 * @key: a GConf key name.
 
121
 * @the_int: new value for @key.
 
122
 * @error: a #GError, or %NULL.
 
123
 *
 
124
 * Convenience wrapper around gconf_client_set_int() to update @key in the
 
125
 * per-instance GConf directory of @applet.
 
126
 *
 
127
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
128
 **/
93
129
void
94
130
panel_applet_gconf_set_int (PanelApplet  *applet,
95
131
                            const gchar  *key,
96
132
                            gint          the_int,
97
 
                            GError      **opt_error)
 
133
                            GError      **error)
98
134
{
99
135
        GConfClient  *client;
100
136
        gchar        *full_key;
101
 
        GError      **error = NULL;
102
 
        GError       *our_error = NULL;
103
137
 
104
138
        g_return_if_fail (PANEL_IS_APPLET (applet));
105
139
 
106
 
        if (opt_error)
107
 
                error = opt_error;
108
 
        else
109
 
                error = &our_error;
110
 
 
111
140
        full_key = panel_applet_gconf_get_full_key (applet, key);
112
141
 
113
142
        client = panel_applet_gconf_get_client ();
115
144
        gconf_client_set_int (client, full_key, the_int, error);
116
145
 
117
146
        g_free (full_key);
118
 
 
119
 
        if (!opt_error && our_error) {
120
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
121
 
                g_error_free (our_error);
122
 
        }
123
147
}
124
148
 
 
149
/**
 
150
 * panel_applet_gconf_set_string:
 
151
 * @applet: a #PanelApplet.
 
152
 * @key: a GConf key name.
 
153
 * @the_string: new value for @key.
 
154
 * @error: a #GError, or %NULL.
 
155
 *
 
156
 * Convenience wrapper around gconf_client_set_string() to update @key in the
 
157
 * per-instance GConf directory of @applet.
 
158
 *
 
159
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
160
 **/
125
161
void
126
162
panel_applet_gconf_set_string (PanelApplet  *applet,
127
163
                               const gchar  *key,
128
164
                               const gchar  *the_string,
129
 
                               GError      **opt_error)
 
165
                               GError      **error)
130
166
{
131
167
        GConfClient  *client;
132
168
        gchar        *full_key;
133
 
        GError      **error = NULL;
134
 
        GError       *our_error = NULL;
135
169
 
136
170
        g_return_if_fail (PANEL_IS_APPLET (applet));
137
171
 
138
 
        if (opt_error)
139
 
                error = opt_error;
140
 
        else
141
 
                error = &our_error;
142
 
 
143
172
        full_key = panel_applet_gconf_get_full_key (applet, key);
144
173
 
145
174
        client = panel_applet_gconf_get_client ();
147
176
        gconf_client_set_string (client, full_key, the_string, error);
148
177
 
149
178
        g_free (full_key);
150
 
 
151
 
        if (!opt_error && our_error) {
152
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
153
 
                g_error_free (our_error);
154
 
        }
155
179
}
156
180
 
 
181
/**
 
182
 * panel_applet_gconf_set_float:
 
183
 * @applet: a #PanelApplet.
 
184
 * @key: a GConf key name.
 
185
 * @the_float: new value for @key.
 
186
 * @error: a #GError, or %NULL.
 
187
 *
 
188
 * Convenience wrapper around gconf_client_set_float() to update @key in the
 
189
 * per-instance GConf directory of @applet.
 
190
 *
 
191
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
192
 **/
157
193
void
158
194
panel_applet_gconf_set_float (PanelApplet  *applet,
159
195
                              const gchar  *key,
160
196
                              gdouble       the_float,
161
 
                              GError      **opt_error)
 
197
                              GError      **error)
162
198
{
163
199
        GConfClient  *client;
164
200
        gchar        *full_key;
165
 
        GError      **error = NULL;
166
 
        GError       *our_error = NULL;
167
201
 
168
202
        g_return_if_fail (PANEL_IS_APPLET (applet));
169
203
 
170
 
        if (opt_error)
171
 
                error = opt_error;
172
 
        else
173
 
                error = &our_error;
174
 
 
175
204
        full_key = panel_applet_gconf_get_full_key (applet, key);
176
205
 
177
206
        client = panel_applet_gconf_get_client ();
179
208
        gconf_client_set_float (client, full_key, the_float, error);
180
209
 
181
210
        g_free (full_key);
182
 
 
183
 
        if (!opt_error && our_error) {
184
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
185
 
                g_error_free (our_error);
186
 
        }
187
211
}
188
212
 
 
213
/**
 
214
 * panel_applet_gconf_set_list:
 
215
 * @applet: a #PanelApplet.
 
216
 * @key: a GConf key name.
 
217
 * @list_type: type of items in @list.
 
218
 * @list: new value for @key.
 
219
 * @error: a #GError, or %NULL.
 
220
 *
 
221
 * Convenience wrapper around gconf_client_set_list() to update @key in the
 
222
 * per-instance GConf directory of @applet.
 
223
 *
 
224
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
225
 **/
189
226
void
190
227
panel_applet_gconf_set_list (PanelApplet     *applet,
191
228
                             const gchar     *key,
192
229
                             GConfValueType   list_type,
193
230
                             GSList          *list,
194
 
                             GError         **opt_error)
 
231
                             GError         **error)
195
232
{
196
233
        GConfClient  *client;
197
234
        gchar        *full_key;
198
 
        GError      **error = NULL;
199
 
        GError       *our_error = NULL;
200
235
 
201
236
        g_return_if_fail (PANEL_IS_APPLET (applet));
202
237
 
203
 
        if (opt_error)
204
 
                error = opt_error;
205
 
        else
206
 
                error = &our_error;
207
 
 
208
238
        full_key = panel_applet_gconf_get_full_key (applet, key);
209
239
 
210
240
        client = panel_applet_gconf_get_client ();
212
242
        gconf_client_set_list (client, full_key, list_type, list, error);
213
243
 
214
244
        g_free (full_key);
215
 
 
216
 
        if (!opt_error && our_error) {
217
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
218
 
                g_error_free (our_error);
219
 
        }
220
245
}
221
246
 
 
247
/**
 
248
 * panel_applet_gconf_set_value:
 
249
 * @applet: a #PanelApplet.
 
250
 * @key: a GConf key name.
 
251
 * @value: new value for @key.
 
252
 * @error: a #GError, or %NULL.
 
253
 *
 
254
 * Convenience wrapper around gconf_client_set_value() to update @key in the
 
255
 * per-instance GConf directory of @applet.
 
256
 *
 
257
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
258
 **/
222
259
void
223
260
panel_applet_gconf_set_value (PanelApplet  *applet,
224
261
                              const gchar  *key,
225
262
                              GConfValue   *value,
226
 
                              GError      **opt_error)
 
263
                              GError      **error)
227
264
{
228
265
        GConfClient  *client;
229
266
        gchar        *full_key;
230
 
        GError      **error = NULL;
231
 
        GError       *our_error = NULL;
232
267
 
233
268
        g_return_if_fail (PANEL_IS_APPLET (applet));
234
269
 
235
 
        if (opt_error)
236
 
                error = opt_error;
237
 
        else
238
 
                error = &our_error;
239
 
 
240
270
        full_key = panel_applet_gconf_get_full_key (applet, key);
241
271
 
242
272
        client = panel_applet_gconf_get_client ();
244
274
        gconf_client_set (client, full_key, value, error);
245
275
 
246
276
        g_free (full_key);
247
 
 
248
 
        if (!opt_error && our_error) {
249
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
250
 
                g_error_free (our_error);
251
 
        }
252
277
}
253
278
 
 
279
/**
 
280
 * panel_applet_gconf_get_bool:
 
281
 * @applet: a #PanelApplet.
 
282
 * @key: a GConf key name.
 
283
 * @error: a #GError, or %NULL.
 
284
 *
 
285
 * Convenience wrapper around gconf_client_get_bool() to get the value of @key
 
286
 * in the per-instance GConf directory of @applet.
 
287
 *
 
288
 * Returns: the value of @key.
 
289
 *
 
290
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
291
 **/
254
292
gboolean
255
293
panel_applet_gconf_get_bool (PanelApplet  *applet,
256
294
                             const gchar  *key,
257
 
                             GError      **opt_error)
 
295
                             GError      **error)
258
296
{
259
297
        GConfClient  *client;
260
298
        gchar        *full_key;
261
299
        gboolean      retval;
262
 
        GError      **error = NULL;
263
 
        GError       *our_error = NULL;
264
300
 
265
301
        g_return_val_if_fail (PANEL_IS_APPLET (applet), FALSE);
266
302
 
267
 
        if (opt_error)
268
 
                error = opt_error;
269
 
        else
270
 
                error = &our_error;
271
 
 
272
303
        full_key = panel_applet_gconf_get_full_key (applet, key);
273
304
 
274
305
        client = panel_applet_gconf_get_client ();
277
308
 
278
309
        g_free (full_key);
279
310
 
280
 
        if (!opt_error && our_error) {
281
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
282
 
                g_error_free (our_error);
283
 
        }
284
 
 
285
311
        return retval;
286
312
}
287
313
 
 
314
/**
 
315
 * panel_applet_gconf_get_int:
 
316
 * @applet: a #PanelApplet.
 
317
 * @key: a GConf key name.
 
318
 * @error: a #GError, or %NULL.
 
319
 *
 
320
 * Convenience wrapper around gconf_client_get_int() to get the value of @key
 
321
 * in the per-instance GConf directory of @applet.
 
322
 *
 
323
 * Returns: the value of @key.
 
324
 *
 
325
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
326
 **/
288
327
gint
289
328
panel_applet_gconf_get_int (PanelApplet  *applet,
290
329
                            const gchar  *key,
291
 
                            GError      **opt_error)
 
330
                            GError      **error)
292
331
{
293
332
        GConfClient  *client;
294
333
        gchar        *full_key;
295
334
        gint          retval;
296
 
        GError      **error = NULL;
297
 
        GError       *our_error = NULL;
298
335
 
299
336
        g_return_val_if_fail (PANEL_IS_APPLET (applet), -1);
300
337
 
301
 
        if (opt_error)
302
 
                error = opt_error;
303
 
        else
304
 
                error = &our_error;
305
 
 
306
338
        full_key = panel_applet_gconf_get_full_key (applet, key);
307
339
 
308
340
        client = panel_applet_gconf_get_client ();
311
343
 
312
344
        g_free (full_key);
313
345
 
314
 
        if (!opt_error && our_error) {
315
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
316
 
                g_error_free (our_error);
317
 
        }
318
 
 
319
346
        return retval;
320
347
}
321
348
 
 
349
/**
 
350
 * panel_applet_gconf_get_string:
 
351
 * @applet: a #PanelApplet.
 
352
 * @key: a GConf key name.
 
353
 * @error: a #GError, or %NULL.
 
354
 *
 
355
 * Convenience wrapper around gconf_client_get_string() to get the value of @key
 
356
 * in the per-instance GConf directory of @applet.
 
357
 *
 
358
 * Returns: the value of @key. The string should be freed by the caller.
 
359
 *
 
360
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
361
 **/
322
362
gchar *
323
363
panel_applet_gconf_get_string (PanelApplet  *applet,
324
364
                               const gchar  *key,
325
 
                               GError      **opt_error)
 
365
                               GError      **error)
326
366
{
327
367
        GConfClient  *client;
328
368
        gchar        *full_key;
329
369
        gchar        *retval;
330
 
        GError      **error = NULL;
331
 
        GError       *our_error = NULL;
332
370
 
333
371
        g_return_val_if_fail (PANEL_IS_APPLET (applet), NULL);
334
372
 
335
 
        if (opt_error)
336
 
                error = opt_error;
337
 
        else
338
 
                error = &our_error;
339
 
 
340
373
        full_key = panel_applet_gconf_get_full_key (applet, key);
341
374
 
342
375
        client = panel_applet_gconf_get_client ();
345
378
 
346
379
        g_free (full_key);
347
380
 
348
 
        if (!opt_error && our_error) {
349
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
350
 
                g_error_free (our_error);
351
 
        }
352
 
 
353
381
        return retval;
354
382
}
355
383
 
 
384
/**
 
385
 * panel_applet_gconf_get_float:
 
386
 * @applet: a #PanelApplet.
 
387
 * @key: a GConf key name.
 
388
 * @error: a #GError, or %NULL.
 
389
 *
 
390
 * Convenience wrapper around gconf_client_get_float() to get the value of @key
 
391
 * in the per-instance GConf directory of @applet.
 
392
 *
 
393
 * Returns: the value of @key.
 
394
 *
 
395
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
396
 **/
356
397
gdouble
357
398
panel_applet_gconf_get_float (PanelApplet  *applet,
358
399
                              const gchar  *key,
359
 
                              GError      **opt_error)
 
400
                              GError      **error)
360
401
{
361
402
        GConfClient  *client;
362
403
        gchar        *full_key;
363
404
        gdouble       retval;
364
 
        GError      **error = NULL;
365
 
        GError       *our_error = NULL;
366
405
 
367
406
        g_return_val_if_fail (PANEL_IS_APPLET (applet), 0.0);
368
407
 
369
 
        if (opt_error)
370
 
                error = opt_error;
371
 
        else
372
 
                error = &our_error;
373
 
 
374
408
        full_key = panel_applet_gconf_get_full_key (applet, key);
375
409
 
376
410
        client = panel_applet_gconf_get_client ();
379
413
 
380
414
        g_free (full_key);
381
415
 
382
 
        if (!opt_error && our_error) {
383
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
384
 
                g_error_free (our_error);
385
 
        }
386
 
 
387
416
        return retval;
388
417
}
389
418
 
 
419
/**
 
420
 * panel_applet_gconf_get_value:
 
421
 * @applet: a #PanelApplet.
 
422
 * @key: a GConf key name.
 
423
 * @error: a #GError, or %NULL.
 
424
 *
 
425
 * Convenience wrapper around gconf_client_get_value() to get the value of @key
 
426
 * in the per-instance GConf directory of @applet.
 
427
 *
 
428
 * Returns: the value of @key.
 
429
 *
 
430
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
431
 **/
390
432
GConfValue *
391
433
panel_applet_gconf_get_value (PanelApplet  *applet,
392
434
                              const gchar  *key,
393
 
                              GError      **opt_error)
 
435
                              GError      **error)
394
436
{
395
437
        GConfClient  *client;
396
438
        gchar        *full_key;
397
439
        GConfValue   *retval;
398
 
        GError      **error = NULL;
399
 
        GError       *our_error = NULL;
400
440
 
401
441
        g_return_val_if_fail (PANEL_IS_APPLET (applet), NULL);
402
442
 
403
 
        if (opt_error)
404
 
                error = opt_error;
405
 
        else
406
 
                error = &our_error;
407
 
 
408
443
        full_key = panel_applet_gconf_get_full_key (applet, key);
409
444
 
410
445
        client = panel_applet_gconf_get_client ();
413
448
 
414
449
        g_free (full_key);
415
450
 
416
 
        if (!opt_error && our_error) {
417
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
418
 
                g_error_free (our_error);
419
 
        }
420
 
 
421
451
        return retval;
422
452
}
423
453
 
 
454
/**
 
455
 * panel_applet_gconf_get_list:
 
456
 * @applet: a #PanelApplet.
 
457
 * @key: a GConf key name.
 
458
 * @error: a #GError, or %NULL.
 
459
 *
 
460
 * Convenience wrapper around gconf_client_get_list() to get the value of @key
 
461
 * in the per-instance GConf directory of @applet.
 
462
 *
 
463
 * Returns: the value of @key. The list and its content should be freed by the
 
464
 * caller.
 
465
 *
 
466
 * Deprecated: 3.0: Use #GSettings to store per-instance settings.
 
467
 **/
424
468
GSList *
425
469
panel_applet_gconf_get_list (PanelApplet     *applet,
426
470
                             const gchar     *key,
427
471
                             GConfValueType   list_type,
428
 
                             GError         **opt_error)
 
472
                             GError         **error)
429
473
{
430
474
        GConfClient  *client;
431
475
        gchar        *full_key;
432
476
        GSList       *retval;
433
 
        GError      **error = NULL;
434
 
        GError       *our_error = NULL;
435
477
 
436
478
        g_return_val_if_fail (PANEL_IS_APPLET (applet), NULL);
437
479
 
438
 
        if (opt_error)
439
 
                error = opt_error;
440
 
        else
441
 
                error = &our_error;
442
 
 
443
480
        full_key = panel_applet_gconf_get_full_key (applet, key);
444
481
 
445
482
        client = panel_applet_gconf_get_client ();
448
485
 
449
486
        g_free (full_key);
450
487
 
451
 
        if (!opt_error && our_error) {
452
 
                g_warning (G_STRLOC ": gconf error : '%s'", our_error->message);
453
 
                g_error_free (our_error);
454
 
        }
455
 
 
456
488
        return retval;
457
489
}