PathToInt() public static method

Returns the index of a TreePath.
public static PathToInt ( Gtk.TreePath path ) : int
path Gtk.TreePath
return int
コード例 #1
0
        public void Remove(TreePath[] paths)
        {
            foreach (TreePath path in paths)
            {
                TreeIter iter;
                model.GetIter(out iter, path);
                model.Remove(ref iter);

                collection.Remove(Util.PathToInt(path));
            }
        }
コード例 #2
0
ファイル: Search.cs プロジェクト: sahwar/gnome-subtitles
        /// <summary>The currently focused subtitle, or 0 if none is.</summary>
        private int GetFocusedSubtitle()
        {
            TreePath focus = Base.Ui.View.Selection.Focus;

            if (focus != null)
            {
                return(Util.PathToInt(focus));
            }
            else
            {
                return(0);
            }
        }