aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/call_window
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/call_window')
-rw-r--r--main/src/ui/call_window/call_bottom_bar.vala1
-rw-r--r--main/src/ui/call_window/call_window.vala4
-rw-r--r--main/src/ui/call_window/call_window_controller.vala30
3 files changed, 18 insertions, 17 deletions
diff --git a/main/src/ui/call_window/call_bottom_bar.vala b/main/src/ui/call_window/call_bottom_bar.vala
index a9fee8c3..a3e4b93b 100644
--- a/main/src/ui/call_window/call_bottom_bar.vala
+++ b/main/src/ui/call_window/call_bottom_bar.vala
@@ -25,7 +25,6 @@ public class Dino.Ui.CallBottomBar : Gtk.Box {
private MenuButton video_settings_button = new MenuButton() { halign=Align.END, valign=Align.END };
public VideoSettingsPopover? video_settings_popover;
- private EventBox encryption_event_box = new EventBox() { visible=true };
private MenuButton encryption_button = new MenuButton() { relief=ReliefStyle.NONE, height_request=30, width_request=30, margin_start=20, margin_bottom=25, halign=Align.START, valign=Align.END };
private Image encryption_image = new Image.from_icon_name("changes-allow-symbolic", IconSize.BUTTON) { visible=true };
diff --git a/main/src/ui/call_window/call_window.vala b/main/src/ui/call_window/call_window.vala
index 572f73b6..3b3d4dc2 100644
--- a/main/src/ui/call_window/call_window.vala
+++ b/main/src/ui/call_window/call_window.vala
@@ -158,13 +158,13 @@ namespace Dino.Ui {
public void set_status(string state) {
switch (state) {
case "requested":
- header_bar.subtitle = _("Sending a call request…");
+ header_bar.subtitle = _("Calling…");
break;
case "ringing":
header_bar.subtitle = _("Ringing…");
break;
case "establishing":
- header_bar.subtitle = _("Establishing a (peer-to-peer) connection…");
+ header_bar.subtitle = _("Connecting…");
break;
default:
header_bar.subtitle = null;
diff --git a/main/src/ui/call_window/call_window_controller.vala b/main/src/ui/call_window/call_window_controller.vala
index 616e341d..0a223d72 100644
--- a/main/src/ui/call_window/call_window_controller.vala
+++ b/main/src/ui/call_window/call_window_controller.vala
@@ -3,8 +3,6 @@ using Gtk;
public class Dino.Ui.CallWindowController : Object {
- public signal void terminated();
-
private CallWindow call_window;
private Call call;
private Conversation conversation;
@@ -40,8 +38,16 @@ public class Dino.Ui.CallWindowController : Object {
call_window.set_status("requested");
}
- call_window.bottom_bar.hang_up.connect(end_call);
- call_window.destroy.connect(end_call);
+ call_window.bottom_bar.hang_up.connect(() => {
+ calls.end_call(conversation, call);
+ call_window.close();
+ call_window.destroy();
+ this.dispose();
+ });
+ call_window.destroy.connect(() => {
+ calls.end_call(conversation, call);
+ this.dispose();
+ });
call_window.bottom_bar.notify["audio-enabled"].connect(() => {
calls.mute_own_audio(call, !call_window.bottom_bar.audio_enabled);
@@ -116,16 +122,6 @@ public class Dino.Ui.CallWindowController : Object {
this.window_width = this.call_window.get_allocated_width();
}
- private void end_call() {
- call.notify["state"].disconnect(on_call_state_changed);
- calls.call_terminated.disconnect(on_call_terminated);
-
- calls.end_call(conversation, call);
- call_window.close();
- call_window.destroy();
- terminated();
- }
-
private void on_call_state_changed() {
if (call.state == Call.State.IN_PROGRESS) {
call_window.set_status("");
@@ -234,4 +230,10 @@ public class Dino.Ui.CallWindowController : Object {
call_window.unset_own_video();
}
}
+
+ public override void dispose() {
+ base.dispose();
+ call.notify["state"].disconnect(on_call_state_changed);
+ calls.call_terminated.disconnect(on_call_terminated);
+ }
} \ No newline at end of file