From 3be2e4745c1beaeddde1f9fbe7c43d241a632954 Mon Sep 17 00:00:00 2001 From: Elias Projahn Date: Thu, 16 Jan 2025 12:53:12 +0100 Subject: [PATCH] welcome page: Use correct icon name --- data/ui/welcome_page.blp | 2 +- src/welcome_page.rs | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/data/ui/welcome_page.blp b/data/ui/welcome_page.blp index 6e3e67c..0ce8d2f 100644 --- a/data/ui/welcome_page.blp +++ b/data/ui/welcome_page.blp @@ -15,7 +15,7 @@ template $MusicusWelcomePage : Adw.NavigationPage { } } - Adw.StatusPage { + Adw.StatusPage status_page { icon-name: "de.johrpan.Musicus"; title: _("Welcome to Musicus"); description: _("Get started by choosing where to store your music library. Is this your first time using Musicus? If so, create a new empty folder for your library. Musicus will use this location to manage your recordings. You can also select a folder that already contains a music library created by Musicus."); diff --git a/src/welcome_page.rs b/src/welcome_page.rs index 68d1dee..270be79 100644 --- a/src/welcome_page.rs +++ b/src/welcome_page.rs @@ -1,3 +1,5 @@ +use crate::config; + use adw::subclass::{navigation_page::NavigationPageImpl, prelude::*}; use gettextrs::gettext; use gtk::{gio, glib, glib::subclass::Signal, prelude::*}; @@ -8,7 +10,10 @@ mod imp { #[derive(Debug, Default, gtk::CompositeTemplate)] #[template(file = "data/ui/welcome_page.blp")] - pub struct MusicusWelcomePage {} + pub struct MusicusWelcomePage { + #[template_child] + pub status_page: TemplateChild, + } #[glib::object_subclass] impl ObjectSubclass for MusicusWelcomePage { @@ -36,6 +41,11 @@ mod imp { SIGNALS.as_ref() } + + fn constructed(&self) { + self.parent_constructed(); + self.status_page.set_icon_name(Some(config::APP_ID)); + } } impl WidgetImpl for MusicusWelcomePage {}