2010-07-30 [holger] 3.7.6cvs24
authorHolger Berndt <hb@claws-mail.org>
Fri, 30 Jul 2010 17:01:46 +0000 (17:01 +0000)
committerHolger Berndt <hb@claws-mail.org>
Fri, 30 Jul 2010 17:01:46 +0000 (17:01 +0000)
* src/gtk/colorlabel.c
One GdkGC usage less

ChangeLog
PATCHSETS
configure.ac
src/gtk/colorlabel.c

index 9eba83d7677f13257c22b9ea2e156d6b140e6dec..05d30cbaee5ff8784c8012c626deab769cc7c87e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-30 [holger]    3.7.6cvs24
+
+       * src/gtk/colorlabel.c
+               One GdkGC usage less
+
 2010-07-29 [holger]    3.7.6cvs23
 
        * src/printing.c
index b2e01cf0341e0b2bc8c79051fc3e843d23053332..be640753c6daa952a761c809ee4f09d162f90fa6 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.36.2.185 -r 1.36.2.186 src/common/utils.c;  ) > 3.7.6cvs21.patchset
 ( cvs diff -u -r 1.36.2.186 -r 1.36.2.187 src/common/utils.c;  ) > 3.7.6cvs22.patchset
 ( cvs diff -u -r 1.1.2.29 -r 1.1.2.30 src/printing.c;  ) > 3.7.6cvs23.patchset
+( cvs diff -u -r 1.2.2.29 -r 1.2.2.30 src/gtk/colorlabel.c;  ) > 3.7.6cvs24.patchset
index c8b86074f701cf26d8d9ad4247fc3b80a8266d6b..bc3288a9a3b9bd7914792fba15142ac370031f1a 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=6
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=23
+EXTRA_VERSION=24
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 147918603be612fe46d353f81555478e83c6b0d0..f18a49309a8dd51a302db71f13d3403232aa9386 100644 (file)
@@ -194,23 +194,24 @@ static gboolean colorlabel_drawing_area_expose_event_cb
        GdkDrawable *drawable = widget->window;
        gulong c = (gulong) GPOINTER_TO_INT(data);
        GdkColor color;
-       GdkGC *gc;
+       cairo_t *cr;
 
        INTCOLOR_TO_GDKCOLOR(c, color)
 
        gdk_colormap_alloc_color(gtk_widget_get_colormap(widget), &color, FALSE, TRUE);
 
-       gc = gdk_gc_new(drawable);
-
-       gdk_gc_set_foreground(gc, &color);
-       gdk_draw_rectangle(drawable, widget->style->black_gc,
-                          FALSE, 0, 0, widget->allocation.width - 1,
-                          widget->allocation.height - 1);
-       gdk_draw_rectangle(drawable, gc,
-                          TRUE, 1, 1, widget->allocation.width - 2,
-                          widget->allocation.height - 2);
-
-       g_object_unref(gc);                        
+       cr = gdk_cairo_create(drawable);
+       cairo_set_source_rgb(cr, 0., 0., 0.);
+       cairo_rectangle(cr, 0, 0,
+           widget->allocation.width - 1,
+           widget->allocation.height - 1);
+       cairo_stroke(cr);
+       gdk_cairo_set_source_color(cr, &color);
+       cairo_rectangle(cr, 1, 1,
+           widget->allocation.width - 2,
+           widget->allocation.height - 2);
+       cairo_fill(cr);
+       cairo_destroy(cr);
        
        return FALSE;
 }