rpms/eel2/devel eel-2.24.0-fade.patch, NONE, 1.1 eel2.spec, 1.102, 1.103 eel-2.23.92-fade.patch, 1.3, NONE

Ray Strode rstrode at fedoraproject.org
Sat Oct 4 21:14:19 UTC 2008


Author: rstrode

Update of /cvs/pkgs/rpms/eel2/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv17328

Modified Files:
	eel2.spec 
Added Files:
	eel-2.24.0-fade.patch 
Removed Files:
	eel-2.23.92-fade.patch 
Log Message:
- Fix problem in last patch that was preventing crossfades
  in appearance capplet


eel-2.24.0-fade.patch:

--- NEW FILE eel-2.24.0-fade.patch ---
diff -up eel-2.24.0/eel/eel-background.c.fade eel-2.24.0/eel/eel-background.c
--- eel-2.24.0/eel/eel-background.c.fade	2008-09-08 17:26:14.000000000 -0400
+++ eel-2.24.0/eel/eel-background.c	2008-10-04 17:09:02.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;
@@ -182,6 +186,11 @@ eel_background_finalize (GObject *object
 	background = EEL_BACKGROUND (object);
 
 	g_free (background->details->color);
+	if (background->details->fade != NULL) {
+		gnome_bg_crossfade_stop (background->details->fade);
+		g_object_unref (background->details->fade);
+		background->details->fade = NULL;
+	}
 	eel_background_remove_current_image (background);
 
 	if (background->details->background_pixmap != NULL) {
@@ -610,6 +619,26 @@ eel_background_reset (EelBackground *bac
 	g_signal_emit (GTK_OBJECT (background), signals[RESET], 0);
 }
 
+static gboolean
+fade_to_pixmap (EelBackground *background,
+		 GdkWindow     *window,
+		 GdkPixmap     *pixmap)
+{
+	if (background->details->fade == NULL) {
+		return FALSE;
+	}
+
+	if (!gnome_bg_crossfade_set_end_pixmap (background->details->fade,
+				                pixmap)) {
+		return FALSE;
+	}
+
+	if (!gnome_bg_crossfade_is_started (background->details->fade))
+		gnome_bg_crossfade_start (background->details->fade, window, NULL);
+
+	return gnome_bg_crossfade_is_started (background->details->fade);
+}
+
 static void
 eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
 {
@@ -644,14 +673,15 @@ eel_background_set_up_widget (EelBackgro
 	} else {
 		window = widget->window;
 	}
-
-	if (!changes_with_size || background->details->is_desktop) {
-		gdk_window_set_back_pixmap (window, pixmap, FALSE);
-	} else {
-		gdk_window_set_back_pixmap (window, NULL, FALSE);
-		gdk_window_set_background (window, &color);
+	if (background->details->fade == NULL ||
+	    !fade_to_pixmap (background, window, pixmap)) {
+		if (!changes_with_size || background->details->is_desktop) {
+			gdk_window_set_back_pixmap (window, pixmap, FALSE);
+		} else {
+			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);
@@ -679,6 +709,19 @@ eel_background_set_up_widget (EelBackgro
 static void
 eel_widget_background_changed (GtkWidget *widget, EelBackground *background)
 {
+	if (GTK_WIDGET_REALIZED (widget)) {
+		if (background->details->fade == NULL) {
+			int width, height;
+			gdk_drawable_get_size (widget->window, &width, &height);
+			background->details->fade = gnome_bg_crossfade_new (width, height);
+		}
+
+		if (!gnome_bg_crossfade_is_started (background->details->fade)) {
+			gnome_bg_crossfade_set_start_pixmap (background->details->fade,
+							     background->details->background_pixmap);
+		}
+	}
+
 	eel_background_unrealize (background);
 	eel_background_set_up_widget (background, widget);
 
@@ -745,7 +788,13 @@ widget_realize_cb (GtkWidget *widget, gp
 	background = EEL_BACKGROUND (data);
 
 	widget_realized_setup (widget, data);
-		
+
+	if (background->details->fade != NULL) {
+		gnome_bg_crossfade_stop (background->details->fade);
+		g_object_unref (background->details->fade);
+		background->details->fade = NULL;
+	}
+
 	eel_background_set_up_widget (background, widget);
 }
 


Index: eel2.spec
===================================================================
RCS file: /cvs/pkgs/rpms/eel2/devel/eel2.spec,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- eel2.spec	1 Oct 2008 16:59:39 -0000	1.102
+++ eel2.spec	4 Oct 2008 21:13:49 -0000	1.103
@@ -17,7 +17,7 @@
 Name:        eel2
 Summary:     Eazel Extensions Library
 Version:     2.24.0
-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
@@ -46,7 +46,7 @@
 BuildRequires: perl(XML::Parser)
 
 # http://bugzilla.gnome.org/show_bug.cgi?id=552859
-Patch0: eel-2.23.92-fade.patch
+Patch0: eel-2.24.0-fade.patch
 
 %description
 Eazel Extensions Library is a collection of widgets and functions for
@@ -113,6 +113,10 @@
 %{_includedir}/eel-2
 
 %changelog
+* Sat Oct  4 2008 Ray Strode <rstrode at redhat.com> - 2.24.0-4
+- Fix problem in last patch that was preventing crossfades
+  in appearance capplet
+
 * Wed Oct  1 2008 Ray Strode <rstrode at redhat.com> - 2.24.0-3
 - When a crossfade is in progress and another is requested,
   don't cancel the first but instead just change the


--- eel-2.23.92-fade.patch DELETED ---




More information about the scm-commits mailing list