///<summary> ///Ajout d'un bouton dans la barre d'outils principale ///</summary> public override void AddToolbarItem(ToolbarItem item) { if (item == null) { throw new ArgumentNullException("Impossible d'ajouter un élément nul dans la barre d'outils des filtres"); } toolbarFilters.Insert(item, -1); }
public override void CreateControl(ToolBarHandler handler, int index) { Gtk.Toolbar tb = handler.Control; Control = new Gtk.SeparatorToolItem(); Control.ShowAll(); Control.NoShowAll = true; Control.Visible = Visible; SetType(); tb.Insert(Control, index); }
public override void CreateControl(ToolBarHandler handler) { Gtk.Toolbar tb = handler.Control; Control = new Gtk.SeparatorToolItem(); Control.Expand = expand; tb.Insert(Control, -1); if (tb.Visible) { Control.ShowAll(); } }
public override void CreateControl(ToolBarHandler handler, int index) { Gtk.Toolbar tb = handler.Control; Control = new Gtk.ToolButton(GtkImage, Text); Control.IsImportant = true; Control.Sensitive = Enabled; Control.TooltipText = this.ToolTip; Control.ShowAll(); Control.NoShowAll = true; Control.Visible = Visible; //control.CanFocus = false; // why is this disabled and not true??? tb.Insert(Control, index); Control.Clicked += Connector.HandleClicked; }
public override void CreateControl(ToolBarHandler handler) { Gtk.Toolbar tb = handler.Control; Control = new Gtk.ToolButton(Image, this.Text); Control.Clicked += button_Clicked; Control.IsImportant = true; Control.Sensitive = this.Enabled; //Control.TooltipText = this.ToolTip; //control.CanFocus = false; tb.Insert(Control, -1); if (tb.Visible) { Control.ShowAll(); } }
public override void CreateControl(ToolBarHandler handler, int index) { Gtk.Toolbar tb = handler.Control; Control = new Gtk.ToolButton(GtkImage, Text); Control.IsImportant = true; Control.Sensitive = Enabled; //Control.TooltipText = this.ToolTip; //control.CanFocus = false; tb.Insert(Control, index); if (tb.Visible) { Control.ShowAll(); } Control.Clicked += Connector.HandleClicked; }
public override void CreateControl(ToolBarHandler handler, int index) { Gtk.Toolbar tb = handler.Control; Control = new Gtk.ToggleToolButton(); Control.Active = ischecked; Control.Label = Text; //Control.TooltipText = this.ToolTip; Control.IconWidget = GtkImage; Control.Sensitive = Enabled; Control.CanFocus = false; Control.IsImportant = true; tb.Insert(Control, index); if (tb.Visible) { Control.ShowAll(); } }
public override void CreateControl(ToolBarHandler handler, int index) { Gtk.Toolbar tb = handler.Control; Control = new Gtk.RadioToolButton(handler.RadioGroup); Control.Active = ischecked; Control.Label = Text; Control.TooltipText = this.ToolTip; Control.IconWidget = GtkImage; Control.Sensitive = Enabled; Control.CanFocus = false; Control.IsImportant = true; Control.ShowAll(); Control.NoShowAll = true; Control.Visible = Visible; tb.Insert(Control, index); Control.Toggled += Connector.HandleToggled; }
public override void BuildToolbar(Gtk.Toolbar toolBar) { ToolBarComboBox zoomCombobox = new ToolBarComboBox(100, 4, true, new string[] { "400%", "300%", "200%", "150%", "100%", "66%", "50%" }); zoomCombobox.ComboBox.Changed += delegate(object sender, EventArgs e) { string text = zoomCombobox.ComboBox.ActiveText; text = text.Trim('%'); double percent; if (!double.TryParse(text, out percent)) { return; } percent = Math.Min(percent, 400); designService.ZoomChanged(percent / 100.0); }; toolBar.Insert(zoomCombobox, 0); }
public CueSheetsSource() : base(AddinManager.CurrentLocalizer.GetString("CueSheets"), AddinManager.CurrentLocalizer.GetString("CueSheets"), //"cuesheets", sort_order) //, //"hod-cuesheets-2013-01-06") { Hyena.Log.Information("CueSheetsSouce init"); DbConnection = ServiceManager.DbConnection; TM_Provider = DatabaseTrackInfo.Provider; _track_info_db = new CS_TrackInfoDb(DbConnection); _sheet = new CueSheet(); _sheets = new CueSheetCollection(); _view = new CueSheetsView(this); Properties.Set <ISourceContents> ("Nereid.SourceContents", _view); Properties.SetString("Icon.Name", "cueplay"); Hyena.Log.Information("CueSheets source has been instantiated."); Properties.Set <string> ("SearchEntryDescription", Catalog.GetString("Search albums and tracks")); try { Properties.SetString("GtkActionPath", "/CueSheetsPopup"); _actions = new CS_Actions(this); Hyena.Log.Information(_actions.ToString()); } catch (System.Exception ex) { Hyena.Log.Information(ex.ToString()); } InterfaceActionService action_service = ServiceManager.Get <InterfaceActionService> (); try { _track_search = new Gtk.CheckButton("Search Tracks"); _track_search.Clicked += delegate(object sender, EventArgs args) { this.DoFilter(); }; Gtk.Toolbar header_toolbar = (Gtk.Toolbar)action_service.UIManager.GetWidget("/HeaderToolbar"); int i, N, k; for (i = 0, k = -1, N = header_toolbar.NItems; i < N; i++) { Gtk.Widget w = header_toolbar.GetNthItem(i).Child; if (w != null) { if (w.GetType() == typeof(Banshee.Gui.Widgets.ConnectedVolumeButton)) { k = i; } } } if (k >= 0) { Hyena.Log.Information("Toolitem itm"); Gtk.ToolItem itm = new Gtk.ToolItem(); Hyena.Log.Information("Add cbk"); itm.Add(_track_search); Hyena.Log.Information("Insert cbk"); header_toolbar.Insert(itm, k); itm.Show(); } } catch (System.Exception ex) { Hyena.Log.Error(ex.ToString()); } Gtk.Menu viewMenu = (action_service.UIManager.GetWidget("/MainMenu/ViewMenu") as Gtk.MenuItem).Submenu as Gtk.Menu; _menuItem = new Gtk.MenuItem(Catalog.GetString("_Change Album View")); _menuItem.Activated += delegate { _view.ToggleGrid(); }; viewMenu.Insert(_menuItem, 2); _sep = new Gtk.SeparatorMenuItem(); viewMenu.Insert(_sep, 3); }