summaryrefslogtreecommitdiff
path: root/src/http.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/http.c
parent8b06eb18651798d1f02bd358fa43119d914a744f (diff)
downloadmate-user-share-99c20ca79435c5ab1130258801008b963dd2d098.tar.bz2
mate-user-share-99c20ca79435c5ab1130258801008b963dd2d098.tar.xz
convert to gsettings
Diffstat (limited to 'src/http.c')
-rw-r--r--src/http.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/http.c b/src/http.c
index 64d4706..0e198aa 100644
--- a/src/http.c
+++ b/src/http.c
@@ -31,7 +31,7 @@
#include <dbus/dbus.h>
#endif
-#include <mateconf/mateconf-client.h>
+#include <gio/gio.h>
#include <stdarg.h>
#include <string.h>
@@ -55,6 +55,8 @@
/* From avahi-common/domain.h */
#define AVAHI_LABEL_MAX 64
+#define GSETTINGS_SCHEMA "org.mate.FileSharing"
+
#ifdef HAVE_DBUS_1_1
static char *dbus_session_id;
#endif
@@ -326,7 +328,7 @@ spawn_httpd (int port, pid_t *pid_out)
char *pidfile;
GError *error;
gboolean got_pidfile;
- MateConfClient *client;
+ GSettings *settings;
char *str;
char *public_dir;
@@ -345,9 +347,9 @@ spawn_httpd (int port, pid_t *pid_out)
argv[i++] = "-C";
free3 = argv[i++] = g_strdup_printf ("Listen %d", port);
- client = mateconf_client_get_default ();
- str = mateconf_client_get_string (client,
- FILE_SHARING_REQUIRE_PASSWORD, NULL);
+ settings = g_settings_new (GSETTINGS_SCHEMA);
+ str = g_settings_get_string (settings,
+ FILE_SHARING_REQUIRE_PASSWORD);
if (str && strcmp (str, "never") == 0) {
/* Do nothing */
@@ -360,7 +362,7 @@ spawn_httpd (int port, pid_t *pid_out)
argv[i++] = "RequirePasswordAlways";
}
g_free (str);
- g_object_unref (client);
+ g_object_unref (settings);
argv[i] = NULL;