[geary/geary-0.12] Work around linker complaining gtk_widget_set_focus_on_click.



commit 8867deb8fb92e4d536c136b0041e076594a7b782
Author: Michael James Gratton <mike vee net>
Date:   Wed Oct 4 00:05:33 2017 +1100

    Work around linker complaining gtk_widget_set_focus_on_click.
    
    Should fix build on Xenial with vala >= 0.34.
    
    Thanks to Rico Tzschichholz for the suggestion.
    
    * src/client/components/main-toolbar.vala (GtkTemplate): Use dynamic
      keyword when calling focus_on_click on a Gtk.Button so that the prop is
      set directly instead of using the setter.

 src/client/components/main-toolbar.vala |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index 3c35113..d218162 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -153,7 +153,10 @@ public class MainToolbar : Gtk.Box {
     }
 
     private void setup_button(Gtk.Button b, string action_name, bool show_label = false) {
-        Gtk.Action related_action = action_group.get_action(action_name);
+        // 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;
         b.use_underline = true;
         b.tooltip_text = related_action.tooltip;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]