summaryrefslogtreecommitdiff
path: root/plugins/housekeeping/msd-ldsm-trash-empty.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-10-01 22:58:54 +0200
committerStefano Karapetsas <[email protected]>2012-10-01 22:58:54 +0200
commitd2c7965aa092cecb857bd0301b7c9ff2dc10f9f8 (patch)
tree016ada3eb78c3c6f438abab5635ba17474d47a2b /plugins/housekeeping/msd-ldsm-trash-empty.c
parent03478b4d1d9fdc5f2f2fdbf9c41d963dabc0d00b (diff)
downloadmate-settings-daemon-d2c7965aa092cecb857bd0301b7c9ff2dc10f9f8.tar.bz2
mate-settings-daemon-d2c7965aa092cecb857bd0301b7c9ff2dc10f9f8.tar.xz
migrate to gsettingsmate-settings-daemon-1.5.0
Diffstat (limited to 'plugins/housekeeping/msd-ldsm-trash-empty.c')
-rw-r--r--plugins/housekeeping/msd-ldsm-trash-empty.c24
1 files changed, 8 insertions, 16 deletions
diff --git a/plugins/housekeeping/msd-ldsm-trash-empty.c b/plugins/housekeeping/msd-ldsm-trash-empty.c
index 05f82cd..e218d6d 100644
--- a/plugins/housekeeping/msd-ldsm-trash-empty.c
+++ b/plugins/housekeeping/msd-ldsm-trash-empty.c
@@ -18,13 +18,14 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include <mateconf/mateconf-client.h>
+#include <gio/gio.h>
#include <glib/gi18n.h>
#include <gio/gio.h>
#include "msd-ldsm-trash-empty.h"
-#define CAJA_CONFIRM_TRASH_KEY "/apps/caja/preferences/confirm_trash"
+#define CAJA_PREFS_SCHEMA "org.mate.caja.preferences"
+#define CAJA_CONFIRM_TRASH_KEY "confirm-trash"
/* Some of this code has been borrowed from the trash-applet, courtesy of Ryan Lortie */
@@ -325,21 +326,12 @@ trash_empty_confirmation_response (GtkDialog *dialog,
static gboolean
trash_empty_require_confirmation ()
{
- MateConfClient *client;
+ GSettings *settings;
gboolean require_confirmation = TRUE;
- GError *error = NULL;
-
- client = mateconf_client_get_default ();
- if (client) {
- require_confirmation = mateconf_client_get_bool (client, CAJA_CONFIRM_TRASH_KEY, &error);
- if (error) {
- g_warning ("Failed to read confirm_trash key from MateConf: %s", error->message ? error->message : "Unknown error");
- /* It's safest to assume that confirmation is required here */
- require_confirmation = TRUE;
- g_error_free (error);
- }
- g_object_unref (client);
- }
+
+ settings = g_settings_new (CAJA_PREFS_SCHEMA);
+ require_confirmation = g_settings_get_boolean (settings, CAJA_CONFIRM_TRASH_KEY);
+ g_object_unref (settings);
return require_confirmation;
}