[gnumeric] GdkGC: remove from stf-fixed.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnumeric] GdkGC: remove from stf-fixed.
- Date: Thu, 29 Jul 2010 13:25:37 +0000 (UTC)
commit 641131cdeb6170b073ad780133ce2f5a8e0ff382
Author: Morten Welinder <terra gnome org>
Date: Thu Jul 29 09:25:19 2010 -0400
GdkGC: remove from stf-fixed.
NEWS | 2 +-
src/dialogs/ChangeLog | 5 +++++
src/dialogs/dialog-stf-fixed-page.c | 27 +++++++++++----------------
3 files changed, 17 insertions(+), 17 deletions(-)
---
diff --git a/NEWS b/NEWS
index 96d675b..3a0b786 100644
--- a/NEWS
+++ b/NEWS
@@ -73,7 +73,7 @@ Morten:
* Fix mistakes pointed out by sparse.
* Fix win32 versioning problem. [#624171]
* Improve function doc checks.
- * Eliminate parts of GdkGC usage.
+ * Eliminate almost all remnaining GdkGC usage.
--------------------------------------------------------------------------
Gnumeric 1.10.7
diff --git a/src/dialogs/ChangeLog b/src/dialogs/ChangeLog
index 302a029..08578b0 100644
--- a/src/dialogs/ChangeLog
+++ b/src/dialogs/ChangeLog
@@ -1,3 +1,8 @@
+2010-07-29 Morten Welinder <terra gnome org>
+
+ * dialog-stf-fixed-page.c (cb_treeview_expose): Draw using cairo.
+ Fix event argument type.
+
2010-07-28 Morten Welinder <terra gnome org>
* dialog-stf.h (FixedInfo_t): Remove unused GdkGC.
diff --git a/src/dialogs/dialog-stf-fixed-page.c b/src/dialogs/dialog-stf-fixed-page.c
index 881b77b..69fa531 100644
--- a/src/dialogs/dialog-stf-fixed-page.c
+++ b/src/dialogs/dialog-stf-fixed-page.c
@@ -525,29 +525,24 @@ cb_treeview_motion (GtkWidget *widget,
static gboolean
cb_treeview_expose (GtkWidget *widget,
- GdkEventMotion *event,
+ GdkEventExpose *event,
StfDialogData *pagedata)
{
int ruler_x = pagedata->fixed.ruler_x;
- GdkGCValues values;
- GdkGC *gc;
+ int height = widget->allocation.height;
+ cairo_t *cr;
if (ruler_x < 0)
return FALSE;
- gc = gdk_gc_new (event->window);
-
- values.foreground.red = 0xffff;
- values.foreground.green = 0;
- values.foreground.blue = 0;
- gdk_rgb_find_color (gdk_gc_get_colormap (gc), &values.foreground);
- values.fill = GDK_SOLID;
- gdk_gc_set_values (gc, &values, GDK_GC_FILL | GDK_GC_FOREGROUND);
-
- gdk_draw_line (event->window, gc,
- ruler_x, 0,
- ruler_x, widget->allocation.height);
- g_object_unref (gc);
+ cr = gdk_cairo_create (event->window);
+ cairo_rectangle (cr, ruler_x, 0, ruler_x + 1, height);
+ cairo_clip (cr);
+ cairo_set_source_rgb (cr, 1.0, 0, 0);
+ cairo_move_to (cr, ruler_x, 0);
+ cairo_line_to (cr, ruler_x, height);
+ cairo_stroke (cr);
+ cairo_destroy (cr);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]