After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 340141 - Update to Pango 1.16 API
Update to Pango 1.16 API
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Behdad Esfahbod
gtk-bugs
Depends on: 340066 343355
Blocks:
 
 
Reported: 2006-04-29 19:45 UTC by Behdad Esfahbod
Modified: 2007-01-10 20:25 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch to use new api (3.84 KB, patch)
2006-06-06 21:45 UTC, Behdad Esfahbod
committed Details | Review
use readonly PangoLayoutLine accessors (11.29 KB, patch)
2006-12-24 03:58 UTC, Behdad Esfahbod
committed Details | Review
use pango_language_get_default() (1.29 KB, patch)
2006-12-24 03:58 UTC, Behdad Esfahbod
committed Details | Review

Description Behdad Esfahbod 2006-04-29 19:45:16 UTC
This is a tracker for things that have been improved in Pango and Gtk+ can use when switch to require Pango 1.14.

  1) when bug 340066 is closed, there's no need to call pango_layout_context_changed() explicitly.  We may note that in documentation for gtk_widget_create_pango_layout() and similar functions.  The context returned by gtk_widget_get_pango_context() may as be made to stay valid even after screen changes.

  2) audit gdk/gdkpango.c and gtk/ for PANGO_SCALE and PANGO_PIXELS occurences and adjust them to use PANGO_PIXELS_FLOOR/CEIL if that makes more sense, etc.  off-by-one fixes.  bug 329547.
Comment 1 Behdad Esfahbod 2006-05-30 04:16:09 UTC
When Bug 343355 – Add pango_cairo_show_error_underline & pango_cairo_error_underline_path, is resolved, we can remove the duplicate code in gdkpango.c.
Comment 2 Behdad Esfahbod 2006-06-06 21:45:02 UTC
Created attachment 66861 [details] [review]
patch to use new api

Patch to use new API from Bug 343355 – Add pango_cairo_show_error_underline &
pango_cairo_error_underline_path.  Removes code in gdkpango that was duplicated from pangocairo.  Tested, working.
Comment 3 Behdad Esfahbod 2006-06-15 06:24:32 UTC
When bug Bug 333982 is resolved, gtk_get_default_language can simply wrap the Pango API.
Comment 4 Behdad Esfahbod 2006-12-06 19:11:10 UTC
Use pango_layout_iter_get_line_readonly() instead of pango_layout_iter_get_line().
Comment 5 Behdad Esfahbod 2006-12-06 22:59:42 UTC
bug 333982.  Use pango_language_get_default() in gtk_get_default_language().
Comment 6 Behdad Esfahbod 2006-12-06 23:01:28 UTC
Bug 373856.  Add gdk_color_to_string() as a wrapper of pango_color_to_string().
Comment 7 Matthias Clasen 2006-12-22 17:07:56 UTC
2006-12-22  Matthias Clasen  <mclasen@redhat.com>

        * gdk/gdkpango.c: Use pango_cairo_show_error_underline.
        (#340141, Behdad Esfahbod)

Comment 8 Behdad Esfahbod 2006-12-24 03:58:15 UTC
Created attachment 78848 [details] [review]
use readonly PangoLayoutLine accessors
Comment 9 Behdad Esfahbod 2006-12-24 03:58:48 UTC
Created attachment 78849 [details] [review]
use pango_language_get_default()
Comment 10 Matthias Clasen 2006-12-24 05:21:56 UTC
Please go ahead and commit these, thanks.
Comment 11 Behdad Esfahbod 2006-12-24 05:29:24 UTC
2006-12-24  Behdad Esfahbod  <behdad@gnome.org>

        Bug 340141 – Update to Pango 1.16 API

        * gdk/gdkpango.c (layout_iter_get_line_clip_region),
        (gdk_pango_layout_line_get_clip_region):
        * gtk/gtkcalendar.c (gtk_calendar_size_request):
        * gtk/gtkentry.c (gtk_entry_get_pixel_ranges),
        (get_layout_position), (gtk_entry_find_position),
        (gtk_entry_adjust_scroll):
        * gtk/gtkiconview.c (get_pango_text_offsets):
        * gtk/gtklabel.c (get_cursor_direction):
        * gtk/gtkstyle.c (get_insensitive_layout):
        * gtk/gtktextdisplay.c (render_para):
        * gtk/gtktextlayout.c (allocate_child_widgets),
        (find_display_line_below), (find_display_line_above),
        (gtk_text_layout_move_iter_to_previous_line),
        (gtk_text_layout_move_iter_to_next_line),
        (gtk_text_layout_move_iter_to_line_end),
        (gtk_text_layout_iter_starts_line),
        (gtk_text_layout_move_iter_to_x):
        * gtk/gtktextutil.c (limit_layout_lines):
        Use the _readonly version of pango_layout_iter_get_line(), 
        pango_layout_iter_get_run(), pango_layout_get_line(), and
        pango_layout_get_lines().

        * gtk/gtkmain.c (gtk_get_default_language): Use
        pango_get_default_language().

Comment 12 Behdad Esfahbod 2007-01-05 06:31:20 UTC
Attachment 79428 [details]
Patch to use pango_matrix_transform_rectangle which will be in pango 1.15.3
Comment 13 Behdad Esfahbod 2007-01-10 20:25:00 UTC
2007-01-10  Behdad Esfahbod  <behdad@gnome.org>

        * gdk/gdkpango.c (gdk_draw_layout_with_colors):
        * gtk/gtklabel.c (gtk_label_size_request):
        Use pango_matrix_transform_rectangle(). (#340141)

        * configure.in: Bump pango requirement to 1.15.3.


Pango 1.16 API is almost frozen now.  Closing.  The two items listed in the opening report of this bug still remain relevant.  That is, when bug 340066 is closed, Gtk+ needs to be updated (docs at least), and that one should audit gtk/ for PANGO_SCALE and PANGO_PIXELS uses, but gdk/ is fine now.