mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
remove extra methods
This commit is contained in:
parent
41ccee209f
commit
12fa47f8f9
6 changed files with 106 additions and 105 deletions
|
|
@ -7,7 +7,8 @@ use widget::Widget;
|
|||
use crate::app::browser::action::Action as BrowserAction;
|
||||
use gtk::{
|
||||
gio::SimpleAction,
|
||||
glib::{GString, Uri, UriFlags},
|
||||
glib::{Uri, UriFlags},
|
||||
prelude::EditableExt,
|
||||
Entry,
|
||||
};
|
||||
use sqlite::Transaction;
|
||||
|
|
@ -94,22 +95,17 @@ impl Request {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
// Setters
|
||||
pub fn set_text(&self, value: &str) {
|
||||
self.widget.set_text(value);
|
||||
}
|
||||
|
||||
// Getters
|
||||
pub fn gobject(&self) -> &Entry {
|
||||
self.widget.gobject()
|
||||
}
|
||||
|
||||
pub fn text(&self) -> GString {
|
||||
self.widget.text()
|
||||
pub fn widget(&self) -> &Rc<Widget> {
|
||||
&self.widget
|
||||
}
|
||||
|
||||
pub fn uri(&self) -> Option<Uri> {
|
||||
match Uri::parse(&self.widget.text(), UriFlags::NONE) {
|
||||
match Uri::parse(&self.widget.gobject().text(), UriFlags::NONE) {
|
||||
Ok(uri) => Some(uri),
|
||||
_ => None,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue