use dconf directly instead of wrapper functions from libmate-desktop

master-1.22
monsta 2016-05-26 14:19:40 +03:00
parent fd07010c43
commit 072da32f99
2 changed files with 6 additions and 2 deletions

View File

@ -46,6 +46,7 @@ AM_GLIB_GNU_GETTEXT
GLIB_REQUIRED=2.36.0 GLIB_REQUIRED=2.36.0
GIO_REQUIRED=2.25.12 GIO_REQUIRED=2.25.12
DCONF_REQUIRED=0.13.4
MATE_DESKTOP_REQUIRED=1.9.0 MATE_DESKTOP_REQUIRED=1.9.0
AC_MSG_CHECKING([which gtk+ version to compile against]) AC_MSG_CHECKING([which gtk+ version to compile against])
@ -79,6 +80,7 @@ PKG_CHECK_MODULES([TERM],
gthread-2.0 gthread-2.0
gio-2.0 >= $GIO_REQUIRED gio-2.0 >= $GIO_REQUIRED
gtk+-$GTK_API_VERSION >= $GTK_REQUIRED gtk+-$GTK_API_VERSION >= $GTK_REQUIRED
dconf >= $DCONF_REQUIRED
mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED mate-desktop-2.0 >= $MATE_DESKTOP_REQUIRED
x11]) x11])

View File

@ -24,6 +24,7 @@
#include <errno.h> #include <errno.h>
#include <glib.h> #include <glib.h>
#include <dconf.h>
#include "terminal-intl.h" #include "terminal-intl.h"
@ -36,7 +37,6 @@
#include "terminal-util.h" #include "terminal-util.h"
#include "profile-editor.h" #include "profile-editor.h"
#include "terminal-encoding.h" #include "terminal-encoding.h"
#include <libmate-desktop/mate-dconf.h>
#include <libmate-desktop/mate-gsettings.h> #include <libmate-desktop/mate-gsettings.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
@ -327,12 +327,14 @@ terminal_app_delete_profile (TerminalApp *app,
mate_gsettings_remove_all_from_strv (app->settings_global, PROFILE_LIST_KEY, profile_name); mate_gsettings_remove_all_from_strv (app->settings_global, PROFILE_LIST_KEY, profile_name);
/* And remove the profile directory */ /* 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_warning ("Failed to recursively unset %s: %s\n", profile_dir, error->message);
g_error_free (error); g_error_free (error);
} }
g_object_unref (client);
g_free (profile_dir); g_free (profile_dir);
} }