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;
			}
		}
Ejemplo n.º 2
0
        void OnRowInsertedHandler(object sender, Gtk.RowInsertedArgs args)
        {
            if (NumberOfTasksChanged == null)
            {
                return;
            }

            NumberOfTasksChanged(this, EventArgs.Empty);
        }
Ejemplo n.º 3
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;
			}
		}
Ejemplo n.º 4
0
        static void RowInsertedSignalCallback(IntPtr arg0, IntPtr arg1, ref Gtk.TreeIter arg2, IntPtr gch)
        {
            GLib.Signal sig = ((GCHandle)gch).Target as GLib.Signal;
            if (sig == null)
            {
                throw new Exception("Unknown signal GC handle received " + gch);
            }

            Gtk.RowInsertedArgs args = new Gtk.RowInsertedArgs();
            args.Args = new object[2];
            if (arg1 == IntPtr.Zero)
            {
                args.Args[0] = null;
            }
            else
            {
                args.Args[0] = new Gtk.TreePath(arg1);
            }
            args.Args[1] = arg2;
            Gtk.RowInsertedHandler handler = (Gtk.RowInsertedHandler)sig.Handler;
            handler(GLib.Object.GetObject(arg0), args);
        }
Ejemplo n.º 5
0
		private void row_inserted(object o, RowInsertedArgs args)
		{
			changed = true;
		}
Ejemplo n.º 6
0
 public void OnRowInserted(object sender, RowInsertedArgs args)
 {
     ++NrOfDocuments;
 }
 /* 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();
 }
Ejemplo n.º 8
0
 private void OnRowInserted(object o, RowInsertedArgs args)
 {
     iFolderViewGroup.CheckThread();
        if (args == null) return;
     Console.WriteLine("iFolderViewGroup.OnRowInserted...");
        iFolderHolder ifHolder = (iFolderHolder)model.GetValue(args.Iter, 0);
        if (ifHolder != null)
        {
     Console.WriteLine("iFolderViewGroup.OnRowInserted: {0}", ifHolder.iFolder.Name);
        }
        if (rebuildTableTimeoutID != 0)
        {
     GLib.Source.Remove(rebuildTableTimeoutID);
     rebuildTableTimeoutID = 0;
        }
        rebuildTableTimeoutID = GLib.Timeout.Add(
     rebuildTimeout, new GLib.TimeoutHandler(RebuildTableCallback));
        UpdateVisibility();
 }
Ejemplo n.º 9
0
		/// <summary>
		/// Updates the button greyed out states whenever an item is inserted.
		/// </summary>
		protected void HandleRowInserted (object sender, RowInsertedArgs a)
		{
			UpdatePriorityButtons ();
		}
Ejemplo n.º 10
0
	private void OnModelRowInserted (object o, RowInsertedArgs args) {
		EmitSubtitleCountChangedEvent();
	}
Ejemplo n.º 11
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));
        }
Ejemplo n.º 12
0
 void Model_RowInserted(object o, RowInsertedArgs e)
 {
     Invalidate ();
 }
Ejemplo n.º 13
0
 private void OnRowInserted(object o, RowInsertedArgs args)
 {
     if (args == null) return;
        if (rebuildTableTimeoutID != 0)
        {
     GLib.Source.Remove(rebuildTableTimeoutID);
     rebuildTableTimeoutID = 0;
        }
        rebuildTableTimeoutID = GLib.Timeout.Add(
     rebuildTimeout, new GLib.TimeoutHandler(RebuildTableCallback));
        UpdateVisibility();
 }
Ejemplo n.º 14
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;
        }
Ejemplo n.º 15
0
		public void OnRowInserted(object o, RowInsertedArgs args){
			if(ShowMe != null)
				ShowMe(this,new ShowMeEventArgs());
			
			TreeModelFilter filter = (TreeModelFilter)locationsView.Model;
			TreeModel model = filter.Model;
			// show the created location by removing letters from the filter-string until the new item is visible
			while(true){
				if(FilterLocations(model,args.Iter) == true) break;
				string text = locationsViewFilter.Text;
				locationsViewFilter.Text = text.Remove(text.Length-1,1);
			}
			filter.Refilter();
			
			if(LocationJustCreated == true){
				// activate and edit the created location
				TreePath path = filter.ConvertChildPathToPath(args.Path);
				locationsView.ExpandToPath(path);
				locationsView.SetCursor(path,locationsItemColumn,true);
				LocationJustCreated = false;
			}
		}
Ejemplo n.º 16
0
		public void OnTagRowInserted(object o, RowInsertedArgs args){
			if(ShowMe != null)
				ShowMe(this,new ShowMeEventArgs());
			
			itemEditTags.SelectPath(args.Path);
			itemEditTags.ScrollToPath(args.Path, 0.5f, 0f);
			/* FIXME:
			 * This call fails and outputs
			 * (MyInventory:11489): Gtk-CRITICAL **: gtk_icon_view_get_cell_area: assertion `info->position < item->n_cells' failed
			 * 
			 * No clue why this is the case but it doesn't seem to harm anybody
			 */
			itemEditTags.SetCursor(args.Path,itemEditTagCell,true);
		}
Ejemplo n.º 17
0
 private void row_inserted(object o, RowInsertedArgs args)
 {
     changed = true;
 }
		/// <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;
		}