From 072da32f99166bcaf932c4401826825e8155d0d8 Mon Sep 17 00:00:00 2001 From: monsta Date: Thu, 26 May 2016 14:19:40 +0300 Subject: [PATCH] use dconf directly instead of wrapper functions from libmate-desktop --- configure.ac | 2 ++ src/terminal-app.c | 6 ++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 9bf8cb3..d1c0316 100644 --- a/configure.ac +++ b/configure.ac @@ -46,6 +46,7 @@ AM_GLIB_GNU_GETTEXT GLIB_REQUIRED=2.36.0 GIO_REQUIRED=2.25.12 +DCONF_REQUIRED=0.13.4 MATE_DESKTOP_REQUIRED=1.9.0 AC_MSG_CHECKING([which gtk+ version to compile against]) @@ -79,6 +80,7 @@ PKG_CHECK_MODULES([TERM], gthread-2.0 gio-2.0 >= $GIO_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED + dconf >= $DCONF_REQUIRED mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED x11]) diff --git a/src/terminal-app.c b/src/terminal-app.c index e3e23d0..495405d 100644 --- a/src/terminal-app.c +++ b/src/terminal-app.c @@ -24,6 +24,7 @@ #include #include +#include #include "terminal-intl.h" @@ -36,7 +37,6 @@ #include "terminal-util.h" #include "profile-editor.h" #include "terminal-encoding.h" -#include #include #include #include @@ -327,12 +327,14 @@ terminal_app_delete_profile (TerminalApp *app, mate_gsettings_remove_all_from_strv (app->settings_global, PROFILE_LIST_KEY, profile_name); /* And remove the profile directory */ - if (!mate_dconf_recursive_reset (profile_dir, &error)) + DConfClient *client = dconf_client_new (); + if (!dconf_client_write_sync (client, profile_dir, NULL, NULL, NULL, &error)) { g_warning ("Failed to recursively unset %s: %s\n", profile_dir, error->message); g_error_free (error); } + g_object_unref (client); g_free (profile_dir); }