banshee r3810 - in trunk/banshee: . src/Core/Banshee.Services/Banshee.Preferences src/Core/Banshee.ThickClient src/Core/Banshee.ThickClient/Banshee.Gui.Widgets src/Core/Banshee.ThickClient/Banshee.Preferences.Gui src/Libraries/Hyena.Gui src/Libraries/Hyena.Gui/Hyena.Widgets



Author: abock
Date: Wed Apr 23 05:05:12 2008
New Revision: 3810
URL: http://svn.gnome.org/viewvc/banshee?rev=3810&view=rev

Log:
2008-04-23  Aaron Bockover  <abock gnome org>

    This commit adds the initial work for the extension manager to allow
    you to enable and disable extensions; it does not yet work and there
    are still many interaction and rendering issues; no complaining

    * src/Core/Banshee.Services/Banshee.Preferences/Page.cs: Add the new
    extensions page to the preference set

    * src/Core/Banshee.Services/Banshee.Preferences/PreferenceBase.cs:
    * src/Core/Banshee.Services/Banshee.Preferences/Root.cs: Moved
    DisplayWidget to Root

    * src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/DefaultPreferenceWidgets.cs:
    Adapt the new AddinView for our extensions to the extensions page

    * src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/NotebookPage.cs:
    Support pages with their own DisplayWidgets

    * src/Libraries/Hyena.Gui/Hyena.Widgets/WrapLabel.cs: Added a new label
    that doesn't suck for proper wrapping; this label uses a width allocation
    from its parent to compute the layout and forces a height request to
    fit the wrapped layout; it is awesome; someone tell me if the standard
    GtkLabel can do this - I have in many years never been able to do this

    * src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/AddinTile.cs: Hot
    new tile widget that displays information about an addin/extension and
    will allow you to enable/disable it; not completely done

    * src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/AddinView.cs: A view
    that lays out the AddinTiles



Added:
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/AddinTile.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/AddinView.cs
   trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/WrapLabel.cs
Modified:
   trunk/banshee/ChangeLog
   trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/Page.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/PreferenceBase.cs
   trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/Root.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/DefaultPreferenceWidgets.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/NotebookPage.cs
   trunk/banshee/src/Core/Banshee.ThickClient/Banshee.ThickClient.mdp
   trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am
   trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.mdp
   trunk/banshee/src/Libraries/Hyena.Gui/Makefile.am

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/Page.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/Page.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/Page.cs	Wed Apr 23 05:05:12 2008
@@ -73,6 +73,8 @@
             
             file_system.Add (new SchemaPreference<string> (LibrarySchema.FilePattern,     
                 Catalog.GetString ("File _name")));
+            
+            service.Add (new Page ("extensions", Catalog.GetString ("Manage Extensions"), 10));
         }
     }
 }

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/PreferenceBase.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/PreferenceBase.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/PreferenceBase.cs	Wed Apr 23 05:05:12 2008
@@ -43,11 +43,5 @@
             get { return show_label; }
             set { show_label = value; }
         }
-        
-        private object display_widget;
-        public virtual object DisplayWidget {
-            get { return display_widget; }
-            set { display_widget = value; }
-        }
     }
 }

Modified: trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/Root.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/Root.cs	(original)
+++ trunk/banshee/src/Core/Banshee.Services/Banshee.Preferences/Root.cs	Wed Apr 23 05:05:12 2008
@@ -38,6 +38,7 @@
         private int order;
         private bool sensitive;
         private bool visible;
+        private object display_widget;
                 
         public Root ()
         {
@@ -74,5 +75,10 @@
             get { return visible; }
             set { visible = value; }
         }
+        
+        public virtual object DisplayWidget {
+            get { return display_widget; }
+            set { display_widget = value; }
+        }
     }
 }

