upgrade gtk-rs version
This commit is contained in:
parent
0b5f6b8386
commit
cc577b1367
23 changed files with 401 additions and 317 deletions
|
|
@ -1,7 +1,7 @@
|
|||
use std::cell::RefCell;
|
||||
use std::rc::Rc;
|
||||
|
||||
use glib::{ParamFlags, ParamSpec, Value};
|
||||
use glib::{ParamFlags, ParamSpec, ParamSpecBoxed, Value};
|
||||
use gtk4::glib;
|
||||
use gtk4::prelude::*;
|
||||
use gtk4::subclass::prelude::*;
|
||||
|
|
@ -27,7 +27,7 @@ impl ObjectSubclass for SearchResultObject {
|
|||
impl ObjectImpl for SearchResultObject {
|
||||
fn properties() -> &'static [ParamSpec] {
|
||||
static PROPERTIES: Lazy<Vec<ParamSpec>> = Lazy::new(|| {
|
||||
vec![ParamSpec::new_boxed(
|
||||
vec![ParamSpecBoxed::new(
|
||||
// Name
|
||||
"data",
|
||||
// Nickname
|
||||
|
|
|
|||
|
|
@ -14,11 +14,7 @@ impl SearchResultObject {
|
|||
}
|
||||
|
||||
pub fn data(&self) -> Option<pop_launcher::SearchResult> {
|
||||
if let Ok(data) = self.property("data") {
|
||||
if let Ok(search_result) = data.get::<BoxedSearchResult>() {
|
||||
return search_result.0;
|
||||
}
|
||||
}
|
||||
None
|
||||
let search_result = self.property::<BoxedSearchResult>("data");
|
||||
return search_result.0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue