diff options
Diffstat (limited to 'science')
-rw-r--r-- | science/gchempaint/Makefile | 2 | ||||
-rw-r--r-- | science/gchempaint/distinfo | 2 | ||||
-rw-r--r-- | science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c | 64 |
3 files changed, 66 insertions, 2 deletions
diff --git a/science/gchempaint/Makefile b/science/gchempaint/Makefile index 420fee7d83ff..892d96de2dcc 100644 --- a/science/gchempaint/Makefile +++ b/science/gchempaint/Makefile @@ -5,7 +5,7 @@ # $FreeBSD$ PORTNAME= gchempaint -PORTVERSION= 0.3.4 +PORTVERSION= 0.3.5 CATEGORIES= science MASTER_SITES= http://savannah.nongnu.org/download/gchempaint/unstable.pkg/${PORTVERSION}/ diff --git a/science/gchempaint/distinfo b/science/gchempaint/distinfo index c7961f364277..84b7b8529169 100644 --- a/science/gchempaint/distinfo +++ b/science/gchempaint/distinfo @@ -1 +1 @@ -MD5 (gchempaint-0.3.4.tar.bz2) = 15afabbae8aa07d3361952b5061457a0 +MD5 (gchempaint-0.3.5.tar.bz2) = 096dafb7aec7437704d8293ba7f3ae01 diff --git a/science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c b/science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c new file mode 100644 index 000000000000..c88ccff094e8 --- /dev/null +++ b/science/gchempaint/files/patch-libgcpcanvas-gcp-canvas-rich-text.c @@ -0,0 +1,64 @@ +--- libgcpcanvas/gcp-canvas-rich-text.c.orig Thu Aug 28 08:12:13 2003 ++++ libgcpcanvas/gcp-canvas-rich-text.c Thu Aug 28 18:07:40 2003 +@@ -2101,6 +2101,11 @@ + double ax, ay; + double x1, y1, x2, y2; + ArtPoint ip, cp; ++ GdkPixbuf *pxb; ++ GdkPixmap* pb; ++ GdkGC* gc; ++ GdkPixbuf* pixbuf; ++ GdkColormap* map; + + gnome_canvas_buf_ensure_buf (buf); + +@@ -2149,11 +2154,11 @@ + if (y0 + h >= buf->rect.y1 + 1) + h = buf->rect.y1 - y0 + 1; + if (((int) w == 0) || ((int) h == 0)) return; +- GdkPixbuf *pxb = gdk_pixbuf_new_from_data (buf->buf + y * buf->buf_rowstride + x * 3, ++ pxb = gdk_pixbuf_new_from_data (buf->buf + y * buf->buf_rowstride + x * 3, + GDK_COLORSPACE_RGB, FALSE, 8, (int) w, (int) h, + buf->buf_rowstride, NULL, NULL); +- GdkPixmap* pb = gdk_pixmap_new (item->canvas->layout.bin_window, (int) w, (int) h, gtk_widget_get_visual ((GtkWidget*) item->canvas)->depth); +- GdkGC* gc = gdk_gc_new (pb); ++ pb = gdk_pixmap_new (item->canvas->layout.bin_window, (int) w, (int) h, gtk_widget_get_visual ((GtkWidget*) item->canvas)->depth); ++ gc = gdk_gc_new (pb); + gdk_pixbuf_render_to_drawable (pxb, pb, gc, 0, 0, 0, 0, w, h, GDK_RGB_DITHER_NONE, 0, 0); + gtk_text_layout_set_screen_width(text->_priv->layout, x2 - x1); + /* FIXME: should last arg be NULL? */ +@@ -2166,8 +2171,8 @@ + 0, 0, x2 - x0, y2 - y0, + NULL); + +- GdkPixbuf* pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, (int) w, (int) h); +- GdkColormap* map = gdk_colormap_new (gtk_widget_get_visual ((GtkWidget*) item->canvas), FALSE); ++ pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, (int) w, (int) h); ++ map = gdk_colormap_new (gtk_widget_get_visual ((GtkWidget*) item->canvas), FALSE); + gdk_pixbuf_get_from_drawable (pixbuf, pb, map, 0, 0, 0, 0, (int) w, (int) h); + data = gdk_pixbuf_get_pixels (pixbuf); + r = gdk_pixbuf_get_rowstride (pixbuf); +@@ -2220,18 +2225,20 @@ + + PangoLayout* gnome_canvas_rich_text_ext_get_pango_layout (GnomeCanvasRichTextExt *text, gint line) + { +- g_return_val_if_fail (GNOME_IS_CANVAS_RICH_TEXT_EXT (text), NULL); + gint top = 0, bottom, firsty; ++ GSList* lines; ++ GtkTextLine* text_line; ++ g_return_val_if_fail (GNOME_IS_CANVAS_RICH_TEXT_EXT (text), NULL); + gtk_text_layout_get_size (text->_priv->layout, NULL, &bottom); + if (bottom <= top) return NULL; +- GSList* lines = gtk_text_layout_get_lines (text->_priv->layout, top, bottom, &firsty); ++ lines = gtk_text_layout_get_lines (text->_priv->layout, top, bottom, &firsty); + firsty = 0; + while ((firsty < line) && lines) + { + lines = lines->next; + firsty++; + } +- GtkTextLine* text_line = (lines)? lines->data: NULL; ++ text_line = (lines)? lines->data: NULL; + if (text_line) + { + GtkTextLineDisplay* display = gtk_text_layout_get_line_display(text->_priv->layout, text_line, TRUE); |