[geary: 2/2] Merge branch 'composer-fields' into 'mainline'
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary: 2/2] Merge branch 'composer-fields' into 'mainline'
- Date: Thu, 23 Jan 2020 09:23:39 +0000 (UTC)
commit 411a7198e39f77f9646cd9e24f007af5c3e48dae
Merge: fa38c6cf f5b6bd6e
Author: Michael Gratton <mike vee net>
Date: Thu Jan 23 09:23:03 2020 +0000
Merge branch 'composer-fields' into 'mainline'
composer: Do not hide nonempty extended fields
Closes #675
See merge request GNOME/geary!402
src/client/composer/composer-widget.vala | 67 ++++++++++++++++++++++++--------
ui/composer-widget.ui | 39 +++++++++++++------
2 files changed, 79 insertions(+), 27 deletions(-)
---
diff --cc src/client/composer/composer-widget.vala
index 8c82f47c,67b4c439..30b928c5
--- a/src/client/composer/composer-widget.vala
+++ b/src/client/composer/composer-widget.vala
@@@ -2140,9 -2133,39 +2140,40 @@@ public class Composer.Widget : Gtk.Even
this.editor.set_rich_text(compose_as_html);
this.application.config.compose_as_html = compose_as_html;
+ this.text_format_button.popover.popdown();
}
+ private void reparent_widget(Gtk.Widget child, Gtk.Container new_parent) {
+ ((Gtk.Container) child.get_parent()).remove(child);
+ new_parent.add(child);
+ }
+
+ private void update_extended_headers(bool reorder=true) {
+ bool cc = this.cc_entry.addresses != null;
+ bool bcc = this.bcc_entry.addresses != null;
+ bool reply_to = this.reply_to_entry.addresses != null;
+
+ if (reorder) {
+ if (cc) {
+ reparent_widget(this.cc_row, this.filled_fields);
+ } else {
+ reparent_widget(this.cc_row, this.extended_fields_box);
+ }
+ if (bcc) {
+ reparent_widget(this.bcc_row, this.filled_fields);
+ } else {
+ reparent_widget(this.bcc_row, this.extended_fields_box);
+ }
+ if (reply_to) {
+ reparent_widget(this.reply_to_row, this.filled_fields);
+ } else {
+ reparent_widget(this.reply_to_row, this.extended_fields_box);
+ }
+ }
+
+ this.show_extended_fields.visible = !(cc && bcc && reply_to);
+ }
+
private void on_show_extended_headers_toggled(GLib.SimpleAction? action,
GLib.Variant? new_state) {
bool show_extended = new_state.get_boolean();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]