Esempio n. 1
0
        void HandleRowDeleted(object o, RowDeletedArgs args)
        {
            var deleted = args.Path.Indices;
            int i;

            for (i = 0; i < deleted.Length && i < indices.Length; i++)
            {
                if (deleted[i] > indices[i])
                {
                    // the deleted node is listed below the node we are watching, ignore it
                    return;
                }

                if (deleted[i] < indices[i])
                {
                    // the deleted node is listed above the node we are watching, update our position
                    indices[i]--;
                    path = null;
                    return;
                }
            }

            if (deleted.Length <= indices.Length)
            {
                // the node we are watching (or its parent) has been deleted
                Invalidate();
            }
        }
Esempio n. 2
0
        private void OnGroupRowDeleted(object sender, RowDeletedArgs args)
        {
            if (groupButtonMap.ContainsKey(args.Path.Indices [0]) == false)
            {
                Logger.Debug("GroupWindow.OnGroupRowDeleted () called on a path we don't know about.");
                return;
            }

            GroupButton groupButton = groupButtonMap [args.Path.Indices [0]];

            Logger.Debug("GroupWindow.OnGroupRowDeleted removing group: {0}", groupButton.PersonGroup.DisplayName);

            groupButtonMap.Remove(args.Path.Indices [0]);

            groupButtonsVBox.Remove(groupButton);

            // If this is the currently selected group, switch the view
            // back to the Everyone group so that there aren't weirdnesses.
            if (selectedGroup == groupButton.PersonGroup)
            {
                OnEveryoneClicked(this, EventArgs.Empty);
            }

            // FIXME: Determine whether we should be calling groupButton.Destroy () here.
            groupButton.Destroy();
        }
Esempio n. 3
0
 private void OnDataRowDeleted(object o, RowDeletedArgs args)
 {
     if (Changed != null)
     {
         ModelChanged(this, new EventArgs());
     }
 }
Esempio n. 4
0
        private void OnModelRowDeleted(object o, RowDeletedArgs a)
        {
            if (orientation == Orientation.Vertical)
            {
                heights.RemoveAt(a.Path.Indices[0]);
            }
            else
            {
                widths.RemoveAt(a.Path.Indices[0]);
            }

            UpdateDrawingAreaSizeRequests();
        }
Esempio n. 5
0
        protected void OnImageListRowRemoved(object o, RowDeletedArgs arg)
        {
            TreeIter iter;

            if (arg.Path.Depth == 2)
            {
                arg.Path.Up();
                this.GetIter(out iter, arg.Path);
                if (!this.IterHasChild(iter))
                {
                    this.Remove(ref iter);
                }
            }
        }
Esempio n. 6
0
        private void OnPersonRowDeleted(object sender, RowDeletedArgs args)
        {
//			Logger.Debug("PersonView:OnPersonRowDeleted Called");
            PersonCard card = (PersonCard)vbox.Children[args.Path.Indices [0]];

            vbox.Remove(card);
            foreach (TreeIter iter in personCardMap.Keys)
            {
                if (card == personCardMap[iter])
                {
                    personCardMap.Remove(iter);
                    return;
                }
            }
        }
Esempio n. 7
0
        private void OnRowDeleted(object o, RowDeletedArgs args)
        {
            if (args == null || args.Path == null)
            {
                return;                                                 // prevent a null pointer exception
            }
//			iFolderViewItem item = (iFolderViewItem)items[args.Path.ToString()];

            if (rebuildTableTimeoutID != 0)
            {
                GLib.Source.Remove(rebuildTableTimeoutID);
                rebuildTableTimeoutID = 0;
            }

            rebuildTableTimeoutID = GLib.Timeout.Add(
                rebuildTimeout, new GLib.TimeoutHandler(RebuildTableCallback));

            UpdateVisibility();
        }
Esempio n. 8
0
        void HandleRowDeleted(object o, RowDeletedArgs args)
        {
            var deleted = args.Path.Indices;
            int i;

            //If deleted is deeper then this path, it can't effect this path
            if (deleted.Length > indices.Length)
            {
                return;
            }

            for (i = 0; i < deleted.Length && i < indices.Length; i++)
            {
                if (deleted[i] > indices[i])
                {
                    // the deleted node is listed below the node we are watching, ignore it
                    return;
                }

                if (deleted [i] < indices [i] && i < deleted.Length - 1)
                {
                    // deleted is in different tree(not effecting our path)
                    return;
                }

                if (deleted[i] < indices[i])
                {
                    // the deleted node is listed above the node we are watching, update our position
                    indices[i]--;
                    path = null;
                    return;
                }
            }

            if (deleted.Length <= indices.Length)
            {
                // the node we are watching (or its parent) has been deleted
                Invalidate();
            }
        }
Esempio n. 9
0
 private void OnModelRowDeleted(object o, RowDeletedArgs args)
 {
     EmitSubtitleCountChangedEvent();
 }
Esempio n. 10
0
 /// <summary>
 /// Updates the button greyed out states whenever an item is deleted.
 /// </summary>
 protected void HandleRowDeleted(object sender, RowDeletedArgs a)
 {
     UpdatePriorityButtons();
 }
Esempio n. 11
0
 private void HandleDeleted(object sender, RowDeletedArgs args)
 {
     QueueUpdate();
 }
Esempio n. 12
0
        private void OnDataRowDeleted(object o, RowDeletedArgs args)
        {
            if (model == null || args.Path == null)
            {
                return;
            }

            bool sel_paths_changed = false;

            // Don't update the real n_cells, as doing this will
            // throw off ScrollToPath if called before SizeAllocate
            // is run
            int n_cells = model.IterNChildren();

            for (int i = 0; i < selected_paths.Count; i++)
            {
                TreePath path = (TreePath)selected_paths[i];

                int cmp = path.Compare(args.Path);
                if (cmp == 0)
                {
                    selected_paths.RemoveAt(i);
                    i--;
                    sel_paths_changed = true;
                    continue;
                }

                // decrement each path that follows the one we
                // just deleted
                if (cmp > 0)
                {
                    path.Prev();
                    selected_paths[i] = path;
                    continue;
                }
            }

            if (sel_paths_changed && SelectionChanged != null)
            {
                SelectionChanged(this, new EventArgs());
            }

            if (focused_path != null &&
                focused_path.Equals(args.Path))
            {
                focused_path = focused_path.Copy();

                // try to advance the focus forward
                focused_path.Next();

                if (!PathIsValid(focused_path, n_cells) &&
                    !focused_path.Prev())
                {
                    focused_path = null;
                }
            }

            if (selection_anchor != null &&
                selection_anchor.Equals(args.Path))
            {
                selection_anchor = null;
            }

            QueueResize();
        }
 /// <summary>
 /// Handles the row deletion event of the image tree model.
 /// </summary>
 /// <param name="s">
 /// A <see cref="System.Object"/>
 /// </param>
 /// <param name="a">
 /// A <see cref="RowDeletedArgs"/>
 /// </param>
 private void OnImagesStoreRowDeleted(object s, RowDeletedArgs a)
 {
     nextImageBtn.Sensitive = imagesStore.IterNChildren() > 0;
 }
Esempio n. 14
0
 private void Figure_OnRowDeleted(object sender, RowDeletedArgs e)
 {
     SetScore(e.Count);
     UpdateScore();
 }
Esempio n. 15
0
 void Model_RowDeleted(object o, RowDeletedArgs e)
 {
     Invalidate();
 }