From 602834bdf777cf1c3909392dc52e5a3543f0ad0c Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sat, 12 Feb 2022 19:15:35 +0100 Subject: Fix build on Debian 10 --- main/src/ui/call_window/participant_widget.vala | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/main/src/ui/call_window/participant_widget.vala b/main/src/ui/call_window/participant_widget.vala index e21ab586..1f6be68d 100644 --- a/main/src/ui/call_window/participant_widget.vala +++ b/main/src/ui/call_window/participant_widget.vala @@ -33,13 +33,8 @@ namespace Dino.Ui { header_bar.pack_start(invite_button); header_bar.pack_start(encryption_button); header_bar.pack_end(menu_button); - PopoverMenu menu = new PopoverMenu(); - Box box = new Box(Orientation.VERTICAL, 0) { margin=10, visible=true }; - ModelButton debug_information_button = new ModelButton() { text=_("Debug information"), visible=true }; - debug_information_button.clicked.connect(() => debug_information_clicked()); - box.add(debug_information_button); - menu.add(box); - menu_button.popover = menu; + + menu_button.popover = create_menu(); invite_button.clicked.connect(() => invite_button_clicked()); this.add_overlay(header_bar); @@ -94,6 +89,16 @@ namespace Dino.Ui { this.add(main_widget); } + private PopoverMenu create_menu() { + PopoverMenu menu = new PopoverMenu(); + Box box = new Box(Orientation.VERTICAL, 0) { margin=10, visible=true }; + ModelButton debug_information_button = new ModelButton() { text=_("Debug information"), visible=true }; + debug_information_button.clicked.connect(() => debug_information_clicked()); + box.add(debug_information_button); + menu.add(box); + return menu; + } + public void set_status(string state) { if (state == "requested") { header_bar.subtitle = _("Calling…"); -- cgit v1.2.3-70-g09d2