diff options
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-desktop-link-monitor.c | 12 | ||||
-rw-r--r-- | libcaja-private/caja-directory-background.c | 2 | ||||
-rw-r--r-- | libcaja-private/caja-global-preferences.c | 52 | ||||
-rw-r--r-- | libcaja-private/caja-global-preferences.h | 2 | ||||
-rw-r--r-- | libcaja-private/caja-icon-container.c | 27 | ||||
-rw-r--r-- | libcaja-private/caja-program-choosing.c | 1 |
6 files changed, 23 insertions, 73 deletions
diff --git a/libcaja-private/caja-desktop-link-monitor.c b/libcaja-private/caja-desktop-link-monitor.c index f2d1c8b5..5a959d20 100644 --- a/libcaja-private/caja-desktop-link-monitor.c +++ b/libcaja-private/caja-desktop-link-monitor.c @@ -493,9 +493,9 @@ caja_desktop_link_monitor_init (gpointer object, gpointer klass) } static void -remove_link_and_preference (CajaDesktopLink **link_ref, +remove_link_and_preference (CajaDesktopLink **link_ref, const char *preference_key, - EelPreferencesCallback callback, + GCallback callback, gpointer callback_data) { if (*link_ref != NULL) @@ -521,22 +521,22 @@ desktop_link_monitor_finalize (GObject *object) remove_link_and_preference (&monitor->details->home_link, CAJA_PREFERENCES_DESKTOP_HOME_VISIBLE, - desktop_home_visible_changed, + G_CALLBACK (desktop_home_visible_changed), monitor); remove_link_and_preference (&monitor->details->computer_link, CAJA_PREFERENCES_DESKTOP_COMPUTER_VISIBLE, - desktop_computer_visible_changed, + G_CALLBACK (desktop_computer_visible_changed), monitor); remove_link_and_preference (&monitor->details->trash_link, CAJA_PREFERENCES_DESKTOP_TRASH_VISIBLE, - desktop_trash_visible_changed, + G_CALLBACK (desktop_trash_visible_changed), monitor); remove_link_and_preference (&monitor->details->network_link, CAJA_PREFERENCES_DESKTOP_NETWORK_VISIBLE, - desktop_network_visible_changed, + G_CALLBACK (desktop_network_visible_changed), monitor); /* Mounts */ diff --git a/libcaja-private/caja-directory-background.c b/libcaja-private/caja-directory-background.c index 38927b24..59c35312 100644 --- a/libcaja-private/caja-directory-background.c +++ b/libcaja-private/caja-directory-background.c @@ -330,7 +330,7 @@ desktop_background_destroyed_callback (EelBackground *background, void *georgeWB guint notification_timeout_id; notification_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (background), "desktop_mateconf_notification")); - eel_mateconf_notification_remove (notification_id); + mateconf_client_notify_remove (caja_mateconf_client, notification_id); notification_timeout_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (background), "desktop_mateconf_notification_timeout")); if (notification_timeout_id != 0) diff --git a/libcaja-private/caja-global-preferences.c b/libcaja-private/caja-global-preferences.c index 7465add7..4d82e6df 100644 --- a/libcaja-private/caja-global-preferences.c +++ b/libcaja-private/caja-global-preferences.c @@ -28,17 +28,12 @@ #include "caja-file-utilities.h" #include "caja-file.h" -#include <eel/eel-enumeration.h> #include <eel/eel-glib-extensions.h> #include <eel/eel-gtk-extensions.h> #include <eel/eel-stock-dialogs.h> #include <eel/eel-string.h> #include <glib/gi18n.h> -/* Constants */ -#define STRING_ARRAY_DEFAULT_TOKENS_DELIMETER "," -#define PREFERENCES_SORT_ORDER_MANUALLY 100 - /* Path for mate-vfs preferences */ static const char *EXTRA_MONITOR_PATHS[] = { "/desktop/mate/background", @@ -46,33 +41,6 @@ static const char *EXTRA_MONITOR_PATHS[] = { NULL }; -/* An enumeration used for installing type specific preferences defaults. */ -typedef enum -{ - PREFERENCE_BOOLEAN = 1, - PREFERENCE_INTEGER, - PREFERENCE_STRING, - PREFERENCE_STRING_ARRAY -} PreferenceType; - -/* - * A callback which can be used to fetch dynamic fallback values. - * For example, values that are dependent on the environment (such as user name) - * cannot be specified as constants. - */ -typedef gpointer (*PreferencesDefaultValueCallback) (void); - -/* A structure that describes a single preference including defaults and visibility. */ -typedef struct -{ - const char *name; - PreferenceType type; - const gpointer fallback_value; - PreferencesDefaultValueCallback fallback_callback; - GFreeFunc fallback_callback_result_free_function; - const char *enumeration_id; -} PreferenceDefault; - /* * Public functions */ @@ -113,8 +81,6 @@ caja_global_preferences_init (void) } initialized = TRUE; - - eel_preferences_init ("/apps/caja"); caja_preferences = g_settings_new("org.mate.caja.preferences"); caja_media_preferences = g_settings_new("org.mate.media-handling"); @@ -134,22 +100,4 @@ caja_global_preferences_init (void) MATECONF_CLIENT_PRELOAD_ONELEVEL, NULL); } - - /* Preload everything in a big batch */ - eel_mateconf_preload_cache ("/apps/caja/preferences", - MATECONF_CLIENT_PRELOAD_ONELEVEL); - eel_mateconf_preload_cache ("/desktop/mate/file_views", - MATECONF_CLIENT_PRELOAD_ONELEVEL); - eel_mateconf_preload_cache ("/desktop/mate/background", - MATECONF_CLIENT_PRELOAD_ONELEVEL); - eel_mateconf_preload_cache ("/desktop/mate/lockdown", - MATECONF_CLIENT_PRELOAD_ONELEVEL); - - /* These are always needed for the desktop */ - eel_mateconf_preload_cache ("/apps/caja/desktop", - MATECONF_CLIENT_PRELOAD_ONELEVEL); - eel_mateconf_preload_cache ("/apps/caja/icon_view", - MATECONF_CLIENT_PRELOAD_ONELEVEL); - eel_mateconf_preload_cache ("/apps/caja/desktop-metadata", - MATECONF_CLIENT_PRELOAD_RECURSIVE); } diff --git a/libcaja-private/caja-global-preferences.h b/libcaja-private/caja-global-preferences.h index 41935192..efcbbb7e 100644 --- a/libcaja-private/caja-global-preferences.h +++ b/libcaja-private/caja-global-preferences.h @@ -26,8 +26,8 @@ #ifndef CAJA_GLOBAL_PREFERENCES_H #define CAJA_GLOBAL_PREFERENCES_H -#include <eel/eel-preferences.h> #include <gio/gio.h> +#include <mateconf/mateconf-client.h> G_BEGIN_DECLS diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index 787c1785..e3457f31 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -45,8 +45,6 @@ #include <eel/eel-editable-label.h> #include <eel/eel-marshal.h> #include <eel/eel-string.h> -#include <eel/eel-preferences.h> -#include <eel/eel-enumeration.h> #include <eel/eel-canvas-rect-ellipse.h> #include <gdk/gdkkeysyms.h> #include <gtk/gtk.h> @@ -6816,14 +6814,22 @@ get_text_ellipsis_limit_for_zoom (char **strs, return success; } +static const char * zoom_level_names[] = { + "smallest", + "smaller", + "small", + "standard", + "large", + "larger", + "largest" +}; + static void text_ellipsis_limit_changed_callback (gpointer callback_data) { char **pref; unsigned int i; int one_limit; - const EelEnumeration *eenum; - const EelEnumerationEntry *entry; pref = g_settings_get_strv (caja_icon_view_preferences, CAJA_PREFERENCES_ICON_VIEW_TEXT_ELLIPSIS_LIMIT); @@ -6835,14 +6841,11 @@ text_ellipsis_limit_changed_callback (gpointer callback_data) } /* override for each zoom level */ - eenum = eel_enumeration_lookup ("default_zoom_level"); - g_assert (eenum != NULL); - for (i = 0; i < eel_enumeration_get_length (eenum); i++) - { - entry = eel_enumeration_get_nth_entry (eenum, i); - if (get_text_ellipsis_limit_for_zoom (pref, entry->name, &one_limit)) - { - text_ellipsis_limits[entry->value] = one_limit; + for (i = 0; i < G_N_ELEMENTS(zoom_level_names); i++) { + if (get_text_ellipsis_limit_for_zoom (pref, + zoom_level_names[i], + &one_limit)) { + text_ellipsis_limits[i] = one_limit; } } diff --git a/libcaja-private/caja-program-choosing.c b/libcaja-private/caja-program-choosing.c index df541a75..a31746ec 100644 --- a/libcaja-private/caja-program-choosing.c +++ b/libcaja-private/caja-program-choosing.c @@ -34,7 +34,6 @@ #include <eel/eel-glib-extensions.h> #include <eel/eel-mate-extensions.h> #include <eel/eel-stock-dialogs.h> -#include <eel/eel-preferences.h> #include <eel/eel-string.h> #include <gtk/gtk.h> #include <glib/gi18n.h> |