summaryrefslogtreecommitdiff
path: root/src/obexftp.c
diff options
context:
space:
mode:
authorraveit65 <[email protected]>2012-09-28 12:34:50 +0200
committerraveit65 <[email protected]>2012-09-28 12:34:50 +0200
commit99c20ca79435c5ab1130258801008b963dd2d098 (patch)
tree4fe7aa5c4c35e4bd785ef6e293eea33651195745 /src/obexftp.c
parent8b06eb18651798d1f02bd358fa43119d914a744f (diff)
downloadmate-user-share-99c20ca79435c5ab1130258801008b963dd2d098.tar.bz2
mate-user-share-99c20ca79435c5ab1130258801008b963dd2d098.tar.xz
convert to gsettings
Diffstat (limited to 'src/obexftp.c')
-rw-r--r--src/obexftp.c14
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,