Skip to content

Commit e2741fc

Browse files
authored
Merge pull request #48 from ranfdev/hover_url
Fix hover url hint
2 parents 5b9abd0 + 15de1eb commit e2741fc

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/widgets/pages/hypertext.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,21 @@ pub mod imp {
179179
}
180180

181181
impl ObjectImpl for Hypertext {
182+
fn properties() -> &'static [glib::ParamSpec] {
183+
Self::derived_properties()
184+
}
185+
fn set_property(
186+
&self,
187+
obj: &Self::Type,
188+
id: usize,
189+
value: &glib::Value,
190+
pspec: &glib::ParamSpec,
191+
) {
192+
Self::derived_set_property(self, obj, id, value, pspec).unwrap()
193+
}
194+
fn property(&self, obj: &Self::Type, id: usize, pspec: &glib::ParamSpec) -> glib::Value {
195+
Self::derived_property(self, obj, id, pspec).unwrap()
196+
}
182197
fn signals() -> &'static [glib::subclass::Signal] {
183198
static SIGNALS: Lazy<Vec<glib::subclass::Signal>> = Lazy::new(|| {
184199
vec![

src/widgets/tab.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub mod imp {
6868
pub(crate) title: RefCell<String>,
6969
#[property(get)]
7070
pub(crate) url: RefCell<String>,
71-
#[property(get)]
71+
#[property(get, set)]
7272
pub(crate) hover_url: RefCell<String>,
7373
}
7474

@@ -586,6 +586,8 @@ impl Tab {
586586
imp.scroll_win.set_child(Some(surface.root()));
587587

588588
let p = pages::Hypertext::new(self.url(), surface);
589+
p.bind_property("hover_url", self, "hover_url").build();
590+
589591
p.connect_local(
590592
"open",
591593
false,

0 commit comments

Comments
 (0)