private void createComboSpeciallities(int sportID) { combo_speciallities = ComboBox.NewText(); speciallities = SqliteSpeciallity.SelectAll(true, sportID); //show undefined, filter by sport //first value has to be any speciallities[0] = "-1:" + Constants.Any + ":" + Catalog.GetString(Constants.Any); //create speciallities translated, only with translated stuff speciallitiesTranslated = new String[speciallities.Length]; int i = 0; foreach (string row in speciallities) { string [] myStrFull = row.Split(new char[] { ':' }); speciallitiesTranslated[i++] = myStrFull[2]; } //sort array (except first row) System.Array.Sort(speciallities, 1, speciallities.Length - 1); UtilGtk.ComboUpdate(combo_speciallities, speciallitiesTranslated, ""); combo_speciallities.Active = UtilGtk.ComboMakeActive(speciallitiesTranslated, Catalog.GetString(Constants.Any)); hbox_combo_speciallities.PackStart(combo_speciallities, true, true, 0); hbox_combo_speciallities.ShowAll(); combo_speciallities.Sensitive = true; combo_speciallities.Changed += new EventHandler(on_combo_other_changed); UtilGtk.ComboPackShowAndSensitive(hbox_combo_speciallities, combo_speciallities); }
private void createComboSelect() { combo_select = ComboBox.NewText(); selectArray = new ArrayList(jumpTypes.Length); string [] jumpNamesToCombo = new String [jumpTypes.Length]; int i = 0; foreach (string jumpType in jumpTypes) { string [] j = jumpType.Split(new char[] { ':' }); string nameTranslated = Catalog.GetString(j[1]); jumpNamesToCombo[i] = nameTranslated; i++; ArrayList options = new ArrayList(3); options.Add("startIn:" + j[2]); //startIn options.Add("weight:" + j[3]); //weight options.Add("description:" + j[4]); //description TrCombo tc = new TrCombo( Convert.ToInt32(j[0]), j[1], //uniqueID, name nameTranslated, options); selectArray.Add(tc); } UtilGtk.ComboUpdate(combo_select, jumpNamesToCombo, ""); combo_select.Active = 0; hbox_combo_select.PackStart(combo_select, true, true, 0); hbox_combo_select.ShowAll(); }
public void InitWebKit(Gtk.Box w) { wb = new MonoMac.WebKit.WebView(new System.Drawing.RectangleF(10, 10, 200, 200), "foo", "bar"); scrollWindow.AddWithViewport(NSViewToGtkWidget(wb)); w.PackStart(scrollWindow, true, true, 0); w.ShowAll(); wb.ShouldCloseWithWindow = true; }
// ---- Language stuff //private void createComboLanguage(string myLanguageCode) { private void createComboLanguage() { combo_language = ComboBox.NewText(); fillLanguages(); hbox_combo_language.PackStart(combo_language, false, false, 0); hbox_combo_language.ShowAll(); }
public void InitWebKit(Gtk.Box w) { wb = new WebKit.WebView(); scrollWindow.Add(wb); // Hack to work around webkit bug; webkit will crash the app if a size is not provided // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=466360 for a related bug report wb.SetSizeRequest(2, 2); w.PackStart(scrollWindow, true, true, 0); w.ShowAll(); }
public void InitWebKit(Gtk.Box w) { HoldingWidget = w; wb = new Safari(new System.Drawing.RectangleF(10, 10, 200, 200), "foo", "bar"); wb.OnKeyDown += OnKeyDown; scrollWindow.AddWithViewport(NSViewToGtkWidget(wb)); w.PackStart(scrollWindow, true, true, 0); w.ShowAll(); wb.ShouldCloseWithWindow = true; }
void reset_hbox_list_d(int colsNum) { foreach (Gtk.SpinButton sp in hbox_list_d.Children) { hbox_list_d.Remove(sp); } for (int i = 0; i < colsNum; i++) { switch (i) { case 0: hbox_list_d.PackStart(spin_d_0, false, false, 0); break; case 1: hbox_list_d.PackStart(spin_d_1, false, false, 0); break; case 2: hbox_list_d.PackStart(spin_d_2, false, false, 0); break; case 3: hbox_list_d.PackStart(spin_d_3, false, false, 0); break; case 4: hbox_list_d.PackStart(spin_d_4, false, false, 0); break; case 5: hbox_list_d.PackStart(spin_d_5, false, false, 0); break; case 6: hbox_list_d.PackStart(spin_d_6, false, false, 0); break; case 7: hbox_list_d.PackStart(spin_d_7, false, false, 0); break; case 8: hbox_list_d.PackStart(spin_d_8, false, false, 0); break; case 9: hbox_list_d.PackStart(spin_d_9, false, false, 0); break; } } hbox_list_d.ShowAll(); }
protected void createComboEventType(Event myEvent) { combo_eventType = ComboBox.NewText(); string [] myTypes = findTypes(myEvent); UtilGtk.ComboUpdate(combo_eventType, myTypes, ""); combo_eventType.Active = UtilGtk.ComboMakeActive(myTypes, myEvent.Type); hbox_combo_eventType.PackStart(combo_eventType, true, true, 0); hbox_combo_eventType.ShowAll(); createSignal(); }
public void SetComboValues(string [] values, string current) { combo = ComboBox.NewText(); UtilGtk.ComboUpdate(combo, values, ""); hbox_combo.PackStart(combo, true, true, 0); hbox_combo.ShowAll(); combo.Sensitive = true; combo.Active = UtilGtk.ComboMakeActive(values, current); }
public void InitWebKit(Gtk.Box w) { HoldingWidget = w; Browser = new WebKit.WebView(); ScrollWindow.Add(Browser); // Hack to work around webkit bug; webkit will crash the app if a size is not provided // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=466360 for a related bug report Browser.SetSizeRequest(2, 2); Browser.KeyPressEvent += Wb_KeyPressEvent; w.PackStart(ScrollWindow, true, true, 0); w.ShowAll(); }
private void createComboLevels() { combo_levels = ComboBox.NewText(); levels = Constants.Levels; //first value has to be any (but is ok to put the id value of the LevelUndefinedID) levels[0] = Constants.LevelUndefinedID.ToString() + ":" + Catalog.GetString(Constants.Any); UtilGtk.ComboUpdate(combo_levels, levels, ""); combo_levels.Active = UtilGtk.ComboMakeActive(levels, Constants.LevelUndefinedID.ToString() + ":" + Catalog.GetString(Constants.Any)); hbox_combo_levels.PackStart(combo_levels, true, true, 0); hbox_combo_levels.ShowAll(); combo_levels.Sensitive = false; //level is shown when sport is not "undefined" and not "none" combo_levels.Changed += new EventHandler(on_combo_other_changed); UtilGtk.ComboPackShowAndSensitive(hbox_combo_levels, combo_levels); }
public void CreateComboCheckBoxes() { if (hbox_combo_all_none_selected.Children.Length > 0) { hbox_combo_all_none_selected.Remove(combo_all_none_selected); } combo_all_none_selected = ComboBox.NewText(); UtilGtk.ComboUpdate(combo_all_none_selected, comboCheckBoxesOptions, ""); //combo_all_none_selected.DisableActivate (); combo_all_none_selected.Changed += new EventHandler(on_combo_all_none_selected_changed); hbox_combo_all_none_selected.PackStart(combo_all_none_selected, true, true, 0); hbox_combo_all_none_selected.ShowAll(); combo_all_none_selected.Sensitive = true; combo_all_none_selected.Active = UtilGtk.ComboMakeActive(comboCheckBoxesOptions, Catalog.GetString("Selected")); }
private void createComboCountries() { combo_countries = ComboBox.NewText(); countries = new String[1]; //record countries with id:english name:translatedName countries [0] = Constants.CountryUndefinedID + ":" + Constants.CountryUndefined + ":" + Catalog.GetString(Constants.CountryUndefined); string [] myCountries = new String[1]; myCountries [0] = Catalog.GetString(Constants.CountryUndefined); UtilGtk.ComboUpdate(combo_countries, myCountries, ""); combo_countries.Active = UtilGtk.ComboMakeActive(myCountries, Catalog.GetString(Constants.CountryUndefined)); combo_countries.Changed += new EventHandler(on_combo_countries_changed); hbox_combo_countries.PackStart(combo_countries, true, true, 0); hbox_combo_countries.ShowAll(); combo_countries.Sensitive = false; }
private void createComboCamera(string [] devices, int current) { combo_camera = ComboBox.NewText(); if (devices.Length == 0) { devices = Util.StringToStringArray(Constants.CameraNotFound); current = 0; } UtilGtk.ComboUpdate(combo_camera, devices, ""); hbox_combo_camera.PackStart(combo_camera, true, true, 0); hbox_combo_camera.ShowAll(); if (current >= devices.Length) { current = 0; } combo_camera.Active = UtilGtk.ComboMakeActive(devices, devices[current]); }
static void gtml_activate() { icons = new Gtk.IconFactory(); icons.AddDefault(); window = new Gtk.Window(PN); window.DeleteEvent += new DeleteEventHandler(Window_Delete); window.SetDefaultSize(800, 120); window.Decorated = true; grid = new Gtk.Grid(); grid.ColumnHomogeneous = true; Gtk.Image icon = new Gtk.Image(); icon.IconName = ("list-add-symbolic"); import_button = new Gtk.Button(icon); import_button.Clicked += new EventHandler(gtml_import_full); Gtk.Box naw = new Gtk.Box(Gtk.Orientation.Horizontal, 1); naw.PackStart(import_button, true, true, 1); naw.ShowAll(); stack = new Gtk.Notebook(); stack.EnablePopup = true; stack.GroupName = "Mozilla Programs"; stack.Scrollable = true; stack.SetActionWidget(naw, Gtk.PackType.End); stack.Hexpand = true; stack.Vexpand = true; grid.Attach(stack, 1, 1, 1, 1); gtml_reload(); window.Add(grid); window.ShowAll(); }
private void createComboContinents() { combo_continents = ComboBox.NewText(); continents = Constants.Continents; //create continentsTranslated, only with translated stuff continentsTranslated = new String[Constants.Continents.Length]; int i = 0; foreach (string continent in continents) { continentsTranslated[i++] = Util.FetchName(continent); } UtilGtk.ComboUpdate(combo_continents, continentsTranslated, ""); combo_continents.Active = UtilGtk.ComboMakeActive(continentsTranslated, Catalog.GetString(Constants.ContinentUndefined)); combo_continents.Changed += new EventHandler(on_combo_continents_changed); hbox_combo_continents.PackStart(combo_continents, true, true, 0); hbox_combo_continents.ShowAll(); combo_continents.Sensitive = true; }
protected void fillDialog(Event myEvent) { fillWindowTitleAndLabelHeader(); string id = myEvent.UniqueID.ToString(); if (myEvent.Simulated == Constants.Simulated) { label_simulated.Show(); } label_event_id_value.Text = id; label_event_id_value.UseMarkup = true; if (showTv) { fillTv(myEvent); } else { label_tv_title.Hide(); entry_tv_value.Hide(); label_tv_units.Hide(); } if (showTc) { fillTc(myEvent); } else { label_tc_title.Hide(); entry_tc_value.Hide(); label_tc_units.Hide(); } if (showFall) { fillFall(myEvent); } else { label_fall_title.Hide(); entry_fall_value.Hide(); label_fall_units.Hide(); } if (showDistance) { fillDistance(myEvent); } else { label_distance_title.Hide(); entry_distance_value.Hide(); label_distance_units.Hide(); } if (showTime) { fillTime(myEvent); } else { label_time_title.Hide(); entry_time_value.Hide(); label_time_units.Hide(); } if (showSpeed) { fillSpeed(myEvent); } else { label_speed_title.Hide(); label_speed_value.Hide(); label_speed_units.Hide(); } if (showWeight) { fillWeight(myEvent); } else { label_weight_title.Hide(); entry_weight_value.Hide(); label_weight_units.Hide(); } if (showLimited) { fillLimited(myEvent); } else { label_limited_title.Hide(); label_limited_value.Hide(); } if (showAngle) { fillAngle(myEvent); } else { label_angle_title.Hide(); entry_angle_value.Hide(); label_angle_units.Hide(); } if (!showMistakes) { label_mistakes.Hide(); spin_mistakes.Hide(); } //also remove new line for old descriptions that used a textview string temp = Util.RemoveTildeAndColonAndDot(myEvent.Description); entry_description.Text = Util.RemoveNewLine(temp, true); createComboEventType(myEvent); if (!showType) { label_type_title.Hide(); combo_eventType.Hide(); } if (showRunStart) { fillRunStart(myEvent); } else { label_run_start_title.Hide(); label_run_start_value.Hide(); } ArrayList persons = SqlitePersonSession.SelectCurrentSessionPersons( myEvent.SessionID, false); //means: do not returnPersonAndPSlist string [] personsStrings = new String[persons.Count]; int i = 0; foreach (Person person in persons) { personsStrings[i++] = person.IDAndName(":"); } combo_persons = ComboBox.NewText(); UtilGtk.ComboUpdate(combo_persons, personsStrings, ""); combo_persons.Active = UtilGtk.ComboMakeActive(personsStrings, myEvent.PersonID + ":" + myEvent.PersonName); oldPersonID = myEvent.PersonID; hbox_combo_person.PackStart(combo_persons, true, true, 0); hbox_combo_person.ShowAll(); //show video if available videoFileName = Util.GetVideoFileName(myEvent.SessionID, typeOfTest, myEvent.UniqueID); if (File.Exists(videoFileName)) { label_video_yes.Visible = true; label_video_no.Visible = false; button_video_watch.Sensitive = true; button_video_url.Sensitive = true; } else { label_video_yes.Visible = false; label_video_no.Visible = true; button_video_watch.Sensitive = false; button_video_url.Sensitive = false; } }
public MiniMode() : base(Branding.ApplicationLongName) { default_main_window = InterfaceElements.MainWindow; glade = new Glade.XML(null, "minimode.glade", "MiniModeWindow", null); glade.Autoconnect(this); Widget child = glade["mini_mode_contents"]; (child.Parent as Container).Remove(child); Add(child); BorderWidth = 12; Resizable = false; IconThemeUtils.SetWindowIcon(this); DeleteEvent += delegate { Globals.ActionManager["QuitAction"].Activate(); }; // Playback Buttons ActionButton previous_button = new ActionButton(Globals.ActionManager["PreviousAction"]); previous_button.LabelVisible = false; previous_button.Padding = 1; ActionButton next_button = new ActionButton(Globals.ActionManager["NextAction"]); next_button.LabelVisible = false; next_button.Padding = 1; ActionButton playpause_button = new ActionButton(Globals.ActionManager["PlayPauseAction"]); playpause_button.LabelVisible = false; playpause_button.Padding = 1; PlaybackBox.PackStart(previous_button, false, false, 0); PlaybackBox.PackStart(playpause_button, false, false, 0); PlaybackBox.PackStart(next_button, false, false, 0); PlaybackBox.ShowAll(); // Seek Slider/Position Label seek_slider = new SeekSlider(); seek_slider.SetSizeRequest(125, -1); seek_slider.SeekRequested += delegate { PlayerEngineCore.Position = (uint)seek_slider.Value; }; stream_position_label = new StreamPositionLabel(seek_slider); SeekContainer.PackStart(seek_slider, false, false, 0); SeekContainer.PackStart(stream_position_label, false, false, 0); SeekContainer.ShowAll(); // Volume button volume_button = new VolumeButton(); VolumeContainer.PackStart(volume_button, false, false, 0); volume_button.Show(); volume_button.VolumeChanged += delegate(int volume) { PlayerEngineCore.Volume = (ushort)volume; PlayerEngineCore.VolumeSchema.Set(volume); }; // Cover cover_art_thumbnail = new CoverArtThumbnail(90); Gdk.Pixbuf default_pixbuf = Banshee.Base.Branding.DefaultCoverArt; cover_art_thumbnail.NoArtworkPixbuf = default_pixbuf; CoverBox.PackStart(cover_art_thumbnail, false, false, 0); // Source combobox source_combo_box = new SourceComboBox(); SourceBox.PackStart(source_combo_box, true, true, 0); source_combo_box.ShowAll(); // Repeat/Shuffle buttons MultiStateToggleButton shuffle_toggle_button = new MultiStateToggleButton(); shuffle_toggle_button.AddState(typeof(ShuffleDisabledToggleState), Globals.ActionManager["ShuffleAction"] as ToggleAction); shuffle_toggle_button.AddState(typeof(ShuffleEnabledToggleState), Globals.ActionManager["ShuffleAction"] as ToggleAction); shuffle_toggle_button.Relief = ReliefStyle.None; shuffle_toggle_button.ShowLabel = false; try { shuffle_toggle_button.ActiveStateIndex = PlayerWindowSchema.PlaybackShuffle.Get() ? 1 : 0; } catch { shuffle_toggle_button.ActiveStateIndex = 0; } shuffle_toggle_button.ShowAll(); MultiStateToggleButton repeat_toggle_button = new MultiStateToggleButton(); repeat_toggle_button.AddState(typeof(RepeatNoneToggleState), Globals.ActionManager["RepeatNoneAction"] as ToggleAction); repeat_toggle_button.AddState(typeof(RepeatAllToggleState), Globals.ActionManager["RepeatAllAction"] as ToggleAction); repeat_toggle_button.AddState(typeof(RepeatSingleToggleState), Globals.ActionManager["RepeatSingleAction"] as ToggleAction); repeat_toggle_button.Relief = ReliefStyle.None; repeat_toggle_button.ShowLabel = false; try { repeat_toggle_button.ActiveStateIndex = (int)PlayerWindowSchema.PlaybackRepeat.Get(); } catch { repeat_toggle_button.ActiveStateIndex = 0; } repeat_toggle_button.ShowAll(); LowerButtonsBox.PackEnd(repeat_toggle_button, false, false, 0); LowerButtonsBox.PackEnd(shuffle_toggle_button, false, false, 0); LowerButtonsBox.ShowAll(); // Tooltips toolTips = new Tooltips(); SetTip(previous_button, Catalog.GetString("Play previous song")); SetTip(playpause_button, Catalog.GetString("Play/pause current song")); SetTip(next_button, Catalog.GetString("Play next song")); SetTip(fullmode_button, Catalog.GetString("Switch back to full mode")); SetTip(volume_button, Catalog.GetString("Adjust volume")); SetTip(repeat_toggle_button, Catalog.GetString("Change repeat playback mode")); SetTip(shuffle_toggle_button, Catalog.GetString("Toggle shuffle playback mode")); // Hook up everything PlayerEngineCore.EventChanged += OnPlayerEngineEventChanged; PlayerEngineCore.StateChanged += OnPlayerEngineStateChanged; SetHeightLimit(); }
public MiniMode(BaseClientWindow defaultMainWindow) : base(Catalog.GetString("Banshee Media Player"), "minimode", 0, 0) { default_main_window = defaultMainWindow; glade = new Glade.XML(System.Reflection.Assembly.GetExecutingAssembly(), "minimode.glade", "MiniModeWindow", null); glade.Autoconnect(this); Widget child = glade["mini_mode_contents"]; (child.Parent as Container).Remove(child); Add(child); BorderWidth = 12; Resizable = false; // Playback Buttons Widget previous_button = ActionService.PlaybackActions["PreviousAction"].CreateToolItem(); Widget playpause_button = ActionService.PlaybackActions["PlayPauseAction"].CreateToolItem(); Widget button = ActionService.PlaybackActions["NextAction"].CreateToolItem(); Menu menu = ActionService.PlaybackActions.ShuffleActions.CreateMenu(); MenuButton next_button = new MenuButton(button, menu, true); PlaybackBox.PackStart(previous_button, false, false, 0); PlaybackBox.PackStart(playpause_button, false, false, 0); PlaybackBox.PackStart(next_button, false, false, 0); PlaybackBox.ShowAll(); // Seek Slider/Position Label seek_slider = new ConnectedSeekSlider(); SeekContainer.PackStart(seek_slider, false, false, 0); SeekContainer.ShowAll(); // Volume button volume_button = new ConnectedVolumeButton(); VolumeContainer.PackStart(volume_button, false, false, 0); volume_button.Show(); // Source combobox source_combo_box = new SourceComboBox(); SourceBox.PackStart(source_combo_box, true, true, 0); source_combo_box.Show(); // Track info track_info_display = new ClassicTrackInfoDisplay(); track_info_display.Show(); CoverBox.PackStart(track_info_display, true, true, 0); // Repeat button RepeatActionButton repeat_toggle_button = new RepeatActionButton(); LowerButtonsBox.PackEnd(repeat_toggle_button, false, false, 0); LowerButtonsBox.ShowAll(); tooltip_host = TooltipSetter.CreateHost(); SetTip(fullmode_button, Catalog.GetString("Switch back to full mode")); SetTip(repeat_toggle_button, Catalog.GetString("Change repeat playback mode")); // Hook up everything ServiceManager.PlayerEngine.ConnectEvent(OnPlayerEvent, PlayerEvent.Error | PlayerEvent.StateChange | PlayerEvent.TrackInfoUpdated); SetHeightLimit(); }
void UpdateChestData() { Chest chest = ActiveRoom.Chest; if (chest != null) { ValueReferenceGroup vrg = ActiveRoom.Chest.ValueReferenceGroup; if (chestVre == null) { chestVre = new ValueReferenceEditor(Project, vrg); chestVreHolder.Add(chestVre); } else { chestVre.ReplaceValueReferenceGroup(vrg); } TreasureObject treasure = chest.Treasure; if (treasure == null) { nonExistentTreasureHolder.ShowAll(); treasureVreHolder.Hide(); if (chest.TreasureID >= Project.NumTreasures) { treasureDataFrame.Hide(); } else { treasureDataFrame.Show(); } } else { nonExistentTreasureHolder.Hide(); treasureDataFrame.Show(); treasureVreHolder.Show(); if (treasureVre == null) { treasureVre = new ValueReferenceEditor(Project, treasure.ValueReferenceGroup); treasureVreHolder.Add(treasureVre); } else { treasureVre.ReplaceValueReferenceGroup(treasure.ValueReferenceGroup); } } treasureDataLabel.Text = string.Format("Treasure ${0:X2} Subid ${1:X2} Data", vrg.GetIntValue("ID"), vrg.GetIntValue("SubID")); } if (chest == null) { chestEditorBox.Hide(); treasureDataFrame.Hide(); chestAddHolder.ShowAll(); } else { chestEditorBox.ShowAll(); chestAddHolder.Hide(); } chestEventWrapper.ReplaceEventSource(chest); }
public static void ComboPackShowAndSensitive(Gtk.Box box, Gtk.ComboBox combo) { box.PackStart(combo, true, true, 0); box.ShowAll(); combo.Sensitive = true; }
public MiniMode() { glade = new Glade.XML(null, "minimode.glade", "MiniModeWindow", "banshee"); glade.Autoconnect(this); if (MiniModeWindow == null) { throw new Exception(); // This propagate Glade errors to Banshee's plugin framework } IconThemeUtils.SetWindowIcon(MiniModeWindow); MiniModeWindow.DeleteEvent += delegate { PlayerCore.UserInterface.Quit(); }; // Playback Buttons ActionButton previous_button = new ActionButton(Globals.ActionManager["PreviousAction"]); previous_button.LabelVisible = false; previous_button.Padding = 1; ActionButton next_button = new ActionButton(Globals.ActionManager["NextAction"]); next_button.LabelVisible = false; next_button.Padding = 1; ActionButton playpause_button = new ActionButton(Globals.ActionManager["PlayPauseAction"]); playpause_button.LabelVisible = false; playpause_button.Padding = 1; PlaybackBox.PackStart(previous_button, false, false, 0); PlaybackBox.PackStart(playpause_button, false, false, 0); PlaybackBox.PackStart(next_button, false, false, 0); PlaybackBox.ShowAll(); // Seek Slider/Position Label seek_slider = new SeekSlider(); seek_slider.SetSizeRequest(125, -1); seek_slider.SeekRequested += delegate { PlayerEngineCore.Position = (uint)seek_slider.Value; }; stream_position_label = new StreamPositionLabel(seek_slider); SeekContainer.PackStart(seek_slider, false, false, 0); SeekContainer.PackStart(stream_position_label, false, false, 0); SeekContainer.ShowAll(); // Volume button volumeButton = new VolumeButton(); VolumeContainer.PackStart(volumeButton, false, false, 0); volumeButton.Show(); volumeButton.VolumeChanged += delegate(int volume) { PlayerEngineCore.Volume = (ushort)volume; Globals.Configuration.Set(GConfKeys.Volume, volume); }; // Cover coverArtThumbnail = new CoverArtThumbnail(90); Gdk.Pixbuf default_pixbuf = Banshee.Base.IconThemeUtils.LoadIcon("audio-x-generic", 128); if (default_pixbuf == null) { default_pixbuf = new Gdk.Pixbuf(System.Reflection.Assembly.GetEntryAssembly(), "banshee-logo.png"); } coverArtThumbnail.NoArtworkPixbuf = default_pixbuf; CoverBox.PackStart(coverArtThumbnail, false, false, 0); // Source combobox sourceComboBox = new SourceComboBox(); SourceBox.PackStart(sourceComboBox, true, true, 0); sourceComboBox.ShowAll(); // Repeat/Shuffle buttons MultiStateToggleButton shuffle_toggle_button = new MultiStateToggleButton(); shuffle_toggle_button.AddState(typeof(ShuffleDisabledToggleState), Globals.ActionManager["ShuffleAction"] as ToggleAction); shuffle_toggle_button.AddState(typeof(ShuffleEnabledToggleState), Globals.ActionManager["ShuffleAction"] as ToggleAction); shuffle_toggle_button.Relief = ReliefStyle.None; shuffle_toggle_button.ShowLabel = false; shuffle_toggle_button.ShowAll(); MultiStateToggleButton repeat_toggle_button = new MultiStateToggleButton(); repeat_toggle_button.AddState(typeof(RepeatNoneToggleState), Globals.ActionManager["RepeatNoneAction"] as ToggleAction); repeat_toggle_button.AddState(typeof(RepeatAllToggleState), Globals.ActionManager["RepeatAllAction"] as ToggleAction); repeat_toggle_button.AddState(typeof(RepeatSingleToggleState), Globals.ActionManager["RepeatSingleAction"] as ToggleAction); repeat_toggle_button.Relief = ReliefStyle.None; repeat_toggle_button.ShowLabel = false; repeat_toggle_button.ShowAll(); LowerButtonsBox.PackEnd(repeat_toggle_button, false, false, 0); LowerButtonsBox.PackEnd(shuffle_toggle_button, false, false, 0); LowerButtonsBox.ShowAll(); // Hook up everything PlayerEngineCore.EventChanged += OnPlayerEngineEventChanged; PlayerEngineCore.StateChanged += OnPlayerEngineStateChanged; }