mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-12-15 18:11:38 +01:00
Restructure Reset
This commit is contained in:
parent
721e7d3f4e
commit
b3f1bfd59b
16 changed files with 54 additions and 30 deletions
43
src/components/audio/audioBox.rs
Normal file
43
src/components/audio/audioBox.rs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
use gtk::{Button, CompositeTemplate, DropDown, TemplateChild, glib};
|
||||
use gtk::prelude::*;
|
||||
use gtk::subclass::prelude::*;
|
||||
use crate::components::audio::AudioSourceEntry;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Default, CompositeTemplate)]
|
||||
#[template(resource = "/org/xetibo/reset/resetAudio.ui")]
|
||||
pub struct AudioBox {
|
||||
#[template_child]
|
||||
pub resetOutputDevice: TemplateChild<DropDown>,
|
||||
#[template_child]
|
||||
pub resetAllOutputDevices: TemplateChild<Button>,
|
||||
}
|
||||
|
||||
|
||||
#[glib::object_subclass]
|
||||
impl ObjectSubclass for AudioBox {
|
||||
const NAME: &'static str = "resetAudio";
|
||||
type Type = super::AudioBox;
|
||||
type ParentType = gtk::Box;
|
||||
|
||||
fn class_init(klass: &mut Self::Class) {
|
||||
AudioSourceEntry::ensure_type();
|
||||
klass.bind_template();
|
||||
}
|
||||
|
||||
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
|
||||
obj.init_template();
|
||||
}
|
||||
}
|
||||
|
||||
impl BoxImpl for AudioBox {}
|
||||
|
||||
impl ObjectImpl for AudioBox {}
|
||||
|
||||
impl ListBoxRowImpl for AudioBox {}
|
||||
|
||||
impl WidgetImpl for AudioBox {}
|
||||
|
||||
impl WindowImpl for AudioBox {}
|
||||
|
||||
impl ApplicationWindowImpl for AudioBox {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue