Пример #1
0
 private void OnDataRowsReordered(object o, RowsReorderedArgs args)
 {
     if (Changed != null)
     {
         ModelChanged(this, new EventArgs());
     }
 }
Пример #2
0
        private void OnDataRowsReordered(object o, RowsReorderedArgs args)
        {
            int[] new_child_order = (int[])args.Args[2];
            if (model == null || new_child_order.Length == 0)
            {
                return;
            }

            // iterate through the selected paths, mapping from the
            // old index (in the path) to its new index
            for (int i = 0; i < selected_paths.Count; i++)
            {
                TreePath path = (TreePath)selected_paths[i];
                for (int new_index = 0; new_index < new_child_order.Length; new_index++)
                {
                    int old_index = new_child_order[new_index];
                    if (path.Indices[0] == old_index)
                    {
                        path = new TreePath(new int[] { new_index });
                        break;
                    }
                }

                selected_paths[i] = path;
            }

            QueueResize();
        }
Пример #3
0
        void HandleRowsReordered(object o, RowsReorderedArgs args)
        {
            int length = Model.IterNChildren(args.Iter);
            int depth  = args.Path.Depth;

            if (length < 2 || !args.Path.IsAncestor(Path) || indices.Length <= depth)
            {
                return;
            }

            for (int i = 0; i < length; i++)
            {
                if (args.NewChildOrder[i] == indices[depth])
                {
                    indices[depth] = i;
                    break;
                }
            }
        }
Пример #4
0
 /// <summary>
 /// Updates the button greyed out states whenever items are reordered.
 /// </summary>
 /// <remarks>
 /// This is required for ListStore.Swap ().
 /// </remarks>
 protected void HandleRowsReordered(object sender, RowsReorderedArgs a)
 {
     UpdatePriorityButtons();
 }
Пример #5
0
 private void OnModelRowsReordered(object o, RowsReorderedArgs a)
 {
     // XXX
 }