~ubuntu-branches/ubuntu/natty/monodevelop/natty

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Components/MonoDevelop.Components.Commands/CommandManager.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-01-07 19:06:58 UTC
  • mto: (1.6.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 46.
  • Revision ID: james.westby@ubuntu.com-20100107190658-z9z95lgk4kwfes7p
ImportĀ upstreamĀ versionĀ 2.2+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
                Stack delegatorStack = new Stack ();
55
55
                
56
56
                HashSet<object> visitedTargets = new HashSet<object> ();
57
 
                bool inGlobalChain;
58
57
                
59
58
                bool disposed;
60
59
                bool toolbarUpdaterRunning;
887
886
                {
888
887
                        delegatorStack.Clear ();
889
888
                        visitedTargets.Clear ();
890
 
                        inGlobalChain = false;
891
889
                        handlerFoundInMulticast = false;
892
890
                        object cmdTarget;
893
891
                        if (initialTarget != null)
895
893
                        else {
896
894
                                cmdTarget = GetActiveWidget (rootWidget);
897
895
                                if (cmdTarget == null) {
898
 
                                        inGlobalChain = true;
899
896
                                        cmdTarget = globalHandlerChain;
900
897
                                }
901
898
                        }
923
920
                        else
924
921
                                cmdTarget = null;
925
922
                        
926
 
//                      if (cmdTarget != null && visitedTargets.Contains (cmdTarget) && !inGlobalChain)
927
 
//                              Console.WriteLine ("target already visited:" + cmdTarget);
928
 
                        
929
923
                        if (cmdTarget == null || !visitedTargets.Add (cmdTarget)) {
930
924
                                if (delegatorStack.Count > 0) {
931
925
                                        ICommandDelegatorRouter del = (ICommandDelegatorRouter) delegatorStack.Pop ();
935
929
                                        if (cmdTarget != null)
936
930
                                                return cmdTarget;
937
931
                                }
938
 
                                inGlobalChain = true;
939
932
                                return globalHandlerChain;
940
933
                        } else
941
934
                                return cmdTarget;