mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-02-03 15:04:13 +00:00
rename index
This commit is contained in:
parent
9b214b1469
commit
0618283d84
@ -206,7 +206,7 @@ impl Menu {
|
|||||||
|
|
||||||
// History
|
// History
|
||||||
main_history_closed.remove_all();
|
main_history_closed.remove_all();
|
||||||
for item in profile.history.memory.closed.recent(RECENTLY_CLOSED) {
|
for item in profile.history.memory.tab.recent(RECENTLY_CLOSED) {
|
||||||
let item_request = item.page.navigation.request.widget.entry.text(); // @TODO restore entire `Item`
|
let item_request = item.page.navigation.request.widget.entry.text(); // @TODO restore entire `Item`
|
||||||
let menu_item = gio::MenuItem::new(Some(&label(&item_request, LABEL_MAX_LENGTH)), None);
|
let menu_item = gio::MenuItem::new(Some(&label(&item_request, LABEL_MAX_LENGTH)), None);
|
||||||
menu_item.set_action_and_target_value(Some(&format!(
|
menu_item.set_action_and_target_value(Some(&format!(
|
||||||
|
@ -107,7 +107,7 @@ impl Tab {
|
|||||||
profile
|
profile
|
||||||
.history
|
.history
|
||||||
.memory
|
.memory
|
||||||
.closed
|
.tab
|
||||||
.add(item, DateTime::now_local().unwrap().to_unix());
|
.add(item, DateTime::now_local().unwrap().to_unix());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
mod closed;
|
mod tab;
|
||||||
use closed::Closed;
|
use tab::Tab;
|
||||||
|
|
||||||
/// Reduce disk usage by cache Bookmarks index in memory
|
/// Reduce disk usage by cache Bookmarks index in memory
|
||||||
pub struct Memory {
|
pub struct Memory {
|
||||||
pub closed: Closed,
|
pub tab: Tab,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Memory {
|
impl Default for Memory {
|
||||||
@ -17,8 +17,6 @@ impl Memory {
|
|||||||
|
|
||||||
/// Create new `Self`
|
/// Create new `Self`
|
||||||
pub fn new() -> Self {
|
pub fn new() -> Self {
|
||||||
Self {
|
Self { tab: Tab::new() }
|
||||||
closed: Closed::new(),
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,17 +8,17 @@ pub struct Record {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Recently closed tabs index
|
/// Recently closed tabs index
|
||||||
pub struct Closed {
|
pub struct Tab {
|
||||||
index: RefCell<Vec<Record>>,
|
index: RefCell<Vec<Record>>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for Closed {
|
impl Default for Tab {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new()
|
Self::new()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Closed {
|
impl Tab {
|
||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
/// Create new `Self`
|
/// Create new `Self`
|
Loading…
x
Reference in New Issue
Block a user