rpms/eel2/devel eel2-2.18.0.1-gnome-bg.patch, 1.2, 1.3 eel2.spec, 1.67, 1.68
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Wed Apr 18 15:31:59 UTC 2007
- Previous message (by thread): rpms/hal/devel firewire-ioctl-changes.patch, NONE, 1.1 hal.spec, 1.128, 1.129
- Next message (by thread): rpms/booty/devel .cvsignore, 1.54, 1.55 booty.spec, 1.59, 1.60 sources, 1.58, 1.59
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: sandmann
Update of /cvs/dist/rpms/eel2/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv28097
Modified Files:
eel2-2.18.0.1-gnome-bg.patch eel2.spec
Log Message:
Fix reset, bug 234694
eel2-2.18.0.1-gnome-bg.patch:
eel-background.c | 1521 +++++---------------------------------------
eel-background.h | 89 --
eel-gdk-pixbuf-extensions.c | 2
3 files changed, 196 insertions(+), 1416 deletions(-)
Index: eel2-2.18.0.1-gnome-bg.patch
===================================================================
RCS file: /cvs/dist/rpms/eel2/devel/eel2-2.18.0.1-gnome-bg.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- eel2-2.18.0.1-gnome-bg.patch 20 Mar 2007 18:59:36 -0000 1.2
+++ eel2-2.18.0.1-gnome-bg.patch 18 Apr 2007 15:31:57 -0000 1.3
@@ -1,5 +1,5 @@
--- eel-2.18.0.1/eel/eel-background.h.gnome-bg 2007-01-03 03:49:22.000000000 -0500
-+++ eel-2.18.0.1/eel/eel-background.h 2007-03-19 20:10:32.000000000 -0400
++++ eel-2.18.0.1/eel/eel-background.h 2007-04-18 09:39:55.000000000 -0400
@@ -90,83 +90,29 @@
* size. This means that EelBackground can use background pixmaps
* even for backgrounds that otherwise would change when the size
@@ -126,7 +126,7 @@
* was successfully loaded or not.
*/
--- eel-2.18.0.1/eel/eel-gdk-pixbuf-extensions.c.gnome-bg 2007-01-03 03:49:22.000000000 -0500
-+++ eel-2.18.0.1/eel/eel-gdk-pixbuf-extensions.c 2007-03-19 20:10:32.000000000 -0400
++++ eel-2.18.0.1/eel/eel-gdk-pixbuf-extensions.c 2007-04-18 09:39:55.000000000 -0400
@@ -431,7 +431,7 @@
min_width, min_height,
&scaled_width, &scaled_height);
@@ -137,7 +137,7 @@
/**
--- eel-2.18.0.1/eel/eel-background.c.gnome-bg 2007-03-02 06:20:11.000000000 -0500
-+++ eel-2.18.0.1/eel/eel-background.c 2007-03-20 14:54:06.000000000 -0400
++++ eel-2.18.0.1/eel/eel-background.c 2007-04-18 09:47:01.000000000 -0400
@@ -37,71 +37,31 @@
#include <gtk/gtkprivate.h>
#include <gtk/gtkselection.h>
@@ -892,7 +892,7 @@
}
static void
-@@ -809,150 +255,67 @@
+@@ -809,152 +255,63 @@
}
background->details->background_entire_width = 0;
background->details->background_entire_height = 0;
@@ -1047,37 +1047,42 @@
-
+
eel_background_ensure_image_nonswapped (background);
--
-+
- start_color_spec = eel_gradient_get_start_color_spec (background->details->color);
+- start_color_spec = eel_gradient_get_start_color_spec (background->details->color);
+-
- if (start_color_spec && eel_gdk_color_parse (start_color_spec, &color))
- background->details->background_color = color;
- else {
-+ if (start_color_spec && eel_gdk_color_parse (start_color_spec, &color)) {
-+ background->details->default_color = color;
-+ } else {
- /* Get the widget to which the window belongs and its style as well */
- gdk_window_get_user_data (window, (void **) &widget);
- if (widget != NULL) {
- style = gtk_widget_get_style (widget);
- if (background->details->use_base) {
+- /* Get the widget to which the window belongs and its style as well */
+- gdk_window_get_user_data (window, (void **) &widget);
+- if (widget != NULL) {
+- style = gtk_widget_get_style (widget);
+- if (background->details->use_base) {
- background->details->background_color = style->base[GTK_STATE_NORMAL];
-+ background->details->default_color = style->base[GTK_STATE_NORMAL];
- } else {
+- } else {
- background->details->background_color = style->bg[GTK_STATE_NORMAL];
-+ background->details->default_color = style->bg[GTK_STATE_NORMAL];
- }
-+
-+ gdk_rgb_find_color (style->colormap, &(background->details->default_color));
+- }
++ /* Set the default color */
++
++ /* Get the widget to which the window belongs and its style as well */
++ gdk_window_get_user_data (window, (void **) &widget);
++ if (widget != NULL) {
++ style = gtk_widget_get_style (widget);
++ if (background->details->use_base) {
++ background->details->default_color = style->base[GTK_STATE_NORMAL];
++ } else {
++ background->details->default_color = style->bg[GTK_STATE_NORMAL];
}
++
++ gdk_rgb_find_color (style->colormap, &(background->details->default_color));
}
--
-+
- g_free (start_color_spec);
+- g_free (start_color_spec);
+-
/* If the pixmap doesn't change with the window size, never update
-@@ -975,44 +338,38 @@
+ * it again.
+ */
+@@ -975,44 +332,38 @@
}
changed = FALSE;
@@ -1141,7 +1146,7 @@
*changes_with_size = background->details->background_changes_with_size;
if (background->details->background_pixmap != NULL) {
-@@ -1039,18 +396,16 @@
+@@ -1039,18 +390,16 @@
if (event->window != widget->window) {
return;
}
@@ -1163,7 +1168,7 @@
if (!changes_with_size) {
/* The background was already drawn by X, since we set
* the GdkWindow background/back_pixmap.
-@@ -1087,319 +442,62 @@
+@@ -1087,319 +436,62 @@
}
}
@@ -1276,11 +1281,12 @@
- }
-}
-
--static void
+ static void
-canvas_draw_pixbuf_helper_alpha (art_u8 *dst, int dst_rowstride,
- const art_u8 *src, int src_rowstride,
- int copy_width, int copy_height)
--{
++set_image_properties (EelBackground *background)
+ {
- art_u8 *dst_limit = dst + copy_height * dst_rowstride;
- int dst_bytes_per_row = copy_width * 3;
-
@@ -1321,43 +1327,44 @@
- src += src_rowstride;
- }
-}
--
++ GnomeBGPlacement placement;
+
-/* Draws a pixbuf into a canvas update buffer (unscaled). The x,y coords are the location
- * of the pixbuf in canvas space (NOT relative to the canvas buffer).
- */
- static void
+-static void
-canvas_draw_pixbuf (EelCanvasBuf *buf, const GdkPixbuf *pixbuf, int x, int y)
-+set_image_properties (EelBackground *background)
- {
+-{
- art_u8 *dst;
- int pixbuf_width, pixbuf_height;
--
++ if (!background->details->color) {
++ gnome_bg_set_color (background->details->bg, GNOME_BG_COLOR_SOLID,
++ &background->details->default_color, NULL);
++ } else if (!eel_gradient_is_gradient (background->details->color)) {
++ GdkColor c;
+
- /* copy_left/top/right/bottom define the rect of the pixbuf (pixbuf relative)
- * we will copy into the canvas buffer
- */
- int copy_left, copy_top, copy_right, copy_bottom;
-
- dst = buf->buf;
-+ GnomeBGPlacement placement;
-
+-
- pixbuf_width = gdk_pixbuf_get_width (pixbuf);
- pixbuf_height = gdk_pixbuf_get_height (pixbuf);
-+ if (!background->details->color) {
-+ gnome_bg_set_color (background->details->bg, GNOME_BG_COLOR_SOLID,
-+ &background->details->default_color, NULL);
-+ } else if (!eel_gradient_is_gradient (background->details->color)) {
-+ GdkColor c;
-
+-
- if (x > buf->rect.x0) {
- copy_left = 0;
- dst += (x - buf->rect.x0) * 3;
- } else {
- copy_left = buf->rect.x0 - x;
- }
--
++ eel_gdk_color_parse_with_white_default (background->details->color, &c);
+
- if (x + pixbuf_width > buf->rect.x1) {
- copy_right = buf->rect.x1 - x;
-- } else {
++ gnome_bg_set_color (background->details->bg, GNOME_BG_COLOR_SOLID, &c, NULL);
+ } else {
- copy_right = pixbuf_width;
- }
-
@@ -1371,18 +1378,23 @@
- } else {
- copy_top = buf->rect.y0 - y;
- }
-+ eel_gdk_color_parse_with_white_default (background->details->color, &c);
-
+-
- if (y + pixbuf_height > buf->rect.y1) {
- copy_bottom = buf->rect.y1 - y;
- } else {
- copy_bottom = pixbuf_height;
- }
--
++ GdkColor c1;
++ GdkColor c2;
++ char *spec;
+
- if (copy_top >= copy_bottom) {
- return;
- }
--
++ spec = eel_gradient_get_start_color_spec (background->details->color);
++ eel_gdk_color_parse_with_white_default (spec, &c1);
++ g_free (spec);
+
- if (gdk_pixbuf_get_has_alpha (pixbuf)) {
- canvas_draw_pixbuf_helper_alpha (
- dst,
@@ -1391,8 +1403,7 @@
- gdk_pixbuf_get_rowstride (pixbuf),
- copy_right - copy_left,
- copy_bottom - copy_top);
-+ gnome_bg_set_color (background->details->bg, GNOME_BG_COLOR_SOLID, &c, NULL);
- } else {
+- } else {
- canvas_draw_pixbuf_helper (
- dst,
- buf->buf_rowstride,
@@ -1403,10 +1414,7 @@
- }
-}
-
-+ GdkColor c1;
-+ GdkColor c2;
-+ char *spec;
-
+-
-/* fill the canvas buffer with a tiled pixbuf */
-static void
-draw_pixbuf_tiled_aa (GdkPixbuf *pixbuf, EelCanvasBuf *buffer)
@@ -1420,8 +1428,8 @@
-
- start_x = buffer->rect.x0 - (buffer->rect.x0 % tile_width);
- start_y = buffer->rect.y0 - (buffer->rect.y0 % tile_height);
-+ spec = eel_gradient_get_start_color_spec (background->details->color);
-+ eel_gdk_color_parse_with_white_default (spec, &c1);
++ spec = eel_gradient_get_end_color_spec (background->details->color);
++ eel_gdk_color_parse_with_white_default (spec, &c2);
+ g_free (spec);
- for (y = start_y; y < buffer->rect.y1; y += tile_height) {
@@ -1430,10 +1438,7 @@
- }
- }
-}
-+ spec = eel_gradient_get_end_color_spec (background->details->color);
-+ eel_gdk_color_parse_with_white_default (spec, &c2);
-+ g_free (spec);
-
+-
-/* draw the background on the anti-aliased canvas */
-static void
-eel_background_draw_aa (EelBackground *background, EelCanvasBuf *buffer)
@@ -1526,7 +1531,7 @@
}
char *
-@@ -1418,22 +516,6 @@
+@@ -1418,22 +510,6 @@
return g_strdup (background->details->image_uri);
}
@@ -1549,7 +1554,7 @@
/* Use style->base as the default color instead of bg */
void
eel_background_set_use_base (EelBackground *background,
-@@ -1446,106 +528,25 @@
+@@ -1446,106 +522,25 @@
eel_background_set_color (EelBackground *background,
const char *color)
{
@@ -1558,14 +1563,20 @@
- if (!eel_background_image_totally_obscures (background)) {
- g_signal_emit (GTK_OBJECT (background), signals[APPEARANCE_CHANGED], 0);
- }
-- }
--}
--
--static void
++ if (eel_strcmp (background->details->color, color) != 0) {
++ g_free (background->details->color);
++ background->details->color = g_strdup (color);
++
++ set_image_properties (background);
+ }
+ }
+
+ static void
-eel_background_load_image_callback (GnomeVFSResult error,
- GdkPixbuf *pixbuf,
- gpointer callback_data)
--{
++eel_background_reload_image (EelBackground *background)
+ {
- EelBackground *background;
-
- background = EEL_BACKGROUND (callback_data);
@@ -1616,19 +1627,13 @@
- eel_cancel_gdk_pixbuf_load (background->details->load_image_handle);
- background->details->load_image_handle = NULL;
- g_signal_emit (GTK_OBJECT (background), signals[IMAGE_LOADING_DONE], 0, FALSE);
-+ if (eel_strcmp (background->details->color, color) != 0) {
-+ g_free (background->details->color);
-+ background->details->color = g_strdup (color);
-+
-+ set_image_properties (background);
- }
- }
-
- static void
+- }
+-}
+-
+-static void
-eel_background_start_loading_image (EelBackground *background, gboolean emit_appearance_change,
- gboolean load_async)
-+eel_background_reload_image (EelBackground *background)
- {
+-{
- GdkPixbuf *pixbuf;
- background->details->emit_after_load = emit_appearance_change;
-
@@ -1664,7 +1669,7 @@
{
time_t mtime;
GnomeVFSFileInfo *info;
-@@ -1563,12 +564,9 @@
+@@ -1563,12 +558,9 @@
}
if (eel_strcmp (background->details->image_uri, image_uri) == 0 &&
mtime == background->details->image_mtime) {
@@ -1677,7 +1682,7 @@
g_free (background->details->image_uri);
background->details->image_uri = g_strdup (image_uri);
background->details->image_mtime = mtime;
-@@ -1578,55 +576,27 @@
+@@ -1578,55 +570,27 @@
* current image can be used if an update is needed before the load completes.
*/
@@ -1738,7 +1743,7 @@
}
/* Use this fn to set both the image and color and avoid flash. The color isn't
-@@ -1634,37 +604,22 @@
+@@ -1634,37 +598,22 @@
* before then, it will use the old color and image.
*/
static void
@@ -1785,7 +1790,7 @@
}
void
-@@ -1676,7 +631,7 @@
+@@ -1676,7 +625,7 @@
* We rely on eel_background_set_image_uri_and_color to emit
* the SETTINGS_CHANGED & APPEARANCE_CHANGE signals.
*/
@@ -1794,7 +1799,7 @@
eel_background_set_image_uri_and_color (background, action, image_uri, NULL);
}
-@@ -1695,18 +650,6 @@
+@@ -1695,18 +644,6 @@
|| background->details->image_uri != NULL;
}
@@ -1813,7 +1818,7 @@
/**
* eel_background_reset:
*
-@@ -1725,39 +668,24 @@
+@@ -1725,39 +662,24 @@
eel_background_set_up_widget (EelBackground *background, GtkWidget *widget)
{
GtkStyle *style;
@@ -1855,7 +1860,7 @@
&color,
&changes_with_size);
-@@ -1770,8 +698,8 @@
+@@ -1770,8 +692,8 @@
} else {
window = widget->window;
}
@@ -1866,7 +1871,7 @@
gdk_window_set_back_pixmap (window, pixmap, FALSE);
} else {
gdk_window_set_back_pixmap (window, NULL, FALSE);
-@@ -1779,34 +707,23 @@
+@@ -1779,34 +701,23 @@
}
@@ -1911,7 +1916,7 @@
if (pixmap) {
g_object_unref (pixmap);
-@@ -1837,7 +754,7 @@
+@@ -1837,7 +748,7 @@
static void
screen_size_changed (GdkScreen *screen, EelBackground *background)
@@ -1920,7 +1925,7 @@
g_signal_emit (background, signals[APPEARANCE_CHANGED], 0);
}
-@@ -1975,70 +892,12 @@
+@@ -1975,70 +886,12 @@
return background;
}
@@ -1992,7 +1997,7 @@
}
/* handle dropped colors */
-@@ -2117,4 +976,4 @@
+@@ -2117,4 +970,4 @@
gtk_object_sink (GTK_OBJECT (background));
}
Index: eel2.spec
===================================================================
RCS file: /cvs/dist/rpms/eel2/devel/eel2.spec,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- eel2.spec 20 Mar 2007 18:59:36 -0000 1.67
+++ eel2.spec 18 Apr 2007 15:31:57 -0000 1.68
@@ -16,7 +16,7 @@
Name: eel2
Summary: Eazel Extensions Library
Version: 2.18.0.1
-Release: 3%{?dist}
+Release: 4%{?dist}
License: LGPL
Group: System Environment/Libraries
Source: eel-%{version}.tar.bz2
@@ -115,6 +115,9 @@
%{_includedir}/eel-2
%changelog
+* Wed Apr 18 2007 Soren Sandmann <sandmann at redhat.com> - 2.18.0.1-4
+- Fix bug in gnome-bg patch where resetting backgrounds didn't work.
+
* Tue Mar 20 2007 Soren Sandmann <sandmann at redhat.com> - 2.18.0.1-3
- Fix bug in gnome-bg patch where backgrounds would get an uninitialized
color.
- Previous message (by thread): rpms/hal/devel firewire-ioctl-changes.patch, NONE, 1.1 hal.spec, 1.128, 1.129
- Next message (by thread): rpms/booty/devel .cvsignore, 1.54, 1.55 booty.spec, 1.59, 1.60 sources, 1.58, 1.59
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list