rpms/eel2/F-10 eel-2.24.0-fade.patch,1.4,1.5 eel2.spec,1.107,1.108
Ray Strode
rstrode at fedoraproject.org
Mon Dec 8 21:54:14 UTC 2008
- Previous message (by thread): rpms/kdeutils/devel kdeutils.spec,1.151,1.152
- Next message (by thread): rpms/jakarta-commons-cli/F-10 .cvsignore, 1.2, 1.3 jakarta-commons-cli.spec, 1.8, 1.9 sources, 1.2, 1.3 jakarta-commons-cli-crosslink.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: rstrode
Update of /cvs/pkgs/rpms/eel2/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv9197
Modified Files:
eel-2.24.0-fade.patch eel2.spec
Log Message:
- Fix slideshows (bug 474876)
eel-2.24.0-fade.patch:
Index: eel-2.24.0-fade.patch
===================================================================
RCS file: /cvs/pkgs/rpms/eel2/F-10/eel-2.24.0-fade.patch,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- eel-2.24.0-fade.patch 22 Oct 2008 21:48:12 -0000 1.4
+++ eel-2.24.0-fade.patch 8 Dec 2008 21:53:43 -0000 1.5
@@ -1,45 +1,59 @@
-diff -up eel-2.24.1/eel/eel-background.c.fade eel-2.24.1/eel/eel-background.c
---- eel-2.24.1/eel/eel-background.c.fade 2008-10-06 13:20:45.000000000 -0400
-+++ eel-2.24.1/eel/eel-background.c 2008-10-22 17:44:20.000000000 -0400
-@@ -43,6 +43,9 @@
- #include <stdio.h>
- #define GNOME_DESKTOP_USE_UNSTABLE_API
- #include <libgnomeui/gnome-bg.h>
-+#include <gdk/gdkx.h>
-+
-+#include <cairo-xlib.h>
-
- static void eel_background_class_init (gpointer klass);
- static void eel_background_init (gpointer object,
-@@ -78,6 +81,7 @@ struct EelBackgroundDetails {
- /* Realized data: */
- gboolean background_changes_with_size;
- GdkPixmap *background_pixmap;
-+ GnomeBGCrossfade *fade;
- int background_entire_width;
- int background_entire_height;
- GdkColor default_color;
-@@ -189,6 +193,12 @@ eel_background_finalize (GObject *object
- background->details->background_pixmap = NULL;
- }
+============================================================
+ Listen for new "transitioned" signal and react
+
+ We now emit "transitioned" when switching frames
+in a slide show instead of "changed" so we could
+potentially apply a crossfade when switching
+backgrounds but not interfere with the slide
+show transitions.
+
+diff --git a/eel/eel-background.c b/eel/eel-background.c
+--- a/eel/eel-background.c
++++ b/eel/eel-background.c
+@@ -143,6 +143,13 @@ on_bg_changed (GnomeBG *bg, EelBackground *background)
+ }
-+ if (background->details->fade != NULL) {
-+ gnome_bg_crossfade_stop (background->details->fade);
-+ g_object_unref (background->details->fade);
-+ background->details->fade = NULL;
-+ }
+ static void
++on_bg_transitioned (GnomeBG *bg, EelBackground *background)
++{
++ g_signal_emit (G_OBJECT (background),
++ signals[APPEARANCE_CHANGED], 0);
++}
+
- g_free (background->details);
++static void
+ eel_background_init (gpointer object, gpointer klass)
+ {
+ EelBackground *background;
+@@ -157,6 +164,8 @@ eel_background_init (gpointer object, gpointer klass)
- EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
-@@ -611,25 +621,66 @@ eel_background_reset (EelBackground *bac
+ g_signal_connect (background->details->bg, "changed",
+ G_CALLBACK (on_bg_changed), background);
++ g_signal_connect (background->details->bg, "transitioned",
++ G_CALLBACK (on_bg_transitioned), background);
+
+ }
+
+
+============================================================
+ Move root window setup to independent function
+
+ Previously it was called open coded in
+eel_background_set_up_widget (). We're going to
+need to delay calling it in some cases later
+when we add the cross fade transitions, so better
+to factor it out now.
+
+diff --git a/eel/eel-background.c b/eel/eel-background.c
+--- a/eel/eel-background.c
++++ b/eel/eel-background.c
+@@ -620,11 +620,38 @@ eel_background_reset (EelBackground *background)
}
static void
+set_root_pixmap (EelBackground *background,
+ GdkWindow *window)
+{
-+ GdkPixmap *pixmap;
++ GdkPixmap *pixmap, *root_pixmap;
+ GdkScreen *screen;
+ GdkColor color;
+ gboolean changes_with_size;
@@ -50,10 +64,228 @@
+ &changes_with_size);
+ screen = gdk_drawable_get_screen (window);
+
++ if (background->details->use_common_pixmap) {
++ root_pixmap = g_object_ref (pixmap);
++ } else {
++ root_pixmap = gnome_bg_create_pixmap (background->details->bg, window,
++ gdk_screen_get_width (screen), gdk_screen_get_height (screen), TRUE);
++ }
++
+ gnome_bg_set_pixmap_as_root (screen, pixmap);
++
+ g_object_unref (pixmap);
++ g_object_unref (root_pixmap);
+}
+
++static void
+ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
+ {
+ GtkStyle *style;
+ GdkPixmap *pixmap;
+- GdkPixmap *root_pixmap;
+ GdkColor color;
+
+ int window_width;
+@@ -666,18 +693,7 @@ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
+ gnome_bg_changes_with_size (background->details->bg);
+
+ if (background->details->is_desktop) {
+-
+- root_pixmap = NULL;
+-
+- if (background->details->use_common_pixmap) {
+- root_pixmap = g_object_ref (pixmap);
+- } else {
+- root_pixmap = gnome_bg_create_pixmap (background->details->bg, window,
+- window_width, window_height, TRUE);
+- }
+-
+- gnome_bg_set_pixmap_as_root (gdk_drawable_get_screen (window), root_pixmap);
+- g_object_unref (root_pixmap);
++ set_root_pixmap (background, window);
+ }
+
+ if (pixmap) {
+
+============================================================
+ Compress multiple background change requests into 1
+
+ We may end up in a situation where we need to deal
+with a few different things trying to change the
+background at the same time in quick succession.
+This change avoids duplicated effort by deferring
+the work to an idle handler.
+
+diff --git a/eel/eel-background.c b/eel/eel-background.c
+--- a/eel/eel-background.c
++++ b/eel/eel-background.c
+@@ -90,6 +90,7 @@ struct EelBackgroundDetails {
+ gulong screen_size_handler;
+ /* Can we use common pixmap for root window and desktop window */
+ gboolean use_common_pixmap;
++ guint change_idle_id;
+ };
+
+ static void
+@@ -701,13 +702,35 @@ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
+ }
+ }
+
+-static void
+-eel_widget_background_changed (GtkWidget *widget, EelBackground *background)
++static gboolean
++on_background_changed (GtkWidget *widget)
+ {
++ EelBackground *background;
++
++ background = eel_get_widget_background (widget);
++
++ background->details->change_idle_id = 0;
++
+ eel_background_unrealize (background);
+ eel_background_set_up_widget (background, widget);
+
+ gtk_widget_queue_draw (widget);
++
++ return FALSE;
++}
++
++static void
++eel_widget_queue_background_change (GtkWidget *widget)
++{
++ EelBackground *background;
++
++ background = eel_get_widget_background (widget);
++
++ if (background->details->change_idle_id > 0) {
++ return;
++ }
++
++ background->details->change_idle_id = g_idle_add ((GSourceFunc) on_background_changed, widget);
+ }
+
+ /* Callback used when the style of a widget changes. We have to regenerate its
+@@ -720,7 +743,7 @@ widget_style_set_cb (GtkWidget *widget, GtkStyle *previous_style, gpointer data)
+
+ background = EEL_BACKGROUND (data);
+
+- eel_widget_background_changed (widget, background);
++ eel_widget_queue_background_change (widget);
+ }
+
+ static void
+@@ -844,8 +867,8 @@ eel_get_widget_background (GtkWidget *widget)
+
+ /* Arrange to get the signal whenever the background changes. */
+ g_signal_connect_object (background, "appearance_changed",
+- G_CALLBACK (eel_widget_background_changed), widget, G_CONNECT_SWAPPED);
+- eel_widget_background_changed (widget, background);
++ G_CALLBACK (eel_widget_queue_background_change), widget, G_CONNECT_SWAPPED);
++ eel_widget_queue_background_change (widget);
+
+ g_signal_connect_object (widget, "style_set",
+ G_CALLBACK (widget_style_set_cb),
+
+============================================================
+ Store widget in background details
+
+ It will get used in various places, so keeping
+it around simplifies things. Note, backgrounds
+are already tied to the lifetime of their widgets
+by a g_object_set_data_full call, so we don't need
+to worry about nullifying the assignment later,
+or taking a reference.
+
+diff --git a/eel/eel-background.c b/eel/eel-background.c
+--- a/eel/eel-background.c
++++ b/eel/eel-background.c
+@@ -74,6 +74,7 @@ struct EelBackgroundDetails {
+ char *color;
+
+ GnomeBG *bg;
++ GtkWidget *widget;
+
+ /* Realized data: */
+ gboolean background_changes_with_size;
+@@ -864,6 +865,7 @@ eel_get_widget_background (GtkWidget *widget)
+ gtk_object_sink (GTK_OBJECT (background));
+ g_object_set_data_full (G_OBJECT (widget), "eel_background",
+ background, g_object_unref);
++ background->details->widget = widget;
+
+ /* Arrange to get the signal whenever the background changes. */
+ g_signal_connect_object (background, "appearance_changed",
+
+============================================================
+ Add the crossfade transition
+
+
+diff --git a/eel/eel-background.c b/eel/eel-background.c
+--- a/eel/eel-background.c
++++ b/eel/eel-background.c
+@@ -54,6 +54,9 @@ static GdkPixmap *eel_background_get_pixmap_and_color (EelBackground *backg
+ gboolean *changes_with_size);
+ static void set_image_properties (EelBackground *background);
+
++static void init_fade (EelBackground *background, GtkWidget *widget);
++static void free_fade (EelBackground *background);
++
+ EEL_CLASS_BOILERPLATE (EelBackground, eel_background, GTK_TYPE_OBJECT)
+
+ enum {
+@@ -79,6 +82,7 @@ struct EelBackgroundDetails {
+ /* Realized data: */
+ gboolean background_changes_with_size;
+ GdkPixmap *background_pixmap;
++ GnomeBGCrossfade *fade;
+ int background_entire_width;
+ int background_entire_height;
+ GdkColor default_color;
+@@ -140,6 +144,7 @@ eel_background_class_init (gpointer klass)
+ static void
+ on_bg_changed (GnomeBG *bg, EelBackground *background)
+ {
++ init_fade (background, background->details->widget);
+ g_signal_emit (G_OBJECT (background),
+ signals[APPEARANCE_CHANGED], 0);
+ }
+@@ -147,6 +152,7 @@ on_bg_changed (GnomeBG *bg, EelBackground *background)
+ static void
+ on_bg_transitioned (GnomeBG *bg, EelBackground *background)
+ {
++ free_fade (background);
+ g_signal_emit (G_OBJECT (background),
+ signals[APPEARANCE_CHANGED], 0);
+ }
+@@ -186,6 +192,15 @@ eel_background_remove_current_image (EelBackground *background)
+ }
+
+ static void
++free_fade (EelBackground *background)
++{
++ if (background->details->fade != NULL) {
++ g_object_unref (background->details->fade);
++ background->details->fade = NULL;
++ }
++}
++
++static void
+ eel_background_finalize (GObject *object)
+ {
+ EelBackground *background;
+@@ -200,6 +215,8 @@ eel_background_finalize (GObject *object)
+ background->details->background_pixmap = NULL;
+ }
+
++ free_fade (background);
++
+ g_free (background->details);
+
+ EEL_CALL_PARENT (G_OBJECT_CLASS, finalize, (object));
+@@ -649,6 +666,33 @@ set_root_pixmap (EelBackground *background,
+ g_object_unref (root_pixmap);
+ }
+
+static gboolean
+fade_to_pixmap (EelBackground *background,
+ GdkWindow *window,
@@ -80,32 +312,19 @@
+ return gnome_bg_crossfade_is_started (background->details->fade);
+}
+
-+static void
++
+ static void
eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
{
- GtkStyle *style;
- GdkPixmap *pixmap;
-- GdkPixmap *root_pixmap;
- GdkColor color;
+@@ -661,6 +705,7 @@ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
-- int window_width;
-- int window_height;
--
GdkWindow *window;
gboolean changes_with_size;
+ gboolean in_fade;
-+ gboolean was_started;
if (!GTK_WIDGET_REALIZED (widget)) {
return;
- }
-
-- drawable_get_adjusted_size (background, widget->window, &window_width, &window_height);
--
- pixmap = eel_background_get_pixmap_and_color (background,
- widget->window,
- &color,
-@@ -645,30 +696,26 @@ eel_background_set_up_widget (EelBackgro
+@@ -683,18 +728,25 @@ eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
window = widget->window;
}
@@ -122,110 +341,65 @@
gdk_window_set_back_pixmap (window, NULL, FALSE);
gdk_window_set_background (window, &color);
}
--
-+ }
-
++ }
+
+-
background->details->background_changes_with_size =
gnome_bg_changes_with_size (background->details->bg);
- if (background->details->is_desktop) {
--
-- root_pixmap = NULL;
--
-- if (background->details->use_common_pixmap) {
-- root_pixmap = g_object_ref (pixmap);
-- } else {
-- root_pixmap = gnome_bg_create_pixmap (background->details->bg, window,
-- window_width, window_height, TRUE);
-- }
--
-- gnome_bg_set_pixmap_as_root (gdk_drawable_get_screen (window), root_pixmap);
-- g_object_unref (root_pixmap);
+ if (background->details->is_desktop && !in_fade) {
-+ set_root_pixmap (background, window);
+ set_root_pixmap (background, window);
}
- if (pixmap) {
-@@ -677,8 +724,39 @@ eel_background_set_up_widget (EelBackgro
+@@ -707,7 +759,7 @@ static gboolean
+ on_background_changed (GtkWidget *widget)
+ {
+ EelBackground *background;
+-
++
+ background = eel_get_widget_background (widget);
+
+ background->details->change_idle_id = 0;
+@@ -721,10 +773,40 @@ on_background_changed (GtkWidget *widget)
}
static void
-+free_fade (EelBackground *background)
++init_fade (EelBackground *background, GtkWidget *widget)
+{
-+ g_object_unref (background->details->fade);
-+ background->details->fade = NULL;
-+}
++ if (widget == NULL || !GTK_WIDGET_REALIZED (widget))
++ return;
+
-+static void
- eel_widget_background_changed (GtkWidget *widget, EelBackground *background)
- {
-+ if (GTK_WIDGET_REALIZED (widget)) {
-+ if (background->details->fade == NULL) {
-+ int old_width, old_height, width, height;
-+ /* If this was the result of a screen size change,
-+ * we don't want to crossfade
-+ */
-+ gdk_drawable_get_size (widget->window, &old_width, &old_height);
-+ drawable_get_adjusted_size (background, widget->window,
-+ &width, &height);
-+ if (old_width == width && old_height == height) {
-+ background->details->fade = gnome_bg_crossfade_new (width, height);
-+ g_signal_connect_swapped (background->details->fade,
-+ "finished",
-+ G_CALLBACK (free_fade),
-+ background);
-+ }
-+ }
++ if (background->details->fade == NULL) {
++ int old_width, old_height, width, height;
+
-+ if (background->details->fade != NULL && !gnome_bg_crossfade_is_started (background->details->fade)) {
-+ gnome_bg_crossfade_set_start_pixmap (background->details->fade,
-+ background->details->background_pixmap);
++ /* If this was the result of a screen size change,
++ * we don't want to crossfade
++ */
++ gdk_drawable_get_size (widget->window, &old_width, &old_height);
++ drawable_get_adjusted_size (background, widget->window,
++ &width, &height);
++ if (old_width == width && old_height == height) {
++ background->details->fade = gnome_bg_crossfade_new (width, height);
++ g_signal_connect_swapped (background->details->fade,
++ "finished",
++ G_CALLBACK (free_fade),
++ background);
+ }
+ }
+
- eel_background_unrealize (background);
- eel_background_set_up_widget (background, widget);
-
-@@ -701,10 +779,13 @@ widget_style_set_cb (GtkWidget *widget,
- static void
- screen_size_changed (GdkScreen *screen, EelBackground *background)
- {
-+ if (background->details->fade != NULL) {
-+ g_object_unref (background->details->fade);
-+ background->details->fade = NULL;
++ if (background->details->fade != NULL && !gnome_bg_crossfade_is_started (background->details->fade)) {
++ gnome_bg_crossfade_set_start_pixmap (background->details->fade,
++ background->details->background_pixmap);
+ }
- g_signal_emit (background, signals[APPEARANCE_CHANGED], 0);
- }
-
--
- static void
- widget_realized_setup (GtkWidget *widget, gpointer data)
++}
++
++static void
+ eel_widget_queue_background_change (GtkWidget *widget)
{
-@@ -715,6 +796,8 @@ widget_realized_setup (GtkWidget *widget
- if (background->details->is_desktop) {
- GdkWindow *root_window;
- GdkScreen *screen;
-+ GdkPixmap *start_pixmap;
-+ int width, height;
-
- screen = gtk_widget_get_screen (widget);
-
-@@ -734,6 +817,18 @@ widget_realized_setup (GtkWidget *widget
- } else {
- background->details->use_common_pixmap = FALSE;
- }
-+
-+ gdk_drawable_get_size (widget->window, &width, &height);
-+ background->details->fade = gnome_bg_crossfade_new (width, height);
-+ g_signal_connect_swapped (background->details->fade,
-+ "finished",
-+ G_CALLBACK (free_fade),
-+ background);
-+
-+ start_pixmap = gnome_bg_get_pixmap_from_root (screen);
-+ gnome_bg_crossfade_set_start_pixmap (background->details->fade, start_pixmap);
-+ g_object_unref (start_pixmap);
+ EelBackground *background;
+-
+
- }
- }
+ background = eel_get_widget_background (widget);
+ if (background->details->change_idle_id > 0) {
Index: eel2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/eel2/F-10/eel2.spec,v
retrieving revision 1.107
retrieving revision 1.108
diff -u -r1.107 -r1.108
--- eel2.spec 22 Oct 2008 21:48:12 -0000 1.107
+++ eel2.spec 8 Dec 2008 21:53:44 -0000 1.108
@@ -18,7 +18,7 @@
Name: eel2
Summary: Eazel Extensions Library
Version: 2.24.1
-Release: 3%{?dist}
+Release: 4%{?dist}
License: LGPLv2+
Group: System Environment/Libraries
Source: http://download.gnome.org/sources/eel/2.24/eel-%{version}.tar.bz2
@@ -115,6 +115,9 @@
%{_includedir}/eel-2
%changelog
+* Mon Dec 8 2008 Ray Strode <rstrode at redhat.com> - 2.24.1-4
+- Fix slideshows (bug 474876)
+
* Wed Oct 22 2008 Ray Strode <rstrode at redhat.com> - 2.24.1-3
- One more crack at not fading because of screen size changes
- Previous message (by thread): rpms/kdeutils/devel kdeutils.spec,1.151,1.152
- Next message (by thread): rpms/jakarta-commons-cli/F-10 .cvsignore, 1.2, 1.3 jakarta-commons-cli.spec, 1.8, 1.9 sources, 1.2, 1.3 jakarta-commons-cli-crosslink.patch, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list