[banshee] [PlayQueue] Fix bug with initializing Actions state
- From: Gabriel Burt <gburt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [banshee] [PlayQueue] Fix bug with initializing Actions state
- Date: Sun, 7 Mar 2010 01:12:17 +0000 (UTC)
commit bb4fd872cf9eb13863307e4b0a3c18499ec6fb49
Author: Gabriel Burt <gabriel burt gmail com>
Date: Sat Mar 6 17:10:27 2010 -0800
[PlayQueue] Fix bug with initializing Actions state
If you had selected Fill by similar, and then run Banshee without the
Mirage extension installed, the Fill by dropdown would properly select
manually, but Refresh/Add More would still be shown (bgo#611867)
.../Banshee.PlayQueue/HeaderWidget.cs | 8 ++++++--
.../Banshee.PlayQueue/PlayQueueSource.cs | 2 ++
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/HeaderWidget.cs b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/HeaderWidget.cs
index 5ad10da..adba02d 100644
--- a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/HeaderWidget.cs
+++ b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/HeaderWidget.cs
@@ -47,12 +47,16 @@ namespace Banshee.PlayQueue
private readonly List<Widget> sensitive_widgets = new List<Widget> ();
+ private DictionaryComboBox<RandomBy> mode_combo;
+
+ public string ShuffleModeId { get { return mode_combo.ActiveValue.Id; } }
+
public HeaderWidget (Shuffler shuffler, string shuffle_mode_id, string source_name) : base ()
{
this.Spacing = 6;
var fill_label = new Label (Catalog.GetString ("_Fill"));
- var mode_combo = new DictionaryComboBox<RandomBy> ();
+ mode_combo = new DictionaryComboBox<RandomBy> ();
foreach (var random_by in shuffler.RandomModes.OrderBy (r => r.Adverb)) {
mode_combo.Add (random_by.Adverb, random_by);
if (random_by.Id == "off") {
@@ -104,4 +108,4 @@ namespace Banshee.PlayQueue
shuffler.RandomModeRemoved += (r) => mode_combo.Remove (r);
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
index e8d6ed6..7aec8e6 100644
--- a/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
+++ b/src/Extensions/Banshee.PlayQueue/Banshee.PlayQueue/PlayQueueSource.cs
@@ -147,6 +147,8 @@ namespace Banshee.PlayQueue
OnUpdated ();
};
+ populate_shuffle_mode = header_widget.ShuffleModeId;
+
header_widget.SourceChanged += delegate (object sender, EventArgs<DatabaseSource> e) {
populate_from = e.Value;
if (populate_from == null) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]