From 2b3ce5fc95c63ed7d54e207db0585c8b8bbcd603 Mon Sep 17 00:00:00 2001 From: Marvin W Date: Sat, 14 May 2022 13:59:54 +0200 Subject: Video for GTK4 --- main/src/ui/call_window/call_window.vala | 8 ++++++-- main/src/ui/call_window/call_window_controller.vala | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) (limited to 'main/src/ui') diff --git a/main/src/ui/call_window/call_window.vala b/main/src/ui/call_window/call_window.vala index 5facd574..cd05848a 100644 --- a/main/src/ui/call_window/call_window.vala +++ b/main/src/ui/call_window/call_window.vala @@ -149,7 +149,7 @@ namespace Dino.Ui { } public void set_own_video(Widget? widget_) { -// own_video_box.foreach((widget) => { own_video_box.remove(widget); }); + unset_own_video(); own_video = widget_; if (own_video == null) { @@ -170,7 +170,11 @@ namespace Dino.Ui { } public void unset_own_video() { -// own_video_box.foreach((widget) => { own_video_box.remove(widget); }); + Widget to_remove = own_video_box.get_first_child(); + while (to_remove != null) { + own_video_box.remove(to_remove); + to_remove = own_video_box.get_first_child(); + } } public void set_status(string participant_id, string state) { diff --git a/main/src/ui/call_window/call_window_controller.vala b/main/src/ui/call_window/call_window_controller.vala index 6ff02964..e3f8b670 100644 --- a/main/src/ui/call_window/call_window_controller.vala +++ b/main/src/ui/call_window/call_window_controller.vala @@ -364,7 +364,7 @@ public class Dino.Ui.CallWindowController : Object { participant_widgets.keys.@foreach((peer_id) => { remove_participant(peer_id); return true; }); call_window_handler_ids = bottom_bar_handler_ids = new ulong[0]; - + own_video.detach(); base.dispose(); } } -- cgit v1.2.3-70-g09d2