[geary/wip/728002-webkit2: 72/96] Fix attachments UI not ever being displayed.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/728002-webkit2: 72/96] Fix attachments UI not ever being displayed.
- Date: Sat, 14 Jan 2017 12:17:52 +0000 (UTC)
commit a936f79405cddc1084613cb4adbc5df5555811fd
Author: Michael James Gratton <mike vee net>
Date: Wed Jan 4 01:52:57 2017 +1100
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.
src/client/components/client-web-view.vala | 2 +-
.../conversation-viewer/conversation-email.vala | 2 +-
ui/conversation-email.ui | 2 --
ui/conversation-message.ui | 1 +
4 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/client/components/client-web-view.vala b/src/client/components/client-web-view.vala
index 98e8582..546ebea 100644
--- a/src/client/components/client-web-view.vala
+++ b/src/client/components/client-web-view.vala
@@ -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 = ""; }
diff --git a/src/client/conversation-viewer/conversation-email.vala
b/src/client/conversation-viewer/conversation-email.vala
index 2af0b4f..f6b4f6f 100644
--- a/src/client/conversation-viewer/conversation-email.vala
+++ b/src/client/conversation-viewer/conversation-email.vala
@@ -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) {
diff --git a/ui/conversation-email.ui b/ui/conversation-email.ui
index 9e5e494..0945cea 100644
--- a/ui/conversation-email.ui
+++ b/ui/conversation-email.ui
@@ -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>
diff --git a/ui/conversation-message.ui b/ui/conversation-message.ui
index d635b08..6190fb2 100644
--- a/ui/conversation-message.ui
+++ b/ui/conversation-message.ui
@@ -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>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]