mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-07-12 12:57:44 +02:00
feat: Add Error popup
This commit is contained in:
parent
cc73c425f7
commit
16a30a7bdd
40 changed files with 422 additions and 266 deletions
|
@ -56,6 +56,18 @@ impl ReSetWindow {
|
|||
})
|
||||
.build();
|
||||
|
||||
let error_popup_action = ActionEntry::builder("show_error")
|
||||
.activate(move |window: &Self, _, _| {
|
||||
window.imp().error_popup.popup();
|
||||
})
|
||||
.build();
|
||||
|
||||
let error_popdown_action = ActionEntry::builder("hide_error")
|
||||
.activate(move |window: &Self, _, _| {
|
||||
window.imp().error_popup.popdown();
|
||||
})
|
||||
.build();
|
||||
|
||||
let vim_up = ActionEntry::builder("up")
|
||||
.activate(move |window: &Self, _, _| {
|
||||
window.child_focus(DirectionType::Up);
|
||||
|
@ -123,7 +135,8 @@ impl ReSetWindow {
|
|||
vim_right,
|
||||
vim_down,
|
||||
vim_left,
|
||||
// clear_initial,
|
||||
error_popup_action,
|
||||
error_popdown_action,
|
||||
]);
|
||||
}
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ use gtk::prelude::WidgetExt;
|
|||
use gtk::subclass::prelude::*;
|
||||
use gtk::{glib, Button, CompositeTemplate, FlowBox, ListBox, SearchEntry};
|
||||
|
||||
use crate::components::base::error::ReSetError;
|
||||
use crate::components::base::utils::{Listeners, Position};
|
||||
use crate::components::wifi::wifi_box::WifiBox;
|
||||
use crate::components::window::reset_window;
|
||||
|
@ -38,6 +39,7 @@ pub struct ReSetWindow {
|
|||
pub default_entry: RefCell<Option<Rc<SidebarEntry>>>,
|
||||
pub listeners: Arc<Listeners>,
|
||||
pub position: Rc<RefCell<Position>>,
|
||||
pub error_popup: ReSetError,
|
||||
}
|
||||
|
||||
unsafe impl Send for ReSetWindow {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue