summaryrefslogtreecommitdiff
path: root/caja
diff options
context:
space:
mode:
Diffstat (limited to 'caja')
-rw-r--r--caja/Makefile.am8
-rw-r--r--caja/caja-open-terminal.c39
-rw-r--r--caja/open-terminal.c6
3 files changed, 23 insertions, 30 deletions
diff --git a/caja/Makefile.am b/caja/Makefile.am
index 1e6b8be..19f6e73 100644
--- a/caja/Makefile.am
+++ b/caja/Makefile.am
@@ -1,4 +1,4 @@
-INCLUDES = \
+libcaja_open_terminal_la_CFLAGS = \
-DG_LOG_DOMAIN=\"Caja-Open-Terminal\" \
-DDATADIR=\"$(datadir)\" \
-DMATELOCALEDIR=\""$(datadir)/locale"\" \
@@ -7,8 +7,8 @@ INCLUDES = \
$(WARN_CFLAGS) \
-Werror \
$(DISABLE_DEPRECATED_CFLAGS) \
- $(CAJA_CFLAGS) \
- $(MATECONF_CFLAGS) \
+ $(AM_CFLAGS) \
+ $(TERM_CFLAGS) \
$(MATEDESKTOP_CFLAGS)
caja_extensiondir=$(CAJA_EXTENSION_DIR)
@@ -24,4 +24,4 @@ libcaja_open_terminal_la_SOURCES = \
open-terminal.c
libcaja_open_terminal_la_LDFLAGS = -module -avoid-version
-libcaja_open_terminal_la_LIBADD = $(CAJA_LIBS) $(MATECONF_LIBS) $(MATEDESKTOP_LIBS)
+libcaja_open_terminal_la_LIBADD = $(AM_LIBS) $(TERM_LIBS) $(MATEDESKTOP_LIBS)
diff --git a/caja/caja-open-terminal.c b/caja/caja-open-terminal.c
index 39fc0ff..e5be0b3 100644
--- a/caja/caja-open-terminal.c
+++ b/caja/caja-open-terminal.c
@@ -34,8 +34,6 @@
#include <glib/gi18n-lib.h>
#include <gio/gio.h>
#include <gtk/gtk.h>
-#include <mateconf/mateconf.h>
-#include <mateconf/mateconf-client.h>
#include <libmate/mate-desktop-item.h>
#include <errno.h>
@@ -89,30 +87,26 @@ get_terminal_file_info (const char *uri)
return ret;
}
-static MateConfClient *mateconf_client = NULL;
+static GSettings *settings_open = NULL;
+static GSettings *settings_preferences = NULL;
+static GSettings *settings_lockdown = NULL;
static inline gboolean
desktop_opens_home_dir (void)
{
- return mateconf_client_get_bool (mateconf_client,
- "/apps/caja-open-terminal/desktop_opens_home_dir",
- NULL);
+ return g_settings_get_boolean (settings_open, "desktop-opens-home-dir");
}
static inline gboolean
display_mc_item (void)
{
- return mateconf_client_get_bool (mateconf_client,
- "/apps/caja-open-terminal/display_mc_item",
- NULL);
+ return g_settings_get_boolean (settings_open, "display-mc-items");
}
static inline gboolean
desktop_is_home_dir ()
{
- return mateconf_client_get_bool (mateconf_client,
- "/apps/caja/preferences/desktop_is_home_dir",
- NULL);
+ return g_settings_get_boolean (settings_preferences, "desktop-is-home-dir");
}
/* a very simple URI parsing routine from Launchpad #333462, until GLib supports URI parsing (MATE #489862) */
@@ -461,9 +455,7 @@ open_terminal_menu_item_new (cajaFileInfo *file_info,
static gboolean
terminal_locked_down (void)
{
- return mateconf_client_get_bool (mateconf_client,
- "/desktop/mate/lockdown/disable_command_line",
- NULL);
+ return g_settings_get_boolean (settings_lockdown, "disable-command-line");
}
/* used to determine for remote URIs whether GVFS is capable of mapping them to ~/.gvfs */
@@ -613,16 +605,23 @@ caja_open_terminal_instance_init (CajaOpenTerminal *cvs)
static void
caja_open_terminal_class_init (CajaOpenTerminalClass *class)
{
- g_assert (mateconf_client == NULL);
- mateconf_client = mateconf_client_get_default ();
+ g_assert (settings_open == NULL);
+ settings_open = g_settings_new ("org.mate.caja-open-terminal");
+ g_assert (settings_preferences == NULL);
+ settings_preferences = g_settings_new ("org.mate.caja.preferences");
+ g_assert (settings_lockdown == NULL);
+ settings_lockdown = g_settings_new ("org.mate.lockdown");
}
static void
caja_open_terminal_class_finalize (CajaOpenTerminalClass *class)
{
- g_assert (mateconf_client != NULL);
- g_object_unref (mateconf_client);
- mateconf_client = NULL;
+ g_assert (settings_open != NULL);
+ g_object_unref (settings_open);
+ g_assert (settings_preferences != NULL);
+ g_object_unref (settings_preferences);
+ g_assert (settings_lockdown != NULL);
+ g_object_unref (settings_lockdown);
}
GType
diff --git a/caja/open-terminal.c b/caja/open-terminal.c
index e36e6e0..43583d8 100644
--- a/caja/open-terminal.c
+++ b/caja/open-terminal.c
@@ -27,7 +27,6 @@
#include "caja-open-terminal.h"
-#include <mateconf/mateconf-client.h>
#include <libintl.h>
static GType type_list[1];
@@ -42,11 +41,6 @@ caja_module_initialize (GTypeModule *module)
bindtextdomain (GETTEXT_PACKAGE, MATELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-
- mateconf_client_add_dir(mateconf_client_get_default(),
- "/desktop/mate/lockdown",
- 0,
- NULL);
}
void