[Xfce4-commits] <postler:master> Use smaller attachment icons in viewer

Christian Dywan noreply at xfce.org
Thu Feb 3 00:34:03 CET 2011


Updating branch refs/heads/master
         to e7ce5145e7f808f290498347ce87dbb71930da92 (commit)
       from dbc8649300b7c07d90890852840355b30a7b160b (commit)

commit e7ce5145e7f808f290498347ce87dbb71930da92
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Jan 31 22:18:27 2011 +0100

    Use smaller attachment icons in viewer

 postler/postler-attachments.vala |    6 ++++--
 postler/postler-viewer.vala      |    1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/postler/postler-attachments.vala b/postler/postler-attachments.vala
index 58de2f3..0ac74e4 100644
--- a/postler/postler-attachments.vala
+++ b/postler/postler-attachments.vala
@@ -11,6 +11,8 @@
 
 public class Postler.Attachments : Gtk.IconView {
     public bool editable { get; set; default = false; }
+    public int icon_size { get; set; default = 32; }
+    int attachment_icon_size = 0;
 
     public Attachments () {
         model = new Gtk.ListStore (1, typeof (MessagePart));
@@ -116,12 +118,12 @@ public class Postler.Attachments : Gtk.IconView {
         return "application-x-executable";
     }
 
-    static int attachment_icon_size = 0;
     void render_pixbuf (Gtk.CellLayout layout, Gtk.CellRenderer cell,
         Gtk.TreeModel model, Gtk.TreeIter iter) {
 
         if (attachment_icon_size == 0)
-            attachment_icon_size = Gtk.icon_size_register ("attachment", 32, 32);
+            attachment_icon_size = Gtk.icon_size_register ("attachment",
+                                                           icon_size, icon_size);
 
         MessagePart part;
         model.get (iter, 0, out part);
diff --git a/postler/postler-viewer.vala b/postler/postler-viewer.vala
index 6dab01f..3a3abc2 100644
--- a/postler/postler-viewer.vala
+++ b/postler/postler-viewer.vala
@@ -40,6 +40,7 @@ public class Postler.Viewer : Gtk.VBox {
         pack_start (scrolled, true, true, 0);
 
         attachments = new Postler.Attachments ();
+        attachments.icon_size = 24;
         pack_start (attachments, false, false, 0);
 
         notify_message_parts (content, null);



More information about the Xfce4-commits mailing list