feat: Add inbuilt daemon and create preference/shorcut window shell

This commit is contained in:
Fabio Lenherr / DashieTM 2023-11-10 22:00:39 +01:00
parent 2228c11c3c
commit d00c76fa9e
4 changed files with 56 additions and 13 deletions

View file

@ -262,5 +262,17 @@ impl Window {
dialog.present();
}));
selfImp
.resetPreferenceButton
.connect_clicked(clone!(@weak self as window => move |_| {
let preferences = adw::PreferencesWindow::builder().build();
preferences.present();
}));
selfImp
.resetShortcutsButton
.connect_clicked(clone!(@weak self as window => move |_| {
let shortcuts = gtk::ShortcutsWindow::builder().build();
shortcuts.present();
}));
}
}

View file

@ -1,15 +1,15 @@
use std::cell::RefCell;
use adw::{Breakpoint, OverlaySplitView};
use adw::glib::StaticTypeExt;
use adw::subclass::prelude::AdwApplicationWindowImpl;
use adw::{Breakpoint, OverlaySplitView};
use glib::subclass::InitializingObject;
use gtk::{Box, Button, CompositeTemplate, FlowBox, glib, ListBox, PopoverMenu, SearchEntry};
use gtk::subclass::prelude::*;
use gtk::{glib, Box, Button, CompositeTemplate, FlowBox, ListBox, PopoverMenu, SearchEntry};
use crate::components::wifi::wifiBox::WifiBox;
use crate::components::window::window;
use crate::components::window::sidebarEntry::SidebarEntry;
use crate::components::window::window;
#[allow(non_snake_case)]
#[derive(CompositeTemplate, Default)]
@ -35,6 +35,10 @@ pub struct Window {
pub resetClose: TemplateChild<Button>,
#[template_child]
pub resetAboutButton: TemplateChild<Button>,
#[template_child]
pub resetPreferenceButton: TemplateChild<Button>,
#[template_child]
pub resetShortcutsButton: TemplateChild<Button>,
pub sidebarEntries: RefCell<Vec<(SidebarEntry, Vec<SidebarEntry>)>>,
}