avoid delays in background switching

This commit is contained in:
Matthias Clasen 2006-02-06 21:27:46 +00:00
parent fedc7b55a0
commit 15aea0d066
2 changed files with 37 additions and 1 deletions

31
background-no-delay.patch Normal file
View File

@ -0,0 +1,31 @@
--- nautilus-2.13.4/libnautilus-private/nautilus-directory-background.c.no-delays 2006-02-06 15:44:27.000000000 -0500
+++ nautilus-2.13.4/libnautilus-private/nautilus-directory-background.c 2006-02-06 15:52:58.000000000 -0500
@@ -319,15 +319,20 @@
guint notification_timeout_id;
background = EEL_BACKGROUND (data);
- /*
- * Wallpaper capplet changes picture, background color and placement with
- * gconf_change_set API, but unfortunately, this operation is not atomic in
- * GConf as it should be. So we update background after small timeout to
- * let GConf change all values.
- */
- notification_timeout_id = g_timeout_add (300, (GSourceFunc) call_settings_changed, background);
- g_object_set_data (G_OBJECT (background), "desktop_gconf_notification_timeout", GUINT_TO_POINTER (notification_timeout_id));
+ notification_timeout_id = GPOINTER_TO_UINT (g_object_get_data (G_OBJECT (background), "desktop_gconf_notification_timeout"));
+
+ if (strcmp (entry->key, "/desktop/gnome/background/stamp") == 0) {
+ if (notification_timeout_id != 0)
+ g_source_remove (notification_timeout_id);
+
+ call_settings_changed (background);
+ }
+ else if (notification_timeout_id == 0) {
+ notification_timeout_id = g_timeout_add (300, (GSourceFunc) call_settings_changed, background);
+
+ g_object_set_data (G_OBJECT (background), "desktop_gconf_notification_timeout", GUINT_TO_POINTER (notification_timeout_id));
+ }
}
static void

View File

@ -18,7 +18,7 @@
Name: nautilus
Summary: Nautilus is a file manager for GNOME.
Version: 2.13.90
Release: 1
Release: 2
License: GPL
Group: User Interface/Desktops
Source: ftp://ftp.gnome.org/pub/GNOME/sources/2.7/%{name}/%{name}-%{version}.tar.bz2
@ -82,6 +82,7 @@ Obsoletes: nautilus-media
# Some changes to default config
Patch1: nautilus-2.5.7-rhconfig.patch
Patch2: nautilus-2.13-format.patch
Patch3: background-no-delay.patch
%description
Nautilus integrates access to files, applications, media,
@ -95,6 +96,7 @@ GNOME desktop project.
%patch1 -p1 -b .rhconfig
%patch2 -p0 -b .format
%patch3 -p1 -b .no-delay
%build
@ -173,6 +175,9 @@ scrollkeeper-update
%{_includedir}/nautilus
%changelog
* Mon Feb 6 2006 Matthias Clasen <mclasen@redhat.com> - 2.13.90-2
- Avoid delays in rendering the background
* Tue Jan 31 2006 Matthias Clasen <mclasen@redhat.com> - 2.13.90-1
- Update to 2.13.90