diff options
author | fiaxh <git@lightrise.org> | 2019-09-30 02:11:23 +0200 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2019-10-01 17:03:24 +0200 |
commit | df3716622a37cded9e3754da77497ca6d2f2baeb (patch) | |
tree | 079e18e51ea54723c5b1209173f8d3f75b54d102 /main/src/ui/conversation_titlebar | |
parent | 5d65f047d0fd1a1ed4a3bbe076d5cb4df76e7d5f (diff) | |
download | dino-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.vala | 8 | ||||
-rw-r--r-- | main/src/ui/conversation_titlebar/occupants_entry.vala | 6 | ||||
-rw-r--r-- | main/src/ui/conversation_titlebar/search_entry.vala | 1 |
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() { } } } |