aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_titlebar
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-09-30 02:11:23 +0200
committerfiaxh <git@lightrise.org>2019-10-01 17:03:24 +0200
commitdf3716622a37cded9e3754da77497ca6d2f2baeb (patch)
tree079e18e51ea54723c5b1209173f8d3f75b54d102 /main/src/ui/conversation_titlebar
parent5d65f047d0fd1a1ed4a3bbe076d5cb4df76e7d5f (diff)
downloaddino-df3716622a37cded9e3754da77497ca6d2f2baeb.tar.gz
dino-df3716622a37cded9e3754da77497ca6d2f2baeb.zip
Rework no-open-conversation placeholder
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() { }
}
}