mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
set up an auto variable for the /desktop/gnome/sound/enable_esd setting,
2002-03-22 Havoc Pennington <hp@pobox.com> * src/file-manager/fm-icon-view.c (should_preview_sound): set up an auto variable for the /desktop/gnome/sound/enable_esd setting, to avoid remote gconf query on every icon mouseover.
This commit is contained in:
parent
edb2f1aa19
commit
3d60b12c76
2 changed files with 15 additions and 10 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-03-22 Havoc Pennington <hp@pobox.com>
|
||||
|
||||
* src/file-manager/fm-icon-view.c (should_preview_sound): set up
|
||||
an auto variable for the /desktop/gnome/sound/enable_esd setting,
|
||||
to avoid remote gconf query on every icon mouseover.
|
||||
|
||||
2002-03-22 Dave Camp <dave@ximian.com>
|
||||
|
||||
* src/file-manager/fm-properties-window.c: (create_emblems_page):
|
||||
|
|
|
@ -181,6 +181,7 @@ static const SortCriterion sort_criteria[] = {
|
|||
|
||||
static gboolean default_sort_in_reverse_order = FALSE;
|
||||
static int preview_sound_auto_value;
|
||||
static gboolean gnome_esd_enabled_auto_value;
|
||||
|
||||
static void fm_icon_view_set_directory_sort_by (FMIconView *icon_view,
|
||||
NautilusFile *file,
|
||||
|
@ -1656,17 +1657,10 @@ preview_audio (FMIconView *icon_view, NautilusFile *file, gboolean start_flag)
|
|||
}
|
||||
|
||||
static gboolean
|
||||
should_preview_sound (NautilusFile *file) {
|
||||
|
||||
GConfClient *client;
|
||||
gboolean enable_esd = FALSE;
|
||||
|
||||
client = gconf_client_get_default ();
|
||||
enable_esd = gconf_client_get_bool (client, "/desktop/gnome/sound/enable_esd", NULL);
|
||||
g_object_unref (client);
|
||||
|
||||
should_preview_sound (NautilusFile *file)
|
||||
{
|
||||
/* Check gnome config sound preference */
|
||||
if (!enable_esd) {
|
||||
if (!gnome_esd_enabled_auto_value) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -2684,6 +2678,11 @@ fm_icon_view_instance_init (FMIconView *icon_view)
|
|||
if (!setup_sound_preview) {
|
||||
eel_preferences_add_auto_enum (NAUTILUS_PREFERENCES_PREVIEW_SOUND,
|
||||
&preview_sound_auto_value);
|
||||
|
||||
eel_preferences_monitor_directory ("/desktop/gnome/sound");
|
||||
eel_preferences_add_auto_boolean ("/desktop/gnome/sound/enable_esd",
|
||||
&gnome_esd_enabled_auto_value);
|
||||
|
||||
setup_sound_preview = TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue