mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
update actions
This commit is contained in:
parent
a5fc2a7475
commit
a6ef61486d
24 changed files with 190 additions and 294 deletions
|
|
@ -1,7 +1,5 @@
|
|||
use gtk::{
|
||||
gio::{SimpleAction, SimpleActionGroup},
|
||||
glib::uuid_string_random,
|
||||
prelude::{ActionMapExt, BoxExt, IsA, WidgetExt},
|
||||
prelude::{BoxExt, IsA},
|
||||
Box, Orientation,
|
||||
};
|
||||
|
||||
|
|
@ -13,17 +11,11 @@ impl Widget {
|
|||
// Construct
|
||||
pub fn new(
|
||||
name: &str,
|
||||
// Actions
|
||||
action_page_open: SimpleAction,
|
||||
// Components
|
||||
navigation: &impl IsA<gtk::Widget>,
|
||||
content: &impl IsA<gtk::Widget>,
|
||||
input: &impl IsA<gtk::Widget>,
|
||||
) -> Self {
|
||||
// Init additional action group
|
||||
let action_group = SimpleActionGroup::new();
|
||||
action_group.add_action(&action_page_open);
|
||||
|
||||
// Init self
|
||||
let gobject = Box::builder()
|
||||
.orientation(Orientation::Vertical)
|
||||
|
|
@ -34,8 +26,6 @@ impl Widget {
|
|||
gobject.append(content);
|
||||
gobject.append(input);
|
||||
|
||||
gobject.insert_action_group(&uuid_string_random(), Some(&action_group));
|
||||
|
||||
Self { gobject }
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue