示例#1
0
            private void child_deleted_cb(object sender, ITreeNode child, int idx)
            {
                ITreeNode node = sender as ITreeNode;

                TreePath path       = GetPath(node);
                TreePath child_path = path.Copy();

                child_path.AppendIndex(idx);

                model_adapter.EmitRowDeleted(child_path);

                if (node.ChildCount <= 0)
                {
                    model_adapter.EmitRowHasChildToggled(GetPath(node), GetIter(node));
                }
            }
        private void child_deleted_cb(object o, ITreeNode child, int idx)
        {
            ITreeNode node = o as ITreeNode;

            TreePath path       = new TreePath(get_path_cb(node.ID));
            TreePath child_path = path.Copy();

            child_path.AppendIndex(idx);

            RemoveNodeInternal(child);

            gtksharp_node_store_emit_row_deleted(Handle, child_path.Handle);

            if (node.ChildCount <= 0)
            {
                gtksharp_node_store_emit_row_has_child_toggled(Handle, get_path_cb(node.ID), node.ID);
            }
        }
示例#3
0
		private void DeleteLocations(TreePath path){
			path.Down();
			
			TreeModel model = ((TreeModelFilter)locationsView.Model).Model;
			TreeIter iter;
			while(model.GetIter(out iter,path) == true){
				// we also need delete the children of the location
				DeleteLocations(path.Copy());				
				Location loc = (Location)model.GetValue(iter,0);
				// this won't delete the children
				Locations.Remove(loc);
				
				// do move to next, since the location is not removed from the positions yet
				path.Next();
			}
		}
示例#4
0
		private void child_deleted_cb (object o, ITreeNode child, int idx)
		{
			ITreeNode node = o as ITreeNode;
			
			TreePath path = new TreePath (get_path_cb (node.ID));
			TreePath child_path = path.Copy ();
			child_path.AppendIndex (idx);

			RemoveNodeInternal (child);

			gtksharp_node_store_emit_row_deleted (Handle, child_path.Handle);

			if (node.ChildCount <= 0)
				gtksharp_node_store_emit_row_has_child_toggled (Handle, get_path_cb (node.ID), node.ID);
		}