From dc19d70c2c8f6680a18f20c34b67bc70c50f680c Mon Sep 17 00:00:00 2001 From: Michael Webster Date: Tue, 28 May 2024 14:07:59 +0200 Subject: src/promptbox.vala: Use themed icon for unread messages. Ported from slick-greeter. --- src/prompt-box.vala | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/prompt-box.vala b/src/prompt-box.vala index 5716ab1..267dab8 100644 --- a/src/prompt-box.vala +++ b/src/prompt-box.vala @@ -244,14 +244,7 @@ public class PromptBox : FadableBox name_grid.attach (name_label, COL_NAME_LABEL, ROW_NAME, 1, 1); message_image = new CachedImage (null); - try - { - message_image.pixbuf = new Gdk.Pixbuf.from_file (Path.build_filename (Config.PKGDATADIR, "message.png", null)); - } - catch (Error e) - { - debug ("Error loading message image: %s", e.message); - } + message_image.set_from_icon_name("mail-unread", Gtk.IconSize.BUTTON); var align = new Gtk.Alignment (0.5f, 0.5f, 0.0f, 0.0f); align.valign = Gtk.Align.START; @@ -346,7 +339,7 @@ public class PromptBox : FadableBox small_name_grid.attach (small_name_label, 1, 0, 1, 1); small_message_image = new CachedImage (null); - small_message_image.pixbuf = message_image.pixbuf; + small_message_image.set_from_icon_name("mail-unread", Gtk.IconSize.BUTTON); var align = new Gtk.Alignment (0.5f, 0.5f, 0.0f, 0.0f); align.set_size_request (-1, grid_size); -- cgit v1.2.3