[Xfce4-commits] <postler:master> Use Ctrl+d to delete, or Delete when message view focussed

Christian Dywan noreply at xfce.org
Thu Jun 3 03:24:08 CEST 2010


Updating branch refs/heads/master
         to 7ae834ce26085abda2d16c95c208db175072896f (commit)
       from fea1485bc0f14dbf5521cc41a0f501abc8b633a4 (commit)

commit 7ae834ce26085abda2d16c95c208db175072896f
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Jun 3 00:08:56 2010 +0200

    Use Ctrl+d to delete, or Delete when message view focussed

 postler/postler-bureau.vala   |    2 +-
 postler/postler-messages.vala |    9 +++++++++
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/postler/postler-bureau.vala b/postler/postler-bureau.vala
index 88e7541..c7dbd5a 100644
--- a/postler/postler-bureau.vala
+++ b/postler/postler-bureau.vala
@@ -147,7 +147,7 @@ public class Postler.Bureau : Gtk.Window {
           N_("Reply to all recipients"), action_message_reply_all },
         { "MessageForward", STOCK_MAIL_FORWARD, null, "<Ctrl>f",
           N_("Forward message"), action_message_forward },
-        { "MessageDelete", Gtk.STOCK_DELETE, null, "Delete",
+        { "MessageDelete", Gtk.STOCK_DELETE, null, "<Ctrl>d",
           N_("Delete message"), action_delete },
         { "Quit", Gtk.STOCK_QUIT, null, "<Ctrl>q",
           N_("Quit the application"), action_quit },
diff --git a/postler/postler-messages.vala b/postler/postler-messages.vala
index 5c29731..abd038e 100644
--- a/postler/postler-messages.vala
+++ b/postler/postler-messages.vala
@@ -70,6 +70,15 @@ public class Postler.Messages : Gtk.TreeView {
             new Gtk.CellRendererText (), "text", Columns.DATE, null);
         insert_column_with_attributes (-1, _("Size"),
             new Gtk.CellRendererText (), "text", Columns.SIZE, null);
+
+        unowned Gtk.BindingSet binding_set = Gtk.BindingSet.by_class (get_class ());
+        Gtk.BindingEntry.add_signal (binding_set,
+            Gdk.keyval_from_name ("Delete"), 0, "delete", 0);
+    }
+
+    [Signal (action=true)]
+    public virtual signal void delete () {
+        delete_selected ();
     }
 
     static bool evaluate_hex (GLib.MatchInfo     match_info,



More information about the Xfce4-commits mailing list