protected override void OnBuildToolBar(Gtk.Toolbar tb) { base.OnBuildToolBar(tb); Gtk.ComboBox dpbBox = dashPBox.SetupToolbar(tb); if (dpbBox != null) { dpbBox.Changed += (o, e) => { dashPattern = dpbBox.ActiveText; }; } }
protected override void OnBuildToolBar(Toolbar tb) { base.OnBuildToolBar(tb); if (fill_sep == null) { fill_sep = new Gtk.SeparatorToolItem(); } tb.AppendItem(fill_sep); if (fill_label == null) { fill_label = new ToolBarLabel(string.Format(" {0}: ", Catalog.GetString("Fill Style"))); } tb.AppendItem(fill_label); if (fill_button == null) { fill_button = new ToolBarDropDownButton(); fill_button.AddItem(Catalog.GetString("Outline Shape"), "ShapeTool.Outline.png", 0); fill_button.AddItem(Catalog.GetString("Fill Shape"), "ShapeTool.Fill.png", 1); fill_button.AddItem(Catalog.GetString("Fill and Outline Shape"), "ShapeTool.OutlineFill.png", 2); } tb.AppendItem(fill_button); Gtk.ComboBox dpbBox = dashPBox.SetupToolbar(tb); if (dpbBox != null) { dpbBox.Changed += (o, e) => { dashPattern = dpbBox.ActiveText; }; } }
protected override void OnBuildToolBar(Toolbar tb) { base.OnBuildToolBar(tb); tb.AppendItem(Separator); tb.AppendItem(FillLabel); tb.AppendItem(FillDropDown); // TODO: This could be cleaner. // This will only return an item on the first setup so we only add the handler once. var dash_pattern_box = dashPBox.SetupToolbar(tb); if (dash_pattern_box != null) { dash_pattern_box.Entry.Text = Settings.GetSetting(DASH_PATTERN_SETTING, "-"); dash_pattern_box.Changed += (o, e) => { dash_pattern = dash_pattern_box.ActiveText; }; } }