[pdfmod] Use the stock Dnd icons instead of thumbnails



commit 7b5566f6f944cc079052f6099806d63a8a5f5538
Author: Gabriel Burt <gabriel burt gmail com>
Date:   Fri Mar 26 18:50:10 2010 -0700

    Use the stock Dnd icons instead of thumbnails
    
    The thumbnails could be quite large, obscuring the DnD process.

 src/PdfMod/Gui/DocumentIconView.cs |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/PdfMod/Gui/DocumentIconView.cs b/src/PdfMod/Gui/DocumentIconView.cs
index 381ef36..18b1b95 100644
--- a/src/PdfMod/Gui/DocumentIconView.cs
+++ b/src/PdfMod/Gui/DocumentIconView.cs
@@ -109,6 +109,7 @@ namespace PdfMod.Gui
             SelectionChanged += HandleSelectionChanged;
             DragDataReceived += HandleDragDataReceived;
             DragDataGet += HandleDragDataGet;
+            DragBegin += HandleDragBegin;
             DragLeave += HandleDragLeave;
         }
 
@@ -186,6 +187,14 @@ namespace PdfMod.Gui
 
         #region Drag and Drop event handling
 
+        void HandleDragBegin (object o, DragBeginArgs args)
+        {
+            // Set the drag icon, otherwise it will be a whole page cell rendering,
+            // which can be quite large and obscure the drop points
+            bool single = SelectedItems.Length == 1;
+            Gtk.Drag.SetIconStock (args.Context, single ? Stock.Dnd : Stock.DndMultiple, 0, 0);
+        }
+
         void HandleDragLeave (object o, DragLeaveArgs args)
         {
             if (highlighted) {



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