[geary/geary-0.12] Actually work around linker complaining gtk_widget_set_focus_on_click.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/geary-0.12] Actually work around linker complaining gtk_widget_set_focus_on_click.
- Date: Tue, 3 Oct 2017 14:00:29 +0000 (UTC)
commit da62080bdafe5fe232ff90eabca5a0c8c6fa22f1
Author: Michael James Gratton <mike vee net>
Date: Wed Oct 4 01:00:05 2017 +1100
Actually work around linker complaining gtk_widget_set_focus_on_click.
Thanks again to Rico Tzschichholz for pointing out the brown paper bag
error in commit 8867deb and the actual fix.
* src/client/components/main-toolbar.vala (setup_button): Call
set_focus_on_click() explicitly so valac >= 0.34 doesn't try to use
gtk_widget_set_focus_on_click from GTK+ 3.20.
src/client/components/main-toolbar.vala | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index d218162..70187d5 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -153,11 +153,12 @@ public class MainToolbar : Gtk.Box {
}
private void setup_button(Gtk.Button b, string action_name, bool show_label = false) {
- // Use dynamic here to work around linker error on
- // gtk_widget_set_focus_on_click when compiling vala >= 0.34
- // against GTK+ < 3.20
- dynamic Gtk.Action related_action = action_group.get_action(action_name);
- b.focus_on_click = false;
+ Gtk.Action related_action = action_group.get_action(action_name);
+ // Explicitly call set_focus_on_click() here to work around
+ // linker error for gtk_widget_set_focus_on_click that would
+ // otherwise get generated when compiling vala >= 0.34 against
+ // GTK+ < 3.20
+ b.set_focus_on_click(false);
b.use_underline = true;
b.tooltip_text = related_action.tooltip;
related_action.notify["tooltip"].connect(() => { b.tooltip_text = related_action.tooltip; });
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]