Reenable displaying the "sent but not saved" message.
* src/client/conversation-viewer/conversation-email.vala (ConversationEmail::not_saved_infobar): Add a template widget child for the not-saved info bar, add to ConversationMessage's infobar box and display it when the flag is set. * ui/conversation-email.ui: Add a warning info bar for displaying the message.
This commit is contained in:
parent
ad035f799c
commit
1af11b09b4
2 changed files with 82 additions and 4 deletions
|
|
@ -59,6 +59,9 @@ public class ConversationEmail : Gtk.Box {
|
|||
[GtkChild]
|
||||
private Gtk.InfoBar draft_infobar;
|
||||
|
||||
[GtkChild]
|
||||
private Gtk.InfoBar not_saved_infobar;
|
||||
|
||||
[GtkChild]
|
||||
private Gtk.Box sub_messages_box;
|
||||
|
||||
|
|
@ -118,6 +121,8 @@ public class ConversationEmail : Gtk.Box {
|
|||
});
|
||||
}
|
||||
|
||||
primary_message.infobar_box.pack_start(not_saved_infobar, false, false, 0);
|
||||
|
||||
// if (email.from != null && email.from.contains_normalized(current_account_information.email)) {
|
||||
// // XXX set a RO property?
|
||||
// get_style_context().add_class("sent");
|
||||
|
|
@ -273,10 +278,9 @@ public class ConversationEmail : Gtk.Box {
|
|||
unstar_button.hide();
|
||||
}
|
||||
|
||||
//if (email.email_flags.is_outbox_sent()) {
|
||||
// email_warning.set_inner_html(
|
||||
// _("This message was sent successfully, but could not be saved to %s.").printf(
|
||||
// Geary.SpecialFolderType.SENT.get_display_name()));
|
||||
if (flags.is_outbox_sent()) {
|
||||
not_saved_infobar.show();
|
||||
}
|
||||
}
|
||||
|
||||
private void on_flag_remote_images(ConversationMessage view) {
|
||||
|
|
|
|||
|
|
@ -237,6 +237,80 @@
|
|||
<action-widget response="1">button3</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkInfoBar" id="not_saved_infobar">
|
||||
<property name="app_paintable">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="message_type">warning</property>
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="spacing">6</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkButton" id="button1">
|
||||
<property name="label" translatable="yes">Try Again</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child internal-child="content_area">
|
||||
<object class="GtkBox">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">16</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Message not saved</property>
|
||||
<property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">This message was sent, but has not been saved your account.</property>
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="1">button1</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
<object class="GtkBox" id="sub_messages_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue