~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Ide/MonoDevelop.Ide.Gui.Components/ExtensibleTreeView.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
483
483
                        }
484
484
                }
485
485
 
486
 
                internal TreeBuilderContext BuilderContext {
 
486
                public ITreeBuilderContext BuilderContext {
487
487
                        get {
488
488
                                return builderContext;
489
489
                        }
1062
1062
                                                node.MoveToPosition (pos);
1063
1063
                                        }
1064
1064
                                }
1065
 
                                CancelTransfer ();
 
1065
                                if (currentTransferOperation == DragOperation.Move)
 
1066
                                        CancelTransfer ();
1066
1067
                        } finally {
1067
1068
                                UnlockUpdates ();
1068
1069
                        }
1295
1296
                                compareNode1.MoveToIter (a);
1296
1297
                                compareNode2.MoveToIter (b);
1297
1298
                                
1298
 
                                TypeNodeBuilder tb1 = (TypeNodeBuilder) chain1[0];
1299
 
                                int sort = tb1.CompareObjects (compareNode1, compareNode2);
 
1299
                                int sort = CompareObjects (chain1, compareNode1, compareNode2);
1300
1300
                                if (sort != TypeNodeBuilder.DefaultSort) return sort;
1301
1301
                                
1302
1302
                                NodeBuilder[] chain2 = (NodeBuilder[]) store.GetValue (b, BuilderChainColumn);
1303
1303
                                if (chain2 == null) return 1;
1304
 
                                TypeNodeBuilder tb2 = (TypeNodeBuilder) chain2[0];
1305
1304
                                
1306
1305
                                if (chain1 != chain2) {
1307
 
                                        sort = tb2.CompareObjects (compareNode2, compareNode1);
 
1306
                                        sort = CompareObjects (chain2, compareNode2, compareNode1);
1308
1307
                                        if (sort != TypeNodeBuilder.DefaultSort) return sort * -1;
1309
1308
                                }
1310
1309
                                
 
1310
                                TypeNodeBuilder tb1 = (TypeNodeBuilder) chain1[0];
 
1311
                                TypeNodeBuilder tb2 = (TypeNodeBuilder) chain2[0];
1311
1312
                                object o1 = store.GetValue (a, DataItemColumn);
1312
1313
                                object o2 = store.GetValue (b, DataItemColumn);
1313
1314
                                return string.Compare (tb1.GetNodeName (compareNode1, o1), tb2.GetNodeName (compareNode2, o2), true);
1316
1317
                        }
1317
1318
                }
1318
1319
                
 
1320
                int CompareObjects (NodeBuilder[] chain, ITreeNavigator thisNode, ITreeNavigator otherNode)
 
1321
                {
 
1322
                        int result = NodeBuilder.DefaultSort;
 
1323
                        for (int n=0; n<chain.Length; n++) {
 
1324
                                int sort = chain[n].CompareObjects (thisNode, otherNode);
 
1325
                                if (sort != NodeBuilder.DefaultSort)
 
1326
                                        result = sort;
 
1327
                        }
 
1328
                        return result;
 
1329
                }
 
1330
                
1319
1331
                internal bool GetFirstNode (object dataObject, out Gtk.TreeIter iter)
1320
1332
                {
1321
1333
                        object it = nodeHash [dataObject];
2045
2057
                
2046
2058
                public object GetNextCommandTarget ()
2047
2059
                {
 
2060
                        target.SetCurrentNodes (null);
2048
2061
                        return Next;
2049
2062
                }
2050
2063