Esempio n. 1
0
 private void OnDataRowInserted(object o, RowInsertedArgs args)
 {
     if (Changed != null)
     {
         ModelChanged(this, new EventArgs());
     }
 }
    void HandleTvResultsModelhandleRowInserted(object o, RowInsertedArgs args)
    {
        var      resultListStore = (TreeStore)this.tvResults.Model;
        TreeIter parent;

        resultListStore.IterParent(out parent, args.Iter);

        if (WebsiteChecker.Configuration.DefaulURLRowLimit < resultListStore.IterNChildren(parent))
        {
            theTimer.Stop();
            TreeIter iterChild;
            resultListStore.IterChildren(out iterChild, parent);
            try {
                // should be done with a while, but I was getting an error/exception
                // and was not being caught in the catch
                for (int i = 0; i < 5; i++)
                {
                    resultListStore.Remove(ref iterChild);
                }
            } catch (Exception ex) {
            }

            theTimer.Start();
        }
    }
Esempio n. 3
0
        void HandleRowInserted(object o, RowInsertedArgs args)
        {
            var inserted = args.Path.Indices;
            int i;

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

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

                if (inserted[i] < indices[i])
                {
                    break;
                }
            }

            //(i == indices.Length - 1) is to prevent i(0), indices(1-2) and inserted(0-2)
            if (inserted [i] <= indices [i] && i == indices.Length - 1)
            {
                // the node was inserted above the node we are watching, update our position
                indices [i]++;
                path = null;
            }
        }
Esempio n. 4
0
        void HandleRowInserted(object o, RowInsertedArgs args)
        {
            var inserted = args.Path.Indices;
            int i;

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

                if (inserted[i] < indices[i])
                {
                    break;
                }
            }

            if (inserted[i] <= indices[i])
            {
                // the node was inserted above the node we are watching, update our position
                indices[i]++;
                path = null;
            }
        }
Esempio n. 5
0
 private void OnModelRowInserted(object o, RowInsertedArgs a)
 {
     if (orientation == Orientation.Vertical)
     {
         heights.Insert(a.Path.Indices[0], 0);
     }
     else
     {
         widths.Insert(a.Path.Indices[0], 0);
     }
 }
Esempio n. 6
0
        private void OnGroupRowInserted(object sender, RowInsertedArgs args)
        {
            PersonGroup group =
                groupTreeModel.GetValue(args.Iter, 0) as PersonGroup;

            if (group == null)
            {
                return;
            }

            AddGroupButton(new GroupButton(group),
                           groupTreeModel.GetPath(args.Iter));
        }
Esempio n. 7
0
        private void OnPersonRowInserted(object sender, RowInsertedArgs args)
        {
//			Logger.Debug("PersonView:OnPersonRowInserted Called");
            TreePath   path = model.GetPath(args.Iter);
            PersonCard card = new PersonCard();

            Person person = model.GetValue(args.Iter, 0) as Person;

            if (person != null)
            {
                card.Person = person;
            }

            card.Size = personCardSize;
            card.ShowAll();
            vbox.PackStart(card, false, false, 0);
            vbox.ReorderChild(card, path.Indices [0]);
            personCardMap[args.Iter] = card;
        }
Esempio n. 8
0
        private void OnRowInserted(object o, RowInsertedArgs args)
        {
            if (args == null)
            {
                return;                            // prevent a null pointer exception
            }
//			iFolderHolder ifHolder = (iFolderHolder)model.GetValue(args.Iter, 0);

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

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

            UpdateVisibility();
        }
Esempio n. 9
0
        private void OnDataRowInserted(object o, RowInsertedArgs args)
        {
            if (model == null || args.Path == null)
            {
                return;
            }

            // 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();

            // see if there are any selected paths with the same
            // path or after the inserted path
            TreePath path;

            for (int i = 0; i < selected_paths.Count; i++)
            {
                path = (TreePath)selected_paths[i];
                if (path.Compare(args.Path) < 0)
                {
                    continue;
                }

                path.Next();

                // This case isn't very likely:
                // if the path isn't valid, we're at the end,
                // so just dump the paths
                if (!PathIsValid(path, n_cells))
                {
                    selected_paths.RemoveAt(i);
                    i--;
                    continue;
                }

                selected_paths[i] = path;
            }

            QueueResize();
        }
Esempio n. 10
0
 private void OnModelRowInserted(object o, RowInsertedArgs args)
 {
     EmitSubtitleCountChangedEvent();
 }
Esempio n. 11
0
 /// <summary>
 /// Updates the button greyed out states whenever an item is inserted.
 /// </summary>
 protected void HandleRowInserted(object sender, RowInsertedArgs a)
 {
     UpdatePriorityButtons();
 }
Esempio n. 12
0
 /* FIXME: triggering a recopy of the parent doesn't seem to be enough to
  * get the updated values from it -- at least in the particular case of F-Spot's tag selection widget's model */
 private void HandleInserted(object sender, RowInsertedArgs args)
 {
     QueueUpdate();
 }
 /// <summary>
 /// Handles the row inserted image tree model event.
 /// </summary>
 /// <param name="s">
 /// A <see cref="System.Object"/>
 /// </param>
 /// <param name="a">
 /// A <see cref="RowInsertedArgs"/>
 /// </param>
 private void OnImagesStoreRowInserted(object s, RowInsertedArgs a)
 {
     nextImageBtn.Sensitive = true;
 }
Esempio n. 14
0
 void Model_RowInserted(object o, RowInsertedArgs e)
 {
     Invalidate();
 }