Added: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/AddinTile.cs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/AddinTile.cs	Wed Apr 23 05:05:12 2008
@@ -0,0 +1,105 @@
+//
+// AddinTile.cs
+//
+// Author:
+//   Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using Gtk;
+using Mono.Addins;
+
+using Hyena.Widgets;
+
+namespace Banshee.Gui.Widgets
+{    
+    public class AddinTile : Table
+    {
+        private Addin addin;
+        private Button activate_button;
+        
+        public AddinTile (Addin addin) : base (2, 3, false)
+        {
+            this.addin = addin;
+            BuildTile ();
+        }
+        
+        private void BuildTile ()
+        {
+            BorderWidth = 5;
+            RowSpacing = 1;
+            ColumnSpacing = 5;
+            
+            Label name = new Label ();
+            name.Show ();
+            name.Xalign = 0.0f;
+            name.Markup = String.Format ("<b>{0}</b>", GLib.Markup.EscapeText (addin.Name));
+            
+            Attach (name, 1, 3, 0, 1, 
+                AttachOptions.Expand | AttachOptions.Fill, 
+                AttachOptions.Expand | AttachOptions.Fill, 0, 0);
+            
+            WrapLabel desc = new WrapLabel ();
+            desc.Show ();
+            desc.Markup = String.Format ("<small>{0}</small>", GLib.Markup.EscapeText (addin.Description.Description));
+            
+            Attach (desc, 1, 2, 1, 2,
+                AttachOptions.Expand | AttachOptions.Fill, 
+                AttachOptions.Expand | AttachOptions.Fill, 0, 0);
+                
+            HBox box = new HBox ();
+            box.Show ();
+            activate_button = new Button ("Disable");
+            box.PackEnd (activate_button, false, false, 0);
+            Attach (box, 2, 3, 1, 2, AttachOptions.Shrink, AttachOptions.Expand, 0, 0);
+                
+            Show ();
+        }
+        
+        protected override void OnRealized ()
+        {
+            WidgetFlags |= WidgetFlags.NoWindow;
+            GdkWindow = Parent.GdkWindow;
+            base.OnRealized ();
+        }
+        
+        protected override bool OnExposeEvent (Gdk.EventExpose evnt)
+        {
+            if (State == StateType.Selected) {
+                Gtk.Style.PaintFlatBox (Style, evnt.Window, State, ShadowType.None, evnt.Area, 
+                    this, "row", Allocation.X, Allocation.Y, Allocation.Width, Allocation.Height);
+            }
+            
+            return base.OnExposeEvent (evnt);
+        }
+        
+        public void Select (bool select)
+        {
+            State = select ? StateType.Selected : StateType.Normal;
+            activate_button.Visible = select;
+            activate_button.State = StateType.Normal;
+            QueueResize ();
+        }
+    }
+}

Added: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/AddinView.cs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Gui.Widgets/AddinView.cs	Wed Apr 23 05:05:12 2008
@@ -0,0 +1,157 @@
+//
+// AddinView.cs
+//
+// Author:
+//   Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using System.Collections.Generic;
+using Gtk;
+
+using Mono.Addins;
+
+namespace Banshee.Gui.Widgets
+{
+    public class AddinView : EventBox
+    {
+        private List<AddinTile> tiles = new List<AddinTile> ();
+        private VBox box = new VBox ();
+        
+        private int selected_index = -1;
+    
+        public AddinView ()
+        {
+            CanFocus = true;
+            VisibleWindow = false;
+            
+            box.Show ();
+            Add (box);
+            
+            foreach (Addin addin in AddinManager.Registry.GetAddins ()) {
+                if (addin.Name != addin.Id) {
+                    AppendAddin (addin);
+                }
+            }
+        }
+        
+        private bool changing_styles = false;
+        
+        protected override void OnStyleSet (Style previous_style)
+        {
+            if (changing_styles) {
+                return;
+            }
+            
+            changing_styles = true;
+            base.OnStyleSet (previous_style);
+            Parent.ModifyBg (StateType.Normal, Style.Base (StateType.Normal));
+            changing_styles = false;
+        }
+        
+        private void AppendAddin (Addin addin)
+        {
+            AddinTile tile = new AddinTile (addin);
+            tile.Show ();
+            tiles.Add (tile);
+            
+            box.PackStart (tile, false, false, 0);
+        }
+        
+        protected override bool OnButtonPressEvent (Gdk.EventButton evnt)
+        {
+            HasFocus = true;
+            
+            ClearSelection ();
+            
+            for (int i = 0; i < tiles.Count; i++) {
+                if (tiles[i].Allocation.Contains ((int)evnt.X, (int)evnt.Y)) {
+                    Select (i);
+                    break;
+                }
+            }
+            
+            QueueDraw ();
+            
+            return base.OnButtonPressEvent (evnt);
+        }
+        
+        protected override bool OnKeyPressEvent (Gdk.EventKey evnt)
+        {
+            int index = selected_index;
+        
+            switch (evnt.Key) {
+                 case Gdk.Key.Up:
+                 case Gdk.Key.uparrow:
+                     index--;
+                     if (index < 0) {
+                         index = 0;
+                     }
+                     break;
+                 case Gdk.Key.Down:
+                 case Gdk.Key.downarrow:
+                     index++;
+                     if (index > tiles.Count - 1) {
+                         index = tiles.Count - 1;
+                     }
+                     break;
+            }
+            
+            if (index != selected_index) {
+                ClearSelection ();
+                Select (index);
+                return true;
+            }
+        
+            return base.OnKeyPressEvent (evnt);
+        }
+        
+        private void Select (int index)
+        {
+            if (index >= 0 && index < tiles.Count) {
+                selected_index = index;
+                tiles[index].Select (true);
+                
+                // FIXME: This is not right at all
+                if (!tiles[index].Allocation.IntersectsWith (Parent.Allocation)) {
+                    ScrolledWindow w = Parent.Parent as ScrolledWindow;
+                    if (w != null) {
+                        w.Vadjustment.Value = tiles[index].Allocation.Y;
+                    }
+                }
+            } else {
+                ClearSelection ();
+            }
+        }
+        
+        private void ClearSelection ()
+        {
+            if (selected_index >= 0 && selected_index < tiles.Count) {
+                tiles[selected_index].Select (false);
+            }
+            
+            selected_index = -1;
+        }
+    }
+}

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/DefaultPreferenceWidgets.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/DefaultPreferenceWidgets.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/DefaultPreferenceWidgets.cs	Wed Apr 23 05:05:12 2008
@@ -37,6 +37,7 @@
 
 using Hyena.Widgets;
 using Banshee.Widgets;
