This adds a configuration option in meson, if set it changes the application ID allowing for stable and development version to be run at the same time.
42 lines
1.1 KiB
Rust
42 lines
1.1 KiB
Rust
use app::APP_ID;
|
|
use gtk::{self, prelude::*};
|
|
use std::ops::Deref;
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub(crate) struct EmptyView(gtk::Box);
|
|
|
|
impl Deref for EmptyView {
|
|
type Target = gtk::Box;
|
|
fn deref(&self) -> &Self::Target {
|
|
&self.0
|
|
}
|
|
}
|
|
|
|
impl Default for EmptyView {
|
|
fn default() -> Self {
|
|
let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/empty_view.ui");
|
|
let view: gtk::Box = builder.get_object("empty_view").unwrap();
|
|
let image: gtk::Image = builder.get_object("image").unwrap();
|
|
image.set_from_icon_name(format!("{}-symbolic", APP_ID).as_str(), 256);
|
|
EmptyView(view)
|
|
}
|
|
}
|
|
|
|
#[derive(Clone, Debug)]
|
|
pub(crate) struct EmptyShow(gtk::Box);
|
|
|
|
impl Deref for EmptyShow {
|
|
type Target = gtk::Box;
|
|
fn deref(&self) -> &Self::Target {
|
|
&self.0
|
|
}
|
|
}
|
|
|
|
impl Default for EmptyShow {
|
|
fn default() -> Self {
|
|
let builder = gtk::Builder::new_from_resource("/org/gnome/Podcasts/gtk/empty_view.ui");
|
|
let box_: gtk::Box = builder.get_object("empty_show").unwrap();
|
|
EmptyShow(box_)
|
|
}
|
|
}
|