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.");
			}
		}
Esempio n. 2
0
 public Category(Category category, uint id, string name)
     : base(category, id, name)
 {
     children = new List<Tag> ();
 }
Esempio 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);
     }
 }
Esempio 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);
            }
        }
Esempio 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;
		}
		public Category (Category category, uint id, string name)
			: base (category, id, name)
		{
			children = new ArrayList ();
		}