aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_titlebar
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/conversation_titlebar')
-rw-r--r--main/src/ui/conversation_titlebar/menu_entry.vala8
-rw-r--r--main/src/ui/conversation_titlebar/occupants_entry.vala6
-rw-r--r--main/src/ui/conversation_titlebar/search_entry.vala1
3 files changed, 13 insertions, 2 deletions
diff --git a/main/src/ui/conversation_titlebar/menu_entry.vala b/main/src/ui/conversation_titlebar/menu_entry.vala
index daee48c2..e72cb629 100644
--- a/main/src/ui/conversation_titlebar/menu_entry.vala
+++ b/main/src/ui/conversation_titlebar/menu_entry.vala
@@ -18,7 +18,7 @@ class MenuEntry : Plugins.ConversationTitlebarEntry, Object {
public Plugins.ConversationTitlebarWidget? get_widget(Plugins.WidgetType type) {
if (type == Plugins.WidgetType.GTK) {
if (widget == null) {
- widget = new MenuWidget(stream_interactor) { visible=true };
+ widget = new MenuWidget(stream_interactor) { visible=true, sensitive=false };
}
return widget;
}
@@ -41,6 +41,7 @@ class MenuWidget : Button, Plugins.ConversationTitlebarWidget {
}
public new void set_conversation(Conversation conversation) {
+ this.sensitive = true;
this.conversation = conversation;
if (conversation.type_ == Conversation.Type.GROUPCHAT) {
tooltip_text = "Channel details";
@@ -48,6 +49,11 @@ class MenuWidget : Button, Plugins.ConversationTitlebarWidget {
tooltip_text = "Conversation details";
}
}
+
+ public new void unset_conversation() {
+ this.sensitive = false;
+ }
+
}
}
diff --git a/main/src/ui/conversation_titlebar/occupants_entry.vala b/main/src/ui/conversation_titlebar/occupants_entry.vala
index b5c4c228..facaa50f 100644
--- a/main/src/ui/conversation_titlebar/occupants_entry.vala
+++ b/main/src/ui/conversation_titlebar/occupants_entry.vala
@@ -18,7 +18,7 @@ class OccupantsEntry : Plugins.ConversationTitlebarEntry, Object {
public Plugins.ConversationTitlebarWidget? get_widget(Plugins.WidgetType type) {
if (type == Plugins.WidgetType.GTK) {
if (widget == null) {
- widget = new OccupantsWidget(stream_interactor) { visible=true };
+ widget = new OccupantsWidget(stream_interactor);
}
return widget;
}
@@ -51,6 +51,10 @@ class OccupantsWidget : MenuButton, Plugins.ConversationTitlebarWidget {
menu = new_menu;
}
}
+
+ public new void unset_conversation() {
+ visible = false;
+ }
}
}
diff --git a/main/src/ui/conversation_titlebar/search_entry.vala b/main/src/ui/conversation_titlebar/search_entry.vala
index 9fab0614..109c54d7 100644
--- a/main/src/ui/conversation_titlebar/search_entry.vala
+++ b/main/src/ui/conversation_titlebar/search_entry.vala
@@ -25,6 +25,7 @@ public class SearchMenuEntry : Plugins.ConversationTitlebarEntry, Object {
public class GlobalSearchButton : Plugins.ConversationTitlebarWidget, Gtk.ToggleButton {
public new void set_conversation(Conversation conversation) { }
+ public new void unset_conversation() { }
}
}