save/restore custom app groups
This commit is contained in:
parent
04b4b88534
commit
ce3bcd7821
8 changed files with 156 additions and 25 deletions
|
|
@ -12,7 +12,7 @@ use super::AppGroupData;
|
|||
// Object holding the state
|
||||
#[derive(Default)]
|
||||
pub struct AppGroup {
|
||||
data: Rc<RefCell<AppGroupData>>,
|
||||
pub data: Rc<RefCell<AppGroupData>>,
|
||||
}
|
||||
|
||||
// The central trait for subclassing a GObject
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
mod imp;
|
||||
|
||||
use gdk4::glib::Object;
|
||||
use glib::Object;
|
||||
use glib::ObjectExt;
|
||||
use glib::ToVariant;
|
||||
use gtk4::glib;
|
||||
use gtk4::subclass::prelude::*;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
glib::wrapper! {
|
||||
|
|
@ -26,6 +27,11 @@ impl AppGroup {
|
|||
};
|
||||
self_
|
||||
}
|
||||
|
||||
pub fn group_data(&self) -> AppGroupData {
|
||||
let imp = imp::AppGroup::from_instance(self);
|
||||
imp.data.borrow().clone()
|
||||
}
|
||||
}
|
||||
|
||||
// Object holding the state
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue