- Rebase fade patch to apply with Behdad's updates to g-s-d
This commit is contained in:
parent
48b6d65fbc
commit
ca3e0300e1
@ -1,96 +0,0 @@
|
||||
diff -up gnome-settings-daemon-2.24.0/plugins/background/gsd-background-manager.c.fade gnome-settings-daemon-2.24.0/plugins/background/gsd-background-manager.c
|
||||
--- gnome-settings-daemon-2.24.0/plugins/background/gsd-background-manager.c.fade 2008-08-04 10:25:52.000000000 -0400
|
||||
+++ gnome-settings-daemon-2.24.0/plugins/background/gsd-background-manager.c 2008-10-14 15:50:08.000000000 -0400
|
||||
@@ -155,7 +155,8 @@ nautilus_is_running (void)
|
||||
}
|
||||
|
||||
static void
|
||||
-draw_background (GsdBackgroundManager *manager)
|
||||
+draw_background (GsdBackgroundManager *manager,
|
||||
+ gboolean use_crossfade)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
int n_screens;
|
||||
@@ -185,7 +186,15 @@ draw_background (GsdBackgroundManager *m
|
||||
gdk_screen_get_height (screen),
|
||||
TRUE);
|
||||
|
||||
- gnome_bg_set_pixmap_as_root (screen, pixmap);
|
||||
+ if (use_crossfade) {
|
||||
+ GnomeBGCrossfade *fade;
|
||||
+
|
||||
+ fade = gnome_bg_set_pixmap_as_root_with_crossfade (screen, pixmap, NULL);
|
||||
+ g_signal_connect (fade, "finished",
|
||||
+ G_CALLBACK (g_object_unref), NULL);
|
||||
+ } else {
|
||||
+ gnome_bg_set_pixmap_as_root (screen, pixmap);
|
||||
+ }
|
||||
|
||||
g_object_unref (pixmap);
|
||||
}
|
||||
@@ -197,7 +206,7 @@ static gboolean
|
||||
queue_draw_background (GsdBackgroundManager *manager)
|
||||
{
|
||||
manager->priv->timeout_id = 0;
|
||||
- draw_background (manager);
|
||||
+ draw_background (manager, TRUE);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -205,7 +214,14 @@ static void
|
||||
on_bg_changed (GnomeBG *bg,
|
||||
GsdBackgroundManager *manager)
|
||||
{
|
||||
- draw_background (manager);
|
||||
+ draw_background (manager, TRUE);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+on_bg_transitioned (GnomeBG *bg,
|
||||
+ GsdBackgroundManager *manager)
|
||||
+{
|
||||
+ draw_background (manager, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -252,9 +268,12 @@ gsd_background_manager_start (GsdBackgro
|
||||
G_CALLBACK (on_bg_changed),
|
||||
manager);
|
||||
|
||||
+ g_signal_connect (manager->priv->bg,
|
||||
+ "transitioned",
|
||||
+ G_CALLBACK (on_bg_transitioned),
|
||||
+ manager);
|
||||
+
|
||||
watch_bg_preferences (manager);
|
||||
- gnome_bg_load_from_preferences (manager->priv->bg,
|
||||
- manager->priv->client);
|
||||
|
||||
/* If this is set, nautilus will draw the background and is
|
||||
* almost definitely in our session. however, it may not be
|
||||
@@ -266,14 +285,22 @@ gsd_background_manager_start (GsdBackgro
|
||||
nautilus_show_desktop = gconf_client_get_bool (manager->priv->client,
|
||||
"/apps/nautilus/preferences/show_desktop",
|
||||
NULL);
|
||||
+ if (nautilus_show_desktop) {
|
||||
+
|
||||
+ gnome_bg_ignore_changes (manager->priv->bg, TRUE);
|
||||
+
|
||||
+ gnome_bg_load_from_preferences (manager->priv->bg,
|
||||
+ manager->priv->client);
|
||||
+
|
||||
+ gnome_bg_ignore_changes (manager->priv->bg, FALSE);
|
||||
|
||||
- if (!nautilus_show_desktop) {
|
||||
- draw_background (manager);
|
||||
- } else {
|
||||
/* even when nautilus is supposedly handling the
|
||||
* background, apply the settings eventually to make
|
||||
* people running a nautilus-less session happy */
|
||||
manager->priv->timeout_id = g_timeout_add_seconds (8, (GSourceFunc)queue_draw_background, manager);
|
||||
+ } else {
|
||||
+ gnome_bg_load_from_preferences (manager->priv->bg,
|
||||
+ manager->priv->client);
|
||||
}
|
||||
|
||||
gnome_settings_profile_end (NULL);
|
93
gnome-settings-daemon-2.25.2-fade.patch
Normal file
93
gnome-settings-daemon-2.25.2-fade.patch
Normal file
@ -0,0 +1,93 @@
|
||||
============================================================
|
||||
Don't draw_background immediately when nautilus is disabled
|
||||
|
||||
gnome_bg_load_from_preferences forces a "changed" signal
|
||||
to get emitted which will queue a draw anyway
|
||||
|
||||
diff --git a/plugins/background/gsd-background-manager.c b/plugins/background/gsd-background-manager.c
|
||||
--- a/plugins/background/gsd-background-manager.c
|
||||
+++ b/plugins/background/gsd-background-manager.c
|
||||
@@ -277,7 +277,6 @@ gsd_background_manager_start (GsdBackgroundManager *manager,
|
||||
|
||||
if (!nautilus_show_desktop) {
|
||||
setup_bg (manager);
|
||||
- draw_background (manager);
|
||||
} else {
|
||||
/* even when nautilus is supposedly handling the
|
||||
* background, apply the settings eventually to make
|
||||
|
||||
============================================================
|
||||
Add crossfade transition when switching bgs
|
||||
|
||||
This uses the new gnome-desktop api for doing
|
||||
crossfades between backgrounds. This only
|
||||
matters if nautilus isn't running, since
|
||||
otherwise, it would manage the crossfade.
|
||||
|
||||
diff --git a/plugins/background/gsd-background-manager.c b/plugins/background/gsd-background-manager.c
|
||||
--- a/plugins/background/gsd-background-manager.c
|
||||
+++ b/plugins/background/gsd-background-manager.c
|
||||
@@ -155,7 +155,8 @@ nautilus_is_running (void)
|
||||
}
|
||||
|
||||
static void
|
||||
-draw_background (GsdBackgroundManager *manager)
|
||||
+draw_background (GsdBackgroundManager *manager,
|
||||
+ gboolean use_crossfade)
|
||||
{
|
||||
GdkDisplay *display;
|
||||
int n_screens;
|
||||
@@ -185,7 +186,15 @@ draw_background (GsdBackgroundManager *manager)
|
||||
gdk_screen_get_height (screen),
|
||||
TRUE);
|
||||
|
||||
- gnome_bg_set_pixmap_as_root (screen, pixmap);
|
||||
+ if (use_crossfade) {
|
||||
+ GnomeBGCrossfade *fade;
|
||||
+
|
||||
+ fade = gnome_bg_set_pixmap_as_root_with_crossfade (screen, pixmap, NULL);
|
||||
+ g_signal_connect (fade, "finished",
|
||||
+ G_CALLBACK (g_object_unref), NULL);
|
||||
+ } else {
|
||||
+ gnome_bg_set_pixmap_as_root (screen, pixmap);
|
||||
+ }
|
||||
|
||||
g_object_unref (pixmap);
|
||||
}
|
||||
@@ -197,7 +206,14 @@ static void
|
||||
on_bg_changed (GnomeBG *bg,
|
||||
GsdBackgroundManager *manager)
|
||||
{
|
||||
- draw_background (manager);
|
||||
+ draw_background (manager, TRUE);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+on_bg_transitioned (GnomeBG *bg,
|
||||
+ GsdBackgroundManager *manager)
|
||||
+{
|
||||
+ draw_background (manager, FALSE);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -239,6 +255,11 @@ setup_bg (GsdBackgroundManager *manager)
|
||||
G_CALLBACK (on_bg_changed),
|
||||
manager);
|
||||
|
||||
+ g_signal_connect (manager->priv->bg,
|
||||
+ "transitioned",
|
||||
+ G_CALLBACK (on_bg_transitioned),
|
||||
+ manager);
|
||||
+
|
||||
watch_bg_preferences (manager);
|
||||
gnome_bg_load_from_preferences (manager->priv->bg,
|
||||
manager->priv->client);
|
||||
@@ -249,7 +270,7 @@ queue_draw_background (GsdBackgroundManager *manager)
|
||||
{
|
||||
manager->priv->timeout_id = 0;
|
||||
setup_bg (manager);
|
||||
- draw_background (manager);
|
||||
+ draw_background (manager, FALSE);
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
Name: gnome-settings-daemon
|
||||
Version: 2.25.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: The daemon sharing settings from GNOME to GTK+/KDE applications
|
||||
|
||||
Group: System Environment/Daemons
|
||||
@ -37,7 +37,7 @@ Patch6: gnome-settings-daemon-2.25.1-drop-sample-cache.patch
|
||||
Patch7: gnome-settings-daemon-2.23.91-fnf7-cycle.patch
|
||||
|
||||
# http://bugzilla.gnome.org/show_bug.cgi?id=552857
|
||||
Patch8: gnome-settings-daemon-2.24.0-fade.patch
|
||||
Patch8: gnome-settings-daemon-2.25.2-fade.patch
|
||||
|
||||
%description
|
||||
A daemon to share settings from GNOME to other applications. It also
|
||||
@ -163,6 +163,10 @@ fi
|
||||
%{_libdir}/pkgconfig/gnome-settings-daemon.pc
|
||||
|
||||
%changelog
|
||||
* Thu Dec 4 2008 Ray Strode <rstrode@redhat.com> - 2.25.2-2
|
||||
- Rebase fade patch to apply with Behdad's updates to
|
||||
g-s-d
|
||||
|
||||
* Wed Dec 3 2008 Matthias Clasen <mclasen@redhat.com> - 2.25.2-1
|
||||
- Ypdate to 2.25.2
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user