aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_titlebar
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2021-10-12 16:23:25 +0200
committerfiaxh <git@lightrise.org>2021-10-12 19:43:57 +0200
commitbea85c8ab5f74d96f37c1b3a6ea1e83edd0de500 (patch)
tree973d1211daa374679d87c27312b4d1d671fe7944 /main/src/ui/conversation_titlebar
parent76e425ed2705349b201444e78719896419862b00 (diff)
downloaddino-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.vala14
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();
+ }
+
}
}