+using Banshee.Gui.Widgets;
 
 namespace Banshee.Preferences.Gui
 {
@@ -57,6 +58,17 @@
             
             PreferenceBase pattern_display = general["file-system"].FindOrAdd (new VoidPreference ("file_folder_pattern"));
             pattern_display.DisplayWidget = new PatternDisplay (folder_pattern.DisplayWidget, file_pattern.DisplayWidget);
+            
+            // Set up the extensions tab UI
+            AddinView view = new AddinView ();
+            view.Show ();
+            
+            Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow ();
+            scroll.HscrollbarPolicy = PolicyType.Never;
+            scroll.AddWithViewport (view);
+            scroll.Show ();
+            
+            service["extensions"].DisplayWidget = scroll;
         }
 
         private class LibraryLocationButton : HBox

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/NotebookPage.cs
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/NotebookPage.cs	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.Preferences.Gui/NotebookPage.cs	Wed Apr 23 05:05:12 2008
@@ -55,8 +55,14 @@
             tab_widget = new Label (page.Name);
             tab_widget.Show ();
             
-            foreach (Section section in page) {
-                AddSection (section);
+            Widget page_widget = page.DisplayWidget as Widget;
+            if (page_widget != null) {
+                page_widget.Show ();
+                PackStart (page_widget, true, true, 0);
+            } else {
+                foreach (Section section in page) {
+                    AddSection (section);
+                }
             }
         }
         

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Banshee.ThickClient.mdp
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Banshee.ThickClient.mdp	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Banshee.ThickClient.mdp	Wed Apr 23 05:05:12 2008
@@ -103,6 +103,8 @@
     <File name="Banshee.Preferences.Gui/SectionBox.cs" subtype="Code" buildaction="Compile" />
     <File name="Banshee.Preferences.Gui/WidgetFactory.cs" subtype="Code" buildaction="Compile" />
     <File name="Banshee.Preferences.Gui/DefaultPreferenceWidgets.cs" subtype="Code" buildaction="Compile" />
+    <File name="Banshee.Gui.Widgets/AddinView.cs" subtype="Code" buildaction="Compile" />
+    <File name="Banshee.Gui.Widgets/AddinTile.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Project" localcopy="False" refto="Hyena.Gui" />
@@ -117,6 +119,7 @@
     <ProjectReference type="Project" localcopy="False" refto="Banshee.Widgets" />
     <ProjectReference type="Gac" localcopy="True" refto="glib-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
+    <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
   </References>
   <Deployment.LinuxDeployData generateScript="False" />
   <MonoDevelop.Autotools.MakefileInfo IntegrationEnabled="True" RelativeMakefileName="Makefile.am">

Modified: trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am
==============================================================================
--- trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am	(original)
+++ trunk/banshee/src/Core/Banshee.ThickClient/Makefile.am	Wed Apr 23 05:05:12 2008
@@ -38,6 +38,8 @@
 	Banshee.Gui.DragDrop/DragDropList.cs \
 	Banshee.Gui.DragDrop/DragDropTarget.cs \
 	Banshee.Gui.DragDrop/DragDropUtilities.cs \
