gnome-panel r11393 - in trunk: gnome-panel libpanel-applet
- From: vuntz svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-panel r11393 - in trunk: gnome-panel libpanel-applet
- Date: Tue, 9 Dec 2008 11:32:58 +0000 (UTC)
Author: vuntz
Date: Tue Dec 9 11:32:58 2008
New Revision: 11393
URL: http://svn.gnome.org/viewvc/gnome-panel?rev=11393&view=rev
Log:
2008-12-09 Vincent Untz <vuntz gnome org>
* panel-background.c:
(panel_background_set_image_background_on_widget): don't use a cairo
matrix, we can do the same thing by just shifting the pixmap in
gdk_cairo_set_source_pixmap()
2008-12-09 Vincent Untz <vuntz gnome org>
* panel-applet.c: (panel_applet_get_pixmap): don't use a cairo matrix,
we can do the same thing by just shifting the pixmap in
gdk_cairo_set_source_pixmap()
Modified:
trunk/gnome-panel/ChangeLog
trunk/gnome-panel/panel-background.c
trunk/libpanel-applet/ChangeLog
trunk/libpanel-applet/panel-applet.c
Modified: trunk/gnome-panel/panel-background.c
==============================================================================
--- trunk/gnome-panel/panel-background.c (original)
+++ trunk/gnome-panel/panel-background.c Tue Dec 9 11:32:58 2008
@@ -1076,7 +1076,6 @@
GdkPixmap *pixmap;
cairo_t *cr;
cairo_pattern_t *pattern;
- cairo_matrix_t matrix;
GtkStyle *style;
bg_pixmap = panel_background_get_pixmap (background);
@@ -1089,14 +1088,11 @@
-1);
cr = gdk_cairo_create (GDK_DRAWABLE (pixmap));
- gdk_cairo_set_source_pixmap (cr, (GdkPixmap *) bg_pixmap, 0, 0);
+ gdk_cairo_set_source_pixmap (cr, (GdkPixmap *) bg_pixmap,
+ -widget->allocation.x,
+ -widget->allocation.y);
pattern = cairo_get_source (cr);
-
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
- cairo_matrix_init_translate (&matrix,
- widget->allocation.x,
- widget->allocation.y);
- cairo_pattern_set_matrix (pattern, &matrix);
cairo_rectangle (cr, 0, 0,
widget->allocation.width, widget->allocation.height);
Modified: trunk/libpanel-applet/panel-applet.c
==============================================================================
--- trunk/libpanel-applet/panel-applet.c (original)
+++ trunk/libpanel-applet/panel-applet.c Tue Dec 9 11:32:58 2008
@@ -42,7 +42,6 @@
#include <bonobo/bonobo-item-handler.h>
#include <bonobo/bonobo-shlib-factory.h>
#include <bonobo/bonobo-property-bag-client.h>
-#include <libgnome/gnome-program.h>
#include <gconf/gconf.h>
#include <gconf/gconf-client.h>
#include <X11/Xatom.h>
@@ -962,7 +961,6 @@
int height;
cairo_t *cr;
cairo_pattern_t *pattern;
- cairo_matrix_t matrix;
g_return_val_if_fail (PANEL_IS_APPLET (applet), NULL);
@@ -999,12 +997,9 @@
gdk_drawable_get_colormap (GTK_WIDGET (applet)->window));
cr = gdk_cairo_create (GDK_DRAWABLE (retval));
- gdk_cairo_set_source_pixmap (cr, pixmap, 0, 0);
+ gdk_cairo_set_source_pixmap (cr, pixmap, -x, -y);
pattern = cairo_get_source (cr);
-
cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
- cairo_matrix_init_translate (&matrix, x, y);
- cairo_pattern_set_matrix (pattern, &matrix);
cairo_rectangle (cr, 0, 0, width, height);
cairo_fill (cr);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]