feat: memorize last active page between instances
This commit is contained in:
parent
2709dcfee5
commit
9d3c3405a2
23 changed files with 252 additions and 87 deletions
|
|
@ -9,13 +9,10 @@ pub struct Page;
|
|||
impl page::Page for Page {
|
||||
type Model = super::Model;
|
||||
|
||||
const PERSISTENT_ID: &'static str = "appearance";
|
||||
|
||||
fn page() -> page::Meta {
|
||||
page::Meta::default()
|
||||
page::Meta::new("appearance", "preferences-pop-desktop-appearance-symbolic")
|
||||
.title(fl!("appearance"))
|
||||
.description(fl!("appearance", "desc"))
|
||||
.icon_name("preferences-pop-desktop-appearance-symbolic")
|
||||
}
|
||||
|
||||
fn content(sections: &mut SlotMap<section::Entity, Section>) -> Option<Content> {
|
||||
|
|
|
|||
|
|
@ -10,13 +10,10 @@ pub struct Page;
|
|||
impl page::Page for Page {
|
||||
type Model = super::Model;
|
||||
|
||||
const PERSISTENT_ID: &'static str = "dock";
|
||||
|
||||
fn page() -> page::Meta {
|
||||
page::Meta::default()
|
||||
page::Meta::new("dock", "preferences-pop-desktop-dock-symbolic")
|
||||
.title(fl!("dock"))
|
||||
.description(fl!("dock", "desc"))
|
||||
.icon_name("preferences-pop-desktop-dock-symbolic")
|
||||
}
|
||||
|
||||
fn content(sections: &mut SlotMap<section::Entity, Section>) -> Option<Content> {
|
||||
|
|
|
|||
|
|
@ -15,12 +15,8 @@ pub struct Page;
|
|||
impl page::Page for Page {
|
||||
type Model = super::Model;
|
||||
|
||||
const PERSISTENT_ID: &'static str = "desktop";
|
||||
|
||||
fn page() -> page::Meta {
|
||||
page::Meta::default()
|
||||
.title(fl!("desktop"))
|
||||
.icon_name("video-display-symbolic")
|
||||
page::Meta::new("desktop", "video-display-symbolic").title(fl!("desktop"))
|
||||
}
|
||||
|
||||
fn sub_pages(page: page::Insert) -> page::Insert {
|
||||
|
|
|
|||
|
|
@ -10,13 +10,10 @@ pub struct Page;
|
|||
impl page::Page for Page {
|
||||
type Model = super::Model;
|
||||
|
||||
const PERSISTENT_ID: &'static str = "notifications";
|
||||
|
||||
fn page() -> page::Meta {
|
||||
page::Meta::default()
|
||||
page::Meta::new("notifications", "preferences-system-notifications-symbolic")
|
||||
.title(fl!("notifications"))
|
||||
.description(fl!("notifications", "desc"))
|
||||
.icon_name("preferences-system-notifications-symbolic")
|
||||
}
|
||||
|
||||
fn content(sections: &mut SlotMap<section::Entity, Section>) -> Option<Content> {
|
||||
|
|
|
|||
|
|
@ -19,13 +19,10 @@ pub struct Page;
|
|||
impl page::Page for Page {
|
||||
type Model = super::Model;
|
||||
|
||||
const PERSISTENT_ID: &'static str = "desktop-options";
|
||||
|
||||
fn page() -> page::Meta {
|
||||
page::Meta::default()
|
||||
page::Meta::new("desktop-options", "video-display-symbolic")
|
||||
.title(fl!("desktop-options"))
|
||||
.description(fl!("desktop-options", "desc"))
|
||||
.icon_name("video-display-symbolic")
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_lines)]
|
||||
|
|
|
|||
|
|
@ -19,13 +19,10 @@ pub struct Page;
|
|||
impl page::Page for Page {
|
||||
type Model = super::Model;
|
||||
|
||||
const PERSISTENT_ID: &'static str = "wallpaper";
|
||||
|
||||
fn page() -> page::Meta {
|
||||
page::Meta::default()
|
||||
page::Meta::new("wallpaper", "preferences-desktop-wallpaper-symbolic")
|
||||
.title(fl!("wallpaper"))
|
||||
.description(fl!("wallpaper", "desc"))
|
||||
.icon_name("preferences-desktop-wallpaper-symbolic")
|
||||
}
|
||||
|
||||
fn content(sections: &mut SlotMap<section::Entity, Section>) -> Option<Content> {
|
||||
|
|
|
|||
|
|
@ -12,13 +12,10 @@ pub struct Page;
|
|||
impl page::Page for Page {
|
||||
type Model = super::Model;
|
||||
|
||||
const PERSISTENT_ID: &'static str = "workspaces";
|
||||
|
||||
fn page() -> page::Meta {
|
||||
page::Meta::default()
|
||||
page::Meta::new("workspaces", "preferences-pop-desktop-workspaces-symbolic")
|
||||
.title(fl!("workspaces"))
|
||||
.description(fl!("workspaces", "desc"))
|
||||
.icon_name("preferences-pop-desktop-workspaces-symbolic")
|
||||
}
|
||||
|
||||
fn content(sections: &mut SlotMap<section::Entity, Section>) -> Option<Content> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue