[geary/wip/765516-gtk-widget-conversation-viewer: 95/107] Convert ConversationEmail's attachment icon into a button.
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/765516-gtk-widget-conversation-viewer: 95/107] Convert ConversationEmail's attachment icon into a button.
- Date: Sun, 5 Jun 2016 12:35:28 +0000 (UTC)
commit 42e7a8dda333b5ba78c10e885641004f9046d6fd
Author: Michael James Gratton <mike vee net>
Date: Sat Apr 23 17:18:55 2016 +1000
Convert ConversationEmail's attachment icon into a button.
Since both the star and email menu button are both buttons, the
attachments icon should be as as well. Replace the Save Attachments menu
item with this button.
* src/client/conversation-viewer/conversation-email.vala: Convert
attachment_icon to attachment_button. Update call sites.
* ui/conversation-email.ui: Replace attachments icon with button.
* ui/conversation-message-menu.ui: Remove Save Attachments item.
.../conversation-viewer/conversation-email.vala | 4 ++--
ui/conversation-email.ui | 19 +++++++++++++++----
ui/conversation-message-menu.ui | 6 ------
3 files changed, 17 insertions(+), 12 deletions(-)
---
diff --git a/src/client/conversation-viewer/conversation-email.vala
b/src/client/conversation-viewer/conversation-email.vala
index ca3aee8..0654880 100644
--- a/src/client/conversation-viewer/conversation-email.vala
+++ b/src/client/conversation-viewer/conversation-email.vala
@@ -89,7 +89,7 @@ public class ConversationEmail : Gtk.Box {
private Gtk.Box action_box;
[GtkChild]
- private Gtk.Image attachment_icon;
+ private Gtk.Button attachments_button;
[GtkChild]
private Gtk.Button star_button;
@@ -457,7 +457,7 @@ public class ConversationEmail : Gtk.Box {
// Show attachments container. Would like to do this in the
// ctor but we don't know at that point if any attachments
// will be displayed inline.
- attachment_icon.set_visible(true);
+ attachments_button.set_visible(true);
primary_message.body_box.pack_start(attachments_box, false, false, 0);
// Add each displayed attachment to the icon view
diff --git a/ui/conversation-email.ui b/ui/conversation-email.ui
index d867aed..bd96131 100644
--- a/ui/conversation-email.ui
+++ b/ui/conversation-email.ui
@@ -23,10 +23,21 @@
<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 class="GtkButton" id="attachments_button">
+ <property name="sensitive">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="tooltip_text" translatable="yes">Save all attachments</property>
+ <property name="valign">start</property>
+ <property name="action_name">msg.save_all_attachments</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">mail-attachment-symbolic</property>
+ </object>
+ </child>
</object>
<packing>
<property name="expand">False</property>
diff --git a/ui/conversation-message-menu.ui b/ui/conversation-message-menu.ui
index fc18731..7dee969 100644
--- a/ui/conversation-message-menu.ui
+++ b/ui/conversation-message-menu.ui
@@ -4,12 +4,6 @@
<menu id="email_menu">
<section>
<item>
- <attribute name="label" translatable="yes">_Save Attachments</attribute>
- <attribute name="action">msg.save_all_attachments</attribute>
- </item>
- </section>
- <section>
- <item>
<attribute name="label" translatable="yes">_Reply</attribute>
<attribute name="action">msg.reply_sender</attribute>
</item>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]