Since we're using the Icon View, we have some more options in terms of user selction and the actions applicable to that. So make the attachment signals and their handlers all apply to collections of attachments and use the GAppInfo class for determining which app to open an attachment with. * src/client/application/geary-controller.vala: Chase signal changes. (GearyController::on_attachments_activated): Handle multiple attachments being activated at once. Use its GAppInfo for launching each attachment, prompt the user with an GtkAppChooserDialog if the info is unknown. * src/client/conversation-viewer/conversation-email.vala Use the new AttachmentInfo class to manage lists of all displayed and currently selected attachments and their associated GAppInfo objects. Add actions for attachment context menu items. Move attachment signals from ConversationViewer here, make all attachment signals have a collection of them as their param. Hook up appropriate GtkIconView callbacks to manage selection, activation, etc. Construct AttachmentInfo instances when loading attachments and use them in the icon view's model. * ui/conversation-email.ui: Define needed callbacks for the icon view. Update its model to accept a GObject for the attachment info class. * ui/conversation-message-menu.ui: Fix action name for save attachments menu item.
324 lines
12 KiB
XML
324 lines
12 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!-- Generated with glade 3.20.0 -->
|
|
<interface>
|
|
<requires lib="gtk+" version="3.12"/>
|
|
<template class="ConversationEmail" parent="GtkBox">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="orientation">vertical</property>
|
|
<child>
|
|
<placeholder/>
|
|
</child>
|
|
<child>
|
|
<placeholder/>
|
|
</child>
|
|
<style>
|
|
<class name="geary_email"/>
|
|
</style>
|
|
</template>
|
|
<object class="GtkBox" id="action_box">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="halign">end</property>
|
|
<property name="valign">start</property>
|
|
<property name="homogeneous">True</property>
|
|
<child>
|
|
<object class="GtkImage" id="attachment_icon">
|
|
<property name="can_focus">False</property>
|
|
<property name="tooltip_text" translatable="yes">This message has attachments</property>
|
|
<property name="icon_name">mail-attachment-symbolic</property>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">False</property>
|
|
<property name="fill">False</property>
|
|
<property name="position">0</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
<object class="GtkButton" id="star_button">
|
|
<property name="visible">True</property>
|
|
<property name="sensitive">False</property>
|
|
<property name="can_focus">True</property>
|
|
<property name="receives_default">True</property>
|
|
<property name="tooltip_text" translatable="yes">Mark this message as starred</property>
|
|
<property name="valign">start</property>
|
|
<property name="action_name">msg.star</property>
|
|
<property name="relief">none</property>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="icon_name">non-starred-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">False</property>
|
|
<property name="fill">False</property>
|
|
<property name="position">1</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
<object class="GtkButton" id="unstar_button">
|
|
<property name="visible">True</property>
|
|
<property name="sensitive">False</property>
|
|
<property name="can_focus">True</property>
|
|
<property name="receives_default">True</property>
|
|
<property name="tooltip_text" translatable="yes">Mark this message as not starred</property>
|
|
<property name="valign">start</property>
|
|
<property name="action_name">msg.unstar</property>
|
|
<property name="relief">none</property>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="icon_name">starred-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">False</property>
|
|
<property name="fill">False</property>
|
|
<property name="position">2</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
<object class="GtkMenuButton" id="email_menubutton">
|
|
<property name="visible">True</property>
|
|
<property name="sensitive">False</property>
|
|
<property name="can_focus">True</property>
|
|
<property name="receives_default">True</property>
|
|
<property name="tooltip_text" translatable="yes">Display the message menu</property>
|
|
<property name="valign">start</property>
|
|
<property name="relief">none</property>
|
|
<child>
|
|
<object class="GtkImage">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="icon_name">open-menu-symbolic</property>
|
|
</object>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">False</property>
|
|
<property name="fill">False</property>
|
|
<property name="position">3</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
<object class="GtkListStore" id="attachments_model">
|
|
<columns>
|
|
<!-- column-name icon -->
|
|
<column type="GdkPixbuf"/>
|
|
<!-- column-name label -->
|
|
<column type="gchararray"/>
|
|
<!-- column-name attachment_info -->
|
|
<column type="GObject"/>
|
|
</columns>
|
|
</object>
|
|
<object class="GtkBox" id="attachments_box">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="orientation">vertical</property>
|
|
<child>
|
|
<object class="GtkSeparator">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">False</property>
|
|
<property name="fill">False</property>
|
|
<property name="position">0</property>
|
|
</packing>
|
|
</child>
|
|
<child>
|
|
<object class="GtkIconView" id="attachments_view">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">True</property>
|
|
<property name="margin">0</property>
|
|
<property name="selection_mode">multiple</property>
|
|
<property name="item_orientation">horizontal</property>
|
|
<property name="model">attachments_model</property>
|
|
<property name="spacing">6</property>
|
|
<signal name="button-press-event" handler="on_attachments_view_button_press_event" swapped="no"/>
|
|
<signal name="item-activated" handler="on_attachments_view_activated" swapped="no"/>
|
|
<signal name="selection-changed" handler="on_attachments_view_selection_changed" swapped="no"/>
|
|
<child>
|
|
<object class="GtkCellRendererPixbuf" id="icon"/>
|
|
<attributes>
|
|
<attribute name="pixbuf">0</attribute>
|
|
</attributes>
|
|
</child>
|
|
<child>
|
|
<object class="GtkCellRendererText" id="file_name">
|
|
<property name="xpad">6</property>
|
|
</object>
|
|
<attributes>
|
|
<attribute name="text">1</attribute>
|
|
</attributes>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">True</property>
|
|
<property name="fill">True</property>
|
|
<property name="position">1</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
<object class="GtkInfoBar" id="draft_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="button3">
|
|
<property name="label" translatable="yes">Edit Draft</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">1</property>
|
|
</packing>
|
|
</child>
|
|
</object>
|
|
<packing>
|
|
<property name="expand">True</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">2</property>
|
|
<child>
|
|
<object class="GtkLabel">
|
|
<property name="visible">True</property>
|
|
<property name="can_focus">False</property>
|
|
<property name="label" translatable="yes">Draft message</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 has not yet been sent.</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">True</property>
|
|
<property name="fill">True</property>
|
|
<property name="position">0</property>
|
|
</packing>
|
|
</child>
|
|
<action-widgets>
|
|
<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>
|
|
<property name="orientation">vertical</property>
|
|
<child>
|
|
<placeholder/>
|
|
</child>
|
|
</object>
|
|
</interface>
|