Fix build on Debian 10

This commit is contained in:
Marvin W 2022-02-12 19:15:35 +01:00
parent 06f0bc00f1
commit 602834bdf7
No known key found for this signature in database
GPG key ID: 072E9235DB996F2A

View file

@ -33,13 +33,8 @@ namespace Dino.Ui {
header_bar.pack_start(invite_button); header_bar.pack_start(invite_button);
header_bar.pack_start(encryption_button); header_bar.pack_start(encryption_button);
header_bar.pack_end(menu_button); header_bar.pack_end(menu_button);
PopoverMenu menu = new PopoverMenu();
Box box = new Box(Orientation.VERTICAL, 0) { margin=10, visible=true }; menu_button.popover = create_menu();
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;
invite_button.clicked.connect(() => invite_button_clicked()); invite_button.clicked.connect(() => invite_button_clicked());
this.add_overlay(header_bar); this.add_overlay(header_bar);
@ -94,6 +89,16 @@ namespace Dino.Ui {
this.add(main_widget); 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) { public void set_status(string state) {
if (state == "requested") { if (state == "requested") {
header_bar.subtitle = _("Calling…"); header_bar.subtitle = _("Calling…");