diff options
author | Stefano Karapetsas <[email protected]> | 2012-10-03 07:33:50 -0700 |
---|---|---|
committer | Stefano Karapetsas <[email protected]> | 2012-10-03 07:33:50 -0700 |
commit | 8af5555721e4791d09db088a41c784bf2c4fd7f5 (patch) | |
tree | fb36698c7c1aef79bcc1fd33cf56596d4cdd4dd9 /src/obexftp.c | |
parent | 8b06eb18651798d1f02bd358fa43119d914a744f (diff) | |
parent | c0ea7fefe55f518145afd68f201bb6ed07d6e866 (diff) | |
download | mate-user-share-8af5555721e4791d09db088a41c784bf2c4fd7f5.tar.bz2 mate-user-share-8af5555721e4791d09db088a41c784bf2c4fd7f5.tar.xz |
Merge pull request #2 from NiceandGently/master
convert mateconf to gsettings
Diffstat (limited to 'src/obexftp.c')
-rw-r--r-- | src/obexftp.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/obexftp.c b/src/obexftp.c index 6d94c97..b06cf09 100644 --- a/src/obexftp.c +++ b/src/obexftp.c @@ -25,7 +25,7 @@ #include <dbus/dbus-glib.h> #include <dbus/dbus-glib-lowlevel.h> -#include <mateconf/mateconf-client.h> +#include <gio/gio.h> #include <string.h> @@ -33,6 +33,8 @@ #include "user_share-common.h" #include "user_share-private.h" +#define GSETTINGS_SCHEMA "org.mate.FileSharing" + static DBusGConnection *connection = NULL; static DBusGProxy *manager_proxy = NULL; static DBusGProxy *server_proxy = NULL; @@ -41,12 +43,12 @@ void obexftp_up (void) { GError *err = NULL; - MateConfClient *client; + GSettings *settings; char *public_dir, *server; gboolean allow_write, require_pairing; - client = mateconf_client_get_default (); - require_pairing = mateconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_REQUIRE_PAIRING, NULL); + settings = g_settings_new (GSETTINGS_SCHEMA); + require_pairing =g_settings_get_boolean (settings, FILE_SHARING_BLUETOOTH_REQUIRE_PAIRING); server = NULL; if (manager_proxy == NULL) { @@ -67,8 +69,8 @@ obexftp_up (void) } public_dir = lookup_public_dir (); - allow_write = mateconf_client_get_bool (client, FILE_SHARING_BLUETOOTH_ALLOW_WRITE, NULL); - g_object_unref (client); + allow_write =g_settings_get_boolean (settings, FILE_SHARING_BLUETOOTH_ALLOW_WRITE); + g_object_unref (settings); if (server_proxy == NULL) { server_proxy = dbus_g_proxy_new_for_name (connection, |