diff options
-rw-r--r-- | trashapplet/src/Makefile.am | 4 | ||||
-rw-r--r-- | trashapplet/src/trash-empty.c | 10 | ||||
-rw-r--r-- | trashapplet/src/trashapplet.c | 12 |
3 files changed, 14 insertions, 12 deletions
diff --git a/trashapplet/src/Makefile.am b/trashapplet/src/Makefile.am index b7d6a655..36a536ce 100644 --- a/trashapplet/src/Makefile.am +++ b/trashapplet/src/Makefile.am @@ -1,5 +1,5 @@ INCLUDES = -I$(top_srcdir) \ - $(MATE_APPLETS3_CFLAGS) \ + $(MATE_APPLETS4_CFLAGS) \ $(GIO_CFLAGS) \ -DTRASH_MENU_UI_DIR=\""$(datadir)/mate-2.0/ui"\" @@ -13,7 +13,7 @@ trashapplet_SOURCES = \ xstuff.h trashapplet_LDADD = \ - $(MATE_APPLETS3_LIBS) \ + $(MATE_APPLETS4_LIBS) \ $(GIO_LIBS) \ -lX11 diff --git a/trashapplet/src/trash-empty.c b/trashapplet/src/trash-empty.c index bff97460..16b39191 100644 --- a/trashapplet/src/trash-empty.c +++ b/trashapplet/src/trash-empty.c @@ -19,7 +19,6 @@ * 02110-1301, USA. */ -#include <mateconf/mateconf-client.h> #include <gio/gio.h> #include <glib/gi18n.h> @@ -287,9 +286,12 @@ trash_empty_start (GtkWidget *parent) static gboolean trash_empty_require_confirmation (void) { - return mateconf_client_get_bool (mateconf_client_get_default (), - "/apps/caja/preferences/confirm_trash", - NULL); + gboolean confirm_trash; + GSettings *settings; + settings = g_settings_new ("org.mate.caja.preferences"); + confirm_trash = g_settings_get_boolean (settings, "confirm-trash"); + g_object_unref (settings); + return confirm_trash; } static void diff --git a/trashapplet/src/trashapplet.c b/trashapplet/src/trashapplet.c index 0edf9f74..6fc5b366 100644 --- a/trashapplet/src/trashapplet.c +++ b/trashapplet/src/trashapplet.c @@ -30,7 +30,6 @@ #include <glib/gi18n.h> #include <gtk/gtk.h> #include <gdk/gdkkeysyms.h> -#include <mateconf/mateconf-client.h> #include <gio/gio.h> #include <mate-panel-applet.h> @@ -244,20 +243,21 @@ trash_applet_init (TrashApplet *applet) trash_applet_monitor_changed (applet); } -#define PANEL_ENABLE_ANIMATIONS "/apps/panel/global/enable_animations" +#define PANEL_SCHEMA "org.mate.panel" +#define PANEL_ENABLE_ANIMATIONS "enable-animations" static gboolean trash_applet_button_release (GtkWidget *widget, GdkEventButton *event) { TrashApplet *applet = TRASH_APPLET (widget); - static MateConfClient *client; + static GSettings *settings; - if (client == NULL) - client = mateconf_client_get_default (); + if (settings == NULL) + settings = g_settings_new (PANEL_SCHEMA); if (event->button == 1) { - if (mateconf_client_get_bool (client, PANEL_ENABLE_ANIMATIONS, NULL)) + if (g_settings_get_boolean (settings, PANEL_ENABLE_ANIMATIONS)) xstuff_zoom_animate (widget, NULL); trash_applet_open_folder (NULL, applet); |