[gnome-bluetooth] sendto: fix critical warnings when saving the last used address



commit d81e3febf5eeab7b1b45f8c3e6d3a24e0b81a326
Author: Daniele Forsi <dforsi src gnome org>
Date:   Thu May 10 11:55:41 2012 +0200

    sendto: fix critical warnings when saving the last used address
    
    Since we can only set a string, replace g_settings_set_value() which was
    missing the "type" parameter, with g_settings_set_string() which is available
    since glib 2.26 (GNOME Bluetooth requires 2.29.90 now).
    
    Fixes:
    (nautilus-sendto:3647): GLib-CRITICAL **: `00:00:00:00:00:00' is not a valid GVariant format string
    
    (nautilus-sendto:3647): GLib-CRITICAL **: g_variant_new_va: assertion `valid_format_string (format_string, !endptr, NULL)' failed
    
    (nautilus-sendto:3647): GLib-GIO-CRITICAL **: g_settings_schema_key_type_check: assertion `value != NULL' failed
    
    (nautilus-sendto:3647): GLib-CRITICAL **: g_variant_get_type_string: assertion `value != NULL' failed
    
    (nautilus-sendto:3647): GLib-GIO-CRITICAL **: g_settings_set_value: key 'last-used' in 'org.gnome.Bluetooth.nst' expects type 's', but a GVariant of type '(null)' was given

 sendto/nautilus-sendto-plugin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/sendto/nautilus-sendto-plugin.c b/sendto/nautilus-sendto-plugin.c
index cb11682..596f1ea 100644
--- a/sendto/nautilus-sendto-plugin.c
+++ b/sendto/nautilus-sendto-plugin.c
@@ -98,7 +98,7 @@ save_last_used_obex_device (const char *bdaddr)
 	GSettings *settings;
 
 	settings = g_settings_new (SCHEMA_NAME);
-	g_settings_set (settings, PREF_LAST_USED, bdaddr);
+	g_settings_set_string (settings, PREF_LAST_USED, bdaddr);
 	g_object_unref (settings);
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]