Fix attachments UI not ever being displayed.

* src/client/components/client-web-view.vala (ClientWebView): Make
  has_valid_height a GObject property so we can get notified about it
  changing.

* src/client/conversation-viewer/conversation-email.vala
  (ConversationEmail::connect_message_view_signals): Fixed to listen to
  has-valid-height changing rather than the old WK1 load-status property.

* ui/conversation-message.ui: Set body_container orientation to vertical
  so adding the attachments widget works as expected.
This commit is contained in:
Michael James Gratton 2017-01-04 01:52:57 +11:00
parent 636e514cda
commit 6171ff2ebd
4 changed files with 3 additions and 4 deletions

View file

@ -134,7 +134,7 @@ public class ClientWebView : WebKit.WebView {
}
public bool has_valid_height = false;
public bool has_valid_height { get; set; default = false; }
public string allow_prefix { get; private set; default = ""; }

View file

@ -630,7 +630,7 @@ public class ConversationEmail : Gtk.Box {
view.web_view.inline_resource_loaded.connect((id) => {
this.inlined_content_ids.add(id);
});
view.web_view.notify["load-status"].connect(() => {
view.web_view.notify["has-valid-height"].connect(() => {
bool all_loaded = true;
message_view_iterator().foreach((view) => {
if (!view.web_view.has_valid_height) {

View file

@ -113,13 +113,11 @@
<property name="name">box</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
</object>
<packing>
<property name="left_attach">0</property>

View file

@ -601,6 +601,7 @@
<object class="GtkGrid" id="body_container">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<style>
<class name="geary-message-body"/>
</style>