Commit Graph

16 Commits

Author SHA1 Message Date
Matthias Clasen
3371e3aa49 Move label attribute parser code
We want to reuse the parser for <attributes> in several
widgets, so move it to a shared place.
2020-04-06 22:59:45 -04:00
Benjamin Otte
51d40ca023 render: Make gtk_render_layout() use the snapshot API
This removes a lot of duplicated code.
2018-07-24 20:55:45 +02:00
Benjamin Otte
43c212ac28 build: Enable -Wswitch-enum and -Wswitch-default
This patch makes that work using 1 of 2 options:

1. Add all missing enums to the switch statement
  or
2. Cast the switch argument to a uint to avoid having to do that (mostly
   for GdkEventType).

I even found a bug while doing that: clearing a GtkImage with a surface
did not notify thae surface property.

The reason for enabling this flag even though it is tedious at times is
that it is very useful when adding values to an enum, because it makes
GTK immediately warn about all the switch statements where this enum is
relevant.
And I expect changes to enums to be frequent during the GTK4 development
cycle.
2017-10-06 21:23:39 +02:00
Timm Bäder
d81fc8edce gtkpango: Remove unused functions
Remove _gtk_pango_move_lines and a few function declarations in the
private header file since they are only used inside gtkpango.c
2017-08-15 21:27:52 +02:00
Paolo Borelli
803430a779 pango: make merge_attrs return the merged list
This simplifies all the callers
2015-07-06 00:31:56 +02:00
Paolo Borelli
b92c530a61 pango: move an utility function from gtklabel
This will be used both by gtklabel and gtkentry
2015-07-06 00:04:05 +02:00
William Jon McCann
13998c55e7 docs: use proper quotations instead of '*' 2014-02-07 14:22:39 -05:00
Benjamin Otte
6d344b2c6b Revert "pango: Handle case where pango_layout_get_text() returns NULL"
This reverts commit 70ac2b24c3.

It turns out the correct fix is to make pango_layout_get_text() not
return NULL. This has been done, so we can drop this patch.

I won't bump the Pango dependency in configure.ac for this as I don't
consider the crash critical enough.
2013-09-09 17:19:28 +02:00
Benjamin Otte
70ac2b24c3 pango: Handle case where pango_layout_get_text() returns NULL
Fixes crashers with accessibility

https://bugzilla.gnome.org/show_bug.cgi?id=707659
2013-09-09 16:53:13 +02:00
Benjamin Otte
48c6b3b4f4 gtk: Add get_type() function declarations for private objects
I'm adding a bunch of fixes for gcc complaining about
-Wmissing-declarations.

This set of patches makes private classes in gtk/*.c that use
G_DEFINE_TYPE() safe by adding definitions for the get_type() function
that can't be made static.
2012-10-02 19:32:38 +02:00
Javier Jardón
9d0febc9a6 Change FSF Address 2012-02-27 17:06:11 +00:00
Matthias Clasen
c3d96ff2c0 Improve AtkText implementations
There was some regressions from the recent display line fix;
while fixing it improve the test coverage and make GtkEntry
and GtkTextView return identical results.
2011-11-19 19:28:48 -05:00
Matthias Clasen
8f3e43326b Silence a compiler warning 2011-08-27 01:25:39 -04:00
Benjamin Otte
a24ec1583b gtkpango: Count letters properly
The code was using the wrong variable and that then caused assertions
2011-07-07 03:37:52 +02:00
Matthias Clasen
1f2b8a6545 Add some aux. pango api to help AtkText implementations
These functions are implementations of the AtkText api on top
of a PangoLayout, and are intended to replace GailTextUtil.

Since gtkpango.h is a private header, also remove the individual
inclusion prohibition.
2011-07-05 16:08:07 -04:00
Benjamin Otte
805e0d1082 label: Draw all text using PangoCairo
This includes the addition of a "small" helper function,
_gtk_pango_fill_layout() that ignores color information. This
functionality is not available inside Pango and until that happens, we
need this fix. The bug is filed at:

https://bugzilla.gnome.org/show_bug.cgi?id=624917
2010-08-10 21:02:28 +02:00