From b428c40d6ecc01417b777184c93d80913695a695 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Thu, 17 Dec 2020 10:27:52 -0800 Subject: [PATCH] added status icons --- src/widgets.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/src/widgets.py b/src/widgets.py index 4b3b8f5..e94e95c 100644 --- a/src/widgets.py +++ b/src/widgets.py @@ -268,6 +268,25 @@ class PostItem(Gtk.ListBoxRow): post_date_local = post.created_at.astimezone(tzlocal()) datetime_label = Gtk.Label(label=post_date_local.strftime("%Y-%m-%d %H:%M"), xalign=1) self.f_box.pack_end(datetime_label, False, False, 18) + pad = Gtk.Label(label="") + self.f_box.pack_start(pad, False, False, 9) + + if post.id != int(post.thread_id): + thread_icon = Gtk.Image.new_from_icon_name("user-available-symbolic", Gtk.IconSize.SMALL_TOOLBAR) + self.f_box.pack_start(thread_icon, False, False, 9) + if post.counts.bookmarks > 0: + if post.you_bookmarked: + star_icon = Gtk.Image.new_from_icon_name("starred-symbolic", Gtk.IconSize.SMALL_TOOLBAR) + else: + star_icon = Gtk.Image.new_from_icon_name("non-starred-symbolic", Gtk.IconSize.SMALL_TOOLBAR) + star_count = Gtk.Label(label=post.counts.bookmarks) + self.f_box.pack_start(star_icon, False, False, 9) + self.f_box.pack_start(star_count, False, False, 0) + if post.counts.reposts > 0: + repost_icon = Gtk.Image.new_from_icon_name("media-playlist-repeat-symbolic", Gtk.IconSize.SMALL_TOOLBAR) + repost_count = Gtk.Label(label=post.counts.reposts) + self.f_box.pack_start(repost_icon, False, False, 9) + self.f_box.pack_start(repost_count, False, False, 0) self.box.pack_start(self.h_box, True, True, 10) self.box.pack_start(self.c_box, True, True, 10)