Commit f097252e authored by Michael Gratton's avatar Michael Gratton 🍸 Committed by Michael Gratton
Browse files

Client: Only show conversation viewer's actions when needed

The conversation viewer's actions are only needed when the main
toolbar's compact actions are being shown.
parent d695f5b5
......@@ -410,7 +410,6 @@ public class Application.MainWindow :
[GtkChild] private unowned Gtk.Box conversation_viewer_box;
[GtkChild] private unowned Gtk.Revealer conversation_viewer_actions_revealer;
[GtkChild] private unowned Components.ConversationActions conversation_viewer_actions;
[GtkChild] private unowned Gtk.SizeGroup folder_size_group;
[GtkChild] private unowned Gtk.SizeGroup folder_separator_size_group;
[GtkChild] private unowned Gtk.SizeGroup conversations_size_group;
......@@ -1369,6 +1368,14 @@ public class Application.MainWindow :
this.conversation_viewer.conversation_find_bar, "search-mode-enabled",
SYNC_CREATE | BIDIRECTIONAL
);
this.main_toolbar.notify["shown-actions"].connect(
() => {
this.conversation_viewer_actions_revealer.reveal_child = (
this.main_toolbar.shown_actions ==
this.main_toolbar.compact_actions
);
}
);
if (config.desktop_environment == UNITY) {
this.main_toolbar.show_close_button = false;
this.main_layout.pack_start(main_toolbar, false, true, 0);
......
......@@ -80,6 +80,10 @@ public class Components.MainToolbar : Hdy.Leaflet {
this.find_button, "active",
SYNC_CREATE | BIDIRECTIONAL
);
this.actions_squeezer.notify["visible-child"].connect_after(
() => { notify_property("shown-actions"); }
);
}
public void set_conversation_header(Hdy.HeaderBar header) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment