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
55
src/components/base/popup_impl.rs
Normal file
55
src/components/base/popup_impl.rs
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
use std::cell::RefCell;
|
||||
use std::sync::Arc;
|
||||
|
||||
use gtk::subclass::prelude::*;
|
||||
use gtk::{glib, Button, CompositeTemplate, Label, PasswordEntry, PasswordEntryBuffer, Popover};
|
||||
|
||||
use super::popup;
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
#[derive(Default, CompositeTemplate)]
|
||||
#[template(resource = "/org/Xetibo/ReSet/resetPopup.ui")]
|
||||
pub struct Popup {
|
||||
#[template_child]
|
||||
pub resetPopupLabel: TemplateChild<Label>,
|
||||
#[template_child]
|
||||
pub resetPopupEntry: TemplateChild<PasswordEntry>,
|
||||
#[template_child]
|
||||
pub resetPopupButton: TemplateChild<Button>,
|
||||
pub reset_popup_text: Arc<RefCell<PasswordEntryBuffer>>,
|
||||
}
|
||||
|
||||
unsafe impl Send for Popup {}
|
||||
unsafe impl Sync for Popup {}
|
||||
|
||||
#[glib::object_subclass]
|
||||
impl ObjectSubclass for Popup {
|
||||
const ABSTRACT: bool = false;
|
||||
const NAME: &'static str = "resetPopup";
|
||||
type Type = popup::Popup;
|
||||
type ParentType = Popover;
|
||||
|
||||
fn class_init(klass: &mut Self::Class) {
|
||||
klass.bind_template();
|
||||
}
|
||||
|
||||
fn instance_init(obj: &glib::subclass::InitializingObject<Self>) {
|
||||
obj.init_template();
|
||||
}
|
||||
}
|
||||
|
||||
impl ObjectImpl for Popup {
|
||||
fn constructed(&self) {
|
||||
self.parent_constructed();
|
||||
}
|
||||
}
|
||||
|
||||
impl WidgetImpl for Popup {}
|
||||
|
||||
impl WindowImpl for Popup {}
|
||||
|
||||
impl PopoverImpl for Popup {}
|
||||
|
||||
impl ApplicationWindowImpl for Popup {}
|
||||
|
||||
impl EditableImpl for Popup {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue