Replace Gtk.IconView with FlowBox for displaying email attachments.
This commit is contained in:
parent
a2644f243a
commit
9c813eaacb
6 changed files with 367 additions and 285 deletions
|
|
@ -1,7 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.12"/>
|
||||
<requires lib="gtk+" version="3.14"/>
|
||||
<template class="ConversationEmail" parent="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
|
|
@ -109,17 +109,8 @@
|
|||
</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="GtkGrid" id="attachments">
|
||||
<property name="name">box</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
|
|
@ -136,41 +127,105 @@
|
|||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkIconView" id="attachments_view">
|
||||
<object class="GtkFlowBox" id="attachments_view">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="margin">6</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="max_children_per_line">4</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>
|
||||
<style>
|
||||
<class name="geary-attachments"/>
|
||||
</style>
|
||||
<property name="activate_on_single_click">False</property>
|
||||
<signal name="child-activated" handler="on_attachments_child_activated" swapped="no"/>
|
||||
<signal name="selected-children-changed" handler="on_attachments_selected_changed" swapped="no"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkActionBar" id="attachments_actions">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<style>
|
||||
<class name="background"/>
|
||||
</style>
|
||||
<child>
|
||||
<object class="GtkButton" id="open_attachments">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Open selected attachments</property>
|
||||
<property name="action_name">eml.open_attachments</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">document-open-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="save_attachments">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Save selected attachments</property>
|
||||
<property name="action_name">eml.save_attachments</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">document-save-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="select_all_attachments">
|
||||
<property name="visible">False</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Select all attachments</property>
|
||||
<property name="action_name">eml.select_all_attachments</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="icon_name">edit-select-all-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="view"/>
|
||||
</style>
|
||||
</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="GtkInfoBar" id="draft_infobar">
|
||||
<property name="app_paintable">True</property>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue