Don't display ConversationMessage header boxes when header not present.
* src/client/conversation-viewer/conversation-message.vala (ConversationMessage::ConversationMessage): Remove old "empty" theme CSS class, just set header boxes to be visible when setting their text. * ui/conversation-message.ui: Default header box visibility to off.
This commit is contained in:
parent
21be64fe01
commit
0f64460c90
2 changed files with 1 additions and 10 deletions
|
|
@ -141,19 +141,15 @@ public class ConversationMessage : Gtk.Box {
|
|||
set_header_text(from_header, format_addresses(message.from));
|
||||
if (message.to != null) {
|
||||
set_header_text(to_header, format_addresses(message.to));
|
||||
to_header.get_style_context().remove_class("empty");
|
||||
}
|
||||
if (message.cc != null) {
|
||||
set_header_text(cc_header, format_addresses(message.cc));
|
||||
cc_header.get_style_context().remove_class("empty");
|
||||
}
|
||||
if (message.bcc != null) {
|
||||
set_header_text(bcc_header, format_addresses(message.bcc));
|
||||
bcc_header.get_style_context().remove_class("empty");
|
||||
}
|
||||
if (message.subject != null) {
|
||||
set_header_text(subject_header, message.subject.value);
|
||||
subject_header.get_style_context().remove_class("empty");
|
||||
}
|
||||
if (message.date != null) {
|
||||
Date.ClockFormat clock_format =
|
||||
|
|
@ -162,7 +158,6 @@ public class ConversationMessage : Gtk.Box {
|
|||
date_header,
|
||||
Date.pretty_print_verbose(message.date.value, clock_format)
|
||||
);
|
||||
date_header.get_style_context().remove_class("empty");
|
||||
}
|
||||
|
||||
message_menubutton.set_menu_model(build_message_menu(email));
|
||||
|
|
@ -295,6 +290,7 @@ public class ConversationMessage : Gtk.Box {
|
|||
|
||||
private static void set_header_text(Gtk.Box header, string text) {
|
||||
((Gtk.Label) header.get_children().nth(1).data).set_text(text);
|
||||
header.set_visible(true);
|
||||
}
|
||||
|
||||
private MenuModel build_message_menu(Geary.Email email) {
|
||||
|
|
|
|||
|
|
@ -145,7 +145,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="to_header">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="to_label">
|
||||
|
|
@ -191,7 +190,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="cc_header">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="cc_label">
|
||||
|
|
@ -237,7 +235,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="bcc_header">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="bcc_label">
|
||||
|
|
@ -283,7 +280,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="subject_header">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="subject_label">
|
||||
|
|
@ -329,7 +325,6 @@
|
|||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="date_header">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="date_label">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue