mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 09:35:28 +00:00
implement base button sensitivity update
This commit is contained in:
parent
58d5c96f26
commit
98f88c5464
3 changed files with 15 additions and 5 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use gtk::{
|
||||
glib::GString,
|
||||
glib::{GString, Uri, UriFlags},
|
||||
prelude::{EditableExt, EntryExt, WidgetExt},
|
||||
Entry,
|
||||
};
|
||||
|
|
@ -66,4 +66,11 @@ impl Request {
|
|||
pub fn text(&self) -> GString {
|
||||
self.widget.text()
|
||||
}
|
||||
|
||||
pub fn uri(&self) -> Option<Uri> {
|
||||
match Uri::parse(&self.widget.text(), UriFlags::NONE) {
|
||||
Ok(uri) => Some(uri),
|
||||
_ => None,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue