From 29568a14b389049480591e67a116400d030e8db1 Mon Sep 17 00:00:00 2001 From: Vika Date: Thu, 30 Jan 2025 09:51:33 +0300 Subject: Provide an application icon --- src/lib.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 111be23..9e7569f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,6 +3,10 @@ use adw::prelude::*; use libsecret::prelude::{RetrievableExtManual, RetrievableExt}; use relm4::{actions::{RelmAction, RelmActionGroup}, gtk, loading_widgets::LoadingWidgets, prelude::{AsyncComponent, AsyncComponentController, AsyncComponentParts, AsyncController, ComponentController, Controller}, AsyncComponentSender, Component, RelmWidgetExt}; +pub mod icons { + include!(concat!(env!("OUT_DIR"), "/icons.rs")); +} + pub mod components { pub(crate) mod smart_summary; #[cfg(feature = "smart-summary")] @@ -413,7 +417,7 @@ impl AsyncComponent for App { set_popover = >k::PopoverMenu::from_model(Some(&main_menu)) {}, #[watch] set_visible: model.micropub.is_some(), - set_icon_name: relm4_icons::icon_names::MENU, + set_icon_name: "menu", }, pack_end = >k::Button { set_icon_name: "document-send-symbolic", @@ -550,6 +554,7 @@ impl AsyncComponent for App { Input::SubmitButtonPressed => { if self.micropub.is_some() { self.submit_busy_guard = Some(relm4::main_adw_application().mark_busy()); + // TODO: too easy to deadlock here, refactor to take a channel self.post_editor.emit(PostEditorInput::Submit); }; }, -- cgit 1.4.1