void RowExpanded(object o, Gtk.RowExpandedArgs args) { Node node = (Node)store.GetValue(args.Iter, 1); if (node == null) { return; } if (populated.ContainsKey(node)) { return; } if (node.Nodes == null) { return; } TreeIter iter; if (store.IterChildren(out iter, args.Iter)) { do { PopulateNode(iter); }while (store.IterNext(ref iter)); } populated[node] = true; }
void HandleObjectsRowExpanded (object o, RowExpandedArgs args) { var container = GetContainer (args.Iter); if (container == null) { return; } var path = args.Path.Copy (); ThreadPool.QueueUserWorkItem (state => { try { var children = content_directry.GetChildren<Object> (container); Application.Invoke ((s, a) => { TreeIter iter, loading_iter; store.GetIter (out iter, path); store.IterNthChild (out loading_iter, iter, 0); List<ItemRow> items = null; var position = -1; foreach (var child in children) { position++; var item = child as Item; if (item != null && item.IsReference) { if (items == null) { items = new List<ItemRow> (); } items.Add (new ItemRow (item, store.GetPath (store.InsertWithValues (iter, position, loading)))); continue; } var child_iter = store.InsertWithValues (iter, position, new ObjectRow (child)); var c = child as Container; if (c != null && c.ChildCount > 0) { store.AppendValues (child_iter, loading); } } store.Remove (ref loading_iter); if (items != null) { Load (items); } }); } catch (Exception e) { Console.WriteLine (e); } }); }
private void MyRowExpandedHandler(object o, RowExpandedArgs args) { string path = itemStore.GetValue(args.Iter, 1).ToString() + "/*"; int indx = 0; Microsoft.TeamFoundation.VersionControl.Client.Item[] items = ItemsForPath(path); if (items.Length == 0) SetRowValue(args.Iter, indx, " - item list not available - ", ""); foreach (Microsoft.TeamFoundation.VersionControl.Client.Item item in items) { string shortPath = item.ServerItem.Substring(item.ServerItem.LastIndexOf('/') + 1); if (item.ItemType == ItemType.Folder) shortPath += "/"; Gtk.TreeIter child = SetRowValue(args.Iter, indx, shortPath, item.ServerItem); if (item.ItemType == ItemType.Folder) itemStore.AppendValues(child, "", ""); indx++; } }
private void whenRowExpanded(object o, RowExpandedArgs rea) { CategoryToolboxNode node = store.GetNode (rea.Path) as CategoryToolboxNode; if (node != null) expandedCategories [node.Label] = true; }
void ldapRowExpanded(object o, RowExpandedArgs args) { string name = null; name = (string) browserStore.GetValue (args.Iter, (int)TreeCols.DN); if (name == "Servers") return; TreeIter child; browserStore.IterChildren (out child, args.Iter); string childName = (string)browserStore.GetValue (child, (int)TreeCols.DN); if (childName != "") return; browserStore.Remove (ref child); Log.Debug ("Row expanded {0}", name); string serverName = FindServerName (args.Iter, browserStore); if (!IsSingle) { conn = Global.Connections [serverName]; } try { if (!conn.IsConnected) conn.Connect (); } catch (Exception e) { browserStore.AppendValues (args.Iter, null, "", ""); HIGMessageDialog dialog = new HIGMessageDialog ( parent, 0, Gtk.MessageType.Error, Gtk.ButtonsType.Ok, "Connection error", e.Message); dialog.Run (); dialog.Destroy (); return; } if (name == serverName) { Pixbuf pb = Pixbuf.LoadFromResource ("x-directory-remote-server.png"); TreeIter i = browserStore.AppendValues (args.Iter, pb, conn.DirectoryRoot, conn.DirectoryRoot); browserStore.AppendValues (i, null, "", ""); } else { AddEntry (name, conn, args.Iter); } TreePath path = browserStore.GetPath (args.Iter); this.ExpandRow (path, false); }
public virtual void OnExpandRow( object sender, RowExpandedArgs args ) { HTreeNode nod = getNodeFromIter( args.Iter ); nod.IsExpanded = true; if( NodeExpanded != null ) NodeExpanded( this, new NodeEventArgs( nod ) ); QueueDraw(); }
void BugTreeRowExpanded(object o, RowExpandedArgs args) { if (args.Path.Indices.Length == 1) // Check and make sure it's a root node { SplatterCore.Instance.Queries[args.Path.Indices[0]].TreeExpanded = true; } }
private void OnRowExpanded (object o, RowExpandedArgs args) { TreeIter child; if (memberStore.IterNthChild (out child, args.Iter, 0)) { TreeCell cell = (TreeCell) memberStore.GetValue (child, 0); if (cell.Message == dummyText) { // Find parent node TreeIter piter; memberStore.IterParent (out piter, child); NodeInfo parent = ((TreeCell) memberStore.GetValue (piter, 0)).Node; // remove dummy value memberStore.Remove (ref child); // Insert children if (parent != null) { AddChildren (parent, args.Iter); // For reasons I can't fathom, if nodes are added the `args.Iter' // row isn't expanded until the 2nd click. So first-click // populates the children, 2nd-click shows them. // // This is annoying. // // Explicitly expand the row. treeView.ExpandRow (args.Path, false); } } } }
private void OnTreeRowExpanded(object sender, RowExpandedArgs args) { object obj = store.GetValue(args.Iter, VALUE_OBJECT); bool raw = (bool) store.GetValue(args.Iter, VALUE_RAW); Add(true, args.Iter, null, obj, true, raw); TreeIter firstChild; store.IterChildren(out firstChild, args.Iter); store.Remove(ref firstChild); }
void OnRowExpanded(object o, RowExpandedArgs args) { string name = (string) viewsStore.GetValue (args.Iter, 1); if (name == "Servers") return; TreeIter child; viewsStore.IterChildren (out child, args.Iter); string childName = (string)viewsStore.GetValue (child, 1); if (childName != "") return; viewsStore.Remove (ref child); Log.Debug ("View expanded {0}", name); Connection conn = Global.Connections [name]; AddViews (conn, args.Iter); TreePath path = viewsStore.GetPath (args.Iter); this.ExpandRow (path, false); }
/* public void SlotDoubleClick (QListViewItem item) { if (item is MethodItem) { MethodItem method = (MethodItem)item; ClassItem parent = method.parent; if (parent.sourceBrowser != null) { parent.sourceBrowser.ShowNormal (); parent.sourceBrowser.Raise (); } else { parent.sourceBrowser = new SourceWindow (this, parent); parent.sourceBrowser.Show (); } parent.sourceBrowser.CenterOnMethod (method); } } */ private void OnRowExpanded(object sender, RowExpandedArgs args) { ClassItem classItem = store.GetValue (args.Iter, 4) as ClassItem; if (classItem == null) return; foreach (MethodCoverageItem method in classItem.Model.Methods) { if (method.filtered) continue; string title = method.Name; if (title.Length > 64) title = title.Substring (0, 63) + "...)"; new MethodItem (store, classItem, classItem, method, title); } TreeIter treeIter = classItem.iter; store.IterChildren (out treeIter, treeIter); while (store.IterIsValid (treeIter)) { if (store.GetValue (treeIter, 4) is MethodItem) store.IterNext (ref treeIter); else store.Remove (ref treeIter); } }
protected void OnTreeViewRowExpanded(object o, RowExpandedArgs args) { Console.WriteLine(">>>>> SyncMenuWindow - OnTreeViewRowExpanded"); Gtk.TreeIter iter; SyncMenuItemEntity entity = (SyncMenuItemEntity)_storeItems.GetValue(args.Iter, 0); // Check for dummy node _storeItems.IterChildren(out iter, args.Iter); SyncMenuItemEntity entityChild = (SyncMenuItemEntity)_storeItems.GetValue(iter, 0); if (entityChild.ArtistName == "dummy" && entityChild.AlbumTitle == "dummy") { Console.WriteLine("SyncMenuWindow - OnTreeViewRowExpanded -- Expanding node..."); OnExpandItem(entity, args.Iter); } }
void OnDataTreeRowExpanded (object o, RowExpandedArgs args) { // 1 Connections // 2 conn1 // 2 conn2 // 3 Tables // 4 table_name_display1, is_populated_status, table_owner, table_name // 4 table_name_display2, is_populated_status, table_owner, table_name // 5 Columns // 6 column_name1 // 6 column_name2 // RowExpandedArgs has: // args.Iter // args.Path TreeModel model = (TreeModel) tree.Store; if (args.Path.Depth == 5) { string val = (string) model.GetValue (args.Iter, 0); if (val.Equals("Columns")) { TreeIter parent = args.Iter; TreeIter dataSourceIter = args.Iter; // get table name model.IterParent(out parent, args.Iter); string tableName = (string) tree.Store.GetValue (parent, 0); // tableName display string objOwner = (string) tree.Store.GetValue (parent, 2); // owner name string objName = (string) tree.Store.GetValue (parent, 3); // table name TreeIter iter; iter = parent; model.IterParent(out parent, iter); val = (string) tree.Store.GetValue (parent, 0); // Tables if (val.Equals("Tables")) { // get data source model.IterParent(out dataSourceIter, parent); string dataSourceName = (string) model.GetValue (dataSourceIter, 0); ComboHelper.SetActiveText (combo, dataSourceName); TreeIter columnsIter = args.Iter; string populated = (string) tree.Store.GetValue (args.Iter, 1); if (!populated.Equals(NotPopulated)) return; // setup schema browser Schema browser = new Schema (provider.Name, conn); if (browser.MetaData != null) { SetStatusBarText ("Getting Meta Data: Tables Columns..."); while (Application.EventsPending ()) Application.RunIteration (); // get table columns MetaTable table = new MetaTable (objOwner, objName); // owner, tablename PopulateTableColumns(columnsIter, table, browser); model.SetValue (args.Iter, 1, "Populated"); SetStatusBarText (""); // remove the NotPopulated node TreeIter popIter = columnsIter; if (tree.Store.IterChildren (out popIter, columnsIter)) tree.Store.Remove (ref popIter); } } } } }
void on_row_expanded(object sender, Gtk.RowExpandedArgs args) { }
private void MyRowExpandedHandler(object o, RowExpandedArgs args) { PopulateRowChildren(args.Iter); }
private void OnRowExpanded(object o, RowExpandedArgs args) { switch (CurrentVolumeType) { case VolumeType.FileSystemVolume: TreeStore store = (TreeStore)Model; // get child node of expanded node TreeIter child; store.IterChildren(out child, args.Iter); // test if the first child is the "loading" child node if ((GetItem(child) == null) && ((string)Model.GetValue(child, 1) == STR_LOADING)) { // append dir children DirectoryVolumeItem dir = (DirectoryVolumeItem)GetItem(args.Iter); AppendDirRows(store, args.Iter, dir); // remove "loading" child node store.Remove(ref child); } break; default: throw new NotImplementedException("View for this VolumeType has not been implemented yet"); } }
void OnRowExpanded(object o, RowExpandedArgs args) { string name = null; name = (string) schemaStore.GetValue (args.Iter, (int)TreeCols.ObjectName); if (name == "Servers") return; TreeIter child; schemaStore.IterChildren (out child, args.Iter); string childName = (string) schemaStore.GetValue (child, (int)TreeCols.ObjectName); if (childName != "") return; schemaStore.Remove (ref child); Log.Debug ("Row expanded {0}", name); string serverName = FindServerName (args.Iter, schemaStore); Connection conn = Global.Connections [serverName]; try { Gdk.Pixbuf pb = Gdk.Pixbuf.LoadFromResource ("text-x-generic.png"); string[] kids = GetChildren (name, conn); foreach (string s in kids) { schemaStore.AppendValues (args.Iter, pb, s); } TreePath path = schemaStore.GetPath (args.Iter); this.ExpandRow (path, false); } catch (Exception e) { schemaStore.AppendValues (args.Iter, null, ""); Log.Debug (e); string msg = Mono.Unix.Catalog.GetString ( "Unable to read schema information from server"); HIGMessageDialog dialog = new HIGMessageDialog ( parentWindow, 0, Gtk.MessageType.Error, Gtk.ButtonsType.Ok, "Server error", msg); dialog.Run (); dialog.Destroy (); } }