internal void NewView(ChartView source) { string name; do { NewProfile dlg = new NewProfile(); if (dlg.Run() == (int)Gtk.ResponseType.Cancel) { return; } name = dlg.ViewName; dlg.Destroy(); } while (name == string.Empty); if (name == null) { return; } ChartView v = new ChartView(); v.CopyFrom(source); v.Name = name; views.Add(v); SaveViews(); TreeIter it = store.AppendValues(iterViews, name, v); treeCounters.Selection.SelectIter(it); }
internal void NewView (ChartView source) { string name; do { NewProfile dlg = new NewProfile (); if (dlg.Run () == (int) Gtk.ResponseType.Cancel) return; name = dlg.ViewName; dlg.Destroy (); } while (name == string.Empty); if (name == null) return; ChartView v = new ChartView (); v.CopyFrom (source); v.Name = name; views.Add (v); SaveViews (); TreeIter it = store.AppendValues (iterViews, name, v); treeCounters.Selection.SelectIter (it); }