diff options
author | Ray Strode <halfline@gmail.com> | 2023-11-30 18:53:39 +0000 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2023-11-30 18:53:39 +0000 |
commit | 5a720533b8adbc096d05b1048261e966da7daa75 (patch) | |
tree | faf5ed466df30cdf9c0ac63c6abe016160663b13 | |
parent | 6c9c6c767c707ca020b97740487ba538136e5ada (diff) | |
parent | 42d07913a0b72b8607190ab31931d5460765f589 (diff) |
Merge branch 'label-fixes' into 'main'
Label fixes
See merge request plymouth/plymouth!247
-rw-r--r-- | src/libply-splash-graphics/ply-label.c | 2 | ||||
-rw-r--r-- | src/plugins/controls/label-pango/plugin.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/libply-splash-graphics/ply-label.c b/src/libply-splash-graphics/ply-label.c index 581dbff5..bac5947f 100644 --- a/src/libply-splash-graphics/ply-label.c +++ b/src/libply-splash-graphics/ply-label.c @@ -100,7 +100,7 @@ ply_label_load_plugin (ply_label_t *label) /* ...and the FreeType based one after that, it is not a complete substitute (yet). */ if (label->module_handle == NULL) - label->module_handle = ply_open_module (PLYMOUTH_PLUGIN_PATH "label-freetype.so"); + label->module_handle = ply_open_module (PLYMOUTH_PLUGIN_PATH "label-freetype.so"); if (label->module_handle == NULL) return false; diff --git a/src/plugins/controls/label-pango/plugin.c b/src/plugins/controls/label-pango/plugin.c index 3fdc4ba7..d53da97c 100644 --- a/src/plugins/controls/label-pango/plugin.c +++ b/src/plugins/controls/label-pango/plugin.c @@ -188,7 +188,7 @@ init_pango_text_layout (cairo_t *cairo_context, if (width >= 0) pango_layout_set_width (pango_layout, width * PANGO_SCALE); - pango_layout_set_text (pango_layout, text, -1); + pango_layout_set_text (pango_layout, text ?: "", -1); pango_cairo_update_layout (cairo_context, pango_layout); return pango_layout; @@ -321,7 +321,7 @@ set_text_for_control (ply_label_plugin_control_t *label, { ply_rectangle_t dirty_area; - if (label->text != text) { + if (strcmp (label->text ?: "", text ?: "") != 0) { dirty_area = label->area; free (label->text); label->text = strdup (text); |