[f-spot] fix the (in)SaneTreeView with the EXTRA_PADDING from parent



commit bf04ba7380f7bcbc538b91c4e7ba77886ae77603
Author: Stephane Delcroix <stephane delcroix org>
Date:   Mon Jul 6 13:40:01 2009 +0200

    fix the (in)SaneTreeView with the EXTRA_PADDING from parent

 src/Widgets/FolderTreeView.cs |    7 ++-----
 src/Widgets/SaneTreeView.cs   |    6 +++++-
 2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/src/Widgets/FolderTreeView.cs b/src/Widgets/FolderTreeView.cs
index 609935d..613cfdc 100644
--- a/src/Widgets/FolderTreeView.cs
+++ b/src/Widgets/FolderTreeView.cs
@@ -17,10 +17,7 @@ using GLib;
 using FSpot;
 using FSpot.Utils;
 
-using Banshee.Database;
-
 using Mono.Unix;
-using Mono.Data.SqliteClient;
 
 namespace FSpot.Widgets
 {
@@ -67,7 +64,7 @@ namespace FSpot.Widgets
 			}
 		}
 		
-		private void PixbufDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
+		void PixbufDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
 		{
 			CellRendererPixbuf renderer = cell as CellRendererPixbuf;
 			string text = folder_tree_model.GetFolderNameByIter (iter);
@@ -98,7 +95,7 @@ namespace FSpot.Widgets
 			}
 		}
 		
-		private void FolderDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
+		void FolderDataFunc (TreeViewColumn tree_column, CellRenderer cell, TreeModel tree_model, TreeIter iter)
 		{
 			CellRendererTextProgress renderer = cell as CellRendererTextProgress;
 			
diff --git a/src/Widgets/SaneTreeView.cs b/src/Widgets/SaneTreeView.cs
index 36cb55a..3f17c30 100644
--- a/src/Widgets/SaneTreeView.cs
+++ b/src/Widgets/SaneTreeView.cs
@@ -35,6 +35,7 @@ namespace FSpot.Widgets
 		
 		protected override bool OnButtonPressEvent (Gdk.EventButton button)
 		{
+Console.WriteLine ("OnButtonPress");
 			bool call_parent = true;
 			bool on_expander;
 			drag_started = ignore_button_release = false;
@@ -56,8 +57,10 @@ namespace FSpot.Widgets
 						((button.State & ModifierType.ControlMask) != 0 || (button.State & ModifierType.ShiftMask) == 0)) {
 						int expander_size = (int) StyleGetProperty("expander-size");
 						int horizontal_separator = (int) StyleGetProperty("horizontal-separator");
+						// EXPANDER_EXTRA_PADDING from GtkTreeView
+						expander_size += 4;
 						on_expander = (button.X <= horizontal_separator / 2 + path.Depth * expander_size);
-						
+Console.WriteLine ("onexpander = {0}", on_expander);	
 						row_selected_on_button_down = Selection.PathIsSelected (path);
 						if (row_selected_on_button_down) {
 							call_parent = on_expander;
@@ -85,6 +88,7 @@ namespace FSpot.Widgets
 		
 		protected override bool OnButtonReleaseEvent (Gdk.EventButton button)
 		{
+Console.WriteLine ("OnButtonRelease");
 			if (!drag_started && !ignore_button_release)
 				DidNotDrag (button);
 			



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