aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_titlebar/occupants_entry.vala
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-01-27 15:24:58 +0100
committerfiaxh <git@lightrise.org>2019-02-05 11:50:23 -0600
commit5a7ffbc1870aeee52fed3c457817010b608e1e52 (patch)
tree9c035688c99e8c593abf263fa8e3e805f2b14b66 /main/src/ui/conversation_titlebar/occupants_entry.vala
parent084653cfc2986cd52ffd42b347f63ca3391e6ece (diff)
downloaddino-5a7ffbc1870aeee52fed3c457817010b608e1e52.tar.gz
dino-5a7ffbc1870aeee52fed3c457817010b608e1e52.zip
Move app menu into window, make conversation details dialog directly accessible, no-CSD option for main window
Diffstat (limited to 'main/src/ui/conversation_titlebar/occupants_entry.vala')
-rw-r--r--main/src/ui/conversation_titlebar/occupants_entry.vala16
1 files changed, 8 insertions, 8 deletions
diff --git a/main/src/ui/conversation_titlebar/occupants_entry.vala b/main/src/ui/conversation_titlebar/occupants_entry.vala
index 0646eee7..af553e35 100644
--- a/main/src/ui/conversation_titlebar/occupants_entry.vala
+++ b/main/src/ui/conversation_titlebar/occupants_entry.vala
@@ -8,17 +8,19 @@ class OccupantsEntry : Plugins.ConversationTitlebarEntry, Object {
public string id { get { return "occupants"; } }
StreamInteractor stream_interactor;
- Window window;
+ OccupantsWidget widget;
- public OccupantsEntry(StreamInteractor stream_interactor, Window window) {
+ public OccupantsEntry(StreamInteractor stream_interactor) {
this.stream_interactor = stream_interactor;
- this.window = window;
}
public double order { get { return 3; } }
public Plugins.ConversationTitlebarWidget? get_widget(Plugins.WidgetType type) {
if (type == Plugins.WidgetType.GTK) {
- return new OccupantsWidget(stream_interactor, window) { visible=true };
+ if (widget == null) {
+ widget = new OccupantsWidget(stream_interactor) { visible=true };
+ }
+ return widget;
}
return null;
}
@@ -28,14 +30,12 @@ class OccupantsWidget : MenuButton, Plugins.ConversationTitlebarWidget {
private Conversation? conversation;
private StreamInteractor stream_interactor;
- private Window window;
private OccupantMenu.View menu = null;
- public OccupantsWidget(StreamInteractor stream_interactor, Window window) {
+ public OccupantsWidget(StreamInteractor stream_interactor) {
image = new Image.from_icon_name("system-users-symbolic", IconSize.MENU);
this.stream_interactor = stream_interactor;
- this.window = window;
set_use_popover(true);
}
@@ -44,7 +44,7 @@ class OccupantsWidget : MenuButton, Plugins.ConversationTitlebarWidget {
visible = conversation.type_ == Conversation.Type.GROUPCHAT;
if (conversation.type_ == Conversation.Type.GROUPCHAT) {
- OccupantMenu.View new_menu = new OccupantMenu.View(stream_interactor, window, conversation);
+ OccupantMenu.View new_menu = new OccupantMenu.View(stream_interactor, conversation);
set_popover(new_menu);
if (menu != null) menu.destroy();
menu = new_menu;