diff options
| author | Marvin W <git@larma.de> | 2025-11-07 12:52:48 -0500 |
|---|---|---|
| committer | fiaxh <git@lightrise.org> | 2025-11-13 05:16:18 -0600 |
| commit | 68b07ef13c857b07d32c2fd8da08a0660f961a0a (patch) | |
| tree | 051a65592cc6a47c7a592c3299f0261d7d7e535f /main/src/ui/file_send_overlay.vala | |
| parent | e67b0807d4afd283bcab1acfcb083b3b0e111dd8 (diff) | |
Fix file overlay leak
Diffstat (limited to 'main/src/ui/file_send_overlay.vala')
| -rw-r--r-- | main/src/ui/file_send_overlay.vala | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/main/src/ui/file_send_overlay.vala b/main/src/ui/file_send_overlay.vala index d8a6ba6b..45349c11 100644 --- a/main/src/ui/file_send_overlay.vala +++ b/main/src/ui/file_send_overlay.vala @@ -6,16 +6,16 @@ using Dino.Entities; namespace Dino.Ui { -public class FileSendOverlay { +public class FileSendOverlay : Object { public signal void close(); public signal void send_file(); public Box main_box; - public Button close_button; - public Button send_button; - public SizingBin file_widget_insert; - public Label info_label; + public unowned Button close_button; + public unowned Button send_button; + public unowned SizingBin file_widget_insert; + public unowned Label info_label; private bool can_send = true; @@ -28,11 +28,11 @@ public class FileSendOverlay { info_label = (Label) builder.get_object("info_label"); close_button.clicked.connect(() => { - do_close(); + close(); }); send_button.clicked.connect(() => { send_file(); - do_close(); + close(); }); load_file_widget.begin(file, file_info); @@ -48,7 +48,7 @@ public class FileSendOverlay { var key_events = new EventControllerKey(); key_events.key_pressed.connect((keyval) => { if (keyval == Gdk.Key.Escape) { - do_close(); + close(); } return false; }); @@ -87,12 +87,6 @@ public class FileSendOverlay { can_send = false; } - private void do_close() { - this.close(); - main_box.unparent(); - main_box.destroy(); - } - public Widget get_widget() { return main_box; } |