+	Banshee.Gui.Widgets/AddinTile.cs \
+	Banshee.Gui.Widgets/AddinView.cs \
 	Banshee.Gui.Widgets/ArtworkPopup.cs \
 	Banshee.Gui.Widgets/ConnectedMessageBar.cs \
 	Banshee.Gui.Widgets/ConnectedSeekSlider.cs \

Modified: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.mdp
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.mdp	(original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Gui.mdp	Wed Apr 23 05:05:12 2008
@@ -69,6 +69,7 @@
     <File name="Hyena.Gui/CompositeUtils.cs" subtype="Code" buildaction="Compile" />
     <File name="Hyena.Widgets/TextViewLabel.cs" subtype="Code" buildaction="Compile" />
     <File name="Hyena.Gui/TooltipSetter.cs" subtype="Code" buildaction="Compile" />
+    <File name="Hyena.Widgets/WrapLabel.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />

Added: trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/WrapLabel.cs
==============================================================================
--- (empty file)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Hyena.Widgets/WrapLabel.cs	Wed Apr 23 05:05:12 2008
@@ -0,0 +1,131 @@
+//
+// WrapLabel.cs
+//
+// Author:
+//   Aaron Bockover <abockover novell com>
+//
+// Copyright (C) 2008 Novell, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
+using System;
+using Gtk;
+
+namespace Hyena.Widgets
+{
+    public class WrapLabel : Widget
+    {
+        private string text;
+        private bool use_markup = false;
+        private Pango.Layout layout;
+        
+        public WrapLabel ()
+        {
+        }
+        
+        private void CreateLayout ()
+        {
+            if (layout != null) {
+                layout.Dispose ();
+            }
+            
+            layout = new Pango.Layout (PangoContext);
+            layout.Wrap = Pango.WrapMode.Word;
+        }
+        
+        private void UpdateLayout ()
+        {
+            if (layout == null) {
+                CreateLayout ();
+            }
+            
+            if (use_markup) {
+                layout.SetMarkup (text);
+            } else {
+                layout.SetText (text);
+            }
+            
+            QueueResize ();
+        }
+        
+        protected override void OnStyleSet (Style previous_style)
+        {
+            CreateLayout ();
+            UpdateLayout ();
+            base.OnStyleSet (previous_style);
+        }
+        
+        protected override void OnRealized ()
+        {
+            WidgetFlags |= WidgetFlags.NoWindow;
+            GdkWindow = Parent.GdkWindow;
+            base.OnRealized ();
+        }
+        
+        protected override void OnUnrealized ()
+        {
+            WidgetFlags &= ~WidgetFlags.NoWindow;
+            base.OnUnrealized ();
+        }
+        
+        protected override void OnSizeAllocated (Gdk.Rectangle allocation)
+        {
+            int lw, lh;
+            
+            layout.Width = (int)(allocation.Width * Pango.Scale.PangoScale);
+            layout.GetPixelSize (out lw, out lh);
+            
+            HeightRequest = lh;
+            
+            base.OnSizeAllocated (allocation);
+        }
+
+        protected override bool OnExposeEvent (Gdk.EventExpose evnt)
+        {
+            if (evnt.Window != GdkWindow) {
+                return base.OnExposeEvent (evnt);
+            }
+            
+            Gtk.Style.PaintLayout (Style, GdkWindow, State, false, evnt.Area, 
+                this, null, Allocation.X, Allocation.Y, layout);
+            
+            return true;
+        }
+        
+        public string Markup {
+            get { return text; }
+            set {
+                use_markup = true;
+                text = value;
+                UpdateLayout ();
+            }
+        }
+        
+        public string Text {
+            get { return text; }
+            set {
+                use_markup = false;
+                text = value;
+                UpdateLayout ();
+            }
+        }       
+    }
+}

Modified: trunk/banshee/src/Libraries/Hyena.Gui/Makefile.am
==============================================================================
--- trunk/banshee/src/Libraries/Hyena.Gui/Makefile.am	(original)
+++ trunk/banshee/src/Libraries/Hyena.Gui/Makefile.am	Wed Apr 23 05:05:12 2008
@@ -62,7 +62,8 @@
 	Hyena.Widgets/RoundedFrame.cs \
 	Hyena.Widgets/ScrolledWindow.cs \
 	Hyena.Widgets/SmoothScrolledWindow.cs \
-	Hyena.Widgets/TextViewLabel.cs
+	Hyena.Widgets/TextViewLabel.cs \
+	Hyena.Widgets/WrapLabel.cs
 
 include $(top_srcdir)/build/build.mk
 



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