[Xfce4-commits] <postler:master> Put composer toolbar on the bottom

Christian Dywan noreply at xfce.org
Sat Jan 22 06:48:05 CET 2011


Updating branch refs/heads/master
         to 35ef28344a12724e0d64250bb070e0c859e2abc7 (commit)
       from dfc598d715050095b4f0f2356cf7b166c03ade31 (commit)

commit 35ef28344a12724e0d64250bb070e0c859e2abc7
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sat Jan 22 03:46:11 2011 +0100

    Put composer toolbar on the bottom

 postler/postler-composer.vala |   38 +++++++++++++++++++++++++++-----------
 1 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index d26c57c..d14b5db 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -1,5 +1,5 @@
 /*
- Copyright (C) 2010 Christian Dywan <christian at twotoasts.de>
+ Copyright (C) 2011 Christian Dywan <christian at twotoasts.de>
 
  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
@@ -53,14 +53,10 @@ public class Postler.Composer : Gtk.Window {
                 </menu>
             </menubar>
             <toolbar>
-                <toolitem action="MessageSend"/>
-                <toolitem action="MessageSave"/>
-                <separator/>
+                <toolitem action="Quote"/>
                 <toolitem action="FileAttach"/>
-                <separator/>
                 <toolitem action="AddressBook"/>
                 <separator expand="true"/>
-                <toolitem action="Quote"/>
             </toolbar>
             <popup name="emoticons">
                 <menuitem action="InsertEmoticonSmileBig"/>
@@ -479,18 +475,37 @@ public class Postler.Composer : Gtk.Window {
         menubar.hide ();
         shelf.pack_start (menubar, false, false, 0);
         toolbar = ui.get_widget ("/toolbar") as Gtk.Toolbar;
-        actions.get_action ("MessageSend").is_important = true;
+        toolbar.set_icon_size (Gtk.IconSize.BUTTON);
+        var toolitem = new Gtk.ToolItem ();
+        toolitem.set_border_width (4);
+        var button = new Gtk.Button.from_stock (Gtk.STOCK_SAVE);
+        toolitem.add (button);
+        actions.get_action ("MessageSave").connect_proxy (button);
+        button.sensitive = false;
+        button.clicked.connect ((widget) => {
+            /* TODO: action_mail_save (); */
+        });
+        toolbar.insert (toolitem, -1);
+        toolitem = new Gtk.ToolItem ();
+        toolitem.set_border_width (4);
+        button = new Gtk.Button.from_stock (STOCK_MAIL_SEND);
+        toolitem.add (button);
+        actions.get_action ("MessageSend").connect_proxy (button);
+        button.clicked.connect ((widget) => {
+            action_mail_send ();
+        });
+        toolbar.insert (toolitem, -1);
 
-        var toolitem = new Gtk.ToggleToolButton.from_stock (STOCK_FACE_SMILE_BIG);
-        toolitem.label = _("Insert Smiley");
+        toolitem = new Gtk.ToggleToolButton.from_stock (STOCK_FACE_SMILE_BIG);
+        (toolitem as Gtk.ToggleToolButton).label = _("Insert Smiley");
         toolitem.tooltip_text = _("Insert a Smiley into the message");
         actions.get_action ("Emoticons").connect_proxy (toolitem);
         (toolitem as Gtk.ToggleToolButton).clicked.connect ((widget) => {
             action_emoticons (actions.get_action ("Emoticons"));
         });
-        toolbar.insert (toolitem, -1);
+        toolbar.insert (toolitem, 0);
 
-        shelf.pack_start (toolbar, false, false, 0);
+        shelf.pack_end (toolbar, false, false, 0);
         var sizegroup = new Gtk.SizeGroup (Gtk.SizeGroupMode.HORIZONTAL);
         var box = new Gtk.HBox (false, 0);
         shelf.pack_start (box, false, false, 4);
@@ -526,6 +541,7 @@ public class Postler.Composer : Gtk.Window {
         box.pack_start (entry_subject, true, true, 4);
         content = new Postler.Content ();
         var scrolled = new Postler.ScrolledWindow (content);
+        scrolled.shadow_type = Gtk.ShadowType.IN;
         shelf.pack_start (scrolled, true, true, 0);
         att_view = new Gtk.TreeView ();
         var attachment_del = new Postler.CellRendererToggle ();



More information about the Xfce4-commits mailing list