refactor dnd and fix dnd bugs
This commit is contained in:
parent
9bde60bbe9
commit
fb6bbb79a7
6 changed files with 429 additions and 176 deletions
|
|
@ -1,5 +1,19 @@
|
|||
use crate::DockObject;
|
||||
use crate::Item;
|
||||
use gtk4::glib;
|
||||
use std::path::PathBuf;
|
||||
|
||||
#[derive(Clone, Debug, Default, glib::GBoxed)]
|
||||
#[gboxed(type_name = "BoxedWindowList")]
|
||||
pub struct BoxedWindowList(pub Vec<Item>);
|
||||
#[derive(Clone, Debug, Default, glib::GBoxed)]
|
||||
#[gboxed(type_name = "BoxedDockObject")]
|
||||
pub struct BoxedDockObject(pub Option<DockObject>);
|
||||
|
||||
pub fn data_path() -> PathBuf {
|
||||
let mut path = glib::user_data_dir();
|
||||
path.push("com.cosmic.dock");
|
||||
std::fs::create_dir_all(&path).expect("Could not create directory.");
|
||||
path.push("data.json");
|
||||
path
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue