implement separated dialogs for the Bookmarks and History menu items

This commit is contained in:
yggverse 2025-07-25 15:52:14 +03:00
parent e548efc93f
commit ebb38008e1
14 changed files with 378 additions and 171 deletions

View file

@ -50,9 +50,11 @@ impl Bookmark {
false
}
None => {
let time = DateTime::now_local()?;
memory.add(Item {
id: self.database.add(DateTime::now_local()?, request, title)?,
id: self.database.add(time.clone(), request, title)?,
request: request.into(),
time,
title: title.map(|t| t.to_string()),
});
true

View file

@ -111,7 +111,7 @@ pub fn select(
Ok(Item {
id: row.get(0)?,
//profile_id: row.get(1)?,
//time: DateTime::from_unix_local(row.get(2)?).unwrap(),
time: DateTime::from_unix_local(row.get(2)?).unwrap(),
request: row.get(3)?,
title: row.get(4)?,
})

View file

@ -2,5 +2,6 @@
pub struct Item {
pub id: i64,
pub request: String,
pub time: gtk::glib::DateTime,
pub title: Option<String>,
}