[banshee] [AddinView] Update each entry when toggled



commit 666c3e5eb3487a1d79a18261fa747ee7fc430a63
Author: Bertrand Lorentz <bertrand lorentz gmail com>
Date:   Sat May 22 13:01:57 2010 +0200

    [AddinView] Update each entry when toggled
    
    When an entry is toggled, we update each entry's enabled state instead
    of calling update_model (). This preserves the expansion state of the
    tree while still reflecting any enable/disable changes caused by
    extension dependencies.

 .../Banshee.Addins.Gui/AddinView.cs                |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/src/Core/Banshee.ThickClient/Banshee.Addins.Gui/AddinView.cs b/src/Core/Banshee.ThickClient/Banshee.Addins.Gui/AddinView.cs
index 22e1a3d..6a3f386 100644
--- a/src/Core/Banshee.ThickClient/Banshee.Addins.Gui/AddinView.cs
+++ b/src/Core/Banshee.ThickClient/Banshee.Addins.Gui/AddinView.cs
@@ -129,7 +129,13 @@ namespace Banshee.Addins.Gui
                     bool enabled = (bool) model.GetValue (iter, 1);
                     addin.Enabled = !enabled;
                     model.SetValue (iter, 1, addin.Enabled);
-                    update_model ();
+                    model.Foreach (delegate (TreeModel current_model, TreePath path, TreeIter current_iter) {
+                        var an = current_model.GetValue (current_iter, 3) as Addin;
+                        if (an != null) {
+                            current_model.SetValue (current_iter, 1, an.Enabled);
+                        }
+                        return false;
+                    });
                 }
             };
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]