diff options
author | fiaxh <git@lightrise.org> | 2021-10-12 16:23:25 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2021-10-12 19:43:57 +0200 |
commit | bea85c8ab5f74d96f37c1b3a6ea1e83edd0de500 (patch) | |
tree | 973d1211daa374679d87c27312b4d1d671fe7944 /main/src/ui/conversation_titlebar | |
parent | 76e425ed2705349b201444e78719896419862b00 (diff) | |
download | dino-bea85c8ab5f74d96f37c1b3a6ea1e83edd0de500.tar.gz dino-bea85c8ab5f74d96f37c1b3a6ea1e83edd0de500.zip |
Fix compiler warnings ('cast between incompatible function types') by not connecting closures
Diffstat (limited to 'main/src/ui/conversation_titlebar')
-rw-r--r-- | main/src/ui/conversation_titlebar/menu_entry.vala | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/main/src/ui/conversation_titlebar/menu_entry.vala b/main/src/ui/conversation_titlebar/menu_entry.vala index e72cb629..9b3b6ee2 100644 --- a/main/src/ui/conversation_titlebar/menu_entry.vala +++ b/main/src/ui/conversation_titlebar/menu_entry.vala @@ -28,16 +28,14 @@ class MenuEntry : Plugins.ConversationTitlebarEntry, Object { class MenuWidget : Button, Plugins.ConversationTitlebarWidget { + private StreamInteractor stream_interactor; private Conversation? conversation; public MenuWidget(StreamInteractor stream_interactor) { + this.stream_interactor = stream_interactor; image = new Image.from_icon_name("open-menu-symbolic", IconSize.MENU); - clicked.connect(() => { - ContactDetails.Dialog contact_details_dialog = new ContactDetails.Dialog(stream_interactor, conversation); - contact_details_dialog.set_transient_for((Window) get_toplevel()); - contact_details_dialog.present(); - }); + clicked.connect(on_clicked); } public new void set_conversation(Conversation conversation) { @@ -54,6 +52,12 @@ class MenuWidget : Button, Plugins.ConversationTitlebarWidget { this.sensitive = false; } + private void on_clicked() { + ContactDetails.Dialog contact_details_dialog = new ContactDetails.Dialog(stream_interactor, conversation); + contact_details_dialog.set_transient_for((Window) get_toplevel()); + contact_details_dialog.present(); + } + } } |