summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lib.rs7
-rw-r--r--src/main.rs2
2 files changed, 7 insertions, 2 deletions
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 = &gtk::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 = &gtk::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);
                 };
             },
diff --git a/src/main.rs b/src/main.rs
index d7dd0a1..59b4bc0 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -14,7 +14,7 @@ fn main() {
     log::set_logger(&GLIB_LOGGER).unwrap();
     log::set_max_level(log::LevelFilter::Debug);
 
-    relm4_icons::initialize_icons();
+    relm4_icons::initialize_icons(bowl::icons::GRESOURCE_BYTES, bowl::icons::RESOURCE_PREFIX);
 
     let app = relm4::RelmApp::new(bowl::APPLICATION_ID);
     relm4::set_global_css(".tag-pill button {