[geary/mjog/780-fix-content-area-api-change] components.InfoBar: Fix compilation errors with get_action_area on F31
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/780-fix-content-area-api-change] components.InfoBar: Fix compilation errors with get_action_area on F31
- Date: Mon, 30 Mar 2020 21:45:36 +0000 (UTC)
commit 2aa54a9d1c533dc4f0f95565b494f55874205b5b
Author: Michael Gratton <mike vee net>
Date: Tue Mar 31 08:15:20 2020 +1100
components.InfoBar: Fix compilation errors with get_action_area on F31
GTK 3.24.16 fixed the bindings annotation for
Gtk.InfoBar.get_action_area() and this has been picked up by valac
master already.
Fixes #780
src/client/application/application-main-window.vala | 12 ++++++++++--
src/client/components/components-info-bar.vala | 6 ++++++
2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/src/client/application/application-main-window.vala
b/src/client/application/application-main-window.vala
index d4189970..290c09e5 100644
--- a/src/client/application/application-main-window.vala
+++ b/src/client/application/application-main-window.vala
@@ -547,7 +547,11 @@ public class Application.MainWindow :
"Retry login, you will be prompted for your password"
);
auth_retry.clicked.connect(on_auth_problem_retry);
- this.auth_problem_infobar.get_action_area().add(auth_retry);
+ var auth_action_box = (
+ this.auth_problem_infobar.get_action_area()
+ as Gtk.Box
+ );
+ auth_action_box.add(auth_retry);
this.cert_problem_infobar = new Components.InfoBar(
// Translators: An info bar status label
@@ -562,7 +566,11 @@ public class Application.MainWindow :
"Check the security details for the connection"
);
cert_retry.clicked.connect(on_cert_problem_retry);
- this.cert_problem_infobar.get_action_area().add(cert_retry);
+ var cert_action_box = (
+ this.auth_problem_infobar.get_action_area()
+ as Gtk.Box
+ );
+ cert_action_box.add(cert_retry);
this.conversation_list_view.grab_focus();
}
diff --git a/src/client/components/components-info-bar.vala b/src/client/components/components-info-bar.vala
index 6e3506c0..943218b2 100644
--- a/src/client/components/components-info-bar.vala
+++ b/src/client/components/components-info-bar.vala
@@ -94,4 +94,10 @@ public class Components.InfoBar : Gtk.InfoBar {
show_all();
}
+ // GTK 3.24.16 fixed the binding for this, but that and the VAPI
+ // change has yet to trickle down to common distros like F31
+ public new Gtk.Box get_action_area() {
+ return (Gtk.Box) base.get_action_area();
+ }
+
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]