summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/caja-connect-server-dialog-main.c1
-rw-r--r--src/file-manager/fm-desktop-icon-view.c25
-rw-r--r--src/file-manager/fm-directory-view.c21
3 files changed, 32 insertions, 15 deletions
diff --git a/src/caja-connect-server-dialog-main.c b/src/caja-connect-server-dialog-main.c
index bedf7f5d..83ae92b7 100644
--- a/src/caja-connect-server-dialog-main.c
+++ b/src/caja-connect-server-dialog-main.c
@@ -37,6 +37,7 @@
#include <eel/eel-stock-dialogs.h>
#include <libcaja-private/caja-icon-names.h>
+#include <libcaja-private/caja-global-preferences.h>
#include "caja-window.h"
#include "caja-connect-server-dialog.h"
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index 3972b343..4698e0e1 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -78,6 +78,8 @@ struct FMDesktopIconViewDetails
gulong delayed_init_signal;
guint reload_desktop_timeout;
gboolean pending_rescan;
+
+ guint lockdown_notification_id;
};
static void fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view);
@@ -108,7 +110,10 @@ desktop_directory_changed_callback (gpointer callback_data)
}
static void
-lockdown_disable_command_line_changed_callback (gpointer callback_data)
+lockdown_disable_command_line_changed_callback (MateConfClient* client,
+ guint cnxn_id,
+ MateConfEntry *entry,
+ gpointer callback_data)
{
fm_directory_view_update_menus (FM_DIRECTORY_VIEW (callback_data));
}
@@ -308,10 +313,8 @@ fm_desktop_icon_view_finalize (GObject *object)
font_changed_callback,
icon_view);
- eel_preferences_remove_callback (CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE,
- lockdown_disable_command_line_changed_callback,
- icon_view);
-
+ mateconf_client_notify_remove (caja_mateconf_client,
+ icon_view->details->lockdown_notification_id);
g_signal_handlers_disconnect_by_func (caja_preferences,
desktop_directory_changed_callback,
NULL);
@@ -633,9 +636,13 @@ fm_desktop_icon_view_init (FMDesktopIconView *desktop_icon_view)
default_zoom_level_changed (desktop_icon_view);
fm_desktop_icon_view_update_icon_container_fonts (desktop_icon_view);
- eel_preferences_add_callback (CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE,
- lockdown_disable_command_line_changed_callback,
- desktop_icon_view);
+ desktop_icon_view->details->lockdown_notification_id =
+ mateconf_client_notify_add (caja_mateconf_client,
+ CAJA_MATECONF_LOCKDOWN_COMMAND_LINE,
+ lockdown_disable_command_line_changed_callback,
+ desktop_icon_view,
+ NULL,
+ NULL);
}
@@ -727,7 +734,7 @@ real_update_menus (FMDirectoryView *view)
desktop_view = FM_DESKTOP_ICON_VIEW (view);
/* New Launcher */
- disable_command_line = eel_preferences_get_boolean (CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE);
+ disable_command_line = mateconf_client_get_bool (caja_mateconf_client, CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE, NULL);
action = gtk_action_group_get_action (desktop_view->details->desktop_action_group,
FM_ACTION_NEW_LAUNCHER_DESKTOP);
gtk_action_set_visible (action,
diff --git a/src/file-manager/fm-directory-view.c b/src/file-manager/fm-directory-view.c
index d9a42b15..e7628333 100644
--- a/src/file-manager/fm-directory-view.c
+++ b/src/file-manager/fm-directory-view.c
@@ -253,6 +253,7 @@ struct FMDirectoryViewDetails
gboolean allow_moves;
GdkPoint context_menu_position;
+ guint lockdown_notification_id;
gboolean undo_active;
gboolean redo_active;
@@ -1636,7 +1637,10 @@ sort_directories_first_changed_callback (gpointer callback_data)
}
static void
-lockdown_disable_command_line_changed_callback (gpointer callback_data)
+lockdown_disable_command_line_changed_callback (MateConfClient* client,
+ guint cnxn_id,
+ MateConfEntry *entry,
+ gpointer callback_data)
{
FMDirectoryView *view;
@@ -2058,8 +2062,13 @@ fm_directory_view_init (FMDirectoryView *view)
"changed::" CAJA_PREFERENCES_SORT_DIRECTORIES_FIRST,
G_CALLBACK(sort_directories_first_changed_callback),
view);
- eel_preferences_add_callback (CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE,
- lockdown_disable_command_line_changed_callback, view);
+ view->details->lockdown_notification_id =
+ mateconf_client_notify_add (caja_mateconf_client,
+ CAJA_MATECONF_LOCKDOWN_COMMAND_LINE,
+ lockdown_disable_command_line_changed_callback,
+ view,
+ NULL,
+ NULL);
/* Update undo actions stuff and connect signals from the undostack manager */
view->details->undo_active = FALSE;
@@ -2187,8 +2196,8 @@ fm_directory_view_finalize (GObject *object)
click_policy_changed_callback, view);
g_signal_handlers_disconnect_by_func (caja_preferences,
sort_directories_first_changed_callback, view);
- eel_preferences_remove_callback (CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE,
- lockdown_disable_command_line_changed_callback, view);
+ mateconf_client_notify_remove (caja_mateconf_client,
+ view->details->lockdown_notification_id);
unschedule_pop_up_location_context_menu (view);
if (view->details->location_popup_event != NULL) {
@@ -8951,7 +8960,7 @@ real_update_menus (FMDirectoryView *view)
real_update_paste_menu (view, selection, selection_count);
- disable_command_line = eel_preferences_get_boolean (CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE);
+ disable_command_line = mateconf_client_get_bool (caja_mateconf_client, CAJA_PREFERENCES_LOCKDOWN_COMMAND_LINE, NULL);
action = gtk_action_group_get_action (view->details->dir_action_group,
FM_ACTION_NEW_LAUNCHER);
gtk_action_set_visible (action, vfolder_directory && !disable_command_line);