mirror of
https://github.com/Xetibo/ReSet.git
synced 2025-12-15 10:01:39 +01:00
chore: snake_case all but UI templates
This commit is contained in:
parent
9f0ca6e8bf
commit
391182607d
55 changed files with 1471 additions and 1427 deletions
49
src/components/bluetooth/bluetooth_entry_impl.rs
Normal file
49
src/components/bluetooth/bluetooth_entry_impl.rs
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
use crate::components::bluetooth::bluetooth_entry;
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{glib, Button, CompositeTemplate, Image, Label};
|
||||
use std::cell::RefCell;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Default, CompositeTemplate)]
|
||||
#[template(resource = "/org/Xetibo/ReSet/resetBluetoothEntry.ui")]
|
||||
pub struct BluetoothEntry {
|
||||
#[template_child]
|
||||
pub resetBluetoothDeviceType: TemplateChild<Image>,
|
||||
#[template_child]
|
||||
pub resetBluetoothLabel: TemplateChild<Label>,
|
||||
#[template_child]
|
||||
pub resetBluetoothAddress: TemplateChild<Label>,
|
||||
#[template_child]
|
||||
pub resetBluetoothButton: TemplateChild<Button>,
|
||||
pub device_name: RefCell<String>,
|
||||
}
|
||||
|
||||
#[glib::object_subclass]
|
||||
impl ObjectSubclass for BluetoothEntry {
|
||||
const ABSTRACT: bool = false;
|
||||
const NAME: &'static str = "resetBluetoothEntry";
|
||||
type Type = bluetooth_entry::BluetoothEntry;
|
||||
type ParentType = gtk::Box;
|
||||
|
||||
fn class_init(klass: &mut Self::Class) {
|
||||
klass.bind_template();
|
||||
}
|
||||
|
||||
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
|
||||
obj.init_template();
|
||||
}
|
||||
}
|
||||
|
||||
impl ObjectImpl for BluetoothEntry {
|
||||
fn constructed(&self) {
|
||||
self.parent_constructed();
|
||||
}
|
||||
}
|
||||
|
||||
impl BoxImpl for BluetoothEntry {}
|
||||
|
||||
impl WidgetImpl for BluetoothEntry {}
|
||||
|
||||
impl WindowImpl for BluetoothEntry {}
|
||||
|
||||
impl ApplicationWindowImpl for BluetoothEntry {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue