Ejemplo n.º 1
0
		private int CreateTagPriv (Category parent_tag, string name)
		{
			try {
				Tag created = tag_store.CreateCategory (parent_tag, name);
				return (int)created.Id;
			}
			catch {
				throw new DBusException ("Failed to create tag.");
			}
		}
Ejemplo n.º 2
0
 public Category(Category category, uint id, string name)
     : base(category, id, name)
 {
     children = new List<Tag> ();
 }
Ejemplo n.º 3
0
 void LoadCategory (Category category, TreeIter parent_iter)
 {
     foreach (var t in category.Children) {
         var iter = model.AppendValues (parent_iter, t.Id, t.Name);
         if (t is Category)
             LoadCategory (t as Category, iter);
     }
 }
Ejemplo n.º 4
0
        // Loading up the store.
        private void LoadCategory(Category category, TreeIter parent_iter)
        {
            IList<Tag> tags = category.Children;

            foreach (Tag t in tags) {
                TreeIter iter = (Model as TreeStore).AppendValues (parent_iter, t.Id, t.Name);
                if (t is Category)
                    LoadCategory (t as Category, iter);
            }
        }
Ejemplo n.º 5
0
		// You are not supposed to invoke these constructors outside of the TagStore class.
		public Tag (Category category, uint id, string name)
			: base (id)
		{
			Category = category;
			Name = name;
		}
Ejemplo n.º 6
0
		public Category (Category category, uint id, string name)
			: base (category, id, name)
		{
			children = new ArrayList ();
		}