mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
remove extra getters
This commit is contained in:
parent
3ce272cd70
commit
0af69d99f6
56 changed files with 240 additions and 710 deletions
|
|
@ -1,12 +1,8 @@
|
|||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{uuid_string_random, GString},
|
||||
prelude::ActionExt,
|
||||
};
|
||||
use gtk::{gio::SimpleAction, glib::uuid_string_random};
|
||||
|
||||
/// [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) wrapper for `About` action of `Browser` group
|
||||
pub struct About {
|
||||
gobject: SimpleAction,
|
||||
pub gobject: SimpleAction,
|
||||
}
|
||||
|
||||
impl About {
|
||||
|
|
@ -26,16 +22,4 @@ impl About {
|
|||
pub fn connect_activate(&self, callback: impl Fn() + 'static) {
|
||||
self.gobject.connect_activate(move |_, _| callback());
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
/// Get reference to [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) GObject
|
||||
pub fn gobject(&self) -> &SimpleAction {
|
||||
&self.gobject
|
||||
}
|
||||
|
||||
/// Get auto-generated [action name](https://docs.gtk.org/gio/property.SimpleAction.name.html)
|
||||
pub fn id(&self) -> GString {
|
||||
self.gobject.name()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{uuid_string_random, GString},
|
||||
prelude::ActionExt,
|
||||
};
|
||||
use gtk::{gio::SimpleAction, glib::uuid_string_random};
|
||||
|
||||
/// [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) wrapper for `Close` action of `Browser` group
|
||||
pub struct Close {
|
||||
gobject: SimpleAction,
|
||||
pub gobject: SimpleAction,
|
||||
}
|
||||
|
||||
impl Close {
|
||||
|
|
@ -26,16 +22,4 @@ impl Close {
|
|||
pub fn connect_activate(&self, callback: impl Fn() + 'static) {
|
||||
self.gobject.connect_activate(move |_, _| callback());
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
/// Get reference to [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) GObject
|
||||
pub fn gobject(&self) -> &SimpleAction {
|
||||
&self.gobject
|
||||
}
|
||||
|
||||
/// Get auto-generated [action name](https://docs.gtk.org/gio/property.SimpleAction.name.html)
|
||||
pub fn id(&self) -> GString {
|
||||
self.gobject.name()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{uuid_string_random, GString},
|
||||
prelude::ActionExt,
|
||||
};
|
||||
use gtk::{gio::SimpleAction, glib::uuid_string_random};
|
||||
|
||||
/// [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) wrapper for `Debug` action of `Browser` group
|
||||
pub struct Debug {
|
||||
gobject: SimpleAction,
|
||||
pub gobject: SimpleAction,
|
||||
}
|
||||
|
||||
impl Debug {
|
||||
|
|
@ -26,16 +22,4 @@ impl Debug {
|
|||
pub fn connect_activate(&self, callback: impl Fn() + 'static) {
|
||||
self.gobject.connect_activate(move |_, _| callback());
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
/// Get reference to [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) GObject
|
||||
pub fn gobject(&self) -> &SimpleAction {
|
||||
&self.gobject
|
||||
}
|
||||
|
||||
/// Get auto-generated [action name](https://docs.gtk.org/gio/property.SimpleAction.name.html)
|
||||
pub fn id(&self) -> GString {
|
||||
self.gobject.name()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +1,8 @@
|
|||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{uuid_string_random, GString},
|
||||
prelude::ActionExt,
|
||||
};
|
||||
use gtk::{gio::SimpleAction, glib::uuid_string_random};
|
||||
|
||||
/// [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) wrapper for `Profile` action of `Browser` group
|
||||
pub struct Profile {
|
||||
gobject: SimpleAction,
|
||||
pub gobject: SimpleAction,
|
||||
}
|
||||
|
||||
impl Profile {
|
||||
|
|
@ -26,16 +22,4 @@ impl Profile {
|
|||
pub fn connect_activate(&self, callback: impl Fn() + 'static) {
|
||||
self.gobject.connect_activate(move |_, _| callback());
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
/// Get reference to [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) GObject
|
||||
pub fn gobject(&self) -> &SimpleAction {
|
||||
&self.gobject
|
||||
}
|
||||
|
||||
/// Get auto-generated [action name](https://docs.gtk.org/gio/property.SimpleAction.name.html)
|
||||
pub fn id(&self) -> GString {
|
||||
self.gobject.name()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ use gtk::{
|
|||
|
||||
/// [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) wrapper for `Update` action of `Browser` group
|
||||
pub struct Update {
|
||||
gobject: SimpleAction,
|
||||
pub gobject: SimpleAction,
|
||||
}
|
||||
|
||||
impl Update {
|
||||
|
|
@ -50,16 +50,4 @@ impl Update {
|
|||
})
|
||||
});
|
||||
}
|
||||
|
||||
// Getters
|
||||
|
||||
/// Get reference to [SimpleAction](https://docs.gtk.org/gio/class.SimpleAction.html) GObject
|
||||
pub fn gobject(&self) -> &SimpleAction {
|
||||
&self.gobject
|
||||
}
|
||||
|
||||
/// Get auto-generated [action name](https://docs.gtk.org/gio/property.SimpleAction.name.html)
|
||||
pub fn id(&self) -> GString {
|
||||
self.gobject.name()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue