[hyena] Only handle [shift] ctrl-a if appropriate



commit 53f73c4ae293e4306ea724acaa9c4c6d5092c587
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Tue May 18 17:15:39 2010 -0700

    Only handle [shift] ctrl-a if appropriate

 .../ListView/ListView_Interaction.cs               |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs b/src/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
index 58c12a0..adc1df7 100644
--- a/src/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
+++ b/src/Hyena.Gui/Hyena.Data.Gui/ListView/ListView_Interaction.cs
@@ -172,14 +172,14 @@ namespace Hyena.Data.Gui
 
             switch (press.Key) {
                 case Gdk.Key.a:
-                    if ((press.State & Gdk.ModifierType.ControlMask) != 0) {
+                    if ((press.State & Gdk.ModifierType.ControlMask) != 0 && Model.Count > 0) {
                         SelectionProxy.Selection.SelectAll ();
                         handled = true;
                     }
                     break;
 
                 case Gdk.Key.A:
-                    if ((press.State & Gdk.ModifierType.ControlMask) != 0) {
+                    if ((press.State & Gdk.ModifierType.ControlMask) != 0 && Selection.Count > 0) {
                         SelectionProxy.Selection.Clear ();
                         handled = true;
                     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]