[Xfce4-commits] <postler:master> Hide Copy by default behind an expander-like arrow
Christian Dywan
noreply at xfce.org
Sun Jan 23 23:32:02 CET 2011
Updating branch refs/heads/master
to 1ce3388fd583950a5e1a94abe5eda1dfea561c40 (commit)
from 094a2bde12a7b2b311a041df3657eff11736f493 (commit)
commit 1ce3388fd583950a5e1a94abe5eda1dfea561c40
Author: Christian Dywan <christian at twotoasts.de>
Date: Sun Jan 23 23:03:27 2011 +0100
Hide Copy by default behind an expander-like arrow
The semantic meaning of Copy is negligible for most users.
postler/postler-composer.vala | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/postler/postler-composer.vala b/postler/postler-composer.vala
index e52d05e..9536e32 100644
--- a/postler/postler-composer.vala
+++ b/postler/postler-composer.vala
@@ -514,10 +514,28 @@ public class Postler.Composer : Gtk.Window {
box.pack_start (combo_from, true, true, 4);
box = new Gtk.HBox (false, 0);
shelf.pack_start (box, false, false, 4);
+ var label_and_arrow = new Gtk.HBox (false, 0);
+ box.pack_start (label_and_arrow, false, false, 4);
+ button = new Gtk.Button ();
+ var arrow = new Gtk.Arrow (Gtk.ArrowType.RIGHT, Gtk.ShadowType.NONE);
+ button.add (arrow);
+ button.set_relief (Gtk.ReliefStyle.NONE);
+ button.focus_on_click = false;
+ button.clicked.connect ((widget) => {
+ if (arrow.arrow_type == Gtk.ArrowType.RIGHT) {
+ entry_copy.parent.show ();
+ arrow.arrow_type = Gtk.ArrowType.DOWN;
+ }
+ else {
+ entry_copy.parent.hide ();
+ arrow.arrow_type = Gtk.ArrowType.RIGHT;
+ }
+ });
+ label_and_arrow.pack_start (button, false, false, 4);
var label = new Gtk.Label.with_mnemonic (_("_To:"));
label.xalign = 1.0f;
- box.pack_start (label, false, false, 4);
- sizegroup.add_widget (label);
+ label_and_arrow.pack_start (label, false, false, 4);
+ sizegroup.add_widget (label_and_arrow);
entry_to = entry_with_address_completion ();
box.pack_start (entry_to, true, true, 4);
box = new Gtk.HBox (false, 0);
@@ -528,6 +546,9 @@ public class Postler.Composer : Gtk.Window {
sizegroup.add_widget (label);
entry_copy = entry_with_address_completion ();
box.pack_start (entry_copy, true, true, 4);
+ label.show ();
+ entry_copy.show ();
+ box.set_no_show_all (true);
box = new Gtk.HBox (false, 0);
shelf.pack_start (box, false, false, 4);
label = new Gtk.Label.with_mnemonic (_("_Subject:"));
@@ -657,8 +678,10 @@ public class Postler.Composer : Gtk.Window {
}
else if (name == "to")
entry = entry_to;
- else if (name == "cc")
+ else if (name == "cc") {
entry = entry_copy;
+ entry_copy.parent.show ();
+ }
else if (name == "subject")
entry = entry_subject;
else if (name == "body") {
More information about the Xfce4-commits
mailing list