summaryrefslogtreecommitdiff
path: root/src/http.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-10-03 07:33:50 -0700
committerStefano Karapetsas <[email protected]>2012-10-03 07:33:50 -0700
commit8af5555721e4791d09db088a41c784bf2c4fd7f5 (patch)
treefb36698c7c1aef79bcc1fd33cf56596d4cdd4dd9 /src/http.c
parent8b06eb18651798d1f02bd358fa43119d914a744f (diff)
parentc0ea7fefe55f518145afd68f201bb6ed07d6e866 (diff)
downloadmate-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/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;