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; } }
void OnRowInsertedHandler(object sender, Gtk.RowInsertedArgs args) { if (NumberOfTasksChanged == null) { return; } NumberOfTasksChanged(this, EventArgs.Empty); }
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; } }
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); }
private void row_inserted(object o, RowInsertedArgs args) { changed = true; }
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(); }
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(); }
/// <summary> /// Updates the button greyed out states whenever an item is inserted. /// </summary> protected void HandleRowInserted (object sender, RowInsertedArgs a) { UpdatePriorityButtons (); }
private void OnModelRowInserted (object o, RowInsertedArgs args) { EmitSubtitleCountChangedEvent(); }
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)); }
void Model_RowInserted(object o, RowInsertedArgs e) { Invalidate (); }
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(); }
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; }
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; } }
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); }
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; }