[med-svn] [aghermann] 15/23: replace deprecated gdk_cairo_create

andrei zavada hmmr-guest at moszumanska.debian.org
Wed Jan 4 22:59:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

hmmr-guest pushed a commit to tag 1.1.2
in repository aghermann.

commit fe97655cf03385d9380d14cfc43652b9aa576ecc
Author: Andrei Zavada <hmmr at frdg>
Date:   Tue Jan 3 05:52:58 2017 +0200

    replace deprecated gdk_cairo_create
---
 upstream/src/aghermann/ui/mw/populate.cc | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/upstream/src/aghermann/ui/mw/populate.cc b/upstream/src/aghermann/ui/mw/populate.cc
index 713fb31..fc3d3fa 100644
--- a/upstream/src/aghermann/ui/mw/populate.cc
+++ b/upstream/src/aghermann/ui/mw/populate.cc
@@ -305,6 +305,17 @@ annotation_type_s( const sigfile::SAnnotation::TType t)
         static const char* types[] = {"", "S", "K", "E"};
         return types[t];
 }
+
+cairo_t*
+gdk_cairo_create_wrapper(agh::ui::SExpDesignUI::SSubjectPresentation& J)
+{
+        return cairo_create(
+                gdk_window_create_similar_surface(
+                        gtk_widget_get_window( J.da),
+                        CAIRO_CONTENT_COLOR_ALPHA,
+                        J.tl_width(), J.tl_height()));
+
+}
 }
 
 void
@@ -524,7 +535,7 @@ populate_1()
 
                         // determine tl_left_margin
                         {
-                                cairo_t *cr = gdk_cairo_create( gtk_widget_get_window( J.da));
+                                cairo_t *cr = gdk_cairo_create_wrapper( J);
                                 cairo_text_extents_t extents;
                                 cairo_select_font_face( cr, "serif", CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
                                 cairo_set_font_size( cr, 11);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git



More information about the debian-med-commit mailing list